@dcl/shop 0.1.0-28747573214.commit-462a45d → 0.1.0-28749696583.commit-1ceed46
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.
- package/assets/{Assets-DfOXKOnR.js → Assets-aLMhp0dt.js} +1 -1
- package/assets/{Cart-DbbHo7Lp.js → Cart-De2Zl3dM.js} +1 -1
- package/assets/{CircularProgress-D-iaLmF3.js → CircularProgress-zG5DpGEk.js} +1 -1
- package/assets/{Collection-BBAHD9v7.js → Collection-D2tlaWRj.js} +1 -1
- package/assets/{ConstantsUtil-CkFCQ14z.js → ConstantsUtil-D9t4gp4-.js} +1 -1
- package/assets/{Creator-Cf3awWfr.js → Creator-nG5HN86G.js} +1 -1
- package/assets/{ExchangeController-C636pVri.js → ExchangeController-DxQ_hnpn.js} +1 -1
- package/assets/{GetCredits-BbICBHrS.js → GetCredits-Dpbjid38.js} +2 -2
- package/assets/{HelpersUtil-D13uBBzL.js → HelpersUtil-CE2js2MR.js} +1 -1
- package/assets/{ImportListings-BBkMIFrL.js → ImportListings-CJDBHXeE.js} +1 -1
- package/assets/{ItemDetail-Dn0l_owe.js → ItemDetail-8nTYzMUv.js} +1 -1
- package/assets/{Market-CMksg97B.js → Market-D5ojlVRL.js} +1 -1
- package/assets/{MyAssets-Ly529Qzy.js → MyAssets-D9VUj3Zr.js} +1 -1
- package/assets/{MyFavorites-BM98-wNr.js → MyFavorites-DeEu4CEV.js} +1 -1
- package/assets/{MyPurchases-DDXg_7hF.js → MyPurchases-DvIbgEFO.js} +1 -1
- package/assets/{NetworkUtil-DRBYr7tG.js → NetworkUtil-CSluj-ND.js} +1 -1
- package/assets/{RealCheckout-CZ81fyEJ.js → RealCheckout-DW__EYhq.js} +1 -1
- package/assets/{Success-De5n3cBh.js → Success-B3A8ZBjK.js} +1 -1
- package/assets/{SvgIcon-DMAonb7f.js → SvgIcon-Bf8o-Oh9.js} +1 -1
- package/assets/{SwapController-DPv5gEgC.js → SwapController-442j5gZT.js} +1 -1
- package/assets/{TradeService-BuOZVMe-.js → TradeService-Bis1RE0m.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-C53Q9nWr.js → W3MFrameProviderSingleton-BSVX-6L0.js} +3 -3
- package/assets/{WebCryptoP256-DpIFc-YF.js → WebCryptoP256-bcQGKg-7.js} +1 -1
- package/assets/{basic-9TVVZq54.js → basic-DON-N1CW.js} +1 -1
- package/assets/{biconomy-BqDW4_Fp.js → biconomy-CzjuLXKA.js} +1 -1
- package/assets/{buy-WskP4uLn.js → buy-5130Im35.js} +1 -1
- package/assets/{buy-gasless-BGYfXddW.js → buy-gasless-CAFJBEcY.js} +1 -1
- package/assets/{ccip-Bj2uK6oU.js → ccip-Be3XfiR-.js} +1 -1
- package/assets/{ccip-D_jnTLJz.js → ccip-C1VLZjOC.js} +1 -1
- package/assets/{chains-BvaNJh8k.js → chains-L33YnVne.js} +1 -1
- package/assets/{collection-BxPtwR5Z.js → collection-BTAfnBAO.js} +1 -1
- package/assets/{common-nfYPFMcM.js → common-CKF0Kl8D.js} +1 -1
- package/assets/{controller-B8DfbcQK.js → controller-BtovDqDB.js} +2 -2
- package/assets/{core-CwPOZw31.js → core-CZtd-NIi.js} +4 -4
- package/assets/{custom-CGIKAcy_.js → custom-BwG_UShl.js} +1 -1
- package/assets/{data-capture-DxwcCoJo.js → data-capture-eO7T9U30.js} +1 -1
- package/assets/decimals-CP_7HUio.js +1 -0
- package/assets/{decimals-DxJOLJvr.js → decimals-ChKIkXOS.js} +1 -1
- package/assets/{detectExtension-C1tdnZ3w.js → detectExtension-tc_ts8l0.js} +1 -1
- package/assets/{email-D72jCMmT.js → email-Stqivzcj.js} +1 -1
- package/assets/{embedded-wallet-Bog9n_tH.js → embedded-wallet-DCapk4p8.js} +1 -1
- package/assets/{engine-Bog4mCpH.js → engine-DUpcMxaF.js} +1 -1
- package/assets/{estimate-l1-fee-CuQIe1md.js → estimate-l1-fee-CLHdzsZf.js} +1 -1
- package/assets/eth_estimateGas-C29fayI3.js +1 -0
- package/assets/{eth_getStorageAt-9X28hhH4.js → eth_getStorageAt-CLFvCDZd.js} +1 -1
- package/assets/eth_getTransactionCount-CI8xyokV.js +1 -0
- package/assets/{ethereum-DymVJL-H.js → ethereum-BT-rALS5.js} +1 -1
- package/assets/{ethers-BxoDGoYp.js → ethers-DbXGgxrh.js} +4 -4
- package/assets/{extractIPFS-CzVhnm6X.js → extractIPFS-BGsgU6Dq.js} +1 -1
- package/assets/{features-Ds8qi8e0.js → features-BVeS0JHV.js} +1 -1
- package/assets/{fetchTokenMetadata-DyKFRjaS.js → fetchTokenMetadata-BLzsI7EC.js} +2 -2
- package/assets/generateUtilityClasses-B28mC2Si.js +9 -0
- package/assets/get-ecosystem-wallet-info-R5ARh3Yl.js +1 -0
- package/assets/{getBalance-CPtlpRd8.js → getBalance-BSCY52PD.js} +2 -2
- package/assets/{getInstalledModules-jCIwW2OV.js → getInstalledModules-BS7IiWOH.js} +1 -1
- package/assets/{getNFT-17KjVI3E.js → getNFT-BK5_-4hT.js} +1 -1
- package/assets/{getNFT-D71TQwqJ.js → getNFT-BwgDFGMN.js} +2 -2
- package/assets/{hashTypedData-BsHEgjBY.js → hashTypedData-Cq89-tTo.js} +1 -1
- package/assets/{hashTypedData-22Nm0csw.js → hashTypedData-q9oxx1xt.js} +1 -1
- package/assets/{import-CcQ3dh0l.js → import-8mZnlxOL.js} +1 -1
- package/assets/{in-app-wallet-calls-t-sxRkB2.js → in-app-wallet-calls-DloE1FT2.js} +1 -1
- package/assets/{index-DT36RcnA.js → index-8vuqXajV.js} +2 -2
- package/assets/{index-COCOMkF6.js → index-B0pKs-hj.js} +1 -1
- package/assets/{index-CBg9-0F-.js → index-B4P5FnkC.js} +1 -1
- package/assets/{index-D1Hm6q3z.js → index-B9O7lhLw.js} +1 -1
- package/assets/{index-CtdBxwRn.js → index-BAgLTJQC.js} +1 -1
- package/assets/{index-sHr-hGKY.js → index-BD27OB6Q.js} +1 -1
- package/assets/{index-CwQ4WZHg.js → index-BDUVlNpj.js} +1 -1
- package/assets/{index--aCrl8ym.js → index-BE2OdG3f.js} +1 -1
- package/assets/{index-Cx5vMrtt.js → index-BF4emFry.js} +1 -1
- package/assets/{index-BW0vL61p.js → index-BIzLuINV.js} +1 -1
- package/assets/{index-jHxTGJdg.js → index-BJxTr96X.js} +1 -1
- package/assets/{index-Bvp-iyve.js → index-BLKJ4eEO.js} +1 -1
- package/assets/{index-DvOTdACV.js → index-BOcZHHVN.js} +1 -1
- package/assets/{index-BW4u89-l.js → index-BVm65sSQ.js} +1 -1
- package/assets/{index-iwu8tO4Z.js → index-BeFu8hpI.js} +1 -1
- package/assets/{index-C4O-XKSm.js → index-Bj6vwNIk.js} +1 -1
- package/assets/{index-DpzUBtKq.js → index-BsL6EcA1.js} +3 -3
- package/assets/{index-Bw9N_kF_.js → index-BxSPmv0Y.js} +1 -1
- package/assets/{index-BwKjjXxD.js → index-BydDLvNI.js} +1 -1
- package/assets/{index-DYPF9UsI.js → index-C-jpz5Fa.js} +1 -1
- package/assets/{index-BopweyiH.js → index-C0RsmTxE.js} +1 -1
- package/assets/{index-BitTsk-8.js → index-C24A9Q_B.js} +1 -1
- package/assets/{index-xXtPh54p.js → index-C7dh-AbD.js} +2 -2
- package/assets/{index-D-XWUY--.js → index-CCidLmBj.js} +1 -1
- package/assets/{index-1QyqBynD.js → index-CFdMT9MW.js} +2 -2
- package/assets/{index-C9iIs3VH.js → index-CORb4fda.js} +1 -1
- package/assets/{index-DuzIppyc.js → index-CYxyFUAy.js} +1 -1
- package/assets/{index-DLXCkPW8.js → index-CaaeFuGL.js} +1 -1
- package/assets/{index-o5cecGpl.js → index-CcZ_aO1r.js} +1 -1
- package/assets/{index-VI4KjHoC.js → index-Cgp0c25G.js} +1 -1
- package/assets/{index-DHKMIodB.js → index-CjaxrxzI.js} +2 -2
- package/assets/index-Ck7C_Qc5.js +74 -0
- package/assets/{index-B6FpnCqN.js → index-Cs_2iQ3W.js} +1 -1
- package/assets/{index-Cm04cZlI.js → index-CuKnEc0t.js} +1 -1
- package/assets/{index-DxHbUIT4.js → index-CzK1bz00.js} +1 -1
- package/assets/{index-Cf02sP_a.js → index-D-Kw_wUy.js} +1 -1
- package/assets/{index-BU0oqH1v.js → index-D2dWLs9-.js} +1 -1
- package/assets/{index-BwNwknii.js → index-D58Lm6fy.js} +1 -1
- package/assets/{index-BRXlFZYr.js → index-D6G1eVBw.js} +1 -1
- package/assets/{index-DLUxEVXI.js → index-D6jW0QuZ.js} +1 -1
- package/assets/{index-BuiY2b5V.js → index-DIMb2qTx.js} +1 -1
- package/assets/{index-CfzTflc3.js → index-DM4yPO68.js} +1 -1
- package/assets/{index-heQt9VsF.js → index-DO5kbyL5.js} +3 -3
- package/assets/{index-D2i3ctoC.js → index-DWGjNbEm.js} +1 -1
- package/assets/{index-DXqcXSOs.js → index-DaDPmmBo.js} +1 -1
- package/assets/{index-wg2QrcW5.js → index-DacoqM69.js} +1 -1
- package/assets/{index-CNbUbmHm.js → index-Dm3nVmD3.js} +1 -1
- package/assets/{index-Ck94hhTo.js → index-DnXaf_28.js} +1 -1
- package/assets/{index-CwbrgNKr.js → index-Dp-0pAj4.js} +1 -1
- package/assets/{index-VE0M5Mr2.js → index-SBOBxQlc.js} +1 -1
- package/assets/{index-BHoDUeMz.js → index-ZrYHq_rN.js} +1 -1
- package/assets/{index-BwWuCRvy.js → index-aTH_VwVx.js} +1 -1
- package/assets/{index-RrpD-c5G.js → index-aWPj5LNH.js} +1 -1
- package/assets/{index-BSHqxnWX.js → index-iF9kiYoZ.js} +1 -1
- package/assets/{index-DEh0LiFK.js → index-ufiEiZ1d.js} +1 -1
- package/assets/{index.es-DEttXaJp.js → index.es-AvZc0iwU.js} +4 -4
- package/assets/{index.es-DdKll-wt.js → index.es-BHmJ3HE8.js} +1 -1
- package/assets/{index.es-2PzIAt_1.js → index.es-WIKYy9BI.js} +1 -1
- package/assets/{localBatchGatewayRequest-C-g14orC.js → localBatchGatewayRequest-DAEYAZDW.js} +1 -1
- package/assets/{mana-rate-DeQxAZWf.js → mana-rate-Cj4WJyFX.js} +1 -1
- package/assets/{native-Df5jPT-i.js → native-BJmDxbqB.js} +1 -1
- package/assets/network-BWxaW3rR.js +1 -0
- package/assets/{networks-DQ_uJOW0.js → networks-eeU54tZ7.js} +1 -1
- package/assets/{onramp-Fj0QTWoK.js → onramp-DhSiFszx.js} +1 -1
- package/assets/{openzeppelin-C05m57x-.js → openzeppelin-TUhCXc3W.js} +1 -1
- package/assets/{ownerOf-iDx9Bfmb.js → ownerOf-DU-JKoHi.js} +1 -1
- package/assets/{parseNft-BbqeSraZ.js → parseNft-BvVevHMp.js} +2 -2
- package/assets/{parseSignature-DecPFzAG.js → parseSignature-CqBaxebK.js} +1 -1
- package/assets/{parseSignature-BpHf1ckR.js → parseSignature-fzdlClLS.js} +3 -3
- package/assets/{pay-with-exchange-DcOvi8il.js → pay-with-exchange-CcXMWyyR.js} +1 -1
- package/assets/{qr-overlay-C42zumtd.js → qr-overlay-CoU3_96F.js} +1 -1
- package/assets/{receive-CBWc5sHm.js → receive-DlVMqTPT.js} +1 -1
- package/assets/{resolveImplementation-Dfnpuqfy.js → resolveImplementation-DTf71Ha-.js} +1 -1
- package/assets/{rpc-CpwULMGN.js → rpc-qmK5iTzE.js} +1 -1
- package/assets/{secp256k1-C6oufD3A.js → secp256k1-DFuDr3b6.js} +1 -1
- package/assets/{secp256k1-BnqRXIY8.js → secp256k1-nA5uVAYh.js} +1 -1
- package/assets/{secp256k1-yeQJ89oh.js → secp256k1-xb6034EE.js} +1 -1
- package/assets/{send-batch-transaction-BSK7bmqA.js → send-batch-transaction-BFEKzC9O.js} +1 -1
- package/assets/{send-eip712-transaction-Dn-wh_B2.js → send-eip712-transaction-BQihd29J.js} +2 -2
- package/assets/{send-gasless-transaction-Ca3gem0_.js → send-gasless-transaction-BqA4bIvc.js} +2 -2
- package/assets/{send-BkoLHxtn.js → send-u3ctJaL6.js} +1 -1
- package/assets/{sendRawTransaction-Cs49dy2x.js → sendRawTransaction-C8j0qQ9e.js} +3 -3
- package/assets/{serializeTransaction-KiaMgBPL.js → serializeTransaction-Dz4GBhoh.js} +1 -1
- package/assets/{session-proposal-vzIJwf7D.js → session-proposal-Db4KYIHa.js} +1 -1
- package/assets/{session-request-BEIJZaAK.js → session-request-CihuU88c.js} +2 -2
- package/assets/{sha256-BiN04lIc.js → sha256-CgtTKrQj.js} +1 -1
- package/assets/{signing-BwGscoGI.js → signing-BpshFomj.js} +5 -5
- package/assets/{socials-CkBpzoYO.js → socials-CVrxuzLr.js} +1 -1
- package/assets/{swaps-DQ5hCG4G.js → swaps-BgpJ5WXk.js} +1 -1
- package/assets/{thirdweb-DGSIWchy.js → thirdweb-CYxasBJb.js} +3 -3
- package/assets/{totalSupply--7Gy53iL.js → totalSupply-B1JXRs3G.js} +1 -1
- package/assets/{transactionReceipt-BqWcSLOT.js → transactionReceipt-C76rMl4n.js} +1 -1
- package/assets/{transactions-BLMRTJRj.js → transactions-4VkJkzU5.js} +1 -1
- package/assets/{useInfiniteGrid-DPeVNTF0.js → useInfiniteGrid-DWCJkphW.js} +1 -1
- package/assets/{utils-CtSpY5KY.js → utils-BZTXwsyT.js} +1 -1
- package/assets/{verifyHash-BbyYMDj2.js → verifyHash-ETsOfWG5.js} +1 -1
- package/assets/{w3m-modal-BO7VJd_F.js → w3m-modal-DnfQqgSb.js} +1 -1
- package/assets/{w3m-modal-CU9GrhG1.js → w3m-modal-Dsohngdn.js} +1 -1
- package/assets/{wait-for-tx-receipt-B7zpFNTs.js → wait-for-tx-receipt-B7QM3M94.js} +1 -1
- package/assets/{wallet-kind-I50FvVNZ.js → wallet-kind-B1XTGpW3.js} +1 -1
- package/assets/{wallets-3KLAORfj.js → wallets-Bvy8SYUi.js} +6 -6
- package/assets/{web-connector-n3P_8fE1.js → web-connector-D7aGkNQq.js} +3 -3
- package/assets/{writeContract-CuPR4V-g.js → writeContract-B9ry2Fzp.js} +1 -1
- package/assets/{zora-sepolia-9dBUmZVP.js → zora-sepolia-BF9oR096.js} +1 -1
- package/assets/{zoraTestnet-lp6nJymD.js → zoraTestnet-CbeIIuai.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/decimals-B0WxCOWV.js +0 -1
- package/assets/eth_estimateGas-BeOmUDSu.js +0 -1
- package/assets/eth_getTransactionCount-CHvlH_2Q.js +0 -1
- package/assets/generateUtilityClasses-sji8XAMf.js +0 -16
- package/assets/get-ecosystem-wallet-info-DVtQmxfc.js +0 -1
- package/assets/index-BHOQ04tl.js +0 -42
- package/assets/network-Cc_j76mj.js +0 -1
package/assets/index-BHOQ04tl.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cf02sP_a.js","assets/react-E8ng6RF2.js","assets/network-Cc_j76mj.js","assets/SvgIcon-DMAonb7f.js","assets/generateUtilityClasses-sji8XAMf.js","assets/ethers-BxoDGoYp.js","assets/index-xXtPh54p.js","assets/index-Bw9N_kF_.js","assets/index-B5lBgsVo.js","assets/CircularProgress-D-iaLmF3.js","assets/TradeService-BuOZVMe-.js","assets/index-BwNwknii.js","assets/Assets-DfOXKOnR.js","assets/SkeletonCards-yV2mi4oc.js","assets/LoadMore-DB6TwvRe.js","assets/useInfiniteGrid-DPeVNTF0.js","assets/Market-CMksg97B.js","assets/mana-rate-DeQxAZWf.js","assets/buy-WskP4uLn.js","assets/buy-gasless-BGYfXddW.js","assets/ItemDetail-Dn0l_owe.js","assets/ItemDetail-yNwYjl_l.css","assets/Collection-BBAHD9v7.js","assets/collection-BxPtwR5Z.js","assets/collection-Ds5shVfK.css","assets/Creator-Cf3awWfr.js","assets/MyAssets-Ly529Qzy.js","assets/import-CcQ3dh0l.js","assets/wallet-kind-I50FvVNZ.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-BM98-wNr.js","assets/MyPurchases-DDXg_7hF.js","assets/ImportListings-BBkMIFrL.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-DbbHo7Lp.js","assets/GetCredits-BbICBHrS.js","assets/Success-De5n3cBh.js","assets/NotFound-BK3mhtdy.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var OR=Object.defineProperty;var Ty=e=>{throw TypeError(e)};var PR=(e,r,t)=>r in e?OR(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var nn=(e,r,t)=>PR(e,typeof r!="symbol"?r+"":r,t),Mu=(e,r,t)=>r.has(e)||Ty("Cannot "+t);var oe=(e,r,t)=>(Mu(e,r,"read from private field"),t?t.call(e):r.get(e)),He=(e,r,t)=>r.has(e)?Ty("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Ce=(e,r,t,n)=>(Mu(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t),xe=(e,r,t)=>(Mu(e,r,"access private method"),t);var Fs=(e,r,t,n)=>({set _(i){Ce(e,r,i,t)},get _(){return oe(e,r,n)}});import{r as We,j as pe,l as sS,g as oS,R as uS,c as im,L as ru,b as Tm,m as an,d as NR,n as MR,o as Wt,N as CR,p as jR,B as DR}from"./react-E8ng6RF2.js";import{p as tu,W as qR,m as LR,h as Sy,f as cS}from"./ethers-BxoDGoYp.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.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 t(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=t(i);fetch(i.href,a)}})();var Ka=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(){}},ni,cn,Oi,JT,$R=(JT=class extends Ka{constructor(){super();He(this,ni);He(this,cn);He(this,Oi);Ce(this,Oi,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){oe(this,cn)||this.setEventListener(oe(this,Oi))}onUnsubscribe(){var r;this.hasListeners()||((r=oe(this,cn))==null||r.call(this),Ce(this,cn,void 0))}setEventListener(r){var t;Ce(this,Oi,r),(t=oe(this,cn))==null||t.call(this),Ce(this,cn,r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(r){oe(this,ni)!==r&&(Ce(this,ni,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof oe(this,ni)=="boolean"?oe(this,ni):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},ni=new WeakMap,cn=new WeakMap,Oi=new WeakMap,JT),Sm=new $R,BR={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},ln,bm,XT,UR=(XT=class{constructor(){He(this,ln,BR);He(this,bm,!1)}setTimeoutProvider(e){Ce(this,ln,e)}setTimeout(e,r){return oe(this,ln).setTimeout(e,r)}clearTimeout(e){oe(this,ln).clearTimeout(e)}setInterval(e,r){return oe(this,ln).setInterval(e,r)}clearInterval(e){oe(this,ln).clearInterval(e)}},ln=new WeakMap,bm=new WeakMap,XT),ri=new UR;function kR(e){setTimeout(e,0)}var VR=typeof window>"u"||"Deno"in globalThis;function er(){}function FR(e,r){return typeof e=="function"?e(r):e}function am(e){return typeof e=="number"&&e>=0&&e!==1/0}function lS(e,r){return Math.max(e+(r||0)-Date.now(),0)}function gn(e,r){return typeof e=="function"?e(r):e}function ar(e,r){return typeof e=="function"?e(r):e}function Ay(e,r){const{type:t="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(r.queryHash!==Am(s,r.options))return!1}else if(!La(r.queryKey,s))return!1}if(t!=="all"){const c=r.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&r.isStale()!==o||i&&i!==r.state.fetchStatus||a&&!a(r))}function Ry(e,r){const{exact:t,status:n,predicate:i,mutationKey:a}=e;if(a){if(!r.options.mutationKey)return!1;if(t){if(qa(r.options.mutationKey)!==qa(a))return!1}else if(!La(r.options.mutationKey,a))return!1}return!(n&&r.state.status!==n||i&&!i(r))}function Am(e,r){return((r==null?void 0:r.queryKeyHashFn)||qa)(e)}function qa(e){return JSON.stringify(e,(r,t)=>om(t)?Object.keys(t).sort().reduce((n,i)=>(n[i]=t[i],n),{}):t)}function La(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(t=>La(e[t],r[t])):!1}var HR=Object.prototype.hasOwnProperty;function dS(e,r,t=0){if(e===r)return e;if(t>500)return r;const n=wy(e)&&wy(r);if(!n&&!(om(e)&&om(r)))return r;const a=(n?e:Object.keys(e)).length,s=n?r:Object.keys(r),o=s.length,c=n?new Array(o):{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u],g=e[f],_=r[f];if(g===_){c[f]=g,(n?u<a:HR.call(e,f))&&l++;continue}if(g===null||_===null||typeof g!="object"||typeof _!="object"){c[f]=_;continue}const A=dS(g,_,t+1);c[f]=A,A===g&&l++}return a===o&&l===a?e:c}function sm(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const t in e)if(e[t]!==r[t])return!1;return!0}function wy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function om(e){if(!Iy(e))return!1;const r=e.constructor;if(r===void 0)return!0;const t=r.prototype;return!(!Iy(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Iy(e){return Object.prototype.toString.call(e)==="[object Object]"}function GR(e){return new Promise(r=>{ri.setTimeout(r,e)})}function um(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?dS(e,r):r}function dq(e){return e}function zR(e,r,t=0){const n=[...e,r];return t&&n.length>t?n.slice(1):n}function WR(e,r,t=0){const n=[r,...e];return t&&n.length>t?n.slice(0,-1):n}var Rm=Symbol();function fS(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===Rm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function pS(e,r){return typeof e=="function"?e(...r):!!e}function KR(e,r,t){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=r()),n||(n=!0,i.aborted?t():i.addEventListener("abort",t,{once:!0})),i)}),e}var $a=(()=>{let e=()=>VR;return{isServer(){return e()},setIsServer(r){e=r}}})();function cm(){let e,r;const t=new Promise((i,a)=>{e=i,r=a});t.status="pending",t.catch(()=>{});function n(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},t.reject=i=>{n({status:"rejected",reason:i}),r(i)},t}var YR=kR;function QR(){let e=[],r=0,t=o=>{o()},n=o=>{o()},i=YR;const a=o=>{r?e.push(o):i(()=>{t(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;r++;try{c=o()}finally{r--,r||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Lt=QR(),Pi,dn,Ni,ZT,JR=(ZT=class extends Ka{constructor(){super();He(this,Pi,!0);He(this,dn);He(this,Ni);Ce(this,Ni,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){oe(this,dn)||this.setEventListener(oe(this,Ni))}onUnsubscribe(){var r;this.hasListeners()||((r=oe(this,dn))==null||r.call(this),Ce(this,dn,void 0))}setEventListener(r){var t;Ce(this,Ni,r),(t=oe(this,dn))==null||t.call(this),Ce(this,dn,r(this.setOnline.bind(this)))}setOnline(r){oe(this,Pi)!==r&&(Ce(this,Pi,r),this.listeners.forEach(n=>{n(r)}))}isOnline(){return oe(this,Pi)}},Pi=new WeakMap,dn=new WeakMap,Ni=new WeakMap,ZT),nu=new JR;function XR(e){return Math.min(1e3*2**e,3e4)}function mS(e){return(e??"online")==="online"?nu.isOnline():!0}var lm=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yS(e){let r=!1,t=0,n;const i=cm(),a=()=>i.status!=="pending",s=w=>{var R;if(!a()){const P=new lm(w);g(P),(R=e.onCancel)==null||R.call(e,P)}},o=()=>{r=!0},c=()=>{r=!1},l=()=>Sm.isFocused()&&(e.networkMode==="always"||nu.isOnline())&&e.canRun(),u=()=>mS(e.networkMode)&&e.canRun(),f=w=>{a()||(n==null||n(),i.resolve(w))},g=w=>{a()||(n==null||n(),i.reject(w))},_=()=>new Promise(w=>{var R;n=P=>{(a()||l())&&w(P)},(R=e.onPause)==null||R.call(e)}).then(()=>{var w;n=void 0,a()||(w=e.onContinue)==null||w.call(e)}),A=()=>{if(a())return;let w;const R=t===0?e.initialPromise:void 0;try{w=R??e.fn()}catch(P){w=Promise.reject(P)}Promise.resolve(w).then(f).catch(P=>{var v;if(a())return;const d=e.retry??($a.isServer()?0:3),S=e.retryDelay??XR,E=typeof S=="function"?S(t,P):S,y=d===!0||typeof d=="number"&&t<d||typeof d=="function"&&d(t,P);if(r||!y){g(P);return}t++,(v=e.onFail)==null||v.call(e,t,P),GR(E).then(()=>l()?void 0:_()).then(()=>{r?g(P):A()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:c,canStart:u,start:()=>(u()?A():_().then(A),i)}}var ii,xT,hS=(xT=class{constructor(){He(this,ii)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),am(this.gcTime)&&Ce(this,ii,ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($a.isServer()?1/0:300*1e3))}clearGcTimeout(){oe(this,ii)!==void 0&&(ri.clearTimeout(oe(this,ii)),Ce(this,ii,void 0))}},ii=new WeakMap,xT);function ZR(e){return{onFetch:(r,t)=>{var u,f,g,_,A;const n=r.options,i=(g=(f=(u=r.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:g.direction,a=((_=r.state.data)==null?void 0:_.pages)||[],s=((A=r.state.data)==null?void 0:A.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const l=async()=>{let w=!1;const R=S=>{KR(S,()=>r.signal,()=>w=!0)},P=fS(r.options,r.fetchOptions),d=async(S,E,y)=>{if(w)return Promise.reject(r.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const I=(()=>{const Y={client:r.client,queryKey:r.queryKey,pageParam:E,direction:y?"backward":"forward",meta:r.options.meta};return R(Y),Y})(),N=await P(I),{maxPages:U}=r.options,Q=y?WR:zR;return{pages:Q(S.pages,N,U),pageParams:Q(S.pageParams,E,U)}};if(i&&a.length){const S=i==="backward",E=S?gS:dm,y={pages:a,pageParams:s},v=E(n,y);o=await d(y,v,S)}else{const S=e??a.length;do{const E=c===0?s[0]??n.initialPageParam:dm(n,o);if(c>0&&E==null)break;o=await d(o,E),c++}while(c<S)}return o};r.options.persister?r.fetchFn=()=>{var w,R;return(R=(w=r.options).persister)==null?void 0:R.call(w,l,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=l}}}function dm(e,{pages:r,pageParams:t}){const n=r.length-1;return r.length>0?e.getNextPageParam(r[n],r,t[n],t):void 0}function gS(e,{pages:r,pageParams:t}){var n;return r.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,r[0],r,t[0],t):void 0}function fq(e,r){return r?dm(e,r)!=null:!1}function pq(e,r){return!r||!e.getPreviousPageParam?!1:gS(e,r)!=null}var Mi,ai,Ci,or,si,Mt,Fa,oi,ir,_S,Jr,eS,xR=(eS=class extends hS{constructor(r){super();He(this,ir);He(this,Mi);He(this,ai);He(this,Ci);He(this,or);He(this,si);He(this,Mt);He(this,Fa);He(this,oi);Ce(this,oi,!1),Ce(this,Fa,r.defaultOptions),this.setOptions(r.options),this.observers=[],Ce(this,si,r.client),Ce(this,or,oe(this,si).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Ce(this,ai,Py(this.options)),this.state=r.state??oe(this,ai),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return oe(this,Mi)}get promise(){var r;return(r=oe(this,Mt))==null?void 0:r.promise}setOptions(r){if(this.options={...oe(this,Fa),...r},r!=null&&r._type&&Ce(this,Mi,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Py(this.options);t.data!==void 0&&(this.setState(Oy(t.data,t.dataUpdatedAt)),Ce(this,ai,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&oe(this,or).remove(this)}setData(r,t){const n=um(this.state.data,r,this.options);return xe(this,ir,Jr).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(r){xe(this,ir,Jr).call(this,{type:"setState",state:r})}cancel(r){var n,i;const t=(n=oe(this,Mt))==null?void 0:n.promise;return(i=oe(this,Mt))==null||i.cancel(r),t?t.then(er).catch(er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return oe(this,ai)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>ar(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>gn(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!lS(this.state.dataUpdatedAt,r)}onFocus(){var t;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(t=oe(this,Mt))==null||t.continue()}onOnline(){var t;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(t=oe(this,Mt))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),oe(this,or).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(t=>t!==r),this.observers.length||(oe(this,Mt)&&(oe(this,oi)||xe(this,ir,_S).call(this)?oe(this,Mt).cancel({revert:!0}):oe(this,Mt).cancelRetry()),this.scheduleGc()),oe(this,or).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,ir,Jr).call(this,{type:"invalidate"})}async fetch(r,t){var l,u,f,g,_,A,w,R,P,d,S;if(this.state.fetchStatus!=="idle"&&((l=oe(this,Mt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(oe(this,Mt))return oe(this,Mt).continueRetry(),oe(this,Mt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const E=this.observers.find(y=>y.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Ce(this,oi,!0),n.signal)})},a=()=>{const E=fS(this.options,t),v=(()=>{const I={client:oe(this,si),queryKey:this.queryKey,meta:this.meta};return i(I),I})();return Ce(this,oi,!1),this.options.persister?this.options.persister(E,v,this):E(v)},o=(()=>{const E={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:oe(this,si),state:this.state,fetchFn:a};return i(E),E})(),c=oe(this,Mi)==="infinite"?ZR(this.options.pages):this.options.behavior;c==null||c.onFetch(o,this),Ce(this,Ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&xe(this,ir,Jr).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),Ce(this,Mt,yS({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:E=>{E instanceof lm&&E.revert&&this.setState({...oe(this,Ci),fetchStatus:"idle"}),n.abort()},onFail:(E,y)=>{xe(this,ir,Jr).call(this,{type:"failed",failureCount:E,error:y})},onPause:()=>{xe(this,ir,Jr).call(this,{type:"pause"})},onContinue:()=>{xe(this,ir,Jr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const E=await oe(this,Mt).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(_=(g=oe(this,or).config).onSuccess)==null||_.call(g,E,this),(w=(A=oe(this,or).config).onSettled)==null||w.call(A,E,this.state.error,this),E}catch(E){if(E instanceof lm){if(E.silent)return oe(this,Mt).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw xe(this,ir,Jr).call(this,{type:"error",error:E}),(P=(R=oe(this,or).config).onError)==null||P.call(R,E,this),(S=(d=oe(this,or).config).onSettled)==null||S.call(d,this.state.data,E,this),E}finally{this.scheduleGc()}}},Mi=new WeakMap,ai=new WeakMap,Ci=new WeakMap,or=new WeakMap,si=new WeakMap,Mt=new WeakMap,Fa=new WeakMap,oi=new WeakMap,ir=new WeakSet,_S=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Jr=function(r){const t=n=>{switch(r.type){case"failed":return{...n,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...ES(n.data,this.options),fetchMeta:r.meta??null};case"success":const i={...n,...Oy(r.data,r.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ce(this,Ci,r.manual?i:void 0),i;case"error":const a=r.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,...r.state}}};this.state=t(this.state),Lt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),oe(this,or).notify({query:this,type:"updated",action:r})})},eS);function ES(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mS(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Oy(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Py(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var xt,rt,Ha,Yt,ui,ji,Xr,fn,Ga,Di,qi,ci,li,pn,Li,ut,la,fm,pm,mm,ym,hm,gm,_m,vS,tS,ew=(tS=class extends Ka{constructor(r,t){super();He(this,ut);He(this,xt);He(this,rt);He(this,Ha);He(this,Yt);He(this,ui);He(this,ji);He(this,Xr);He(this,fn);He(this,Ga);He(this,Di);He(this,qi);He(this,ci);He(this,li);He(this,pn);He(this,Li,new Set);this.options=t,Ce(this,xt,r),Ce(this,fn,null),Ce(this,Xr,cm()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(oe(this,rt).addObserver(this),Ny(oe(this,rt),this.options)?xe(this,ut,la).call(this):this.updateResult(),xe(this,ut,ym).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Em(oe(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Em(oe(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,ut,hm).call(this),xe(this,ut,gm).call(this),oe(this,rt).removeObserver(this)}setOptions(r){const t=this.options,n=oe(this,rt);if(this.options=oe(this,xt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ar(this.options.enabled,oe(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,ut,_m).call(this),oe(this,rt).setOptions(this.options),t._defaulted&&!sm(this.options,t)&&oe(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:oe(this,rt),observer:this});const i=this.hasListeners();i&&My(oe(this,rt),n,this.options,t)&&xe(this,ut,la).call(this),this.updateResult(),i&&(oe(this,rt)!==n||ar(this.options.enabled,oe(this,rt))!==ar(t.enabled,oe(this,rt))||gn(this.options.staleTime,oe(this,rt))!==gn(t.staleTime,oe(this,rt)))&&xe(this,ut,fm).call(this);const a=xe(this,ut,pm).call(this);i&&(oe(this,rt)!==n||ar(this.options.enabled,oe(this,rt))!==ar(t.enabled,oe(this,rt))||a!==oe(this,pn))&&xe(this,ut,mm).call(this,a)}getOptimisticResult(r){const t=oe(this,xt).getQueryCache().build(oe(this,xt),r),n=this.createResult(t,r);return rw(this,n)&&(Ce(this,Yt,n),Ce(this,ji,this.options),Ce(this,ui,oe(this,rt).state)),n}getCurrentResult(){return oe(this,Yt)}trackResult(r,t){return new Proxy(r,{get:(n,i)=>(this.trackProp(i),t==null||t(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&oe(this,Xr).status==="pending"&&oe(this,Xr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(r){oe(this,Li).add(r)}getCurrentQuery(){return oe(this,rt)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=oe(this,xt).defaultQueryOptions(r),n=oe(this,xt).getQueryCache().build(oe(this,xt),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(r){return xe(this,ut,la).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),oe(this,Yt)))}createResult(r,t){var U;const n=oe(this,rt),i=this.options,a=oe(this,Yt),s=oe(this,ui),o=oe(this,ji),l=r!==n?r.state:oe(this,Ha),{state:u}=r;let f={...u},g=!1,_;if(t._optimisticResults){const Q=this.hasListeners(),Y=!Q&&Ny(r,t),z=Q&&My(r,n,t,i);(Y||z)&&(f={...f,...ES(u.data,r.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:A,errorUpdatedAt:w,status:R}=f;_=f.data;let P=!1;if(t.placeholderData!==void 0&&_===void 0&&R==="pending"){let Q;a!=null&&a.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(Q=a.data,P=!0):Q=typeof t.placeholderData=="function"?t.placeholderData((U=oe(this,qi))==null?void 0:U.state.data,oe(this,qi)):t.placeholderData,Q!==void 0&&(R="success",_=um(a==null?void 0:a.data,Q,t),g=!0)}if(t.select&&_!==void 0&&!P)if(a&&_===(s==null?void 0:s.data)&&t.select===oe(this,Ga))_=oe(this,Di);else try{Ce(this,Ga,t.select),_=t.select(_),_=um(a==null?void 0:a.data,_,t),Ce(this,Di,_),Ce(this,fn,null)}catch(Q){Ce(this,fn,Q)}oe(this,fn)&&(A=oe(this,fn),_=oe(this,Di),w=Date.now(),R="error");const d=f.fetchStatus==="fetching",S=R==="pending",E=R==="error",y=S&&d,v=_!==void 0,N={status:R,fetchStatus:f.fetchStatus,isPending:S,isSuccess:R==="success",isError:E,isInitialLoading:y,isLoading:y,data:_,dataUpdatedAt:f.dataUpdatedAt,error:A,errorUpdatedAt:w,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:d,isRefetching:d&&!S,isLoadingError:E&&!v,isPaused:f.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:E&&v,isStale:wm(r,t),refetch:this.refetch,promise:oe(this,Xr),isEnabled:ar(t.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Q=N.data!==void 0,Y=N.status==="error"&&!Q,z=ue=>{Y?ue.reject(N.error):Q&&ue.resolve(N.data)},k=()=>{const ue=Ce(this,Xr,N.promise=cm());z(ue)},V=oe(this,Xr);switch(V.status){case"pending":r.queryHash===n.queryHash&&z(V);break;case"fulfilled":(Y||N.data!==V.value)&&k();break;case"rejected":(!Y||N.error!==V.reason)&&k();break}}return N}updateResult(){const r=oe(this,Yt),t=this.createResult(oe(this,rt),this.options);if(Ce(this,ui,oe(this,rt).state),Ce(this,ji,this.options),oe(this,ui).data!==void 0&&Ce(this,qi,oe(this,rt)),sm(t,r))return;Ce(this,Yt,t);const n=()=>{if(!r)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!oe(this,Li).size)return!0;const s=new Set(a??oe(this,Li));return this.options.throwOnError&&s.add("error"),Object.keys(oe(this,Yt)).some(o=>{const c=o;return oe(this,Yt)[c]!==r[c]&&s.has(c)})};xe(this,ut,vS).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,ut,ym).call(this)}},xt=new WeakMap,rt=new WeakMap,Ha=new WeakMap,Yt=new WeakMap,ui=new WeakMap,ji=new WeakMap,Xr=new WeakMap,fn=new WeakMap,Ga=new WeakMap,Di=new WeakMap,qi=new WeakMap,ci=new WeakMap,li=new WeakMap,pn=new WeakMap,Li=new WeakMap,ut=new WeakSet,la=function(r){xe(this,ut,_m).call(this);let t=oe(this,rt).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(er)),t},fm=function(){xe(this,ut,hm).call(this);const r=gn(this.options.staleTime,oe(this,rt));if($a.isServer()||oe(this,Yt).isStale||!am(r))return;const n=lS(oe(this,Yt).dataUpdatedAt,r)+1;Ce(this,ci,ri.setTimeout(()=>{oe(this,Yt).isStale||this.updateResult()},n))},pm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(oe(this,rt)):this.options.refetchInterval)??!1},mm=function(r){xe(this,ut,gm).call(this),Ce(this,pn,r),!($a.isServer()||ar(this.options.enabled,oe(this,rt))===!1||!am(oe(this,pn))||oe(this,pn)===0)&&Ce(this,li,ri.setInterval(()=>{(this.options.refetchIntervalInBackground||Sm.isFocused())&&xe(this,ut,la).call(this)},oe(this,pn)))},ym=function(){xe(this,ut,fm).call(this),xe(this,ut,mm).call(this,xe(this,ut,pm).call(this))},hm=function(){oe(this,ci)!==void 0&&(ri.clearTimeout(oe(this,ci)),Ce(this,ci,void 0))},gm=function(){oe(this,li)!==void 0&&(ri.clearInterval(oe(this,li)),Ce(this,li,void 0))},_m=function(){const r=oe(this,xt).getQueryCache().build(oe(this,xt),this.options);if(r===oe(this,rt))return;const t=oe(this,rt);Ce(this,rt,r),Ce(this,Ha,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},vS=function(r){Lt.batch(()=>{r.listeners&&this.listeners.forEach(t=>{t(oe(this,Yt))}),oe(this,xt).getQueryCache().notify({query:oe(this,rt),type:"observerResultsUpdated"})})},tS);function tw(e,r){return ar(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&ar(r.retryOnMount,e)===!1)}function Ny(e,r){return tw(e,r)||e.state.data!==void 0&&Em(e,r,r.refetchOnMount)}function Em(e,r,t){if(ar(r.enabled,e)!==!1&&gn(r.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&wm(e,r)}return!1}function My(e,r,t,n){return(e!==r||ar(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&wm(e,t)}function wm(e,r){return ar(r.enabled,e)!==!1&&e.isStaleByTime(gn(r.staleTime,e))}function rw(e,r){return!sm(e.getCurrentResult(),r)}var za,jr,Ht,di,Dr,un,rS,nw=(rS=class extends hS{constructor(r){super();He(this,Dr);He(this,za);He(this,jr);He(this,Ht);He(this,di);Ce(this,za,r.client),this.mutationId=r.mutationId,Ce(this,Ht,r.mutationCache),Ce(this,jr,[]),this.state=r.state||iw(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){oe(this,jr).includes(r)||(oe(this,jr).push(r),this.clearGcTimeout(),oe(this,Ht).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Ce(this,jr,oe(this,jr).filter(t=>t!==r)),this.scheduleGc(),oe(this,Ht).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){oe(this,jr).length||(this.state.status==="pending"?this.scheduleGc():oe(this,Ht).remove(this))}continue(){var r;return((r=oe(this,di))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var s,o,c,l,u,f,g,_,A,w,R,P,d,S,E,y,v,I;const t=()=>{xe(this,Dr,un).call(this,{type:"continue"})},n={client:oe(this,za),meta:this.options.meta,mutationKey:this.options.mutationKey};Ce(this,di,yS({fn:()=>this.options.mutationFn?this.options.mutationFn(r,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,U)=>{xe(this,Dr,un).call(this,{type:"failed",failureCount:N,error:U})},onPause:()=>{xe(this,Dr,un).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>oe(this,Ht).canRun(this)}));const i=this.state.status==="pending",a=!oe(this,di).canStart();try{if(i)t();else{xe(this,Dr,un).call(this,{type:"pending",variables:r,isPaused:a}),oe(this,Ht).config.onMutate&&await oe(this,Ht).config.onMutate(r,this,n);const U=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,r,n));U!==this.state.context&&xe(this,Dr,un).call(this,{type:"pending",context:U,variables:r,isPaused:a})}const N=await oe(this,di).start();return await((l=(c=oe(this,Ht).config).onSuccess)==null?void 0:l.call(c,N,r,this.state.context,this,n)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,N,r,this.state.context,n)),await((_=(g=oe(this,Ht).config).onSettled)==null?void 0:_.call(g,N,null,this.state.variables,this.state.context,this,n)),await((w=(A=this.options).onSettled)==null?void 0:w.call(A,N,null,r,this.state.context,n)),xe(this,Dr,un).call(this,{type:"success",data:N}),N}catch(N){try{await((P=(R=oe(this,Ht).config).onError)==null?void 0:P.call(R,N,r,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((S=(d=this.options).onError)==null?void 0:S.call(d,N,r,this.state.context,n))}catch(U){Promise.reject(U)}try{await((y=(E=oe(this,Ht).config).onSettled)==null?void 0:y.call(E,void 0,N,this.state.variables,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((I=(v=this.options).onSettled)==null?void 0:I.call(v,void 0,N,r,this.state.context,n))}catch(U){Promise.reject(U)}throw xe(this,Dr,un).call(this,{type:"error",error:N}),N}finally{oe(this,Ht).runNext(this)}}},za=new WeakMap,jr=new WeakMap,Ht=new WeakMap,di=new WeakMap,Dr=new WeakSet,un=function(r){const t=n=>{switch(r.type){case"failed":return{...n,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...n,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:r.error,failureCount:n.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Lt.batch(()=>{oe(this,jr).forEach(n=>{n.onMutationUpdate(r)}),oe(this,Ht).notify({mutation:this,type:"updated",action:r})})},rS);function iw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zr,Er,Wa,nS,aw=(nS=class extends Ka{constructor(r={}){super();He(this,Zr);He(this,Er);He(this,Wa);this.config=r,Ce(this,Zr,new Set),Ce(this,Er,new Map),Ce(this,Wa,0)}build(r,t,n){const i=new nw({client:r,mutationCache:this,mutationId:++Fs(this,Wa)._,options:r.defaultMutationOptions(t),state:n});return this.add(i),i}add(r){oe(this,Zr).add(r);const t=Hs(r);if(typeof t=="string"){const n=oe(this,Er).get(t);n?n.push(r):oe(this,Er).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(oe(this,Zr).delete(r)){const t=Hs(r);if(typeof t=="string"){const n=oe(this,Er).get(t);if(n)if(n.length>1){const i=n.indexOf(r);i!==-1&&n.splice(i,1)}else n[0]===r&&oe(this,Er).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){const t=Hs(r);if(typeof t=="string"){const n=oe(this,Er).get(t),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===r}else return!0}runNext(r){var n;const t=Hs(r);if(typeof t=="string"){const i=(n=oe(this,Er).get(t))==null?void 0:n.find(a=>a!==r&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Lt.batch(()=>{oe(this,Zr).forEach(r=>{this.notify({type:"removed",mutation:r})}),oe(this,Zr).clear(),oe(this,Er).clear()})}getAll(){return Array.from(oe(this,Zr))}find(r){const t={exact:!0,...r};return this.getAll().find(n=>Ry(t,n))}findAll(r={}){return this.getAll().filter(t=>Ry(r,t))}notify(r){Lt.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return Lt.batch(()=>Promise.all(r.map(t=>t.continue().catch(er))))}},Zr=new WeakMap,Er=new WeakMap,Wa=new WeakMap,nS);function Hs(e){var r;return(r=e.options.scope)==null?void 0:r.id}var qr,iS,sw=(iS=class extends Ka{constructor(r={}){super();He(this,qr);this.config=r,Ce(this,qr,new Map)}build(r,t,n){const i=t.queryKey,a=t.queryHash??Am(i,t);let s=this.get(a);return s||(s=new xR({client:r,queryKey:i,queryHash:a,options:r.defaultQueryOptions(t),state:n,defaultOptions:r.getQueryDefaults(i)}),this.add(s)),s}add(r){oe(this,qr).has(r.queryHash)||(oe(this,qr).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=oe(this,qr).get(r.queryHash);t&&(r.destroy(),t===r&&oe(this,qr).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Lt.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return oe(this,qr).get(r)}getAll(){return[...oe(this,qr).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(n=>Ay(t,n))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(n=>Ay(r,n)):t}notify(r){Lt.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},qr=new WeakMap,iS),At,mn,yn,$i,Bi,hn,Ui,ki,aS,ow=(aS=class{constructor(e={}){He(this,At);He(this,mn);He(this,yn);He(this,$i);He(this,Bi);He(this,hn);He(this,Ui);He(this,ki);Ce(this,At,e.queryCache||new sw),Ce(this,mn,e.mutationCache||new aw),Ce(this,yn,e.defaultOptions||{}),Ce(this,$i,new Map),Ce(this,Bi,new Map),Ce(this,hn,0)}mount(){Fs(this,hn)._++,oe(this,hn)===1&&(Ce(this,Ui,Sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,At).onFocus())})),Ce(this,ki,nu.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,At).onOnline())})))}unmount(){var e,r;Fs(this,hn)._--,oe(this,hn)===0&&((e=oe(this,Ui))==null||e.call(this),Ce(this,Ui,void 0),(r=oe(this,ki))==null||r.call(this),Ce(this,ki,void 0))}isFetching(e){return oe(this,At).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return oe(this,mn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=oe(this,At).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=oe(this,At).build(this,r),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(gn(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return oe(this,At).findAll(e).map(({queryKey:r,state:t})=>{const n=t.data;return[r,n]})}setQueryData(e,r,t){const n=this.defaultQueryOptions({queryKey:e}),i=oe(this,At).get(n.queryHash),a=i==null?void 0:i.state.data,s=FR(r,a);if(s!==void 0)return oe(this,At).build(this,n).setData(s,{...t,manual:!0})}setQueriesData(e,r,t){return Lt.batch(()=>oe(this,At).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=oe(this,At).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=oe(this,At);Lt.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=oe(this,At);return Lt.batch(()=>(t.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const t={revert:!0,...r},n=Lt.batch(()=>oe(this,At).findAll(e).map(i=>i.cancel(t)));return Promise.all(n).then(er).catch(er)}invalidateQueries(e,r={}){return Lt.batch(()=>(oe(this,At).findAll(e).forEach(t=>{t.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"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},n=Lt.batch(()=>oe(this,At).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,t);return t.throwOnError||(a=a.catch(er)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(er)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=oe(this,At).build(this,r);return t.isStaleByTime(gn(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(er).catch(er)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(er).catch(er)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return nu.isOnline()?oe(this,mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return oe(this,At)}getMutationCache(){return oe(this,mn)}getDefaultOptions(){return oe(this,yn)}setDefaultOptions(e){Ce(this,yn,e)}setQueryDefaults(e,r){oe(this,$i).set(qa(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...oe(this,$i).values()],t={};return r.forEach(n=>{La(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,r){oe(this,Bi).set(qa(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...oe(this,Bi).values()],t={};return r.forEach(n=>{La(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...oe(this,yn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=Am(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Rm&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...oe(this,yn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){oe(this,At).clear(),oe(this,mn).clear()}},At=new WeakMap,mn=new WeakMap,yn=new WeakMap,$i=new WeakMap,Bi=new WeakMap,hn=new WeakMap,Ui=new WeakMap,ki=new WeakMap,aS),bS=We.createContext(void 0),uw=e=>{const r=We.useContext(bS);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},cw=({client:e,children:r})=>(We.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),pe.jsx(bS.Provider,{value:e,children:r})),TS=We.createContext(!1),lw=()=>We.useContext(TS);TS.Provider;function dw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fw=We.createContext(dw()),pw=()=>We.useContext(fw),mw=(e,r,t)=>{const n=t!=null&&t.state.error&&typeof e.throwOnError=="function"?pS(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(r.isReset()||(e.retryOnMount=!1))},yw=e=>{We.useEffect(()=>{e.clearReset()},[e])},hw=({result:e,errorResetBoundary:r,throwOnError:t,query:n,suspense:i})=>e.isError&&!r.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||pS(t,[e.error,n])),gw=e=>{if(e.suspense){const t=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>t(n(...i)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},_w=(e,r)=>e.isLoading&&e.isFetching&&!r,Ew=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,Cy=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function vw(e,r,t){var _,A,w,R;const n=lw(),i=pw(),a=uw(),s=a.defaultQueryOptions(e);(A=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||A.call(_,s);const o=a.getQueryCache().get(s.queryHash),c=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":c?"optimistic":void 0,gw(s),mw(s,i,o),yw(i);const l=!a.getQueryCache().get(s.queryHash),[u]=We.useState(()=>new r(a,s)),f=u.getOptimisticResult(s),g=!n&&c;if(We.useSyncExternalStore(We.useCallback(P=>{const d=g?u.subscribe(Lt.batchCalls(P)):er;return u.updateResult(),d},[u,g]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),We.useEffect(()=>{u.setOptions(s)},[s,u]),Ew(s,f))throw Cy(s,u,i);if(hw({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw f.error;if((R=(w=a.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||R.call(w,s,f),s.experimental_prefetchInRender&&!$a.isServer()&&_w(f,n)){const P=l?Cy(s,u,i):o==null?void 0:o.promise;P==null||P.catch(er).finally(()=>{u.updateResult()})}return s.notifyOnChangeProps?f:u.trackResult(f)}function su(e,r){return vw(e,ew)}const bw="modulepreload",Tw=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28747573214.commit-462a45d/"+e},jy={},$t=function(r,t,n){let i=Promise.resolve();if(t&&t.length>0){let s=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(t.map(l=>{if(l=Tw(l),l in jy)return;jy[l]=!0;const u=l.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const g=document.createElement("link");if(g.rel=u?"stylesheet":bw,u||(g.as="script"),g.crossOrigin="",g.href=l,c&&g.setAttribute("nonce",c),document.head.appendChild(g),u)return new Promise((_,A)=>{g.addEventListener("load",_),g.addEventListener("error",()=>A(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 r().catch(a)})},Sw=We.lazy(()=>$t(()=>import("./index-Cf02sP_a.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.Navbar})));function Aw(e){return pe.jsx(We.Suspense,{fallback:pe.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:pe.jsx(Sw,{...e})})}const Rw={},Dy=e=>{let r;const t=new Set,n=(u,f)=>{const g=typeof u=="function"?u(r):u;if(!Object.is(g,r)){const _=r;r=f??(typeof g!="object"||g===null)?g:Object.assign({},r,g),t.forEach(A=>A(r,_))}},i=()=>r,c={setState:n,getState:i,getInitialState:()=>l,subscribe:u=>(t.add(u),()=>t.delete(u)),destroy:()=>{(Rw?"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."),t.clear()}},l=r=e(n,i,c);return c},ww=e=>e?Dy(e):Dy;var Cu={exports:{}},ju={},Du={exports:{}},qu={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* use-sync-external-store-shim.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var qy;function Iw(){if(qy)return qu;qy=1;var e=sS();function r(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function o(f,g){var _=g(),A=n({inst:{value:_,getSnapshot:g}}),w=A[0].inst,R=A[1];return a(function(){w.value=_,w.getSnapshot=g,c(w)&&R({inst:w})},[f,_,g]),i(function(){return c(w)&&R({inst:w}),f(function(){c(w)&&R({inst:w})})},[f]),s(_),_}function c(f){var g=f.getSnapshot;f=f.value;try{var _=g();return!t(f,_)}catch{return!0}}function l(f,g){return g()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return qu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qu}var Ly;function Ow(){return Ly||(Ly=1,Du.exports=Iw()),Du.exports}/**
|
|
11
|
-
* @license React
|
|
12
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var $y;function Pw(){if($y)return ju;$y=1;var e=sS(),r=Ow();function t(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var n=typeof Object.is=="function"?Object.is:t,i=r.useSyncExternalStore,a=e.useRef,s=e.useEffect,o=e.useMemo,c=e.useDebugValue;return ju.useSyncExternalStoreWithSelector=function(l,u,f,g,_){var A=a(null);if(A.current===null){var w={hasValue:!1,value:null};A.current=w}else w=A.current;A=o(function(){function P(v){if(!d){if(d=!0,S=v,v=g(v),_!==void 0&&w.hasValue){var I=w.value;if(_(I,v))return E=I}return E=v}if(I=E,n(S,v))return I;var N=g(v);return _!==void 0&&_(I,N)?(S=v,I):(S=v,E=N)}var d=!1,S,E,y=f===void 0?null:f;return[function(){return P(u())},y===null?void 0:function(){return P(y())}]},[u,f,g,_]);var R=i(l,A[0],A[1]);return s(function(){w.hasValue=!0,w.value=R},[R]),c(R),R},ju}var By;function Nw(){return By||(By=1,Cu.exports=Pw()),Cu.exports}var Mw=Nw();const Cw=oS(Mw),SS={},{useDebugValue:jw}=uS,{useSyncExternalStoreWithSelector:Dw}=Cw;let Uy=!1;const qw=e=>e;function Lw(e,r=qw,t){(SS?"production":void 0)!=="production"&&t&&!Uy&&(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"),Uy=!0);const n=Dw(e.subscribe,e.getState,e.getServerState||e.getInitialState,r,t);return jw(n),n}const ky=e=>{(SS?"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 r=typeof e=="function"?ww(e):e,t=(n,i)=>Lw(r,n,i);return Object.assign(t,r),t},Ya=e=>e?ky(e):ky;var ur={},_n={},En={},Lu={},cr={},Gs={exports:{}},$u={},Hr={},vn={},Bu={},Uu={},ku={},Vy;function Ba(){return Vy||(Vy=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 r{}e._CodeOrName=r,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends r{constructor(d){if(super(),!e.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=t;class n extends r{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((S,E)=>`${S}${E}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((S,E)=>(E instanceof t&&(S[E.str]=(S[E.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function i(P,...d){const S=[P[0]];let E=0;for(;E<d.length;)o(S,d[E]),S.push(P[++E]);return new n(S)}e._=i;const a=new n("+");function s(P,...d){const S=[_(P[0])];let E=0;for(;E<d.length;)S.push(a),o(S,d[E]),S.push(a,_(P[++E]));return c(S),new n(S)}e.str=s;function o(P,d){d instanceof n?P.push(...d._items):d instanceof t?P.push(d):P.push(f(d))}e.addCodeArg=o;function c(P){let d=1;for(;d<P.length-1;){if(P[d]===a){const S=l(P[d-1],P[d+1]);if(S!==void 0){P.splice(d-1,3,S);continue}P[d++]="+"}d++}}function l(P,d){if(d==='""')return P;if(P==='""')return d;if(typeof P=="string")return d instanceof t||P[P.length-1]!=='"'?void 0:typeof d!="string"?`${P.slice(0,-1)}${d}"`:d[0]==='"'?P.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(P instanceof t))return`"${P}${d.slice(1)}`}function u(P,d){return d.emptyStr()?P:P.emptyStr()?d:s`${P}${d}`}e.strConcat=u;function f(P){return typeof P=="number"||typeof P=="boolean"||P===null?P:_(Array.isArray(P)?P.join(","):P)}function g(P){return new n(_(P))}e.stringify=g;function _(P){return JSON.stringify(P).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function A(P){return typeof P=="string"&&e.IDENTIFIER.test(P)?new n(`.${P}`):i`[${P}]`}e.getProperty=A;function w(P){if(typeof P=="string"&&e.IDENTIFIER.test(P))return new n(`${P}`);throw new Error(`CodeGen: invalid export name: ${P}, use explicit $id name mapping`)}e.getEsmExportName=w;function R(P){return new n(P.toString())}e.regexpCode=R})(ku)),ku}var Vu={},Fy;function Hy(){return Fy||(Fy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const r=Ba();class t extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class i{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof r.Name?l:this.name(l)}name(l){return new r.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.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 r.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:f}){this.value=l,this.scopePath=(0,r._)`.${new r.Name(u)}[${f}]`}}e.ValueScopeName=a;const s=(0,r._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?s:r.nil}}get(){return this._scope}name(l){return new a(l,this._newName(l))}value(l,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(l),{prefix:_}=g,A=(f=u.key)!==null&&f!==void 0?f:u.ref;let w=this._values[_];if(w){const d=w.get(A);if(d)return d}else w=this._values[_]=new Map;w.set(A,g);const R=this._scope[_]||(this._scope[_]=[]),P=R.length;return R[P]=u.ref,g.setValue(u,{property:_,itemIndex:P}),g}getValue(l,u){const f=this._values[l];if(f)return f.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,r._)`${l}${f.scopePath}`})}scopeCode(l=this._values,u,f){return this._reduceValues(l,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},u,f)}_reduceValues(l,u,f={},g){let _=r.nil;for(const A in l){const w=l[A];if(!w)continue;const R=f[A]=f[A]||new Map;w.forEach(P=>{if(R.has(P))return;R.set(P,n.Started);let d=u(P);if(d){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,r._)`${_}${S} ${P} = ${d};${this.opts._n}`}else if(d=g==null?void 0:g(P))_=(0,r._)`${_}${d}${this.opts._n}`;else throw new t(P);R.set(P,n.Completed)})}return _}}e.ValueScope=o})(Vu)),Vu}var Gy;function Ke(){return Gy||(Gy=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 r=Ba(),t=Hy();var n=Ba();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=Hy();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 r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class a{optimizeNodes(){return this}optimizeNames(O,D){return this}}class s extends a{constructor(O,D,Z){super(),this.varKind=O,this.name=D,this.rhs=Z}render({es5:O,_n:D}){const Z=O?t.varKinds.var:this.varKind,Ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${Z} ${this.name}${Ee};`+D}optimizeNames(O,D){if(O[this.name.str])return this.rhs&&(this.rhs=V(this.rhs,O,D)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(O,D,Z){super(),this.lhs=O,this.rhs=D,this.sideEffects=Z}render({_n:O}){return`${this.lhs} = ${this.rhs};`+O}optimizeNames(O,D){if(!(this.lhs instanceof r.Name&&!O[this.lhs.str]&&!this.sideEffects))return this.rhs=V(this.rhs,O,D),this}get names(){const O=this.lhs instanceof r.Name?{}:{...this.lhs.names};return k(O,this.rhs)}}class c extends o{constructor(O,D,Z,Ee){super(O,Z,Ee),this.op=D}render({_n:O}){return`${this.lhs} ${this.op}= ${this.rhs};`+O}}class l extends a{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`${this.label}:`+O}}class u extends a{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`break${this.label?` ${this.label}`:""};`+O}}class f extends a{constructor(O){super(),this.error=O}render({_n:O}){return`throw ${this.error};`+O}get names(){return this.error.names}}class g extends a{constructor(O){super(),this.code=O}render({_n:O}){return`${this.code};`+O}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(O,D){return this.code=V(this.code,O,D),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class _ extends a{constructor(O=[]){super(),this.nodes=O}render(O){return this.nodes.reduce((D,Z)=>D+Z.render(O),"")}optimizeNodes(){const{nodes:O}=this;let D=O.length;for(;D--;){const Z=O[D].optimizeNodes();Array.isArray(Z)?O.splice(D,1,...Z):Z?O[D]=Z:O.splice(D,1)}return O.length>0?this:void 0}optimizeNames(O,D){const{nodes:Z}=this;let Ee=Z.length;for(;Ee--;){const _e=Z[Ee];_e.optimizeNames(O,D)||(ue(O,_e.names),Z.splice(Ee,1))}return Z.length>0?this:void 0}get names(){return this.nodes.reduce((O,D)=>z(O,D.names),{})}}class A extends _{render(O){return"{"+O._n+super.render(O)+"}"+O._n}}class w extends _{}class R extends A{}R.kind="else";class P extends A{constructor(O,D){super(D),this.condition=O}render(O){let D=`if(${this.condition})`+super.render(O);return this.else&&(D+="else "+this.else.render(O)),D}optimizeNodes(){super.optimizeNodes();const O=this.condition;if(O===!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 O===!1?D instanceof P?D:D.nodes:this.nodes.length?this:new P(ae(O),D instanceof P?[D]:D.nodes);if(!(O===!1||!this.nodes.length))return this}optimizeNames(O,D){var Z;if(this.else=(Z=this.else)===null||Z===void 0?void 0:Z.optimizeNames(O,D),!!(super.optimizeNames(O,D)||this.else))return this.condition=V(this.condition,O,D),this}get names(){const O=super.names;return k(O,this.condition),this.else&&z(O,this.else.names),O}}P.kind="if";class d extends A{}d.kind="for";class S extends d{constructor(O){super(),this.iteration=O}render(O){return`for(${this.iteration})`+super.render(O)}optimizeNames(O,D){if(super.optimizeNames(O,D))return this.iteration=V(this.iteration,O,D),this}get names(){return z(super.names,this.iteration.names)}}class E extends d{constructor(O,D,Z,Ee){super(),this.varKind=O,this.name=D,this.from=Z,this.to=Ee}render(O){const D=O.es5?t.varKinds.var:this.varKind,{name:Z,from:Ee,to:_e}=this;return`for(${D} ${Z}=${Ee}; ${Z}<${_e}; ${Z}++)`+super.render(O)}get names(){const O=k(super.names,this.from);return k(O,this.to)}}class y extends d{constructor(O,D,Z,Ee){super(),this.loop=O,this.varKind=D,this.name=Z,this.iterable=Ee}render(O){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(O)}optimizeNames(O,D){if(super.optimizeNames(O,D))return this.iterable=V(this.iterable,O,D),this}get names(){return z(super.names,this.iterable.names)}}class v extends A{constructor(O,D,Z){super(),this.name=O,this.args=D,this.async=Z}render(O){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(O)}}v.kind="func";class I extends _{render(O){return"return "+super.render(O)}}I.kind="return";class N extends A{render(O){let D="try"+super.render(O);return this.catch&&(D+=this.catch.render(O)),this.finally&&(D+=this.finally.render(O)),D}optimizeNodes(){var O,D;return super.optimizeNodes(),(O=this.catch)===null||O===void 0||O.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(O,D){var Z,Ee;return super.optimizeNames(O,D),(Z=this.catch)===null||Z===void 0||Z.optimizeNames(O,D),(Ee=this.finally)===null||Ee===void 0||Ee.optimizeNames(O,D),this}get names(){const O=super.names;return this.catch&&z(O,this.catch.names),this.finally&&z(O,this.finally.names),O}}class U extends A{constructor(O){super(),this.error=O}render(O){return`catch(${this.error})`+super.render(O)}}U.kind="catch";class Q extends A{render(O){return"finally"+super.render(O)}}Q.kind="finally";class Y{constructor(O,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
|
|
19
|
-
`:""},this._extScope=O,this._scope=new t.Scope({parent:O}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,D){const Z=this._extScope.value(O,D);return(this._values[Z.prefix]||(this._values[Z.prefix]=new Set)).add(Z),Z}getScopeValue(O,D){return this._extScope.getValue(O,D)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,D,Z,Ee){const _e=this._scope.toName(D);return Z!==void 0&&Ee&&(this._constants[_e.str]=Z),this._leafNode(new s(O,_e,Z)),_e}const(O,D,Z){return this._def(t.varKinds.const,O,D,Z)}let(O,D,Z){return this._def(t.varKinds.let,O,D,Z)}var(O,D,Z){return this._def(t.varKinds.var,O,D,Z)}assign(O,D,Z){return this._leafNode(new o(O,D,Z))}add(O,D){return this._leafNode(new c(O,e.operators.ADD,D))}code(O){return typeof O=="function"?O():O!==r.nil&&this._leafNode(new g(O)),this}object(...O){const D=["{"];for(const[Z,Ee]of O)D.length>1&&D.push(","),D.push(Z),(Z!==Ee||this.opts.es5)&&(D.push(":"),(0,r.addCodeArg)(D,Ee));return D.push("}"),new r._Code(D)}if(O,D,Z){if(this._blockNode(new P(O)),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(O){return this._elseNode(new P(O))}else(){return this._elseNode(new R)}endIf(){return this._endBlockNode(P,R)}_for(O,D){return this._blockNode(O),D&&this.code(D).endFor(),this}for(O,D){return this._for(new S(O),D)}forRange(O,D,Z,Ee,_e=this.opts.es5?t.varKinds.var:t.varKinds.let){const Se=this._scope.toName(O);return this._for(new E(_e,Se,D,Z),()=>Ee(Se))}forOf(O,D,Z,Ee=t.varKinds.const){const _e=this._scope.toName(O);if(this.opts.es5){const Se=D instanceof r.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,r._)`${Se}.length`,Ae=>{this.var(_e,(0,r._)`${Se}[${Ae}]`),Z(_e)})}return this._for(new y("of",Ee,_e,D),()=>Z(_e))}forIn(O,D,Z,Ee=this.opts.es5?t.varKinds.var:t.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,r._)`Object.keys(${D})`,Z);const _e=this._scope.toName(O);return this._for(new y("in",Ee,_e,D),()=>Z(_e))}endFor(){return this._endBlockNode(d)}label(O){return this._leafNode(new l(O))}break(O){return this._leafNode(new u(O))}return(O){const D=new I;if(this._blockNode(D),this.code(O),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(O,D,Z){if(!D&&!Z)throw new Error('CodeGen: "try" without "catch" and "finally"');const Ee=new N;if(this._blockNode(Ee),this.code(O),D){const _e=this.name("e");this._currNode=Ee.catch=new U(_e),D(_e)}return Z&&(this._currNode=Ee.finally=new Q,this.code(Z)),this._endBlockNode(U,Q)}throw(O){return this._leafNode(new f(O))}block(O,D){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(D),this}endBlock(O){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||O!==void 0&&Z!==O)throw new Error(`CodeGen: wrong number of nodes: ${Z} vs ${O} expected`);return this._nodes.length=D,this}func(O,D=r.nil,Z,Ee){return this._blockNode(new v(O,D,Z)),Ee&&this.code(Ee).endFunc(),this}endFunc(){return this._endBlockNode(v)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,D){const Z=this._currNode;if(Z instanceof O||D&&Z instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${O.kind}/${D.kind}`:O.kind}"`)}_elseNode(O){const D=this._currNode;if(!(D instanceof P))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const D=this._nodes;D[D.length-1]=O}}e.CodeGen=Y;function z(H,O){for(const D in O)H[D]=(H[D]||0)+(O[D]||0);return H}function k(H,O){return O instanceof r._CodeOrName?z(H,O.names):H}function V(H,O,D){if(H instanceof r.Name)return Z(H);if(!Ee(H))return H;return new r._Code(H._items.reduce((_e,Se)=>(Se instanceof r.Name&&(Se=Z(Se)),Se instanceof r._Code?_e.push(...Se._items):_e.push(Se),_e),[]));function Z(_e){const Se=D[_e.str];return Se===void 0||O[_e.str]!==1?_e:(delete O[_e.str],Se)}function Ee(_e){return _e instanceof r._Code&&_e._items.some(Se=>Se instanceof r.Name&&O[Se.str]===1&&D[Se.str]!==void 0)}}function ue(H,O){for(const D in O)H[D]=(H[D]||0)-(O[D]||0)}function ae(H){return typeof H=="boolean"||typeof H=="number"||H===null?!H:(0,r._)`!${L(H)}`}e.not=ae;const re=j(e.operators.AND);function J(...H){return H.reduce(re)}e.and=J;const W=j(e.operators.OR);function q(...H){return H.reduce(W)}e.or=q;function j(H){return(O,D)=>O===r.nil?D:D===r.nil?O:(0,r._)`${L(O)} ${H} ${L(D)}`}function L(H){return H instanceof r.Name?H:(0,r._)`(${H})`}})(Uu)),Uu}var Je={},zy;function st(){if(zy)return Je;zy=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.checkStrictMode=Je.getErrorPath=Je.Type=Je.useFunc=Je.setEvaluated=Je.evaluatedPropsToName=Je.mergeEvaluated=Je.eachItem=Je.unescapeJsonPointer=Je.escapeJsonPointer=Je.escapeFragment=Je.unescapeFragment=Je.schemaRefOrVal=Je.schemaHasRulesButRef=Je.schemaHasRules=Je.checkUnknownRules=Je.alwaysValidSchema=Je.toHash=void 0;const e=Ke(),r=Ba();function t(y){const v={};for(const I of y)v[I]=!0;return v}Je.toHash=t;function n(y,v){return typeof v=="boolean"?v:Object.keys(v).length===0?!0:(i(y,v),!a(v,y.self.RULES.all))}Je.alwaysValidSchema=n;function i(y,v=y.schema){const{opts:I,self:N}=y;if(!I.strictSchema||typeof v=="boolean")return;const U=N.RULES.keywords;for(const Q in v)U[Q]||E(y,`unknown keyword: "${Q}"`)}Je.checkUnknownRules=i;function a(y,v){if(typeof y=="boolean")return!y;for(const I in y)if(v[I])return!0;return!1}Je.schemaHasRules=a;function s(y,v){if(typeof y=="boolean")return!y;for(const I in y)if(I!=="$ref"&&v.all[I])return!0;return!1}Je.schemaHasRulesButRef=s;function o({topSchemaRef:y,schemaPath:v},I,N,U){if(!U){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,e._)`${I}`}return(0,e._)`${y}${v}${(0,e.getProperty)(N)}`}Je.schemaRefOrVal=o;function c(y){return f(decodeURIComponent(y))}Je.unescapeFragment=c;function l(y){return encodeURIComponent(u(y))}Je.escapeFragment=l;function u(y){return typeof y=="number"?`${y}`:y.replace(/~/g,"~0").replace(/\//g,"~1")}Je.escapeJsonPointer=u;function f(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")}Je.unescapeJsonPointer=f;function g(y,v){if(Array.isArray(y))for(const I of y)v(I);else v(y)}Je.eachItem=g;function _({mergeNames:y,mergeToName:v,mergeValues:I,resultToName:N}){return(U,Q,Y,z)=>{const k=Y===void 0?Q:Y instanceof e.Name?(Q instanceof e.Name?y(U,Q,Y):v(U,Q,Y),Y):Q instanceof e.Name?(v(U,Y,Q),Q):I(Q,Y);return z===e.Name&&!(k instanceof e.Name)?N(U,k):k}}Je.mergeEvaluated={props:_({mergeNames:(y,v,I)=>y.if((0,e._)`${I} !== true && ${v} !== undefined`,()=>{y.if((0,e._)`${v} === true`,()=>y.assign(I,!0),()=>y.assign(I,(0,e._)`${I} || {}`).code((0,e._)`Object.assign(${I}, ${v})`))}),mergeToName:(y,v,I)=>y.if((0,e._)`${I} !== true`,()=>{v===!0?y.assign(I,!0):(y.assign(I,(0,e._)`${I} || {}`),w(y,I,v))}),mergeValues:(y,v)=>y===!0?!0:{...y,...v},resultToName:A}),items:_({mergeNames:(y,v,I)=>y.if((0,e._)`${I} !== true && ${v} !== undefined`,()=>y.assign(I,(0,e._)`${v} === true ? true : ${I} > ${v} ? ${I} : ${v}`)),mergeToName:(y,v,I)=>y.if((0,e._)`${I} !== true`,()=>y.assign(I,v===!0?!0:(0,e._)`${I} > ${v} ? ${I} : ${v}`)),mergeValues:(y,v)=>y===!0?!0:Math.max(y,v),resultToName:(y,v)=>y.var("items",v)})};function A(y,v){if(v===!0)return y.var("props",!0);const I=y.var("props",(0,e._)`{}`);return v!==void 0&&w(y,I,v),I}Je.evaluatedPropsToName=A;function w(y,v,I){Object.keys(I).forEach(N=>y.assign((0,e._)`${v}${(0,e.getProperty)(N)}`,!0))}Je.setEvaluated=w;const R={};function P(y,v){return y.scopeValue("func",{ref:v,code:R[v.code]||(R[v.code]=new r._Code(v.code))})}Je.useFunc=P;var d;(function(y){y[y.Num=0]="Num",y[y.Str=1]="Str"})(d||(Je.Type=d={}));function S(y,v,I){if(y instanceof e.Name){const N=v===d.Num;return I?N?(0,e._)`"[" + ${y} + "]"`:(0,e._)`"['" + ${y} + "']"`:N?(0,e._)`"/" + ${y}`:(0,e._)`"/" + ${y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,e.getProperty)(y).toString():"/"+u(y)}Je.getErrorPath=S;function E(y,v,I=y.opts.strictSchema){if(I){if(v=`strict mode: ${v}`,I===!0)throw new Error(v);y.self.logger.warn(v)}}return Je.checkStrictMode=E,Je}var zs={},Wy;function xr(){if(Wy)return zs;Wy=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=Ke(),r={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 zs.default=r,zs}var Ky;function Qa(){return Ky||(Ky=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 r=Ke(),t=st(),n=xr();e.keywordError={message:({keyword:R})=>(0,r.str)`must pass "${R}" keyword validation`},e.keyword$DataError={message:({keyword:R,schemaType:P})=>P?(0,r.str)`"${R}" keyword must be ${P} ($data)`:(0,r.str)`"${R}" keyword is invalid ($data)`};function i(R,P=e.keywordError,d,S){const{it:E}=R,{gen:y,compositeRule:v,allErrors:I}=E,N=f(R,P,d);S??(v||I)?c(y,N):l(E,(0,r._)`[${N}]`)}e.reportError=i;function a(R,P=e.keywordError,d){const{it:S}=R,{gen:E,compositeRule:y,allErrors:v}=S,I=f(R,P,d);c(E,I),y||v||l(S,n.default.vErrors)}e.reportExtraError=a;function s(R,P){R.assign(n.default.errors,P),R.if((0,r._)`${n.default.vErrors} !== null`,()=>R.if(P,()=>R.assign((0,r._)`${n.default.vErrors}.length`,P),()=>R.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:R,keyword:P,schemaValue:d,data:S,errsCount:E,it:y}){if(E===void 0)throw new Error("ajv implementation error");const v=R.name("err");R.forRange("i",E,n.default.errors,I=>{R.const(v,(0,r._)`${n.default.vErrors}[${I}]`),R.if((0,r._)`${v}.instancePath === undefined`,()=>R.assign((0,r._)`${v}.instancePath`,(0,r.strConcat)(n.default.instancePath,y.errorPath))),R.assign((0,r._)`${v}.schemaPath`,(0,r.str)`${y.errSchemaPath}/${P}`),y.opts.verbose&&(R.assign((0,r._)`${v}.schema`,d),R.assign((0,r._)`${v}.data`,S))})}e.extendErrors=o;function c(R,P){const d=R.const("err",P);R.if((0,r._)`${n.default.vErrors} === null`,()=>R.assign(n.default.vErrors,(0,r._)`[${d}]`),(0,r._)`${n.default.vErrors}.push(${d})`),R.code((0,r._)`${n.default.errors}++`)}function l(R,P){const{gen:d,validateName:S,schemaEnv:E}=R;E.$async?d.throw((0,r._)`new ${R.ValidationError}(${P})`):(d.assign((0,r._)`${S}.errors`,P),d.return(!1))}const u={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function f(R,P,d){const{createErrors:S}=R.it;return S===!1?(0,r._)`{}`:g(R,P,d)}function g(R,P,d={}){const{gen:S,it:E}=R,y=[_(E,d),A(R,d)];return w(R,P,y),S.object(...y)}function _({errorPath:R},{instancePath:P}){const d=P?(0,r.str)`${R}${(0,t.getErrorPath)(P,t.Type.Str)}`:R;return[n.default.instancePath,(0,r.strConcat)(n.default.instancePath,d)]}function A({keyword:R,it:{errSchemaPath:P}},{schemaPath:d,parentSchema:S}){let E=S?P:(0,r.str)`${P}/${R}`;return d&&(E=(0,r.str)`${E}${(0,t.getErrorPath)(d,t.Type.Str)}`),[u.schemaPath,E]}function w(R,{params:P,message:d},S){const{keyword:E,data:y,schemaValue:v,it:I}=R,{opts:N,propertyName:U,topSchemaRef:Q,schemaPath:Y}=I;S.push([u.keyword,E],[u.params,typeof P=="function"?P(R):P||(0,r._)`{}`]),N.messages&&S.push([u.message,typeof d=="function"?d(R):d]),N.verbose&&S.push([u.schema,v],[u.parentSchema,(0,r._)`${Q}${Y}`],[n.default.data,y]),U&&S.push([u.propertyName,U])}})(Bu)),Bu}var Yy;function $w(){if(Yy)return vn;Yy=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.boolOrEmptySchema=vn.topBoolOrEmptySchema=void 0;const e=Qa(),r=Ke(),t=xr(),n={message:"boolean schema is false"};function i(o){const{gen:c,schema:l,validateName:u}=o;l===!1?s(o,!1):typeof l=="object"&&l.$async===!0?c.return(t.default.data):(c.assign((0,r._)`${u}.errors`,null),c.return(!0))}vn.topBoolOrEmptySchema=i;function a(o,c){const{gen:l,schema:u}=o;u===!1?(l.var(c,!1),s(o)):l.var(c,!0)}vn.boolOrEmptySchema=a;function s(o,c){const{gen:l,data:u}=o,f={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(f,n,void 0,c)}return vn}var qt={},bn={},Qy;function AS(){if(Qy)return bn;Qy=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.getRules=bn.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function t(i){return typeof i=="string"&&r.has(i)}bn.isJSONType=t;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 bn.getRules=n,bn}var Gr={},Jy;function RS(){if(Jy)return Gr;Jy=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.shouldUseRule=Gr.shouldUseGroup=Gr.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const s=i.RULES.types[a];return s&&s!==!0&&r(n,s)}Gr.schemaHasRulesForType=e;function r(n,i){return i.rules.some(a=>t(n,a))}Gr.shouldUseGroup=r;function t(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 Gr.shouldUseRule=t,Gr}var Xy;function iu(){if(Xy)return qt;Xy=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.reportTypeError=qt.checkDataTypes=qt.checkDataType=qt.coerceAndCheckDataType=qt.getJSONTypes=qt.getSchemaTypes=qt.DataType=void 0;const e=AS(),r=RS(),t=Qa(),n=Ke(),i=st();var a;(function(d){d[d.Correct=0]="Correct",d[d.Wrong=1]="Wrong"})(a||(qt.DataType=a={}));function s(d){const S=o(d.type);if(S.includes("null")){if(d.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!S.length&&d.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');d.nullable===!0&&S.push("null")}return S}qt.getSchemaTypes=s;function o(d){const S=Array.isArray(d)?d:d?[d]:[];if(S.every(e.isJSONType))return S;throw new Error("type must be JSONType or JSONType[]: "+S.join(","))}qt.getJSONTypes=o;function c(d,S){const{gen:E,data:y,opts:v}=d,I=u(S,v.coerceTypes),N=S.length>0&&!(I.length===0&&S.length===1&&(0,r.schemaHasRulesForType)(d,S[0]));if(N){const U=A(S,y,v.strictNumbers,a.Wrong);E.if(U,()=>{I.length?f(d,S,I):R(d)})}return N}qt.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(d,S){return S?d.filter(E=>l.has(E)||S==="array"&&E==="array"):[]}function f(d,S,E){const{gen:y,data:v,opts:I}=d,N=y.let("dataType",(0,n._)`typeof ${v}`),U=y.let("coerced",(0,n._)`undefined`);I.coerceTypes==="array"&&y.if((0,n._)`${N} == 'object' && Array.isArray(${v}) && ${v}.length == 1`,()=>y.assign(v,(0,n._)`${v}[0]`).assign(N,(0,n._)`typeof ${v}`).if(A(S,v,I.strictNumbers),()=>y.assign(U,v))),y.if((0,n._)`${U} !== undefined`);for(const Y of E)(l.has(Y)||Y==="array"&&I.coerceTypes==="array")&&Q(Y);y.else(),R(d),y.endIf(),y.if((0,n._)`${U} !== undefined`,()=>{y.assign(v,U),g(d,U)});function Q(Y){switch(Y){case"string":y.elseIf((0,n._)`${N} == "number" || ${N} == "boolean"`).assign(U,(0,n._)`"" + ${v}`).elseIf((0,n._)`${v} === null`).assign(U,(0,n._)`""`);return;case"number":y.elseIf((0,n._)`${N} == "boolean" || ${v} === null
|
|
20
|
-
|| (${N} == "string" && ${v} && ${v} == +${v})`).assign(U,(0,n._)`+${v}`);return;case"integer":y.elseIf((0,n._)`${N} === "boolean" || ${v} === null
|
|
21
|
-
|| (${N} === "string" && ${v} && ${v} == +${v} && !(${v} % 1))`).assign(U,(0,n._)`+${v}`);return;case"boolean":y.elseIf((0,n._)`${v} === "false" || ${v} === 0 || ${v} === null`).assign(U,!1).elseIf((0,n._)`${v} === "true" || ${v} === 1`).assign(U,!0);return;case"null":y.elseIf((0,n._)`${v} === "" || ${v} === 0 || ${v} === false`),y.assign(U,null);return;case"array":y.elseIf((0,n._)`${N} === "string" || ${N} === "number"
|
|
22
|
-
|| ${N} === "boolean" || ${v} === null`).assign(U,(0,n._)`[${v}]`)}}}function g({gen:d,parentData:S,parentDataProperty:E},y){d.if((0,n._)`${S} !== undefined`,()=>d.assign((0,n._)`${S}[${E}]`,y))}function _(d,S,E,y=a.Correct){const v=y===a.Correct?n.operators.EQ:n.operators.NEQ;let I;switch(d){case"null":return(0,n._)`${S} ${v} null`;case"array":I=(0,n._)`Array.isArray(${S})`;break;case"object":I=(0,n._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":I=N((0,n._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":I=N();break;default:return(0,n._)`typeof ${S} ${v} ${d}`}return y===a.Correct?I:(0,n.not)(I);function N(U=n.nil){return(0,n.and)((0,n._)`typeof ${S} == "number"`,U,E?(0,n._)`isFinite(${S})`:n.nil)}}qt.checkDataType=_;function A(d,S,E,y){if(d.length===1)return _(d[0],S,E,y);let v;const I=(0,i.toHash)(d);if(I.array&&I.object){const N=(0,n._)`typeof ${S} != "object"`;v=I.null?N:(0,n._)`!${S} || ${N}`,delete I.null,delete I.array,delete I.object}else v=n.nil;I.number&&delete I.integer;for(const N in I)v=(0,n.and)(v,_(N,S,E,y));return v}qt.checkDataTypes=A;const w={message:({schema:d})=>`must be ${d}`,params:({schema:d,schemaValue:S})=>typeof d=="string"?(0,n._)`{type: ${d}}`:(0,n._)`{type: ${S}}`};function R(d){const S=P(d);(0,t.reportError)(S,w)}qt.reportTypeError=R;function P(d){const{gen:S,data:E,schema:y}=d,v=(0,i.schemaRefOrVal)(d,y,"type");return{gen:S,keyword:"type",data:E,schema:y.type,schemaCode:v,schemaValue:v,parentSchema:y,params:{},it:d}}return qt}var Ki={},Zy;function Bw(){if(Zy)return Ki;Zy=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.assignDefaults=void 0;const e=Ke(),r=st();function t(i,a){const{properties:s,items:o}=i.schema;if(a==="object"&&s)for(const c in s)n(i,c,s[c].default);else a==="array"&&Array.isArray(o)&&o.forEach((c,l)=>n(i,l,c.default))}Ki.assignDefaults=t;function n(i,a,s){const{gen:o,compositeRule:c,data:l,opts:u}=i;if(s===void 0)return;const f=(0,e._)`${l}${(0,e.getProperty)(a)}`;if(c){(0,r.checkStrictMode)(i,`default is ignored for: ${f}`);return}let g=(0,e._)`${f} === undefined`;u.useDefaults==="empty"&&(g=(0,e._)`${g} || ${f} === null || ${f} === ""`),o.if(g,(0,e._)`${f} = ${(0,e.stringify)(s)}`)}return Ki}var lr={},ct={},xy;function vr(){if(xy)return ct;xy=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.validateUnion=ct.validateArray=ct.usePattern=ct.callValidateCode=ct.schemaProperties=ct.allSchemaProperties=ct.noPropertyInData=ct.propertyInData=ct.isOwnProperty=ct.hasPropFunc=ct.reportMissingProp=ct.checkMissingProp=ct.checkReportMissingProp=void 0;const e=Ke(),r=st(),t=xr(),n=st();function i(d,S){const{gen:E,data:y,it:v}=d;E.if(u(E,y,S,v.opts.ownProperties),()=>{d.setParams({missingProperty:(0,e._)`${S}`},!0),d.error()})}ct.checkReportMissingProp=i;function a({gen:d,data:S,it:{opts:E}},y,v){return(0,e.or)(...y.map(I=>(0,e.and)(u(d,S,I,E.ownProperties),(0,e._)`${v} = ${I}`)))}ct.checkMissingProp=a;function s(d,S){d.setParams({missingProperty:S},!0),d.error()}ct.reportMissingProp=s;function o(d){return d.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ct.hasPropFunc=o;function c(d,S,E){return(0,e._)`${o(d)}.call(${S}, ${E})`}ct.isOwnProperty=c;function l(d,S,E,y){const v=(0,e._)`${S}${(0,e.getProperty)(E)} !== undefined`;return y?(0,e._)`${v} && ${c(d,S,E)}`:v}ct.propertyInData=l;function u(d,S,E,y){const v=(0,e._)`${S}${(0,e.getProperty)(E)} === undefined`;return y?(0,e.or)(v,(0,e.not)(c(d,S,E))):v}ct.noPropertyInData=u;function f(d){return d?Object.keys(d).filter(S=>S!=="__proto__"):[]}ct.allSchemaProperties=f;function g(d,S){return f(S).filter(E=>!(0,r.alwaysValidSchema)(d,S[E]))}ct.schemaProperties=g;function _({schemaCode:d,data:S,it:{gen:E,topSchemaRef:y,schemaPath:v,errorPath:I},it:N},U,Q,Y){const z=Y?(0,e._)`${d}, ${S}, ${y}${v}`:S,k=[[t.default.instancePath,(0,e.strConcat)(t.default.instancePath,I)],[t.default.parentData,N.parentData],[t.default.parentDataProperty,N.parentDataProperty],[t.default.rootData,t.default.rootData]];N.opts.dynamicRef&&k.push([t.default.dynamicAnchors,t.default.dynamicAnchors]);const V=(0,e._)`${z}, ${E.object(...k)}`;return Q!==e.nil?(0,e._)`${U}.call(${Q}, ${V})`:(0,e._)`${U}(${V})`}ct.callValidateCode=_;const A=(0,e._)`new RegExp`;function w({gen:d,it:{opts:S}},E){const y=S.unicodeRegExp?"u":"",{regExp:v}=S.code,I=v(E,y);return d.scopeValue("pattern",{key:I.toString(),ref:I,code:(0,e._)`${v.code==="new RegExp"?A:(0,n.useFunc)(d,v)}(${E}, ${y})`})}ct.usePattern=w;function R(d){const{gen:S,data:E,keyword:y,it:v}=d,I=S.name("valid");if(v.allErrors){const U=S.let("valid",!0);return N(()=>S.assign(U,!1)),U}return S.var(I,!0),N(()=>S.break()),I;function N(U){const Q=S.const("len",(0,e._)`${E}.length`);S.forRange("i",0,Q,Y=>{d.subschema({keyword:y,dataProp:Y,dataPropType:r.Type.Num},I),S.if((0,e.not)(I),U)})}}ct.validateArray=R;function P(d){const{gen:S,schema:E,keyword:y,it:v}=d;if(!Array.isArray(E))throw new Error("ajv implementation error");if(E.some(Q=>(0,r.alwaysValidSchema)(v,Q))&&!v.opts.unevaluated)return;const N=S.let("valid",!1),U=S.name("_valid");S.block(()=>E.forEach((Q,Y)=>{const z=d.subschema({keyword:y,schemaProp:Y,compositeRule:!0},U);S.assign(N,(0,e._)`${N} || ${U}`),d.mergeValidEvaluated(z,U)||S.if((0,e.not)(N))})),d.result(N,()=>d.reset(),()=>d.error(!0))}return ct.validateUnion=P,ct}var eh;function Uw(){if(eh)return lr;eh=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.validateKeywordUsage=lr.validSchemaType=lr.funcKeywordCode=lr.macroKeywordCode=void 0;const e=Ke(),r=xr(),t=vr(),n=Qa();function i(g,_){const{gen:A,keyword:w,schema:R,parentSchema:P,it:d}=g,S=_.macro.call(d.self,R,P,d),E=l(A,w,S);d.opts.validateSchema!==!1&&d.self.validateSchema(S,!0);const y=A.name("valid");g.subschema({schema:S,schemaPath:e.nil,errSchemaPath:`${d.errSchemaPath}/${w}`,topSchemaRef:E,compositeRule:!0},y),g.pass(y,()=>g.error(!0))}lr.macroKeywordCode=i;function a(g,_){var A;const{gen:w,keyword:R,schema:P,parentSchema:d,$data:S,it:E}=g;c(E,_);const y=!S&&_.compile?_.compile.call(E.self,P,d,E):_.validate,v=l(w,R,y),I=w.let("valid");g.block$data(I,N),g.ok((A=_.valid)!==null&&A!==void 0?A:I);function N(){if(_.errors===!1)Y(),_.modifying&&s(g),z(()=>g.error());else{const k=_.async?U():Q();_.modifying&&s(g),z(()=>o(g,k))}}function U(){const k=w.let("ruleErrs",null);return w.try(()=>Y((0,e._)`await `),V=>w.assign(I,!1).if((0,e._)`${V} instanceof ${E.ValidationError}`,()=>w.assign(k,(0,e._)`${V}.errors`),()=>w.throw(V))),k}function Q(){const k=(0,e._)`${v}.errors`;return w.assign(k,null),Y(e.nil),k}function Y(k=_.async?(0,e._)`await `:e.nil){const V=E.opts.passContext?r.default.this:r.default.self,ue=!("compile"in _&&!S||_.schema===!1);w.assign(I,(0,e._)`${k}${(0,t.callValidateCode)(g,v,V,ue)}`,_.modifying)}function z(k){var V;w.if((0,e.not)((V=_.valid)!==null&&V!==void 0?V:I),k)}}lr.funcKeywordCode=a;function s(g){const{gen:_,data:A,it:w}=g;_.if(w.parentData,()=>_.assign(A,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function o(g,_){const{gen:A}=g;A.if((0,e._)`Array.isArray(${_})`,()=>{A.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${_} : ${r.default.vErrors}.concat(${_})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,n.extendErrors)(g)},()=>g.error())}function c({schemaEnv:g},_){if(_.async&&!g.$async)throw new Error("async keyword in sync schema")}function l(g,_,A){if(A===void 0)throw new Error(`keyword "${_}" failed to compile`);return g.scopeValue("keyword",typeof A=="function"?{ref:A}:{ref:A,code:(0,e.stringify)(A)})}function u(g,_,A=!1){return!_.length||_.some(w=>w==="array"?Array.isArray(g):w==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==w||A&&typeof g>"u")}lr.validSchemaType=u;function f({schema:g,opts:_,self:A,errSchemaPath:w},R,P){if(Array.isArray(R.keyword)?!R.keyword.includes(P):R.keyword!==P)throw new Error("ajv implementation error");const d=R.dependencies;if(d!=null&&d.some(S=>!Object.prototype.hasOwnProperty.call(g,S)))throw new Error(`parent schema must have dependencies of ${P}: ${d.join(",")}`);if(R.validateSchema&&!R.validateSchema(g[P])){const E=`keyword "${P}" value is invalid at path "${w}": `+A.errorsText(R.validateSchema.errors);if(_.validateSchema==="log")A.logger.error(E);else throw new Error(E)}}return lr.validateKeywordUsage=f,lr}var zr={},th;function kw(){if(th)return zr;th=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.extendSubschemaMode=zr.extendSubschemaData=zr.getSubschema=void 0;const e=Ke(),r=st();function t(a,{keyword:s,schemaProp:o,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:f}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const g=a.schema[s];return o===void 0?{schema:g,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:g[o],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,r.escapeFragment)(o)}`}}if(c!==void 0){if(l===void 0||u===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:f,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}zr.getSubschema=t;function n(a,s,{dataProp:o,dataPropType:c,data:l,dataTypes:u,propertyName:f}){if(l!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=s;if(o!==void 0){const{errorPath:A,dataPathArr:w,opts:R}=s,P=g.let("data",(0,e._)`${s.data}${(0,e.getProperty)(o)}`,!0);_(P),a.errorPath=(0,e.str)`${A}${(0,r.getErrorPath)(o,c,R.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${o}`,a.dataPathArr=[...w,a.parentDataProperty]}if(l!==void 0){const A=l instanceof e.Name?l:g.let("data",l,!0);_(A),f!==void 0&&(a.propertyName=f)}u&&(a.dataTypes=u);function _(A){a.data=A,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,A]}}zr.extendSubschemaData=n;function i(a,{jtdDiscriminator:s,jtdMetadata:o,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(a.compositeRule=c),l!==void 0&&(a.createErrors=l),u!==void 0&&(a.allErrors=u),a.jtdDiscriminator=s,a.jtdMetadata=o}return zr.extendSubschemaMode=i,zr}var Kt={},Fu,rh;function Im(){return rh||(rh=1,Fu=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,i,a;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!e(r[i],t[i]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(a=Object.keys(r),n=a.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(r[s],t[s]))return!1}return!0}return r!==r&&t!==t}),Fu}var Hu={exports:{}},nh;function Vw(){if(nh)return Hu.exports;nh=1;var e=Hu.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(){};r(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 r(n,i,a,s,o,c,l,u,f,g){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,o,c,l,u,f,g);for(var _ in s){var A=s[_];if(Array.isArray(A)){if(_ in e.arrayKeywords)for(var w=0;w<A.length;w++)r(n,i,a,A[w],o+"/"+_+"/"+w,c,o,_,s,w)}else if(_ in e.propsKeywords){if(A&&typeof A=="object")for(var R in A)r(n,i,a,A[R],o+"/"+_+"/"+t(R),c,o,_,s,R)}else(_ in e.keywords||n.allKeys&&!(_ in e.skipKeywords))&&r(n,i,a,A,o+"/"+_,c,o,_,s)}a(s,o,c,l,u,f,g)}}function t(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Hu.exports}var ih;function ou(){if(ih)return Kt;ih=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getSchemaRefs=Kt.resolveUrl=Kt.normalizeId=Kt._getFullPath=Kt.getFullPath=Kt.inlineRef=void 0;const e=st(),r=Im(),t=Vw(),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}Kt.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 P=w[R];if(Array.isArray(P)&&P.some(s)||typeof P=="object"&&s(P))return!0}return!1}function o(w){let R=0;for(const P in w){if(P==="$ref")return 1/0;if(R++,!n.has(P)&&(typeof w[P]=="object"&&(0,e.eachItem)(w[P],d=>R+=o(d)),R===1/0))return 1/0}return R}function c(w,R="",P){P!==!1&&(R=f(R));const d=w.parse(R);return l(w,d)}Kt.getFullPath=c;function l(w,R){return w.serialize(R).split("#")[0]+"#"}Kt._getFullPath=l;const u=/#\/?$/;function f(w){return w?w.replace(u,""):""}Kt.normalizeId=f;function g(w,R,P){return P=f(P),w.resolve(R,P)}Kt.resolveUrl=g;const _=/^[a-z_][-a-z0-9._]*$/i;function A(w,R){if(typeof w=="boolean")return{};const{schemaId:P,uriResolver:d}=this.opts,S=f(w[P]||R),E={"":S},y=c(d,S,!1),v={},I=new Set;return t(w,{allKeys:!0},(Q,Y,z,k)=>{if(k===void 0)return;const V=y+Y;let ue=E[k];typeof Q[P]=="string"&&(ue=ae.call(this,Q[P])),re.call(this,Q.$anchor),re.call(this,Q.$dynamicAnchor),E[Y]=ue;function ae(J){const W=this.opts.uriResolver.resolve;if(J=f(ue?W(ue,J):J),I.has(J))throw U(J);I.add(J);let q=this.refs[J];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?N(Q,q.schema,J):J!==f(V)&&(J[0]==="#"?(N(Q,v[J],J),v[J]=Q):this.refs[J]=V),J}function re(J){if(typeof J=="string"){if(!_.test(J))throw new Error(`invalid anchor "${J}"`);ae.call(this,`#${J}`)}}}),v;function N(Q,Y,z){if(Y!==void 0&&!r(Q,Y))throw U(z)}function U(Q){return new Error(`reference "${Q}" resolves to more than one schema`)}}return Kt.getSchemaRefs=A,Kt}var ah;function Ja(){if(ah)return Hr;ah=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.getData=Hr.KeywordCxt=Hr.validateFunctionCode=void 0;const e=$w(),r=iu(),t=RS(),n=iu(),i=Bw(),a=Uw(),s=kw(),o=Ke(),c=xr(),l=ou(),u=st(),f=Qa();function g(ne){if(y(ne)&&(I(ne),E(ne))){R(ne);return}_(ne,()=>(0,e.topBoolOrEmptySchema)(ne))}Hr.validateFunctionCode=g;function _({gen:ne,validateName:ce,schema:de,schemaEnv:me,opts:Te},Re){Te.code.es5?ne.func(ce,(0,o._)`${c.default.data}, ${c.default.valCxt}`,me.$async,()=>{ne.code((0,o._)`"use strict"; ${d(de,Te)}`),w(ne,Te),ne.code(Re)}):ne.func(ce,(0,o._)`${c.default.data}, ${A(Te)}`,me.$async,()=>ne.code(d(de,Te)).code(Re))}function A(ne){return(0,o._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${ne.dynamicRef?(0,o._)`, ${c.default.dynamicAnchors}={}`:o.nil}}={}`}function w(ne,ce){ne.if(c.default.valCxt,()=>{ne.var(c.default.instancePath,(0,o._)`${c.default.valCxt}.${c.default.instancePath}`),ne.var(c.default.parentData,(0,o._)`${c.default.valCxt}.${c.default.parentData}`),ne.var(c.default.parentDataProperty,(0,o._)`${c.default.valCxt}.${c.default.parentDataProperty}`),ne.var(c.default.rootData,(0,o._)`${c.default.valCxt}.${c.default.rootData}`),ce.dynamicRef&&ne.var(c.default.dynamicAnchors,(0,o._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{ne.var(c.default.instancePath,(0,o._)`""`),ne.var(c.default.parentData,(0,o._)`undefined`),ne.var(c.default.parentDataProperty,(0,o._)`undefined`),ne.var(c.default.rootData,c.default.data),ce.dynamicRef&&ne.var(c.default.dynamicAnchors,(0,o._)`{}`)})}function R(ne){const{schema:ce,opts:de,gen:me}=ne;_(ne,()=>{de.$comment&&ce.$comment&&k(ne),Q(ne),me.let(c.default.vErrors,null),me.let(c.default.errors,0),de.unevaluated&&P(ne),N(ne),V(ne)})}function P(ne){const{gen:ce,validateName:de}=ne;ne.evaluated=ce.const("evaluated",(0,o._)`${de}.evaluated`),ce.if((0,o._)`${ne.evaluated}.dynamicProps`,()=>ce.assign((0,o._)`${ne.evaluated}.props`,(0,o._)`undefined`)),ce.if((0,o._)`${ne.evaluated}.dynamicItems`,()=>ce.assign((0,o._)`${ne.evaluated}.items`,(0,o._)`undefined`))}function d(ne,ce){const de=typeof ne=="object"&&ne[ce.schemaId];return de&&(ce.code.source||ce.code.process)?(0,o._)`/*# sourceURL=${de} */`:o.nil}function S(ne,ce){if(y(ne)&&(I(ne),E(ne))){v(ne,ce);return}(0,e.boolOrEmptySchema)(ne,ce)}function E({schema:ne,self:ce}){if(typeof ne=="boolean")return!ne;for(const de in ne)if(ce.RULES.all[de])return!0;return!1}function y(ne){return typeof ne.schema!="boolean"}function v(ne,ce){const{schema:de,gen:me,opts:Te}=ne;Te.$comment&&de.$comment&&k(ne),Y(ne),z(ne);const Re=me.const("_errs",c.default.errors);N(ne,Re),me.var(ce,(0,o._)`${Re} === ${c.default.errors}`)}function I(ne){(0,u.checkUnknownRules)(ne),U(ne)}function N(ne,ce){if(ne.opts.jtd)return ae(ne,[],!1,ce);const de=(0,r.getSchemaTypes)(ne.schema),me=(0,r.coerceAndCheckDataType)(ne,de);ae(ne,de,!me,ce)}function U(ne){const{schema:ce,errSchemaPath:de,opts:me,self:Te}=ne;ce.$ref&&me.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(ce,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${de}"`)}function Q(ne){const{schema:ce,opts:de}=ne;ce.default!==void 0&&de.useDefaults&&de.strictSchema&&(0,u.checkStrictMode)(ne,"default is ignored in the schema root")}function Y(ne){const ce=ne.schema[ne.opts.schemaId];ce&&(ne.baseId=(0,l.resolveUrl)(ne.opts.uriResolver,ne.baseId,ce))}function z(ne){if(ne.schema.$async&&!ne.schemaEnv.$async)throw new Error("async schema in sync schema")}function k({gen:ne,schemaEnv:ce,schema:de,errSchemaPath:me,opts:Te}){const Re=de.$comment;if(Te.$comment===!0)ne.code((0,o._)`${c.default.self}.logger.log(${Re})`);else if(typeof Te.$comment=="function"){const Be=(0,o.str)`${me}/$comment`,ze=ne.scopeValue("root",{ref:ce.root});ne.code((0,o._)`${c.default.self}.opts.$comment(${Re}, ${Be}, ${ze}.schema)`)}}function V(ne){const{gen:ce,schemaEnv:de,validateName:me,ValidationError:Te,opts:Re}=ne;de.$async?ce.if((0,o._)`${c.default.errors} === 0`,()=>ce.return(c.default.data),()=>ce.throw((0,o._)`new ${Te}(${c.default.vErrors})`)):(ce.assign((0,o._)`${me}.errors`,c.default.vErrors),Re.unevaluated&&ue(ne),ce.return((0,o._)`${c.default.errors} === 0`))}function ue({gen:ne,evaluated:ce,props:de,items:me}){de instanceof o.Name&&ne.assign((0,o._)`${ce}.props`,de),me instanceof o.Name&&ne.assign((0,o._)`${ce}.items`,me)}function ae(ne,ce,de,me){const{gen:Te,schema:Re,data:Be,allErrors:ze,opts:Ze,self:Ye}=ne,{RULES:nt}=Ye;if(Re.$ref&&(Ze.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(Re,nt))){Te.block(()=>Ee(ne,"$ref",nt.all.$ref.definition));return}Ze.jtd||J(ne,ce),Te.block(()=>{for(const lt of nt.rules)Tt(lt);Tt(nt.post)});function Tt(lt){(0,t.shouldUseGroup)(Re,lt)&&(lt.type?(Te.if((0,n.checkDataType)(lt.type,Be,Ze.strictNumbers)),re(ne,lt),ce.length===1&&ce[0]===lt.type&&de&&(Te.else(),(0,n.reportTypeError)(ne)),Te.endIf()):re(ne,lt),ze||Te.if((0,o._)`${c.default.errors} === ${me||0}`))}}function re(ne,ce){const{gen:de,schema:me,opts:{useDefaults:Te}}=ne;Te&&(0,i.assignDefaults)(ne,ce.type),de.block(()=>{for(const Re of ce.rules)(0,t.shouldUseRule)(me,Re)&&Ee(ne,Re.keyword,Re.definition,ce.type)})}function J(ne,ce){ne.schemaEnv.meta||!ne.opts.strictTypes||(W(ne,ce),ne.opts.allowUnionTypes||q(ne,ce),j(ne,ne.dataTypes))}function W(ne,ce){if(ce.length){if(!ne.dataTypes.length){ne.dataTypes=ce;return}ce.forEach(de=>{H(ne.dataTypes,de)||D(ne,`type "${de}" not allowed by context "${ne.dataTypes.join(",")}"`)}),O(ne,ce)}}function q(ne,ce){ce.length>1&&!(ce.length===2&&ce.includes("null"))&&D(ne,"use allowUnionTypes to allow union type keyword")}function j(ne,ce){const de=ne.self.RULES.all;for(const me in de){const Te=de[me];if(typeof Te=="object"&&(0,t.shouldUseRule)(ne.schema,Te)){const{type:Re}=Te.definition;Re.length&&!Re.some(Be=>L(ce,Be))&&D(ne,`missing type "${Re.join(",")}" for keyword "${me}"`)}}}function L(ne,ce){return ne.includes(ce)||ce==="number"&&ne.includes("integer")}function H(ne,ce){return ne.includes(ce)||ce==="integer"&&ne.includes("number")}function O(ne,ce){const de=[];for(const me of ne.dataTypes)H(ce,me)?de.push(me):ce.includes("integer")&&me==="number"&&de.push("integer");ne.dataTypes=de}function D(ne,ce){const de=ne.schemaEnv.baseId+ne.errSchemaPath;ce+=` at "${de}" (strictTypes)`,(0,u.checkStrictMode)(ne,ce,ne.opts.strictTypes)}class Z{constructor(ce,de,me){if((0,a.validateKeywordUsage)(ce,de,me),this.gen=ce.gen,this.allErrors=ce.allErrors,this.keyword=me,this.data=ce.data,this.schema=ce.schema[me],this.$data=de.$data&&ce.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(ce,this.schema,me,this.$data),this.schemaType=de.schemaType,this.parentSchema=ce.schema,this.params={},this.it=ce,this.def=de,this.$data)this.schemaCode=ce.gen.const("vSchema",Ae(this.$data,ce));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,de.schemaType,de.allowUndefined))throw new Error(`${me} value must be ${JSON.stringify(de.schemaType)}`);("code"in de?de.trackErrors:de.errors!==!1)&&(this.errsCount=ce.gen.const("_errs",c.default.errors))}result(ce,de,me){this.failResult((0,o.not)(ce),de,me)}failResult(ce,de,me){this.gen.if(ce),me?me():this.error(),de?(this.gen.else(),de(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ce,de){this.failResult((0,o.not)(ce),void 0,de)}fail(ce){if(ce===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ce),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ce){if(!this.$data)return this.fail(ce);const{schemaCode:de}=this;this.fail((0,o._)`${de} !== undefined && (${(0,o.or)(this.invalid$data(),ce)})`)}error(ce,de,me){if(de){this.setParams(de),this._error(ce,me),this.setParams({});return}this._error(ce,me)}_error(ce,de){(ce?f.reportExtraError:f.reportError)(this,this.def.error,de)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(ce){this.allErrors||this.gen.if(ce)}setParams(ce,de){de?Object.assign(this.params,ce):this.params=ce}block$data(ce,de,me=o.nil){this.gen.block(()=>{this.check$data(ce,me),de()})}check$data(ce=o.nil,de=o.nil){if(!this.$data)return;const{gen:me,schemaCode:Te,schemaType:Re,def:Be}=this;me.if((0,o.or)((0,o._)`${Te} === undefined`,de)),ce!==o.nil&&me.assign(ce,!0),(Re.length||Be.validateSchema)&&(me.elseIf(this.invalid$data()),this.$dataError(),ce!==o.nil&&me.assign(ce,!1)),me.else()}invalid$data(){const{gen:ce,schemaCode:de,schemaType:me,def:Te,it:Re}=this;return(0,o.or)(Be(),ze());function Be(){if(me.length){if(!(de instanceof o.Name))throw new Error("ajv implementation error");const Ze=Array.isArray(me)?me:[me];return(0,o._)`${(0,n.checkDataTypes)(Ze,de,Re.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function ze(){if(Te.validateSchema){const Ze=ce.scopeValue("validate$data",{ref:Te.validateSchema});return(0,o._)`!${Ze}(${de})`}return o.nil}}subschema(ce,de){const me=(0,s.getSubschema)(this.it,ce);(0,s.extendSubschemaData)(me,this.it,ce),(0,s.extendSubschemaMode)(me,ce);const Te={...this.it,...me,items:void 0,props:void 0};return S(Te,de),Te}mergeEvaluated(ce,de){const{it:me,gen:Te}=this;me.opts.unevaluated&&(me.props!==!0&&ce.props!==void 0&&(me.props=u.mergeEvaluated.props(Te,ce.props,me.props,de)),me.items!==!0&&ce.items!==void 0&&(me.items=u.mergeEvaluated.items(Te,ce.items,me.items,de)))}mergeValidEvaluated(ce,de){const{it:me,gen:Te}=this;if(me.opts.unevaluated&&(me.props!==!0||me.items!==!0))return Te.if(de,()=>this.mergeEvaluated(ce,o.Name)),!0}}Hr.KeywordCxt=Z;function Ee(ne,ce,de,me){const Te=new Z(ne,de,ce);"code"in de?de.code(Te,me):Te.$data&&de.validate?(0,a.funcKeywordCode)(Te,de):"macro"in de?(0,a.macroKeywordCode)(Te,de):(de.compile||de.validate)&&(0,a.funcKeywordCode)(Te,de)}const _e=/^\/(?:[^~]|~0|~1)*$/,Se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ae(ne,{dataLevel:ce,dataNames:de,dataPathArr:me}){let Te,Re;if(ne==="")return c.default.rootData;if(ne[0]==="/"){if(!_e.test(ne))throw new Error(`Invalid JSON-pointer: ${ne}`);Te=ne,Re=c.default.rootData}else{const Ye=Se.exec(ne);if(!Ye)throw new Error(`Invalid JSON-pointer: ${ne}`);const nt=+Ye[1];if(Te=Ye[2],Te==="#"){if(nt>=ce)throw new Error(Ze("property/index",nt));return me[ce-nt]}if(nt>ce)throw new Error(Ze("data",nt));if(Re=de[ce-nt],!Te)return Re}let Be=Re;const ze=Te.split("/");for(const Ye of ze)Ye&&(Re=(0,o._)`${Re}${(0,o.getProperty)((0,u.unescapeJsonPointer)(Ye))}`,Be=(0,o._)`${Be} && ${Re}`);return Be;function Ze(Ye,nt){return`Cannot access ${Ye} ${nt} levels up, current level is ${ce}`}}return Hr.getData=Ae,Hr}var Ws={},sh;function Om(){if(sh)return Ws;sh=1,Object.defineProperty(Ws,"__esModule",{value:!0});class e extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return Ws.default=e,Ws}var Ks={},oh;function uu(){if(oh)return Ks;oh=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=ou();class r 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 Ks.default=r,Ks}var nr={},uh;function Pm(){if(uh)return nr;uh=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.resolveSchema=nr.getCompilingSchema=nr.resolveRef=nr.compileSchema=nr.SchemaEnv=void 0;const e=Ke(),r=Om(),t=xr(),n=ou(),i=st(),a=Ja();class s{constructor(P){var d;this.refs={},this.dynamicAnchors={};let S;typeof P.schema=="object"&&(S=P.schema),this.schema=P.schema,this.schemaId=P.schemaId,this.root=P.root||this,this.baseId=(d=P.baseId)!==null&&d!==void 0?d:(0,n.normalizeId)(S==null?void 0:S[P.schemaId||"$id"]),this.schemaPath=P.schemaPath,this.localRefs=P.localRefs,this.meta=P.meta,this.$async=S==null?void 0:S.$async,this.refs={}}}nr.SchemaEnv=s;function o(R){const P=u.call(this,R);if(P)return P;const d=(0,n.getFullPath)(this.opts.uriResolver,R.root.baseId),{es5:S,lines:E}=this.opts.code,{ownProperties:y}=this.opts,v=new e.CodeGen(this.scope,{es5:S,lines:E,ownProperties:y});let I;R.$async&&(I=v.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const N=v.scopeName("validate");R.validateName=N;const U={gen:v,allErrors:this.opts.allErrors,data:t.default.data,parentData:t.default.parentData,parentDataProperty:t.default.parentDataProperty,dataNames:[t.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:v.scopeValue("schema",this.opts.code.source===!0?{ref:R.schema,code:(0,e.stringify)(R.schema)}:{ref:R.schema}),validateName:N,ValidationError:I,schema:R.schema,schemaEnv:R,rootId:d,baseId:R.baseId||d,schemaPath:e.nil,errSchemaPath:R.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let Q;try{this._compilations.add(R),(0,a.validateFunctionCode)(U),v.optimize(this.opts.code.optimize);const Y=v.toString();Q=`${v.scopeRefs(t.default.scope)}return ${Y}`,this.opts.code.process&&(Q=this.opts.code.process(Q,R));const k=new Function(`${t.default.self}`,`${t.default.scope}`,Q)(this,this.scope.get());if(this.scope.value(N,{ref:k}),k.errors=null,k.schema=R.schema,k.schemaEnv=R,R.$async&&(k.$async=!0),this.opts.code.source===!0&&(k.source={validateName:N,validateCode:Y,scopeValues:v._values}),this.opts.unevaluated){const{props:V,items:ue}=U;k.evaluated={props:V instanceof e.Name?void 0:V,items:ue instanceof e.Name?void 0:ue,dynamicProps:V instanceof e.Name,dynamicItems:ue instanceof e.Name},k.source&&(k.source.evaluated=(0,e.stringify)(k.evaluated))}return R.validate=k,R}catch(Y){throw delete R.validate,delete R.validateName,Q&&this.logger.error("Error compiling schema, function code:",Q),Y}finally{this._compilations.delete(R)}}nr.compileSchema=o;function c(R,P,d){var S;d=(0,n.resolveUrl)(this.opts.uriResolver,P,d);const E=R.refs[d];if(E)return E;let y=g.call(this,R,d);if(y===void 0){const v=(S=R.localRefs)===null||S===void 0?void 0:S[d],{schemaId:I}=this.opts;v&&(y=new s({schema:v,schemaId:I,root:R,baseId:P}))}if(y!==void 0)return R.refs[d]=l.call(this,y)}nr.resolveRef=c;function l(R){return(0,n.inlineRef)(R.schema,this.opts.inlineRefs)?R.schema:R.validate?R:o.call(this,R)}function u(R){for(const P of this._compilations)if(f(P,R))return P}nr.getCompilingSchema=u;function f(R,P){return R.schema===P.schema&&R.root===P.root&&R.baseId===P.baseId}function g(R,P){let d;for(;typeof(d=this.refs[P])=="string";)P=d;return d||this.schemas[P]||_.call(this,R,P)}function _(R,P){const d=this.opts.uriResolver.parse(P),S=(0,n._getFullPath)(this.opts.uriResolver,d);let E=(0,n.getFullPath)(this.opts.uriResolver,R.baseId,void 0);if(Object.keys(R.schema).length>0&&S===E)return w.call(this,d,R);const y=(0,n.normalizeId)(S),v=this.refs[y]||this.schemas[y];if(typeof v=="string"){const I=_.call(this,R,v);return typeof(I==null?void 0:I.schema)!="object"?void 0:w.call(this,d,I)}if(typeof(v==null?void 0:v.schema)=="object"){if(v.validate||o.call(this,v),y===(0,n.normalizeId)(P)){const{schema:I}=v,{schemaId:N}=this.opts,U=I[N];return U&&(E=(0,n.resolveUrl)(this.opts.uriResolver,E,U)),new s({schema:I,schemaId:N,root:R,baseId:E})}return w.call(this,d,v)}}nr.resolveSchema=_;const A=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(R,{baseId:P,schema:d,root:S}){var E;if(((E=R.fragment)===null||E===void 0?void 0:E[0])!=="/")return;for(const I of R.fragment.slice(1).split("/")){if(typeof d=="boolean")return;const N=d[(0,i.unescapeFragment)(I)];if(N===void 0)return;d=N;const U=typeof d=="object"&&d[this.opts.schemaId];!A.has(I)&&U&&(P=(0,n.resolveUrl)(this.opts.uriResolver,P,U))}let y;if(typeof d!="boolean"&&d.$ref&&!(0,i.schemaHasRulesButRef)(d,this.RULES)){const I=(0,n.resolveUrl)(this.opts.uriResolver,P,d.$ref);y=_.call(this,S,I)}const{schemaId:v}=this.opts;if(y=y||new s({schema:d,schemaId:v,root:S,baseId:P}),y.schema!==y.root.schema)return y}return nr}const Fw="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Hw="Meta-schema for $data reference (JSON AnySchema extension proposal)",Gw="object",zw=["$data"],Ww={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Kw=!1,Yw={$id:Fw,description:Hw,type:Gw,required:zw,properties:Ww,additionalProperties:Kw};var Ys={},Yi={exports:{}},Gu,ch;function wS(){if(ch)return Gu;ch=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=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),t=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(y){let v="",I=0,N=0;for(N=0;N<y.length;N++)if(I=y[N].charCodeAt(0),I!==48){if(!(I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102))return"";v+=y[N];break}for(N+=1;N<y.length;N++){if(I=y[N].charCodeAt(0),!(I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102))return"";v+=y[N]}return v}const s=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(y){return y.length=0,!0}function c(y,v,I){if(y.length){const N=a(y);if(N!=="")v.push(N);else return I.error=!0,!1;y.length=0}return!0}function l(y){let v=0;const I={error:!1,address:"",zone:""},N=[],U=[];let Q=!1,Y=!1,z=c;for(let k=0;k<y.length;k++){const V=y[k];if(!(V==="["||V==="]"))if(V===":"){if(Q===!0&&(Y=!0),!z(U,N,I))break;if(++v>7){I.error=!0;break}k>0&&y[k-1]===":"&&(Q=!0),N.push(":");continue}else if(V==="%"){if(!z(U,N,I))break;z=o}else{U.push(V);continue}}return U.length&&(z===o?I.zone=U.join(""):Y?N.push(U.join("")):N.push(a(U))),I.address=N.join(""),I}function u(y){if(f(y,":")<2)return{host:y,isIPV6:!1};const v=l(y);if(v.error)return{host:y,isIPV6:!1};{let I=v.address,N=v.address;return v.zone&&(I+="%"+v.zone,N+="%25"+v.zone),{host:I,isIPV6:!0,escapedHost:N}}}function f(y,v){let I=0;for(let N=0;N<y.length;N++)y[N]===v&&I++;return I}function g(y){let v=y;const I=[];let N=-1,U=0;for(;U=v.length;){if(U===1){if(v===".")break;if(v==="/"){I.push("/");break}else{I.push(v);break}}else if(U===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){I.push("/");break}}else if(U===3&&v==="/.."){I.length!==0&&I.pop(),I.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),I.length!==0&&I.pop();continue}}if((N=v.indexOf("/",1))===-1){I.push(v);break}else I.push(v.slice(0,N)),v=v.slice(N)}return I.join("")}const _={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},A=/[@/?#:]/g,w=/[@/?#]/g;function R(y,v){const I=v?w:A;return I.lastIndex=0,y.replace(I,N=>_[N])}function P(y,v=!1){if(y.indexOf("%")===-1)return y;let I="";for(let N=0;N<y.length;N++){if(y[N]==="%"&&N+2<y.length){const U=y.slice(N+1,N+3);if(t(U)){const Q=U.toUpperCase(),Y=String.fromCharCode(parseInt(Q,16));v&&n(Y)?I+=Y:I+="%"+Q,N+=2;continue}}I+=y[N]}return I}function d(y){let v="";for(let I=0;I<y.length;I++){if(y[I]==="%"&&I+2<y.length){const N=y.slice(I+1,I+3);if(t(N)){const U=N.toUpperCase(),Q=String.fromCharCode(parseInt(U,16));Q!=="."&&n(Q)?v+=Q:v+="%"+U,I+=2;continue}}i(y[I])?v+=y[I]:v+=escape(y[I])}return v}function S(y){let v="";for(let I=0;I<y.length;I++){if(y[I]==="%"&&I+2<y.length){const N=y.slice(I+1,I+3);if(t(N)){v+="%"+N.toUpperCase(),I+=2;continue}}v+=escape(y[I])}return v}function E(y){const v=[];if(y.userinfo!==void 0&&(v.push(y.userinfo),v.push("@")),y.host!==void 0){let I=unescape(y.host);if(!r(I)){const N=u(I);N.isIPV6===!0?I=`[${N.escapedHost}]`:I=R(I,!1)}v.push(I)}return(typeof y.port=="number"||typeof y.port=="string")&&(v.push(":"),v.push(String(y.port))),v.length?v.join(""):void 0}return Gu={nonSimpleDomain:s,recomposeAuthority:E,reescapeHostDelimiters:R,normalizePercentEncoding:P,normalizePathEncoding:d,escapePreservingEscapes:S,removeDotSegments:g,isIPv4:r,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:a},Gu}var zu,lh;function Qw(){if(lh)return zu;lh=1;const{isUUID:e}=wS(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,t=["http","https","ws","wss","urn","urn:uuid"];function n(y){return t.indexOf(y)!==-1}function i(y){return y.secure===!0?!0:y.secure===!1?!1:y.scheme?y.scheme.length===3&&(y.scheme[0]==="w"||y.scheme[0]==="W")&&(y.scheme[1]==="s"||y.scheme[1]==="S")&&(y.scheme[2]==="s"||y.scheme[2]==="S"):!1}function a(y){return y.host||(y.error=y.error||"HTTP URIs must have a host."),y}function s(y){const v=String(y.scheme).toLowerCase()==="https";return(y.port===(v?443:80)||y.port==="")&&(y.port=void 0),y.path||(y.path="/"),y}function o(y){return y.secure=i(y),y.resourceName=(y.path||"/")+(y.query?"?"+y.query:""),y.path=void 0,y.query=void 0,y}function c(y){if((y.port===(i(y)?443:80)||y.port==="")&&(y.port=void 0),typeof y.secure=="boolean"&&(y.scheme=y.secure?"wss":"ws",y.secure=void 0),y.resourceName){const[v,I]=y.resourceName.split("?");y.path=v&&v!=="/"?v:void 0,y.query=I,y.resourceName=void 0}return y.fragment=void 0,y}function l(y,v){if(!y.path)return y.error="URN can not be parsed",y;const I=y.path.match(r);if(I){const N=v.scheme||y.scheme||"urn";y.nid=I[1].toLowerCase(),y.nss=I[2];const U=`${N}:${v.nid||y.nid}`,Q=E(U);y.path=void 0,Q&&(y=Q.parse(y,v))}else y.error=y.error||"URN can not be parsed.";return y}function u(y,v){if(y.nid===void 0)throw new Error("URN without nid cannot be serialized");const I=v.scheme||y.scheme||"urn",N=y.nid.toLowerCase(),U=`${I}:${v.nid||N}`,Q=E(U);Q&&(y=Q.serialize(y,v));const Y=y,z=y.nss;return Y.path=`${N||v.nid}:${z}`,v.skipEscape=!0,Y}function f(y,v){const I=y;return I.uuid=I.nss,I.nss=void 0,!v.tolerant&&(!I.uuid||!e(I.uuid))&&(I.error=I.error||"UUID is not valid."),I}function g(y){const v=y;return v.nss=(y.uuid||"").toLowerCase(),v}const _={scheme:"http",domainHost:!0,parse:a,serialize:s},A={scheme:"https",domainHost:_.domainHost,parse:a,serialize:s},w={scheme:"ws",domainHost:!0,parse:o,serialize:c},R={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},S={http:_,https:A,ws:w,wss:R,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:f,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(S,null);function E(y){return y&&(S[y]||S[y.toLowerCase()])||void 0}return zu={wsIsSecure:i,SCHEMES:S,isValidSchemeName:n,getSchemeHandler:E},zu}var dh;function Jw(){if(dh)return Yi.exports;dh=1;const{normalizeIPv6:e,removeDotSegments:r,recomposeAuthority:t,normalizePercentEncoding:n,normalizePathEncoding:i,escapePreservingEscapes:a,reescapeHostDelimiters:s,isIPv4:o,nonSimpleDomain:c}=wS(),{SCHEMES:l,getSchemeHandler:u}=Qw();function f(N,U){return typeof N=="string"?N=E(N,U):typeof N=="object"&&(N=S(w(N,U),U)),N}function g(N,U,Q){const Y=Q?Object.assign({scheme:"null"},Q):{scheme:"null"},z=_(S(N,Y),S(U,Y),Y,!0);return Y.skipEscape=!0,w(z,Y)}function _(N,U,Q,Y){const z={};return Y||(N=S(w(N,Q),Q),U=S(w(U,Q),Q)),Q=Q||{},!Q.tolerant&&U.scheme?(z.scheme=U.scheme,z.userinfo=U.userinfo,z.host=U.host,z.port=U.port,z.path=r(U.path||""),z.query=U.query):(U.userinfo!==void 0||U.host!==void 0||U.port!==void 0?(z.userinfo=U.userinfo,z.host=U.host,z.port=U.port,z.path=r(U.path||""),z.query=U.query):(U.path?(U.path[0]==="/"?z.path=r(U.path):((N.userinfo!==void 0||N.host!==void 0||N.port!==void 0)&&!N.path?z.path="/"+U.path:N.path?z.path=N.path.slice(0,N.path.lastIndexOf("/")+1)+U.path:z.path=U.path,z.path=r(z.path)),z.query=U.query):(z.path=N.path,U.query!==void 0?z.query=U.query:z.query=N.query),z.userinfo=N.userinfo,z.host=N.host,z.port=N.port),z.scheme=N.scheme),z.fragment=U.fragment,z}function A(N,U,Q){const Y=v(N,Q),z=v(U,Q);return Y!==void 0&&z!==void 0&&Y.toLowerCase()===z.toLowerCase()}function w(N,U){const Q={host:N.host,scheme:N.scheme,userinfo:N.userinfo,port:N.port,path:N.path,query:N.query,nid:N.nid,nss:N.nss,uuid:N.uuid,fragment:N.fragment,reference:N.reference,resourceName:N.resourceName,secure:N.secure,error:""},Y=Object.assign({},U),z=[],k=u(Y.scheme||Q.scheme);k&&k.serialize&&k.serialize(Q,Y),Q.path!==void 0&&(Y.skipEscape?Q.path=n(Q.path):(Q.path=a(Q.path),Q.scheme!==void 0&&(Q.path=Q.path.split("%3A").join(":")))),Y.reference!=="suffix"&&Q.scheme&&z.push(Q.scheme,":");const V=t(Q);if(V!==void 0&&(Y.reference!=="suffix"&&z.push("//"),z.push(V),Q.path&&Q.path[0]!=="/"&&z.push("/")),Q.path!==void 0){let ue=Q.path;!Y.absolutePath&&(!k||!k.absolutePath)&&(ue=r(ue)),V===void 0&&ue[0]==="/"&&ue[1]==="/"&&(ue="/%2F"+ue.slice(2)),z.push(ue)}return Q.query!==void 0&&z.push("?",Q.query),Q.fragment!==void 0&&z.push("#",Q.fragment),z.join("")}const R=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function P(N,U){if(U[2]!==void 0&&N.path&&N.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof N.port=="number"&&(N.port<0||N.port>65535))return"URI port is malformed."}function d(N,U){const Q=Object.assign({},U),Y={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let z=!1,k=!1;Q.reference==="suffix"&&(Q.scheme?N=Q.scheme+":"+N:N="//"+N);const V=N.match(R);if(V){Y.scheme=V[1],Y.userinfo=V[3],Y.host=V[4],Y.port=parseInt(V[5],10),Y.path=V[6]||"",Y.query=V[7],Y.fragment=V[8],isNaN(Y.port)&&(Y.port=V[5]);const ue=P(Y,V);if(ue!==void 0&&(Y.error=Y.error||ue,z=!0),Y.host)if(o(Y.host)===!1){const J=e(Y.host);Y.host=J.host.toLowerCase(),k=J.isIPV6}else k=!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",Q.reference&&Q.reference!=="suffix"&&Q.reference!==Y.reference&&(Y.error=Y.error||"URI is not a "+Q.reference+" reference.");const ae=u(Q.scheme||Y.scheme);if(!Q.unicodeSupport&&(!ae||!ae.unicodeSupport)&&Y.host&&(Q.domainHost||ae&&ae.domainHost)&&k===!1&&c(Y.host))try{Y.host=new URL("http://"+Y.host).hostname}catch(re){Y.error=Y.error||"Host's domain name can not be converted to ASCII: "+re}if((!ae||ae&&!ae.skipNormalize)&&(N.indexOf("%")!==-1&&(Y.scheme!==void 0&&(Y.scheme=unescape(Y.scheme)),Y.host!==void 0&&(Y.host=s(unescape(Y.host),k))),Y.path&&(Y.path=i(Y.path)),Y.fragment))try{Y.fragment=encodeURI(decodeURIComponent(Y.fragment))}catch{Y.error=Y.error||"URI malformed"}ae&&ae.parse&&ae.parse(Y,Q)}else Y.error=Y.error||"URI can not be parsed.";return{parsed:Y,malformedAuthorityOrPort:z}}function S(N,U){return d(N,U).parsed}function E(N,U){return y(N,U).normalized}function y(N,U){const{parsed:Q,malformedAuthorityOrPort:Y}=d(N,U);return{normalized:Y?N:w(Q,U),malformedAuthorityOrPort:Y}}function v(N,U){if(typeof N=="string"){const{normalized:Q,malformedAuthorityOrPort:Y}=y(N,U);return Y?void 0:Q}if(typeof N=="object")return w(N,U)}const I={SCHEMES:l,normalize:f,resolve:g,resolveComponent:_,equal:A,serialize:w,parse:S};return Yi.exports=I,Yi.exports.default=I,Yi.exports.fastUri=I,Yi.exports}var fh;function Xw(){if(fh)return Ys;fh=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=Jw();return e.code='require("ajv/dist/runtime/uri").default',Ys.default=e,Ys}var ph;function Zw(){return ph||(ph=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 r=Ja();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var t=Ke();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const n=Om(),i=uu(),a=AS(),s=Pm(),o=Ke(),c=ou(),l=iu(),u=st(),f=Yw,g=Xw(),_=(q,j)=>new RegExp(q,j);_.code="new RegExp";const A=["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."},P={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},d=200;function S(q){var j,L,H,O,D,Z,Ee,_e,Se,Ae,ne,ce,de,me,Te,Re,Be,ze,Ze,Ye,nt,Tt,lt,Ot,dt;const Bt=q.strict,Ut=(j=q.code)===null||j===void 0?void 0:j.optimize,ot=Ut===!0||Ut===void 0?1:Ut||0,tr=(H=(L=q.code)===null||L===void 0?void 0:L.regExp)!==null&&H!==void 0?H:_,C=(O=q.uriResolver)!==null&&O!==void 0?O:g.default;return{strictSchema:(Z=(D=q.strictSchema)!==null&&D!==void 0?D:Bt)!==null&&Z!==void 0?Z:!0,strictNumbers:(_e=(Ee=q.strictNumbers)!==null&&Ee!==void 0?Ee:Bt)!==null&&_e!==void 0?_e:!0,strictTypes:(Ae=(Se=q.strictTypes)!==null&&Se!==void 0?Se:Bt)!==null&&Ae!==void 0?Ae:"log",strictTuples:(ce=(ne=q.strictTuples)!==null&&ne!==void 0?ne:Bt)!==null&&ce!==void 0?ce:"log",strictRequired:(me=(de=q.strictRequired)!==null&&de!==void 0?de:Bt)!==null&&me!==void 0?me:!1,code:q.code?{...q.code,optimize:ot,regExp:tr}:{optimize:ot,regExp:tr},loopRequired:(Te=q.loopRequired)!==null&&Te!==void 0?Te:d,loopEnum:(Re=q.loopEnum)!==null&&Re!==void 0?Re:d,meta:(Be=q.meta)!==null&&Be!==void 0?Be:!0,messages:(ze=q.messages)!==null&&ze!==void 0?ze:!0,inlineRefs:(Ze=q.inlineRefs)!==null&&Ze!==void 0?Ze:!0,schemaId:(Ye=q.schemaId)!==null&&Ye!==void 0?Ye:"$id",addUsedSchema:(nt=q.addUsedSchema)!==null&&nt!==void 0?nt:!0,validateSchema:(Tt=q.validateSchema)!==null&&Tt!==void 0?Tt:!0,validateFormats:(lt=q.validateFormats)!==null&<!==void 0?lt:!0,unicodeRegExp:(Ot=q.unicodeRegExp)!==null&&Ot!==void 0?Ot:!0,int32range:(dt=q.int32range)!==null&&dt!==void 0?dt:!0,uriResolver:C}}class E{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,...S(j)};const{es5:L,lines:H}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:w,es5:L,lines:H}),this.logger=z(j.logger);const O=j.validateFormats;j.validateFormats=!1,this.RULES=(0,a.getRules)(),y.call(this,R,j,"NOT SUPPORTED"),y.call(this,P,j,"DEPRECATED","warn"),this._metaOpts=Q.call(this),j.formats&&N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&U.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),I.call(this),j.validateFormats=O}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:L,schemaId:H}=this.opts;let O=f;H==="id"&&(O={...f},O.id=O.$id,delete O.$id),L&&j&&this.addMetaSchema(O,O[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 O=H(L);return"$async"in H||(this.errors=H.errors),O}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 O.call(this,j,L);async function O(Ae,ne){await D.call(this,Ae.$schema);const ce=this._addSchema(Ae,ne);return ce.validate||Z.call(this,ce)}async function D(Ae){Ae&&!this.getSchema(Ae)&&await O.call(this,{$ref:Ae},!0)}async function Z(Ae){try{return this._compileSchemaEnv(Ae)}catch(ne){if(!(ne instanceof i.default))throw ne;return Ee.call(this,ne),await _e.call(this,ne.missingSchema),Z.call(this,Ae)}}function Ee({missingSchema:Ae,missingRef:ne}){if(this.refs[Ae])throw new Error(`AnySchema ${Ae} is loaded but ${ne} cannot be resolved`)}async function _e(Ae){const ne=await Se.call(this,Ae);this.refs[Ae]||await D.call(this,ne.$schema),this.refs[Ae]||this.addSchema(ne,Ae,L)}async function Se(Ae){const ne=this._loading[Ae];if(ne)return ne;try{return await(this._loading[Ae]=H(Ae))}finally{delete this._loading[Ae]}}}addSchema(j,L,H,O=this.opts.validateSchema){if(Array.isArray(j)){for(const Z of j)this.addSchema(Z,void 0,H,O);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,c.normalizeId)(L||D),this._checkUnique(L),this.schemas[L]=this._addSchema(j,H,L,O,!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 O=this.validate(H,j);if(!O&&L){const D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}return O}getSchema(j){let L;for(;typeof(L=v.call(this,j))=="string";)j=L;if(L===void 0){const{schemaId:H}=this.opts,O=new s.SchemaEnv({schema:{},schemaId:H});if(L=s.resolveSchema.call(this,O,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=v.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,c.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(V.call(this,H,L),!L)return(0,u.eachItem)(H,D=>ue.call(this,D)),this;re.call(this,L);const O={...L,type:(0,l.getJSONTypes)(L.type),schemaType:(0,l.getJSONTypes)(L.schemaType)};return(0,u.eachItem)(H,O.type.length===0?D=>ue.call(this,D,O):D=>O.type.forEach(Z=>ue.call(this,D,O,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 O=H.rules.findIndex(D=>D.keyword===j);O>=0&&H.rules.splice(O,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(O=>`${H}${O.instancePath} ${O.message}`).reduce((O,D)=>O+L+D)}$dataMetaSchema(j,L){const H=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const O of L){const D=O.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,Ae=Z[Ee];Se&&Ae&&(Z[Ee]=W(Ae))}}return j}_removeAllSchemas(j,L){for(const H in j){const O=j[H];(!L||L.test(H))&&(typeof O=="string"?delete j[H]:O&&!O.meta&&(this._cache.delete(O.schema),delete j[H]))}}_addSchema(j,L,H,O=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,c.normalizeId)(Z||H);const Se=c.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),O&&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}}}E.ValidationError=n.default,E.MissingRefError=i.default,e.default=E;function y(q,j,L,H="error"){for(const O in q){const D=O;D in j&&this.logger[H](`${L}: option ${O}. ${q[D]}`)}}function v(q){return q=(0,c.normalizeId)(q),this.schemas[q]||this.refs[q]}function I(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const j in q)this.addSchema(q[j],j)}function N(){for(const q in this.opts.formats){const j=this.opts.formats[q];j&&this.addFormat(q,j)}}function U(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in q){const L=q[j];L.keyword||(L.keyword=j),this.addKeyword(L)}}function Q(){const q={...this.opts};for(const j of A)delete q[j];return q}const Y={log(){},warn(){},error(){}};function z(q){if(q===!1)return Y;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const k=/^[a-z_$][a-z0-9_$:-]*$/i;function V(q,j){const{RULES:L}=this;if((0,u.eachItem)(q,H=>{if(L.keywords[H])throw new Error(`Keyword ${H} is already defined`);if(!k.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 ue(q,j,L){var H;const O=j==null?void 0:j.post;if(L&&O)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:D}=this;let Z=O?D.post:D.rules.find(({type:_e})=>_e===L);if(Z||(Z={type:L,rules:[]},D.rules.push(Z)),D.keywords[q]=!0,!j)return;const Ee={keyword:q,definition:{...j,type:(0,l.getJSONTypes)(j.type),schemaType:(0,l.getJSONTypes)(j.schemaType)}};j.before?ae.call(this,Z,Ee,j.before):Z.rules.push(Ee),D.all[q]=Ee,(H=j.implements)===null||H===void 0||H.forEach(_e=>this.addKeyword(_e))}function ae(q,j,L){const H=q.rules.findIndex(O=>O.keyword===L);H>=0?q.rules.splice(H,0,j):(q.rules.push(j),this.logger.warn(`rule ${L} is not defined`))}function re(q){let{metaSchema:j}=q;j!==void 0&&(q.$data&&this.opts.$data&&(j=W(j)),q.validateSchema=this.compile(j,!0))}const J={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function W(q){return{anyOf:[q,J]}}})($u)),$u}var Qs={},Js={},Xs={},mh;function xw(){if(mh)return Xs;mh=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Xs.default=e,Xs}var sn={},yh;function eI(){if(yh)return sn;yh=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.callRef=sn.getValidate=void 0;const e=uu(),r=vr(),t=Ke(),n=xr(),i=Pm(),a=st(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:f,it:g}=l,{baseId:_,schemaEnv:A,validateName:w,opts:R,self:P}=g,{root:d}=A;if((f==="#"||f==="#/")&&_===d.baseId)return E();const S=i.resolveRef.call(P,d,_,f);if(S===void 0)throw new e.default(g.opts.uriResolver,_,f);if(S instanceof i.SchemaEnv)return y(S);return v(S);function E(){if(A===d)return c(l,w,A,A.$async);const I=u.scopeValue("root",{ref:d});return c(l,(0,t._)`${I}.validate`,d,d.$async)}function y(I){const N=o(l,I);c(l,N,I,I.$async)}function v(I){const N=u.scopeValue("schema",R.code.source===!0?{ref:I,code:(0,t.stringify)(I)}:{ref:I}),U=u.name("valid"),Q=l.subschema({schema:I,dataTypes:[],schemaPath:t.nil,topSchemaRef:N,errSchemaPath:f},U);l.mergeEvaluated(Q),l.ok(U)}}};function o(l,u){const{gen:f}=l;return u.validate?f.scopeValue("validate",{ref:u.validate}):(0,t._)`${f.scopeValue("wrapper",{ref:u})}.validate`}sn.getValidate=o;function c(l,u,f,g){const{gen:_,it:A}=l,{allErrors:w,schemaEnv:R,opts:P}=A,d=P.passContext?n.default.this:t.nil;g?S():E();function S(){if(!R.$async)throw new Error("async schema referenced by sync schema");const I=_.let("valid");_.try(()=>{_.code((0,t._)`await ${(0,r.callValidateCode)(l,u,d)}`),v(u),w||_.assign(I,!0)},N=>{_.if((0,t._)`!(${N} instanceof ${A.ValidationError})`,()=>_.throw(N)),y(N),w||_.assign(I,!1)}),l.ok(I)}function E(){l.result((0,r.callValidateCode)(l,u,d),()=>v(u),()=>y(u))}function y(I){const N=(0,t._)`${I}.errors`;_.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${N} : ${n.default.vErrors}.concat(${N})`),_.assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`)}function v(I){var N;if(!A.opts.unevaluated)return;const U=(N=f==null?void 0:f.validate)===null||N===void 0?void 0:N.evaluated;if(A.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&(A.props=a.mergeEvaluated.props(_,U.props,A.props));else{const Q=_.var("props",(0,t._)`${I}.evaluated.props`);A.props=a.mergeEvaluated.props(_,Q,A.props,t.Name)}if(A.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&(A.items=a.mergeEvaluated.items(_,U.items,A.items));else{const Q=_.var("items",(0,t._)`${I}.evaluated.items`);A.items=a.mergeEvaluated.items(_,Q,A.items,t.Name)}}}return sn.callRef=c,sn.default=s,sn}var hh;function tI(){if(hh)return Js;hh=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=xw(),r=eI(),t=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];return Js.default=t,Js}var Zs={},xs={},gh;function rI(){if(gh)return xs;gh=1,Object.defineProperty(xs,"__esModule",{value:!0});const e=Ke(),r=e.operators,t={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},n={message:({keyword:a,schemaCode:s})=>(0,e.str)`must be ${t[a].okStr} ${s}`,params:({keyword:a,schemaCode:s})=>(0,e._)`{comparison: ${t[a].okStr}, limit: ${s}}`},i={keyword:Object.keys(t),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:s,data:o,schemaCode:c}=a;a.fail$data((0,e._)`${o} ${t[s].fail} ${c} || isNaN(${o})`)}};return xs.default=i,xs}var eo={},_h;function nI(){if(_h)return eo;_h=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=Ke(),t={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,c=o.opts.multipleOfPrecision,l=i.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${s} === 0 || (${l} = ${a}/${s}, ${u}))`)}};return eo.default=t,eo}var to={},ro={},Eh;function iI(){if(Eh)return ro;Eh=1,Object.defineProperty(ro,"__esModule",{value:!0});function e(r){const t=r.length;let n=0,i=0,a;for(;i<t;)n++,a=r.charCodeAt(i++),a>=55296&&a<=56319&&i<t&&(a=r.charCodeAt(i),(a&64512)===56320&&i++);return n}return ro.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',ro}var vh;function aI(){if(vh)return to;vh=1,Object.defineProperty(to,"__esModule",{value:!0});const e=Ke(),r=st(),t=iI(),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:c,it:l}=a,u=s==="maxLength"?e.operators.GT:e.operators.LT,f=l.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,r.useFunc)(a.gen,t.default)}(${o})`;a.fail$data((0,e._)`${f} ${u} ${c}`)}};return to.default=i,to}var no={},bh;function sI(){if(bh)return no;bh=1,Object.defineProperty(no,"__esModule",{value:!0});const e=vr(),r=st(),t=Ke(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,t.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,t._)`{pattern: ${a}}`},code(a){const{gen:s,data:o,$data:c,schema:l,schemaCode:u,it:f}=a,g=f.opts.unicodeRegExp?"u":"";if(c){const{regExp:_}=f.opts.code,A=_.code==="new RegExp"?(0,t._)`new RegExp`:(0,r.useFunc)(s,_),w=s.let("valid");s.try(()=>s.assign(w,(0,t._)`${A}(${u}, ${g}).test(${o})`),()=>s.assign(w,!1)),a.fail$data((0,t._)`!${w}`)}else{const _=(0,e.usePattern)(a,l);a.fail$data((0,t._)`!${_}.test(${o})`)}}};return no.default=i,no}var io={},Th;function oI(){if(Th)return io;Th=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Ke(),t={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 io.default=t,io}var ao={},Sh;function uI(){if(Sh)return ao;Sh=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=vr(),r=Ke(),t=st(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,r.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,r._)`{missingProperty: ${a}}`},code(a){const{gen:s,schema:o,schemaCode:c,data:l,$data:u,it:f}=a,{opts:g}=f;if(!u&&o.length===0)return;const _=o.length>=g.loopRequired;if(f.allErrors?A():w(),g.strictRequired){const d=a.parentSchema.properties,{definedProperties:S}=a.it;for(const E of o)if((d==null?void 0:d[E])===void 0&&!S.has(E)){const y=f.schemaEnv.baseId+f.errSchemaPath,v=`required property "${E}" is not defined at "${y}" (strictRequired)`;(0,t.checkStrictMode)(f,v,f.opts.strictRequired)}}function A(){if(_||u)a.block$data(r.nil,R);else for(const d of o)(0,e.checkReportMissingProp)(a,d)}function w(){const d=s.let("missing");if(_||u){const S=s.let("valid",!0);a.block$data(S,()=>P(d,S)),a.ok(S)}else s.if((0,e.checkMissingProp)(a,o,d)),(0,e.reportMissingProp)(a,d),s.else()}function R(){s.forOf("prop",c,d=>{a.setParams({missingProperty:d}),s.if((0,e.noPropertyInData)(s,l,d,g.ownProperties),()=>a.error())})}function P(d,S){a.setParams({missingProperty:d}),s.forOf(d,c,()=>{s.assign(S,(0,e.propertyInData)(s,l,d,g.ownProperties)),s.if((0,r.not)(S),()=>{a.error(),s.break()})},r.nil)}}};return ao.default=i,ao}var so={},Ah;function cI(){if(Ah)return so;Ah=1,Object.defineProperty(so,"__esModule",{value:!0});const e=Ke(),t={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 so.default=t,so}var oo={},uo={},Rh;function Nm(){if(Rh)return uo;Rh=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=Im();return e.code='require("ajv/dist/runtime/equal").default',uo.default=e,uo}var wh;function lI(){if(wh)return oo;wh=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=iu(),r=Ke(),t=st(),n=Nm(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:o}})=>(0,r.str)`must NOT have duplicate items (items ## ${o} and ${s} are identical)`,params:({params:{i:s,j:o}})=>(0,r._)`{i: ${s}, j: ${o}}`},code(s){const{gen:o,data:c,$data:l,schema:u,parentSchema:f,schemaCode:g,it:_}=s;if(!l&&!u)return;const A=o.let("valid"),w=f.items?(0,e.getSchemaTypes)(f.items):[];s.block$data(A,R,(0,r._)`${g} === false`),s.ok(A);function R(){const E=o.let("i",(0,r._)`${c}.length`),y=o.let("j");s.setParams({i:E,j:y}),o.assign(A,!0),o.if((0,r._)`${E} > 1`,()=>(P()?d:S)(E,y))}function P(){return w.length>0&&!w.some(E=>E==="object"||E==="array")}function d(E,y){const v=o.name("item"),I=(0,e.checkDataTypes)(w,v,_.opts.strictNumbers,e.DataType.Wrong),N=o.const("indices",(0,r._)`{}`);o.for((0,r._)`;${E}--;`,()=>{o.let(v,(0,r._)`${c}[${E}]`),o.if(I,(0,r._)`continue`),w.length>1&&o.if((0,r._)`typeof ${v} == "string"`,(0,r._)`${v} += "_"`),o.if((0,r._)`typeof ${N}[${v}] == "number"`,()=>{o.assign(y,(0,r._)`${N}[${v}]`),s.error(),o.assign(A,!1).break()}).code((0,r._)`${N}[${v}] = ${E}`)})}function S(E,y){const v=(0,t.useFunc)(o,n.default),I=o.name("outer");o.label(I).for((0,r._)`;${E}--;`,()=>o.for((0,r._)`${y} = ${E}; ${y}--;`,()=>o.if((0,r._)`${v}(${c}[${E}], ${c}[${y}])`,()=>{s.error(),o.assign(A,!1).break(I)})))}}};return oo.default=a,oo}var co={},Ih;function dI(){if(Ih)return co;Ih=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Ke(),r=st(),t=Nm(),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:c,schemaCode:l,schema:u}=a;c||u&&typeof u=="object"?a.fail$data((0,e._)`!${(0,r.useFunc)(s,t.default)}(${o}, ${l})`):a.fail((0,e._)`${u} !== ${o}`)}};return co.default=i,co}var lo={},Oh;function fI(){if(Oh)return lo;Oh=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=Ke(),r=st(),t=Nm(),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:c,schema:l,schemaCode:u,it:f}=a;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const g=l.length>=f.opts.loopEnum;let _;const A=()=>_??(_=(0,r.useFunc)(s,t.default));let w;if(g||c)w=s.let("valid"),a.block$data(w,R);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const d=s.const("vSchema",u);w=(0,e.or)(...l.map((S,E)=>P(d,E)))}a.pass(w);function R(){s.assign(w,!1),s.forOf("v",u,d=>s.if((0,e._)`${A()}(${o}, ${d})`,()=>s.assign(w,!0).break()))}function P(d,S){const E=l[S];return typeof E=="object"&&E!==null?(0,e._)`${A()}(${o}, ${d}[${S}])`:(0,e._)`${o} === ${E}`}}};return lo.default=i,lo}var Ph;function pI(){if(Ph)return Zs;Ph=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=rI(),r=nI(),t=aI(),n=sI(),i=oI(),a=uI(),s=cI(),o=lI(),c=dI(),l=fI(),u=[e.default,r.default,t.default,n.default,i.default,a.default,s.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return Zs.default=u,Zs}var fo={},Si={},Nh;function IS(){if(Nh)return Si;Nh=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.validateAdditionalItems=void 0;const e=Ke(),r=st(),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:c}=s;if(!Array.isArray(c)){(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,c)}};function i(a,s){const{gen:o,schema:c,data:l,keyword:u,it:f}=a;f.items=!0;const g=o.const("len",(0,e._)`${l}.length`);if(c===!1)a.setParams({len:s.length}),a.pass((0,e._)`${g} <= ${s.length}`);else if(typeof c=="object"&&!(0,r.alwaysValidSchema)(f,c)){const A=o.var("valid",(0,e._)`${g} <= ${s.length}`);o.if((0,e.not)(A),()=>_(A)),a.ok(A)}function _(A){o.forRange("i",s.length,g,w=>{a.subschema({keyword:u,dataProp:w,dataPropType:r.Type.Num},A),f.allErrors||o.if((0,e.not)(A),()=>o.break())})}}return Si.validateAdditionalItems=i,Si.default=n,Si}var po={},Ai={},Mh;function OS(){if(Mh)return Ai;Mh=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.validateTuple=void 0;const e=Ke(),r=st(),t=vr(),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,r.alwaysValidSchema)(o,s)&&a.ok((0,t.validateArray)(a))}};function i(a,s,o=a.schema){const{gen:c,parentSchema:l,data:u,keyword:f,it:g}=a;w(l),g.opts.unevaluated&&o.length&&g.items!==!0&&(g.items=r.mergeEvaluated.items(c,o.length,g.items));const _=c.name("valid"),A=c.const("len",(0,e._)`${u}.length`);o.forEach((R,P)=>{(0,r.alwaysValidSchema)(g,R)||(c.if((0,e._)`${A} > ${P}`,()=>a.subschema({keyword:f,schemaProp:P,dataProp:P},_)),a.ok(_))});function w(R){const{opts:P,errSchemaPath:d}=g,S=o.length,E=S===R.minItems&&(S===R.maxItems||R[s]===!1);if(P.strictTuples&&!E){const y=`"${f}" is ${S}-tuple, but minItems or maxItems/${s} are not specified or different at path "${d}"`;(0,r.checkStrictMode)(g,y,P.strictTuples)}}}return Ai.validateTuple=i,Ai.default=n,Ai}var Ch;function mI(){if(Ch)return po;Ch=1,Object.defineProperty(po,"__esModule",{value:!0});const e=OS(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return po.default=r,po}var mo={},jh;function yI(){if(jh)return mo;jh=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=Ke(),r=st(),t=vr(),n=IS(),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:c,it:l}=s,{prefixItems:u}=c;l.items=!0,!(0,r.alwaysValidSchema)(l,o)&&(u?(0,n.validateAdditionalItems)(s,u):s.ok((0,t.validateArray)(s)))}};return mo.default=a,mo}var yo={},Dh;function hI(){if(Dh)return yo;Dh=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=Ke(),r=st(),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:c,it:l}=i;let u,f;const{minContains:g,maxContains:_}=o;l.opts.next?(u=g===void 0?1:g,f=_):u=1;const A=a.const("len",(0,e._)`${c}.length`);if(i.setParams({min:u,max:f}),f===void 0&&u===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&u>f){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,r.alwaysValidSchema)(l,s)){let S=(0,e._)`${A} >= ${u}`;f!==void 0&&(S=(0,e._)`${S} && ${A} <= ${f}`),i.pass(S);return}l.items=!0;const w=a.name("valid");f===void 0&&u===1?P(w,()=>a.if(w,()=>a.break())):u===0?(a.let(w,!0),f!==void 0&&a.if((0,e._)`${c}.length > 0`,R)):(a.let(w,!1),R()),i.result(w,()=>i.reset());function R(){const S=a.name("_valid"),E=a.let("count",0);P(S,()=>a.if(S,()=>d(E)))}function P(S,E){a.forRange("i",0,A,y=>{i.subschema({keyword:"contains",dataProp:y,dataPropType:r.Type.Num,compositeRule:!0},S),E()})}function d(S){a.code((0,e._)`${S}++`),f===void 0?a.if((0,e._)`${S} >= ${u}`,()=>a.assign(w,!0).break()):(a.if((0,e._)`${S} > ${f}`,()=>a.assign(w,!1).break()),u===1?a.assign(w,!0):a.if((0,e._)`${S} >= ${u}`,()=>a.assign(w,!0)))}}};return yo.default=n,yo}var Wu={},qh;function gI(){return qh||(qh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const r=Ke(),t=st(),n=vr();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const f=l===1?"property":"properties";return(0,r.str)`must have ${f} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:f}})=>(0,r._)`{property: ${c},
|
|
23
|
-
missingProperty: ${f},
|
|
24
|
-
depsCount: ${l},
|
|
25
|
-
deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=a(c);s(c,l),o(c,u)}};function a({schema:c}){const l={},u={};for(const f in c){if(f==="__proto__")continue;const g=Array.isArray(c[f])?l:u;g[f]=c[f]}return[l,u]}function s(c,l=c.schema){const{gen:u,data:f,it:g}=c;if(Object.keys(l).length===0)return;const _=u.let("missing");for(const A in l){const w=l[A];if(w.length===0)continue;const R=(0,n.propertyInData)(u,f,A,g.opts.ownProperties);c.setParams({property:A,depsCount:w.length,deps:w.join(", ")}),g.allErrors?u.if(R,()=>{for(const P of w)(0,n.checkReportMissingProp)(c,P)}):(u.if((0,r._)`${R} && (${(0,n.checkMissingProp)(c,w,_)})`),(0,n.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function o(c,l=c.schema){const{gen:u,data:f,keyword:g,it:_}=c,A=u.name("valid");for(const w in l)(0,t.alwaysValidSchema)(_,l[w])||(u.if((0,n.propertyInData)(u,f,w,_.opts.ownProperties),()=>{const R=c.subschema({keyword:g,schemaProp:w},A);c.mergeValidEvaluated(R,A)},()=>u.var(A,!0)),c.ok(A))}e.validateSchemaDeps=o,e.default=i})(Wu)),Wu}var ho={},Lh;function _I(){if(Lh)return ho;Lh=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=Ke(),r=st(),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:c}=i;if((0,r.alwaysValidSchema)(c,s))return;const l=a.name("valid");a.forIn("key",o,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),a.if((0,e.not)(l),()=>{i.error(!0),c.allErrors||a.break()})}),i.ok(l)}};return ho.default=n,ho}var go={},$h;function PS(){if($h)return go;$h=1,Object.defineProperty(go,"__esModule",{value:!0});const e=vr(),r=Ke(),t=xr(),n=st(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,r._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:o,schema:c,parentSchema:l,data:u,errsCount:f,it:g}=s;if(!f)throw new Error("ajv implementation error");const{allErrors:_,opts:A}=g;if(g.props=!0,A.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(g,c))return;const w=(0,e.allSchemaProperties)(l.properties),R=(0,e.allSchemaProperties)(l.patternProperties);P(),s.ok((0,r._)`${f} === ${t.default.errors}`);function P(){o.forIn("key",u,v=>{!w.length&&!R.length?E(v):o.if(d(v),()=>E(v))})}function d(v){let I;if(w.length>8){const N=(0,n.schemaRefOrVal)(g,l.properties,"properties");I=(0,e.isOwnProperty)(o,N,v)}else w.length?I=(0,r.or)(...w.map(N=>(0,r._)`${v} === ${N}`)):I=r.nil;return R.length&&(I=(0,r.or)(I,...R.map(N=>(0,r._)`${(0,e.usePattern)(s,N)}.test(${v})`))),(0,r.not)(I)}function S(v){o.code((0,r._)`delete ${u}[${v}]`)}function E(v){if(A.removeAdditional==="all"||A.removeAdditional&&c===!1){S(v);return}if(c===!1){s.setParams({additionalProperty:v}),s.error(),_||o.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(g,c)){const I=o.name("valid");A.removeAdditional==="failing"?(y(v,I,!1),o.if((0,r.not)(I),()=>{s.reset(),S(v)})):(y(v,I),_||o.if((0,r.not)(I),()=>o.break()))}}function y(v,I,N){const U={keyword:"additionalProperties",dataProp:v,dataPropType:n.Type.Str};N===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(U,I)}}};return go.default=a,go}var _o={},Bh;function EI(){if(Bh)return _o;Bh=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=Ja(),r=vr(),t=st(),n=PS(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,parentSchema:c,data:l,it:u}=a;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const f=(0,r.allSchemaProperties)(o);for(const R of f)u.definedProperties.add(R);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=t.mergeEvaluated.props(s,(0,t.toHash)(f),u.props));const g=f.filter(R=>!(0,t.alwaysValidSchema)(u,o[R]));if(g.length===0)return;const _=s.name("valid");for(const R of g)A(R)?w(R):(s.if((0,r.propertyInData)(s,l,R,u.opts.ownProperties)),w(R),u.allErrors||s.else().var(_,!0),s.endIf()),a.it.definedProperties.add(R),a.ok(_);function A(R){return u.opts.useDefaults&&!u.compositeRule&&o[R].default!==void 0}function w(R){a.subschema({keyword:"properties",schemaProp:R,dataProp:R},_)}}};return _o.default=i,_o}var Eo={},Uh;function vI(){if(Uh)return Eo;Uh=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=vr(),r=Ke(),t=st(),n=st(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,data:c,parentSchema:l,it:u}=a,{opts:f}=u,g=(0,e.allSchemaProperties)(o),_=g.filter(E=>(0,t.alwaysValidSchema)(u,o[E]));if(g.length===0||_.length===g.length&&(!u.opts.unevaluated||u.props===!0))return;const A=f.strictSchema&&!f.allowMatchingProperties&&l.properties,w=s.name("valid");u.props!==!0&&!(u.props instanceof r.Name)&&(u.props=(0,n.evaluatedPropsToName)(s,u.props));const{props:R}=u;P();function P(){for(const E of g)A&&d(E),u.allErrors?S(E):(s.var(w,!0),S(E),s.if(w))}function d(E){for(const y in A)new RegExp(E).test(y)&&(0,t.checkStrictMode)(u,`property ${y} matches pattern ${E} (use allowMatchingProperties)`)}function S(E){s.forIn("key",c,y=>{s.if((0,r._)`${(0,e.usePattern)(a,E)}.test(${y})`,()=>{const v=_.includes(E);v||a.subschema({keyword:"patternProperties",schemaProp:E,dataProp:y,dataPropType:n.Type.Str},w),u.opts.unevaluated&&R!==!0?s.assign((0,r._)`${R}[${y}]`,!0):!v&&!u.allErrors&&s.if((0,r.not)(w),()=>s.break())})})}}};return Eo.default=i,Eo}var vo={},kh;function bI(){if(kh)return vo;kh=1,Object.defineProperty(vo,"__esModule",{value:!0});const e=st(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:n,schema:i,it:a}=t;if((0,e.alwaysValidSchema)(a,i)){t.fail();return}const s=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return vo.default=r,vo}var bo={},Vh;function TI(){if(Vh)return bo;Vh=1,Object.defineProperty(bo,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:vr().validateUnion,error:{message:"must match a schema in anyOf"}};return bo.default=r,bo}var To={},Fh;function SI(){if(Fh)return To;Fh=1,Object.defineProperty(To,"__esModule",{value:!0});const e=Ke(),r=st(),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:c}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&o.discriminator)return;const l=s,u=a.let("valid",!1),f=a.let("passing",null),g=a.name("_valid");i.setParams({passing:f}),a.block(_),i.result(u,()=>i.reset(),()=>i.error(!0));function _(){l.forEach((A,w)=>{let R;(0,r.alwaysValidSchema)(c,A)?a.var(g,!0):R=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},g),w>0&&a.if((0,e._)`${g} && ${u}`).assign(u,!1).assign(f,(0,e._)`[${f}, ${w}]`).else(),a.if(g,()=>{a.assign(u,!0),a.assign(f,w),R&&i.mergeEvaluated(R,e.Name)})})}}};return To.default=n,To}var So={},Hh;function AI(){if(Hh)return So;Hh=1,Object.defineProperty(So,"__esModule",{value:!0});const e=st(),r={keyword:"allOf",schemaType:"array",code(t){const{gen:n,schema:i,it:a}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=n.name("valid");i.forEach((o,c)=>{if((0,e.alwaysValidSchema)(a,o))return;const l=t.subschema({keyword:"allOf",schemaProp:c},s);t.ok(s),t.mergeEvaluated(l)})}};return So.default=r,So}var Ao={},Gh;function RI(){if(Gh)return Ao;Gh=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=Ke(),r=st(),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:c}=a;o.then===void 0&&o.else===void 0&&(0,r.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=i(c,"then"),u=i(c,"else");if(!l&&!u)return;const f=s.let("valid",!0),g=s.name("_valid");if(_(),a.reset(),l&&u){const w=s.let("ifClause");a.setParams({ifClause:w}),s.if(g,A("then",w),A("else",w))}else l?s.if(g,A("then")):s.if((0,e.not)(g),A("else"));a.pass(f,()=>a.error(!0));function _(){const w=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);a.mergeEvaluated(w)}function A(w,R){return()=>{const P=a.subschema({keyword:w},g);s.assign(f,g),a.mergeValidEvaluated(P,f),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,r.alwaysValidSchema)(a,o)}return Ao.default=n,Ao}var Ro={},zh;function wI(){if(zh)return Ro;zh=1,Object.defineProperty(Ro,"__esModule",{value:!0});const e=st(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${t}" without "if" is ignored`)}};return Ro.default=r,Ro}var Wh;function II(){if(Wh)return fo;Wh=1,Object.defineProperty(fo,"__esModule",{value:!0});const e=IS(),r=mI(),t=OS(),n=yI(),i=hI(),a=gI(),s=_I(),o=PS(),c=EI(),l=vI(),u=bI(),f=TI(),g=SI(),_=AI(),A=RI(),w=wI();function R(P=!1){const d=[u.default,f.default,g.default,_.default,A.default,w.default,s.default,o.default,a.default,c.default,l.default];return P?d.push(r.default,n.default):d.push(e.default,t.default),d.push(i.default),d}return fo.default=R,fo}var wo={},Io={},Kh;function OI(){if(Kh)return Io;Kh=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=Ke(),t={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:c,schemaCode:l,it:u}=n,{opts:f,errSchemaPath:g,schemaEnv:_,self:A}=u;if(!f.validateFormats)return;o?w():R();function w(){const P=a.scopeValue("formats",{ref:A.formats,code:f.code.formats}),d=a.const("fDef",(0,e._)`${P}[${l}]`),S=a.let("fType"),E=a.let("format");a.if((0,e._)`typeof ${d} == "object" && !(${d} instanceof RegExp)`,()=>a.assign(S,(0,e._)`${d}.type || "string"`).assign(E,(0,e._)`${d}.validate`),()=>a.assign(S,(0,e._)`"string"`).assign(E,d)),n.fail$data((0,e.or)(y(),v()));function y(){return f.strictSchema===!1?e.nil:(0,e._)`${l} && !${E}`}function v(){const I=_.$async?(0,e._)`(${d}.async ? await ${E}(${s}) : ${E}(${s}))`:(0,e._)`${E}(${s})`,N=(0,e._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${s}))`;return(0,e._)`${E} && ${E} !== true && ${S} === ${i} && !${N}`}}function R(){const P=A.formats[c];if(!P){y();return}if(P===!0)return;const[d,S,E]=v(P);d===i&&n.pass(I());function y(){if(f.strictSchema===!1){A.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${c}" ignored in schema at path "${g}"`}}function v(N){const U=N instanceof RegExp?(0,e.regexpCode)(N):f.code.formats?(0,e._)`${f.code.formats}${(0,e.getProperty)(c)}`:void 0,Q=a.scopeValue("formats",{key:c,ref:N,code:U});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,e._)`${Q}.validate`]:["string",N,Q]}function I(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${E}(${s})`}return typeof S=="function"?(0,e._)`${E}(${s})`:(0,e._)`${E}.test(${s})`}}}};return Io.default=t,Io}var Yh;function PI(){if(Yh)return wo;Yh=1,Object.defineProperty(wo,"__esModule",{value:!0});const r=[OI().default];return wo.default=r,wo}var Tn={},Qh;function NI(){return Qh||(Qh=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.contentVocabulary=Tn.metadataVocabulary=void 0,Tn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Tn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Tn}var Jh;function MI(){if(Jh)return Qs;Jh=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=tI(),r=pI(),t=II(),n=PI(),i=NI(),a=[e.default,r.default,(0,t.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Qs.default=a,Qs}var Oo={},Qi={},Xh;function CI(){if(Xh)return Qi;Xh=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.DiscrError=void 0;var e;return(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(Qi.DiscrError=e={})),Qi}var Zh;function jI(){if(Zh)return Oo;Zh=1,Object.defineProperty(Oo,"__esModule",{value:!0});const e=Ke(),r=CI(),t=Pm(),n=uu(),i=st(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:c}})=>o===r.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:o,tag:c,tagName:l}})=>(0,e._)`{error: ${o}, tag: ${l}, tagValue: ${c}}`},code(o){const{gen:c,data:l,schema:u,parentSchema:f,it:g}=o,{oneOf:_}=f;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const A=u.propertyName;if(typeof A!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const w=c.let("valid",!1),R=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(A)}`);c.if((0,e._)`typeof ${R} == "string"`,()=>P(),()=>o.error(!1,{discrError:r.DiscrError.Tag,tag:R,tagName:A})),o.ok(w);function P(){const E=S();c.if(!1);for(const y in E)c.elseIf((0,e._)`${R} === ${y}`),c.assign(w,d(E[y]));c.else(),o.error(!1,{discrError:r.DiscrError.Mapping,tag:R,tagName:A}),c.endIf()}function d(E){const y=c.name("valid"),v=o.subschema({keyword:"oneOf",schemaProp:E},y);return o.mergeEvaluated(v,e.Name),y}function S(){var E;const y={},v=N(f);let I=!0;for(let Y=0;Y<_.length;Y++){let z=_[Y];if(z!=null&&z.$ref&&!(0,i.schemaHasRulesButRef)(z,g.self.RULES)){const V=z.$ref;if(z=t.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,V),z instanceof t.SchemaEnv&&(z=z.schema),z===void 0)throw new n.default(g.opts.uriResolver,g.baseId,V)}const k=(E=z==null?void 0:z.properties)===null||E===void 0?void 0:E[A];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${A}"`);I=I&&(v||N(z)),U(k,Y)}if(!I)throw new Error(`discriminator: "${A}" must be required`);return y;function N({required:Y}){return Array.isArray(Y)&&Y.includes(A)}function U(Y,z){if(Y.const)Q(Y.const,z);else if(Y.enum)for(const k of Y.enum)Q(k,z);else throw new Error(`discriminator: "properties/${A}" must have "const" or "enum"`)}function Q(Y,z){if(typeof Y!="string"||Y in y)throw new Error(`discriminator: "${A}" values must be unique strings`);y[Y]=z}}}};return Oo.default=s,Oo}const DI="http://json-schema.org/draft-07/schema#",qI="http://json-schema.org/draft-07/schema#",LI="Core schema meta-schema",$I={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:[]}},BI=["object","boolean"],UI={$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:"#"}},kI={$schema:DI,$id:qI,title:LI,definitions:$I,type:BI,properties:UI,default:!0};var xh;function Mm(){return xh||(xh=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=r.Ajv=void 0;const t=Zw(),n=MI(),i=jI(),a=kI,s=["/properties"],o="http://json-schema.org/draft-07/schema";class c extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(A=>this.addVocabulary(A)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const A=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(A,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}r.Ajv=c,e.exports=r=c,e.exports.Ajv=c,Object.defineProperty(r,"__esModule",{value:!0}),r.default=c;var l=Ja();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Ke();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=Om();Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return f.default}});var g=uu();Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Gs,Gs.exports)),Gs.exports}var da={exports:{}},fa={exports:{}},pa={exports:{}},Po={exports:{}},eg;function VI(){return eg||(eg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=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:c}=a;a.fail(typeof o=="string"?(0,t._)`typeof ${s} != ${o}`:(0,t._)`${c}.indexOf(typeof ${s}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}r.default=i,e.exports=i})(Po,Po.exports)),Po.exports}var tg=pa.exports,rg;function FI(){return rg||(rg=1,(function(e,r){var t=tg&&tg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(VI()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(pa,pa.exports)),pa.exports}var ma={exports:{}},NS={},cu={};cu.byteLength=zI;cu.toByteArray=KI;cu.fromByteArray=JI;var Lr=[],sr=[],HI=typeof Uint8Array<"u"?Uint8Array:Array,Ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ri=0,GI=Ku.length;Ri<GI;++Ri)Lr[Ri]=Ku[Ri],sr[Ku.charCodeAt(Ri)]=Ri;sr[45]=62;sr[95]=63;function MS(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function zI(e){var r=MS(e),t=r[0],n=r[1];return(t+n)*3/4-n}function WI(e,r,t){return(r+t)*3/4-t}function KI(e){var r,t=MS(e),n=t[0],i=t[1],a=new HI(WI(e,n,i)),s=0,o=i>0?n-4:n,c;for(c=0;c<o;c+=4)r=sr[e.charCodeAt(c)]<<18|sr[e.charCodeAt(c+1)]<<12|sr[e.charCodeAt(c+2)]<<6|sr[e.charCodeAt(c+3)],a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=r&255;return i===2&&(r=sr[e.charCodeAt(c)]<<2|sr[e.charCodeAt(c+1)]>>4,a[s++]=r&255),i===1&&(r=sr[e.charCodeAt(c)]<<10|sr[e.charCodeAt(c+1)]<<4|sr[e.charCodeAt(c+2)]>>2,a[s++]=r>>8&255,a[s++]=r&255),a}function YI(e){return Lr[e>>18&63]+Lr[e>>12&63]+Lr[e>>6&63]+Lr[e&63]}function QI(e,r,t){for(var n,i=[],a=r;a<t;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(YI(n));return i.join("")}function JI(e){for(var r,t=e.length,n=t%3,i=[],a=16383,s=0,o=t-n;s<o;s+=a)i.push(QI(e,s,s+a>o?o:s+a));return n===1?(r=e[t-1],i.push(Lr[r>>2]+Lr[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(Lr[r>>10]+Lr[r>>4&63]+Lr[r<<2&63]+"=")),i.join("")}var Cm={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Cm.read=function(e,r,t,n,i){var a,s,o=i*8-n-1,c=(1<<o)-1,l=c>>1,u=-7,f=t?i-1:0,g=t?-1:1,_=e[r+f];for(f+=g,a=_&(1<<-u)-1,_>>=-u,u+=o;u>0;a=a*256+e[r+f],f+=g,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[r+f],f+=g,u-=8);if(a===0)a=1-l;else{if(a===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(_?-1:1)*s*Math.pow(2,a-n)};Cm.write=function(e,r,t,n,i,a){var s,o,c,l=a*8-i-1,u=(1<<l)-1,f=u>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,A=n?1:-1,w=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(o=isNaN(r)?1:0,s=u):(s=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?r+=g/c:r+=g*Math.pow(2,1-f),r*c>=2&&(s++,c/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(r*c-1)*Math.pow(2,i),s=s+f):(o=r*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[t+_]=o&255,_+=A,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[t+_]=s&255,_+=A,s/=256,l-=8);e[t+_-A]|=w*128};/*!
|
|
26
|
-
* The buffer module from node.js, for the browser.
|
|
27
|
-
*
|
|
28
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
29
|
-
* @license MIT
|
|
30
|
-
*/(function(e){const r=cu,t=Cm,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:o}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.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 c(){try{const C=new a(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,a.prototype),Object.setPrototypeOf(C,h),C.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(C){if(C>i)throw new RangeError('The value "'+C+'" is invalid for option "size"');const h=new a(C);return Object.setPrototypeOf(h,u.prototype),h}function u(C,h,T){if(typeof C=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return A(C)}return f(C,h,T)}u.poolSize=8192;function f(C,h,T){if(typeof C=="string")return w(C,h);if(s.isView(C))return P(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(dt(C,s)||C&&dt(C.buffer,s)||typeof o<"u"&&(dt(C,o)||C&&dt(C.buffer,o)))return d(C,h,T);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=C.valueOf&&C.valueOf();if(G!=null&&G!==C)return u.from(G,h,T);const le=S(C);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return u.from(C[Symbol.toPrimitive]("string"),h,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}u.from=function(C,h,T){return f(C,h,T)},Object.setPrototypeOf(u.prototype,a.prototype),Object.setPrototypeOf(u,a);function g(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function _(C,h,T){return g(C),C<=0?l(C):h!==void 0?typeof T=="string"?l(C).fill(h,T):l(C).fill(h):l(C)}u.alloc=function(C,h,T){return _(C,h,T)};function A(C){return g(C),l(C<0?0:E(C)|0)}u.allocUnsafe=function(C){return A(C)},u.allocUnsafeSlow=function(C){return A(C)};function w(C,h){if((typeof h!="string"||h==="")&&(h="utf8"),!u.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const T=v(C,h)|0;let G=l(T);const le=G.write(C,h);return le!==T&&(G=G.slice(0,le)),G}function R(C){const h=C.length<0?0:E(C.length)|0,T=l(h);for(let G=0;G<h;G+=1)T[G]=C[G]&255;return T}function P(C){if(dt(C,a)){const h=new a(C);return d(h.buffer,h.byteOffset,h.byteLength)}return R(C)}function d(C,h,T){if(h<0||C.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<h+(T||0))throw new RangeError('"length" is outside of buffer bounds');let G;return h===void 0&&T===void 0?G=new a(C):T===void 0?G=new a(C,h):G=new a(C,h,T),Object.setPrototypeOf(G,u.prototype),G}function S(C){if(u.isBuffer(C)){const h=E(C.length)|0,T=l(h);return T.length===0||C.copy(T,0,0,h),T}if(C.length!==void 0)return typeof C.length!="number"||Bt(C.length)?l(0):R(C);if(C.type==="Buffer"&&Array.isArray(C.data))return R(C.data)}function E(C){if(C>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return C|0}function y(C){return+C!=C&&(C=0),u.alloc(+C)}u.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==u.prototype},u.compare=function(h,T){if(dt(h,a)&&(h=u.from(h,h.offset,h.byteLength)),dt(T,a)&&(T=u.from(T,T.offset,T.byteLength)),!u.isBuffer(h)||!u.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===T)return 0;let G=h.length,le=T.length;for(let ge=0,be=Math.min(G,le);ge<be;++ge)if(h[ge]!==T[ge]){G=h[ge],le=T[ge];break}return G<le?-1:le<G?1:0},u.isEncoding=function(h){switch(String(h).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}},u.concat=function(h,T){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return u.alloc(0);let G;if(T===void 0)for(T=0,G=0;G<h.length;++G)T+=h[G].length;const le=u.allocUnsafe(T);let ge=0;for(G=0;G<h.length;++G){let be=h[G];if(dt(be,a))ge+be.length>le.length?(u.isBuffer(be)||(be=u.from(be)),be.copy(le,ge)):a.prototype.set.call(le,be,ge);else if(u.isBuffer(be))be.copy(le,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=be.length}return le};function v(C,h){if(u.isBuffer(C))return C.length;if(s.isView(C)||dt(C,s))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);const T=C.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&T===0)return 0;let le=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Ye(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return lt(C).length;default:if(le)return G?-1:Ye(C).length;h=(""+h).toLowerCase(),le=!0}}u.byteLength=v;function I(C,h,T){let G=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,h>>>=0,T<=h))return"";for(C||(C="utf8");;)switch(C){case"hex":return L(this,h,T);case"utf8":case"utf-8":return re(this,h,T);case"ascii":return q(this,h,T);case"latin1":case"binary":return j(this,h,T);case"base64":return ae(this,h,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,h,T);default:if(G)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),G=!0}}u.prototype._isBuffer=!0;function N(C,h,T){const G=C[h];C[h]=C[T],C[T]=G}u.prototype.swap16=function(){const h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;T<h;T+=2)N(this,T,T+1);return this},u.prototype.swap32=function(){const h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let T=0;T<h;T+=4)N(this,T,T+3),N(this,T+1,T+2);return this},u.prototype.swap64=function(){const h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let T=0;T<h;T+=8)N(this,T,T+7),N(this,T+1,T+6),N(this,T+2,T+5),N(this,T+3,T+4);return this},u.prototype.toString=function(){const h=this.length;return h===0?"":arguments.length===0?re(this,0,h):I.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(h){if(!u.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:u.compare(this,h)===0},u.prototype.inspect=function(){let h="";const T=e.INSPECT_MAX_BYTES;return h=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(h+=" ... "),"<Buffer "+h+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(h,T,G,le,ge){if(dt(h,a)&&(h=u.from(h,h.offset,h.byteLength)),!u.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(T===void 0&&(T=0),G===void 0&&(G=h?h.length:0),le===void 0&&(le=0),ge===void 0&&(ge=this.length),T<0||G>h.length||le<0||ge>this.length)throw new RangeError("out of range index");if(le>=ge&&T>=G)return 0;if(le>=ge)return-1;if(T>=G)return 1;if(T>>>=0,G>>>=0,le>>>=0,ge>>>=0,this===h)return 0;let be=ge-le,Qe=G-T;const gt=Math.min(be,Qe),ft=this.slice(le,ge),_t=h.slice(T,G);for(let et=0;et<gt;++et)if(ft[et]!==_t[et]){be=ft[et],Qe=_t[et];break}return be<Qe?-1:Qe<be?1:0};function U(C,h,T,G,le){if(C.length===0)return-1;if(typeof T=="string"?(G=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,Bt(T)&&(T=le?0:C.length-1),T<0&&(T=C.length+T),T>=C.length){if(le)return-1;T=C.length-1}else if(T<0)if(le)T=0;else return-1;if(typeof h=="string"&&(h=u.from(h,G)),u.isBuffer(h))return h.length===0?-1:Q(C,h,T,G,le);if(typeof h=="number")return h=h&255,typeof a.prototype.indexOf=="function"?le?a.prototype.indexOf.call(C,h,T):a.prototype.lastIndexOf.call(C,h,T):Q(C,[h],T,G,le);throw new TypeError("val must be string, number or Buffer")}function Q(C,h,T,G,le){let ge=1,be=C.length,Qe=h.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(C.length<2||h.length<2)return-1;ge=2,be/=2,Qe/=2,T/=2}function gt(_t,et){return ge===1?_t[et]:_t.readUInt16BE(et*ge)}let ft;if(le){let _t=-1;for(ft=T;ft<be;ft++)if(gt(C,ft)===gt(h,_t===-1?0:ft-_t)){if(_t===-1&&(_t=ft),ft-_t+1===Qe)return _t*ge}else _t!==-1&&(ft-=ft-_t),_t=-1}else for(T+Qe>be&&(T=be-Qe),ft=T;ft>=0;ft--){let _t=!0;for(let et=0;et<Qe;et++)if(gt(C,ft+et)!==gt(h,et)){_t=!1;break}if(_t)return ft}return-1}u.prototype.includes=function(h,T,G){return this.indexOf(h,T,G)!==-1},u.prototype.indexOf=function(h,T,G){return U(this,h,T,G,!0)},u.prototype.lastIndexOf=function(h,T,G){return U(this,h,T,G,!1)};function Y(C,h,T,G){T=Number(T)||0;const le=C.length-T;G?(G=Number(G),G>le&&(G=le)):G=le;const ge=h.length;G>ge/2&&(G=ge/2);let be;for(be=0;be<G;++be){const Qe=parseInt(h.substr(be*2,2),16);if(Bt(Qe))return be;C[T+be]=Qe}return be}function z(C,h,T,G){return Ot(Ye(h,C.length-T),C,T,G)}function k(C,h,T,G){return Ot(nt(h),C,T,G)}function V(C,h,T,G){return Ot(lt(h),C,T,G)}function ue(C,h,T,G){return Ot(Tt(h,C.length-T),C,T,G)}u.prototype.write=function(h,T,G,le){if(T===void 0)le="utf8",G=this.length,T=0;else if(G===void 0&&typeof T=="string")le=T,G=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(G)?(G=G>>>0,le===void 0&&(le="utf8")):(le=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ge=this.length-T;if((G===void 0||G>ge)&&(G=ge),h.length>0&&(G<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");let be=!1;for(;;)switch(le){case"hex":return Y(this,h,T,G);case"utf8":case"utf-8":return z(this,h,T,G);case"ascii":case"latin1":case"binary":return k(this,h,T,G);case"base64":return V(this,h,T,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,h,T,G);default:if(be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),be=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(C,h,T){return h===0&&T===C.length?r.fromByteArray(C):r.fromByteArray(C.slice(h,T))}function re(C,h,T){T=Math.min(C.length,T);const G=[];let le=h;for(;le<T;){const ge=C[le];let be=null,Qe=ge>239?4:ge>223?3:ge>191?2:1;if(le+Qe<=T){let gt,ft,_t,et;switch(Qe){case 1:ge<128&&(be=ge);break;case 2:gt=C[le+1],(gt&192)===128&&(et=(ge&31)<<6|gt&63,et>127&&(be=et));break;case 3:gt=C[le+1],ft=C[le+2],(gt&192)===128&&(ft&192)===128&&(et=(ge&15)<<12|(gt&63)<<6|ft&63,et>2047&&(et<55296||et>57343)&&(be=et));break;case 4:gt=C[le+1],ft=C[le+2],_t=C[le+3],(gt&192)===128&&(ft&192)===128&&(_t&192)===128&&(et=(ge&15)<<18|(gt&63)<<12|(ft&63)<<6|_t&63,et>65535&&et<1114112&&(be=et))}}be===null?(be=65533,Qe=1):be>65535&&(be-=65536,G.push(be>>>10&1023|55296),be=56320|be&1023),G.push(be),le+=Qe}return W(G)}const J=4096;function W(C){const h=C.length;if(h<=J)return String.fromCharCode.apply(String,C);let T="",G=0;for(;G<h;)T+=String.fromCharCode.apply(String,C.slice(G,G+=J));return T}function q(C,h,T){let G="";T=Math.min(C.length,T);for(let le=h;le<T;++le)G+=String.fromCharCode(C[le]&127);return G}function j(C,h,T){let G="";T=Math.min(C.length,T);for(let le=h;le<T;++le)G+=String.fromCharCode(C[le]);return G}function L(C,h,T){const G=C.length;(!h||h<0)&&(h=0),(!T||T<0||T>G)&&(T=G);let le="";for(let ge=h;ge<T;++ge)le+=Ut[C[ge]];return le}function H(C,h,T){const G=C.slice(h,T);let le="";for(let ge=0;ge<G.length-1;ge+=2)le+=String.fromCharCode(G[ge]+G[ge+1]*256);return le}u.prototype.slice=function(h,T){const G=this.length;h=~~h,T=T===void 0?G:~~T,h<0?(h+=G,h<0&&(h=0)):h>G&&(h=G),T<0?(T+=G,T<0&&(T=0)):T>G&&(T=G),T<h&&(T=h);const le=this.subarray(h,T);return Object.setPrototypeOf(le,u.prototype),le};function O(C,h,T){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+h>T)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(h,T,G){h=h>>>0,T=T>>>0,G||O(h,T,this.length);let le=this[h],ge=1,be=0;for(;++be<T&&(ge*=256);)le+=this[h+be]*ge;return le},u.prototype.readUintBE=u.prototype.readUIntBE=function(h,T,G){h=h>>>0,T=T>>>0,G||O(h,T,this.length);let le=this[h+--T],ge=1;for(;T>0&&(ge*=256);)le+=this[h+--T]*ge;return le},u.prototype.readUint8=u.prototype.readUInt8=function(h,T){return h=h>>>0,T||O(h,1,this.length),this[h]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(h,T){return h=h>>>0,T||O(h,2,this.length),this[h]|this[h+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(h,T){return h=h>>>0,T||O(h,2,this.length),this[h]<<8|this[h+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(h,T){return h=h>>>0,T||O(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(h,T){return h=h>>>0,T||O(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},u.prototype.readBigUInt64LE=ot(function(h){h=h>>>0,Re(h,"offset");const T=this[h],G=this[h+7];(T===void 0||G===void 0)&&Be(h,this.length-8);const le=T+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,ge=this[++h]+this[++h]*2**8+this[++h]*2**16+G*2**24;return BigInt(le)+(BigInt(ge)<<BigInt(32))}),u.prototype.readBigUInt64BE=ot(function(h){h=h>>>0,Re(h,"offset");const T=this[h],G=this[h+7];(T===void 0||G===void 0)&&Be(h,this.length-8);const le=T*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],ge=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+G;return(BigInt(le)<<BigInt(32))+BigInt(ge)}),u.prototype.readIntLE=function(h,T,G){h=h>>>0,T=T>>>0,G||O(h,T,this.length);let le=this[h],ge=1,be=0;for(;++be<T&&(ge*=256);)le+=this[h+be]*ge;return ge*=128,le>=ge&&(le-=Math.pow(2,8*T)),le},u.prototype.readIntBE=function(h,T,G){h=h>>>0,T=T>>>0,G||O(h,T,this.length);let le=T,ge=1,be=this[h+--le];for(;le>0&&(ge*=256);)be+=this[h+--le]*ge;return ge*=128,be>=ge&&(be-=Math.pow(2,8*T)),be},u.prototype.readInt8=function(h,T){return h=h>>>0,T||O(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},u.prototype.readInt16LE=function(h,T){h=h>>>0,T||O(h,2,this.length);const G=this[h]|this[h+1]<<8;return G&32768?G|4294901760:G},u.prototype.readInt16BE=function(h,T){h=h>>>0,T||O(h,2,this.length);const G=this[h+1]|this[h]<<8;return G&32768?G|4294901760:G},u.prototype.readInt32LE=function(h,T){return h=h>>>0,T||O(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},u.prototype.readInt32BE=function(h,T){return h=h>>>0,T||O(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},u.prototype.readBigInt64LE=ot(function(h){h=h>>>0,Re(h,"offset");const T=this[h],G=this[h+7];(T===void 0||G===void 0)&&Be(h,this.length-8);const le=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(G<<24);return(BigInt(le)<<BigInt(32))+BigInt(T+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),u.prototype.readBigInt64BE=ot(function(h){h=h>>>0,Re(h,"offset");const T=this[h],G=this[h+7];(T===void 0||G===void 0)&&Be(h,this.length-8);const le=(T<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(le)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+G)}),u.prototype.readFloatLE=function(h,T){return h=h>>>0,T||O(h,4,this.length),t.read(this,h,!0,23,4)},u.prototype.readFloatBE=function(h,T){return h=h>>>0,T||O(h,4,this.length),t.read(this,h,!1,23,4)},u.prototype.readDoubleLE=function(h,T){return h=h>>>0,T||O(h,8,this.length),t.read(this,h,!0,52,8)},u.prototype.readDoubleBE=function(h,T){return h=h>>>0,T||O(h,8,this.length),t.read(this,h,!1,52,8)};function D(C,h,T,G,le,ge){if(!u.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>le||h<ge)throw new RangeError('"value" argument is out of bounds');if(T+G>C.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(h,T,G,le){if(h=+h,T=T>>>0,G=G>>>0,!le){const Qe=Math.pow(2,8*G)-1;D(this,h,T,G,Qe,0)}let ge=1,be=0;for(this[T]=h&255;++be<G&&(ge*=256);)this[T+be]=h/ge&255;return T+G},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(h,T,G,le){if(h=+h,T=T>>>0,G=G>>>0,!le){const Qe=Math.pow(2,8*G)-1;D(this,h,T,G,Qe,0)}let ge=G-1,be=1;for(this[T+ge]=h&255;--ge>=0&&(be*=256);)this[T+ge]=h/be&255;return T+G},u.prototype.writeUint8=u.prototype.writeUInt8=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,1,255,0),this[T]=h&255,T+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,2,65535,0),this[T]=h&255,this[T+1]=h>>>8,T+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,2,65535,0),this[T]=h>>>8,this[T+1]=h&255,T+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,4,4294967295,0),this[T+3]=h>>>24,this[T+2]=h>>>16,this[T+1]=h>>>8,this[T]=h&255,T+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,4,4294967295,0),this[T]=h>>>24,this[T+1]=h>>>16,this[T+2]=h>>>8,this[T+3]=h&255,T+4};function Z(C,h,T,G,le){Te(h,G,le,C,T,7);let ge=Number(h&BigInt(4294967295));C[T++]=ge,ge=ge>>8,C[T++]=ge,ge=ge>>8,C[T++]=ge,ge=ge>>8,C[T++]=ge;let be=Number(h>>BigInt(32)&BigInt(4294967295));return C[T++]=be,be=be>>8,C[T++]=be,be=be>>8,C[T++]=be,be=be>>8,C[T++]=be,T}function Ee(C,h,T,G,le){Te(h,G,le,C,T,7);let ge=Number(h&BigInt(4294967295));C[T+7]=ge,ge=ge>>8,C[T+6]=ge,ge=ge>>8,C[T+5]=ge,ge=ge>>8,C[T+4]=ge;let be=Number(h>>BigInt(32)&BigInt(4294967295));return C[T+3]=be,be=be>>8,C[T+2]=be,be=be>>8,C[T+1]=be,be=be>>8,C[T]=be,T+8}u.prototype.writeBigUInt64LE=ot(function(h,T=0){return Z(this,h,T,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ot(function(h,T=0){return Ee(this,h,T,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(h,T,G,le){if(h=+h,T=T>>>0,!le){const gt=Math.pow(2,8*G-1);D(this,h,T,G,gt-1,-gt)}let ge=0,be=1,Qe=0;for(this[T]=h&255;++ge<G&&(be*=256);)h<0&&Qe===0&&this[T+ge-1]!==0&&(Qe=1),this[T+ge]=(h/be>>0)-Qe&255;return T+G},u.prototype.writeIntBE=function(h,T,G,le){if(h=+h,T=T>>>0,!le){const gt=Math.pow(2,8*G-1);D(this,h,T,G,gt-1,-gt)}let ge=G-1,be=1,Qe=0;for(this[T+ge]=h&255;--ge>=0&&(be*=256);)h<0&&Qe===0&&this[T+ge+1]!==0&&(Qe=1),this[T+ge]=(h/be>>0)-Qe&255;return T+G},u.prototype.writeInt8=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,1,127,-128),h<0&&(h=255+h+1),this[T]=h&255,T+1},u.prototype.writeInt16LE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,2,32767,-32768),this[T]=h&255,this[T+1]=h>>>8,T+2},u.prototype.writeInt16BE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,2,32767,-32768),this[T]=h>>>8,this[T+1]=h&255,T+2},u.prototype.writeInt32LE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,4,2147483647,-2147483648),this[T]=h&255,this[T+1]=h>>>8,this[T+2]=h>>>16,this[T+3]=h>>>24,T+4},u.prototype.writeInt32BE=function(h,T,G){return h=+h,T=T>>>0,G||D(this,h,T,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[T]=h>>>24,this[T+1]=h>>>16,this[T+2]=h>>>8,this[T+3]=h&255,T+4},u.prototype.writeBigInt64LE=ot(function(h,T=0){return Z(this,h,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ot(function(h,T=0){return Ee(this,h,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(C,h,T,G,le,ge){if(T+G>C.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function Se(C,h,T,G,le){return h=+h,T=T>>>0,le||_e(C,h,T,4),t.write(C,h,T,G,23,4),T+4}u.prototype.writeFloatLE=function(h,T,G){return Se(this,h,T,!0,G)},u.prototype.writeFloatBE=function(h,T,G){return Se(this,h,T,!1,G)};function Ae(C,h,T,G,le){return h=+h,T=T>>>0,le||_e(C,h,T,8),t.write(C,h,T,G,52,8),T+8}u.prototype.writeDoubleLE=function(h,T,G){return Ae(this,h,T,!0,G)},u.prototype.writeDoubleBE=function(h,T,G){return Ae(this,h,T,!1,G)},u.prototype.copy=function(h,T,G,le){if(!u.isBuffer(h))throw new TypeError("argument should be a Buffer");if(G||(G=0),!le&&le!==0&&(le=this.length),T>=h.length&&(T=h.length),T||(T=0),le>0&&le<G&&(le=G),le===G||h.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),h.length-T<le-G&&(le=h.length-T+G);const ge=le-G;return this===h&&typeof a.prototype.copyWithin=="function"?this.copyWithin(T,G,le):a.prototype.set.call(h,this.subarray(G,le),T),ge},u.prototype.fill=function(h,T,G,le){if(typeof h=="string"){if(typeof T=="string"?(le=T,T=0,G=this.length):typeof G=="string"&&(le=G,G=this.length),le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!u.isEncoding(le))throw new TypeError("Unknown encoding: "+le);if(h.length===1){const be=h.charCodeAt(0);(le==="utf8"&&be<128||le==="latin1")&&(h=be)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(T<0||this.length<T||this.length<G)throw new RangeError("Out of range index");if(G<=T)return this;T=T>>>0,G=G===void 0?this.length:G>>>0,h||(h=0);let ge;if(typeof h=="number")for(ge=T;ge<G;++ge)this[ge]=h;else{const be=u.isBuffer(h)?h:u.from(h,le),Qe=be.length;if(Qe===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(ge=0;ge<G-T;++ge)this[ge+T]=be[ge%Qe]}return this};const ne={};function ce(C,h,T){ne[C]=class extends T{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${C}]`,this.stack,delete this.name}get code(){return C}set code(le){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:le,writable:!0})}toString(){return`${this.name} [${C}]: ${this.message}`}}}ce("ERR_BUFFER_OUT_OF_BOUNDS",function(C){return C?`${C} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ce("ERR_INVALID_ARG_TYPE",function(C,h){return`The "${C}" argument must be of type number. Received type ${typeof h}`},TypeError),ce("ERR_OUT_OF_RANGE",function(C,h,T){let G=`The value of "${C}" is out of range.`,le=T;return Number.isInteger(T)&&Math.abs(T)>2**32?le=de(String(T)):typeof T=="bigint"&&(le=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(le=de(le)),le+="n"),G+=` It must be ${h}. Received ${le}`,G},RangeError);function de(C){let h="",T=C.length;const G=C[0]==="-"?1:0;for(;T>=G+4;T-=3)h=`_${C.slice(T-3,T)}${h}`;return`${C.slice(0,T)}${h}`}function me(C,h,T){Re(h,"offset"),(C[h]===void 0||C[h+T]===void 0)&&Be(h,C.length-(T+1))}function Te(C,h,T,G,le,ge){if(C>T||C<h){const be=typeof h=="bigint"?"n":"";let Qe;throw h===0||h===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 ne.ERR_OUT_OF_RANGE("value",Qe,C)}me(G,le,ge)}function Re(C,h){if(typeof C!="number")throw new ne.ERR_INVALID_ARG_TYPE(h,"number",C)}function Be(C,h,T){throw Math.floor(C)!==C?(Re(C,T),new ne.ERR_OUT_OF_RANGE("offset","an integer",C)):h<0?new ne.ERR_BUFFER_OUT_OF_BOUNDS:new ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,C)}const ze=/[^+/0-9A-Za-z-_]/g;function Ze(C){if(C=C.split("=")[0],C=C.trim().replace(ze,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function Ye(C,h){h=h||1/0;let T;const G=C.length;let le=null;const ge=[];for(let be=0;be<G;++be){if(T=C.charCodeAt(be),T>55295&&T<57344){if(!le){if(T>56319){(h-=3)>-1&&ge.push(239,191,189);continue}else if(be+1===G){(h-=3)>-1&&ge.push(239,191,189);continue}le=T;continue}if(T<56320){(h-=3)>-1&&ge.push(239,191,189),le=T;continue}T=(le-55296<<10|T-56320)+65536}else le&&(h-=3)>-1&&ge.push(239,191,189);if(le=null,T<128){if((h-=1)<0)break;ge.push(T)}else if(T<2048){if((h-=2)<0)break;ge.push(T>>6|192,T&63|128)}else if(T<65536){if((h-=3)<0)break;ge.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((h-=4)<0)break;ge.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return ge}function nt(C){const h=[];for(let T=0;T<C.length;++T)h.push(C.charCodeAt(T)&255);return h}function Tt(C,h){let T,G,le;const ge=[];for(let be=0;be<C.length&&!((h-=2)<0);++be)T=C.charCodeAt(be),G=T>>8,le=T%256,ge.push(le),ge.push(G);return ge}function lt(C){return r.toByteArray(Ze(C))}function Ot(C,h,T,G){let le;for(le=0;le<G&&!(le+T>=h.length||le>=C.length);++le)h[le+T]=C[le];return le}function dt(C,h){return C instanceof h||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===h.name}function Bt(C){return C!==C}const Ut=(function(){const C="0123456789abcdef",h=new Array(256);for(let T=0;T<16;++T){const G=T*16;for(let le=0;le<16;++le)h[G+le]=C[T]+C[le]}return h})();function ot(C){return typeof BigInt>"u"?tr:C}function tr(){throw new Error("BigInt not supported")}})(NS);const ng=NS.Buffer;var No={exports:{}},ig;function XI(){return ig||(ig=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t={Object,Array,Function,Number,String,Date,RegExp};typeof ng<"u"&&(t.Buffer=ng),typeof Promise<"u"&&(t.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:t});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(s){if(typeof s=="string"){const o=a(s);return c=>c instanceof o}if(Array.isArray(s)){const o=s.map(a);return c=>{for(const l of o)if(c 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=t[s];if(o)return o;throw new Error(`invalid "instanceof" keyword value ${s}`)}r.default=n,e.exports=n})(No,No.exports)),No.exports}var ag=ma.exports,sg;function ZI(){return sg||(sg=1,(function(e,r){var t=ag&&ag.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(XI()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(ma,ma.exports)),ma.exports}var ya={exports:{}},ha={exports:{}},Mo={},og;function CS(){if(og)return Mo;og=1,Object.defineProperty(Mo,"__esModule",{value:!0});function e(r){return()=>({keyword:r,type:"number",schemaType:"array",macro:function([n,i]){return t(n,i),r==="range"?{minimum:n,maximum:i}:{exclusiveMinimum:n,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function t(n,i){if(n>i||r==="exclusiveRange"&&n===i)throw new Error("There are no numbers in range")}}return Mo.default=e,Mo}var ug=ha.exports,cg;function xI(){return cg||(cg=1,(function(e,r){var t=ug&&ug.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const i=(0,t(CS()).default)("range");r.default=i,e.exports=i})(ha,ha.exports)),ha.exports}var lg=ya.exports,dg;function eO(){return dg||(dg=1,(function(e,r){var t=lg&&lg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(xI()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(ya,ya.exports)),ya.exports}var ga={exports:{}},_a={exports:{}},fg=_a.exports,pg;function tO(){return pg||(pg=1,(function(e,r){var t=fg&&fg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const i=(0,t(CS()).default)("exclusiveRange");r.default=i,e.exports=i})(_a,_a.exports)),_a.exports}var mg=ga.exports,yg;function rO(){return yg||(yg=1,(function(e,r){var t=mg&&mg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(tO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(ga,ga.exports)),ga.exports}var Ea={exports:{}},Co={exports:{}},Sn={},hg;function lu(){if(hg)return Sn;hg=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.usePattern=Sn.metaSchemaRef=void 0;const e=Ke(),r="http://json-schema.org/schema";function t({defaultMeta:i}={}){return i===!1?{}:{$ref:i||r}}Sn.metaSchemaRef=t;function n({gen:i,it:{opts:a}},s,o=a.unicodeRegExp?"u":""){const c=new RegExp(s,o);return i.scopeValue("pattern",{key:c.toString(),ref:c,code:(0,e._)`new RegExp(${s}, ${o})`})}return Sn.usePattern=n,Sn}var gg;function nO(){return gg||(gg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Ke(),n=lu(),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:c,schema:l}=o,u=f(l);o.pass((0,t._)`${u}.test(${c})`);function f(g){if(typeof g=="object")return(0,n.usePattern)(o,g.pattern,g.flags);const _=a.exec(g);if(_)return(0,n.usePattern)(o,_[1],_[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}r.default=s,e.exports=s})(Co,Co.exports)),Co.exports}var _g=Ea.exports,Eg;function iO(){return Eg||(Eg=1,(function(e,r){var t=_g&&_g.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(nO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Ea,Ea.exports)),Ea.exports}var va={exports:{}},jo={exports:{}},vg;function aO(){return vg||(vg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Ke(),n={trimStart:c=>c.trimStart(),trimEnd:c=>c.trimEnd(),trimLeft:c=>c.trimStart(),trimRight:c=>c.trimEnd(),trim:c=>c.trim(),toLowerCase:c=>c.toLowerCase(),toUpperCase:c=>c.toUpperCase(),toEnumCase:(c,l)=>(l==null?void 0:l.hash[o(c)])||c},i=Object.assign(a,{transform:n});function a(){return{keyword:"transform",schemaType:"array",before:"enum",code(c){const{gen:l,data:u,schema:f,parentSchema:g,it:_}=c,{parentData:A,parentDataProperty:w}=_,R=f;if(!R.length)return;let P;if(R.includes("toEnumCase")){const S=s(g);P=l.scopeValue("obj",{ref:S,code:(0,t.stringify)(S)})}l.if((0,t._)`typeof ${u} == "string" && ${A} !== undefined`,()=>{l.assign(u,d(R.slice())),l.assign((0,t._)`${A}[${w}]`,u)});function d(S){if(!S.length)return u;const E=S.pop();if(!(E in n))throw new Error(`transform: unknown transformation ${E}`);const y=l.scopeValue("func",{ref:n[E],code:(0,t._)`require("ajv-keywords/dist/definitions/transform").transform${(0,t.getProperty)(E)}`}),v=d(S);return P&&E==="toEnumCase"?(0,t._)`${y}(${v}, ${P})`:(0,t._)`${y}(${v})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function s(c){const l={hash:{}};if(!c.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const u of c.enum){if(typeof u!="string")continue;const f=o(u);if(l.hash[f])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');l.hash[f]=u}return l}function o(c){return c.toLowerCase()}r.default=i,e.exports=i})(jo,jo.exports)),jo.exports}var bg=va.exports,Tg;function sO(){return Tg||(Tg=1,(function(e,r){var t=bg&&bg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(aO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(va,va.exports)),va.exports}var ba={exports:{}},Do={exports:{}},Sg;function oO(){return Sg||(Sg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Im(),n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(s,o){const c=a(s,o);return l=>{if(l.length<=1)return!0;for(let u=0;u<s.length;u++){const f=s[u];if(c[u]){const g={};for(const _ of l){if(!_||typeof _!="object")continue;let A=_[f];if(!(A&&typeof A=="object")){if(typeof A=="string"&&(A='"'+A),g[A])return!1;g[A]=!0}}}else for(let g=l.length;g--;){const _=l[g];if(!(!_||typeof _!="object"))for(let A=g;A--;){const w=l[A];if(w&&typeof w=="object"&&t(_[f],w[f]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}r.default=i;function a(s,o){return s.map(c=>{var l,u,f;const g=(f=(u=(l=o.items)===null||l===void 0?void 0:l.properties)===null||u===void 0?void 0:u[c])===null||f===void 0?void 0:f.type;return Array.isArray(g)?!g.includes("object")&&!g.includes("array"):n.includes(g)})}e.exports=i})(Do,Do.exports)),Do.exports}var Ag=ba.exports,Rg;function uO(){return Rg||(Rg=1,(function(e,r){var t=Ag&&Ag.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(oO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(ba,ba.exports)),ba.exports}var Ta={exports:{}},qo={exports:{}},wg;function cO(){return wg||(wg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});function t(){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"]}}r.default=t,e.exports=t})(qo,qo.exports)),qo.exports}var Ig=Ta.exports,Og;function lO(){return Og||(Og=1,(function(e,r){var t=Ig&&Ig.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(cO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Ta,Ta.exports)),Ta.exports}var Sa={exports:{}},Aa={exports:{}},Lo={},Pg;function jS(){if(Pg)return Lo;Pg=1,Object.defineProperty(Lo,"__esModule",{value:!0});function e(r){return()=>({keyword:r,type:"object",schemaType:"array",macro(t){return t.length===0?!0:t.length===1?{required:t}:{[r==="anyRequired"?"anyOf":"oneOf"]:t.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return Lo.default=e,Lo}var Ng=Aa.exports,Mg;function dO(){return Mg||(Mg=1,(function(e,r){var t=Ng&&Ng.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const i=(0,t(jS()).default)("anyRequired");r.default=i,e.exports=i})(Aa,Aa.exports)),Aa.exports}var Cg=Sa.exports,jg;function fO(){return jg||(jg=1,(function(e,r){var t=Cg&&Cg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(dO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Sa,Sa.exports)),Sa.exports}var Ra={exports:{}},wa={exports:{}},Dg=wa.exports,qg;function pO(){return qg||(qg=1,(function(e,r){var t=Dg&&Dg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const i=(0,t(jS()).default)("oneRequired");r.default=i,e.exports=i})(wa,wa.exports)),wa.exports}var Lg=Ra.exports,$g;function mO(){return $g||($g=1,(function(e,r){var t=Lg&&Lg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(pO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Ra,Ra.exports)),Ra.exports}var Ia={exports:{}},$o={exports:{}},Bg;function yO(){return Bg||(Bg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Ke(),n=lu(),i={message:({params:{missingPattern:s}})=>(0,t.str)`should have property matching pattern '${s}'`,params:({params:{missingPattern:s}})=>(0,t._)`{missingPattern: ${s}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(s){const{gen:o,schema:c,data:l}=s;if(c.length===0)return;const u=o.let("valid",!0);for(const g of c)f(g);function f(g){const _=o.let("matched",!1);o.forIn("key",l,A=>{o.assign(_,(0,t._)`${(0,n.usePattern)(s,g)}.test(${A})`),o.if(_,()=>o.break())}),s.setParams({missingPattern:g}),o.assign(u,(0,t.and)(u,_)),s.pass(u)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}r.default=a,e.exports=a})($o,$o.exports)),$o.exports}var Ug=Ia.exports,kg;function hO(){return kg||(kg=1,(function(e,r){var t=Ug&&Ug.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(yO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Ia,Ia.exports)),Ia.exports}var Oa={exports:{}},Bo={exports:{}},Vg;function gO(){return Vg||(Vg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});function t(){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"}}}}r.default=t,e.exports=t})(Bo,Bo.exports)),Bo.exports}var Fg=Oa.exports,Hg;function _O(){return Hg||(Hg=1,(function(e,r){var t=Fg&&Fg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(gO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Oa,Oa.exports)),Oa.exports}var Pa={exports:{}},Uo={exports:{}},Gg;function EO(){return Gg||(Gg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=lu();function n(s){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(o){const c=[];for(const l in o)c.push(i(l,o[l]));return{allOf:c}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,t.metaSchemaRef)(s)}}}r.default=n;function i(s,o){const c=s.split("/"),l={};let u=l;for(let f=1;f<c.length;f++){let g=c[f];const _=f===c.length-1;g=a(g);const A=u.properties={};let w;if(/[0-9]+/.test(g)){let R=+g;for(w=u.items=[],u.type=["object","array"];R--;)w.push({})}else u.type="object";u=_?o:{},A[g]=u,w&&w.push(u)}return l}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Uo,Uo.exports)),Uo.exports}var zg=Pa.exports,Wg;function vO(){return Wg||(Wg=1,(function(e,r){var t=zg&&zg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(EO()),i=(a,s)=>a.addKeyword((0,n.default)(s));r.default=i,e.exports=i})(Pa,Pa.exports)),Pa.exports}var Na={exports:{}},ko={exports:{}},Kg;function bO(){return Kg||(Kg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Ke();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(a){const{schema:s,data:o}=a,c=s.map(u=>(0,t._)`(${l(u)}) === undefined`);a.fail((0,t.or)(...c));function l(u){if(u==="")throw new Error("empty JSON pointer not allowed");const f=u.split("/");let g=o;const _=f.map((A,w)=>w?g=(0,t._)`${g}${(0,t.getProperty)(i(A))}`:g);return(0,t.and)(..._)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}r.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(ko,ko.exports)),ko.exports}var Yg=Na.exports,Qg;function TO(){return Qg||(Qg=1,(function(e,r){var t=Yg&&Yg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(bO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Na,Na.exports)),Na.exports}var Ma={exports:{}},Vo={exports:{}},Jg;function SO(){return Jg||(Jg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t={},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:u=>{var f;const g=(f=u==null?void 0:u.max)!==null&&f!==void 0?f:2;return()=>Math.floor(Math.random()*g)},seq:u=>{var f;const g=(f=u==null?void 0:u.name)!==null&&f!==void 0?f:"";return t[g]||(t[g]=0),()=>t[g]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(u,f,g){if(!g.opts.useDefaults||g.compositeRule)return()=>!0;const _={};for(const w in u)_[w]=s(u[w]);const A=g.opts.useDefaults==="empty";return w=>{for(const R in u)(w[R]===void 0||A&&(w[R]===null||w[R]===""))&&(w[R]=_[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(u){return typeof u=="object"?o(u):c(u)}function o({func:u,args:f}){const g=n[u];return l(u,g),g(f)}function c(u=""){const f=n[u];return l(u,f),f()}function l(u,f){if(!f)throw new Error(`invalid "dynamicDefaults" keyword property value: ${u}`)}r.default=i,e.exports=i})(Vo,Vo.exports)),Vo.exports}var Xg=Ma.exports,Zg;function AO(){return Zg||(Zg=1,(function(e,r){var t=Xg&&Xg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(SO()),i=a=>a.addKeyword((0,n.default)());r.default=i,e.exports=i})(Ma,Ma.exports)),Ma.exports}var Ca={exports:{}},Fo={exports:{}},xg;function RO(){return xg||(xg=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Ke(),n=lu(),i={message:({params:{schemaProp:s}})=>s?(0,t.str)`should match case "${s}" schema`:(0,t.str)`should match default case schema`,params:({params:{schemaProp:s}})=>s?(0,t._)`{failingCase: ${s}}`:(0,t._)`{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(c){const{gen:l,schemaCode:u,parentSchema:f}=c;c.block$data(t.nil,()=>{const g=l.let("valid",!0),_=l.name("_valid"),A=l.const("value",(0,t._)`${u} === null ? "null" : ${u}`);l.if(!1);for(const w in f.selectCases){c.setParams({schemaProp:w}),l.elseIf((0,t._)`"" + ${A} == ${w}`);const R=c.subschema({keyword:"selectCases",schemaProp:w},_);c.mergeEvaluated(R,t.Name),l.assign(g,_)}if(l.else(),f.selectDefault!==void 0){c.setParams({schemaProp:void 0});const w=c.subschema({keyword:"selectDefault"},_);c.mergeEvaluated(w,t.Name),l.assign(g,_)}l.endIf(),c.pass(g)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}r.default=a,e.exports=a})(Fo,Fo.exports)),Fo.exports}var e_=Ca.exports,t_;function wO(){return t_||(t_=1,(function(e,r){var t=e_&&e_.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(RO()),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);r.default=i,e.exports=i})(Ca,Ca.exports)),Ca.exports}var r_=fa.exports,n_;function IO(){return n_||(n_=1,(function(e,r){var t=r_&&r_.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(FI()),i=t(ZI()),a=t(eO()),s=t(rO()),o=t(iO()),c=t(sO()),l=t(uO()),u=t(lO()),f=t(fO()),g=t(mO()),_=t(hO()),A=t(_O()),w=t(vO()),R=t(TO()),P=t(AO()),d=t(wO()),S={typeof:n.default,instanceof:i.default,range:a.default,exclusiveRange:s.default,regexp:o.default,transform:c.default,uniqueItemProperties:l.default,allRequired:u.default,anyRequired:f.default,oneRequired:g.default,patternRequired:_.default,prohibited:A.default,deepProperties:w.default,deepRequired:R.default,dynamicDefaults:P.default,select:d.default};r.default=S,e.exports=S})(fa,fa.exports)),fa.exports}var i_=da.exports,a_;function DS(){return a_||(a_=1,(function(e,r){var t=i_&&i_.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(r,"__esModule",{value:!0});const n=t(IO()),i=(s,o)=>{if(Array.isArray(o)){for(const c of o)a(c)(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}r.default=i,e.exports=i,e.exports.default=i})(da,da.exports)),da.exports}var Ho={exports:{}},s_;function qS(){return s_||(s_=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=Mm(),n=Ke(),i=Ba(),a=Ja(),s=Qa(),o=xr(),c="errorMessage",l=new t.Name("emUsed"),u={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,g=/\$\{([^}]+)\}/g,_=/^""\s*\+\s*|\s*\+\s*""$/g;function A(R){return{keyword:c,schemaType:["string","object"],post:!0,code(P){const{gen:d,data:S,schema:E,schemaValue:y,it:v}=P;if(v.createErrors===!1)return;const I=E,N=n.strConcat(o.default.instancePath,v.errorPath);d.if(t._`${o.default.errors} > 0`,()=>{if(typeof I=="object"){const[H,O]=Q(I);O&&Y(O),H&&z(H),k(U(I))}const L=typeof I=="string"?I:I._;L&&V(L),R.keepErrors||ue()});function U({properties:L,items:H}){const O={};if(L){O.props={};for(const D in L)O.props[D]=[]}if(H){O.items={};for(let D=0;D<H.length;D++)O.items[D]=[]}return O}function Q(L){let H,O;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 O||(O={}),O[D]=[]}return[H,O]}function Y(L){const H=d.const("emErrors",t.stringify(L)),O=d.const("templates",W(L,E));d.forOf("err",o.default.vErrors,_e=>d.if(ae(_e,H),()=>d.code(t._`${H}[${_e}.keyword].push(${_e})`).assign(t._`${_e}.${l}`,!0)));const{singleError:D}=R;if(D){const _e=d.let("message",t._`""`),Se=d.let("paramsErrors",t._`[]`);Z(Ae=>{d.if(_e,()=>d.code(t._`${_e} += ${typeof D=="string"?D:";"}`)),d.code(t._`${_e} += ${Ee(Ae)}`),d.assign(Se,t._`${Se}.concat(${H}[${Ae}])`)}),s.reportError(P,{message:_e,params:t._`{errors: ${Se}}`})}else Z(_e=>s.reportError(P,{message:Ee(_e),params:t._`{errors: ${H}[${_e}]}`}));function Z(_e){d.forIn("key",H,Se=>d.if(t._`${H}[${Se}].length`,()=>_e(Se)))}function Ee(_e){return t._`${_e} in ${O} ? ${O}[${_e}]() : ${y}[${_e}]`}}function z(L){const H=d.const("emErrors",t.stringify(L)),O=[];for(const Se in L)O.push([Se,W(L[Se],E[Se])]);const D=d.const("templates",d.object(...O)),Z=d.scopeValue("obj",{ref:u,code:t.stringify(u)}),Ee=d.let("emPropParams"),_e=d.let("emParamsErrors");d.forOf("err",o.default.vErrors,Se=>d.if(ae(Se,H),()=>{d.assign(Ee,t._`${Z}[${Se}.keyword]`),d.assign(_e,t._`${H}[${Se}.keyword][${Se}.params[${Ee}]]`),d.if(_e,()=>d.code(t._`${_e}.push(${Se})`).assign(t._`${Se}.${l}`,!0))})),d.forIn("key",H,Se=>d.forIn("keyProp",t._`${H}[${Se}]`,Ae=>{d.assign(_e,t._`${H}[${Se}][${Ae}]`),d.if(t._`${_e}.length`,()=>{const ne=d.const("tmpl",t._`${D}[${Se}] && ${D}[${Se}][${Ae}]`);s.reportError(P,{message:t._`${ne} ? ${ne}() : ${y}[${Se}][${Ae}]`,params:t._`{errors: ${_e}}`})})}))}function k(L){const{props:H,items:O}=L;if(!H&&!O)return;const D=t._`typeof ${S} == "object"`,Z=t._`Array.isArray(${S})`,Ee=d.let("emErrors");let _e,Se;const Ae=d.let("templates");H&&O?(_e=d.let("emChildKwd"),d.if(D),d.if(Z,()=>{ne(O,E.items),d.assign(_e,t.str`items`)},()=>{ne(H,E.properties),d.assign(_e,t.str`properties`)}),Se=t._`[${_e}]`):O?(d.if(Z),ne(O,E.items),Se=t._`.items`):H&&(d.if(n.and(D,n.not(Z))),ne(H,E.properties),Se=t._`.properties`),d.forOf("err",o.default.vErrors,ce=>re(ce,Ee,de=>d.code(t._`${Ee}[${de}].push(${ce})`).assign(t._`${ce}.${l}`,!0))),d.forIn("key",Ee,ce=>d.if(t._`${Ee}[${ce}].length`,()=>{s.reportError(P,{message:t._`${ce} in ${Ae} ? ${Ae}[${ce}]() : ${y}${Se}[${ce}]`,params:t._`{errors: ${Ee}[${ce}]}`}),d.assign(t._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,t._`${N} + "/" + ${ce}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),d.endIf();function ne(ce,de){d.assign(Ee,t.stringify(ce)),d.assign(Ae,W(ce,de))}}function V(L){const H=d.const("emErrs",t._`[]`);d.forOf("err",o.default.vErrors,O=>d.if(J(O),()=>d.code(t._`${H}.push(${O})`).assign(t._`${O}.${l}`,!0))),d.if(t._`${H}.length`,()=>s.reportError(P,{message:q(L),params:t._`{errors: ${H}}`}))}function ue(){const L=d.const("emErrs",t._`[]`);d.forOf("err",o.default.vErrors,H=>d.if(t._`!${H}.${l}`,()=>d.code(t._`${L}.push(${H})`))),d.assign(o.default.vErrors,L).assign(o.default.errors,t._`${L}.length`)}function ae(L,H){return n.and(t._`${L}.keyword !== ${c}`,t._`!${L}.${l}`,t._`${L}.instancePath === ${N}`,t._`${L}.keyword in ${H}`,t._`${L}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,t._`/^\\/[^\\/]*$/.test(${L}.schemaPath.slice(${v.errSchemaPath.length}))`)}function re(L,H,O){d.if(n.and(t._`${L}.keyword !== ${c}`,t._`!${L}.${l}`,t._`${L}.instancePath.indexOf(${N}) === 0`),()=>{const D=d.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:t._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Z=d.const("emMatches",t._`${D}.exec(${L}.instancePath.slice(${N}.length))`),Ee=d.const("emChild",t._`${Z} && ${Z}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);d.if(t._`${Ee} !== undefined && ${Ee} in ${H}`,()=>O(Ee))})}function J(L){return n.and(t._`${L}.keyword !== ${c}`,t._`!${L}.${l}`,n.or(t._`${L}.instancePath === ${N}`,n.and(t._`${L}.instancePath.indexOf(${N}) === 0`,t._`${L}.instancePath[${N}.length] === "/"`)),t._`${L}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,t._`${L}.schemaPath[${v.errSchemaPath}.length] === "/"`)}function W(L,H){const O=[];for(const D in L){const Z=H[D];f.test(Z)&&O.push([D,j(Z)])}return d.object(...O)}function q(L){return f.test(L)?new i._Code(i.safeStringify(L).replace(g,(H,O)=>`" + JSON.stringify(${a.getData(O,v)}) + "`).replace(_,"")):t.stringify(L)}function j(L){return t._`function(){return ${q(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,P={})=>{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(A(P))};r.default=w,e.exports=w,e.exports.default=w})(Ho,Ho.exports)),Ho.exports}var o_;function Ie(){if(o_)return cr;o_=1;var e=cr&&cr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.validateType=cr.generateLazyValidator=cr.Ajv=void 0;const r=e(Mm());cr.Ajv=r.default;const t=e(DS()),n=e(qS());function i(s,o){let c=null;const l=(u,f)=>{if(!c){const g=new r.default({$data:!0,allErrors:!0});(0,t.default)(g),(0,n.default)(g,{singleError:!0}),o==null||o.forEach(_=>g.addKeyword(_)),c=g.compile(s),Object.defineProperty(l,"errors",{get(){return c==null?void 0:c.errors}})}return c(u,f)};return l}cr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return cr.validateType=a,cr}var u_;function OO(){return u_||(u_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const r=Ie();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Lu)),Lu}var Yu={},c_;function PO(){return c_||(c_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const r=Ie();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Yu)),Yu}var l_;function NO(){return l_||(l_=1,(function(e){var r=En&&En.__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]})),t=En&&En.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(OO(),e),t(PO(),e)})(En)),En}var An={},Qu={},d_;function MO(){return d_||(d_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const r=Ie();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(Qu)),Qu}var Ju={},Xu={},f_;function du(){return f_||(f_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const r=Ie();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},a={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function s(u){return n[u]}t.getMaxSupply=s;function o(u){return a[u]}t.getColor=o;function c(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=c;function l(u){return[i[u],a[u]]}t.getGradient=l})(e.Rarity||(e.Rarity={}))})(Xu)),Xu}var Zu={},p_;function mi(){return p_||(p_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const r=Ie();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Zu)),Zu}var xu={},m_;function fu(){return m_||(m_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=void 0;const r=Ie();var t;(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,r.generateLazyValidator)(n.schema)})(t=e.SpringBoneParams||(e.SpringBoneParams={})),(function(n){n.schema={type:"object",properties:{version:{type:"integer",enum:[1]},models:{type:"object",additionalProperties:{type:"object",additionalProperties:t.schema,required:[]},required:[]}},required:["version","models"],additionalProperties:!1},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.SpringBonesData||(e.SpringBonesData={}))})(xu)),xu}var ec={},tc={},y_;function jm(){return y_||(y_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const r=Ie();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(tc)),tc}var rc={},nc={},h_;function LS(){return h_||(h_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const r=Ie();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(nc)),nc}var g_;function Dm(){return g_||(g_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const r=mi(),t=Ie(),n=LS();(function(i){i.schema={oneOf:[Object.assign({},r.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(rc)),rc}var __;function qm(){return __||(__=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const r=Ie(),t=jm(),n=Dm();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.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,r.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(ec)),ec}var Rn={},wn={},ic={},ac={},E_;function yi(){return E_||(E_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const r=Ie();(function(t){t.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,r.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(ac)),ac}var v_;function $S(){return v_||(v_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const r=mi(),t=yi(),n=Ie();var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},c.validate=(0,n.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:r.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},c.validate=(0,n.generateLazyValidator)(c.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(c.schema.pattern,"i");c.validate=u=>l.test(u)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},t.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:t.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},c.validate=(0,n.generateLazyValidator)(c.schema)})(e.Avatar||(e.Avatar={}))})(ic)),ic}var sc={},b_;function CO(){return b_||(b_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const r=Ie(),t=$S();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(sc)),sc}var T_;function jO(){return T_||(T_=1,(function(e){var r=wn&&wn.__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]})),t=wn&&wn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t($S(),e),t(CO(),e)})(wn)),wn}var oc={},uc={},S_;function BS(){return S_||(S_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const r=Ie();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.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:[]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(uc)),uc}var cc={},A_;function US(){return A_||(A_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const r=Ie();(function(t){t.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:[]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(cc)),cc}var lc={},R_;function kS(){return R_||(R_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const r=Ie();(function(t){t.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"]},t.schemaValidator=(0,r.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(lc)),lc}var dc={},Ji={},w_;function Lm(){return w_||(w_=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.displayableProperties=void 0,Ji.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ji}var fc={},I_;function VS(){return I_||(I_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const r=Ie();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(fc)),fc}var pc={},O_;function FS(){return O_||(O_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const r=Ie();(function(t){t.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"]}}},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(pc)),pc}var P_;function DO(){return P_||(P_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const r=Ie(),t=Lm(),n=BS(),i=kS(),a=VS(),s=FS(),o=US();var c;(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"})(c=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},t.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(c)},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:c.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,r.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(dc)),dc}var N_;function qO(){return N_||(N_=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 r=BS();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return r.FeatureToggles}});var t=US();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=kS();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=DO();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=VS();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=FS();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(oc)),oc}var In={},mc={},yc={},M_;function HS(){return M_||(M_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const r=Ie();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(yc)),yc}var C_;function GS(){return C_||(C_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const r=Ie(),t=HS();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(mc)),mc}var hc={},j_;function zS(){return j_||(j_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const r=Ie();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(hc)),hc}var gc={},D_;function $m(){return D_||(D_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const r=du(),t=Ie();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:r.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})(gc)),gc}var _c={},On={},Ec={},q_;function LO(){return q_||(q_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const r=Ie();(function(t){t.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},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Ec)),Ec}var L_;function WS(){return L_||(L_=1,(function(e){var r=On&&On.__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]})),t=On&&On.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(LO(),e)})(On)),On}var vc={},$_;function Bm(){return $_||($_=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 r=Ie();var t;(function(f){f.SINGLE="single",f.ANY="any",f.MULTIPLE="multiple",f.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(f){f.MAINNET="mainnet",f.BASE_MAINNET="base_mainnet",f.BASE_SEPOLIA="base_sepolia",f.MONAD_MAINNET="monad_mainnet",f.MONAD_TESTNET="monad_testnet",f.APE_MAINNET="ape_mainnet",f.APE_CALDERA="ape_caldera",f.MATIC="matic",f.SEPOLIA="sepolia",f.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(f){f._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(_,A){if(!A||!A.from||!A.to)return!1;let{to:w,from:R}=A;return(typeof R!="bigint"||typeof w!="bigint")&&(R=BigInt(R),w=BigInt(w)),R<=w},errors:!1},f.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},f.validate=(0,r.generateLazyValidator)(f.schema,[f._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var c;(function(f){f.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},f.validate=(0,r.generateLazyValidator)(f.schema,[s._fromLessThanOrEqualTo])})(c=e.Mapping||(e.Mapping={})),(function(f){f._isMappingsValid={keyword:"_isMappingsValid",validate:function(_,A){try{u(A)}catch{return!1}return!0},errors:!1},f.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:c.schema}},minProperties:1,required:[],additionalProperties:!1};const g=Object.values(n).reduce((_,A)=>(_[A]=f.innerSchema,_),{});f.schema={type:"object",properties:g,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},f.validate=(0,r.generateLazyValidator)(f.schema,[s._fromLessThanOrEqualTo,f._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(g,_,A){super(g),this.existingMapping=_,this.conflictingMapping=A}}e.AddMappingError=l;function u(f={}){const g={};for(const[y,v]of Object.entries(f)){g[y]={};for(const[I,N]of Object.entries(v))for(const U of N)S(y,I,U)}function _(){return JSON.parse(JSON.stringify(g))}function A(y,v,I){const N=BigInt(y);return N>=BigInt(v)&&N<=BigInt(I)}function w(y,v){switch(v.type){case t.SINGLE:return y.id===v.id;case t.MULTIPLE:return v.ids.includes(y.id);case t.RANGE:return A(y.id,v.from,v.to);default:return!1}}function R(y,v){switch(v.type){case t.SINGLE:return y.ids.includes(v.id);case t.MULTIPLE:return y.ids.some(I=>v.ids.includes(I));case t.RANGE:return y.ids.some(I=>A(I,v.from,v.to));default:return!1}}function P(y,v){switch(v.type){case t.SINGLE:return A(v.id,y.from,y.to);case t.MULTIPLE:return v.ids.some(I=>A(I,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(v.to)&&BigInt(y.to)>=BigInt(v.from)}}function d(y,v){if(y.type===t.ANY||v.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return w(y,v);case t.MULTIPLE:return R(y,v);case t.RANGE:return P(y,v)}}function S(y,v,I){var N,U;const Q=v.toLowerCase();g[y]=(N=g[y])!==null&&N!==void 0?N:{},g[y][Q]=(U=g[y][Q])!==null&&U!==void 0?U:[];for(const Y of g[y][Q])if(d(Y,I))throw new l(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,Y,I);g[y][Q].push(I)}function E(y,v,I){var N;return!((N=g[y])===null||N===void 0)&&N[v]?g[y][v].some(U=>{switch(U.type){case t.SINGLE:return U.id===I;case t.ANY:return!0;case t.MULTIPLE:return U.ids.includes(I);case t.RANGE:return BigInt(I)>=BigInt(U.from)&&BigInt(I)<=BigInt(U.to)}}):!1}return{addMapping:S,getMappings:_,includesNft:E}}e.createMappingsHelper=u})(vc)),vc}var B_;function Um(){return B_||(B_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const r=Ie(),t=WS(),n=Bm();e.schema={type:"object",properties:{merkleProof:t.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,c){var l;const u=c;return!((l=u==null?void 0:u.merkleProof)===null||l===void 0)&&l.hashingKeys?u.merkleProof.hashingKeys.every(f=>u.hasOwnProperty(f)):!1},errors:!1},a=(0,r.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(_c)),_c}var bc={},Tc={},dr={},U_;function KS(){if(U_)return dr;U_=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.isBaseEmote=dr.isBaseAvatar=dr.requiredBaseItemProps=dr.baseItemProperties=void 0;const e=GS(),r=zS(),t=Lm();dr.baseItemProperties=Object.assign(Object.assign({},t.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({},r.Metrics.schema),{nullable:!0})}),dr.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",c=s[3]==="base-avatars";return s.length===5&&o&&c}dr.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 dr.isBaseEmote=i,dr}var k_;function $O(){return k_||(k_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const r=Ie(),t=mi(),n=qm(),i=KS(),a=$m(),s=Um(),o=Dm(),c=Bm(),l=fu();(function(u){u.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:t.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 f={keyword:"_isThirdParty",validate:(_,A)=>!_||(0,s.isThirdParty)(A),errors:!1},g={keyword:"_isBaseAvatar",validate:(_,A)=>!_||(0,i.isBaseAvatar)(A),errors:!1};u.validate=(0,r.generateLazyValidator)(u.schema,[f,g,c.RangeMapping._fromLessThanOrEqualTo,c.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Tc)),Tc}var V_;function BO(){return V_||(V_=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 r=qm();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return r.WearableRepresentation}});var t=$O();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=mi();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=LS();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Dm();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}});var s=fu();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return s.SpringBoneParams}}),Object.defineProperty(e,"SpringBonesData",{enumerable:!0,get:function(){return s.SpringBonesData}})})(bc)),bc}var Sc={},Ac={},Rc={},wc={},F_;function YS(){return F_||(F_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const r=Ie();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(wc)),wc}var Ic={},H_;function QS(){return H_||(H_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const r=Ie(),t=jm();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.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,r.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Ic)),Ic}var Oc={},G_;function JS(){return G_||(G_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const r=Ie();var t;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,r.generateLazyValidator)(i.schema)})(t=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,r.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"},[t.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[t.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",t.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[t.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,r.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(t).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,r.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Oc)),Oc}var z_;function XS(){return z_||(z_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const r=YS(),t=Ie(),n=QS(),i=JS();(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:r.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,t.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Rc)),Rc}var W_;function UO(){return W_||(W_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const r=ZS(),t=Ie(),n=KS(),i=$m(),a=Um(),s=XS();(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 c={keyword:"_isThirdParty",validate:(u,f)=>!u||(0,r.isThirdParty)(f),errors:!1},l={keyword:"_isBaseEmote",validate:(u,f)=>!u||(0,n.isBaseEmote)(f),errors:!1};o.validate=(0,t.generateLazyValidator)(o.schema,[c,l,r.RangeMapping._fromLessThanOrEqualTo,r.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Ac)),Ac}var Pc={},K_;function kO(){return K_||(K_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const r=Ie();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Pc)),Pc}var Nc={},Y_;function VO(){return Y_||(Y_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const r=Ie();(function(t){t.SIMPLE_OUTCOME="so",t.MULTIPLE_OUTCOME="mo",t.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Nc)),Nc}var Q_;function FO(){return Q_||(Q_=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 r=UO();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return r.Emote}});var t=QS();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=XS();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=JS();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=YS();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=kO();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=VO();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Sc)),Sc}var J_;function ZS(){return J_||(J_=1,(function(e){var r=In&&In.__createBinding||(Object.create?(function(l,u,f,g){g===void 0&&(g=f);var _=Object.getOwnPropertyDescriptor(u,f);(!_||("get"in _?!u.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,g,_)}):(function(l,u,f,g){g===void 0&&(g=f),l[g]=u[f]})),t=In&&In.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=GS();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=HS();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=zS();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=jm();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=$m();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var c=Um();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),t(Bm(),e),t(BO(),e),t(FO(),e)})(In)),In}var Mc={},Cc={},X_;function Xa(){return X_||(X_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const r=Ie();var t;(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"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,r.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Cc)),Cc}var Z_;function HO(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const r=yi(),t=Xa(),n=Ie();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:r.IPFSv1.schema}},{properties:{entityId:r.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:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:r.IPFSv1.schema}},{properties:{entityId:r.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Mc)),Mc}var jc={},Dc={},x_;function xS(){return x_||(x_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const r=yi(),t=Ie();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[r.IPFSv1.schema,r.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Dc)),Dc}var eE;function eA(){return eE||(eE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const r=yi(),t=xS(),n=Ie();(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:[r.IPFSv1.schema,r.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.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={}))})(jc)),jc}var qc={},tE;function GO(){return tE||(tE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const r=Xa(),t=Ie();(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:r.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(qc)),qc}var Pn={},Lc={},rE;function zO(){return rE||(rE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const r=mi(),t=yi(),n=Ie();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:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:r.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={}))})(Lc)),Lc}var nE;function WO(){return nE||(nE=1,(function(e){var r=Pn&&Pn.__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]})),t=Pn&&Pn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(zO(),e)})(Pn)),Pn}var Nn={},$c={},iE;function tA(){return iE||(iE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(r){r.BADGE_GRANTED="badge_granted",r.BID_ACCEPTED="bid_accepted",r.BID_RECEIVED="bid_received",r.EVENTS_STARTED="events_started",r.EVENTS_STARTS_SOON="events_starts_soon",r.EVENT_CREATED="event_created",r.EVENT_APPROVED="event_approved",r.EVENT_REJECTED="event_rejected",r.EVENT_DELETED="event_deleted",r.GOVERNANCE_ANNOUNCEMENT="governance_announcement",r.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",r.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",r.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",r.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",r.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",r.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",r.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",r.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",r.GOVERNANCE_TENDER_PASSED="governance_tender_passed",r.GOVERNANCE_WHALE_VOTE="governance_whale_vote",r.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",r.ITEM_SOLD="item_sold",r.ITEM_PUBLISHED="item_published",r.LAND_RENTAL_ENDED="rental_ended",r.LAND_RENTED="rental_started",r.REWARD_ASSIGNED="reward_assignment",r.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",r.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",r.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",r.REWARD_DELAYED="reward_delayed",r.REWARD_IN_PROGRESS="reward_in_progress",r.ROYALTIES_EARNED="royalties_earned",r.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",r.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",r.WORLDS_ACCESS_RESTORED="worlds_access_restored",r.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",r.WORLDS_MISSING_RESOURCES="worlds_missing_resources",r.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",r.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",r.CREDITS_GOAL_COMPLETED="credits_goal_completed",r.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",r.STREAMING_KEY_RESET="streaming_key_reset",r.STREAMING_KEY_REVOKE="streaming_key_revoke",r.STREAMING_KEY_EXPIRED="streaming_key_expired",r.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",r.STREAMING_PLACE_UPDATED="streaming_place_updated",r.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",r.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",r.CREDITS_REMINDER_USAGE="credits_reminder_usage",r.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",r.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",r.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",r.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",r.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",r.COMMUNITY_DELETED="community_deleted",r.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",r.COMMUNITY_RENAMED="community_renamed",r.COMMUNITY_MEMBER_BANNED="community_member_banned",r.COMMUNITY_MEMBER_REMOVED="community_member_removed",r.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",r.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",r.COMMUNITY_INVITE_RECEIVED="community_invite_received",r.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",r.COMMUNITY_POST_ADDED="community_post_added",r.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",r.USER_BANNED_FROM_SCENE="user_banned_from_scene",r.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",r.TRANSFER_RECEIVED="transfer_received",r.TIP_RECEIVED="tip_received",r.BANNED="banned",r.BAN_WARNING="ban_warning",r.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(r){r.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})($c)),$c}var Bc={},Uc={},aE;function rA(){return aE||(aE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const r=Ie(),t=tA(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.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(t.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Uc)),Uc}var kc={},sE;function nA(){return sE||(sE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(r){r.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(r.schema.pattern);r.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(kc)),kc}var oE;function KO(){return oE||(oE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const r=Ie(),t=rA(),n=yi(),i=nA();(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:t.SubscriptionDetails.schema}},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(Bc)),Bc}var uE;function YO(){return uE||(uE=1,(function(e){var r=Nn&&Nn.__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]})),t=Nn&&Nn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(tA(),e),t(KO(),e),t(rA(),e)})(Nn)),Nn}var Mn={},Vc={},cE;function Qt(){return cE||(cE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(r){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.WEB="web",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service",t.CREDITS_SERVICE="credits-service",t.STREAMING="streaming",t.COMMS="comms",t.REFERRAL="referral",t.COMMUNITY="community",t.CAMERA="camera",t.EVENT="event",t.GOVERNANCE="governance",t.MODERATION="moderation"})(r.Type||(r.Type={})),(function(t){(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"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.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"})(t.Worlds||(t.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"})(t.Client||(t.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(t.Web||(t.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"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.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"})(t.CreditsService||(t.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"})(t.Streaming||(t.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"})(t.Comms||(t.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(t.Referral||(t.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"})(t.Community||(t.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(t.Camera||(t.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"})(t.Event||(t.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"})(t.Governance||(t.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(t.Moderation||(t.Moderation={}))})(r.SubType||(r.SubType={}))})(e.Events||(e.Events={}))})(Vc)),Vc}var Fc={},lE;function QO(){return lE||(lE=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 r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(Fc)),Fc}var Hc={},dE;function JO(){return dE||(dE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const r=Xa(),t=Ie(),n=eA(),i=Qt();(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:r.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Hc)),Hc}var Gc={},fE;function XO(){return fE||(fE=1,Object.defineProperty(Gc,"__esModule",{value:!0})),Gc}var zc={},pE;function ZO(){return pE||(pE=1,Object.defineProperty(zc,"__esModule",{value:!0})),zc}var Wc={},mE;function xO(){return mE||(mE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Wc)),Wc}var Kc={},Xi={},yE;function pu(){if(yE)return Xi;yE=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.createEventSchema=void 0;function e(r,t,n){return{type:"object",properties:{type:{type:"string",const:r},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Xi.createEventSchema=e,Xi}var hE;function eP(){return hE||(hE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const r=Ie(),t=Qt(),n=pu(),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)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Kc)),Kc}var Yc={},gE;function tP(){return gE||(gE=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 r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Yc)),Yc}var Qc={},_E;function rP(){return _E||(_E=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const r=Ie(),t=Qt(),n=pu(),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)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(Qc)),Qc}var Jc={},EE;function nP(){return EE||(EE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const r=Ie(),t=Qt();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:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(Jc)),Jc}var Xc={},vE;function iP(){return vE||(vE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const r=Ie(),t=Qt(),n=pu(),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)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(Xc)),Xc}var Zc={},bE;function aP(){return bE||(bE=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 r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(Zc)),Zc}var xc={},TE;function sP(){return TE||(TE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(xc)),xc}var el={},SE;function oP(){return SE||(SE=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 r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventApprovedEvent||(e.EventApprovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventRejectedEvent||(e.EventRejectedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventDeletedEvent||(e.EventDeletedEvent={}))})(el)),el}var tl={},AE;function uP(){return AE||(AE=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 r=Ie(),t=Qt(),n=pu(),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)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(tl)),tl}var rl={},RE;function cP(){return RE||(RE=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 r=Xa(),t=Ie(),n=Qt();(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,t.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,t.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,t.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:r.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,t.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,t.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,t.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,t.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,t.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,t.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(rl)),rl}var nl={},wE;function lP(){return wE||(wE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const r=Ie(),t=Qt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(nl)),nl}var IE;function dP(){return IE||(IE=1,(function(e){var r=Mn&&Mn.__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]})),t=Mn&&Mn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(Qt(),e),t(QO(),e),t(JO(),e),t(XO(),e),t(ZO(),e),t(xO(),e),t(eP(),e),t(tP(),e),t(rP(),e),t(nP(),e),t(iP(),e),t(aP(),e),t(sP(),e),t(oP(),e),t(uP(),e),t(cP(),e),t(lP(),e)})(Mn)),Mn}var OE;function km(){return OE||(OE=1,(function(e){var r=Rn&&Rn.__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]})),t=Rn&&Rn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(jO(),e),t(qO(),e),t(ZS(),e),t(Lm(),e),t(WS(),e),t(HO(),e),t(eA(),e),t(GO(),e),t(WO(),e),t(YO(),e),t(dP(),e)})(Rn)),Rn}var PE;function fP(){return PE||(PE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const r=du(),t=mi(),n=fu(),i=qm(),a=Ie(),s=km();(function(o){o.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},r.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:i.WearableRepresentation.schema,minItems:1},category:t.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={}))})(Ju)),Ju}var NE;function pP(){return NE||(NE=1,(function(e){var r=An&&An.__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]})),t=An&&An.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(MO(),e),t(fP(),e)})(An)),An}var ME;function mP(){return ME||(ME=1,(function(e){var r=_n&&_n.__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]})),t=_n&&_n.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(NO(),e),t(pP(),e)})(_n)),_n}var Cn={},il={},CE;function yP(){return CE||(CE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const r=Ie();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(il)),il}var al={},sl={},jE;function iA(){return jE||(jE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const r=Ie(),t=Tr();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 t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,r.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})(sl)),sl}var ol={},DE;function br(){return DE||(DE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const r=Ie();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(ol)),ol}var qE;function Tr(){return qE||(qE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const r=Ie(),t=iA(),n=br();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 t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.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 u={[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},u);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},u);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},u);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},u);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},u)}}e.getNetworkMapping=o;function c(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=c,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,r.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(al)),al}var ul={},LE;function hP(){return LE||(LE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const r=Ie(),t=Tr(),n=br();(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:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(ul)),ul}var cl={},ll={},$E;function mu(){return $E||($E=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const r=Ie();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(ll)),ll}var BE;function gP(){return BE||(BE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const r=Ie(),t=Tr(),n=br(),i=mu();(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:t.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})(cl)),cl}var dl={},fl={},UE;function aA(){return UE||(UE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const r=Ie(),t=Tr(),n=km(),i=br(),a=mu(),s=du(),o=mi();(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(c){c.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:t.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"]},c.validate=(0,r.generateLazyValidator)(c.schema)})(e.NFT||(e.NFT={}))})(fl)),fl}var kE;function _P(){return kE||(kE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const r=Ie(),t=Tr(),n=br(),i=aA(),a=mu();(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:t.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,r.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(dl)),dl}var pl={},VE;function Vm(){return VE||(VE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const r=Ie();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(pl)),pl}var ml={},FE;function EP(){return FE||(FE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const r=Ie();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(ml)),ml}var yl={},HE;function vP(){return HE||(HE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const r=Ie(),t=Tr(),n=br();(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:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(yl)),yl}var hl={},GE;function bP(){return GE||(GE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(r){r.NEWEST="newest",r.RECENTLY_SOLD="recently_sold",r.CHEAPEST="cheapest",r.MOST_EXPENSIVE="most_expensive",r.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(r){r.ASC="asc",r.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(hl)),hl}var gl={},zE;function TP(){return zE||(zE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const r=Ie(),t=Tr(),n=Vm(),i=br();(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:t.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,r.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})(gl)),gl}var _l={},WE;function SP(){return WE||(WE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const r=Ie();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server",t.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(_l)),_l}var El={},KE;function sA(){return KE||(KE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const r=Ie();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(El)),El}var vl={},YE;function AP(){return YE||(YE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const r=Ie(),t=Tr(),n=sA(),i=br();(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:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(vl)),vl}var bl={},QE;function RP(){return QE||(QE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const r=Ie(),t=Tr(),n=br();(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,r.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:t.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,r.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(bl)),bl}var Tl={},JE;function wP(){return JE||(JE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(r){r.DATE="date",r.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Tl)),Tl}var Sl={},XE;function IP(){return XE||(XE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const r=Ie();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Sl)),Sl}var Al={},ZE;function OP(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const r=Ie();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Al)),Al}var Rl={},xE;function PP(){return xE||(xE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const r=Ie();function t(){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=t;function n(i,a){const s=t().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,r.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Rl)),Rl}var wl={},ev;function NP(){return ev||(ev=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const r=Ie(),t=Tr(),n=Vm(),i=br();(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:t.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,r.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(wl)),wl}var Il={},tv;function MP(){return tv||(tv=1,Object.defineProperty(Il,"__esModule",{value:!0})),Il}var Ol={},rv;function CP(){return rv||(rv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(r){r.BID="bid",r.PUBLIC_NFT_ORDER="public_nft_order",r.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(r){r[r.ERC20=1]="ERC20",r[r.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",r[r.ERC721=3]="ERC721",r[r.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(r){r.SENT="sent",r.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ol)),Ol}var jn={},Pl={},nv;function jP(){return nv||(nv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const r=Ie();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Pl)),Pl}var Nl={},iv;function DP(){return iv||(iv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(r){r.AUTH="authentication",r.BUILDER="builder",r.MARKETPLACE="marketplace",r.PROFILE="profile",r.CONFIG="configurator",r.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Nl)),Nl}var Ml={},av;function qP(){return av||(av=1,Object.defineProperty(Ml,"__esModule",{value:!0})),Ml}var Cl={},sv;function LP(){return sv||(sv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const r=Ie();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Cl)),Cl}var jl={},ov;function $P(){return ov||(ov=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const r=Ie();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(jl)),jl}var Dl={},uv;function BP(){return uv||(uv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const r=Ie();(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,r.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=t})(Dl)),Dl}var ql={},cv;function UP(){return cv||(cv=1,Object.defineProperty(ql,"__esModule",{value:!0})),ql}var Ll={},lv;function kP(){return lv||(lv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const r=Ie();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Ll)),Ll}var $l={},dv;function VP(){return dv||(dv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const r=Ie();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})($l)),$l}var Bl={},fv;function FP(){return fv||(fv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;var r=fu();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return r.SpringBoneParams}})})(Bl)),Bl}var Ul={},pv;function HP(){return pv||(pv=1,Object.defineProperty(Ul,"__esModule",{value:!0})),Ul}var kl={},mv;function GP(){return mv||(mv=1,Object.defineProperty(kl,"__esModule",{value:!0})),kl}var Vl={},yv;function zP(){return yv||(yv=1,Object.defineProperty(Vl,"__esModule",{value:!0})),Vl}var Fl={},hv;function WP(){return hv||(hv=1,Object.defineProperty(Fl,"__esModule",{value:!0})),Fl}var Hl={},gv;function KP(){return gv||(gv=1,Object.defineProperty(Hl,"__esModule",{value:!0})),Hl}var Gl={},_v;function YP(){return _v||(_v=1,Object.defineProperty(Gl,"__esModule",{value:!0})),Gl}var zl={},Ev;function QP(){return Ev||(Ev=1,Object.defineProperty(zl,"__esModule",{value:!0})),zl}var Wl={},vv;function JP(){return vv||(vv=1,Object.defineProperty(Wl,"__esModule",{value:!0})),Wl}var bv;function XP(){return bv||(bv=1,(function(e){var r=jn&&jn.__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]})),t=jn&&jn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(jP(),e),t(DP(),e),t(qP(),e),t(LP(),e),t($P(),e),t(BP(),e),t(UP(),e),t(kP(),e),t(VP(),e),t(FP(),e),t(HP(),e),t(GP(),e),t(zP(),e),t(WP(),e),t(KP(),e),t(YP(),e),t(QP(),e),t(JP(),e)})(jn)),jn}var Dn={},Zi={},Tv;function ZP(){if(Tv)return Zi;Tv=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.isSysLink=void 0;const e=r=>r!==null&&typeof r=="object"&&"sys"in r&&"id"in r.sys;return Zi.isSysLink=e,Zi}var xi={},Sv;function xP(){if(Sv)return xi;Sv=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.ContentfulLocale=void 0;var e;return(function(r){r.enUS="en-US",r.es="es",r.zh="zh"})(e||(e={})),xi.ContentfulLocale=e,xi}var Kl={},Av;function eN(){return Av||(Av=1,Object.defineProperty(Kl,"__esModule",{value:!0})),Kl}var Rv;function tN(){return Rv||(Rv=1,(function(e){var r=Dn&&Dn.__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]})),t=Dn&&Dn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(ZP(),e),t(xP(),e),t(eN(),e)})(Dn)),Dn}var wv;function rN(){return wv||(wv=1,(function(e){var r=Cn&&Cn.__createBinding||(Object.create?(function(Q,Y,z,k){k===void 0&&(k=z);var V=Object.getOwnPropertyDescriptor(Y,z);(!V||("get"in V?!Y.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return Y[z]}}),Object.defineProperty(Q,k,V)}):(function(Q,Y,z,k){k===void 0&&(k=z),Q[k]=Y[z]})),t=Cn&&Cn.__exportStar||function(Q,Y){for(var z in Q)z!=="default"&&!Object.prototype.hasOwnProperty.call(Y,z)&&r(Y,Q,z)};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=yP();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Tr();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=iA();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=hP();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=gP();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var c=_P();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return c.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return c.ItemSortBy}});var l=Vm();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var u=EP();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return u.MetaTransaction}});var f=vP();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return f.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return f.MintSortBy}});var g=br();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return g.Network}});var _=mu();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return _.NFTCategory}});var A=aA();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return A.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return A.NFTSortBy}});var w=bP();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return w.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return w.CatalogSortDirection}});var R=TP();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return R.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return R.OrderSortBy}});var P=SP();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return P.ProviderType}});var d=du();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return d.Rarity}});var S=sA();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return S.SaleType}});var E=AP();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return E.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return E.SaleSortBy}});var y=RP();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var v=wP();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return v.AnalyticsDayDataSortBy}});var I=IP();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return I.Store}});var N=OP();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return N.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return N.GenderFilterOption}});var U=PP();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return U.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return U.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return U.isInsideWorldLimits}}),t(NP(),e),t(MP(),e),t(CP(),e),t(XP(),e),t(tN(),e)})(Cn)),Cn}var Yl={},Iv;function nN(){return Iv||(Iv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const r=Ie();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Yl)),Yl}var qn={},Ql={},ea={},Ov;function oA(){if(Ov)return ea;Ov=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function r(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function t(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||r(i,a)||t(i,a)}return ea.isInExceptionBlock=n,ea}var Pv;function iN(){return Pv||(Pv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const r=Ie(),t=oA();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(_,A){return!A||typeof A.x!="number"||typeof A.y!="number"?!1:o(A)||(0,t.isInExceptionBlock)(A.x,A.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,r.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:g,y:_}){return`${g},${_}`}n.parcelToString=i;function a(g){const _=g.match(/^(-?\d+),(-?\d+)$/);if(!_)return null;const[,A,w]=_,R=parseInt(A,10),P=parseInt(w,10);return{x:R,y:P}}n.stringToParcel=a;function s(g){const _=a(g);return _?n.validate(_):!1}n.isParcelStringValid=s;function o(g){const{x:_,y:A}=g;return _>=e.PARCEL_LIMITS.minX&&_<=e.PARCEL_LIMITS.maxX&&A>=e.PARCEL_LIMITS.minY&&A<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function c(g){return(0,t.isInExceptionBlock)(g.x,g.y)}n.isExceptionParcel=c;function l(g){return o(g)||c(g)}n.isInBounds=l;function u(g){return n.validate(g)}n.isValid=u;function f(g){const _=a(g);return _?n.validate(_):!1}n.isValidString=f})(e.Parcel||(e.Parcel={}))})(Ql)),Ql}var Ln={},Nv;function aN(){if(Nv)return Ln;Nv=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.validateUrlInstance=Ln.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function r(_,A=2){let w=_;for(let R=0;R<A;R++)try{w=decodeURIComponent(w)}catch{break}return w.normalize("NFKC")}function t(_){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(_)}function n(_){return!!(_.username||_.password)}function i(_){return/\\/.test(_)}const a=["80","443"];function s(_,A){return!!_.port&&!A.includes(_.port)}function o(_){const A=_.toLowerCase();return!!(A==="localhost"||A.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(A)||A==="::1"||A==="[::1]"||A.startsWith("fe80:")||A.startsWith("fc00:"))}function c(_){if(_.startsWith("//"))return null;try{return{url:new URL(_),wasRelative:!1}}catch{try{return{url:new URL(_,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(_){const A=r(String(_).toLowerCase());return!(t(A)||i(A))}function u(_){return!(!_||_.includes("..")||_.includes("//")||t(_)||i(_))}function f(_,A={}){const w=Object.assign(Object.assign({},e),A),R=[...a,...w.allowedPorts];if(!_||_.length===0||_.length>4096||t(_)||i(_))return!1;const P=r(_);if(t(P)||i(P)||_.startsWith("//"))return!1;const d=c(_);if(!d)return!1;const{url:S,wasRelative:E}=d;if(S.protocol!=="http:"&&S.protocol!=="https:"&&S.protocol!==""||n(S)||i(_)||i(S.href)||!E&&(s(S,R)||!w.allowLocalhost&&S.hostname&&o(S.hostname))||!u(S.pathname)||S.pathname.length>2048)return!1;const y=Array.from(S.searchParams.entries());if(y.length>50||(S.search?S.search.startsWith("?")?S.search.length-1:S.search.length:0)>2048)return!1;for(const[I,N]of y)if(I.length===0||!l(I)||!l(N)||I.length>128||N.length>1024)return!1;return!(S.hash&&t(S.hash))}Ln.validateUrl=f;function g(_,A={}){return f(_.toString(),A)}return Ln.validateUrlInstance=g,Ln}var Mv;function sN(){return Mv||(Mv=1,(function(e){var r=qn&&qn.__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]})),t=qn&&qn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(iN(),e),t(oA(),e),t(aN(),e)})(qn)),qn}var Cv;function oN(){return Cv||(Cv=1,(function(e){var r=ur&&ur.__createBinding||(Object.create?(function(s,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(s,l,u)}):(function(s,o,c,l){l===void 0&&(l=c),s[l]=o[c]})),t=ur&&ur.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=ur&&ur.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var c in s)c!=="default"&&Object.prototype.hasOwnProperty.call(s,c)&&r(o,s,c);return t(o,s),o},i=ur&&ur.__exportStar||function(s,o){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&r(o,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(mP());e.sdk=a,i(Ie(),e),i(rN(),e),i(km(),e),i(yi(),e),i(nN(),e),i(Xa(),e),i(xS(),e),i(nA(),e),i(sN(),e)})(ur)),ur}var Ua=oN(),$n={},fr={},ja={exports:{}},uN=ja.exports,jv;function yu(){return jv||(jv=1,(function(e,r){(function(t,n){n(r)})(uN,(function(t){function n(p){if(p.jsonrpc="2.0",!p.id||typeof p.id!="number"||Math.floor(p.id)!==p.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(p)}`);if(!p.method||typeof p.method!="string"||p.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(p)}`);if(!p.params||typeof p.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(p)}`);return p}var i={};function a(){let p,b;const M=new Promise(((K,x)=>{p=se=>{K(se),M.isPending=!1},b=se=>{x(se),M.isPending=!1}})).catch((K=>Promise.reject(K)));return M.resolve=p,M.reject=b,"finally"in M||(M.finally=K=>{M.then(K),M.catch(K)}),M.isPending=!0,M}Object.defineProperty(i,"__esModule",{value:!0});var s=i.future=a;i.default=a;var o={exports:{}};/**
|
|
31
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
32
|
-
*
|
|
33
|
-
* @version 0.8.0
|
|
34
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
35
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
36
|
-
* @license MIT
|
|
37
|
-
*/(function(p){(function(){var b="input is invalid type",M=typeof window=="object",K=M?window:{};K.JS_SHA3_NO_WINDOW&&(M=!1);var x=!M&&typeof self=="object";!K.JS_SHA3_NO_NODE_JS&&typeof tu=="object"&&tu.versions&&tu.versions.node?K=im:x&&(K=self);var se=!K.JS_SHA3_NO_COMMON_JS&&p.exports,ve=!K.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Pe="0123456789abcdef".split(""),Ue=[4,1024,262144,67108864],Ve=[0,8,16,24],Gt=[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],St=[224,256,384,512],Me=[128,256],Ct=["hex","buffer","arrayBuffer","array","digest"],mt={128:168,256:136};!K.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(m){return Object.prototype.toString.call(m)==="[object Array]"}),!ve||!K.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(m){return typeof m=="object"&&m.buffer&&m.buffer.constructor===ArrayBuffer});for(var yt=function(m,$,X){return function(F){return new it(m,$,m).update(F)[X]()}},kt=function(m,$,X){return function(F,ee){return new it(m,$,ee).update(F)[X]()}},Ur=function(m,$,X){return function(F,ee,te,ie){return jt["cshake"+m].update(F,ee,te,ie)[X]()}},Ir=function(m,$,X){return function(F,ee,te,ie){return jt["kmac"+m].update(F,ee,te,ie)[X]()}},Vt=function(m,$,X,F){for(var ee=0;ee<Ct.length;++ee){var te=Ct[ee];m[te]=$(X,F,te)}return m},Or=function(m,$){var X=yt(m,$,"hex");return X.create=function(){return new it(m,$,m)},X.update=function(F){return X.create().update(F)},Vt(X,yt,m,$)},en=[{name:"keccak",padding:[1,256,65536,16777216],bits:St,createMethod:Or},{name:"sha3",padding:[6,1536,393216,100663296],bits:St,createMethod:Or},{name:"shake",padding:[31,7936,2031616,520093696],bits:Me,createMethod:function(m,$){var X=kt(m,$,"hex");return X.create=function(F){return new it(m,$,F)},X.update=function(F,ee){return X.create(ee).update(F)},Vt(X,kt,m,$)}},{name:"cshake",padding:Ue,bits:Me,createMethod:function(m,$){var X=mt[m],F=Ur(m,0,"hex");return F.create=function(ee,te,ie){return te||ie?new it(m,$,ee).bytepad([te,ie],X):jt["shake"+m].create(ee)},F.update=function(ee,te,ie,fe){return F.create(te,ie,fe).update(ee)},Vt(F,Ur,m,$)}},{name:"kmac",padding:Ue,bits:Me,createMethod:function(m,$){var X=mt[m],F=Ir(m,0,"hex");return F.create=function(ee,te,ie){return new rr(m,$,te).bytepad(["KMAC",ie],X).bytepad([ee],X)},F.update=function(ee,te,ie,fe){return F.create(ee,ie,fe).update(te)},Vt(F,Ir,m,$)}}],jt={},kr=[],Ft=0;Ft<en.length;++Ft)for(var Pr=en[Ft],we=Pr.bits,Vr=0;Vr<we.length;++Vr){var bi=Pr.name+"_"+we[Vr];if(kr.push(bi),jt[bi]=Pr.createMethod(we[Vr],Pr.padding),Pr.name!=="sha3"){var Ti=Pr.name+we[Vr];kr.push(Ti),jt[Ti]=jt[bi]}}function it(m,$,X){this.blocks=[],this.s=[],this.padding=$,this.outputBits=X,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(m<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=X>>5,this.extraBytes=(31&X)>>3;for(var F=0;F<50;++F)this.s[F]=0}function rr(m,$,X){it.call(this,m,$,X)}it.prototype.update=function(m){if(this.finalized)throw new Error("finalize already called");var $,X=typeof m;if(X!=="string"){if(X!=="object")throw new Error(b);if(m===null)throw new Error(b);if(ve&&m.constructor===ArrayBuffer)m=new Uint8Array(m);else if(!(Array.isArray(m)||ve&&ArrayBuffer.isView(m)))throw new Error(b);$=!0}for(var F,ee,te=this.blocks,ie=this.byteCount,fe=m.length,he=this.blockCount,ye=0,Ne=this.s;ye<fe;){if(this.reset)for(this.reset=!1,te[0]=this.block,F=1;F<he+1;++F)te[F]=0;if($)for(F=this.start;ye<fe&&F<ie;++ye)te[F>>2]|=m[ye]<<Ve[3&F++];else for(F=this.start;ye<fe&&F<ie;++ye)(ee=m.charCodeAt(ye))<128?te[F>>2]|=ee<<Ve[3&F++]:ee<2048?(te[F>>2]|=(192|ee>>6)<<Ve[3&F++],te[F>>2]|=(128|63&ee)<<Ve[3&F++]):ee<55296||ee>=57344?(te[F>>2]|=(224|ee>>12)<<Ve[3&F++],te[F>>2]|=(128|ee>>6&63)<<Ve[3&F++],te[F>>2]|=(128|63&ee)<<Ve[3&F++]):(ee=65536+((1023&ee)<<10|1023&m.charCodeAt(++ye)),te[F>>2]|=(240|ee>>18)<<Ve[3&F++],te[F>>2]|=(128|ee>>12&63)<<Ve[3&F++],te[F>>2]|=(128|ee>>6&63)<<Ve[3&F++],te[F>>2]|=(128|63&ee)<<Ve[3&F++]);if(this.lastByteIndex=F,F>=ie){for(this.start=F-ie,this.block=te[he],F=0;F<he;++F)Ne[F]^=te[F];B(Ne),this.reset=!0}else this.start=F}return this},it.prototype.encode=function(m,$){var X=255&m,F=1,ee=[X];for(X=255&(m>>=8);X>0;)ee.unshift(X),X=255&(m>>=8),++F;return $?ee.push(F):ee.unshift(F),this.update(ee),ee.length},it.prototype.encodeString=function(m){var $,X=typeof m;if(X!=="string"){if(X!=="object")throw new Error(b);if(m===null)throw new Error(b);if(ve&&m.constructor===ArrayBuffer)m=new Uint8Array(m);else if(!(Array.isArray(m)||ve&&ArrayBuffer.isView(m)))throw new Error(b);$=!0}var F=0,ee=m.length;if($)F=ee;else for(var te=0;te<m.length;++te){var ie=m.charCodeAt(te);ie<128?F+=1:ie<2048?F+=2:ie<55296||ie>=57344?F+=3:(ie=65536+((1023&ie)<<10|1023&m.charCodeAt(++te)),F+=4)}return F+=this.encode(8*F),this.update(m),F},it.prototype.bytepad=function(m,$){for(var X=this.encode($),F=0;F<m.length;++F)X+=this.encodeString(m[F]);var ee=$-X%$,te=[];return te.length=ee,this.update(te),this},it.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var m=this.blocks,$=this.lastByteIndex,X=this.blockCount,F=this.s;if(m[$>>2]|=this.padding[3&$],this.lastByteIndex===this.byteCount)for(m[0]=m[X],$=1;$<X+1;++$)m[$]=0;for(m[X-1]|=2147483648,$=0;$<X;++$)F[$]^=m[$];B(F)}},it.prototype.toString=it.prototype.hex=function(){this.finalize();for(var m,$=this.blockCount,X=this.s,F=this.outputBlocks,ee=this.extraBytes,te=0,ie=0,fe="";ie<F;){for(te=0;te<$&&ie<F;++te,++ie)m=X[te],fe+=Pe[m>>4&15]+Pe[15&m]+Pe[m>>12&15]+Pe[m>>8&15]+Pe[m>>20&15]+Pe[m>>16&15]+Pe[m>>28&15]+Pe[m>>24&15];ie%$==0&&(B(X),te=0)}return ee&&(m=X[te],fe+=Pe[m>>4&15]+Pe[15&m],ee>1&&(fe+=Pe[m>>12&15]+Pe[m>>8&15]),ee>2&&(fe+=Pe[m>>20&15]+Pe[m>>16&15])),fe},it.prototype.arrayBuffer=function(){this.finalize();var m,$=this.blockCount,X=this.s,F=this.outputBlocks,ee=this.extraBytes,te=0,ie=0,fe=this.outputBits>>3;m=ee?new ArrayBuffer(F+1<<2):new ArrayBuffer(fe);for(var he=new Uint32Array(m);ie<F;){for(te=0;te<$&&ie<F;++te,++ie)he[ie]=X[te];ie%$==0&&B(X)}return ee&&(he[te]=X[te],m=m.slice(0,fe)),m},it.prototype.buffer=it.prototype.arrayBuffer,it.prototype.digest=it.prototype.array=function(){this.finalize();for(var m,$,X=this.blockCount,F=this.s,ee=this.outputBlocks,te=this.extraBytes,ie=0,fe=0,he=[];fe<ee;){for(ie=0;ie<X&&fe<ee;++ie,++fe)m=fe<<2,$=F[ie],he[m]=255&$,he[m+1]=$>>8&255,he[m+2]=$>>16&255,he[m+3]=$>>24&255;fe%X==0&&B(F)}return te&&(m=fe<<2,$=F[ie],he[m]=255&$,te>1&&(he[m+1]=$>>8&255),te>2&&(he[m+2]=$>>16&255)),he},rr.prototype=new it,rr.prototype.finalize=function(){return this.encode(this.outputBits,!0),it.prototype.finalize.call(this)};var B=function(m){var $,X,F,ee,te,ie,fe,he,ye,Ne,ke,Ge,tt,ht,vt,Xe,at,Rt,Fr,tn,rn,zt,Nr,Dt,wt,pt,as,ss,os,us,cs,ls,ds,fs,ps,ms,ys,hs,gs,_s,Es,vs,bs,Ts,Ss,As,Rs,ws,Is,Os,Ps,Ns,Ms,Cs,js,Ds,qs,Ls,$s,Bs,Us,ks,Vs;for(F=0;F<48;F+=2)ee=m[0]^m[10]^m[20]^m[30]^m[40],te=m[1]^m[11]^m[21]^m[31]^m[41],ie=m[2]^m[12]^m[22]^m[32]^m[42],fe=m[3]^m[13]^m[23]^m[33]^m[43],he=m[4]^m[14]^m[24]^m[34]^m[44],ye=m[5]^m[15]^m[25]^m[35]^m[45],Ne=m[6]^m[16]^m[26]^m[36]^m[46],ke=m[7]^m[17]^m[27]^m[37]^m[47],$=(Ge=m[8]^m[18]^m[28]^m[38]^m[48])^(ie<<1|fe>>>31),X=(tt=m[9]^m[19]^m[29]^m[39]^m[49])^(fe<<1|ie>>>31),m[0]^=$,m[1]^=X,m[10]^=$,m[11]^=X,m[20]^=$,m[21]^=X,m[30]^=$,m[31]^=X,m[40]^=$,m[41]^=X,$=ee^(he<<1|ye>>>31),X=te^(ye<<1|he>>>31),m[2]^=$,m[3]^=X,m[12]^=$,m[13]^=X,m[22]^=$,m[23]^=X,m[32]^=$,m[33]^=X,m[42]^=$,m[43]^=X,$=ie^(Ne<<1|ke>>>31),X=fe^(ke<<1|Ne>>>31),m[4]^=$,m[5]^=X,m[14]^=$,m[15]^=X,m[24]^=$,m[25]^=X,m[34]^=$,m[35]^=X,m[44]^=$,m[45]^=X,$=he^(Ge<<1|tt>>>31),X=ye^(tt<<1|Ge>>>31),m[6]^=$,m[7]^=X,m[16]^=$,m[17]^=X,m[26]^=$,m[27]^=X,m[36]^=$,m[37]^=X,m[46]^=$,m[47]^=X,$=Ne^(ee<<1|te>>>31),X=ke^(te<<1|ee>>>31),m[8]^=$,m[9]^=X,m[18]^=$,m[19]^=X,m[28]^=$,m[29]^=X,m[38]^=$,m[39]^=X,m[48]^=$,m[49]^=X,ht=m[0],vt=m[1],As=m[11]<<4|m[10]>>>28,Rs=m[10]<<4|m[11]>>>28,ss=m[20]<<3|m[21]>>>29,os=m[21]<<3|m[20]>>>29,Bs=m[31]<<9|m[30]>>>23,Us=m[30]<<9|m[31]>>>23,vs=m[40]<<18|m[41]>>>14,bs=m[41]<<18|m[40]>>>14,fs=m[2]<<1|m[3]>>>31,ps=m[3]<<1|m[2]>>>31,Xe=m[13]<<12|m[12]>>>20,at=m[12]<<12|m[13]>>>20,ws=m[22]<<10|m[23]>>>22,Is=m[23]<<10|m[22]>>>22,us=m[33]<<13|m[32]>>>19,cs=m[32]<<13|m[33]>>>19,ks=m[42]<<2|m[43]>>>30,Vs=m[43]<<2|m[42]>>>30,Cs=m[5]<<30|m[4]>>>2,js=m[4]<<30|m[5]>>>2,ms=m[14]<<6|m[15]>>>26,ys=m[15]<<6|m[14]>>>26,Rt=m[25]<<11|m[24]>>>21,Fr=m[24]<<11|m[25]>>>21,Os=m[34]<<15|m[35]>>>17,Ps=m[35]<<15|m[34]>>>17,ls=m[45]<<29|m[44]>>>3,ds=m[44]<<29|m[45]>>>3,Dt=m[6]<<28|m[7]>>>4,wt=m[7]<<28|m[6]>>>4,Ds=m[17]<<23|m[16]>>>9,qs=m[16]<<23|m[17]>>>9,hs=m[26]<<25|m[27]>>>7,gs=m[27]<<25|m[26]>>>7,tn=m[36]<<21|m[37]>>>11,rn=m[37]<<21|m[36]>>>11,Ns=m[47]<<24|m[46]>>>8,Ms=m[46]<<24|m[47]>>>8,Ts=m[8]<<27|m[9]>>>5,Ss=m[9]<<27|m[8]>>>5,pt=m[18]<<20|m[19]>>>12,as=m[19]<<20|m[18]>>>12,Ls=m[29]<<7|m[28]>>>25,$s=m[28]<<7|m[29]>>>25,_s=m[38]<<8|m[39]>>>24,Es=m[39]<<8|m[38]>>>24,zt=m[48]<<14|m[49]>>>18,Nr=m[49]<<14|m[48]>>>18,m[0]=ht^~Xe&Rt,m[1]=vt^~at&Fr,m[10]=Dt^~pt&ss,m[11]=wt^~as&os,m[20]=fs^~ms&hs,m[21]=ps^~ys&gs,m[30]=Ts^~As&ws,m[31]=Ss^~Rs&Is,m[40]=Cs^~Ds&Ls,m[41]=js^~qs&$s,m[2]=Xe^~Rt&tn,m[3]=at^~Fr&rn,m[12]=pt^~ss&us,m[13]=as^~os&cs,m[22]=ms^~hs&_s,m[23]=ys^~gs&Es,m[32]=As^~ws&Os,m[33]=Rs^~Is&Ps,m[42]=Ds^~Ls&Bs,m[43]=qs^~$s&Us,m[4]=Rt^~tn&zt,m[5]=Fr^~rn&Nr,m[14]=ss^~us&ls,m[15]=os^~cs&ds,m[24]=hs^~_s&vs,m[25]=gs^~Es&bs,m[34]=ws^~Os&Ns,m[35]=Is^~Ps&Ms,m[44]=Ls^~Bs&ks,m[45]=$s^~Us&Vs,m[6]=tn^~zt&ht,m[7]=rn^~Nr&vt,m[16]=us^~ls&Dt,m[17]=cs^~ds&wt,m[26]=_s^~vs&fs,m[27]=Es^~bs&ps,m[36]=Os^~Ns&Ts,m[37]=Ps^~Ms&Ss,m[46]=Bs^~ks&Cs,m[47]=Us^~Vs&js,m[8]=zt^~ht&Xe,m[9]=Nr^~vt&at,m[18]=ls^~Dt&pt,m[19]=ds^~wt&as,m[28]=vs^~fs&ms,m[29]=bs^~ps&ys,m[38]=Ns^~Ts&As,m[39]=Ms^~Ss&Rs,m[48]=ks^~Cs&Ds,m[49]=Vs^~js&qs,m[0]^=Gt[F],m[1]^=Gt[F+1]};if(se)p.exports=jt;else for(Ft=0;Ft<kr.length;++Ft)K[kr[Ft]]=jt[kr[Ft]]})()})(o);var c=o.exports,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,f=Math.floor,g="[BigNumber Error] ",_=g+"Number primitive has more than 15 significant digits: ",A=1e14,w=14,R=9007199254740991,P=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,S=1e9;function E(p){var b=0|p;return p>0||p===b?b:b-1}function y(p){for(var b,M,K=1,x=p.length,se=p[0]+"";K<x;){for(b=p[K++]+"",M=w-b.length;M--;b="0"+b);se+=b}for(x=se.length;se.charCodeAt(--x)===48;);return se.slice(0,x+1||1)}function v(p,b){var M,K,x=p.c,se=b.c,ve=p.s,Pe=b.s,Ue=p.e,Ve=b.e;if(!ve||!Pe)return null;if(M=x&&!x[0],K=se&&!se[0],M||K)return M?K?0:-Pe:ve;if(ve!=Pe)return ve;if(M=ve<0,K=Ue==Ve,!x||!se)return K?0:!x^M?1:-1;if(!K)return Ue>Ve^M?1:-1;for(Pe=(Ue=x.length)<(Ve=se.length)?Ue:Ve,ve=0;ve<Pe;ve++)if(x[ve]!=se[ve])return x[ve]>se[ve]^M?1:-1;return Ue==Ve?0:Ue>Ve^M?1:-1}function I(p,b,M,K){if(p<b||p>M||p!==f(p))throw Error(g+(K||"Argument")+(typeof p=="number"?p<b||p>M?" out of range: ":" not an integer: ":" not a primitive number: ")+String(p))}function N(p){var b=p.c.length-1;return E(p.e/w)==b&&p.c[b]%2!=0}function U(p,b){return(p.length>1?p.charAt(0)+"."+p.slice(1):p)+(b<0?"e":"e+")+b}function Q(p,b,M){var K,x;if(b<0){for(x=M+".";++b;x+=M);p=x+p}else if(++b>(K=p.length)){for(x=M,b-=K;--b;x+=M);p+=x}else b<K&&(p=p.slice(0,b)+"."+p.slice(b));return p}var Y=(function p(b){var M,K,x,se,ve,Pe,Ue,Ve,Gt,St,Me=we.prototype={constructor:we,toString:null,valueOf:null},Ct=new we(1),mt=20,yt=4,kt=-7,Ur=21,Ir=-1e7,Vt=1e7,Or=!1,en=1,jt=0,kr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Ft="0123456789abcdefghijklmnopqrstuvwxyz",Pr=!0;function we(B,m){var $,X,F,ee,te,ie,fe,he,ye=this;if(!(ye instanceof we))return new we(B,m);if(m==null){if(B&&B._isBigNumber===!0)return ye.s=B.s,void(!B.c||B.e>Vt?ye.c=ye.e=null:B.e<Ir?ye.c=[ye.e=0]:(ye.e=B.e,ye.c=B.c.slice()));if((ie=typeof B=="number")&&0*B==0){if(ye.s=1/B<0?(B=-B,-1):1,B===~~B){for(ee=0,te=B;te>=10;te/=10,ee++);return void(ee>Vt?ye.c=ye.e=null:(ye.e=ee,ye.c=[B]))}he=String(B)}else{if(!l.test(he=String(B)))return x(ye,he,ie);ye.s=he.charCodeAt(0)==45?(he=he.slice(1),-1):1}(ee=he.indexOf("."))>-1&&(he=he.replace(".","")),(te=he.search(/e/i))>0?(ee<0&&(ee=te),ee+=+he.slice(te+1),he=he.substring(0,te)):ee<0&&(ee=he.length)}else{if(I(m,2,Ft.length,"Base"),m==10&&Pr)return it(ye=new we(B),mt+ye.e+1,yt);if(he=String(B),ie=typeof B=="number"){if(0*B!=0)return x(ye,he,ie,m);if(ye.s=1/B<0?(he=he.slice(1),-1):1,we.DEBUG&&he.replace(/^0\.0*|\./,"").length>15)throw Error(_+B)}else ye.s=he.charCodeAt(0)===45?(he=he.slice(1),-1):1;for($=Ft.slice(0,m),ee=te=0,fe=he.length;te<fe;te++)if($.indexOf(X=he.charAt(te))<0){if(X=="."){if(te>ee){ee=fe;continue}}else if(!F&&(he==he.toUpperCase()&&(he=he.toLowerCase())||he==he.toLowerCase()&&(he=he.toUpperCase()))){F=!0,te=-1,ee=0;continue}return x(ye,String(B),ie,m)}ie=!1,(ee=(he=K(he,m,10,ye.s)).indexOf("."))>-1?he=he.replace(".",""):ee=he.length}for(te=0;he.charCodeAt(te)===48;te++);for(fe=he.length;he.charCodeAt(--fe)===48;);if(he=he.slice(te,++fe)){if(fe-=te,ie&&we.DEBUG&&fe>15&&(B>R||B!==f(B)))throw Error(_+ye.s*B);if((ee=ee-te-1)>Vt)ye.c=ye.e=null;else if(ee<Ir)ye.c=[ye.e=0];else{if(ye.e=ee,ye.c=[],te=(ee+1)%w,ee<0&&(te+=w),te<fe){for(te&&ye.c.push(+he.slice(0,te)),fe-=w;te<fe;)ye.c.push(+he.slice(te,te+=w));te=w-(he=he.slice(te)).length}else te-=fe;for(;te--;he+="0");ye.c.push(+he)}}else ye.c=[ye.e=0]}function Vr(B,m,$,X){var F,ee,te,ie,fe;if($==null?$=yt:I($,0,8),!B.c)return B.toString();if(F=B.c[0],te=B.e,m==null)fe=y(B.c),fe=X==1||X==2&&(te<=kt||te>=Ur)?U(fe,te):Q(fe,te,"0");else if(ee=(B=it(new we(B),m,$)).e,ie=(fe=y(B.c)).length,X==1||X==2&&(m<=ee||ee<=kt)){for(;ie<m;fe+="0",ie++);fe=U(fe,ee)}else if(m-=te,fe=Q(fe,ee,"0"),ee+1>ie){if(--m>0)for(fe+=".";m--;fe+="0");}else if((m+=ee-ie)>0)for(ee+1==ie&&(fe+=".");m--;fe+="0");return B.s<0&&F?"-"+fe:fe}function bi(B,m){for(var $,X=1,F=new we(B[0]);X<B.length;X++){if(!($=new we(B[X])).s){F=$;break}m.call(F,$)&&(F=$)}return F}function Ti(B,m,$){for(var X=1,F=m.length;!m[--F];m.pop());for(F=m[0];F>=10;F/=10,X++);return($=X+$*w-1)>Vt?B.c=B.e=null:$<Ir?B.c=[B.e=0]:(B.e=$,B.c=m),B}function it(B,m,$,X){var F,ee,te,ie,fe,he,ye,Ne=B.c,ke=P;if(Ne){e:{for(F=1,ie=Ne[0];ie>=10;ie/=10,F++);if((ee=m-F)<0)ee+=w,te=m,ye=(fe=Ne[he=0])/ke[F-te-1]%10|0;else if((he=u((ee+1)/w))>=Ne.length){if(!X)break e;for(;Ne.length<=he;Ne.push(0));fe=ye=0,F=1,te=(ee%=w)-w+1}else{for(fe=ie=Ne[he],F=1;ie>=10;ie/=10,F++);ye=(te=(ee%=w)-w+F)<0?0:fe/ke[F-te-1]%10|0}if(X=X||m<0||Ne[he+1]!=null||(te<0?fe:fe%ke[F-te-1]),X=$<4?(ye||X)&&($==0||$==(B.s<0?3:2)):ye>5||ye==5&&($==4||X||$==6&&(ee>0?te>0?fe/ke[F-te]:0:Ne[he-1])%10&1||$==(B.s<0?8:7)),m<1||!Ne[0])return Ne.length=0,X?(m-=B.e+1,Ne[0]=ke[(w-m%w)%w],B.e=-m||0):Ne[0]=B.e=0,B;if(ee==0?(Ne.length=he,ie=1,he--):(Ne.length=he+1,ie=ke[w-ee],Ne[he]=te>0?f(fe/ke[F-te]%ke[te])*ie:0),X)for(;;){if(he==0){for(ee=1,te=Ne[0];te>=10;te/=10,ee++);for(te=Ne[0]+=ie,ie=1;te>=10;te/=10,ie++);ee!=ie&&(B.e++,Ne[0]==A&&(Ne[0]=1));break}if(Ne[he]+=ie,Ne[he]!=A)break;Ne[he--]=0,ie=1}for(ee=Ne.length;Ne[--ee]===0;Ne.pop());}B.e>Vt?B.c=B.e=null:B.e<Ir&&(B.c=[B.e=0])}return B}function rr(B){var m,$=B.e;return $===null?B.toString():(m=y(B.c),m=$<=kt||$>=Ur?U(m,$):Q(m,$,"0"),B.s<0?"-"+m:m)}return we.clone=p,we.ROUND_UP=0,we.ROUND_DOWN=1,we.ROUND_CEIL=2,we.ROUND_FLOOR=3,we.ROUND_HALF_UP=4,we.ROUND_HALF_DOWN=5,we.ROUND_HALF_EVEN=6,we.ROUND_HALF_CEIL=7,we.ROUND_HALF_FLOOR=8,we.EUCLID=9,we.config=we.set=function(B){var m,$;if(B!=null){if(typeof B!="object")throw Error(g+"Object expected: "+B);if(B.hasOwnProperty(m="DECIMAL_PLACES")&&(I($=B[m],0,S,m),mt=$),B.hasOwnProperty(m="ROUNDING_MODE")&&(I($=B[m],0,8,m),yt=$),B.hasOwnProperty(m="EXPONENTIAL_AT")&&(($=B[m])&&$.pop?(I($[0],-S,0,m),I($[1],0,S,m),kt=$[0],Ur=$[1]):(I($,-S,S,m),kt=-(Ur=$<0?-$:$))),B.hasOwnProperty(m="RANGE"))if(($=B[m])&&$.pop)I($[0],-S,-1,m),I($[1],1,S,m),Ir=$[0],Vt=$[1];else{if(I($,-S,S,m),!$)throw Error(g+m+" cannot be zero: "+$);Ir=-(Vt=$<0?-$:$)}if(B.hasOwnProperty(m="CRYPTO")){if(($=B[m])!==!!$)throw Error(g+m+" not true or false: "+$);if($){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Or=!$,Error(g+"crypto unavailable");Or=$}else Or=$}if(B.hasOwnProperty(m="MODULO_MODE")&&(I($=B[m],0,9,m),en=$),B.hasOwnProperty(m="POW_PRECISION")&&(I($=B[m],0,S,m),jt=$),B.hasOwnProperty(m="FORMAT")){if(typeof($=B[m])!="object")throw Error(g+m+" not an object: "+$);kr=$}if(B.hasOwnProperty(m="ALPHABET")){if(typeof($=B[m])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test($))throw Error(g+m+" invalid: "+$);Pr=$.slice(0,10)=="0123456789",Ft=$}}return{DECIMAL_PLACES:mt,ROUNDING_MODE:yt,EXPONENTIAL_AT:[kt,Ur],RANGE:[Ir,Vt],CRYPTO:Or,MODULO_MODE:en,POW_PRECISION:jt,FORMAT:kr,ALPHABET:Ft}},we.isBigNumber=function(B){if(!B||B._isBigNumber!==!0)return!1;if(!we.DEBUG)return!0;var m,$,X=B.c,F=B.e,ee=B.s;e:if({}.toString.call(X)=="[object Array]"){if((ee===1||ee===-1)&&F>=-S&&F<=S&&F===f(F)){if(X[0]===0){if(F===0&&X.length===1)return!0;break e}if((m=(F+1)%w)<1&&(m+=w),String(X[0]).length==m){for(m=0;m<X.length;m++)if(($=X[m])<0||$>=A||$!==f($))break e;if($!==0)return!0}}}else if(X===null&&F===null&&(ee===null||ee===1||ee===-1))return!0;throw Error(g+"Invalid BigNumber: "+B)},we.maximum=we.max=function(){return bi(arguments,Me.lt)},we.minimum=we.min=function(){return bi(arguments,Me.gt)},we.random=(se=9007199254740992,ve=Math.random()*se&2097151?function(){return f(Math.random()*se)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(B){var m,$,X,F,ee,te=0,ie=[],fe=new we(Ct);if(B==null?B=mt:I(B,0,S),F=u(B/w),Or)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(F*=2));te<F;)(ee=131072*m[te]+(m[te+1]>>>11))>=9e15?($=crypto.getRandomValues(new Uint32Array(2)),m[te]=$[0],m[te+1]=$[1]):(ie.push(ee%1e14),te+=2);te=F/2}else{if(!crypto.randomBytes)throw Or=!1,Error(g+"crypto unavailable");for(m=crypto.randomBytes(F*=7);te<F;)(ee=281474976710656*(31&m[te])+1099511627776*m[te+1]+4294967296*m[te+2]+16777216*m[te+3]+(m[te+4]<<16)+(m[te+5]<<8)+m[te+6])>=9e15?crypto.randomBytes(7).copy(m,te):(ie.push(ee%1e14),te+=7);te=F/7}if(!Or)for(;te<F;)(ee=ve())<9e15&&(ie[te++]=ee%1e14);for(F=ie[--te],B%=w,F&&B&&(ee=P[w-B],ie[te]=f(F/ee)*ee);ie[te]===0;ie.pop(),te--);if(te<0)ie=[X=0];else{for(X=-1;ie[0]===0;ie.splice(0,1),X-=w);for(te=1,ee=ie[0];ee>=10;ee/=10,te++);te<w&&(X-=w-te)}return fe.e=X,fe.c=ie,fe}),we.sum=function(){for(var B=1,m=arguments,$=new we(m[0]);B<m.length;)$=$.plus(m[B++]);return $},K=(function(){var B="0123456789";function m($,X,F,ee){for(var te,ie,fe=[0],he=0,ye=$.length;he<ye;){for(ie=fe.length;ie--;fe[ie]*=X);for(fe[0]+=ee.indexOf($.charAt(he++)),te=0;te<fe.length;te++)fe[te]>F-1&&(fe[te+1]==null&&(fe[te+1]=0),fe[te+1]+=fe[te]/F|0,fe[te]%=F)}return fe.reverse()}return function($,X,F,ee,te){var ie,fe,he,ye,Ne,ke,Ge,tt,ht=$.indexOf("."),vt=mt,Xe=yt;for(ht>=0&&(ye=jt,jt=0,$=$.replace(".",""),ke=(tt=new we(X)).pow($.length-ht),jt=ye,tt.c=m(Q(y(ke.c),ke.e,"0"),10,F,B),tt.e=tt.c.length),he=ye=(Ge=m($,X,F,te?(ie=Ft,B):(ie=B,Ft))).length;Ge[--ye]==0;Ge.pop());if(!Ge[0])return ie.charAt(0);if(ht<0?--he:(ke.c=Ge,ke.e=he,ke.s=ee,Ge=(ke=M(ke,tt,vt,Xe,F)).c,Ne=ke.r,he=ke.e),ht=Ge[fe=he+vt+1],ye=F/2,Ne=Ne||fe<0||Ge[fe+1]!=null,Ne=Xe<4?(ht!=null||Ne)&&(Xe==0||Xe==(ke.s<0?3:2)):ht>ye||ht==ye&&(Xe==4||Ne||Xe==6&&1&Ge[fe-1]||Xe==(ke.s<0?8:7)),fe<1||!Ge[0])$=Ne?Q(ie.charAt(1),-vt,ie.charAt(0)):ie.charAt(0);else{if(Ge.length=fe,Ne)for(--F;++Ge[--fe]>F;)Ge[fe]=0,fe||(++he,Ge=[1].concat(Ge));for(ye=Ge.length;!Ge[--ye];);for(ht=0,$="";ht<=ye;$+=ie.charAt(Ge[ht++]));$=Q($,he,ie.charAt(0))}return $}})(),M=(function(){function B(X,F,ee){var te,ie,fe,he,ye=0,Ne=X.length,ke=F%d,Ge=F/d|0;for(X=X.slice();Ne--;)ye=((ie=ke*(fe=X[Ne]%d)+(te=Ge*fe+(he=X[Ne]/d|0)*ke)%d*d+ye)/ee|0)+(te/d|0)+Ge*he,X[Ne]=ie%ee;return ye&&(X=[ye].concat(X)),X}function m(X,F,ee,te){var ie,fe;if(ee!=te)fe=ee>te?1:-1;else for(ie=fe=0;ie<ee;ie++)if(X[ie]!=F[ie]){fe=X[ie]>F[ie]?1:-1;break}return fe}function $(X,F,ee,te){for(var ie=0;ee--;)X[ee]-=ie,ie=X[ee]<F[ee]?1:0,X[ee]=ie*te+X[ee]-F[ee];for(;!X[0]&&X.length>1;X.splice(0,1));}return function(X,F,ee,te,ie){var fe,he,ye,Ne,ke,Ge,tt,ht,vt,Xe,at,Rt,Fr,tn,rn,zt,Nr,Dt=X.s==F.s?1:-1,wt=X.c,pt=F.c;if(!(wt&&wt[0]&&pt&&pt[0]))return new we(X.s&&F.s&&(wt?!pt||wt[0]!=pt[0]:pt)?wt&&wt[0]==0||!pt?0*Dt:Dt/0:NaN);for(vt=(ht=new we(Dt)).c=[],Dt=ee+(he=X.e-F.e)+1,ie||(ie=A,he=E(X.e/w)-E(F.e/w),Dt=Dt/w|0),ye=0;pt[ye]==(wt[ye]||0);ye++);if(pt[ye]>(wt[ye]||0)&&he--,Dt<0)vt.push(1),Ne=!0;else{for(tn=wt.length,zt=pt.length,ye=0,Dt+=2,(ke=f(ie/(pt[0]+1)))>1&&(pt=B(pt,ke,ie),wt=B(wt,ke,ie),zt=pt.length,tn=wt.length),Fr=zt,at=(Xe=wt.slice(0,zt)).length;at<zt;Xe[at++]=0);Nr=pt.slice(),Nr=[0].concat(Nr),rn=pt[0],pt[1]>=ie/2&&rn++;do{if(ke=0,(fe=m(pt,Xe,zt,at))<0){if(Rt=Xe[0],zt!=at&&(Rt=Rt*ie+(Xe[1]||0)),(ke=f(Rt/rn))>1)for(ke>=ie&&(ke=ie-1),tt=(Ge=B(pt,ke,ie)).length,at=Xe.length;m(Ge,Xe,tt,at)==1;)ke--,$(Ge,zt<tt?Nr:pt,tt,ie),tt=Ge.length,fe=1;else ke==0&&(fe=ke=1),tt=(Ge=pt.slice()).length;if(tt<at&&(Ge=[0].concat(Ge)),$(Xe,Ge,at,ie),at=Xe.length,fe==-1)for(;m(pt,Xe,zt,at)<1;)ke++,$(Xe,zt<at?Nr:pt,at,ie),at=Xe.length}else fe===0&&(ke++,Xe=[0]);vt[ye++]=ke,Xe[0]?Xe[at++]=wt[Fr]||0:(Xe=[wt[Fr]],at=1)}while((Fr++<tn||Xe[0]!=null)&&Dt--);Ne=Xe[0]!=null,vt[0]||vt.splice(0,1)}if(ie==A){for(ye=1,Dt=vt[0];Dt>=10;Dt/=10,ye++);it(ht,ee+(ht.e=ye+he*w-1)+1,te,Ne)}else ht.e=he,ht.r=+Ne;return ht}})(),Pe=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ue=/^([^.]+)\.$/,Ve=/^\.([^.]+)$/,Gt=/^-?(Infinity|NaN)$/,St=/^\s*\+(?=[\w.])|^\s+|\s+$/g,x=function(B,m,$,X){var F,ee=$?m:m.replace(St,"");if(Gt.test(ee))B.s=isNaN(ee)?null:ee<0?-1:1;else{if(!$&&(ee=ee.replace(Pe,(function(te,ie,fe){return F=(fe=fe.toLowerCase())=="x"?16:fe=="b"?2:8,X&&X!=F?te:ie})),X&&(F=X,ee=ee.replace(Ue,"$1").replace(Ve,"0.$1")),m!=ee))return new we(ee,F);if(we.DEBUG)throw Error(g+"Not a"+(X?" base "+X:"")+" number: "+m);B.s=null}B.c=B.e=null},Me.absoluteValue=Me.abs=function(){var B=new we(this);return B.s<0&&(B.s=1),B},Me.comparedTo=function(B,m){return v(this,new we(B,m))},Me.decimalPlaces=Me.dp=function(B,m){var $,X,F,ee=this;if(B!=null)return I(B,0,S),m==null?m=yt:I(m,0,8),it(new we(ee),B+ee.e+1,m);if(!($=ee.c))return null;if(X=((F=$.length-1)-E(this.e/w))*w,F=$[F])for(;F%10==0;F/=10,X--);return X<0&&(X=0),X},Me.dividedBy=Me.div=function(B,m){return M(this,new we(B,m),mt,yt)},Me.dividedToIntegerBy=Me.idiv=function(B,m){return M(this,new we(B,m),0,1)},Me.exponentiatedBy=Me.pow=function(B,m){var $,X,F,ee,te,ie,fe,he,ye=this;if((B=new we(B)).c&&!B.isInteger())throw Error(g+"Exponent not an integer: "+rr(B));if(m!=null&&(m=new we(m)),te=B.e>14,!ye.c||!ye.c[0]||ye.c[0]==1&&!ye.e&&ye.c.length==1||!B.c||!B.c[0])return he=new we(Math.pow(+rr(ye),te?B.s*(2-N(B)):+rr(B))),m?he.mod(m):he;if(ie=B.s<0,m){if(m.c?!m.c[0]:!m.s)return new we(NaN);(X=!ie&&ye.isInteger()&&m.isInteger())&&(ye=ye.mod(m))}else{if(B.e>9&&(ye.e>0||ye.e<-1||(ye.e==0?ye.c[0]>1||te&&ye.c[1]>=24e7:ye.c[0]<8e13||te&&ye.c[0]<=9999975e7)))return ee=ye.s<0&&N(B)?-0:0,ye.e>-1&&(ee=1/ee),new we(ie?1/ee:ee);jt&&(ee=u(jt/w+2))}for(te?($=new we(.5),ie&&(B.s=1),fe=N(B)):fe=(F=Math.abs(+rr(B)))%2,he=new we(Ct);;){if(fe){if(!(he=he.times(ye)).c)break;ee?he.c.length>ee&&(he.c.length=ee):X&&(he=he.mod(m))}if(F){if((F=f(F/2))===0)break;fe=F%2}else if(it(B=B.times($),B.e+1,1),B.e>14)fe=N(B);else{if((F=+rr(B))==0)break;fe=F%2}ye=ye.times(ye),ee?ye.c&&ye.c.length>ee&&(ye.c.length=ee):X&&(ye=ye.mod(m))}return X?he:(ie&&(he=Ct.div(he)),m?he.mod(m):ee?it(he,jt,yt,void 0):he)},Me.integerValue=function(B){var m=new we(this);return B==null?B=yt:I(B,0,8),it(m,m.e+1,B)},Me.isEqualTo=Me.eq=function(B,m){return v(this,new we(B,m))===0},Me.isFinite=function(){return!!this.c},Me.isGreaterThan=Me.gt=function(B,m){return v(this,new we(B,m))>0},Me.isGreaterThanOrEqualTo=Me.gte=function(B,m){return(m=v(this,new we(B,m)))===1||m===0},Me.isInteger=function(){return!!this.c&&E(this.e/w)>this.c.length-2},Me.isLessThan=Me.lt=function(B,m){return v(this,new we(B,m))<0},Me.isLessThanOrEqualTo=Me.lte=function(B,m){return(m=v(this,new we(B,m)))===-1||m===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,m){var $,X,F,ee,te=this,ie=te.s;if(m=(B=new we(B,m)).s,!ie||!m)return new we(NaN);if(ie!=m)return B.s=-m,te.plus(B);var fe=te.e/w,he=B.e/w,ye=te.c,Ne=B.c;if(!fe||!he){if(!ye||!Ne)return ye?(B.s=-m,B):new we(Ne?te:NaN);if(!ye[0]||!Ne[0])return Ne[0]?(B.s=-m,B):new we(ye[0]?te:yt==3?-0:0)}if(fe=E(fe),he=E(he),ye=ye.slice(),ie=fe-he){for((ee=ie<0)?(ie=-ie,F=ye):(he=fe,F=Ne),F.reverse(),m=ie;m--;F.push(0));F.reverse()}else for(X=(ee=(ie=ye.length)<(m=Ne.length))?ie:m,ie=m=0;m<X;m++)if(ye[m]!=Ne[m]){ee=ye[m]<Ne[m];break}if(ee&&(F=ye,ye=Ne,Ne=F,B.s=-B.s),(m=(X=Ne.length)-($=ye.length))>0)for(;m--;ye[$++]=0);for(m=A-1;X>ie;){if(ye[--X]<Ne[X]){for($=X;$&&!ye[--$];ye[$]=m);--ye[$],ye[X]+=A}ye[X]-=Ne[X]}for(;ye[0]==0;ye.splice(0,1),--he);return ye[0]?Ti(B,ye,he):(B.s=yt==3?-1:1,B.c=[B.e=0],B)},Me.modulo=Me.mod=function(B,m){var $,X,F=this;return B=new we(B,m),!F.c||!B.s||B.c&&!B.c[0]?new we(NaN):!B.c||F.c&&!F.c[0]?new we(F):(en==9?(X=B.s,B.s=1,$=M(F,B,0,3),B.s=X,$.s*=X):$=M(F,B,0,en),(B=F.minus($.times(B))).c[0]||en!=1||(B.s=F.s),B)},Me.multipliedBy=Me.times=function(B,m){var $,X,F,ee,te,ie,fe,he,ye,Ne,ke,Ge,tt,ht,vt,Xe=this,at=Xe.c,Rt=(B=new we(B,m)).c;if(!(at&&Rt&&at[0]&&Rt[0]))return!Xe.s||!B.s||at&&!at[0]&&!Rt||Rt&&!Rt[0]&&!at?B.c=B.e=B.s=null:(B.s*=Xe.s,at&&Rt?(B.c=[0],B.e=0):B.c=B.e=null),B;for(X=E(Xe.e/w)+E(B.e/w),B.s*=Xe.s,(fe=at.length)<(Ne=Rt.length)&&(tt=at,at=Rt,Rt=tt,F=fe,fe=Ne,Ne=F),F=fe+Ne,tt=[];F--;tt.push(0));for(ht=A,vt=d,F=Ne;--F>=0;){for($=0,ke=Rt[F]%vt,Ge=Rt[F]/vt|0,ee=F+(te=fe);ee>F;)$=((he=ke*(he=at[--te]%vt)+(ie=Ge*he+(ye=at[te]/vt|0)*ke)%vt*vt+tt[ee]+$)/ht|0)+(ie/vt|0)+Ge*ye,tt[ee--]=he%ht;tt[ee]=$}return $?++X:tt.splice(0,1),Ti(B,tt,X)},Me.negated=function(){var B=new we(this);return B.s=-B.s||null,B},Me.plus=function(B,m){var $,X=this,F=X.s;if(m=(B=new we(B,m)).s,!F||!m)return new we(NaN);if(F!=m)return B.s=-m,X.minus(B);var ee=X.e/w,te=B.e/w,ie=X.c,fe=B.c;if(!ee||!te){if(!ie||!fe)return new we(F/0);if(!ie[0]||!fe[0])return fe[0]?B:new we(ie[0]?X:0*F)}if(ee=E(ee),te=E(te),ie=ie.slice(),F=ee-te){for(F>0?(te=ee,$=fe):(F=-F,$=ie),$.reverse();F--;$.push(0));$.reverse()}for((F=ie.length)-(m=fe.length)<0&&($=fe,fe=ie,ie=$,m=F),F=0;m;)F=(ie[--m]=ie[m]+fe[m]+F)/A|0,ie[m]=A===ie[m]?0:ie[m]%A;return F&&(ie=[F].concat(ie),++te),Ti(B,ie,te)},Me.precision=Me.sd=function(B,m){var $,X,F,ee=this;if(B!=null&&B!==!!B)return I(B,1,S),m==null?m=yt:I(m,0,8),it(new we(ee),B,m);if(!($=ee.c))return null;if(X=(F=$.length-1)*w+1,F=$[F]){for(;F%10==0;F/=10,X--);for(F=$[0];F>=10;F/=10,X++);}return B&&ee.e+1>X&&(X=ee.e+1),X},Me.shiftedBy=function(B){return I(B,-9007199254740991,R),this.times("1e"+B)},Me.squareRoot=Me.sqrt=function(){var B,m,$,X,F,ee=this,te=ee.c,ie=ee.s,fe=ee.e,he=mt+4,ye=new we("0.5");if(ie!==1||!te||!te[0])return new we(!ie||ie<0&&(!te||te[0])?NaN:te?ee:1/0);if((ie=Math.sqrt(+rr(ee)))==0||ie==1/0?(((m=y(te)).length+fe)%2==0&&(m+="0"),ie=Math.sqrt(+m),fe=E((fe+1)/2)-(fe<0||fe%2),$=new we(m=ie==1/0?"5e"+fe:(m=ie.toExponential()).slice(0,m.indexOf("e")+1)+fe)):$=new we(ie+""),$.c[0]){for((ie=(fe=$.e)+he)<3&&(ie=0);;)if(F=$,$=ye.times(F.plus(M(ee,F,he,1))),y(F.c).slice(0,ie)===(m=y($.c)).slice(0,ie)){if($.e<fe&&--ie,(m=m.slice(ie-3,ie+1))!="9999"&&(X||m!="4999")){+m&&(+m.slice(1)||m.charAt(0)!="5")||(it($,$.e+mt+2,1),B=!$.times($).eq(ee));break}if(!X&&(it(F,F.e+mt+2,0),F.times(F).eq(ee))){$=F;break}he+=4,ie+=4,X=1}}return it($,$.e+mt+1,yt,B)},Me.toExponential=function(B,m){return B!=null&&(I(B,0,S),B++),Vr(this,B,m,1)},Me.toFixed=function(B,m){return B!=null&&(I(B,0,S),B=B+this.e+1),Vr(this,B,m)},Me.toFormat=function(B,m,$){var X,F=this;if($==null)B!=null&&m&&typeof m=="object"?($=m,m=null):B&&typeof B=="object"?($=B,B=m=null):$=kr;else if(typeof $!="object")throw Error(g+"Argument not an object: "+$);if(X=F.toFixed(B,m),F.c){var ee,te=X.split("."),ie=+$.groupSize,fe=+$.secondaryGroupSize,he=$.groupSeparator||"",ye=te[0],Ne=te[1],ke=F.s<0,Ge=ke?ye.slice(1):ye,tt=Ge.length;if(fe&&(ee=ie,ie=fe,fe=ee,tt-=ee),ie>0&&tt>0){for(ee=tt%ie||ie,ye=Ge.substr(0,ee);ee<tt;ee+=ie)ye+=he+Ge.substr(ee,ie);fe>0&&(ye+=he+Ge.slice(ee)),ke&&(ye="-"+ye)}X=Ne?ye+($.decimalSeparator||"")+((fe=+$.fractionGroupSize)?Ne.replace(new RegExp("\\d{"+fe+"}\\B","g"),"$&"+($.fractionGroupSeparator||"")):Ne):ye}return($.prefix||"")+X+($.suffix||"")},Me.toFraction=function(B){var m,$,X,F,ee,te,ie,fe,he,ye,Ne,ke,Ge=this,tt=Ge.c;if(B!=null&&(!(ie=new we(B)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Ct)))throw Error(g+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+rr(ie));if(!tt)return new we(Ge);for(m=new we(Ct),he=$=new we(Ct),X=fe=new we(Ct),ke=y(tt),ee=m.e=ke.length-Ge.e-1,m.c[0]=P[(te=ee%w)<0?w+te:te],B=!B||ie.comparedTo(m)>0?ee>0?m:he:ie,te=Vt,Vt=1/0,ie=new we(ke),fe.c[0]=0;ye=M(ie,m,0,1),(F=$.plus(ye.times(X))).comparedTo(B)!=1;)$=X,X=F,he=fe.plus(ye.times(F=he)),fe=F,m=ie.minus(ye.times(F=m)),ie=F;return F=M(B.minus($),X,0,1),fe=fe.plus(F.times(he)),$=$.plus(F.times(X)),fe.s=he.s=Ge.s,Ne=M(he,X,ee*=2,yt).minus(Ge).abs().comparedTo(M(fe,$,ee,yt).minus(Ge).abs())<1?[he,X]:[fe,$],Vt=te,Ne},Me.toNumber=function(){return+rr(this)},Me.toPrecision=function(B,m){return B!=null&&I(B,1,S),Vr(this,B,m,2)},Me.toString=function(B){var m,$=this,X=$.s,F=$.e;return F===null?X?(m="Infinity",X<0&&(m="-"+m)):m="NaN":(B==null?m=F<=kt||F>=Ur?U(y($.c),F):Q(y($.c),F,"0"):B===10&&Pr?m=Q(y(($=it(new we($),mt+F+1,yt)).c),$.e,"0"):(I(B,2,Ft.length,"Base"),m=K(Q(y($.c),F,"0"),10,B,X,!0)),X<0&&$.c[0]&&(m="-"+m)),m},Me.valueOf=Me.toJSON=function(){return rr(this)},Me._isBigNumber=!0,Me[Symbol.toStringTag]="BigNumber",Me[Symbol.for("nodejs.util.inspect.custom")]=Me.valueOf,b!=null&&we.set(b),we})();const z={ROUNDING_MODE:Y.ROUND_DOWN};function k(p){return new TextEncoder().encode(p)}function V(p){return typeof p=="string"?V(J(p)):new TextDecoder().decode(p)}Y.config(z);const ue="UNKNOWN_ERROR",ae="INVALID_ARGUMENT";function re(p,b=ue,M={}){const K=[];Object.keys(M).forEach((ve=>{try{K.push(ve+"="+JSON.stringify(M[ve]))}catch{K.push(ve+"="+JSON.stringify(M[ve].toString()))}}));const x=p;K.length&&(p+=" ("+K.join(", ")+")");const se=new Error(p);return se.reason=x,se.code=b,Object.keys(M).forEach((function(ve){se[ve]=M[ve]})),se}function J(p){if(typeof p!="string")throw new Error("hexToBytes only accept strings, got: "+typeof p);if(p.substr(0,2)==="0x")return J(p.substr(2));const b=new Uint8Array(Math.ceil(p.length/2));let M=0;for(let K=0;K<p.length;K+=2){const x=parseInt(p.substr(K,2),16);if(isNaN(x))throw new Error("Cannot read hex string:"+JSON.stringify(p));b[M]=x,M++}return b}function W(p){return Array.from(p).map((b=>b.toString(16).padStart(2,"0"))).join("")}function q(p,b){if(typeof p=="string"){if(b&&b.encoding==="hex"&&typeof p=="string"){let M=p;M.length>2&&M.substr(0,2)==="0x"&&(M=M.substr(2));const K=J(M);return c.keccak256(K)}return c.keccak256(k(p))}return c.keccak256(p)}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(p,b,M){return new Array(b-p.length+1).join(M||"0")+p}function H(p){let b="",M=0;const K=p.length;for(p.substring(0,2)==="0x"&&(M=2);M<K;M+=2){const x=parseInt(p.substr(M,2),16);b+=String.fromCharCode(x)}return b}function O(p){return T(p)&&p.name&&p.name.indexOf("(")!==-1?p.name:p.name+"("+Z(!1,p.inputs||[]).join(",")+")"}function D(...p){const b=p.reduce(((x,se)=>x+se.length),0),M=new Uint8Array(b);let K=0;for(const x of p)M.set(x,K),K+=x.length;return M}function Z(p,b){const M=[];return b.forEach((function(K){if(typeof K.components=="object"){if(K.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let x="";const se=K.type.indexOf("[");se>=0&&(x=K.type.substring(se));const ve=Z(p,K.components);M.push("("+ve.join(",")+")"+x)}else M.push(K.type)})),M}function Ee(p){const b=p.indexOf("("),M=p.indexOf(")");return b!==-1&&M!==-1?p.substr(0,b):p}function _e(p){const b=p.indexOf("("),M=p.indexOf(")");return b!==-1&&M!==-1?p.substr(b+1,M-b-1).replace(" ",""):""}function Se(p){return p==null?p:ze(p).toNumber()}function Ae(p){return ze(p).toNumber()}function ne(p){return C(p)?p.toString(10):""+p}function ce(p){return typeof p=="string"&&!p.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(p)?"0x"+p:Re(p)}function de(p){if(typeof p=="string")return p.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(p)?Re(p):"0x"+W(k(p));if(p instanceof Uint8Array)return"0x"+W(p);throw new Error(`toStringData: Error trying to convert ${p} (${typeof p}) to a hex string.`)}function me(p){return typeof p=="boolean"?p:ze(p).toNumber()!==0}function Te(p){const b=ze(p),M=b.toString(16);return b.isLessThan(0)?"-0x"+M.substr(1):"0x"+M}function Re(p){if(G(p))return Te(+p);if(C(p))return Te(p);if(h(p)){const b=p;if(b.indexOf("-0x")===0)return Te(b);if(b.indexOf("0x")===0)return b;if(!isFinite(b))return W(k(b))}if(p instanceof Uint8Array)return"0x"+W(p);if(le(p)||T(p))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Te(p)}function Be(p){const b=p?p.toLowerCase():"ether",M=j[b];if(M===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(M,10)}function ze(p){let b=p||0;return C(b)?b:(typeof b=="string"&&(b=b.trim()),typeof b!="string"||b.indexOf("0x")!==0&&b.indexOf("-0x")!==0?b instanceof Uint8Array?new Y(W(b),16):new Y(b,10):new Y(b.replace("0x","").toLowerCase(),16))}function Ze(p){return new Y(new Array(p).fill("1").join(""),2)}function Ye(p,b=256){const M=ze(p).integerValue();return M.isLessThan(0)?Ze(b).plus(M).plus(1):M}function nt(p,b){return L(p.toString(2),b,"0")[0]==="1"}function Tt(p){if(typeof p!="string")throw re("invalid address",ae,{arg:"address",value:p});if(p.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return p.trim().substring(0,2)!=="0x"&&(p="0x"+p),Ut(p);throw re("invalid address",ae,{arg:"address",value:p})}function lt(p,b=256){if(nt(p,b)){const M=Ze(b);return p.minus(M).minus(1)}return p}function Ot(p){return/^0x[0-9a-f]{40}$/i.test(p)}function dt(p){return!!/^(0x)?[0-9a-f]{40}$/i.test(p)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(p)&&!/^(0x)?[0-9A-F]{40}$/.test(p))||Bt(p))}function Bt(p){const b=p.replace("0x",""),M=q(b.toLowerCase());for(let K=0;K<40;K++)if(parseInt(M[K],16)>7&&b[K].toUpperCase()!==b[K]||parseInt(M[K],16)<=7&&b[K].toLowerCase()!==b[K])return!1;return!0}function Ut(p){if(p===void 0)return"";const b=p.toLowerCase().replace("0x",""),M=q(b);let K="0x";for(let x=0;x<b.length;x++)parseInt(M[x],16)>7?K+=b[x].toUpperCase():K+=b[x];return K}function ot(p){if(!Array.isArray(p))throw new Error(`Value was not an array: ${JSON.stringify(p)}`);return p}function tr(p){return Ot(p)?p:/^[0-9a-f]{40}$/.test(p)?"0x"+p:"0x"+L(Re(p).substr(2),40)}function C(p){return p instanceof Y}function h(p){return typeof p=="string"||p&&p.constructor&&p.constructor.name==="String"}function T(p){return p!==null&&!Array.isArray(p)&&typeof p=="object"}function G(p){return typeof p=="boolean"}function le(p){return Array.isArray(p)}var ge,be;function Qe(p,b){if(!p)throw new Error("jsonrpc method should be specified!");if(typeof p!="string")throw new Error(`jsonrpc must be a string, got ${typeof p}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:p,params:b||[]}}function gt(p){return Array.isArray(p)?p.every(b):b(p);function b(M){return!!M&&(M.error===void 0||M.error===null)&&M.jsonrpc==="2.0"&&M.id!==null&&"result"in M&&M.result!==void 0}}t.TransactionStatus=void 0,(ge=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",ge.confirmed="confirmed",ge.failed="failed",t.TransactionType=void 0,(be=t.TransactionType||(t.TransactionType={})).queued="queued",be.dropped="dropped",be.replaced="replaced",be.pending="pending",be.reverted="reverted",be.confirmed="confirmed",t.messageId=0;function ft(p){return ze(p)}function _t(p){return p==="latest"||p==="pending"||p==="earliest"}function et(p){return p===void 0?"latest":Pt(p)}function Pt(p){return p==null?null:_t(p)?p:Re(p)}function Au(p){return p.from&&(p.from=Xt(p.from)),p.to&&(p.to=Xt(p.to)),p.gasPrice!==void 0&&(p.gasPrice=Te(p.gasPrice)),p.gas!==void 0&&(p.gas=Te(p.gas)),p.value!==void 0&&(p.value=Te(p.value)),p.nonce!==void 0&&(p.nonce=Te(p.nonce)),p.data&&!p.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(p.data)&&(p.data="0x"+p.data),p}function vi(p){if(typeof p!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(p));if(p.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(p));if(p.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(p));return p}function Ru(p){if(typeof p!="object")throw new Error("Did not provide transaction options");if(!p.from)throw new Error('Missing "from" in transaction options');return p.from=Xt(p.from),p.to&&(p.to=Xt(p.to)),p.gasPrice!==void 0&&(p.gasPrice=Te(p.gasPrice)),p.gas!==void 0&&(p.gas=Te(p.gas)),p.value!==void 0&&(p.value=Te(p.value)),p.nonce!==void 0&&(p.nonce=Te(p.nonce)),p.data&&!p.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(p.data)&&(p.data="0x"+p.data),p}function Hi(p){return p?(p.blockNumber!==null&&(p.blockNumber=Ae(p.blockNumber)),p.transactionIndex!==null&&(p.transactionIndex=Ae(p.transactionIndex)),p.nonce=Ae(p.nonce),p.gas=Ae(p.gas),p.gasPrice=ze(p.gasPrice),p.value=ze(p.value),p):null}function iy(p){return p?(p.blockNumber!==null&&(p.blockNumber=Ae(p.blockNumber)),p.transactionIndex!==null&&(p.transactionIndex=Ae(p.transactionIndex)),p.cumulativeGasUsed=Ae(p.cumulativeGasUsed),p.gasUsed=Ae(p.gasUsed),p.effectiveGasPrice!==void 0&&p.effectiveGasPrice!==null&&(p.effectiveGasPrice=Ae(p.effectiveGasPrice)),p.logs&&le(p.logs)&&(p.logs=p.logs.map((function(b){return ts(b)}))),p.status=Ae(p.status||""),p):null}function Gi(p){return p?(p.gasLimit=Ae(p.gasLimit),p.gasUsed=Ae(p.gasUsed),p.size=Ae(p.size),p.timestamp=Ae(p.timestamp),p.number!==null&&(p.number=Ae(p.number)),p.difficulty=ze(p.difficulty),p.totalDifficulty=ze(p.totalDifficulty),le(p.transactions)&&p.transactions.forEach((function(b,M){h(b)||(p.transactions[M]=Hi(b)||p.transactions[M])})),p):null}function ts(p){return p&&(p.blockNumber&&(p.blockNumber=Ae(p.blockNumber)),p.transactionIndex&&(p.transactionIndex=Ae(p.transactionIndex)),p.logIndex&&(p.logIndex=Ae(p.logIndex)),p)}function Xt(p){if(Ot(p))return p;if(dt(p))return"0x"+p;throw new Error(`Invalid address: ${JSON.stringify(p)}`)}function ay(p){return p}function sy(p){return p&&(p.startingBlock=Ae(p.startingBlock),p.currentBlock=Ae(p.currentBlock),p.highestBlock=Ae(p.highestBlock),p.knownStates&&(p.knownStates=Ae(p.knownStates),p.pulledStates=Ae(p.pulledStates)),p)}function wu(p){if(p===null)throw re("cannot convert null value to array",ae,{arg:"value",value:p});if(p instanceof Uint8Array)return new Uint8Array(p);if(typeof p=="string"){const b=p.match(/^(0x)?[0-9a-fA-F]*$/);if(!b)throw re("invalid hexidecimal string",ae,{arg:"value",value:p});if(b[1]!=="0x")throw re("hex string must have 0x prefix",ae,{arg:"value",value:p});(p=p.substring(2)).length%2&&(p="0"+p);const M=[];for(let K=0;K<p.length;K+=2)M.push(parseInt(p.substr(K,2),16));return new Uint8Array(M)}if((function(b){if(!b||parseInt(String(b.length))!==b.length||typeof b=="string")return!1;for(let M=0;M<b.length;M++){const K=b[M];if(K<0||K>=256||parseInt(String(K))!==K)return!1}return!0})(p))return new Uint8Array(p);throw re("invalid arrayify value",void 0,{arg:"value",value:p,type:typeof p})}function oy(p,b,M){Object.defineProperty(p,b,{enumerable:!0,value:M,writable:!1})}const hR=new Y(-1),gR=new Y(0),_R=new Y(1),uy=new Y("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function cy(p){return(function(b,M){function K(ve){return new Error('unexpected character "'+b[ve]+'" at position '+ve+' in "'+b+'"')}const x={type:"",name:"",state:{allowType:!0}};let se=x;for(let ve=0;ve<b.length;ve++){const Pe=b[ve];switch(Pe){case"(":if(!se.state.allowParams)throw K(ve);se.state.allowType=!1,se.type=zi(se.type),se.components=[{type:"",name:"",parent:se,state:{allowType:!0}}],se=se.components[0];break;case")":delete se.state,se.name==="indexed"&&(se.indexed=!0,se.name=""),se.type=zi(se.type);const Ue=se;if(se=se.parent,!se)throw K(ve);delete Ue.parent,se.state.allowParams=!1,se.state.allowName=!0,se.state.allowArray=!0;break;case",":delete se.state,se.name==="indexed"&&(se.indexed=!0,se.name=""),se.type=zi(se.type);const Ve={type:"",name:"",parent:se.parent,state:{allowType:!0}};se.parent.components.push(Ve),delete se.parent,se=Ve;break;case" ":se.state.allowType&&se.type!==""&&(se.type=zi(se.type),delete se.state.allowType,se.state.allowName=!0,se.state.allowParams=!0),se.state.allowName&&se.name!==""&&(se.name==="indexed"?(se.indexed=!0,se.name=""):se.state.allowName=!1);break;case"[":if(!se.state.allowArray)throw K(ve);se.type+=Pe,se.state.allowArray=!1,se.state.allowName=!1,se.state.readArray=!0;break;case"]":if(!se.state.readArray)throw K(ve);se.type+=Pe,se.state.readArray=!1,se.state.allowArray=!0,se.state.allowName=!0;break;default:if(se.state.allowType)se.type+=Pe,se.state.allowParams=!0,se.state.allowArray=!0;else if(se.state.allowName)se.name+=Pe,delete se.state.allowArray;else{if(!se.state.readArray)throw K(ve);se.type+=Pe}}}if(se.parent)throw new Error("unexpected eof");return delete x.state,se.name==="indexed"&&(se.indexed=!0,se.name=""),x.type=zi(x.type),x})(p)}function zi(p){return p.match(/^uint($|[^1-9])/)?p="uint256"+p.substring(4):p.match(/^int($|[^1-9])/)&&(p="int256"+p.substring(3)),p}const ER=new RegExp(/^bytes([0-9]*)$/),ly=new RegExp(/^(u?int)([0-9]*)$/),vR=new RegExp(/^(.*)\[([0-9]*)\]$/),bR=function(p,b){const M=p.match(ly);return M&&parseInt(M[2])<=48?b.toNumber():b};class wr{constructor(b,M,K,x="",se){this.coerceFunc=b,this.name=M,this.type=K,this.localName=x,this.dynamic=se}}class TR extends wr{constructor(b){super(b.coerceFunc,b.name,b.type,void 0,b.dynamic),oy(this,"coder",b)}encode(b){return this.coder.encode(b)}decode(b,M){return this.coder.decode(b,M)}}class SR extends wr{constructor(b,M){super(b,"null","",M,!1)}encode(b){return wu([])}decode(b,M){if(M>b.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function rs(p,b){return new Y(p.toString(2).substr(-b),2)}class dy extends wr{constructor(b,M,K,x){const se=(K?"int":"uint")+8*M;super(b,se,se,x,!1),this.size=M,this.signed=K}encode(b){try{let M=ze(b);if(this.signed){let x=rs(uy,8*this.size-1);if(M.gt(x))throw new Error("out-of-bounds");if(x=x.plus(_R).multipliedBy(hR),M.lt(x))throw new Error("out-of-bounds")}else if(M.lt(gR)||M.gt(rs(uy,8*this.size)))throw new Error("out-of-bounds");M=rs(Ye(M,8*this.size),8*this.size),this.signed&&(M=Ye(lt(M,8*this.size),256));const K=L(Ye(M).toString(16),64);if(K.indexOf("NaN")!==-1)throw re("invalid number value, NaN",ae,{arg:this.localName,coderType:this.name,value:b,v:M,twosComplement:Ye(M),twosComplement16:Ye(M).toString(16),pad:L(Ye(M).toString(16),64),size:this.size});return J(K)}catch(M){throw re("invalid number value",ae,{arg:this.localName,coderType:this.name,value:b,message:M.toString()})}}decode(b,M){if(b.length<M+32)throw re("insufficient data for "+this.name+" type",ae,{arg:this.localName,coderType:this.name,value:Re(b.slice(M,M+32))});const K=32-this.size;let x=new Y(W(b.slice(M+K,M+32)),16);return x=this.signed?lt(x,8*this.size):rs(x,8*this.size),{consumed:32,value:this.coerceFunc(this.name,x)}}}const Br=new dy((function(p,b){return b}),32,!1,"none");class fy extends wr{constructor(b,M,K){const x="bytes"+M;super(b,x,x,K,!1),this.length=M}encode(b){const M=new Uint8Array(32);try{if(typeof b=="string"&&b.length%2!=0)throw new Error("hex string cannot be odd-length");const K=wu(b);if(K.length>this.length)throw new Error("incorrect data length");M.set(K)}catch(K){throw re("invalid "+this.name+" value. Use hex strings or Uint8Array",ae,{arg:this.localName,coderType:this.name,value:K.value||b,details:K.message})}return M}decode(b,M){if(b.length<M+32)throw re("insufficient data for "+this.name+" type",ae,{arg:this.localName,coderType:this.name,value:Re(b.slice(M,M+32))});return{consumed:32,value:this.coerceFunc(this.name,b.slice(M,M+this.length))}}}function py(p){const b=32*Math.ceil(p.length/32),M=new Uint8Array(b-p.length);return D(Br.encode(p.length),p,M)}function my(p,b,M){if(p.length<b+32)throw re("insufficient data for dynamicBytes length",ae,{arg:M,coderType:"dynamicBytes",value:Re(p.slice(b,b+32))});let K=Br.decode(p,b).value;try{K=K.toNumber()}catch(x){throw x("dynamic bytes count too large",ae,{arg:M,coderType:"dynamicBytes",value:K.toString()})}if(p.length<b+32+K)throw re("insufficient data for dynamicBytes type",ae,{arg:M,coderType:"dynamicBytes",value:Re(p.slice(b,b+32+K))});return{consumed:32+32*Math.ceil(K/32),value:p.slice(b+32,b+32+K)}}function ns(p){return 32*Math.ceil(p/32)}function yy(p,b){if(!Array.isArray(b)){if(!b||typeof b!="object")throw re("invalid tuple value",ae,{coderType:"tuple",value:b});{const Ue=[];p.forEach((function(Ve){Ue.push(b[Ve.localName])})),b=Ue}}if(p.length!==b.length)throw re("types/value length mismatch",ae,{coderType:"tuple",value:b});const M=[];p.forEach((function(Ue,Ve){M.push({dynamic:Ue.dynamic,value:Ue.encode(b[Ve])})}));let K=0,x=0;M.forEach((function(Ue){Ue.dynamic?(K+=32,x+=ns(Ue.value.length)):K+=ns(Ue.value.length)}));let se=0,ve=K;const Pe=new Uint8Array(K+x);return M.forEach((function(Ue){Ue.dynamic?(Pe.set(Br.encode(ve),se),se+=32,Pe.set(Ue.value,ve),ve+=ns(Ue.value.length)):(Pe.set(Ue.value,se),se+=ns(Ue.value.length))})),Pe}class AR extends Array{}class RR extends wr{constructor(b,M,K,x){super(b,"array",M.type+"["+(K>=0?K:"")+"]",x,K===-1||M.dynamic),this.coder=M,this.length=K}encode(b){if(!Array.isArray(b))throw re("expected array value",ae,{arg:this.localName,coderType:"array",value:b});let M=this.length,K=new Uint8Array(0);M===-1&&(M=b.length,K=Br.encode(M)),(function(se,ve,Pe){if(Pe||(Pe=""),se<ve)throw re("missing argument"+Pe,"MISSING_ARGUMENT",{count:se,expectedCount:ve});if(se>ve)throw re("too many arguments"+Pe,"UNEXPECTED_ARGUMENT",{count:se,expectedCount:ve})})(M,b.length,"in coder array"+(this.localName?" "+this.localName:""));const x=[];for(let se=0;se<b.length;se++)x.push(this.coder);return D(K,yy(x,b))}decode(b,M){let K=0,x=this.length;if(x===-1){let Pe;try{Pe=Br.decode(b,M)}catch(Ue){throw re("insufficient data for dynamic array length",ae,{arg:this.localName,coderType:"array",value:Ue.value})}try{x=Pe.value.toNumber()}catch{throw re("array count too large",ae,{arg:this.localName,coderType:"array",value:Pe.value.toString()})}K+=Pe.consumed,M+=Pe.consumed}const se=[];for(let Pe=0;Pe<x;Pe++)se.push(new TR(this.coder));const ve=(function(Pe,Ue,Ve){const Gt=Ve;let St=0;const Me=[];return Pe.forEach((function(Ct){let mt;if(Ct.dynamic){const yt=Br.decode(Ue,Ve);mt=Ct.decode(Ue,Gt+yt.value.toNumber()),mt.consumed=yt.consumed}else mt=Ct.decode(Ue,Ve);mt.value!==void 0&&Me.push(mt.value),Ve+=mt.consumed,St+=mt.consumed})),{value:Me,consumed:St}})(se,b,M);return ve.consumed+=K,ve.value=this.coerceFunc(this.type,ve.value),ve}}class Iu extends wr{constructor(b,M,K){let x=!1;const se=[];M.forEach((function(ve){ve.dynamic&&(x=!0),se.push(ve.type)})),super(b,"tuple","tuple("+se.join(",")+")",K,x),this.coders=M}encode(b){return yy(this.coders,b)}decode(b,M){const K=(function(x,se,ve){const Pe=ve;let Ue=0;const Ve=new AR;return x.forEach((function(Gt){let St;if(Gt.dynamic){const Me=Br.decode(se,ve);St=Gt.decode(se,Pe+Me.value.toNumber()),St.consumed=Me.consumed}else St=Gt.decode(se,ve);St.value!==void 0&&Ve.push(St.value),ve+=St.consumed,Ue+=St.consumed})),x.forEach((function(Gt,St){let Me=Gt.localName;Me&&(Me==="length"&&(Me="_length"),Ve[Me]!==null&&Ve[Me]!==void 0||(Ve[Me]=Ve[St]))})),{value:Ve,consumed:Ue}})(this.coders,b,M);return K.value=this.coerceFunc(this.type,K.value),K}}const wR={address:class extends wr{constructor(p,b){super(p,"address","address",b,!1)}encode(p){const b=new Uint8Array(32),M=p.trim();if(!dt(M))throw re("invalid address format",ae,{arg:this.localName,coderType:"address",value:p});try{b.set(J(Xt(M)),12)}catch(K){throw re(`invalid address (${K.message})`,ae,{arg:this.localName,coderType:"address",value:p})}return b}decode(p,b){if(p.length<b+32)throw re("insufficuent data for address type",ae,{arg:this.localName,coderType:"address",value:Re(p.slice(b,b+32)),missingBytes:b+32-p.length});return{consumed:32,value:this.coerceFunc("address",Tt(Re(p.slice(b+12,b+32))))}}},bool:class extends wr{constructor(p,b){super(p,"bool","bool",b,!1)}encode(p){return Br.encode(p?1:0)}decode(p,b){try{const M=Br.decode(p,b);return{consumed:M.consumed,value:this.coerceFunc("bool",!M.value.isZero())}}catch(M){throw M.reason==="insufficient data for uint256 type"?re("insufficient data for boolean type",ae,{arg:this.localName,coderType:"boolean",value:M.value}):M}}},string:class extends wr{constructor(p,b){super(p,"string","string",b,!0)}encode(p){if(typeof p!="string")throw re("invalid string value",ae,{arg:this.localName,coderType:"string",value:p});return py(k(p))}decode(p,b){const M=my(p,b,this.localName);return M.value=this.coerceFunc("string",V(M.value)),M}},bytes:class extends wr{constructor(p,b){super(p,"bytes","bytes",b,!0)}encode(p){try{return py(wu(p))}catch(b){throw b("invalid bytes value",ae,{arg:this.localName,coderType:"bytes",value:b.value})}}decode(p,b){const M=my(p,b,this.localName);return M.value=this.coerceFunc("bytes",M.value),M}},function:class extends fy{constructor(p,b){super(p,24,b)}}};function is(p,b){const M=wR[b.type];if(M)return new M(p,b.name);let K=b.type.match(ly);if(K){const x=parseInt(K[2]||"256");if(x===0||x>256||x%8!=0)throw re("invalid "+K[1]+" bit length",ae,{arg:"param",value:b});return new dy(p,x/8,K[1]==="int",b.name)}if(K=b.type.match(ER),K){const x=parseInt(K[1]);if(x===0||x>32)throw re("invalid bytes length",ae,{arg:"param",value:b});return new fy(p,x,b.name)}if(K=b.type.match(vR),K){const x=Object.assign({},b),se=parseInt(K[2]||"-1");return x.type=K[1],new RR(p,is(p,x),se,b.name)}if(b.type.substring(0,5)==="tuple")return(function(x,se,ve){se||(se=[]);const Pe=se.map((Ue=>is(x,Ue)));return new Iu(x,Pe,ve)})(p,b.components,b.name);if(b.type==="")return new SR(p,b.name);throw re("invalid type",ae,{arg:"type",value:b.type,fullType:b})}class Ou{constructor(b){(function(M,K){if(!(M instanceof K))throw re("missing new","MISSING_NEW",{name:K.name})})(this,Ou),b||(b=bR),oy(this,"coerceFunc",b)}encode(b,M){if(b.length!==M.length)throw re("types/values length mismatch",ae,{count:{types:b.length,values:M.length},value:{types:b,values:M}});const K=b.map((x=>typeof x=="string"?cy(x):x)).map((x=>is(this.coerceFunc,x)));return new Iu(this.coerceFunc,K,"_").encode(M)}decode(b,M){const K=b.map((x=>typeof x=="string"?cy(x):x)).map((x=>is(this.coerceFunc,x)));return new Iu(this.coerceFunc,K,"_").decode(M,0).value}}const hy=new Ou;var gy,De;function qe(p,b,M,K){var x,se=arguments.length,ve=se<3?b:K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(p,b,M,K);else for(var Pe=p.length-1;Pe>=0;Pe--)(x=p[Pe])&&(ve=(se<3?x(ve):se>3?x(b,M,ve):x(b,M))||ve);return se>3&&ve&&Object.defineProperty(b,M,ve),ve}function Le(p,b){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(p,b)}t.coder=void 0,(gy=t.coder||(t.coder={})).encodeParams=function(p,b){return W(hy.encode(p,b))},gy.decodeParams=function(p,b){if(p.length>0&&(!b||b==="0x"||b==="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 hy.decode(p,J("0x"+b.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Fe{constructor(b){this.callName=b.callName,this.params=b.params||0,this.inputFormatter=b.inputFormatter||null,this.outputFormatter=b.outputFormatter}validateArgs(b){if(b.length!==this.params)throw M=this.callName,K=b.length,x=this.params,new Error(`Invalid number of input parameters to RPC method "${M}" given: ${K}, expected: ${x}`);var M,K,x}formatInput(b){return this.inputFormatter?this.inputFormatter.map((function(M,K){return M?M(b[K]):b[K]})):b}formatOutput(b){return b!==null?this.outputFormatter(b):null}toPayload(b){const M=this.formatInput(b);return this.validateArgs(M),{method:this.callName,params:M}}async execute(b,...M){const K=this.toPayload(M);if(!b)throw new Error("Missing RequestManager in method#exec");const x=await b.sendAsync(K);return this.formatOutput(x)}}class Zt{constructor(b){this.getter=b.getter,this.outputFormatter=b.outputFormatter}formatOutput(b){return this.outputFormatter(b)}async execute(b,...M){const K=await b.sendAsync({method:this.getter,params:[]});return this.formatOutput(K)}}function _y(p){return new Promise((b=>setTimeout(b,p)))}t.eth=void 0,(De=t.eth||(t.eth={})).eth_getBalance=new Fe({callName:"eth_getBalance",params:2,inputFormatter:[Xt,et],outputFormatter:ft}),De.eth_getStorageAt=new Fe({callName:"eth_getStorageAt",params:3,inputFormatter:[Xt,Re,et],outputFormatter:ce}),De.eth_getCode=new Fe({callName:"eth_getCode",params:2,inputFormatter:[Xt,et],outputFormatter:ce}),De.eth_getBlockByHash=new Fe({callName:"eth_getBlockByHash",params:2,inputFormatter:[Pt,function(p){return!!p}],outputFormatter:Gi}),De.eth_getBlockByNumber=new Fe({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Pt,function(p){return!!p}],outputFormatter:Gi}),De.eth_getUncleByBlockHashAndIndex=new Fe({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Pt,Re],outputFormatter:Gi}),De.eth_getUncleByBlockNumberAndIndex=new Fe({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Pt,Re],outputFormatter:Gi}),De.eth_getBlockTransactionCountByHash=new Fe({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Pt],outputFormatter:Ae}),De.eth_getBlockTransactionCountByNumber=new Fe({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Pt],outputFormatter:Ae}),De.eth_getUncleCountByBlockHash=new Fe({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Pt],outputFormatter:Ae}),De.eth_getUncleCountByBlockNumber=new Fe({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Pt],outputFormatter:Ae}),De.eth_getTransactionByHash=new Fe({callName:"eth_getTransactionByHash",params:1,inputFormatter:[vi],outputFormatter:Hi}),De.eth_getTransactionByBlockHashAndIndex=new Fe({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Pt,Re],outputFormatter:Hi}),De.eth_getTransactionByBlockNumberAndIndex=new Fe({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Pt,Re],outputFormatter:Hi}),De.eth_getTransactionReceipt=new Fe({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[vi],outputFormatter:iy}),De.eth_getTransactionCount=new Fe({callName:"eth_getTransactionCount",params:2,inputFormatter:[Xt,et],outputFormatter:Ae}),De.eth_sendRawTransaction=new Fe({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ce}),De.web3_sha3=new Fe({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ce}),De.eth_sendTransaction=new Fe({callName:"eth_sendTransaction",params:1,inputFormatter:[Ru],outputFormatter:ce}),De.eth_sign=new Fe({callName:"eth_sign",params:2,inputFormatter:[Xt,null],outputFormatter:ce}),De.eth_call=new Fe({callName:"eth_call",params:2,inputFormatter:[Au,et],outputFormatter:ce}),De.eth_estimateGas=new Fe({callName:"eth_estimateGas",params:1,inputFormatter:[Au],outputFormatter:Ae}),De.eth_submitWork=new Fe({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:me}),De.eth_getWork=new Fe({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ot}),De.eth_coinbase=new Zt({getter:"eth_coinbase",outputFormatter:tr}),De.eth_mining=new Zt({getter:"eth_mining",outputFormatter:me}),De.eth_hashrate=new Zt({getter:"eth_hashrate",outputFormatter:Ae}),De.eth_syncing=new Zt({getter:"eth_syncing",outputFormatter:sy}),De.eth_gasPrice=new Zt({getter:"eth_gasPrice",outputFormatter:ft}),De.eth_accounts=new Zt({getter:"eth_accounts",outputFormatter:ot}),De.eth_blockNumber=new Zt({getter:"eth_blockNumber",outputFormatter:Ae}),De.eth_protocolVersion=new Zt({getter:"eth_protocolVersion",outputFormatter:Ae}),De.web3_clientVersion=new Zt({getter:"web3_clientVersion",outputFormatter:ne}),De.net_version=new Zt({getter:"net_version",outputFormatter:ne}),De.shh_version=new Fe({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ae}),De.shh_post=new Fe({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:me}),De.personal_newAccount=new Fe({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:tr}),De.personal_importRawKey=new Fe({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:tr}),De.personal_sign=new Fe({callName:"personal_sign",params:3,inputFormatter:[de,Xt,null],outputFormatter:ce}),De.personal_ecRecover=new Fe({callName:"personal_ecRecover",params:2,inputFormatter:[de,null],outputFormatter:tr}),De.personal_unlockAccount=new Fe({callName:"personal_unlockAccount",params:3,inputFormatter:[Xt,null,Se],outputFormatter:me}),De.personal_sendTransaction=new Fe({callName:"personal_sendTransaction",params:2,inputFormatter:[Ru,null],outputFormatter:ce}),De.personal_lockAccount=new Fe({callName:"personal_lockAccount",params:1,inputFormatter:[Xt],outputFormatter:me}),De.personal_listAccounts=new Zt({getter:"personal_listAccounts",outputFormatter:ot}),De.net_listening=new Zt({getter:"net_listening",outputFormatter:me}),De.net_peerCount=new Zt({getter:"net_peerCount",outputFormatter:Ae}),De.eth_newFilter=new Fe({callName:"eth_newFilter",params:1,inputFormatter:[ay],outputFormatter:Re}),De.eth_getLogs=new Fe({callName:"eth_getLogs",params:1,inputFormatter:[ot],outputFormatter:ot}),De.eth_newBlockFilter=new Fe({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Re}),De.eth_newPendingTransactionFilter=new Fe({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Re}),De.eth_uninstallFilter=new Fe({callName:"eth_uninstallFilter",params:1,inputFormatter:[Re],outputFormatter:me}),De.eth_getFilterLogs=new Fe({callName:"eth_getFilterLogs",params:1,inputFormatter:[Re],outputFormatter:ot}),De.eth_getFilterChanges=new Fe({callName:"eth_getFilterChanges",params:1,inputFormatter:[Re],outputFormatter:ot}),De.eth_submitHashrate=new Fe({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:me}),De.shh_newIdentity=new Fe({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ce}),De.shh_hasIdentity=new Fe({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:me}),De.shh_newGroup=new Fe({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ce}),De.shh_addToGroup=new Fe({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:me}),De.shh_newFilter=new Fe({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Re}),De.shh_uninstallFilter=new Fe({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:me}),De.shh_getLogs=new Fe({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ot}),De.shh_getFilterMessages=new Fe({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ot}),De.shh_getFilterChanges=new Fe({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ot}),De.shh_getMessages=new Fe({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ot});function $e(p,b){const M=t.eth[b];if(!M)throw new Error(`Could not find the method/property named ${b.toString()}`);Object.defineProperty(p,b,{value:function(...K){return M.execute(this,...K)}})}class je{constructor(b){this.provider=b,this.requests=new Map}async sendAsync(b){const M=await this.provider;if(!M)throw new Error("Provider not set or invalid");const K=Qe(b.method,b.params),x=s();return this.requests.set(K.id,x),M.sendAsync(K,((se,ve)=>{this.requests.delete(K.id),se?x.reject(se):gt(ve)?x.resolve(ve.result):x.reject((function(Pe){const Ue=Pe&&Pe.error&&Pe.error.message?Pe.error.message:"Invalid JSON RPC response: "+JSON.stringify(Pe);return new Error(Ue)})(ve))})),x}setProvider(b){this.provider=b}async getConfirmedTransaction(b){const M=await this.waitForCompletion(b);if(this.isFailure(M))throw new Error(`Transaction "${b}" failed`);return M}async waitForCompletion(b,M){const K=vi(b);if(await this.isTxDropped(K,M)){const x=await this.getTransactionAndReceipt(K);return Object.assign(Object.assign({},x),{status:t.TransactionStatus.failed})}for(;;){const x=await this.getTransactionAndReceipt(K);if(!this.isPending(x)&&x.receipt)return Object.assign(Object.assign({},x),{status:this.isFailure(x)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await _y(2e3)}}async getTransaction(b){let M,K=null;const x=vi(b);try{const ve=(await this.eth_accounts())[0];ve&&(K=await this.eth_getTransactionCount(ve,"latest"))}catch{K=null}try{if(M=await this.eth_getTransactionByHash(x),M===null)return null}catch{return null}if(M.blockNumber===null){if(K!==null){if(M.nonce<K)return{hash:x,type:t.TransactionType.replaced,nonce:M.nonce};if(M.nonce>K)return{hash:x,type:t.TransactionType.queued,nonce:M.nonce}}return Object.assign({type:t.TransactionType.pending},M)}let se;try{if(se=await this.eth_getTransactionReceipt(x),se===null||se.status===0)return Object.assign({type:t.TransactionType.reverted},M)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},M),{receipt:se})}async isTxDropped(b,M=15){let K=M;for(;K>0;){if(await this.getTransactionAndReceipt(b)!==null)return!1;K-=1,await _y(2e3)}return!0}async getTransactionAndReceipt(b){b=vi(b);const[M,K]=await Promise.all([this.eth_getTransactionByHash(b),this.eth_getTransactionReceipt(b)]);return Object.assign(Object.assign({},M),{receipt:K})}isPending(b){return b&&b.blockNumber===null}isFailure(b){return b&&(!b.receipt||b.receipt.status===0)}}qe([$e,Le("design:type",Function)],je.prototype,"web3_clientVersion",void 0),qe([$e,Le("design:type",Function)],je.prototype,"web3_sha3",void 0),qe([$e,Le("design:type",Function)],je.prototype,"net_version",void 0),qe([$e,Le("design:type",Function)],je.prototype,"net_peerCount",void 0),qe([$e,Le("design:type",Function)],je.prototype,"net_listening",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_protocolVersion",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_syncing",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_coinbase",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_mining",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_hashrate",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_gasPrice",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_accounts",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_blockNumber",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getBalance",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getStorageAt",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getTransactionCount",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getBlockTransactionCountByHash",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getBlockTransactionCountByNumber",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getUncleCountByBlockHash",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getUncleCountByBlockNumber",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getCode",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_sign",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_sendTransaction",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_sendRawTransaction",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_call",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_estimateGas",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getBlockByHash",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getBlockByNumber",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getTransactionByHash",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getTransactionReceipt",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getUncleByBlockHashAndIndex",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_newFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_newBlockFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_newPendingTransactionFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_uninstallFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getFilterChanges",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getFilterLogs",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getLogs",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_getWork",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_submitWork",void 0),qe([$e,Le("design:type",Function)],je.prototype,"eth_submitHashrate",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_post",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_version",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_newIdentity",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_hasIdentity",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_newGroup",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_addToGroup",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_newFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_uninstallFilter",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_getFilterChanges",void 0),qe([$e,Le("design:type",Function)],je.prototype,"shh_getMessages",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_unlockAccount",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_newAccount",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_listAccounts",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_lockAccount",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_importRawKey",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_sendTransaction",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_sign",void 0),qe([$e,Le("design:type",Function)],je.prototype,"personal_ecRecover",void 0);class Ey{constructor(b){this.json=b,this._inputTypes=b.inputs||[],this._outputTypes=b.outputs||[],this._constant=!!b.constant,this._payable=!!b.payable||b.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in b&&!b.constant||b.stateMutability==="nonpayable",this._name=O(b)}extractDefaultBlock(b){return b.length>this._inputTypes.length&&!T(b[b.length-1])&&et(b.pop())||"latest"}validateArgs(b){if(b.some((se=>se===void 0)))throw new Error("Invalid call, some arguments are undefined");const M=b.filter((function(se){return!(T(se)===!0&&le(se)===!1&&C(se)===!1&&!(se instanceof Uint8Array))}));if(M.length!==this._inputTypes.length)throw K=M.length,x=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${K}, expected: ${x}`);var K,x}toPayload(b){let M={to:void 0,data:void 0,value:void 0,from:void 0};b.length>this._inputTypes.length&&T(b[b.length-1])&&(M=b.pop()),this.validateArgs(b);const K=this.signature();let x=t.coder.encodeParams(this._inputTypes,b);return x.indexOf("0x")===0&&(x=x.substr(2)),M.data="0x"+K+x,M}signature(){return q(this._name).slice(0,8)}unpackOutput(b){if(!b)return;const M=b.length>=2?b.slice(2):b,K=t.coder.decodeParams(this._outputTypes,M);return K.length===1?K[0]:K}async execute(b,M,...K){if(!b)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const x=this.toPayload(K);if(x.to=M,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 b.eth_sendTransaction(x)}{const x=this.extractDefaultBlock(K),se=this.toPayload(K);se.to=M;const ve=await b.eth_call(se,x);return this.unpackOutput(ve)}}estimateGas(b,M,...K){if(!(b instanceof je))throw new Error("estimateGas needs to receive a RequestManager as first argument");const x=this.toPayload(K);return x.to=M,b.eth_estimateGas(x)}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}attachToContract(b){const M=this.displayName(),K=Object.assign(((...x)=>this.execute(b.requestManager,b.address,...x)),{estimateGas:this.estimateGas.bind(this,b.requestManager,b.address),toPayload:(...x)=>this.toPayload(x),toRPCMessage:(...x)=>{const se=this.extractDefaultBlock(x),ve=this.toPayload(x);return ve.to=b.address,{method:"eth_call",params:[ve,se]}},unpackOutput:x=>this.unpackOutput(x)});b[M]||(b[M]=K),b[M][this.typeName()]=K}}function vy(p){if(p==null)return null;const b=String(p).toString();return b.indexOf("0x")===0?b:W(k(b))}class Pu{constructor(b){this.requestManager=b,this.isStarted=!1,this.isDisposed=!1,this.formatter=M=>M,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(b){if(this.isDisposed)throw new Error("The filter was disposed");b&&(this.callbacks.push(b),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 b=await this.getNewFilter();if(!b)throw new Error("Could not create a filter, response: "+JSON.stringify(b));this.filterId.resolve(b)}catch(b){throw b}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const b=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: ${b}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const M=await this.getChanges();M&&this.callbacks.forEach((K=>{this.formatter?M.forEach((x=>{K(this.formatter(x))})):M.forEach((x=>K(x)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((b=()=>this.poll(),function(){b().catch((M=>console.error(M)))}),500))}else this.stopSemaphore.resolve(1);var b}}class Wi extends Pu{constructor(b,M,K=(x=>x)){super(b),this.requestManager=b,this.options=M,this.formatter=K,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(x){return vy(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"?Pt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Pt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const b=await this.filterId;return this.requestManager.eth_getFilterLogs(b)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const b=await this.filterId;return this.requestManager.eth_getFilterChanges(b)}async uninstall(){const b=await this.filterId;return this.requestManager.eth_uninstallFilter(b)}}class Nu{constructor(b,M,K){this.requestManager=b,this.address=K,this._anonymous=!1,this._params=M.inputs||[],this._name=O(M),this._anonymous=M.anonymous||!1}types(b){return this._params.filter((function(M){return M.indexed===b}))}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}signature(){return q(this._name)}encode(b={},M={}){const K={topics:[],address:this.address};M.fromBlock!==void 0&&(K.fromBlock=Pt(M.fromBlock)||void 0),M.toBlock!==void 0&&(K.toBlock=Pt(M.toBlock)||void 0),K.topics=K.topics||[],this._anonymous||K.topics.push("0x"+this.signature());const x=this._params.filter((function(se){return se.indexed===!0})).map((function(se){const ve=b[se.name];return ve==null?null:le(ve)?ve.map((function(Pe){return"0x"+t.coder.encodeParams([se],[Pe])})):"0x"+t.coder.encodeParams([se],[ve])}));return K.topics=K.topics.concat(x),K}decode(b){b.data=b.data||"",b.topics=b.topics||[];const M=(this._anonymous?b.topics:b.topics.slice(1)).map((function(Pe){return Pe.slice(2)})).join(""),K=t.coder.decodeParams(this.types(!0),M),x=b.data.slice(2),se=t.coder.decodeParams(this.types(!1),x),ve=this._params.reduce((function(Pe,Ue){return Pe[Ue.name]=Ue.indexed?K.shift():se.shift(),Pe}),{});return Object.assign(Object.assign({},ts(b)),{event:this.displayName(),address:b.address,args:ve})}async execute(b,M){const K=this.encode(b,M),x=this.decode.bind(this);return new Wi(this.requestManager,K,x)}attachToContract(b){const M=this.execute.bind(this),K=this.displayName();b.events[K]||(b.events[K]=M),b.events[K][this.typeName()]=this.execute.bind(this,b)}}class IR{constructor(b,M,K){this._requestManager=b,this._json=M,this._address=K}encode(b={}){const M={address:this._address};return b.fromBlock!==void 0&&(M.fromBlock=Pt(b.fromBlock)||void 0),b.toBlock!==void 0&&(M.toBlock=Pt(b.toBlock)||void 0),M}decode(b){b.data=b.data||"";const M=le(b.topics)&&h(b.topics[0])?b.topics[0].slice(2):"",K=this._json.filter((function(x){return M===q(O(x))}))[0];return K?new Nu(this._requestManager,K,this._address).decode(b):ts(b)}async execute(b){const M=this.encode(b),K=this.decode.bind(this);return new Wi(this._requestManager,M,K)}getAllEventsFunction(){return this.execute.bind(this)}}class by{constructor(b,M,K){var x;this.requestManager=b,this.abi=M,this.address=K,this.events={},this.transactionHash=null,this.address=K,this.abi=M,(x=this).abi.filter((function(se){return se.type==="function"})).map((function(se){return new Ey(se)})).forEach((function(se){se.attachToContract(x)})),this.allEvents=(function(se){const ve=se.abi.filter((function(Ue){return Ue.type==="event"})),Pe=new IR(se.requestManager,ve,se.address);return ve.map((function(Ue){return new Nu(se.requestManager,Ue,se.address)})).forEach((function(Ue){Ue.attachToContract(se)})),Pe.getAllEventsFunction()})(this)}}t.AbstractFilter=Pu,t.BigNumber=Y,t.Contract=by,t.ContractFactory=class{constructor(p,b){this.requestManager=p,this.abi=b}async deploy(...p){let b;const M=p[p.length-1];if(T(M)&&!le(M)&&(b=p.pop()),!b)throw new Error("Missing options object");if(!b.data||typeof b.data!="string")throw new Error("Invalid options.data");if(Ae(b.value)>0&&!(this.abi.filter((function(Ve){return Ve.type==="constructor"&&Ve.inputs.length===p.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const K=(x=this.abi,se=p,x.filter((function(Ve){return Ve.type==="constructor"&&Ve.inputs&&Ve.inputs.length===se.length})).map((function(Ve){return Ve.inputs||[]})).map((function(Ve){return t.coder.encodeParams(Ve,se)}))[0]||"");var x,se;b.data+=K,b.gas||(b.gas=await this.requestManager.eth_estimateGas(b));const ve=await this.requestManager.eth_sendTransaction(b);if(!ve)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const Pe=await(async function(Ve,Gt){const St=s();let Me=0;const Ct=()=>{Me++,Me>50?St.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Ve.eth_getTransactionReceipt(Gt).then((kt=>{kt&&kt.blockHash?St.resolve(kt):setTimeout(Ct,1e3)}),(kt=>St.reject(kt)))};Ct();const mt=await St,yt=await Ve.eth_getCode(mt.contractAddress,"latest");if(yt&&yt.length>3)return mt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:yt,receipt:mt})})(this.requestManager,ve),Ue=await this.at(Pe);return Ue.transactionHash=ve,Ue}async at(p){if(!dt(p))throw new TypeError(`Invalid address ${JSON.stringify(p)}`);return new by(this.requestManager,this.abi,p)}},t.EthBlockFilter=class extends Wi{constructor(p){super(p,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=Wi,t.EthPendingTransactionFilter=class extends Wi{constructor(p){super(p,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(p,b={}){this.host=p,this.options=b,this.debug=!1,this.host=p||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(p,b){try{let M=null;M=p instanceof Array?p.map((se=>n(se))):n(p);const K=this.options.fetch||globalThis.fetch;if(K===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(M),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+x.body),K(this.host,x).then((async se=>{if(se.ok){const ve=await se.json();this.debug&&console.log("RECV << "+JSON.stringify(ve)),ve.error?b(Object.assign(new Error(ve.error.json||ve.error),ve.error)):b(null,ve)}else{const ve=(typeof se.text=="function"?await se.text().catch((()=>"")):"").trim().slice(0,512),Pe="External error. response code: "+se.status+(ve?" — "+ve:"");this.debug&&console.log("ERR << "+Pe),b(new Error(Pe))}}),(se=>{this.debug&&console.log("ERR << "+JSON.stringify(se)),b(se)}))}catch(M){this.debug&&console.log("ERR << "+JSON.stringify(M)),b(M)}}},t.Method=Fe,t.Property=Zt,t.RequestManager=je,t.SHHFilter=class extends Pu{constructor(p,b){super(p),this.requestManager=p,this.options=b,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(M){return vy(M)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const p=await this.filterId;return this.requestManager.shh_getMessages(p)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const p=await this.filterId;return this.requestManager.shh_getFilterChanges(p)}async uninstall(){const p=await this.filterId;return this.requestManager.shh_uninstallFilter(p)}},t.SolidityEvent=Nu,t.SolidityFunction=Ey,t.WebSocketProvider=class{constructor(p,b={}){this.url=p,this.options=b,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const p=this.connection;this.timeout(new Error("Provider disposed.")),p.then((b=>b.close())).catch((b=>{this.debug&&console.error(b)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(p,b){const M=[];let K;if(p instanceof Array)K=Promise.all(p.map((x=>{const se=s();try{const ve=n(x);M.push(ve),this.responseCallbacks.set(ve.id,se)}catch(ve){se.reject(ve)}return se})));else{const x=s();try{const se=n(p);M.push(se),this.responseCallbacks.set(se.id,x)}catch(se){x.reject(se)}K=x}K.then((x=>b(null,x)),(x=>b(x))),this.connection.then((x=>{M.forEach((se=>{const ve=JSON.stringify(se);this.debug&&console.log("SEND >> "+ve),x.send(ve)}))}),(x=>{b(x)}))}parseResponse(p){const b=[];return p.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((M=>{let K=M;this.lastChunk&&(K=this.lastChunk+K);let x=null;try{x=JSON.parse(K)}catch{return this.lastChunk=K,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",x&&b.push(x)})),b}processMessage(p){if("id"in p){const b=p.id,M=this.responseCallbacks.get(b);if(!M)return void console.error("Error: Received a response for an unknown request",p);this.responseCallbacks.delete(b),p.error!==void 0&&p.error!==null?M.reject(Object.assign(new Error(p.error.message||p.error),p.error)):"result"in p&&M.resolve(p)}else this.notificationCallbacks.forEach((b=>b(null,p)))}timeout(p){this.connection&&this.connection.isPending||(this.connection=s());const b=p||new Error("Connection timeout");this.responseCallbacks.forEach((M=>M.reject(b))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((M=>M.close())).catch((M=>{this.debug&&console.error(M)})),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const p=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!p)throw new Error("Please provide a WebSocketConstructor");const b=new p(this.url,this.options.protocol);b.onopen=()=>{this.connection.resolve(b)},b.onerror=M=>{const K=new Error("Error in web socket");K.data=M,this.timeout(K)},b.onclose=M=>{this.timeout(new Error(`Connection closed (${M&&M.reason||"Unknown reason"})`))},b.onmessage=M=>{const K=typeof M.data=="string"?M.data:"";this.debug&&console.log("RECV << "+M.data),this.parseResponse(K).forEach((x=>{x instanceof Array?x.forEach((se=>this.processMessage(se))):this.processMessage(x)}))}}},t.bytesToHex=W,t.bytesToUtf8String=V,t.concatBytes=D,t.default=je,t.extractDisplayName=Ee,t.extractTypeName=_e,t.fromAscii=function(p,b=0){let M="";for(let K=0;K<p.length;K++){const x=p.charCodeAt(K).toString(16);M+=x.length<2?"0"+x:x}return"0x"+M.padEnd(b,"0")},t.fromDecimal=Te,t.fromTwosComplement=lt,t.fromWei=function(p,b){const M=ze(p).dividedBy(Be(b));return C(p)?M:M.toString(10)},t.getAddress=Tt,t.getValueOfUnit=Be,t.hexToBytes=J,t.inputAddressFormatter=Xt,t.inputBlockNumberFormatter=Pt,t.inputCallFormatter=Au,t.inputDefaultBlockNumberFormatter=et,t.inputFilterOptions=ay,t.inputPostFormatter=function(p){return p?(p.ttl=Te(p.ttl),p.workToProve=Te(p.workToProve),p.priority=Te(p.priority),le(p.topics)||(p.topics=p.topics?[p.topics]:[]),p.topics=p.topics.map((function(b){return b.indexOf("0x")===0?b:"0x"+W(k(b))})),p):null},t.inputTransactionFormatter=Ru,t.inputTransactionId=vi,t.isAddress=dt,t.isArray=le,t.isBigNumber=C,t.isBloom=function(p){return!!/^(0x)?[0-9a-f]{512}$/i.test(p)&&!!/^(0x)?[0-9a-f]{512}$/i.test(p)},t.isBoolean=G,t.isChecksumAddress=Bt,t.isFunction=function(p){return typeof p=="function"},t.isHex=function(p){return typeof p=="string"&&/^0x[0-9a-fA-F]+$/.test(p)},t.isJson=function(p){try{return!!JSON.parse(p)}catch{return!1}},t.isObject=T,t.isPredefinedBlockNumber=_t,t.isStrictAddress=Ot,t.isString=h,t.isTopic=function(p){return!!/^(0x)?[0-9a-f]{64}$/i.test(p)&&!!/^(0x)?[0-9a-f]{64}$/i.test(p)},t.isValidResponse=gt,t.outputBigNumberFormatter=ft,t.outputBlockFormatter=Gi,t.outputLogFormatter=ts,t.outputPostFormatter=function(p){return p?(p.expiry=Ae(p.expiry),p.sent=Ae(p.sent),p.ttl=Ae(p.ttl),p.workProved=Ae(p.workProved),p.topics||(p.topics=[]),p.topics=p.topics.map((function(b){return H(b)})),p):null},t.outputSyncingFormatter=sy,t.outputTransactionFormatter=Hi,t.outputTransactionReceiptFormatter=iy,t.padLeft=L,t.padRight=function(p,b,M){return p+new Array(b-p.length+1).join(M||"0")},t.sha3=q,t.signedIsNegative=nt,t.stringToUtf8Bytes=k,t.toAddress=tr,t.toArray=ot,t.toAscii=H,t.toBatchPayload=function(p){return p.map((function(b){return Qe(b.method,b.params)}))},t.toBigNumber=ze,t.toBoolean=me,t.toChecksumAddress=Ut,t.toData=ce,t.toDecimal=Ae,t.toHex=Re,t.toJsonRpcRequest=Qe,t.toNullDecimal=Se,t.toString=ne,t.toStringData=de,t.toTwosComplement=Ye,t.toWei=function(p,b){const M=ze(p).times(Be(b));return C(p)?M:M.toString(10)},t.transformToFullName=O,Object.defineProperty(t,"__esModule",{value:!0})}))})(ja,ja.exports)),ja.exports}var Go={},Dv;function cN(){if(Dv)return Go;Dv=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.SignatureValidator=r;const e=yu();async function r(t,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(t,i).at(n)}return Go}var Mr={},Jl={},Xl={},Bn={},Wr={},Nt={},qv;function Fm(){if(qv)return Nt;qv=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.output=Nt.exists=Nt.hash=Nt.bytes=Nt.bool=Nt.number=Nt.isBytes=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`positive integer expected, not ${c}`)}Nt.number=e;function r(c){if(typeof c!="boolean")throw new Error(`boolean expected, not ${c}`)}Nt.bool=r;function t(c){return c instanceof Uint8Array||c!=null&&typeof c=="object"&&c.constructor.name==="Uint8Array"}Nt.isBytes=t;function n(c,...l){if(!t(c))throw new Error("Uint8Array expected");if(l.length>0&&!l.includes(c.length))throw new Error(`Uint8Array expected of length ${l}, not of length=${c.length}`)}Nt.bytes=n;function i(c){if(typeof c!="function"||typeof c.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(c.outputLen),e(c.blockLen)}Nt.hash=i;function a(c,l=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(l&&c.finished)throw new Error("Hash#digest() has already been called")}Nt.exists=a;function s(c,l){n(c);const u=l.outputLen;if(c.length<u)throw new Error(`digestInto() expects output buffer of length at least ${u}`)}Nt.output=s;const o={number:e,bool:r,bytes:n,hash:i,exists:a,output:s};return Nt.default=o,Nt}var Zl={},ta={},Lv;function lN(){return Lv||(Lv=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.crypto=void 0,ta.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ta}var $v;function Za(){return $v||($v=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 r=lN(),t=Fm();function n(z){return z instanceof Uint8Array||z!=null&&typeof z=="object"&&z.constructor.name==="Uint8Array"}e.isBytes=n;const i=z=>new Uint8Array(z.buffer,z.byteOffset,z.byteLength);e.u8=i;const a=z=>new Uint32Array(z.buffer,z.byteOffset,Math.floor(z.byteLength/4));e.u32=a;const s=z=>new DataView(z.buffer,z.byteOffset,z.byteLength);e.createView=s;const o=(z,k)=>z<<32-k|z>>>k;e.rotr=o;const c=(z,k)=>z<<k|z>>>32-k>>>0;e.rotl=c,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=z=>z<<24&4278190080|z<<8&16711680|z>>>8&65280|z>>>24&255;e.byteSwap=l,e.byteSwapIfBE=e.isLE?z=>z:z=>(0,e.byteSwap)(z);function u(z){for(let k=0;k<z.length;k++)z[k]=(0,e.byteSwap)(z[k])}e.byteSwap32=u;const f=Array.from({length:256},(z,k)=>k.toString(16).padStart(2,"0"));function g(z){(0,t.bytes)(z);let k="";for(let V=0;V<z.length;V++)k+=f[z[V]];return k}e.bytesToHex=g;const _={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function A(z){if(z>=_._0&&z<=_._9)return z-_._0;if(z>=_._A&&z<=_._F)return z-(_._A-10);if(z>=_._a&&z<=_._f)return z-(_._a-10)}function w(z){if(typeof z!="string")throw new Error("hex string expected, got "+typeof z);const k=z.length,V=k/2;if(k%2)throw new Error("padded hex string expected, got unpadded hex of length "+k);const ue=new Uint8Array(V);for(let ae=0,re=0;ae<V;ae++,re+=2){const J=A(z.charCodeAt(re)),W=A(z.charCodeAt(re+1));if(J===void 0||W===void 0){const q=z[re]+z[re+1];throw new Error('hex string expected, got non-hex character "'+q+'" at index '+re)}ue[ae]=J*16+W}return ue}e.hexToBytes=w;const R=async()=>{};e.nextTick=R;async function P(z,k,V){let ue=Date.now();for(let ae=0;ae<z;ae++){V(ae);const re=Date.now()-ue;re>=0&&re<k||(await(0,e.nextTick)(),ue+=re)}}e.asyncLoop=P;function d(z){if(typeof z!="string")throw new Error(`utf8ToBytes expected string, got ${typeof z}`);return new Uint8Array(new TextEncoder().encode(z))}e.utf8ToBytes=d;function S(z){return typeof z=="string"&&(z=d(z)),(0,t.bytes)(z),z}e.toBytes=S;function E(...z){let k=0;for(let ue=0;ue<z.length;ue++){const ae=z[ue];(0,t.bytes)(ae),k+=ae.length}const V=new Uint8Array(k);for(let ue=0,ae=0;ue<z.length;ue++){const re=z[ue];V.set(re,ae),ae+=re.length}return V}e.concatBytes=E;class y{clone(){return this._cloneInto()}}e.Hash=y;const v={}.toString;function I(z,k){if(k!==void 0&&v.call(k)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(z,k)}e.checkOpts=I;function N(z){const k=ue=>z().update(S(ue)).digest(),V=z();return k.outputLen=V.outputLen,k.blockLen=V.blockLen,k.create=()=>z(),k}e.wrapConstructor=N;function U(z){const k=(ue,ae)=>z(ae).update(S(ue)).digest(),V=z({});return k.outputLen=V.outputLen,k.blockLen=V.blockLen,k.create=ue=>z(ue),k}e.wrapConstructorWithOpts=U;function Q(z){const k=(ue,ae)=>z(ae).update(S(ue)).digest(),V=z({});return k.outputLen=V.outputLen,k.blockLen=V.blockLen,k.create=ue=>z(ue),k}e.wrapXOFConstructorWithOpts=Q;function Y(z=32){if(r.crypto&&typeof r.crypto.getRandomValues=="function")return r.crypto.getRandomValues(new Uint8Array(z));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=Y})(Zl)),Zl}var Bv;function dN(){if(Bv)return Wr;Bv=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.HashMD=Wr.Maj=Wr.Chi=void 0;const e=Fm(),r=Za();function t(s,o,c,l){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,c,l);const u=BigInt(32),f=BigInt(4294967295),g=Number(c>>u&f),_=Number(c&f),A=l?4:0,w=l?0:4;s.setUint32(o+A,g,l),s.setUint32(o+w,_,l)}const n=(s,o,c)=>s&o^~s&c;Wr.Chi=n;const i=(s,o,c)=>s&o^s&c^o&c;Wr.Maj=i;class a extends r.Hash{constructor(o,c,l,u){super(),this.blockLen=o,this.outputLen=c,this.padOffset=l,this.isLE=u,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(o),this.view=(0,r.createView)(this.buffer)}update(o){(0,e.exists)(this);const{view:c,buffer:l,blockLen:u}=this;o=(0,r.toBytes)(o);const f=o.length;for(let g=0;g<f;){const _=Math.min(u-this.pos,f-g);if(_===u){const A=(0,r.createView)(o);for(;u<=f-g;g+=u)this.process(A,g);continue}l.set(o.subarray(g,g+_),this.pos),this.pos+=_,g+=_,this.pos===u&&(this.process(c,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:c,view:l,blockLen:u,isLE:f}=this;let{pos:g}=this;c[g++]=128,this.buffer.subarray(g).fill(0),this.padOffset>u-g&&(this.process(l,0),g=0);for(let P=g;P<u;P++)c[P]=0;t(l,u-8,BigInt(this.length*8),f),this.process(l,0);const _=(0,r.createView)(o),A=this.outputLen;if(A%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const w=A/4,R=this.get();if(w>R.length)throw new Error("_sha2: outputLen bigger than state");for(let P=0;P<w;P++)_.setUint32(4*P,R[P],f)}digest(){const{buffer:o,outputLen:c}=this;this.digestInto(o);const l=o.slice(0,c);return this.destroy(),l}_cloneInto(o){o||(o=new this.constructor),o.set(...this.get());const{blockLen:c,buffer:l,length:u,finished:f,destroyed:g,pos:_}=this;return o.length=u,o.pos=_,o.finished=f,o.destroyed=g,u%c&&o.buffer.set(l),o}}return Wr.HashMD=a,Wr}var Uv;function fN(){if(Uv)return Bn;Uv=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.sha224=Bn.sha256=void 0;const e=dN(),r=Za(),t=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:c,B:l,C:u,D:f,E:g,F:_,G:A,H:w}=this;return[c,l,u,f,g,_,A,w]}set(c,l,u,f,g,_,A,w){this.A=c|0,this.B=l|0,this.C=u|0,this.D=f|0,this.E=g|0,this.F=_|0,this.G=A|0,this.H=w|0}process(c,l){for(let d=0;d<16;d++,l+=4)i[d]=c.getUint32(l,!1);for(let d=16;d<64;d++){const S=i[d-15],E=i[d-2],y=(0,r.rotr)(S,7)^(0,r.rotr)(S,18)^S>>>3,v=(0,r.rotr)(E,17)^(0,r.rotr)(E,19)^E>>>10;i[d]=v+i[d-7]+y+i[d-16]|0}let{A:u,B:f,C:g,D:_,E:A,F:w,G:R,H:P}=this;for(let d=0;d<64;d++){const S=(0,r.rotr)(A,6)^(0,r.rotr)(A,11)^(0,r.rotr)(A,25),E=P+S+(0,e.Chi)(A,w,R)+t[d]+i[d]|0,v=((0,r.rotr)(u,2)^(0,r.rotr)(u,13)^(0,r.rotr)(u,22))+(0,e.Maj)(u,f,g)|0;P=R,R=w,w=A,A=_+E|0,_=g,g=f,f=u,u=E+v|0}u=u+this.A|0,f=f+this.B|0,g=g+this.C|0,_=_+this.D|0,A=A+this.E|0,w=w+this.F|0,R=R+this.G|0,P=P+this.H|0,this.set(u,f,g,_,A,w,R,P)}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 Bn.sha256=(0,r.wrapConstructor)(()=>new a),Bn.sha224=(0,r.wrapConstructor)(()=>new s),Bn}var ra={},xl={},kv;function pN(){return kv||(kv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const r=Fm(),t=Za();class n extends t.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(s);const c=(0,t.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,u=new Uint8Array(l);u.set(c.length>l?s.create().update(c).digest():c);for(let f=0;f<u.length;f++)u[f]^=54;this.iHash.update(u),this.oHash=s.create();for(let f=0;f<u.length;f++)u[f]^=106;this.oHash.update(u),u.fill(0)}update(s){return(0,r.exists)(this),this.iHash.update(s),this}digestInto(s){(0,r.exists)(this),(0,r.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:c,finished:l,destroyed:u,blockLen:f,outputLen:g}=this;return s=s,s.finished=l,s.destroyed=u,s.blockLen=f,s.outputLen=g,s.oHash=o._cloneInto(s.oHash),s.iHash=c._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)})(xl)),xl}var ed={},na={},bt={},Et={},Vv;function Vi(){if(Vv)return Et;Vv=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.bitMask=void 0,Et.isBytes=n,Et.abytes=i,Et.bytesToHex=s,Et.numberToHexUnpadded=o,Et.hexToNumber=c,Et.hexToBytes=f,Et.bytesToNumberBE=g,Et.bytesToNumberLE=_,Et.numberToBytesBE=A,Et.numberToBytesLE=w,Et.numberToVarBytesBE=R,Et.ensureBytes=P,Et.concatBytes=d,Et.equalBytes=S,Et.utf8ToBytes=E,Et.bitLen=y,Et.bitGet=v,Et.bitSet=I,Et.createHmacDrbg=Y,Et.validateObject=k;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=BigInt(0),r=BigInt(1),t=BigInt(2);function n(V){return V instanceof Uint8Array||V!=null&&typeof V=="object"&&V.constructor.name==="Uint8Array"}function i(V){if(!n(V))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(V,ue)=>ue.toString(16).padStart(2,"0"));function s(V){i(V);let ue="";for(let ae=0;ae<V.length;ae++)ue+=a[V[ae]];return ue}function o(V){const ue=V.toString(16);return ue.length&1?`0${ue}`:ue}function c(V){if(typeof V!="string")throw new Error("hex string expected, got "+typeof V);return BigInt(V===""?"0":`0x${V}`)}const l={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function u(V){if(V>=l._0&&V<=l._9)return V-l._0;if(V>=l._A&&V<=l._F)return V-(l._A-10);if(V>=l._a&&V<=l._f)return V-(l._a-10)}function f(V){if(typeof V!="string")throw new Error("hex string expected, got "+typeof V);const ue=V.length,ae=ue/2;if(ue%2)throw new Error("padded hex string expected, got unpadded hex of length "+ue);const re=new Uint8Array(ae);for(let J=0,W=0;J<ae;J++,W+=2){const q=u(V.charCodeAt(W)),j=u(V.charCodeAt(W+1));if(q===void 0||j===void 0){const L=V[W]+V[W+1];throw new Error('hex string expected, got non-hex character "'+L+'" at index '+W)}re[J]=q*16+j}return re}function g(V){return c(s(V))}function _(V){return i(V),c(s(Uint8Array.from(V).reverse()))}function A(V,ue){return f(V.toString(16).padStart(ue*2,"0"))}function w(V,ue){return A(V,ue).reverse()}function R(V){return f(o(V))}function P(V,ue,ae){let re;if(typeof ue=="string")try{re=f(ue)}catch(W){throw new Error(`${V} must be valid hex string, got "${ue}". Cause: ${W}`)}else if(n(ue))re=Uint8Array.from(ue);else throw new Error(`${V} must be hex string or Uint8Array`);const J=re.length;if(typeof ae=="number"&&J!==ae)throw new Error(`${V} expected ${ae} bytes, got ${J}`);return re}function d(...V){let ue=0;for(let re=0;re<V.length;re++){const J=V[re];i(J),ue+=J.length}const ae=new Uint8Array(ue);for(let re=0,J=0;re<V.length;re++){const W=V[re];ae.set(W,J),J+=W.length}return ae}function S(V,ue){if(V.length!==ue.length)return!1;let ae=0;for(let re=0;re<V.length;re++)ae|=V[re]^ue[re];return ae===0}function E(V){if(typeof V!="string")throw new Error(`utf8ToBytes expected string, got ${typeof V}`);return new Uint8Array(new TextEncoder().encode(V))}function y(V){let ue;for(ue=0;V>e;V>>=r,ue+=1);return ue}function v(V,ue){return V>>BigInt(ue)&r}function I(V,ue,ae){return V|(ae?r:e)<<BigInt(ue)}const N=V=>(t<<BigInt(V-1))-r;Et.bitMask=N;const U=V=>new Uint8Array(V),Q=V=>Uint8Array.from(V);function Y(V,ue,ae){if(typeof V!="number"||V<2)throw new Error("hashLen must be a number");if(typeof ue!="number"||ue<2)throw new Error("qByteLen must be a number");if(typeof ae!="function")throw new Error("hmacFn must be a function");let re=U(V),J=U(V),W=0;const q=()=>{re.fill(1),J.fill(0),W=0},j=(...D)=>ae(J,re,...D),L=(D=U())=>{J=j(Q([0]),D),re=j(),D.length!==0&&(J=j(Q([1]),D),re=j())},H=()=>{if(W++>=1e3)throw new Error("drbg: tried 1000 values");let D=0;const Z=[];for(;D<ue;){re=j();const Ee=re.slice();Z.push(Ee),D+=re.length}return d(...Z)};return(D,Z)=>{q(),L(D);let Ee;for(;!(Ee=Z(H()));)L();return q(),Ee}}const z={bigint:V=>typeof V=="bigint",function:V=>typeof V=="function",boolean:V=>typeof V=="boolean",string:V=>typeof V=="string",stringOrUint8Array:V=>typeof V=="string"||n(V),isSafeInteger:V=>Number.isSafeInteger(V),array:V=>Array.isArray(V),field:(V,ue)=>ue.Fp.isValid(V),hash:V=>typeof V=="function"&&Number.isSafeInteger(V.outputLen)};function k(V,ue,ae={}){const re=(J,W,q)=>{const j=z[W];if(typeof j!="function")throw new Error(`Invalid validator "${W}", expected function`);const L=V[J];if(!(q&&L===void 0)&&!j(L,V))throw new Error(`Invalid param ${String(J)}=${L} (${typeof L}), expected ${W}`)};for(const[J,W]of Object.entries(ue))re(J,W,!1);for(const[J,W]of Object.entries(ae))re(J,W,!0);return V}return Et}var Fv;function hu(){if(Fv)return bt;Fv=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.isNegativeLE=void 0,bt.mod=c,bt.pow=l,bt.pow2=u,bt.invert=f,bt.tonelliShanks=g,bt.FpSqrt=_,bt.validateField=R,bt.FpPow=P,bt.FpInvertBatch=d,bt.FpDiv=S,bt.FpIsSquare=E,bt.nLength=y,bt.Field=v,bt.FpSqrtOdd=I,bt.FpSqrtEven=N,bt.hashToPrivateScalar=U,bt.getFieldBytesLength=Q,bt.getMinHashLength=Y,bt.mapHashToField=z;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Vi(),r=BigInt(0),t=BigInt(1),n=BigInt(2),i=BigInt(3),a=BigInt(4),s=BigInt(5),o=BigInt(8);BigInt(9),BigInt(16);function c(k,V){const ue=k%V;return ue>=r?ue:V+ue}function l(k,V,ue){if(ue<=r||V<r)throw new Error("Expected power/modulo > 0");if(ue===t)return r;let ae=t;for(;V>r;)V&t&&(ae=ae*k%ue),k=k*k%ue,V>>=t;return ae}function u(k,V,ue){let ae=k;for(;V-- >r;)ae*=ae,ae%=ue;return ae}function f(k,V){if(k===r||V<=r)throw new Error(`invert: expected positive integers, got n=${k} mod=${V}`);let ue=c(k,V),ae=V,re=r,J=t;for(;ue!==r;){const q=ae/ue,j=ae%ue,L=re-J*q;ae=ue,ue=j,re=J,J=L}if(ae!==t)throw new Error("invert: does not exist");return c(re,V)}function g(k){const V=(k-t)/n;let ue,ae,re;for(ue=k-t,ae=0;ue%n===r;ue/=n,ae++);for(re=n;re<k&&l(re,V,k)!==k-t;re++);if(ae===1){const W=(k+t)/a;return function(j,L){const H=j.pow(L,W);if(!j.eql(j.sqr(H),L))throw new Error("Cannot find square root");return H}}const J=(ue+t)/n;return function(q,j){if(q.pow(j,V)===q.neg(q.ONE))throw new Error("Cannot find square root");let L=ae,H=q.pow(q.mul(q.ONE,re),ue),O=q.pow(j,J),D=q.pow(j,ue);for(;!q.eql(D,q.ONE);){if(q.eql(D,q.ZERO))return q.ZERO;let Z=1;for(let _e=q.sqr(D);Z<L&&!q.eql(_e,q.ONE);Z++)_e=q.sqr(_e);const Ee=q.pow(H,t<<BigInt(L-Z-1));H=q.sqr(Ee),O=q.mul(O,Ee),D=q.mul(D,H),L=Z}return O}}function _(k){if(k%a===i){const V=(k+t)/a;return function(ae,re){const J=ae.pow(re,V);if(!ae.eql(ae.sqr(J),re))throw new Error("Cannot find square root");return J}}if(k%o===s){const V=(k-s)/o;return function(ae,re){const J=ae.mul(re,n),W=ae.pow(J,V),q=ae.mul(re,W),j=ae.mul(ae.mul(q,n),W),L=ae.mul(q,ae.sub(j,ae.ONE));if(!ae.eql(ae.sqr(L),re))throw new Error("Cannot find square root");return L}}return g(k)}const A=(k,V)=>(c(k,V)&t)===t;bt.isNegativeLE=A;const w=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function R(k){const V={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},ue=w.reduce((ae,re)=>(ae[re]="function",ae),V);return(0,e.validateObject)(k,ue)}function P(k,V,ue){if(ue<r)throw new Error("Expected power > 0");if(ue===r)return k.ONE;if(ue===t)return V;let ae=k.ONE,re=V;for(;ue>r;)ue&t&&(ae=k.mul(ae,re)),re=k.sqr(re),ue>>=t;return ae}function d(k,V){const ue=new Array(V.length),ae=V.reduce((J,W,q)=>k.is0(W)?J:(ue[q]=J,k.mul(J,W)),k.ONE),re=k.inv(ae);return V.reduceRight((J,W,q)=>k.is0(W)?J:(ue[q]=k.mul(J,ue[q]),k.mul(J,W)),re),ue}function S(k,V,ue){return k.mul(V,typeof ue=="bigint"?f(ue,k.ORDER):k.inv(ue))}function E(k){const V=(k.ORDER-t)/n;return ue=>{const ae=k.pow(ue,V);return k.eql(ae,k.ZERO)||k.eql(ae,k.ONE)}}function y(k,V){const ue=V!==void 0?V:k.toString(2).length,ae=Math.ceil(ue/8);return{nBitLength:ue,nByteLength:ae}}function v(k,V,ue=!1,ae={}){if(k<=r)throw new Error(`Expected Field ORDER > 0, got ${k}`);const{nBitLength:re,nByteLength:J}=y(k,V);if(J>2048)throw new Error("Field lengths over 2048 bytes are not supported");const W=_(k),q=Object.freeze({ORDER:k,BITS:re,BYTES:J,MASK:(0,e.bitMask)(re),ZERO:r,ONE:t,create:j=>c(j,k),isValid:j=>{if(typeof j!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof j}`);return r<=j&&j<k},is0:j=>j===r,isOdd:j=>(j&t)===t,neg:j=>c(-j,k),eql:(j,L)=>j===L,sqr:j=>c(j*j,k),add:(j,L)=>c(j+L,k),sub:(j,L)=>c(j-L,k),mul:(j,L)=>c(j*L,k),pow:(j,L)=>P(q,j,L),div:(j,L)=>c(j*f(L,k),k),sqrN:j=>j*j,addN:(j,L)=>j+L,subN:(j,L)=>j-L,mulN:(j,L)=>j*L,inv:j=>f(j,k),sqrt:ae.sqrt||(j=>W(q,j)),invertBatch:j=>d(q,j),cmov:(j,L,H)=>H?L:j,toBytes:j=>ue?(0,e.numberToBytesLE)(j,J):(0,e.numberToBytesBE)(j,J),fromBytes:j=>{if(j.length!==J)throw new Error(`Fp.fromBytes: expected ${J}, got ${j.length}`);return ue?(0,e.bytesToNumberLE)(j):(0,e.bytesToNumberBE)(j)}});return Object.freeze(q)}function I(k,V){if(!k.isOdd)throw new Error("Field doesn't have isOdd");const ue=k.sqrt(V);return k.isOdd(ue)?ue:k.neg(ue)}function N(k,V){if(!k.isOdd)throw new Error("Field doesn't have isOdd");const ue=k.sqrt(V);return k.isOdd(ue)?k.neg(ue):ue}function U(k,V,ue=!1){k=(0,e.ensureBytes)("privateHash",k);const ae=k.length,re=y(V).nByteLength+8;if(re<24||ae<re||ae>1024)throw new Error(`hashToPrivateScalar: expected ${re}-1024 bytes of input, got ${ae}`);const J=ue?(0,e.bytesToNumberLE)(k):(0,e.bytesToNumberBE)(k);return c(J,V-t)+t}function Q(k){if(typeof k!="bigint")throw new Error("field order must be bigint");const V=k.toString(2).length;return Math.ceil(V/8)}function Y(k){const V=Q(k);return V+Math.ceil(V/2)}function z(k,V,ue=!1){const ae=k.length,re=Q(V),J=Y(V);if(ae<16||ae<J||ae>1024)throw new Error(`expected ${J}-1024 bytes of input, got ${ae}`);const W=ue?(0,e.bytesToNumberBE)(k):(0,e.bytesToNumberLE)(k),q=c(W,V-t)+t;return ue?(0,e.numberToBytesLE)(q,re):(0,e.numberToBytesBE)(q,re)}return bt}var Hv;function mN(){if(Hv)return na;Hv=1,Object.defineProperty(na,"__esModule",{value:!0}),na.wNAF=i,na.validateBasic=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=hu(),r=Vi(),t=BigInt(0),n=BigInt(1);function i(s,o){const c=(u,f)=>{const g=f.negate();return u?g:f},l=u=>{const f=Math.ceil(o/u)+1,g=2**(u-1);return{windows:f,windowSize:g}};return{constTimeNegate:c,unsafeLadder(u,f){let g=s.ZERO,_=u;for(;f>t;)f&n&&(g=g.add(_)),_=_.double(),f>>=n;return g},precomputeWindow(u,f){const{windows:g,windowSize:_}=l(f),A=[];let w=u,R=w;for(let P=0;P<g;P++){R=w,A.push(R);for(let d=1;d<_;d++)R=R.add(w),A.push(R);w=R.double()}return A},wNAF(u,f,g){const{windows:_,windowSize:A}=l(u);let w=s.ZERO,R=s.BASE;const P=BigInt(2**u-1),d=2**u,S=BigInt(u);for(let E=0;E<_;E++){const y=E*A;let v=Number(g&P);g>>=S,v>A&&(v-=d,g+=n);const I=y,N=y+Math.abs(v)-1,U=E%2!==0,Q=v<0;v===0?R=R.add(c(U,f[I])):w=w.add(c(Q,f[N]))}return{p:w,f:R}},wNAFCached(u,f,g,_){const A=u._WINDOW_SIZE||1;let w=f.get(u);return w||(w=this.precomputeWindow(u,A),A!==1&&f.set(u,_(w))),this.wNAF(A,w,g)}}}function a(s){return(0,e.validateField)(s.Fp),(0,r.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 na}var Gv;function uA(){return Gv||(Gv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=_,e.weierstrass=w,e.SWUFpSqrtRatio=R,e.mapToCurveSimpleSWU=P;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=mN(),t=hu(),n=Vi(),i=Vi();function a(d){const S=(0,r.validateBasic)(d);n.validateObject(S,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:E,Fp:y,a:v}=S;if(E){if(!y.eql(v,y.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof E!="object"||typeof E.beta!="bigint"||typeof E.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...S})}const{bytesToNumberBE:s,hexToBytes:o}=n;e.DER={Err:class extends Error{constructor(S=""){super(S)}},_parseInt(d){const{Err:S}=e.DER;if(d.length<2||d[0]!==2)throw new S("Invalid signature integer tag");const E=d[1],y=d.subarray(2,E+2);if(!E||y.length!==E)throw new S("Invalid signature integer: wrong length");if(y[0]&128)throw new S("Invalid signature integer: negative");if(y[0]===0&&!(y[1]&128))throw new S("Invalid signature integer: unnecessary leading zero");return{d:s(y),l:d.subarray(E+2)}},toSig(d){const{Err:S}=e.DER,E=typeof d=="string"?o(d):d;n.abytes(E);let y=E.length;if(y<2||E[0]!=48)throw new S("Invalid signature tag");if(E[1]!==y-2)throw new S("Invalid signature: incorrect length");const{d:v,l:I}=e.DER._parseInt(E.subarray(2)),{d:N,l:U}=e.DER._parseInt(I);if(U.length)throw new S("Invalid signature: left bytes after parsing");return{r:v,s:N}},hexFromSig(d){const S=Y=>Number.parseInt(Y[0],16)&8?"00"+Y:Y,E=Y=>{const z=Y.toString(16);return z.length&1?`0${z}`:z},y=S(E(d.s)),v=S(E(d.r)),I=y.length/2,N=v.length/2,U=E(I),Q=E(N);return`30${E(N+I+4)}02${Q}${v}02${U}${y}`}};const c=BigInt(0),l=BigInt(1),u=BigInt(2),f=BigInt(3),g=BigInt(4);function _(d){const S=a(d),{Fp:E}=S,y=S.toBytes||((ae,re,J)=>{const W=re.toAffine();return n.concatBytes(Uint8Array.from([4]),E.toBytes(W.x),E.toBytes(W.y))}),v=S.fromBytes||(ae=>{const re=ae.subarray(1),J=E.fromBytes(re.subarray(0,E.BYTES)),W=E.fromBytes(re.subarray(E.BYTES,2*E.BYTES));return{x:J,y:W}});function I(ae){const{a:re,b:J}=S,W=E.sqr(ae),q=E.mul(W,ae);return E.add(E.add(q,E.mul(ae,re)),J)}if(!E.eql(E.sqr(S.Gy),I(S.Gx)))throw new Error("bad generator point: equation left != right");function N(ae){return typeof ae=="bigint"&&c<ae&&ae<S.n}function U(ae){if(!N(ae))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Q(ae){const{allowedPrivateKeyLengths:re,nByteLength:J,wrapPrivateKey:W,n:q}=S;if(re&&typeof ae!="bigint"){if(n.isBytes(ae)&&(ae=n.bytesToHex(ae)),typeof ae!="string"||!re.includes(ae.length))throw new Error("Invalid key");ae=ae.padStart(J*2,"0")}let j;try{j=typeof ae=="bigint"?ae:n.bytesToNumberBE((0,i.ensureBytes)("private key",ae,J))}catch{throw new Error(`private key must be ${J} bytes, hex or bigint, not ${typeof ae}`)}return W&&(j=t.mod(j,q)),U(j),j}const Y=new Map;function z(ae){if(!(ae instanceof k))throw new Error("ProjectivePoint expected")}class k{constructor(re,J,W){if(this.px=re,this.py=J,this.pz=W,re==null||!E.isValid(re))throw new Error("x required");if(J==null||!E.isValid(J))throw new Error("y required");if(W==null||!E.isValid(W))throw new Error("z required")}static fromAffine(re){const{x:J,y:W}=re||{};if(!re||!E.isValid(J)||!E.isValid(W))throw new Error("invalid affine point");if(re instanceof k)throw new Error("projective point not allowed");const q=j=>E.eql(j,E.ZERO);return q(J)&&q(W)?k.ZERO:new k(J,W,E.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(re){const J=E.invertBatch(re.map(W=>W.pz));return re.map((W,q)=>W.toAffine(J[q])).map(k.fromAffine)}static fromHex(re){const J=k.fromAffine(v((0,i.ensureBytes)("pointHex",re)));return J.assertValidity(),J}static fromPrivateKey(re){return k.BASE.multiply(Q(re))}_setWindowSize(re){this._WINDOW_SIZE=re,Y.delete(this)}assertValidity(){if(this.is0()){if(S.allowInfinityPoint&&!E.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:re,y:J}=this.toAffine();if(!E.isValid(re)||!E.isValid(J))throw new Error("bad point: x or y not FE");const W=E.sqr(J),q=I(re);if(!E.eql(W,q))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:re}=this.toAffine();if(E.isOdd)return!E.isOdd(re);throw new Error("Field doesn't support isOdd")}equals(re){z(re);const{px:J,py:W,pz:q}=this,{px:j,py:L,pz:H}=re,O=E.eql(E.mul(J,H),E.mul(j,q)),D=E.eql(E.mul(W,H),E.mul(L,q));return O&&D}negate(){return new k(this.px,E.neg(this.py),this.pz)}double(){const{a:re,b:J}=S,W=E.mul(J,f),{px:q,py:j,pz:L}=this;let H=E.ZERO,O=E.ZERO,D=E.ZERO,Z=E.mul(q,q),Ee=E.mul(j,j),_e=E.mul(L,L),Se=E.mul(q,j);return Se=E.add(Se,Se),D=E.mul(q,L),D=E.add(D,D),H=E.mul(re,D),O=E.mul(W,_e),O=E.add(H,O),H=E.sub(Ee,O),O=E.add(Ee,O),O=E.mul(H,O),H=E.mul(Se,H),D=E.mul(W,D),_e=E.mul(re,_e),Se=E.sub(Z,_e),Se=E.mul(re,Se),Se=E.add(Se,D),D=E.add(Z,Z),Z=E.add(D,Z),Z=E.add(Z,_e),Z=E.mul(Z,Se),O=E.add(O,Z),_e=E.mul(j,L),_e=E.add(_e,_e),Z=E.mul(_e,Se),H=E.sub(H,Z),D=E.mul(_e,Ee),D=E.add(D,D),D=E.add(D,D),new k(H,O,D)}add(re){z(re);const{px:J,py:W,pz:q}=this,{px:j,py:L,pz:H}=re;let O=E.ZERO,D=E.ZERO,Z=E.ZERO;const Ee=S.a,_e=E.mul(S.b,f);let Se=E.mul(J,j),Ae=E.mul(W,L),ne=E.mul(q,H),ce=E.add(J,W),de=E.add(j,L);ce=E.mul(ce,de),de=E.add(Se,Ae),ce=E.sub(ce,de),de=E.add(J,q);let me=E.add(j,H);return de=E.mul(de,me),me=E.add(Se,ne),de=E.sub(de,me),me=E.add(W,q),O=E.add(L,H),me=E.mul(me,O),O=E.add(Ae,ne),me=E.sub(me,O),Z=E.mul(Ee,de),O=E.mul(_e,ne),Z=E.add(O,Z),O=E.sub(Ae,Z),Z=E.add(Ae,Z),D=E.mul(O,Z),Ae=E.add(Se,Se),Ae=E.add(Ae,Se),ne=E.mul(Ee,ne),de=E.mul(_e,de),Ae=E.add(Ae,ne),ne=E.sub(Se,ne),ne=E.mul(Ee,ne),de=E.add(de,ne),Se=E.mul(Ae,de),D=E.add(D,Se),Se=E.mul(me,de),O=E.mul(ce,O),O=E.sub(O,Se),Se=E.mul(ce,Ae),Z=E.mul(me,Z),Z=E.add(Z,Se),new k(O,D,Z)}subtract(re){return this.add(re.negate())}is0(){return this.equals(k.ZERO)}wNAF(re){return ue.wNAFCached(this,Y,re,J=>{const W=E.invertBatch(J.map(q=>q.pz));return J.map((q,j)=>q.toAffine(W[j])).map(k.fromAffine)})}multiplyUnsafe(re){const J=k.ZERO;if(re===c)return J;if(U(re),re===l)return this;const{endo:W}=S;if(!W)return ue.unsafeLadder(this,re);let{k1neg:q,k1:j,k2neg:L,k2:H}=W.splitScalar(re),O=J,D=J,Z=this;for(;j>c||H>c;)j&l&&(O=O.add(Z)),H&l&&(D=D.add(Z)),Z=Z.double(),j>>=l,H>>=l;return q&&(O=O.negate()),L&&(D=D.negate()),D=new k(E.mul(D.px,W.beta),D.py,D.pz),O.add(D)}multiply(re){U(re);let J=re,W,q;const{endo:j}=S;if(j){const{k1neg:L,k1:H,k2neg:O,k2:D}=j.splitScalar(J);let{p:Z,f:Ee}=this.wNAF(H),{p:_e,f:Se}=this.wNAF(D);Z=ue.constTimeNegate(L,Z),_e=ue.constTimeNegate(O,_e),_e=new k(E.mul(_e.px,j.beta),_e.py,_e.pz),W=Z.add(_e),q=Ee.add(Se)}else{const{p:L,f:H}=this.wNAF(J);W=L,q=H}return k.normalizeZ([W,q])[0]}multiplyAndAddUnsafe(re,J,W){const q=k.BASE,j=(H,O)=>O===c||O===l||!H.equals(q)?H.multiplyUnsafe(O):H.multiply(O),L=j(this,J).add(j(re,W));return L.is0()?void 0:L}toAffine(re){const{px:J,py:W,pz:q}=this,j=this.is0();re==null&&(re=j?E.ONE:E.inv(q));const L=E.mul(J,re),H=E.mul(W,re),O=E.mul(q,re);if(j)return{x:E.ZERO,y:E.ZERO};if(!E.eql(O,E.ONE))throw new Error("invZ was invalid");return{x:L,y:H}}isTorsionFree(){const{h:re,isTorsionFree:J}=S;if(re===l)return!0;if(J)return J(k,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:re,clearCofactor:J}=S;return re===l?this:J?J(k,this):this.multiplyUnsafe(S.h)}toRawBytes(re=!0){return this.assertValidity(),y(k,this,re)}toHex(re=!0){return n.bytesToHex(this.toRawBytes(re))}}k.BASE=new k(S.Gx,S.Gy,E.ONE),k.ZERO=new k(E.ZERO,E.ONE,E.ZERO);const V=S.nBitLength,ue=(0,r.wNAF)(k,S.endo?Math.ceil(V/2):V);return{CURVE:S,ProjectivePoint:k,normPrivateKeyToScalar:Q,weierstrassEquation:I,isWithinCurveOrder:N}}function A(d){const S=(0,r.validateBasic)(d);return n.validateObject(S,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...S})}function w(d){const S=A(d),{Fp:E,n:y}=S,v=E.BYTES+1,I=2*E.BYTES+1;function N(de){return c<de&&de<E.ORDER}function U(de){return t.mod(de,y)}function Q(de){return t.invert(de,y)}const{ProjectivePoint:Y,normPrivateKeyToScalar:z,weierstrassEquation:k,isWithinCurveOrder:V}=_({...S,toBytes(de,me,Te){const Re=me.toAffine(),Be=E.toBytes(Re.x),ze=n.concatBytes;return Te?ze(Uint8Array.from([me.hasEvenY()?2:3]),Be):ze(Uint8Array.from([4]),Be,E.toBytes(Re.y))},fromBytes(de){const me=de.length,Te=de[0],Re=de.subarray(1);if(me===v&&(Te===2||Te===3)){const Be=n.bytesToNumberBE(Re);if(!N(Be))throw new Error("Point is not on curve");const ze=k(Be);let Ze;try{Ze=E.sqrt(ze)}catch(Tt){const lt=Tt instanceof Error?": "+Tt.message:"";throw new Error("Point is not on curve"+lt)}const Ye=(Ze&l)===l;return(Te&1)===1!==Ye&&(Ze=E.neg(Ze)),{x:Be,y:Ze}}else if(me===I&&Te===4){const Be=E.fromBytes(Re.subarray(0,E.BYTES)),ze=E.fromBytes(Re.subarray(E.BYTES,2*E.BYTES));return{x:Be,y:ze}}else throw new Error(`Point of length ${me} was invalid. Expected ${v} compressed bytes or ${I} uncompressed bytes`)}}),ue=de=>n.bytesToHex(n.numberToBytesBE(de,S.nByteLength));function ae(de){const me=y>>l;return de>me}function re(de){return ae(de)?U(-de):de}const J=(de,me,Te)=>n.bytesToNumberBE(de.slice(me,Te));class W{constructor(me,Te,Re){this.r=me,this.s=Te,this.recovery=Re,this.assertValidity()}static fromCompact(me){const Te=S.nByteLength;return me=(0,i.ensureBytes)("compactSignature",me,Te*2),new W(J(me,0,Te),J(me,Te,2*Te))}static fromDER(me){const{r:Te,s:Re}=e.DER.toSig((0,i.ensureBytes)("DER",me));return new W(Te,Re)}assertValidity(){if(!V(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!V(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(me){return new W(this.r,this.s,me)}recoverPublicKey(me){const{r:Te,s:Re,recovery:Be}=this,ze=D((0,i.ensureBytes)("msgHash",me));if(Be==null||![0,1,2,3].includes(Be))throw new Error("recovery id invalid");const Ze=Be===2||Be===3?Te+S.n:Te;if(Ze>=E.ORDER)throw new Error("recovery id 2 or 3 invalid");const Ye=(Be&1)===0?"02":"03",nt=Y.fromHex(Ye+ue(Ze)),Tt=Q(Ze),lt=U(-ze*Tt),Ot=U(Re*Tt),dt=Y.BASE.multiplyAndAddUnsafe(nt,lt,Ot);if(!dt)throw new Error("point at infinify");return dt.assertValidity(),dt}hasHighS(){return ae(this.s)}normalizeS(){return this.hasHighS()?new W(this.r,U(-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 ue(this.r)+ue(this.s)}}const q={isValidPrivateKey(de){try{return z(de),!0}catch{return!1}},normPrivateKeyToScalar:z,randomPrivateKey:()=>{const de=t.getMinHashLength(S.n);return t.mapHashToField(S.randomBytes(de),S.n)},precompute(de=8,me=Y.BASE){return me._setWindowSize(de),me.multiply(BigInt(3)),me}};function j(de,me=!0){return Y.fromPrivateKey(de).toRawBytes(me)}function L(de){const me=n.isBytes(de),Te=typeof de=="string",Re=(me||Te)&&de.length;return me?Re===v||Re===I:Te?Re===2*v||Re===2*I:de instanceof Y}function H(de,me,Te=!0){if(L(de))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(z(de)).toRawBytes(Te)}const O=S.bits2int||function(de){const me=n.bytesToNumberBE(de),Te=de.length*8-S.nBitLength;return Te>0?me>>BigInt(Te):me},D=S.bits2int_modN||function(de){return U(O(de))},Z=n.bitMask(S.nBitLength);function Ee(de){if(typeof de!="bigint")throw new Error("bigint expected");if(!(c<=de&&de<Z))throw new Error(`bigint expected < 2^${S.nBitLength}`);return n.numberToBytesBE(de,S.nByteLength)}function _e(de,me,Te=Se){if(["recovered","canonical"].some(Ut=>Ut in Te))throw new Error("sign() legacy options not supported");const{hash:Re,randomBytes:Be}=S;let{lowS:ze,prehash:Ze,extraEntropy:Ye}=Te;ze==null&&(ze=!0),de=(0,i.ensureBytes)("msgHash",de),Ze&&(de=(0,i.ensureBytes)("prehashed msgHash",Re(de)));const nt=D(de),Tt=z(me),lt=[Ee(Tt),Ee(nt)];if(Ye!=null&&Ye!==!1){const Ut=Ye===!0?Be(E.BYTES):Ye;lt.push((0,i.ensureBytes)("extraEntropy",Ut))}const Ot=n.concatBytes(...lt),dt=nt;function Bt(Ut){const ot=O(Ut);if(!V(ot))return;const tr=Q(ot),C=Y.BASE.multiply(ot).toAffine(),h=U(C.x);if(h===c)return;const T=U(tr*U(dt+h*Tt));if(T===c)return;let G=(C.x===h?0:2)|Number(C.y&l),le=T;return ze&&ae(T)&&(le=re(T),G^=1),new W(h,le,G)}return{seed:Ot,k2sig:Bt}}const Se={lowS:S.lowS,prehash:!1},Ae={lowS:S.lowS,prehash:!1};function ne(de,me,Te=Se){const{seed:Re,k2sig:Be}=_e(de,me,Te),ze=S;return n.createHmacDrbg(ze.hash.outputLen,ze.nByteLength,ze.hmac)(Re,Be)}Y.BASE._setWindowSize(8);function ce(de,me,Te,Re=Ae){var C;const Be=de;if(me=(0,i.ensureBytes)("msgHash",me),Te=(0,i.ensureBytes)("publicKey",Te),"strict"in Re)throw new Error("options.strict was renamed to lowS");const{lowS:ze,prehash:Ze}=Re;let Ye,nt;try{if(typeof Be=="string"||n.isBytes(Be))try{Ye=W.fromDER(Be)}catch(h){if(!(h instanceof e.DER.Err))throw h;Ye=W.fromCompact(Be)}else if(typeof Be=="object"&&typeof Be.r=="bigint"&&typeof Be.s=="bigint"){const{r:h,s:T}=Be;Ye=new W(h,T)}else throw new Error("PARSE");nt=Y.fromHex(Te)}catch(h){if(h.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(ze&&Ye.hasHighS())return!1;Ze&&(me=S.hash(me));const{r:Tt,s:lt}=Ye,Ot=D(me),dt=Q(lt),Bt=U(Ot*dt),Ut=U(Tt*dt),ot=(C=Y.BASE.multiplyAndAddUnsafe(nt,Bt,Ut))==null?void 0:C.toAffine();return ot?U(ot.x)===Tt:!1}return{CURVE:S,getPublicKey:j,getSharedSecret:H,sign:ne,verify:ce,ProjectivePoint:Y,Signature:W,utils:q}}function R(d,S){const E=d.ORDER;let y=c;for(let ae=E-l;ae%u===c;ae/=u)y+=l;const v=y,I=u<<v-l-l,N=I*u,U=(E-l)/N,Q=(U-l)/u,Y=N-l,z=I,k=d.pow(S,U),V=d.pow(S,(U+l)/u);let ue=(ae,re)=>{let J=k,W=d.pow(re,Y),q=d.sqr(W);q=d.mul(q,re);let j=d.mul(ae,q);j=d.pow(j,Q),j=d.mul(j,W),W=d.mul(j,re),q=d.mul(j,ae);let L=d.mul(q,W);j=d.pow(L,z);let H=d.eql(j,d.ONE);W=d.mul(q,V),j=d.mul(L,J),q=d.cmov(W,q,H),L=d.cmov(j,L,H);for(let O=v;O>l;O--){let D=O-u;D=u<<D-l;let Z=d.pow(L,D);const Ee=d.eql(Z,d.ONE);W=d.mul(q,J),J=d.mul(J,J),Z=d.mul(L,J),q=d.cmov(W,q,Ee),L=d.cmov(Z,L,Ee)}return{isValid:H,value:q}};if(d.ORDER%g===f){const ae=(d.ORDER-f)/g,re=d.sqrt(d.neg(S));ue=(J,W)=>{let q=d.sqr(W);const j=d.mul(J,W);q=d.mul(q,j);let L=d.pow(q,ae);L=d.mul(L,j);const H=d.mul(L,re),O=d.mul(d.sqr(L),W),D=d.eql(O,J);let Z=d.cmov(H,L,D);return{isValid:D,value:Z}}}return ue}function P(d,S){if(t.validateField(d),!d.isValid(S.A)||!d.isValid(S.B)||!d.isValid(S.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const E=R(d,S.Z);if(!d.isOdd)throw new Error("Fp.isOdd is not implemented!");return y=>{let v,I,N,U,Q,Y,z,k;v=d.sqr(y),v=d.mul(v,S.Z),I=d.sqr(v),I=d.add(I,v),N=d.add(I,d.ONE),N=d.mul(N,S.B),U=d.cmov(S.Z,d.neg(I),!d.eql(I,d.ZERO)),U=d.mul(U,S.A),I=d.sqr(N),Y=d.sqr(U),Q=d.mul(Y,S.A),I=d.add(I,Q),I=d.mul(I,N),Y=d.mul(Y,U),Q=d.mul(Y,S.B),I=d.add(I,Q),z=d.mul(v,N);const{isValid:V,value:ue}=E(I,Y);k=d.mul(v,y),k=d.mul(k,ue),z=d.cmov(z,N,V),k=d.cmov(k,ue,V);const ae=d.isOdd(y)===d.isOdd(k);return k=d.cmov(d.neg(k),k,ae),z=d.div(z,U),{x:z,y:k}}}})(ed)),ed}var zv;function yN(){if(zv)return ra;zv=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.getHash=n,ra.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=pN(),r=Za(),t=uA();function n(a){return{hash:a,hmac:(s,...o)=>(0,e.hmac)(a,s,(0,r.concatBytes)(...o)),randomBytes:r.randomBytes}}function i(a,s){const o=c=>(0,t.weierstrass)({...a,...n(c)});return Object.freeze({...o(s),create:o})}return ra}var on={},Wv;function hN(){if(Wv)return on;Wv=1,Object.defineProperty(on,"__esModule",{value:!0}),on.expand_message_xmd=s,on.expand_message_xof=o,on.hash_to_field=c,on.isogenyMap=l,on.createHasher=u;const e=hu(),r=Vi(),t=r.bytesToNumberBE;function n(f,g){if(f<0||f>=1<<8*g)throw new Error(`bad I2OSP call: value=${f} length=${g}`);const _=Array.from({length:g}).fill(0);for(let A=g-1;A>=0;A--)_[A]=f&255,f>>>=8;return new Uint8Array(_)}function i(f,g){const _=new Uint8Array(f.length);for(let A=0;A<f.length;A++)_[A]=f[A]^g[A];return _}function a(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function s(f,g,_,A){(0,r.abytes)(f),(0,r.abytes)(g),a(_),g.length>255&&(g=A((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),g)));const{outputLen:w,blockLen:R}=A,P=Math.ceil(_/w);if(P>255)throw new Error("Invalid xmd length");const d=(0,r.concatBytes)(g,n(g.length,1)),S=n(0,R),E=n(_,2),y=new Array(P),v=A((0,r.concatBytes)(S,f,E,n(0,1),d));y[0]=A((0,r.concatBytes)(v,n(1,1),d));for(let N=1;N<=P;N++){const U=[i(v,y[N-1]),n(N+1,1),d];y[N]=A((0,r.concatBytes)(...U))}return(0,r.concatBytes)(...y).slice(0,_)}function o(f,g,_,A,w){if((0,r.abytes)(f),(0,r.abytes)(g),a(_),g.length>255){const R=Math.ceil(2*A/8);g=w.create({dkLen:R}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(g).digest()}if(_>65535||g.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return w.create({dkLen:_}).update(f).update(n(_,2)).update(g).update(n(g.length,1)).digest()}function c(f,g,_){(0,r.validateObject)(_,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:A,k:w,m:R,hash:P,expand:d,DST:S}=_;(0,r.abytes)(f),a(g);const E=typeof S=="string"?(0,r.utf8ToBytes)(S):S,y=A.toString(2).length,v=Math.ceil((y+w)/8),I=g*R*v;let N;if(d==="xmd")N=s(f,E,I,P);else if(d==="xof")N=o(f,E,I,w,P);else if(d==="_internal_pass")N=f;else throw new Error('expand must be "xmd" or "xof"');const U=new Array(g);for(let Q=0;Q<g;Q++){const Y=new Array(R);for(let z=0;z<R;z++){const k=v*(z+Q*R),V=N.subarray(k,k+v);Y[z]=(0,e.mod)(t(V),A)}U[Q]=Y}return U}function l(f,g){const _=g.map(A=>Array.from(A).reverse());return(A,w)=>{const[R,P,d,S]=_.map(E=>E.reduce((y,v)=>f.add(f.mul(y,A),v)));return A=f.div(R,P),w=f.mul(w,f.div(d,S)),{x:A,y:w}}}function u(f,g,_){if(typeof g!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(A,w){const R=c(A,2,{..._,DST:_.DST,...w}),P=f.fromAffine(g(R[0])),d=f.fromAffine(g(R[1])),S=P.add(d).clearCofactor();return S.assertValidity(),S},encodeToCurve(A,w){const R=c(A,1,{..._,DST:_.encodeDST,...w}),P=f.fromAffine(g(R[0])).clearCofactor();return P.assertValidity(),P},mapToCurve(A){if(!Array.isArray(A))throw new Error("mapToCurve: expected array of bigints");for(const R of A)if(typeof R!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${R} in array`);const w=f.fromAffine(g(A)).clearCofactor();return w.assertValidity(),w}}}return on}var Kv;function gN(){return Kv||(Kv=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 r=fN(),t=Za(),n=yN(),i=hN(),a=hu(),s=Vi(),o=uA(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),u=BigInt(1),f=BigInt(2),g=(W,q)=>(W+q/f)/q;function _(W){const q=c,j=BigInt(3),L=BigInt(6),H=BigInt(11),O=BigInt(22),D=BigInt(23),Z=BigInt(44),Ee=BigInt(88),_e=W*W*W%q,Se=_e*_e*W%q,Ae=(0,a.pow2)(Se,j,q)*Se%q,ne=(0,a.pow2)(Ae,j,q)*Se%q,ce=(0,a.pow2)(ne,f,q)*_e%q,de=(0,a.pow2)(ce,H,q)*ce%q,me=(0,a.pow2)(de,O,q)*de%q,Te=(0,a.pow2)(me,Z,q)*me%q,Re=(0,a.pow2)(Te,Ee,q)*Te%q,Be=(0,a.pow2)(Re,Z,q)*me%q,ze=(0,a.pow2)(Be,j,q)*Se%q,Ze=(0,a.pow2)(ze,D,q)*de%q,Ye=(0,a.pow2)(Ze,L,q)*_e%q,nt=(0,a.pow2)(Ye,f,q);if(!A.eql(A.sqr(nt),W))throw new Error("Cannot find square root");return nt}const A=(0,a.Field)(c,void 0,void 0,{sqrt:_});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:A,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:W=>{const q=l,j=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),L=-u*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),H=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),O=j,D=BigInt("0x100000000000000000000000000000000"),Z=g(O*W,q),Ee=g(-L*W,q);let _e=(0,a.mod)(W-Z*j-Ee*H,q),Se=(0,a.mod)(-Z*L-Ee*O,q);const Ae=_e>D,ne=Se>D;if(Ae&&(_e=q-_e),ne&&(Se=q-Se),_e>D||Se>D)throw new Error("splitScalar: Endomorphism failed, k="+W);return{k1neg:Ae,k1:_e,k2neg:ne,k2:Se}}}},r.sha256);const w=BigInt(0),R=W=>typeof W=="bigint"&&w<W&&W<c,P=W=>typeof W=="bigint"&&w<W&&W<l,d={};function S(W,...q){let j=d[W];if(j===void 0){const L=(0,r.sha256)(Uint8Array.from(W,H=>H.charCodeAt(0)));j=(0,s.concatBytes)(L,L),d[W]=j}return(0,r.sha256)((0,s.concatBytes)(j,...q))}const E=W=>W.toRawBytes(!0).slice(1),y=W=>(0,s.numberToBytesBE)(W,32),v=W=>(0,a.mod)(W,c),I=W=>(0,a.mod)(W,l),N=e.secp256k1.ProjectivePoint,U=(W,q,j)=>N.BASE.multiplyAndAddUnsafe(W,q,j);function Q(W){let q=e.secp256k1.utils.normPrivateKeyToScalar(W),j=N.fromPrivateKey(q);return{scalar:j.hasEvenY()?q:I(-q),bytes:E(j)}}function Y(W){if(!R(W))throw new Error("bad x: need 0 < x < p");const q=v(W*W),j=v(q*W+BigInt(7));let L=_(j);L%f!==w&&(L=v(-L));const H=new N(W,L,u);return H.assertValidity(),H}function z(...W){return I((0,s.bytesToNumberBE)(S("BIP0340/challenge",...W)))}function k(W){return Q(W).bytes}function V(W,q,j=(0,t.randomBytes)(32)){const L=(0,s.ensureBytes)("message",W),{bytes:H,scalar:O}=Q(q),D=(0,s.ensureBytes)("auxRand",j,32),Z=y(O^(0,s.bytesToNumberBE)(S("BIP0340/aux",D))),Ee=S("BIP0340/nonce",Z,H,L),_e=I((0,s.bytesToNumberBE)(Ee));if(_e===w)throw new Error("sign failed: k is zero");const{bytes:Se,scalar:Ae}=Q(_e),ne=z(Se,H,L),ce=new Uint8Array(64);if(ce.set(Se,0),ce.set(y(I(Ae+ne*O)),32),!ue(ce,L,H))throw new Error("sign: Invalid signature produced");return ce}function ue(W,q,j){const L=(0,s.ensureBytes)("signature",W,64),H=(0,s.ensureBytes)("message",q),O=(0,s.ensureBytes)("publicKey",j,32);try{const D=Y((0,s.bytesToNumberBE)(O)),Z=(0,s.bytesToNumberBE)(L.subarray(0,32));if(!R(Z))return!1;const Ee=(0,s.bytesToNumberBE)(L.subarray(32,64));if(!P(Ee))return!1;const _e=z(y(Z),E(D),H),Se=U(D,Ee,I(-_e));return!(!Se||!Se.hasEvenY()||Se.toAffine().x!==Z)}catch{return!1}}e.schnorr={getPublicKey:k,sign:V,verify:ue,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:Y,pointToBytes:E,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:S,mod:a.mod}};const ae=(0,i.isogenyMap)(A,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(W=>W.map(q=>BigInt(q)))),re=(0,o.mapToCurveSimpleSWU)(A,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:A.create(BigInt("-11"))}),J=(0,i.createHasher)(e.secp256k1.ProjectivePoint,W=>{const{x:q,y:j}=re(A.create(W[0]));return ae(q,j)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:A.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256});e.hashToCurve=J.hashToCurve,e.encodeToCurve=J.encodeToCurve})(Xl)),Xl}var Yv;function _N(){return Yv||(Yv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var r=gN();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return r.secp256k1}})})(Jl)),Jl}var Qv;function EN(){if(Qv)return Mr;Qv=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.recoverPublicKey=t,Mr.recoverAddressFromEthSignature=i,Mr.sign=a,Mr.createEthereumMessageHash=s,Mr.ethSign=o,Mr.computeAddress=c,Mr.createUnsafeIdentity=l;const e=yu(),r=_N();function t(u,f){if(u.length!==65)throw new Error("Invalid signature length "+u.length);const g=u[64];if(g!==27&&g!==28)throw new Error(`Invalid signature recovery value: ${g}. Expected 27 or 28.`);const _=u.slice(0,u.length-1),A=g===28?1:0;return r.secp256k1.Signature.fromCompact(_).addRecoveryBit(A).recoverPublicKey(f).toRawBytes(!1).slice(1)}function n(u){if(u.length!==65)throw new Error("Invalid ethereum signature");const f=u[64];if(f===0||f===1){const g=new Uint8Array(u);return g[64]=f+27,g}return u}function i(u,f){if(typeof u=="string"){if((0,e.isHex)(u))return i((0,e.hexToBytes)(u),f);throw new Error("String signatures must be encoded in hex")}return c(t(n(u),s(f)))}function a(u,f){const g=r.secp256k1.sign(f,u),_=g.recovery===1?"1c":"1b";return"0x"+g.toCompactHex()+_}function s(u){const f=typeof u=="string"?(0,e.stringToUtf8Bytes)(u):u,g=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
38
|
-
`),(0,e.stringToUtf8Bytes)(String(f.length)),f);return(0,e.hexToBytes)((0,e.sha3)(g))}function o(u,f){return a(u,s(f))}function c(u){let f;if(u.length===65&&u[0]===4)f=u.slice(1);else if(u.length===64)f=u;else throw new Error(`Invalid public key length: ${u.length}. Expected 64 bytes, or 65 bytes with a leading 0x04 uncompressed prefix.`);return(0,e.getAddress)((0,e.sha3)(f).substring(24))}function l(){const u=r.secp256k1.utils.randomPrivateKey(),f=r.secp256k1.getPublicKey(u,!1).slice(1),g=c(f);return{privateKey:(0,e.bytesToHex)(u),publicKey:(0,e.bytesToHex)(f),address:g}}return Mr}var zo={},Jv;function vN(){if(Jv)return zo;Jv=1,Object.defineProperty(zo,"__esModule",{value:!0});const e=yu();class r{constructor(n,i=!0){nn(this,"requestManager");nn(this,"checkedBlocks");nn(this,"saveBlocks");nn(this,"savedBlocks");nn(this,"requests");nn(this,"blockTime");nn(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,c=this.blockTime;if((o===void 0||c===void 0)&&({firstTimestamp:o,blockTime:c}=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 u=await this.getBlockWrapper(Math.ceil((a-o)/c));return{block:await this.findBetter(a,u,i,c),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 c=n-i.timestamp;let l=Math.ceil(c/o);l===0&&(l=c<0?-1:1);const u=await this.getBlockWrapper(this.getNextBlock(n,i.number,l));return o=Math.abs((i.timestamp-u.timestamp)/(i.number-u.number)),this.findBetter(n,u,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 zo.default=r,zo}var Wo={},Xv;function bN(){if(Xv)return Wo;Xv=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.moveMinutes=e;function e(r){const t=new Date;return t.setMinutes(t.getMinutes()+r),t}return Wo}var td={},pr={},Un={},kn={},rd={},mr={},Zv;function Oe(){if(Zv)return mr;Zv=1;var e=mr&&mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(mr,"__esModule",{value:!0}),mr.validateType=mr.generateLazyValidator=mr.Ajv=void 0;const r=e(Mm());mr.Ajv=r.default;const t=e(DS()),n=e(qS());function i(s,o){let c=null;const l=(u,f)=>{if(!c){const g=new r.default({$data:!0,allErrors:!0});(0,t.default)(g),(0,n.default)(g,{singleError:!0}),o==null||o.forEach(_=>g.addKeyword(_)),c=g.compile(s),Object.defineProperty(l,"errors",{get(){return c==null?void 0:c.errors}})}return c(u,f)};return l}mr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return mr.validateType=a,mr}var xv;function TN(){return xv||(xv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const r=Oe();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(rd)),rd}var nd={},eb;function SN(){return eb||(eb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const r=Oe();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(nd)),nd}var tb;function AN(){return tb||(tb=1,(function(e){var r=kn&&kn.__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]})),t=kn&&kn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(TN(),e),t(SN(),e)})(kn)),kn}var Vn={},id={},rb;function RN(){return rb||(rb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const r=Oe();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(id)),id}var ad={},sd={},nb;function gu(){return nb||(nb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const r=Oe();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},a={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function s(u){return n[u]}t.getMaxSupply=s;function o(u){return a[u]}t.getColor=o;function c(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=c;function l(u){return[i[u],a[u]]}t.getGradient=l})(e.Rarity||(e.Rarity={}))})(sd)),sd}var od={},ib;function hi(){return ib||(ib=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const r=Oe();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(od)),od}var ud={},cd={},ab;function Hm(){return ab||(ab=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const r=Oe();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(cd)),cd}var ld={},dd={},sb;function cA(){return sb||(sb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const r=Oe();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(dd)),dd}var ob;function Gm(){return ob||(ob=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const r=hi(),t=Oe(),n=cA();(function(i){i.schema={oneOf:[Object.assign({},r.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(ld)),ld}var ub;function zm(){return ub||(ub=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const r=Oe(),t=Hm(),n=Gm();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.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,r.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(ud)),ud}var Fn={},Hn={},fd={},pd={},cb;function gi(){return cb||(cb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const r=Oe();(function(t){t.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,r.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(pd)),pd}var lb;function lA(){return lb||(lb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const r=hi(),t=gi(),n=Oe();var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},c.validate=(0,n.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:r.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},c.validate=(0,n.generateLazyValidator)(c.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(c.schema.pattern,"i");c.validate=u=>l.test(u)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},t.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:t.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},c.validate=(0,n.generateLazyValidator)(c.schema)})(e.Avatar||(e.Avatar={}))})(fd)),fd}var md={},db;function wN(){return db||(db=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const r=Oe(),t=lA();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(md)),md}var fb;function IN(){return fb||(fb=1,(function(e){var r=Hn&&Hn.__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]})),t=Hn&&Hn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(lA(),e),t(wN(),e)})(Hn)),Hn}var yd={},hd={},pb;function dA(){return pb||(pb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const r=Oe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.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:[]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(hd)),hd}var gd={},mb;function fA(){return mb||(mb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const r=Oe();(function(t){t.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:[]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(gd)),gd}var _d={},yb;function pA(){return yb||(yb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const r=Oe();(function(t){t.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"]},t.schemaValidator=(0,r.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(_d)),_d}var Ed={},ia={},hb;function Wm(){return hb||(hb=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.displayableProperties=void 0,ia.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),ia}var vd={},gb;function mA(){return gb||(gb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const r=Oe();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(vd)),vd}var bd={},_b;function yA(){return _b||(_b=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const r=Oe();(function(t){t.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"]}}},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(bd)),bd}var Eb;function ON(){return Eb||(Eb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const r=Oe(),t=Wm(),n=dA(),i=pA(),a=mA(),s=yA(),o=fA();var c;(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"})(c=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},t.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(c)},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:c.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,r.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(Ed)),Ed}var vb;function PN(){return vb||(vb=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 r=dA();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return r.FeatureToggles}});var t=fA();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=pA();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=ON();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=mA();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=yA();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(yd)),yd}var Gn={},Td={},Sd={},bb;function hA(){return bb||(bb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const r=Oe();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Sd)),Sd}var Tb;function gA(){return Tb||(Tb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const r=Oe(),t=hA();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Td)),Td}var Ad={},Sb;function _A(){return Sb||(Sb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const r=Oe();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Ad)),Ad}var Rd={},Ab;function Km(){return Ab||(Ab=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const r=gu(),t=Oe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:r.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})(Rd)),Rd}var wd={},zn={},Id={},Rb;function NN(){return Rb||(Rb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const r=Oe();(function(t){t.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},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Id)),Id}var wb;function EA(){return wb||(wb=1,(function(e){var r=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]})),t=zn&&zn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(NN(),e)})(zn)),zn}var Od={},Ib;function Ym(){return Ib||(Ib=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 r=Oe();var t;(function(f){f.SINGLE="single",f.ANY="any",f.MULTIPLE="multiple",f.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(f){f.MAINNET="mainnet",f.BASE_MAINNET="base_mainnet",f.BASE_SEPOLIA="base_sepolia",f.MONAD_MAINNET="monad_mainnet",f.MONAD_TESTNET="monad_testnet",f.APE_MAINNET="ape_mainnet",f.APE_CALDERA="ape_caldera",f.MATIC="matic",f.SEPOLIA="sepolia",f.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(f){f._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(_,A){if(!A||!A.from||!A.to)return!1;let{to:w,from:R}=A;return(typeof R!="bigint"||typeof w!="bigint")&&(R=BigInt(R),w=BigInt(w)),R<=w},errors:!1},f.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},f.validate=(0,r.generateLazyValidator)(f.schema,[f._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(f){f.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},f.validate=(0,r.generateLazyValidator)(f.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var c;(function(f){f.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},f.validate=(0,r.generateLazyValidator)(f.schema,[s._fromLessThanOrEqualTo])})(c=e.Mapping||(e.Mapping={})),(function(f){f._isMappingsValid={keyword:"_isMappingsValid",validate:function(_,A){try{u(A)}catch{return!1}return!0},errors:!1},f.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:c.schema}},minProperties:1,required:[],additionalProperties:!1};const g=Object.values(n).reduce((_,A)=>(_[A]=f.innerSchema,_),{});f.schema={type:"object",properties:g,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},f.validate=(0,r.generateLazyValidator)(f.schema,[s._fromLessThanOrEqualTo,f._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(g,_,A){super(g),this.existingMapping=_,this.conflictingMapping=A}}e.AddMappingError=l;function u(f={}){const g={};for(const[y,v]of Object.entries(f)){g[y]={};for(const[I,N]of Object.entries(v))for(const U of N)S(y,I,U)}function _(){return JSON.parse(JSON.stringify(g))}function A(y,v,I){const N=BigInt(y);return N>=BigInt(v)&&N<=BigInt(I)}function w(y,v){switch(v.type){case t.SINGLE:return y.id===v.id;case t.MULTIPLE:return v.ids.includes(y.id);case t.RANGE:return A(y.id,v.from,v.to);default:return!1}}function R(y,v){switch(v.type){case t.SINGLE:return y.ids.includes(v.id);case t.MULTIPLE:return y.ids.some(I=>v.ids.includes(I));case t.RANGE:return y.ids.some(I=>A(I,v.from,v.to));default:return!1}}function P(y,v){switch(v.type){case t.SINGLE:return A(v.id,y.from,y.to);case t.MULTIPLE:return v.ids.some(I=>A(I,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(v.to)&&BigInt(y.to)>=BigInt(v.from)}}function d(y,v){if(y.type===t.ANY||v.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return w(y,v);case t.MULTIPLE:return R(y,v);case t.RANGE:return P(y,v)}}function S(y,v,I){var N,U;const Q=v.toLowerCase();g[y]=(N=g[y])!==null&&N!==void 0?N:{},g[y][Q]=(U=g[y][Q])!==null&&U!==void 0?U:[];for(const Y of g[y][Q])if(d(Y,I))throw new l(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,Y,I);g[y][Q].push(I)}function E(y,v,I){var N;return!((N=g[y])===null||N===void 0)&&N[v]?g[y][v].some(U=>{switch(U.type){case t.SINGLE:return U.id===I;case t.ANY:return!0;case t.MULTIPLE:return U.ids.includes(I);case t.RANGE:return BigInt(I)>=BigInt(U.from)&&BigInt(I)<=BigInt(U.to)}}):!1}return{addMapping:S,getMappings:_,includesNft:E}}e.createMappingsHelper=u})(Od)),Od}var Ob;function Qm(){return Ob||(Ob=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const r=Oe(),t=EA(),n=Ym();e.schema={type:"object",properties:{merkleProof:t.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,c){var l;const u=c;return!((l=u==null?void 0:u.merkleProof)===null||l===void 0)&&l.hashingKeys?u.merkleProof.hashingKeys.every(f=>u.hasOwnProperty(f)):!1},errors:!1},a=(0,r.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(wd)),wd}var Pd={},Nd={},yr={},Pb;function vA(){if(Pb)return yr;Pb=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.isBaseEmote=yr.isBaseAvatar=yr.requiredBaseItemProps=yr.baseItemProperties=void 0;const e=gA(),r=_A(),t=Wm();yr.baseItemProperties=Object.assign(Object.assign({},t.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({},r.Metrics.schema),{nullable:!0})}),yr.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",c=s[3]==="base-avatars";return s.length===5&&o&&c}yr.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 yr.isBaseEmote=i,yr}var Nb;function MN(){return Nb||(Nb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const r=Oe(),t=hi(),n=zm(),i=vA(),a=Km(),s=Qm(),o=Gm(),c=Ym();(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:t.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 u={keyword:"_isThirdParty",validate:(g,_)=>!g||(0,s.isThirdParty)(_),errors:!1},f={keyword:"_isBaseAvatar",validate:(g,_)=>!g||(0,i.isBaseAvatar)(_),errors:!1};l.validate=(0,r.generateLazyValidator)(l.schema,[u,f,c.RangeMapping._fromLessThanOrEqualTo,c.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Nd)),Nd}var Mb;function CN(){return Mb||(Mb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var r=zm();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return r.WearableRepresentation}});var t=MN();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=hi();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=cA();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Gm();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Pd)),Pd}var Md={},Cd={},jd={},Dd={},Cb;function bA(){return Cb||(Cb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const r=Oe();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Dd)),Dd}var qd={},jb;function TA(){return jb||(jb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const r=Oe(),t=Hm();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.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,r.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(qd)),qd}var Ld={},Db;function SA(){return Db||(Db=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const r=Oe();var t;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,r.generateLazyValidator)(i.schema)})(t=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,r.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"},[t.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[t.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",t.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[t.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,r.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(t).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,r.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Ld)),Ld}var qb;function AA(){return qb||(qb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const r=bA(),t=Oe(),n=TA(),i=SA();(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:r.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,t.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(jd)),jd}var Lb;function jN(){return Lb||(Lb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const r=RA(),t=Oe(),n=vA(),i=Km(),a=Qm(),s=AA();(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 c={keyword:"_isThirdParty",validate:(u,f)=>!u||(0,r.isThirdParty)(f),errors:!1},l={keyword:"_isBaseEmote",validate:(u,f)=>!u||(0,n.isBaseEmote)(f),errors:!1};o.validate=(0,t.generateLazyValidator)(o.schema,[c,l,r.RangeMapping._fromLessThanOrEqualTo,r.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Cd)),Cd}var $d={},$b;function DN(){return $b||($b=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const r=Oe();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})($d)),$d}var Bd={},Bb;function qN(){return Bb||(Bb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const r=Oe();(function(t){t.SIMPLE_OUTCOME="so",t.MULTIPLE_OUTCOME="mo",t.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Bd)),Bd}var Ub;function LN(){return Ub||(Ub=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 r=jN();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return r.Emote}});var t=TA();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=AA();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=SA();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=bA();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=DN();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=qN();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Md)),Md}var kb;function RA(){return kb||(kb=1,(function(e){var r=Gn&&Gn.__createBinding||(Object.create?(function(l,u,f,g){g===void 0&&(g=f);var _=Object.getOwnPropertyDescriptor(u,f);(!_||("get"in _?!u.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,g,_)}):(function(l,u,f,g){g===void 0&&(g=f),l[g]=u[f]})),t=Gn&&Gn.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=gA();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=hA();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=_A();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Hm();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Km();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var c=Qm();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),t(Ym(),e),t(CN(),e),t(LN(),e)})(Gn)),Gn}var Ud={},kd={},Vb;function xa(){return Vb||(Vb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const r=Oe();var t;(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"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,r.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(kd)),kd}var Fb;function $N(){return Fb||(Fb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const r=gi(),t=xa(),n=Oe();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:r.IPFSv1.schema}},{properties:{entityId:r.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:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:r.IPFSv1.schema}},{properties:{entityId:r.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Ud)),Ud}var Vd={},Fd={},Hb;function wA(){return Hb||(Hb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const r=gi(),t=Oe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[r.IPFSv1.schema,r.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Fd)),Fd}var Gb;function IA(){return Gb||(Gb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const r=gi(),t=wA(),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:[r.IPFSv1.schema,r.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.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={}))})(Vd)),Vd}var Hd={},zb;function BN(){return zb||(zb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const r=xa(),t=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:r.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Hd)),Hd}var Wn={},Gd={},Wb;function UN(){return Wb||(Wb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const r=hi(),t=gi(),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:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:r.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={}))})(Gd)),Gd}var Kb;function kN(){return Kb||(Kb=1,(function(e){var r=Wn&&Wn.__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]})),t=Wn&&Wn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(UN(),e)})(Wn)),Wn}var Kn={},zd={},Yb;function OA(){return Yb||(Yb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(r){r.BADGE_GRANTED="badge_granted",r.BID_ACCEPTED="bid_accepted",r.BID_RECEIVED="bid_received",r.EVENTS_STARTED="events_started",r.EVENTS_STARTS_SOON="events_starts_soon",r.EVENT_CREATED="event_created",r.GOVERNANCE_ANNOUNCEMENT="governance_announcement",r.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",r.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",r.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",r.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",r.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",r.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",r.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",r.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",r.GOVERNANCE_TENDER_PASSED="governance_tender_passed",r.GOVERNANCE_WHALE_VOTE="governance_whale_vote",r.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",r.ITEM_SOLD="item_sold",r.ITEM_PUBLISHED="item_published",r.LAND_RENTAL_ENDED="rental_ended",r.LAND_RENTED="rental_started",r.REWARD_ASSIGNED="reward_assignment",r.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",r.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",r.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",r.REWARD_DELAYED="reward_delayed",r.REWARD_IN_PROGRESS="reward_in_progress",r.ROYALTIES_EARNED="royalties_earned",r.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",r.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",r.WORLDS_ACCESS_RESTORED="worlds_access_restored",r.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",r.WORLDS_MISSING_RESOURCES="worlds_missing_resources",r.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",r.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",r.CREDITS_GOAL_COMPLETED="credits_goal_completed",r.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",r.STREAMING_KEY_RESET="streaming_key_reset",r.STREAMING_KEY_REVOKE="streaming_key_revoke",r.STREAMING_KEY_EXPIRED="streaming_key_expired",r.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",r.STREAMING_PLACE_UPDATED="streaming_place_updated",r.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",r.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",r.CREDITS_REMINDER_USAGE="credits_reminder_usage",r.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",r.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",r.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",r.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",r.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",r.COMMUNITY_DELETED="community_deleted",r.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",r.COMMUNITY_RENAMED="community_renamed",r.COMMUNITY_MEMBER_BANNED="community_member_banned",r.COMMUNITY_MEMBER_REMOVED="community_member_removed",r.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",r.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",r.COMMUNITY_INVITE_RECEIVED="community_invite_received",r.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",r.COMMUNITY_POST_ADDED="community_post_added",r.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",r.USER_BANNED_FROM_SCENE="user_banned_from_scene",r.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",r.TRANSFER_RECEIVED="transfer_received",r.TIP_RECEIVED="tip_received",r.BANNED="banned",r.BAN_WARNING="ban_warning",r.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(r){r.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(zd)),zd}var Wd={},Kd={},Qb;function PA(){return Qb||(Qb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const r=Oe(),t=OA(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.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(t.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Kd)),Kd}var Yd={},Jb;function NA(){return Jb||(Jb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(r){r.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(r.schema.pattern);r.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(Yd)),Yd}var Xb;function VN(){return Xb||(Xb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const r=Oe(),t=PA(),n=gi(),i=NA();(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:t.SubscriptionDetails.schema}},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(Wd)),Wd}var Zb;function FN(){return Zb||(Zb=1,(function(e){var r=Kn&&Kn.__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]})),t=Kn&&Kn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(OA(),e),t(VN(),e),t(PA(),e)})(Kn)),Kn}var Yn={},Qd={},xb;function Jt(){return xb||(xb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(r){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.WEB="web",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service",t.CREDITS_SERVICE="credits-service",t.STREAMING="streaming",t.COMMS="comms",t.REFERRAL="referral",t.COMMUNITY="community",t.CAMERA="camera",t.EVENT="event",t.GOVERNANCE="governance",t.MODERATION="moderation"})(r.Type||(r.Type={})),(function(t){(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"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.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"})(t.Worlds||(t.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"})(t.Client||(t.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(t.Web||(t.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"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.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"})(t.CreditsService||(t.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"})(t.Streaming||(t.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"})(t.Comms||(t.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(t.Referral||(t.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"})(t.Community||(t.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(t.Camera||(t.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"})(t.Event||(t.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"})(t.Governance||(t.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(t.Moderation||(t.Moderation={}))})(r.SubType||(r.SubType={}))})(e.Events||(e.Events={}))})(Qd)),Qd}var Jd={},e0;function HN(){return e0||(e0=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 r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(Jd)),Jd}var Xd={},t0;function GN(){return t0||(t0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const r=xa(),t=Oe(),n=IA(),i=Jt();(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:r.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Xd)),Xd}var Zd={},r0;function zN(){return r0||(r0=1,Object.defineProperty(Zd,"__esModule",{value:!0})),Zd}var xd={},n0;function WN(){return n0||(n0=1,Object.defineProperty(xd,"__esModule",{value:!0})),xd}var ef={},i0;function KN(){return i0||(i0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(ef)),ef}var tf={},aa={},a0;function _u(){if(a0)return aa;a0=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.createEventSchema=void 0;function e(r,t,n){return{type:"object",properties:{type:{type:"string",const:r},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return aa.createEventSchema=e,aa}var s0;function YN(){return s0||(s0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const r=Oe(),t=Jt(),n=_u(),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)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,r.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(tf)),tf}var rf={},o0;function QN(){return o0||(o0=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 r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(rf)),rf}var nf={},u0;function JN(){return u0||(u0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const r=Oe(),t=Jt(),n=_u(),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)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(nf)),nf}var af={},c0;function XN(){return c0||(c0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const r=Oe(),t=Jt();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:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.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,r.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(af)),af}var sf={},l0;function ZN(){return l0||(l0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const r=Oe(),t=Jt(),n=_u(),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)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(sf)),sf}var of={},d0;function xN(){return d0||(d0=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 r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(of)),of}var uf={},f0;function eM(){return f0||(f0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(uf)),uf}var cf={},p0;function tM(){return p0||(p0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(cf)),cf}var lf={},m0;function rM(){return m0||(m0=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 r=Oe(),t=Jt(),n=_u(),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)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,r.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(lf)),lf}var df={},y0;function nM(){return y0||(y0=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 r=xa(),t=Oe(),n=Jt();(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,t.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,t.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,t.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:r.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,t.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,t.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,t.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,t.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,t.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,t.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(df)),df}var ff={},h0;function iM(){return h0||(h0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const r=Oe(),t=Jt();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MODERATION},subType:{type:"string",const:t.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,r.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(ff)),ff}var g0;function aM(){return g0||(g0=1,(function(e){var r=Yn&&Yn.__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]})),t=Yn&&Yn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(Jt(),e),t(HN(),e),t(GN(),e),t(zN(),e),t(WN(),e),t(KN(),e),t(YN(),e),t(QN(),e),t(JN(),e),t(XN(),e),t(ZN(),e),t(xN(),e),t(eM(),e),t(tM(),e),t(rM(),e),t(nM(),e),t(iM(),e)})(Yn)),Yn}var _0;function Jm(){return _0||(_0=1,(function(e){var r=Fn&&Fn.__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]})),t=Fn&&Fn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(IN(),e),t(PN(),e),t(RA(),e),t(Wm(),e),t(EA(),e),t($N(),e),t(IA(),e),t(BN(),e),t(kN(),e),t(FN(),e),t(aM(),e)})(Fn)),Fn}var E0;function sM(){return E0||(E0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const r=gu(),t=hi(),n=zm(),i=Oe(),a=Jm();(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},r.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.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={}))})(ad)),ad}var v0;function oM(){return v0||(v0=1,(function(e){var r=Vn&&Vn.__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]})),t=Vn&&Vn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(RN(),e),t(sM(),e)})(Vn)),Vn}var b0;function uM(){return b0||(b0=1,(function(e){var r=Un&&Un.__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]})),t=Un&&Un.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(AN(),e),t(oM(),e)})(Un)),Un}var Qn={},pf={},T0;function cM(){return T0||(T0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const r=Oe();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(pf)),pf}var mf={},yf={},S0;function MA(){return S0||(S0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const r=Oe(),t=Ar();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 t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,r.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})(yf)),yf}var hf={},A0;function Sr(){return A0||(A0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const r=Oe();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(hf)),hf}var R0;function Ar(){return R0||(R0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const r=Oe(),t=MA(),n=Sr();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 t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.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 u={[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},u);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},u);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},u);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},u);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},u);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},u)}}e.getNetworkMapping=o;function c(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=c,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,r.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(mf)),mf}var gf={},w0;function lM(){return w0||(w0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const r=Oe(),t=Ar(),n=Sr();(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:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(gf)),gf}var _f={},Ef={},I0;function Eu(){return I0||(I0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const r=Oe();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Ef)),Ef}var O0;function dM(){return O0||(O0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const r=Oe(),t=Ar(),n=Sr(),i=Eu();(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:t.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})(_f)),_f}var vf={},bf={},P0;function CA(){return P0||(P0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const r=Oe(),t=Ar(),n=Jm(),i=Sr(),a=Eu(),s=gu(),o=hi();(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(c){c.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:t.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"]},c.validate=(0,r.generateLazyValidator)(c.schema)})(e.NFT||(e.NFT={}))})(bf)),bf}var N0;function fM(){return N0||(N0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const r=Oe(),t=Ar(),n=Sr(),i=CA(),a=Eu();(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:t.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,r.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(vf)),vf}var Tf={},M0;function Xm(){return M0||(M0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const r=Oe();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Tf)),Tf}var Sf={},C0;function pM(){return C0||(C0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const r=Oe();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Sf)),Sf}var Af={},j0;function mM(){return j0||(j0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const r=Oe(),t=Ar(),n=Sr();(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:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Af)),Af}var Rf={},D0;function yM(){return D0||(D0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(r){r.NEWEST="newest",r.RECENTLY_SOLD="recently_sold",r.CHEAPEST="cheapest",r.MOST_EXPENSIVE="most_expensive",r.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(r){r.ASC="asc",r.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Rf)),Rf}var wf={},q0;function hM(){return q0||(q0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const r=Oe(),t=Ar(),n=Xm(),i=Sr();(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:t.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,r.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})(wf)),wf}var If={},L0;function gM(){return L0||(L0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const r=Oe();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server",t.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(If)),If}var Of={},$0;function jA(){return $0||($0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const r=Oe();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(Of)),Of}var Pf={},B0;function _M(){return B0||(B0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const r=Oe(),t=Ar(),n=jA(),i=Sr();(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:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(Pf)),Pf}var Nf={},U0;function EM(){return U0||(U0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const r=Oe(),t=Ar(),n=Sr();(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,r.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:t.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,r.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Nf)),Nf}var Mf={},k0;function vM(){return k0||(k0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(r){r.DATE="date",r.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Mf)),Mf}var Cf={},V0;function bM(){return V0||(V0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const r=Oe();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Cf)),Cf}var jf={},F0;function TM(){return F0||(F0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const r=Oe();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(jf)),jf}var Df={},H0;function SM(){return H0||(H0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const r=Oe();function t(){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=t;function n(i,a){const s=t().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,r.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Df)),Df}var qf={},G0;function AM(){return G0||(G0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const r=Oe(),t=Ar(),n=Xm(),i=Sr();(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:t.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,r.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(qf)),qf}var Lf={},z0;function RM(){return z0||(z0=1,Object.defineProperty(Lf,"__esModule",{value:!0})),Lf}var $f={},W0;function wM(){return W0||(W0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(r){r.BID="bid",r.PUBLIC_NFT_ORDER="public_nft_order",r.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(r){r[r.ERC20=1]="ERC20",r[r.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",r[r.ERC721=3]="ERC721",r[r.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(r){r.SENT="sent",r.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})($f)),$f}var Jn={},Bf={},K0;function IM(){return K0||(K0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const r=Oe();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Bf)),Bf}var Uf={},Y0;function OM(){return Y0||(Y0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(r){r.AUTH="authentication",r.BUILDER="builder",r.MARKETPLACE="marketplace",r.PROFILE="profile",r.CONFIG="configurator",r.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Uf)),Uf}var kf={},Q0;function PM(){return Q0||(Q0=1,Object.defineProperty(kf,"__esModule",{value:!0})),kf}var Vf={},J0;function NM(){return J0||(J0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const r=Oe();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Vf)),Vf}var Ff={},X0;function MM(){return X0||(X0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const r=Oe();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Ff)),Ff}var Hf={},Z0;function CM(){return Z0||(Z0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const r=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,r.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=t})(Hf)),Hf}var Gf={},x0;function jM(){return x0||(x0=1,Object.defineProperty(Gf,"__esModule",{value:!0})),Gf}var zf={},e1;function DM(){return e1||(e1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const r=Oe();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(zf)),zf}var Wf={},t1;function qM(){return t1||(t1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const r=Oe();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Wf)),Wf}var Kf={},r1;function LM(){return r1||(r1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;const r=Oe();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})(Kf)),Kf}var Yf={},n1;function $M(){return n1||(n1=1,Object.defineProperty(Yf,"__esModule",{value:!0})),Yf}var Qf={},i1;function BM(){return i1||(i1=1,Object.defineProperty(Qf,"__esModule",{value:!0})),Qf}var Jf={},a1;function UM(){return a1||(a1=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var Xf={},s1;function kM(){return s1||(s1=1,Object.defineProperty(Xf,"__esModule",{value:!0})),Xf}var Zf={},o1;function VM(){return o1||(o1=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var xf={},u1;function FM(){return u1||(u1=1,Object.defineProperty(xf,"__esModule",{value:!0})),xf}var ep={},c1;function HM(){return c1||(c1=1,Object.defineProperty(ep,"__esModule",{value:!0})),ep}var tp={},l1;function GM(){return l1||(l1=1,Object.defineProperty(tp,"__esModule",{value:!0})),tp}var d1;function zM(){return d1||(d1=1,(function(e){var r=Jn&&Jn.__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]})),t=Jn&&Jn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(IM(),e),t(OM(),e),t(PM(),e),t(NM(),e),t(MM(),e),t(CM(),e),t(jM(),e),t(DM(),e),t(qM(),e),t(LM(),e),t($M(),e),t(BM(),e),t(UM(),e),t(kM(),e),t(VM(),e),t(FM(),e),t(HM(),e),t(GM(),e)})(Jn)),Jn}var Xn={},sa={},f1;function WM(){if(f1)return sa;f1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.isSysLink=void 0;const e=r=>r!==null&&typeof r=="object"&&"sys"in r&&"id"in r.sys;return sa.isSysLink=e,sa}var oa={},p1;function KM(){if(p1)return oa;p1=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.ContentfulLocale=void 0;var e;return(function(r){r.enUS="en-US",r.es="es",r.zh="zh"})(e||(e={})),oa.ContentfulLocale=e,oa}var rp={},m1;function YM(){return m1||(m1=1,Object.defineProperty(rp,"__esModule",{value:!0})),rp}var y1;function QM(){return y1||(y1=1,(function(e){var r=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]})),t=Xn&&Xn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(WM(),e),t(KM(),e),t(YM(),e)})(Xn)),Xn}var h1;function JM(){return h1||(h1=1,(function(e){var r=Qn&&Qn.__createBinding||(Object.create?(function(Q,Y,z,k){k===void 0&&(k=z);var V=Object.getOwnPropertyDescriptor(Y,z);(!V||("get"in V?!Y.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return Y[z]}}),Object.defineProperty(Q,k,V)}):(function(Q,Y,z,k){k===void 0&&(k=z),Q[k]=Y[z]})),t=Qn&&Qn.__exportStar||function(Q,Y){for(var z in Q)z!=="default"&&!Object.prototype.hasOwnProperty.call(Y,z)&&r(Y,Q,z)};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=cM();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Ar();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=MA();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=lM();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=dM();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var c=fM();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return c.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return c.ItemSortBy}});var l=Xm();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var u=pM();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return u.MetaTransaction}});var f=mM();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return f.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return f.MintSortBy}});var g=Sr();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return g.Network}});var _=Eu();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return _.NFTCategory}});var A=CA();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return A.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return A.NFTSortBy}});var w=yM();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return w.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return w.CatalogSortDirection}});var R=hM();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return R.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return R.OrderSortBy}});var P=gM();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return P.ProviderType}});var d=gu();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return d.Rarity}});var S=jA();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return S.SaleType}});var E=_M();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return E.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return E.SaleSortBy}});var y=EM();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var v=vM();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return v.AnalyticsDayDataSortBy}});var I=bM();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return I.Store}});var N=TM();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return N.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return N.GenderFilterOption}});var U=SM();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return U.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return U.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return U.isInsideWorldLimits}}),t(AM(),e),t(RM(),e),t(wM(),e),t(zM(),e),t(QM(),e)})(Qn)),Qn}var np={},g1;function XM(){return g1||(g1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const r=Oe();(function(t){t.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"]},t.validate=(0,r.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(np)),np}var Zn={},ip={},ua={},_1;function DA(){if(_1)return ua;_1=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function r(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function t(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||r(i,a)||t(i,a)}return ua.isInExceptionBlock=n,ua}var E1;function ZM(){return E1||(E1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const r=Oe(),t=DA();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(_,A){return!A||typeof A.x!="number"||typeof A.y!="number"?!1:o(A)||(0,t.isInExceptionBlock)(A.x,A.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,r.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:g,y:_}){return`${g},${_}`}n.parcelToString=i;function a(g){const _=g.match(/^(-?\d+),(-?\d+)$/);if(!_)return null;const[,A,w]=_,R=parseInt(A,10),P=parseInt(w,10);return{x:R,y:P}}n.stringToParcel=a;function s(g){const _=a(g);return _?n.validate(_):!1}n.isParcelStringValid=s;function o(g){const{x:_,y:A}=g;return _>=e.PARCEL_LIMITS.minX&&_<=e.PARCEL_LIMITS.maxX&&A>=e.PARCEL_LIMITS.minY&&A<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function c(g){return(0,t.isInExceptionBlock)(g.x,g.y)}n.isExceptionParcel=c;function l(g){return o(g)||c(g)}n.isInBounds=l;function u(g){return n.validate(g)}n.isValid=u;function f(g){const _=a(g);return _?n.validate(_):!1}n.isValidString=f})(e.Parcel||(e.Parcel={}))})(ip)),ip}var xn={},v1;function xM(){if(v1)return xn;v1=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.validateUrlInstance=xn.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function r(_,A=2){let w=_;for(let R=0;R<A;R++)try{w=decodeURIComponent(w)}catch{break}return w.normalize("NFKC")}function t(_){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(_)}function n(_){return!!(_.username||_.password)}function i(_){return/\\/.test(_)}const a=["80","443"];function s(_,A){return!!_.port&&!A.includes(_.port)}function o(_){const A=_.toLowerCase();return!!(A==="localhost"||A.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(A)||A==="::1"||A==="[::1]"||A.startsWith("fe80:")||A.startsWith("fc00:"))}function c(_){if(_.startsWith("//"))return null;try{return{url:new URL(_),wasRelative:!1}}catch{try{return{url:new URL(_,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(_){const A=r(String(_).toLowerCase());return!(t(A)||i(A))}function u(_){return!(!_||_.includes("..")||_.includes("//")||t(_)||i(_))}function f(_,A={}){const w=Object.assign(Object.assign({},e),A),R=[...a,...w.allowedPorts];if(!_||_.length===0||_.length>4096||t(_)||i(_))return!1;const P=r(_);if(t(P)||i(P)||_.startsWith("//"))return!1;const d=c(_);if(!d)return!1;const{url:S,wasRelative:E}=d;if(S.protocol!=="http:"&&S.protocol!=="https:"&&S.protocol!==""||n(S)||i(_)||i(S.href)||!E&&(s(S,R)||!w.allowLocalhost&&S.hostname&&o(S.hostname))||!u(S.pathname)||S.pathname.length>2048)return!1;const y=Array.from(S.searchParams.entries());if(y.length>50||(S.search?S.search.startsWith("?")?S.search.length-1:S.search.length:0)>2048)return!1;for(const[I,N]of y)if(I.length===0||!l(I)||!l(N)||I.length>128||N.length>1024)return!1;return!(S.hash&&t(S.hash))}xn.validateUrl=f;function g(_,A={}){return f(_.toString(),A)}return xn.validateUrlInstance=g,xn}var b1;function eC(){return b1||(b1=1,(function(e){var r=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]})),t=Zn&&Zn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(ZM(),e),t(DA(),e),t(xM(),e)})(Zn)),Zn}var T1;function tC(){return T1||(T1=1,(function(e){var r=pr&&pr.__createBinding||(Object.create?(function(s,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(s,l,u)}):(function(s,o,c,l){l===void 0&&(l=c),s[l]=o[c]})),t=pr&&pr.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=pr&&pr.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var c in s)c!=="default"&&Object.prototype.hasOwnProperty.call(s,c)&&r(o,s,c);return t(o,s),o},i=pr&&pr.__exportStar||function(s,o){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&r(o,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(uM());e.sdk=a,i(Oe(),e),i(JM(),e),i(Jm(),e),i(gi(),e),i(XM(),e),i(xa(),e),i(wA(),e),i(NA(),e),i(eC(),e)})(pr)),pr}var S1;function qA(){return S1||(S1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const r=tC();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return r.AuthChain}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return r.AuthLink}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return r.AuthLinkType}})})(td)),td}var A1;function LA(){return A1||(A1=1,(function(e){var r=fr&&fr.__createBinding||(Object.create?(function(J,W,q,j){j===void 0&&(j=q);var L=Object.getOwnPropertyDescriptor(W,q);(!L||("get"in L?!W.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return W[q]}}),Object.defineProperty(J,j,L)}):(function(J,W,q,j){j===void 0&&(j=q),J[j]=W[q]})),t=fr&&fr.__setModuleDefault||(Object.create?(function(J,W){Object.defineProperty(J,"default",{enumerable:!0,value:W})}):function(J,W){J.default=W}),n=fr&&fr.__importStar||(function(){var J=function(W){return J=Object.getOwnPropertyNames||function(q){var j=[];for(var L in q)Object.prototype.hasOwnProperty.call(q,L)&&(j[j.length]=L);return j},J(W)};return function(W){if(W&&W.__esModule)return W;var q={};if(W!=null)for(var j=J(W),L=0;L<j.length;L++)j[L]!=="default"&&r(q,W,j[L]);return t(q,W),q}})(),i=fr&&fr.__importDefault||function(J){return J&&J.__esModule?J:{default:J}};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=g,e.isValidAuthChain=_,e.createEIP1271MessageHash=A,e.createSimpleAuthChain=w,e.createAuthChain=R,e.initializeAuthChain=P,e.signPayload=d,e.createSignature=S,e.ownerAddress=E,e.getEphemeralMessage=y,e.getEphemeralSignatureType=z,e.getSignedIdentitySignatureType=k,e.parseEphemeralPayload=V,e.isValidEIP1271Signature=ue;const a=n(yu()),s=cN(),o=EN(),c=i(vN()),l=bN(),u=qA();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const f=132;async function g(J,W,q,j=Date.now()){let L="";if(!_(W))return{ok:!1,message:"ERROR: Malformed authChain"};for(const O of W){const D=re(O.type);try{const{nextAuthority:Z}=await D(L,O,{provider:q,dateToValidateExpirationInMillis:j});L=Z||""}catch(Z){const Ee=Z instanceof Error?Z.message:String(Z);return{ok:!1,message:`ERROR. Link type: ${O.type}. ${Ee}.`}}}const H=L===J;return{ok:H,message:H?void 0:`ERROR: Invalid final authority. Expected: ${J}. Current ${L}.`}}function _(J){for(const[W,q]of J.entries())if(W===0&&q.type!==u.AuthLinkType.SIGNER||q.type===u.AuthLinkType.SIGNER&&W!==0)return!1;return!0}function A(J){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(J)))}function w(J,W,q){return[{type:u.AuthLinkType.SIGNER,payload:W,signature:""},{type:k(q),payload:J,signature:q}]}function R(J,W,q,j){const L=(0,l.moveMinutes)(q),H=y(W.address,L),O=S(J,H),D=S(W,j);return[{type:u.AuthLinkType.SIGNER,payload:J.address,signature:""},{type:u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:H,signature:O},{type:u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:j,signature:D}]}async function P(J,W,q,j){const L=(0,l.moveMinutes)(q),H=y(W.address,L),O=await j(H),D=[{type:u.AuthLinkType.SIGNER,payload:J,signature:""},{type:z(O),payload:H,signature:O}];return{ephemeralIdentity:W,expiration:L,authChain:D}}function d(J,W){const q=S(J.ephemeralIdentity,W);return[...J.authChain,{type:u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:W,signature:q}]}e.createEthereumMessageHash=o.createEthereumMessageHash;function S(J,W){return(0,o.ethSign)((0,a.hexToBytes)(J.privateKey),W)}function E(J){return J.length>0&&J[0].type===u.AuthLinkType.SIGNER?J[0].payload:"Invalid-Owner-Address"}function y(J,W){return`Decentraland Login
|
|
39
|
-
Ephemeral address: ${J}
|
|
40
|
-
Expiration: ${W.toISOString()}`}e.Authenticator={validateSignature:g,isValidAuthChain:_,createEIP1271MessageHash:A,createSimpleAuthChain:w,createAuthChain:R,initializeAuthChain:P,signPayload:d,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:S,ownerAddress:E,getEphemeralMessage:y};const v=async(J,W)=>({nextAuthority:W.payload});e.SIGNER_VALIDATOR=v;const I=async(J,W)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const q=(0,o.recoverAddressFromEthSignature)(W.signature,W.payload),j=J.toLocaleLowerCase(),L=q.toLocaleLowerCase();if(j===L)return{nextAuthority:W.payload};throw new Error(`Invalid signer address. Expected: ${j}. Actual: ${L}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=I;const N=async(J,W,q)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:j,ephemeralAddress:L,expiration:H}=V(W.payload),O=(q==null?void 0:q.dateToValidateExpirationInMillis)||Date.now();if(H>O){const D=(0,o.recoverAddressFromEthSignature)(W.signature,j),Z=J.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: ${O}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=N;const U=async(J,W,q)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:j,ephemeralAddress:L,expiration:H}=V(W.payload),O=(q==null?void 0:q.dateToValidateExpirationInMillis)||Date.now();if(H>O&&await ae(q==null?void 0:q.provider,J,j,W.signature,O))return{nextAuthority:L};throw new Error(`Ephemeral key expired. Expiration: ${H}. Test: ${O}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=U;const Q=async(J,W,q)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!q)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await ae(q.provider,J,W.payload,W.signature,q.dateToValidateExpirationInMillis))return{nextAuthority:W.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=Q;const Y=async(J,W)=>({error:"Error Validator."});function z(J){return J.length===f?u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:u.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function k(J){return J.length===f?u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:u.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function V(J){const W=J.replace(/\r/g,""),q=W.split(`
|
|
41
|
-
`),j="Ephemeral address: ",L="Expiration: ";if(q.length<3||!q[1].startsWith(j)||!q[2].startsWith(L))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${j}" on line 2 and "${L}" on line 3.`);const H=q[1].substring(j.length),O=q[2].substring(L.length),D=Date.parse(O);if(Number.isNaN(D))throw new Error(`Invalid expiration date in ephemeral payload: "${O}"`);return{message:W,ephemeralAddress:H,expiration:D}}e.parseEmphemeralPayload=V;async function ue(J,W,q,j){const L=A(W),H=(0,a.hexToBytes)(q);let O;try{O=(0,a.bytesToHex)(await J.isValidSignature(L,H,j))}catch{}if(O===e.ERC1654_MAGIC_VALUE)return!0;const D=(0,o.createEthereumMessageHash)(W);try{O=(0,a.bytesToHex)(await J.isValidSignature(D,H,j))}catch{}return O===e.ERC1654_MAGIC_VALUE}async function ae(J,W,q,j,L){if(!J)throw new Error("Missing provider");const H=new a.default(J),O=await(0,s.SignatureValidator)(H,W);let D=await ue(O,q,j);if(D)return!0;const Z=new c.default(H);try{const{block:Ee}=await Z.getDate(L,!1);if(D=await ue(O,q,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 re(J){switch(J){case u.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case u.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case u.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Y}}})(fr)),fr}var Kr={},R1;function rC(){return R1||(R1=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.AUTH_METADATA_HEADER=Kr.AUTH_TIMESTAMP_HEADER=Kr.AUTH_CHAIN_HEADER_PREFIX=void 0,Kr.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Kr.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Kr.AUTH_METADATA_HEADER="x-identity-metadata"),Kr}var w1;function nC(){return w1||(w1=1,(function(e){var r=$n&&$n.__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]})),t=$n&&$n.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(LA(),e),t(rC(),e),t(qA(),e)})($n)),$n}var iC=nC(),ei={},hr={},Ko={exports:{}},Yo={exports:{}},I1;function Zm(){return I1||(I1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(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=r.default,e.exports.default=r.default})(Yo,Yo.exports)),Yo.exports}var Qo={exports:{}},O1;function aC(){return O1||(O1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function t(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||t(o)&&o.test(i))return!0}return!1}e.exports=r.default,e.exports.default=r.default})(Qo,Qo.exports)),Qo.exports}var Jo={exports:{}},P1;function sC(){return P1||(P1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=function(i,a){return i.indexOf(a)!==-1};r.default=t,e.exports=r.default,e.exports.default=r.default})(Jo,Jo.exports)),Jo.exports}var Xo={exports:{}},Zo={exports:{}},N1;function $A(){return N1||(N1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function t(i){"@babel/helpers - typeof";return t=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},t(i)}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(t(i)!=="object"||i===null)&&(i={});for(var s in a)typeof i[s]>"u"&&(i[s]=a[s]);return i}e.exports=r.default,e.exports.default=r.default})(Zo,Zo.exports)),Zo.exports}var M1;function oC(){return M1||(M1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=s;var t=i(Zm()),n=i($A());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,c){(0,t.default)(o),c=(0,n.default)(c,a),c.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),c.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var l=o.split("."),u=l[l.length-1];return c.require_tld&&(l.length<2||!c.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(u)||/\s/.test(u))||!c.allow_numeric_tld&&/^\d+$/.test(u)?!1:l.every(function(f){return!(f.length>63&&!c.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(f)||/[\uff01-\uff5e]/.test(f)||/^-|-$/.test(f)||!c.allow_underscores&&/_/.test(f))})}e.exports=r.default,e.exports.default=r.default})(Xo,Xo.exports)),Xo.exports}var xo={exports:{}},C1;function uC(){return C1||(C1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=u;var t=n(Zm());function n(f){return f&&f.__esModule?f:{default:f}}function i(f){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},i(f)}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,"$")),c="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(s,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(s,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(s,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(s,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(s,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(s,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(s,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function u(f){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,t.default)(f);var _=(i(g)==="object"?g.version:arguments[1])||"";return _?_.toString()==="4"?o.test(f):_.toString()==="6"?l.test(f):!1:u(f,{version:4})||u(f,{version:6})}e.exports=r.default,e.exports.default=r.default})(xo,xo.exports)),xo.exports}var j1;function cC(){return j1||(j1=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=P;var t=c(Zm()),n=c(aC()),i=c(sC()),a=c(oC()),s=c(uC()),o=c($A());function c(d){return d&&d.__esModule?d:{default:d}}function l(d,S){return A(d)||_(d,S)||f(d,S)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(d,S){if(d){if(typeof d=="string")return g(d,S);var E={}.toString.call(d).slice(8,-1);return E==="Object"&&d.constructor&&(E=d.constructor.name),E==="Map"||E==="Set"?Array.from(d):E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E)?g(d,S):void 0}}function g(d,S){(S==null||S>d.length)&&(S=d.length);for(var E=0,y=Array(S);E<S;E++)y[E]=d[E];return y}function _(d,S){var E=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(E!=null){var y,v,I,N,U=[],Q=!0,Y=!1;try{if(I=(E=E.call(d)).next,S!==0)for(;!(Q=(y=I.call(E)).done)&&(U.push(y.value),U.length!==S);Q=!0);}catch(z){Y=!0,v=z}finally{try{if(!Q&&E.return!=null&&(N=E.return(),Object(N)!==N))return}finally{if(Y)throw v}}return U}}function A(d){if(Array.isArray(d))return d}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 P(d,S){if((0,t.default)(d),!d||/[\s<>]/.test(d)||d.indexOf("mailto:")===0||(S=(0,o.default)(S,w),S.validate_length&&d.length>S.max_allowed_length)||!S.allow_fragments&&(0,i.default)(d,"#")||!S.allow_query_components&&((0,i.default)(d,"?")||(0,i.default)(d,"&")))return!1;var E,y,v,I,N,U,Q,Y;Q=d.split("#"),d=Q.shift(),Q=d.split("?"),d=Q.shift();var z=d.match(/^([a-z][a-z0-9+\-.]*):/i),k=!1,V=function(ce){return k=!0,E=ce.toLowerCase(),S.require_valid_protocol&&S.protocols.indexOf(E)===-1?!1:d.substring(z[0].length)};if(z){var ue=z[1],ae=d.substring(z[0].length),re=ae.slice(0,2)==="//";if(re){if(d=V(ue),d===!1)return!1}else{var J=ae.indexOf("/"),W=J===-1?ae:ae.substring(0,J),q=W.indexOf("@");if(q!==-1){var j=W.substring(0,q),L=/^[a-zA-Z0-9\-_.%:]*$/,H=L.test(j),O=/%[0-9a-fA-F]{2}/.test(j);if(H&&!O){if(S.require_protocol)return!1}else if(d=V(ue),d===!1)return!1}else{var D=/^[0-9]/.test(ae);if(D){if(S.require_protocol)return!1}else if(d=V(ue),d===!1)return!1}}}else if(S.require_protocol)return!1;if(d.slice(0,2)==="//"){if(!k&&!S.allow_protocol_relative_urls)return!1;d=d.slice(2)}if(d==="")return!1;if(Q=d.split("/"),d=Q.shift(),d===""&&!S.require_host)return!0;if(Q=d.split("@"),Q.length>1){if(S.disallow_auth||Q[0]===""||(y=Q.shift(),y.indexOf(":")>=0&&y.split(":").length>2))return!1;var Z=y.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}I=Q.join("@"),U=null,Y=null;var Ae=I.match(R);if(Ae?(v="",Y=Ae[1],U=Ae[2]||null):(Q=I.split(":"),v=Q.shift(),Q.length&&(U=Q.join(":"))),U!==null&&U.length>0){if(N=parseInt(U,10),!/^[0-9]+$/.test(U)||N<=0||N>65535)return!1}else if(S.require_port)return!1;return S.host_whitelist?(0,n.default)(v,S.host_whitelist):v===""&&!S.require_host?!0:!(!(0,s.default)(v)&&!(0,a.default)(v,S)&&(!Y||!(0,s.default)(Y,6))||(v=v||Y,S.host_blacklist&&(0,n.default)(v,S.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(Ko,Ko.exports)),Ko.exports}var ap={},D1;function BA(){return D1||(D1=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 r;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(r||(e.Action=r={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=t;function n(o){const c=localStorage.getItem(s(o));if(!c)return null;let l;try{l=JSON.parse(c)}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,c){new Date(c.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(c))}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()}`}})(ap)),ap}var q1;function lC(){if(q1)return hr;q1=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.clearIdentity=hr.storeIdentity=hr.getIdentity=hr.init=void 0;const e=cC(),r=BA(),t=r.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function c(R,P={}){if(!(0,e.default)(R,{...o,...P}))throw new Error(`Invalid url: ${R}`);if(s)throw new Error("Already initialized");const d=document.createElement("iframe");d.id=t,d.src=R,d.style.width="0",d.style.height="0",d.style.border="none",d.style.position="absolute",document.body.appendChild(d),s=R}hr.init=c;async function l(R){let P;try{P=(await _(await g(),r.Action.GET,{user:R})).identity??null}catch(d){w(d),P=(0,r.localStorageGetIdentity)(R)}return P}hr.getIdentity=l;async function u(R,P){try{await _(await g(),r.Action.STORE,{user:R,identity:P})}catch(d){w(d),(0,r.localStorageStoreIdentity)(R,P)}}hr.storeIdentity=u;async function f(R){try{await _(await g(),r.Action.CLEAR,{user:R})}catch(P){w(P),(0,r.localStorageClearIdentity)(R)}}hr.clearIdentity=f;async function g(){if(!s)throw new Error("Not initialized");for(let R=0;R<i;R++){const P=document.getElementById(t),d=P==null?void 0:P.contentWindow;if(!d){await A(n);continue}try{await _(d,r.Action.PING,{},n)}catch{continue}return d}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function _(R,P,d,S=0){a++;const E=a;let y=null;const v=new Promise((I,N)=>{y=({data:U})=>{!U||U.target!==r.SINGLE_SIGN_ON_TARGET||U.id!==E||(U.error?N(new Error(U.error)):I(U))},window.addEventListener("message",y)});R.postMessage((0,r.createMessage)({id:E,action:P,...d}),s);try{return await(S?Promise.race([v,new Promise((I,N)=>setTimeout(()=>N(new Error("Did not receive a response in time")),S))]):v)}catch(I){throw I}finally{y&&window.removeEventListener("message",y)}}function A(R){return new Promise(P=>setTimeout(P,R))}function w(R){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",R.message)}return hr}var L1;function dC(){return L1||(L1=1,(function(e){var r=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]})),t=ei&&ei.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),t(lC(),e),t(BA(),e)})(ei)),ei}var vm=dC();function fC(e){const{host:r}=e;return r.endsWith(".org")||r.endsWith(".co")?$r.PRODUCTION:r.endsWith(".today")||r.endsWith(".net")?$r.STAGING:r.endsWith(".io")||r.endsWith(".zone")?$r.DEVELOPMENT:null}function pC(e){const r=new URLSearchParams(e.search),t=r.get("ENV")||r.get("env");if(t){const n=t.toLowerCase();if(kA(n))return n}return null}var $1={},$r;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})($r||($r={}));function UA(){return Object.values($r)}function kA(e){return UA().includes(e)}function eu(e){if(kA(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${UA().map(r=>`"${r}"`).join(", ")}.`)}function mC(e={}){const{DCL_DEFAULT_ENV:r,REACT_APP_DCL_DEFAULT_ENV:t,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=e;if(r&&t&&r!==t)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(r&&n&&r!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(t&&i&&t!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return r?eu(r):t?eu(t):n?eu(n):i?eu(i):$r.PRODUCTION}function yC(e){if(typeof window<"u"){const t=pC(window.location);if(t)return t;const n=fC(window.location);if(n)return n}return mC(typeof e>"u"&&typeof tu=="object"&&typeof $1=="object"?$1:e)}function hC(e,r){const t=yC(r==null?void 0:r.systemEnvVariables),n=e[t];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${t}`);return i in n?n[i]:a},is:i=>t===i,getEnv:()=>t}}const gC="development",_C="80002",EC="https://marketplace-api.decentraland.zone",vC="https://marketplace-api.decentraland.zone",bC="/auth",TC="https://rpc.decentraland.org/amoy",SC="https://credits.decentraland.zone",AC="https://builder-api.decentraland.zone",RC="https://peer.decentraland.zone",wC="",IC="",OC="",PC="",NC={ENVIRONMENT:gC,CHAIN_ID:_C,MARKETPLACE_SERVER_URL:EC,NFT_API_URL:vC,AUTH_URL:bC,RPC_URL:TC,CREDITS_SERVER_URL:SC,BUILDER_SERVER_URL:AC,PEER_URL:RC,SHOP_SERVER_URL:wC,STRIPE_PUBLISHABLE_KEY:IC,SEGMENT_WRITE_KEY:OC,SENTRY_DSN:PC},MC="staging",CC="80002",jC="https://marketplace-api.decentraland.zone",DC="https://marketplace-api.decentraland.zone",qC="/auth",LC="https://rpc.decentraland.org/amoy",$C="https://credits.decentraland.zone",BC="https://builder-api.decentraland.zone",UC="https://peer.decentraland.zone",kC="",VC="",FC="",HC="",GC={ENVIRONMENT:MC,CHAIN_ID:CC,MARKETPLACE_SERVER_URL:jC,NFT_API_URL:DC,AUTH_URL:qC,RPC_URL:LC,CREDITS_SERVER_URL:$C,BUILDER_SERVER_URL:BC,PEER_URL:UC,SHOP_SERVER_URL:kC,STRIPE_PUBLISHABLE_KEY:VC,SEGMENT_WRITE_KEY:FC,SENTRY_DSN:HC},zC="production",WC="137",KC="https://marketplace-api.decentraland.org",YC="https://marketplace-api.decentraland.org",QC="/auth",JC="https://rpc.decentraland.org/polygon",XC="https://credits.decentraland.org",ZC="https://builder-api.decentraland.org",xC="https://peer.decentraland.org",ej="",tj="",rj="",nj="",ij={ENVIRONMENT:zC,CHAIN_ID:WC,MARKETPLACE_SERVER_URL:KC,NFT_API_URL:YC,AUTH_URL:QC,RPC_URL:JC,CREDITS_SERVER_URL:XC,BUILDER_SERVER_URL:ZC,PEER_URL:xC,SHOP_SERVER_URL:ej,STRIPE_PUBLISHABLE_KEY:tj,SEGMENT_WRITE_KEY:rj,SENTRY_DSN:nj},aj={},gr=hC({[$r.DEVELOPMENT]:NC,[$r.STAGING]:GC,[$r.PRODUCTION]:ij},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),_r=aj,It={marketplaceServerUrl:_r.VITE_MARKETPLACE_SERVER_URL??gr.get("MARKETPLACE_SERVER_URL"),nftApiUrl:_r.VITE_NFT_API_URL??gr.get("NFT_API_URL"),chainId:Number(_r.VITE_CHAIN_ID??gr.get("CHAIN_ID")),authUrl:_r.VITE_AUTH_URL??gr.get("AUTH_URL"),rpcUrl:_r.VITE_RPC_URL??gr.get("RPC_URL"),creditsServerUrl:_r.VITE_CREDITS_SERVER_URL??gr.get("CREDITS_SERVER_URL"),builderServerUrl:_r.VITE_BUILDER_SERVER_URL??gr.get("BUILDER_SERVER_URL"),peerUrl:_r.VITE_PEER_URL??gr.get("PEER_URL"),shopServerUrl:_r.VITE_SHOP_SERVER_URL??gr.get("SHOP_SERVER_URL"),stripePublishableKey:_r.VITE_STRIPE_PK??gr.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:_r.VITE_SEGMENT_WRITE_KEY??gr.get("SEGMENT_WRITE_KEY")},sj=744*60;async function VA(){return(await $t(async()=>{const{connection:e}=await import("./index-xXtPh54p.js").then(r=>r.i);return{connection:e}},__vite__mapDeps([6,1]))).connection}async function oj(e){if(!e.account)throw new Error("No account returned by the wallet");const r=e.account.toLowerCase(),t=new qR(e.provider),n=t.getSigner();let i=vm.localStorageGetIdentity(r);if(!i){const a=LR.createRandom();i=await iC.Authenticator.initializeAuthChain(r,{address:a.address,publicKey:Sy(a.publicKey),privateKey:Sy(a.privateKey)},sj,s=>n.signMessage(s)),vm.localStorageStoreIdentity(r,i)}return{address:r,chainId:e.chainId,signer:n,web3Provider:t,identity:i,providerType:e.providerType}}function uj(){const e=encodeURIComponent(window.location.href);window.location.replace(`${It.authUrl}/login?redirectTo=${e}`)}async function cj(){try{const r=await(await VA()).tryPreviousConnection();return!r.account||!vm.localStorageGetIdentity(r.account.toLowerCase())?null:await oj(r)}catch{return null}}async function lj(){try{await(await VA()).disconnect()}catch{}}const dj=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,fj=It.chainId===80002?"amoy":"polygon",pj=It.chainId===80002?"dev":"prod";function FA(){return window.analytics}function mj(){let e=null;try{e=xm.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:dj,network:fj,app_env:pj}}function fi(e,r={}){const t={...mj(),...r},n=FA();n&&n.track(e,t)}function yj(e,r={}){const t=FA();t&&t.identify(e.toLowerCase(),r)}function hj(e){fi("Shop Viewed Page",{page:e})}function B1(e){return e===Ua.ProviderType.MAGIC||e===Ua.ProviderType.MAGIC_TEST?"magic":"wallet"}function gj(e){const r=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(r)?!1:(localStorage.setItem(r,"1"),!0)}catch{return!1}}function ka(e){return Math.round(e*10)/100}function HA(e){return!e.tokenId}function hq(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:ka(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:HA(e)}}function gq(e){const r=e.reduce((n,i)=>n+i.priceCredits,0),t=e.some(HA);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:ka(n.priceCredits)})),value_credits:r,value_usd:ka(r),purchase_type:t?"item":"nft_resale",is_primary:t}}function _j(e){const r=e;if((r==null?void 0:r.code)===4001)return"user_rejected";const t=((r==null?void 0:r.message)??"").toLowerCase();return t.includes("reject")||t.includes("denied")||t.includes("cancel")?"user_rejected":t.includes("insufficient")?"insufficient_credits":t.includes("not for sale")||t.includes("no active listing")||t.includes("sold")?"not_for_sale":"unknown"}function _q(e){return _j(e)==="user_rejected"}function Ej(e){const r=window;if(r.analytics&&r.analytics.invoked)return;const t=r.analytics||[];t.invoked=!0,t.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],t.factory=n=>(...i)=>(t.push([n,...i]),t);for(const n of t.methods)t[n]=t.factory(n);t.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)},r.analytics=t,t.load(e),t.page()}let U1=!1;function vj(){if(U1)return;U1=!0;const e=It.segmentWriteKey;e&&Ej(e)}function k1(e,r={}){const t=typeof r.flow=="string"?`error in ${r.flow}`:"error";console.error(`[shop] ${t}`,e,r)}const sp="shop:signing_in",xm=Ya(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(sp,"1")}catch{}uj()},disconnect:async()=>{fi("Shop Signed Out");try{await lj()}catch(r){k1(r,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let r;try{r=await cj()}catch(n){k1(n,{flow:"wallet",step:"restore"});return}if(!r)return;e({session:r}),yj(r.address,{sign_in_method:B1(r.providerType)});let t=!1;try{t=sessionStorage.getItem(sp)==="1",t&&sessionStorage.removeItem(sp)}catch{}t&&fi("Shop Signed In",{method:B1(r.providerType),is_new_user:gj(r.address)})}})),bj=It.peerUrl;function GA(e){return su({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const r=await fetch(`${bj}/lambdas/profiles/${e.toLowerCase()}`);if(!r.ok)return;const t=await r.json();return(n=t==null?void 0:t.avatars)==null?void 0:n[0]}})}var Yr={},op={},V1;function zA(){return V1||(V1=1,Object.defineProperty(op,"__esModule",{value:!0})),op}var Qr={},Cr={},wi={},ti={},F1={},ca,H1;function Rr(){if(H1)return ca;H1=1;var e=function(r){return r&&r.Math===Math&&r};return ca=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof im=="object"&&im)||e(typeof ca=="object"&&ca)||(function(){return this})()||Function("return this")(),ca}var up,G1;function _i(){return G1||(G1=1,up=function(e){try{return!!e()}catch{return!0}}),up}var cp,z1;function vu(){if(z1)return cp;z1=1;var e=_i();return cp=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),cp}var lp,W1;function Tj(){if(W1)return lp;W1=1;var e=vu(),r=Function.prototype,t=r.apply,n=r.call;return lp=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),lp}var dp,K1;function Fi(){if(K1)return dp;K1=1;var e=vu(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return dp=e?n:function(i){return function(){return t.apply(i,arguments)}},dp}var fp,Y1;function WA(){if(Y1)return fp;Y1=1;var e=Fi(),r=e({}.toString),t=e("".slice);return fp=function(n){return t(r(n),8,-1)},fp}var pp,Q1;function KA(){if(Q1)return pp;Q1=1;var e=WA(),r=Fi();return pp=function(t){if(e(t)==="Function")return r(t)},pp}var mp,J1;function Ei(){if(J1)return mp;J1=1;var e=typeof document=="object"&&document.all;return mp=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},mp}var yp={},hp,X1;function es(){if(X1)return hp;X1=1;var e=_i();return hp=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),hp}var gp,Z1;function ey(){if(Z1)return gp;Z1=1;var e=vu(),r=Function.prototype.call;return gp=e?r.bind(r):function(){return r.apply(r,arguments)},gp}var _p={},x1;function Sj(){if(x1)return _p;x1=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return _p.f=t?function(i){var a=r(this,i);return!!a&&a.enumerable}:e,_p}var Ep,eT;function YA(){return eT||(eT=1,Ep=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),Ep}var vp,tT;function Aj(){if(tT)return vp;tT=1;var e=Fi(),r=_i(),t=WA(),n=Object,i=e("".split);return vp=r(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,vp}var bp,rT;function QA(){return rT||(rT=1,bp=function(e){return e==null}),bp}var Tp,nT;function JA(){if(nT)return Tp;nT=1;var e=QA(),r=TypeError;return Tp=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Tp}var Sp,iT;function Rj(){if(iT)return Sp;iT=1;var e=Aj(),r=JA();return Sp=function(t){return e(r(t))},Sp}var Ap,aT;function bu(){if(aT)return Ap;aT=1;var e=Ei();return Ap=function(r){return typeof r=="object"?r!==null:e(r)},Ap}var Rp,sT;function XA(){return sT||(sT=1,Rp={}),Rp}var wp,oT;function wj(){if(oT)return wp;oT=1;var e=XA(),r=Rr(),t=Ei(),n=function(i){return t(i)?i:void 0};return wp=function(i,a){return arguments.length<2?n(e[i])||n(r[i]):e[i]&&e[i][a]||r[i]&&r[i][a]},wp}var Ip,uT;function Ij(){if(uT)return Ip;uT=1;var e=Fi();return Ip=e({}.isPrototypeOf),Ip}var Op,cT;function Oj(){if(cT)return Op;cT=1;var e=Rr(),r=e.navigator,t=r&&r.userAgent;return Op=t?String(t):"",Op}var Pp,lT;function Pj(){if(lT)return Pp;lT=1;var e=Rr(),r=Oj(),t=e.process,n=e.Deno,i=t&&t.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&&r&&(s=r.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=r.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),Pp=o,Pp}var Np,dT;function ZA(){if(dT)return Np;dT=1;var e=Pj(),r=_i(),t=Rr(),n=t.String;return Np=!!Object.getOwnPropertySymbols&&!r(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Np}var Mp,fT;function xA(){if(fT)return Mp;fT=1;var e=ZA();return Mp=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Mp}var Cp,pT;function eR(){if(pT)return Cp;pT=1;var e=wj(),r=Ei(),t=Ij(),n=xA(),i=Object;return Cp=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return r(s)&&t(s.prototype,i(a))},Cp}var jp,mT;function Nj(){if(mT)return jp;mT=1;var e=String;return jp=function(r){try{return e(r)}catch{return"Object"}},jp}var Dp,yT;function tR(){if(yT)return Dp;yT=1;var e=Ei(),r=Nj(),t=TypeError;return Dp=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},Dp}var qp,hT;function Mj(){if(hT)return qp;hT=1;var e=tR(),r=QA();return qp=function(t,n){var i=t[n];return r(i)?void 0:e(i)},qp}var Lp,gT;function Cj(){if(gT)return Lp;gT=1;var e=ey(),r=Ei(),t=bu(),n=TypeError;return Lp=function(i,a){var s,o;if(a==="string"&&r(s=i.toString)&&!t(o=e(s,i))||r(s=i.valueOf)&&!t(o=e(s,i))||a!=="string"&&r(s=i.toString)&&!t(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},Lp}var $p={exports:{}},Bp,_T;function jj(){return _T||(_T=1,Bp=!0),Bp}var Up,ET;function Dj(){if(ET)return Up;ET=1;var e=Rr(),r=Object.defineProperty;return Up=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Up}var vT;function qj(){if(vT)return $p.exports;vT=1;var e=jj(),r=Rr(),t=Dj(),n="__core-js_shared__",i=$p.exports=r[n]||t(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"}),$p.exports}var kp,bT;function Lj(){if(bT)return kp;bT=1;var e=qj();return kp=function(r,t){return e[r]||(e[r]=t||{})},kp}var Vp,TT;function $j(){if(TT)return Vp;TT=1;var e=JA(),r=Object;return Vp=function(t){return r(e(t))},Vp}var Fp,ST;function ty(){if(ST)return Fp;ST=1;var e=Fi(),r=$j(),t=e({}.hasOwnProperty);return Fp=Object.hasOwn||function(i,a){return t(r(i),a)},Fp}var Hp,AT;function Bj(){if(AT)return Hp;AT=1;var e=Fi(),r=0,t=Math.random(),n=e(1.1.toString);return Hp=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++r+t,36)},Hp}var Gp,RT;function Uj(){if(RT)return Gp;RT=1;var e=Rr(),r=Lj(),t=ty(),n=Bj(),i=ZA(),a=xA(),s=e.Symbol,o=r("wks"),c=a?s.for||s:s&&s.withoutSetter||n;return Gp=function(l){return t(o,l)||(o[l]=i&&t(s,l)?s[l]:c("Symbol."+l)),o[l]},Gp}var zp,wT;function kj(){if(wT)return zp;wT=1;var e=ey(),r=bu(),t=eR(),n=Mj(),i=Cj(),a=Uj(),s=TypeError,o=a("toPrimitive");return zp=function(c,l){if(!r(c)||t(c))return c;var u=n(c,o),f;if(u){if(l===void 0&&(l="default"),f=e(u,c,l),!r(f)||t(f))return f;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(c,l)},zp}var Wp,IT;function rR(){if(IT)return Wp;IT=1;var e=kj(),r=eR();return Wp=function(t){var n=e(t,"string");return r(n)?n:n+""},Wp}var Kp,OT;function Vj(){if(OT)return Kp;OT=1;var e=Rr(),r=bu(),t=e.document,n=r(t)&&r(t.createElement);return Kp=function(i){return n?t.createElement(i):{}},Kp}var Yp,PT;function nR(){if(PT)return Yp;PT=1;var e=es(),r=_i(),t=Vj();return Yp=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Yp}var NT;function Fj(){if(NT)return yp;NT=1;var e=es(),r=ey(),t=Sj(),n=YA(),i=Rj(),a=rR(),s=ty(),o=nR(),c=Object.getOwnPropertyDescriptor;return yp.f=e?c:function(u,f){if(u=i(u),f=a(f),o)try{return c(u,f)}catch{}if(s(u,f))return n(!r(t.f,u,f),u[f])},yp}var Qp,MT;function Hj(){if(MT)return Qp;MT=1;var e=_i(),r=Ei(),t=/#|\.prototype\./,n=function(c,l){var u=a[i(c)];return u===o?!0:u===s?!1:r(l)?e(l):!!l},i=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return Qp=n,Qp}var Jp,CT;function Gj(){if(CT)return Jp;CT=1;var e=KA(),r=tR(),t=vu(),n=e(e.bind);return Jp=function(i,a){return r(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},Jp}var Xp={},Zp,jT;function zj(){if(jT)return Zp;jT=1;var e=es(),r=_i();return Zp=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Zp}var xp,DT;function Wj(){if(DT)return xp;DT=1;var e=bu(),r=String,t=TypeError;return xp=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},xp}var qT;function Kj(){if(qT)return Xp;qT=1;var e=es(),r=nR(),t=zj(),n=Wj(),i=rR(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return Xp.f=e?t?function(g,_,A){if(n(g),_=i(_),n(A),typeof g=="function"&&_==="prototype"&&"value"in A&&u in A&&!A[u]){var w=o(g,_);w&&w[u]&&(g[_]=A.value,A={configurable:l in A?A[l]:w[l],enumerable:c in A?A[c]:w[c],writable:!1})}return s(g,_,A)}:s:function(g,_,A){if(n(g),_=i(_),n(A),r)try{return s(g,_,A)}catch{}if("get"in A||"set"in A)throw new a("Accessors not supported");return"value"in A&&(g[_]=A.value),g},Xp}var em,LT;function Yj(){if(LT)return em;LT=1;var e=es(),r=Kj(),t=YA();return em=e?function(n,i,a){return r.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},em}var tm,$T;function Qj(){if($T)return tm;$T=1;var e=Rr(),r=Tj(),t=KA(),n=Ei(),i=Fj().f,a=Hj(),s=XA(),o=Gj(),c=Yj(),l=ty(),u=function(f){var g=function(_,A,w){if(this instanceof g){switch(arguments.length){case 0:return new f;case 1:return new f(_);case 2:return new f(_,A)}return new f(_,A,w)}return r(f,this,arguments)};return g.prototype=f.prototype,g};return tm=function(f,g){var _=f.target,A=f.global,w=f.stat,R=f.proto,P=A?e:w?e[_]:e[_]&&e[_].prototype,d=A?s:s[_]||c(s,_,{})[_],S=d.prototype,E,y,v,I,N,U,Q,Y,z;for(I in g)E=a(A?I:_+(w?".":"#")+I,f.forced),y=!E&&P&&l(P,I),U=d[I],y&&(f.dontCallGetSet?(z=i(P,I),Q=z&&z.value):Q=P[I]),N=y&&Q?Q:g[I],!(!E&&!R&&typeof U==typeof N)&&(f.bind&&y?Y=o(N,e):f.wrap&&y?Y=u(N):R&&n(N)?Y=t(N):Y=N,(f.sham||N&&N.sham||U&&U.sham)&&c(Y,"sham",!0),c(d,I,Y),R&&(v=_+"Prototype",l(s,v)||c(s,v,{}),c(s[v],I,N),f.real&&S&&(E||!S[I])&&c(S,I,N)))},tm}var BT;function Jj(){if(BT)return F1;BT=1;var e=Qj(),r=Rr();return e({global:!0,forced:r.globalThis!==r},{globalThis:r}),F1}var rm,UT;function Xj(){return UT||(UT=1,Jj(),rm=Rr()),rm}var nm,kT;function Zj(){if(kT)return nm;kT=1;var e=Xj();return nm=e,nm}var VT;function iR(){if(VT)return ti;VT=1;var e=ti&&ti.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.getImplementation=void 0;var r=e(Zj());function t(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:r.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return ti.getImplementation=t,ti}var FT;function aR(){if(FT)return wi;FT=1;var e=wi&&wi.__values||function(o){var c=typeof Symbol=="function"&&Symbol.iterator,l=c&&o[c],u=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&u>=o.length&&(o=void 0),{value:o&&o[u++],done:!o}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wi,"__esModule",{value:!0});var r=LA(),t=iR(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var c=(0,t.getImplementation)(o,"Headers");return function(u,f,g,_,A){var w,R,P=new c(A),d=String(Date.now()),S=JSON.stringify(_),E=[f,g,d,S].join(":").toLowerCase(),y=0,v=r.Authenticator.signPayload(u,E);try{for(var I=e(v),N=I.next();!N.done;N=I.next()){var U=N.value;P.set(n+y,JSON.stringify(U)),y++}}catch(Q){w={error:Q}}finally{try{N&&!N.done&&(R=I.return)&&R.call(I)}finally{if(w)throw w.error}}return P.set(i,d),P.set(a,S),P}}return wi.default=s,wi}var HT;function sR(){if(HT)return Cr;HT=1;var e=Cr&&Cr.__assign||function(){return e=Object.assign||function(s){for(var o,c=1,l=arguments.length;c<l;c++){o=arguments[c];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u])}return s},e.apply(this,arguments)},r=Cr&&Cr.__rest||function(s,o){var c={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(c[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,l=Object.getOwnPropertySymbols(s);u<l.length;u++)o.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(s,l[u])&&(c[l[u]]=s[l[u]]);return c},t=Cr&&Cr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Cr,"__esModule",{value:!0});var n=t(aR()),i=iR();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),c=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),u=(0,i.getImplementation)(s,"fetch");return function(g,_){if(_&&_.identity){var A=_.identity,w=_.metadata,R=r(_,["identity","metadata"]);if(typeof g=="string"||g instanceof c||globalThis.URL&&g instanceof globalThis.URL){var P=typeof g=="string"?new c(g):g,d=new l(P.toString(),e(e({},R),{headers:o(A,_.method||"GET",P.pathname,w||{},R==null?void 0:R.headers)}));return u(d)}var S=new c(g.url),E=new l(g),y=o(A,g.method||"GET",S.pathname,w||{});return y.forEach(function(v,I){E.headers.set(I,v)}),u(E)}return u(g,_)}}return Cr.default=a,Cr}var GT;function xj(){return GT||(GT=1,(function(e){var r=Qr&&Qr.__createBinding||(Object.create?(function(s,o,c,l){l===void 0&&(l=c),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[c]}})}):(function(s,o,c,l){l===void 0&&(l=c),s[l]=o[c]})),t=Qr&&Qr.__exportStar||function(s,o){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&r(o,s,c)},n=Qr&&Qr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,t(zA(),e);var i=sR();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=aR();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(Qr)),Qr}var zT;function eD(){return zT||(zT=1,(function(e){var r=Yr&&Yr.__createBinding||(Object.create?(function(a,s,o,c){c===void 0&&(c=o),Object.defineProperty(a,c,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,c){c===void 0&&(c=o),a[c]=s[o]})),t=Yr&&Yr.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&r(s,a,o)},n=Yr&&Yr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),t(zA(),e),t(xj(),e);var i=n(sR());e.default=(0,i.default)()})(Yr)),Yr}var tD=eD();const Tu=oS(tD);async function rD(e,r){const t=`${It.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await Tu(t,{method:"GET",identity:r,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function nD(e,r){const{usd:t}=await rD(e,r);return t??{balanceCents:0,credits:0}}async function Eq(e,r,t){const n=`${It.creditsServerUrl}/credits/authorize`,i=await Tu(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:r,tradeId:t})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function vq(e,r,t){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(t.first)),(t==null?void 0:t.skip)!=null&&n.set("offset",String(t.skip));const i=n.toString(),a=`${It.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await Tu(a,{method:"GET",identity:r,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),c=o.purchases??[],l=(t==null?void 0:t.skip)??0,u=t==null?void 0:t.first,f=typeof o.total=="number"?o.total:l+c.length+(c.length>=u?1:0);return{items:c,total:f}}async function bq(e,r){if(r.length===0)return 0;const t=`${It.creditsServerUrl}/credits/authorize/cancel`,n=await Tu(t,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:r})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function Tq(e,r=1e3){const t=await fetch(`${It.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:r})});if(!t.ok)throw new Error(`devMintUsd ${t.status}: ${await t.text()}`);return t.json()}function iD(e){return su({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>nD(e.address,e.identity)})}const aD=e=>ka(e.reduce((r,t)=>r+t.priceCredits,0)),Ii=Ya((e,r)=>({items:[],open:!1,add:(t,n="grid")=>{const i=r().items.some(s=>s.id===t.id);if(e(s=>i?{open:!0}:{items:[...s.items,t],open:!0}),i)return;const a=r().items;fi("Shop Added To Cart",{item_id:t.itemId??null,contract_address:t.contractAddress,price_credits:t.priceCredits,price_usd:ka(t.priceCredits),is_primary:!t.tokenId,source:n,cart_size:a.length,cart_value_usd:aD(a)})},remove:t=>{const n=r().items.find(i=>i.id===t);e(i=>({items:i.items.filter(a=>a.id!==t)})),n&&fi("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:r().items.length})},clear:()=>e({items:[]}),setOpen:t=>e({open:t})})),pi={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function Sq(e){return`${e} ${e===1?pi.nameSingular:pi.name}`}function sD(){const e=Ii(a=>a.items),r=Ii(a=>a.open),t=Ii(a=>a.setOpen),n=We.useRef(null),i=e.reduce((a,s)=>a+s.priceCredits,0);return We.useEffect(()=>{if(!r)return;const a=setTimeout(()=>t(!1),4500),s=o=>{n.current&&!n.current.contains(o.target)&&t(!1)};return document.addEventListener("mousedown",s),()=>{clearTimeout(a),document.removeEventListener("mousedown",s)}},[r,e.length,t]),!r||e.length===0?null:pe.jsxs("div",{className:"cart-pop",ref:n,role:"dialog","aria-label":"Cart",children:[pe.jsxs("div",{className:"cart-pop__head",children:[pe.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),pe.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(a=>pe.jsxs("div",{className:"cart-pop__row",children:[pe.jsx("div",{className:"cart-pop__thumb",children:a.thumbnail?pe.jsx("img",{src:a.thumbnail,alt:a.name}):null}),pe.jsx("div",{className:"cart-pop__name",title:a.name,children:a.name}),pe.jsxs("div",{className:"cart-pop__price",children:[pi.symbol," ",a.priceCredits]})]},a.id))}),pe.jsxs("div",{className:"cart-pop__foot",children:[pe.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",pe.jsxs("strong",{children:[pi.symbol," ",i]})]}),pe.jsx(ru,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>t(!1),children:"Checkout"})]})]})}function au({className:e}){return pe.jsx("span",{className:`ico ${pi.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function oD(){const{session:e,connecting:r,signIn:t,disconnect:n,restore:i}=xm(),a=e==null?void 0:e.address,{data:s,isLoading:o}=GA(a),{data:c}=iD(e),l=Ii(R=>R.items.length),u=Tm(),[f,g]=We.useState(""),_=We.useRef();We.useEffect(()=>{i()},[i]);function A(R){u(R.trim()?`/assets?q=${encodeURIComponent(R.trim())}`:"/assets",{replace:!0})}function w(R){g(R),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>A(R),300)}return pe.jsxs(pe.Fragment,{children:[pe.jsx(Aw,{activePage:"shop",isSignedIn:!!e,isSigningIn:r,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>t(),onClickSignOut:()=>void n()}),pe.jsxs("div",{className:"subnav",children:[pe.jsxs("nav",{className:"subnav__tabs",children:[pe.jsx(an,{to:"/overview",children:"Overview"}),pe.jsx(an,{to:"/assets",children:"Assets"}),pe.jsx(an,{to:"/market",children:"Market"}),pe.jsx(an,{to:"/my-assets",children:"My Assets"}),pe.jsx(an,{to:"/my-favorites",children:"My Favorites"}),e?pe.jsx(an,{to:"/my-purchases",children:"My Purchases"}):null]}),pe.jsxs("div",{className:"subnav__search",children:[pe.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),pe.jsx("input",{value:f,placeholder:"Search item, creator, collection, name...",onChange:R=>w(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(_.current&&clearTimeout(_.current),A(f))}})]}),e?pe.jsxs("span",{className:"subnav__balance",title:`Your ${pi.name}`,children:[pe.jsx(au,{className:"subnav__balance-ico"}),(c==null?void 0:c.credits)??0]}):null,pe.jsxs(an,{to:"/credits",className:"subnav__credits",children:[pe.jsx(au,{className:"subnav__credits-ico"}),"Get ",pi.name]}),pe.jsxs("div",{className:"subnav__cart-wrap",children:[pe.jsxs(an,{to:"/cart",className:"subnav__cart","aria-label":"Cart",children:[pe.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?pe.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),pe.jsx(sD,{})]})]})]})}let uD=0;const Da=Ya(e=>({toasts:[],push:r=>{const t=++uD;return e(n=>({toasts:[...n.toasts,{...r,id:t}]})),t},dismiss:r=>e(t=>({toasts:t.toasts.filter(n=>n.id!==r)}))})),Aq={success:e=>Da.getState().push({message:e,kind:"success"}),error:e=>Da.getState().push({message:e,kind:"error"}),info:e=>Da.getState().push({message:e,kind:"info"})},cD={success:"✓",error:"!",info:"i"};function lD({t:e}){const r=Da(t=>t.dismiss);return We.useEffect(()=>{const t=setTimeout(()=>r(e.id),4500);return()=>clearTimeout(t)},[e.id,r]),pe.jsxs("div",{className:`toast toast--${e.kind}`,role:"status",onClick:()=>r(e.id),children:[pe.jsx("span",{className:"toast__icon","aria-hidden":!0,children:cD[e.kind]}),pe.jsx("span",{className:"toast__msg",children:e.message})]})}function dD(){const e=Da(r=>r.toasts);return e.length===0?null:pe.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(r=>pe.jsx(lD,{t:r},r.id))})}const fD=We.lazy(()=>$t(()=>import("./index-Bw9N_kF_.js"),__vite__mapDeps([7,1,8,5,3,4,9])).then(e=>({default:e.WearablePreview})));function oR(e){return pe.jsx(We.Suspense,{fallback:null,children:pe.jsx(fD,{...e})})}function pD(){const[e,r]=We.useState(!1);return We.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>r(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const t=window.setTimeout(()=>r(!0),1500);return()=>window.clearTimeout(t)},[]),e?pe.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:pe.jsx(oR,{id:"preview-warmer",profile:"default",dev:It.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function mD(){const e=xm(r=>r.session);We.useEffect(()=>{if(!e||e.providerType!==Ua.ProviderType.INJECTED)return;const r=e.web3Provider.provider;if(!(r!=null&&r.on)||!r.removeListener)return;const t=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==t&&window.location.reload()};return r.on("accountsChanged",n),()=>{var i;return(i=r.removeListener)==null?void 0:i.call(r,"accountsChanged",n)}},[e])}const ry=`${It.nftApiUrl}/v1`;function uR(e){if(!e)return 0;try{return Math.ceil(Number(cS(e))*10)}catch{return 0}}function Rq(e){if(!e)return 0;try{const r=BigInt(e),t=10n**16n;return Number((r+t-1n)/t)}catch{return 0}}async function wq(e){const{listings:r}=await Su({contractAddress:e,first:200}),t={};for(const n of r)n.listingType!=="primary"||n.itemId==null||(t[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return t}async function yD(e,r){var a;const t=new URLSearchParams({contractAddress:e,tokenId:r,first:"1"}),n=await fetch(`${ry}/nfts?${t.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 cR(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}}async function Su(e){var i,a;const r=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&r.set("category",e.category),e.first!=null&&r.set("first",String(e.first)),e.skip!=null&&r.set("skip",String(e.skip)),e.contractAddress&&r.set("contractAddress",e.contractAddress),e.itemId!=null&&r.set("itemId",e.itemId),(i=e.rarities)!=null&&i.length&&r.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.length&&r.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&r.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&r.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&r.set("search",e.search),e.sortBy&&r.set("sortBy",e.sortBy);const t=await fetch(`${It.marketplaceServerUrl}/v3/catalog/shop?${r.toString()}`);if(!t.ok)throw new Error(`fetchShopListings ${t.status}`);const n=await t.json();return{listings:n.data??[],total:n.total??0}}async function Iq(e,r){const{listings:t}=await Su({contractAddress:e,itemId:r,first:1});return t[0]?cR(t[0]):null}async function hD({first:e=100,...r}={}){const{listings:t,total:n}=await Su({...r,first:e});return{items:t.map(cR),total:n}}function gD(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??It.chainId,createdAt:e.createdAt??0}}async function Oq({first:e=100,...r}={}){var s,o;const t=new URLSearchParams;(r.category==="wearable"||r.category==="emote")&&t.set("category",r.category),t.set("first",String(e)),r.skip!=null&&t.set("skip",String(r.skip)),(s=r.rarities)!=null&&s.length&&t.set("rarity",r.rarities.join(",")),(o=r.wearableCategories)!=null&&o.length&&t.set("wearableCategory",r.wearableCategories.join(",")),r.search&&t.set("search",r.search),r.sortBy&&t.set("sortBy",r.sortBy);const n=await fetch(`${It.marketplaceServerUrl}/v3/catalog/legacy?${t.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(gD),total:i.total??a.length}}async function Pq(e,{category:r="wearable",first:t=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:r,first:String(t),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${ry}/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 u,f,g,_,A;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:((f=(u=l.nft.data)==null?void 0:u.wearable)==null?void 0:f.rarity)??((_=(g=l.nft.data)==null?void 0:g.emote)==null?void 0:_.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?uR(l.order.price):void 0,tradeId:(A=l.order)==null?void 0:A.tradeId}}),total:o}}const _D="dcl:marketplace";async function Nq(e,r){const{TradeService:t}=await $t(async()=>{const{TradeService:i}=await import("./TradeService-BuOZVMe-.js");return{TradeService:i}},__vite__mapDeps([10,5,1,11,2,6]));return new t(_D,It.marketplaceServerUrl,()=>r).addTrade(e)}async function lR(e){const r=await fetch(`${It.marketplaceServerUrl}/v1/trades/${e}`);if(!r.ok)throw new Error(`fetchTrade ${r.status}`);const t=await r.json();return t.data??t}async function ED(e,r){const t=new URLSearchParams({contractAddress:e,itemId:r,first:"1"}),n=await fetch(`${ry}/items?${t.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function Mq(e){var c,l;let r;try{r=await lR(e)}catch{return null}const t=(c=r.sent)==null?void 0:c[0],n=(l=r.received)==null?void 0:l[0],i=uR(n==null?void 0:n.amount),a=(t==null?void 0:t.contractAddress)??"",s=(t==null?void 0:t.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((t==null?void 0:t.assetType)===Ua.TradeAssetType.COLLECTION_ITEM){const u=await ED(a,s);return{name:(u==null?void 0:u.name)??"Item",thumbnail:(u==null?void 0:u.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await yD(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 Cq(e,r){var i;const{listings:t}=await Su({contractAddress:e,itemId:r,first:1}),n=(i=t[0])==null?void 0:i.tradeId;return n?lR(n):null}const vD={};function bD(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var a;const s=c=>c===null?null:JSON.parse(c,void 0),o=(a=t.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>t.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>t.removeItem(i)}}const Va=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(n){return Va(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return Va(n)(t)}}}},TD=(e,r)=>(t,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:R=>R,version:0,merge:(R,P)=>({...P,...R}),...r},s=!1;const o=new Set,c=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.`),t(...R)},n,i);const u=Va(a.serialize),f=()=>{const R=a.partialize({...n()});let P;const d=u({state:R,version:a.version}).then(S=>l.setItem(a.name,S)).catch(S=>{P=S});if(P)throw P;return d},g=i.setState;i.setState=(R,P)=>{g(R,P),f()};const _=e((...R)=>{t(...R),f()},n,i);let A;const w=()=>{var R;if(!l)return;s=!1,o.forEach(d=>d(n()));const P=((R=a.onRehydrateStorage)==null?void 0:R.call(a,n()))||void 0;return Va(l.getItem.bind(l))(a.name).then(d=>{if(d)return a.deserialize(d)}).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==a.version){if(a.migrate)return a.migrate(d.state,d.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return d.state}).then(d=>{var S;return A=a.merge(d,(S=n())!=null?S:_),t(A,!0),f()}).then(()=>{P==null||P(A,void 0),s=!0,c.forEach(d=>d(A))}).catch(d=>{P==null||P(void 0,d)})};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=>(c.add(R),()=>{c.delete(R)})},w(),A||_},SD=(e,r)=>(t,n,i)=>{let a={storage:bD(()=>localStorage),partialize:w=>w,version:0,merge:(w,R)=>({...R,...w}),...r},s=!1;const o=new Set,c=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.`),t(...w)},n,i);const u=()=>{const w=a.partialize({...n()});return l.setItem(a.name,{state:w,version:a.version})},f=i.setState;i.setState=(w,R)=>{f(w,R),u()};const g=e((...w)=>{t(...w),u()},n,i);i.getInitialState=()=>g;let _;const A=()=>{var w,R;if(!l)return;s=!1,o.forEach(d=>{var S;return d((S=n())!=null?S:g)});const P=((R=a.onRehydrateStorage)==null?void 0:R.call(a,(w=n())!=null?w:g))||void 0;return Va(l.getItem.bind(l))(a.name).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==a.version){if(a.migrate)return[!0,a.migrate(d.state,d.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,d.state];return[!1,void 0]}).then(d=>{var S;const[E,y]=d;if(_=a.merge(y,(S=n())!=null?S:g),t(_,!0),E)return u()}).then(()=>{P==null||P(_,void 0),_=n(),s=!0,c.forEach(d=>d(_))}).catch(d=>{P==null||P(void 0,d)})};return i.persist={setOptions:w=>{a={...a,...w},w.storage&&(l=w.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>A(),hasHydrated:()=>s,onHydrate:w=>(o.add(w),()=>{o.delete(w)}),onFinishHydration:w=>(c.add(w),()=>{c.delete(w)})},a.skipHydration||A(),_||g},AD=(e,r)=>"getStorage"in r||"serialize"in r||"deserialize"in r?((vD?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),TD(e,r)):SD(e,r),RD=AD,WT=Ya()(RD(e=>({items:{},toggle:r=>e(t=>{const n={...t.items};return n[r.id]?delete n[r.id]:n[r.id]=r,{items:n}}),remove:r=>e(t=>{const n={...t.items};return delete n[r],{items:n}})}),{name:"shop-favorites"}));function wD(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ID({address:e,className:r,linkToProfile:t}){var c,l;const n=Tm(),{data:i}=GA(e);if(!e)return null;const a=(i==null?void 0:i.name)||wD(e),s=(l=(c=i==null?void 0:i.avatar)==null?void 0:c.snapshots)==null?void 0:l.face256,o=pe.jsxs(pe.Fragment,{children:[s?pe.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):pe.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),pe.jsxs("span",{className:"creator__name",children:["By ",a]})]});return t?pe.jsx("button",{className:`creator creator--link${r?` ${r}`:""}`,title:`View ${a}`,onClick:u=>{u.stopPropagation(),n(`/creator/${e}`)},children:o}):pe.jsx("span",{className:`creator${r?` ${r}`:""}`,children:o})}function KT(e){if(!e)return"#a09ba8";try{return Ua.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function OD(e){const r=e.replace("#","");if(r.length<6)return"#161518";const t=parseInt(r.slice(0,2),16),n=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return .299*t+.587*n+.114*i>150?"#161518":"#ffffff"}const PD=120,ND=250;function MD(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function ny(e){const{item:r}=e,t=e.mode==="market",[n,i]=We.useState(!1),[a,s]=We.useState(!1),o=We.useRef(),c=We.useRef(),l=Ii(v=>v.add),u=Ii(v=>v.items.some(I=>I.id===r.id)),f=WT(v=>v.toggle),g=WT(v=>!!v.items[r.id]),_=Tm(),A=!!r.contractAddress&&!!r.itemId,w=r.tokenId??r.itemId,R=!t&&!!r.contractAddress&&!!w;function P(){R&&_(`/item/${r.contractAddress}/${w}`,{state:{item:r,tradeId:r.tradeId}})}function d(){o.current&&clearTimeout(o.current),c.current&&clearTimeout(c.current),s(!1),o.current=setTimeout(()=>i(!0),PD)}function S(){o.current&&clearTimeout(o.current),c.current&&clearTimeout(c.current),i(!1),s(!1)}function E(){c.current&&clearTimeout(c.current),c.current=setTimeout(()=>s(!0),ND)}const y=MD(r.gender);return pe.jsxs("article",{className:`card${n?" card--hover":""}`,style:R?{cursor:"pointer"}:void 0,onMouseEnter:d,onMouseLeave:S,onClick:P,role:R?"link":void 0,tabIndex:R?0:void 0,onKeyDown:R?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),P())}:void 0,children:[pe.jsxs("div",{className:"card__media",children:[pe.jsx("button",{className:`card__fav${g?" is-on":""}`,onClick:v=>{v.stopPropagation(),f(r)},"aria-label":g?"Remove from favorites":"Add to favorites",children:pe.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),r.thumbnail?pe.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:r.thumbnail,alt:r.name,loading:"lazy"}):null,n&&A?pe.jsxs(pe.Fragment,{children:[pe.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:pe.jsx(oR,{contractAddress:r.contractAddress,itemId:r.itemId??void 0,profile:"default",dev:It.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:E})}),pe.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:pe.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),pe.jsxs("div",{className:"card__body",children:[pe.jsx("div",{className:"card__name",title:r.name,children:r.name}),r.creator?pe.jsx(ID,{address:r.creator,className:"card__creator",linkToProfile:!0}):pe.jsx("div",{className:"card__creator",children:" "}),n?t&&e.mode==="market"?pe.jsx("button",{className:"card__cart",onClick:v=>{v.stopPropagation(),e.onBuyNow(r)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"UNAVAILABLE":"BUY NOW"}):pe.jsxs("button",{className:`card__cart${u?" is-in":""}`,onClick:v=>{v.stopPropagation(),l(r,"grid")},disabled:u,children:[pe.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),u?"IN CART":"ADD TO CART"]}):pe.jsxs("div",{className:"card__meta",children:[t&&e.mode==="market"?pe.jsxs("div",{className:"card__price card__price--market",children:[pe.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),pe.jsx(au,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,pe.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):pe.jsxs("div",{className:"card__price",children:[pe.jsx(au,{className:"card__diamond"}),r.priceCredits]}),pe.jsxs("div",{className:"card__chips",children:[pe.jsx("span",{className:"chip chip--rarity",style:{background:KT(r.rarity),color:OD(KT(r.rarity))},children:r.rarity}),r.category==="wearable"?pe.jsx("span",{className:"chip chip--icon",children:pe.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,y?pe.jsx("span",{className:"chip chip--icon",children:y}):null]})]})]})]})}function CD(e){if(!e)return 0;try{return Math.ceil(Number(cS(e))*10)}catch{return 0}}function jD(e){if(!e||e.length===0)return null;const r=e.some(n=>n.includes("Male")),t=e.some(n=>n.includes("Female"));return r&&t?"unisex":r?"male":t?"female":null}function dR(e){var r,t,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:((t=(r=e.data)==null?void 0:r.wearable)==null?void 0:t.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:CD(e.price??e.minPrice),gender:jD((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function jq(e,{first:r=20,skip:t=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(r),skip:String(t),includeSocialEmotes:"false"}),i=await fetch(`${It.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(dR);return{items:o,total:s??t+o.length}}async function DD(e,{first:r=60,skip:t=0}={}){const n=new URLSearchParams({creator:e,first:String(r),skip:String(t),includeSocialEmotes:"false"}),i=await fetch(`${It.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(dR);return{items:o,total:s??t+o.length}}const fR="shop:followed-creators:v1",qD=200;function LD(){try{const e=localStorage.getItem(fR);if(!e)return[];const r=JSON.parse(e);return Array.isArray(r)?r.filter(t=>typeof t=="string"):[]}catch{return[]}}function YT(e){try{localStorage.setItem(fR,JSON.stringify(e))}catch{}}const $D=Ya((e,r)=>({followed:LD(),isFollowing:t=>r().followed.includes(t.toLowerCase()),follow:t=>{const n=t.toLowerCase();if(!n||r().followed.includes(n))return;const i=[n,...r().followed].slice(0,qD);YT(i),e({followed:i}),fi("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:t=>{const n=t.toLowerCase();if(!r().followed.includes(n))return;const i=r().followed.filter(a=>a!==n);YT(i),e({followed:i}),fi("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:t=>r().isFollowing(t)?r().unfollow(t):r().follow(t)})),BD=8,UD=8,kD=12;function VD(){const r=$D(i=>i.followed).slice(0,BD),{data:t=[],isLoading:n}=su({queryKey:["followed-creators-row",r.join(",")],enabled:r.length>0,queryFn:async()=>{const i=await Promise.all(r.map(a=>DD(a,{first:UD}).then(s=>s.items).catch(()=>[])));return FD(i).filter(a=>a.priceCredits>0).slice(0,kD)}});return r.length===0||!n&&t.length===0?null:pe.jsxs("section",{className:"row",children:[pe.jsx("div",{className:"row__head",children:pe.jsx("h2",{className:"row__title",children:"From creators you follow"})}),pe.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>pe.jsx("div",{className:"card card--skeleton"},a)):t.map(i=>pe.jsx(ny,{item:i},i.id))})]})}function FD(e){const r=[],t=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&&!t.has(s.id)&&(t.add(s.id),r.push(s))}return r}const pR="shop:recently-viewed",mR=12;function yR(){try{const e=localStorage.getItem(pR);if(!e)return[];const r=JSON.parse(e);return Array.isArray(r)?r.slice(0,mR):[]}catch{return[]}}function Dq(e){if(e!=null&&e.id)try{const r=[e,...yR().filter(t=>t.id!==e.id)].slice(0,mR);localStorage.setItem(pR,JSON.stringify(r))}catch{}}function HD({excludeId:e}){const r=We.useMemo(()=>yR().filter(t=>t.id!==e),[e]);return r.length===0?null:pe.jsxs("section",{className:"row",children:[pe.jsx("div",{className:"row__head",children:pe.jsx("h2",{className:"row__title",children:"Recently viewed"})}),pe.jsx("div",{className:"row__track",children:r.map(t=>pe.jsx(ny,{item:t},t.id))})]})}function QT({title:e,items:r,loading:t}){return pe.jsxs("section",{className:"row",children:[pe.jsxs("div",{className:"row__head",children:[pe.jsx("h2",{className:"row__title",children:e}),pe.jsxs(ru,{className:"row__viewall",to:"/assets",children:["VIEW ALL ",pe.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),pe.jsx("div",{className:"row__track",children:t?Array.from({length:6}).map((n,i)=>pe.jsx("div",{className:"card card--skeleton"},i)):r.map(n=>pe.jsx(ny,{item:n},n.id))})]})}function GD(){const{data:e,isLoading:r}=su({queryKey:["overview-listings"],queryFn:()=>hD({first:24})}),t=(e==null?void 0:e.items)??[];return pe.jsxs("div",{className:"overview",children:[pe.jsx("section",{className:"hero",children:pe.jsxs("div",{className:"hero__inner",children:[pe.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),pe.jsx(ru,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),pe.jsx(VD,{}),pe.jsx(HD,{}),r||t.length>0?pe.jsxs(pe.Fragment,{children:[pe.jsx(QT,{title:"Featured",items:t.slice(0,12),loading:r}),t.length>6?pe.jsx(QT,{title:"New Creations",items:t.slice(6,18),loading:!1}):null]}):pe.jsxs("div",{className:"overview__empty",children:[pe.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),pe.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),pe.jsx(ru,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]})]})}const zD={"/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"},WD=We.lazy(()=>$t(()=>import("./Assets-DfOXKOnR.js"),__vite__mapDeps([12,1,13,14,15,5])).then(e=>({default:e.Assets}))),KD=We.lazy(()=>$t(()=>import("./Market-CMksg97B.js"),__vite__mapDeps([16,1,17,11,5,13,14,18,19,15])).then(e=>({default:e.Market}))),YD=We.lazy(()=>$t(()=>import("./ItemDetail-Dn0l_owe.js"),__vite__mapDeps([20,1,18,11,5,19,21])).then(e=>({default:e.ItemDetail}))),QD=We.lazy(()=>$t(()=>import("./Collection-BBAHD9v7.js"),__vite__mapDeps([22,1,23,24,13,14,15,5])).then(e=>({default:e.Collection}))),JD=We.lazy(()=>$t(()=>import("./Creator-Cf3awWfr.js"),__vite__mapDeps([25,1,23,24,13,14,15,5])).then(e=>({default:e.Creator}))),XD=We.lazy(()=>$t(()=>import("./MyAssets-Ly529Qzy.js"),__vite__mapDeps([26,1,27,18,11,5,17,28,14,15,29])).then(e=>({default:e.MyAssets}))),ZD=We.lazy(()=>$t(()=>import("./MyFavorites-BM98-wNr.js"),__vite__mapDeps([30,1,14,5])).then(e=>({default:e.MyFavorites}))),xD=We.lazy(()=>$t(()=>import("./MyPurchases-DDXg_7hF.js"),__vite__mapDeps([31,1,14,15,5])).then(e=>({default:e.MyPurchases}))),eq=We.lazy(()=>$t(()=>import("./ImportListings-BBkMIFrL.js"),__vite__mapDeps([32,1,27,18,11,5,17,28,33])).then(e=>({default:e.ImportListings}))),tq=We.lazy(()=>$t(()=>import("./Cart-DbbHo7Lp.js"),__vite__mapDeps([34,1,18,11,5,19])).then(e=>({default:e.Cart}))),rq=We.lazy(()=>$t(()=>import("./GetCredits-BbICBHrS.js"),__vite__mapDeps([35,1,9,4,5])).then(e=>({default:e.GetCredits}))),nq=We.lazy(()=>$t(()=>import("./Success-De5n3cBh.js"),__vite__mapDeps([36,1,28,5])).then(e=>({default:e.Success}))),iq=We.lazy(()=>$t(()=>import("./NotFound-BK3mhtdy.js"),__vite__mapDeps([37,1])).then(e=>({default:e.NotFound})));function aq(){return pe.jsx("div",{className:"page-loading","aria-busy":"true",children:pe.jsx("span",{className:"spinner","aria-hidden":!0})})}function sq(){mD();const e=NR();return We.useEffect(()=>{vj()},[]),We.useEffect(()=>{const r=e.pathname,t=zD[r]??(r.startsWith("/item/")?"item":r.startsWith("/collection/")?"collection":r.startsWith("/creator/")?"creator":"other");hj(t)},[e.pathname]),pe.jsxs(pe.Fragment,{children:[pe.jsx(dD,{}),pe.jsx(pD,{}),pe.jsx(oD,{}),pe.jsx("main",{className:"page",children:pe.jsx(We.Suspense,{fallback:pe.jsx(aq,{}),children:pe.jsxs(MR,{children:[pe.jsx(Wt,{path:"/",element:pe.jsx(CR,{to:"/overview",replace:!0})}),pe.jsx(Wt,{path:"/overview",element:pe.jsx(GD,{})}),pe.jsx(Wt,{path:"/assets",element:pe.jsx(WD,{})}),pe.jsx(Wt,{path:"/market",element:pe.jsx(KD,{})}),pe.jsx(Wt,{path:"/item/:contractAddress/:tokenId",element:pe.jsx(YD,{})}),pe.jsx(Wt,{path:"/collection/:contractAddress",element:pe.jsx(QD,{})}),pe.jsx(Wt,{path:"/creator/:address",element:pe.jsx(JD,{})}),pe.jsx(Wt,{path:"/my-assets",element:pe.jsx(XD,{})}),pe.jsx(Wt,{path:"/my-favorites",element:pe.jsx(ZD,{})}),pe.jsx(Wt,{path:"/my-purchases",element:pe.jsx(xD,{})}),pe.jsx(Wt,{path:"/import",element:pe.jsx(eq,{})}),pe.jsx(Wt,{path:"/cart",element:pe.jsx(tq,{})}),pe.jsx(Wt,{path:"/credits",element:pe.jsx(rq,{})}),pe.jsx(Wt,{path:"/success",element:pe.jsx(nq,{})}),pe.jsx(Wt,{path:"*",element:pe.jsx(iq,{})})]})})})]})}const oq=new ow({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});jR.createRoot(document.getElementById("root")).render(pe.jsx(uS.StrictMode,{children:pe.jsx(cw,{client:oq,children:pe.jsx(DR,{children:pe.jsx(sq,{})})})}));export{SP as $,ny as A,ng as B,pi as C,$D as D,DD as E,au as F,Aq as G,Sq as H,Oq as I,pq as J,fq as K,vw as L,dq as M,Tu as N,Tq as O,GA as P,ew as Q,hq as R,Dq as S,Iq as T,Pq as U,wq as V,oR as W,hC as X,$r as Y,Tr as Z,$t as _,ID as a,tD as a0,Za as a1,Fm as a2,XP as a3,LP as a4,Mm as a5,DS as a6,qS as a7,jq as b,xm as c,vq as d,su as e,hD as f,Mq as g,lR as h,It as i,Ii as j,iD as k,uw as l,ka as m,Cq as n,Eq as o,Nq as p,gq as q,_q as r,k1 as s,fi as t,WT as u,_j as v,bq as w,Rq as x,Ua as y,br as z};
|