@dcl/shop 0.1.0-28749696583.commit-1ceed46 → 0.1.0-28749698227.commit-0c859e2
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-aLMhp0dt.js → Assets-FMrABFH_.js} +1 -1
- package/assets/{Cart-De2Zl3dM.js → Cart-COyAPJn1.js} +1 -1
- package/assets/{CircularProgress-zG5DpGEk.js → CircularProgress-ePyo1lbd.js} +1 -1
- package/assets/{Collection-D2tlaWRj.js → Collection-DJjtkyI0.js} +1 -1
- package/assets/{Creator-nG5HN86G.js → Creator-Cd6xMnQk.js} +1 -1
- package/assets/{ExchangeController-DxQ_hnpn.js → ExchangeController-AR7AXGzp.js} +1 -1
- package/assets/{GetCredits-Dpbjid38.js → GetCredits-BC7Z51_v.js} +2 -2
- package/assets/{HelpersUtil-CE2js2MR.js → HelpersUtil-PrvulZLQ.js} +1 -1
- package/assets/{ImportListings-CJDBHXeE.js → ImportListings-CXvHkADP.js} +1 -1
- package/assets/{ItemDetail-8nTYzMUv.js → ItemDetail-Sn2B-MA3.js} +1 -1
- package/assets/{Market-D5ojlVRL.js → Market-Cr-J1I9u.js} +1 -1
- package/assets/{MyAssets-D9VUj3Zr.js → MyAssets-CpoF2iAy.js} +1 -1
- package/assets/{MyFavorites-DeEu4CEV.js → MyFavorites-b3vHnYMr.js} +1 -1
- package/assets/{MyPurchases-DvIbgEFO.js → MyPurchases-DVXmppAu.js} +1 -1
- package/assets/{RealCheckout-DW__EYhq.js → RealCheckout-DO6nD-rf.js} +1 -1
- package/assets/{Success-B3A8ZBjK.js → Success-CNdczbFT.js} +1 -1
- package/assets/{SvgIcon-Bf8o-Oh9.js → SvgIcon-D2AubmSV.js} +1 -1
- package/assets/{SwapController-442j5gZT.js → SwapController-DTKDtDuh.js} +1 -1
- package/assets/{TradeService-Bis1RE0m.js → TradeService-BK-xq9ht.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-BSVX-6L0.js → W3MFrameProviderSingleton-DxZDURuu.js} +3 -3
- package/assets/{WebCryptoP256-bcQGKg-7.js → WebCryptoP256-DslKERu3.js} +1 -1
- package/assets/{basic-DON-N1CW.js → basic-ClTZjNQz.js} +1 -1
- package/assets/{biconomy-CzjuLXKA.js → biconomy-BVk_afT2.js} +1 -1
- package/assets/{buy-5130Im35.js → buy-_5Wro-EH.js} +1 -1
- package/assets/{buy-gasless-CAFJBEcY.js → buy-gasless-Da6cXp5w.js} +1 -1
- package/assets/{ccip-Be3XfiR-.js → ccip-99AVWMCb.js} +1 -1
- package/assets/{ccip-C1VLZjOC.js → ccip-JE6ul9xT.js} +1 -1
- package/assets/{collection-BTAfnBAO.js → collection-Dj1PGTaS.js} +1 -1
- package/assets/{controller-BtovDqDB.js → controller-C8G19uhk.js} +2 -2
- package/assets/{core-CZtd-NIi.js → core-CyJXDVbu.js} +4 -4
- package/assets/{custom-BwG_UShl.js → custom-Cjf2UWeN.js} +1 -1
- package/assets/{data-capture-eO7T9U30.js → data-capture-Byx93Q11.js} +1 -1
- package/assets/{decimals-ChKIkXOS.js → decimals-CTfzGzBe.js} +1 -1
- package/assets/decimals-nJOPAX3f.js +1 -0
- package/assets/{detectExtension-tc_ts8l0.js → detectExtension-D3zYez7t.js} +1 -1
- package/assets/{email-Stqivzcj.js → email-DPOB-SWJ.js} +1 -1
- package/assets/{embedded-wallet-DCapk4p8.js → embedded-wallet-CHJsBta2.js} +1 -1
- package/assets/{engine-DUpcMxaF.js → engine-Bnqy1EVE.js} +1 -1
- package/assets/{estimate-l1-fee-CLHdzsZf.js → estimate-l1-fee-Bl4TKlfd.js} +1 -1
- package/assets/{eth_estimateGas-C29fayI3.js → eth_estimateGas-C6gJZO0T.js} +1 -1
- package/assets/{eth_getStorageAt-CLFvCDZd.js → eth_getStorageAt-3NgDSjye.js} +1 -1
- package/assets/{eth_getTransactionCount-CI8xyokV.js → eth_getTransactionCount-DTwTbWKm.js} +1 -1
- package/assets/{extractIPFS-BGsgU6Dq.js → extractIPFS-CHWW_nBy.js} +1 -1
- package/assets/{features-BVeS0JHV.js → features-HqCYMdFT.js} +1 -1
- package/assets/{fetchTokenMetadata-BLzsI7EC.js → fetchTokenMetadata-CSZ3XllS.js} +2 -2
- package/assets/{generateUtilityClasses-B28mC2Si.js → generateUtilityClasses-68H80U2m.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-R5ARh3Yl.js → get-ecosystem-wallet-info-CVCd4sza.js} +1 -1
- package/assets/{getBalance-BSCY52PD.js → getBalance-yfGcZGGj.js} +1 -1
- package/assets/{getInstalledModules-BS7IiWOH.js → getInstalledModules-DnAA6-I4.js} +1 -1
- package/assets/{getNFT-BK5_-4hT.js → getNFT-BXj9XpaA.js} +1 -1
- package/assets/{getNFT-BwgDFGMN.js → getNFT-vDogDybV.js} +2 -2
- package/assets/{hashTypedData-q9oxx1xt.js → hashTypedData-2doJmUR6.js} +1 -1
- package/assets/{hashTypedData-Cq89-tTo.js → hashTypedData-DaDegzDr.js} +1 -1
- package/assets/{import-8mZnlxOL.js → import-BEVHrqgg.js} +1 -1
- package/assets/{in-app-wallet-calls-DloE1FT2.js → in-app-wallet-calls-C42NJm8M.js} +1 -1
- package/assets/{index-CFdMT9MW.js → index-0AAKBJxH.js} +2 -2
- package/assets/{index-Cs_2iQ3W.js → index-57ur9orY.js} +1 -1
- package/assets/{index-BIzLuINV.js → index-9ge8OUDw.js} +1 -1
- package/assets/{index-BDUVlNpj.js → index-B4bWwh_Y.js} +1 -1
- package/assets/{index-D2dWLs9-.js → index-B9SF-7gB.js} +1 -1
- package/assets/{index-BOcZHHVN.js → index-BG6CN-s7.js} +1 -1
- package/assets/{index-D6jW0QuZ.js → index-BREuBgY2.js} +1 -1
- package/assets/{index-CaaeFuGL.js → index-BVLuv2om.js} +1 -1
- package/assets/{index-BVm65sSQ.js → index-BYlyICGz.js} +1 -1
- package/assets/{index-BF4emFry.js → index-BaKOKooW.js} +1 -1
- package/assets/{index-Dp-0pAj4.js → index-BeD0ry83.js} +1 -1
- package/assets/{index-iF9kiYoZ.js → index-BhzLlo1O.js} +1 -1
- package/assets/{index-CuKnEc0t.js → index-BlH2P_nz.js} +1 -1
- package/assets/{index-Cgp0c25G.js → index-Blv3Wwvz.js} +1 -1
- package/assets/{index-B0pKs-hj.js → index-Bme3obuL.js} +1 -1
- package/assets/{index-DO5kbyL5.js → index-BqkfR3e1.js} +3 -3
- package/assets/{index-C24A9Q_B.js → index-BuPAm941.js} +1 -1
- package/assets/{index-ufiEiZ1d.js → index-Bx92bjWv.js} +1 -1
- package/assets/{index-BD27OB6Q.js → index-C0zr56Qh.js} +1 -1
- package/assets/{index-ZrYHq_rN.js → index-C9WCBveU.js} +1 -1
- package/assets/{index-Ck7C_Qc5.js → index-CB1SUuBM.js} +4 -4
- package/assets/{index-CYxyFUAy.js → index-CDrsSYcA.js} +1 -1
- package/assets/{index-BJxTr96X.js → index-COwpweqw.js} +1 -1
- package/assets/{index-BeFu8hpI.js → index-CRHmObgS.js} +1 -1
- package/assets/{index-DaDPmmBo.js → index-CRiIcVpU.js} +1 -1
- package/assets/{index-B9O7lhLw.js → index-CX7ndFAa.js} +1 -1
- package/assets/{index-BLKJ4eEO.js → index-CbVF1v4U.js} +1 -1
- package/assets/{index-BxSPmv0Y.js → index-CeSnh-cF.js} +1 -1
- package/assets/{index-DM4yPO68.js → index-Chh2iu1U.js} +1 -1
- package/assets/{index-C-jpz5Fa.js → index-CnBS8kzN.js} +1 -1
- package/assets/{index-CjaxrxzI.js → index-CtFbxl_y.js} +1 -1
- package/assets/{index-BE2OdG3f.js → index-Cuo0mhpq.js} +1 -1
- package/assets/{index-DacoqM69.js → index-D7XhLBQ-.js} +1 -1
- package/assets/{index-D-Kw_wUy.js → index-D8ALyBMQ.js} +1 -1
- package/assets/{index-Dm3nVmD3.js → index-DFAtvbN5.js} +1 -1
- package/assets/{index-C0RsmTxE.js → index-DFB_iIuz.js} +1 -1
- package/assets/{index-D58Lm6fy.js → index-DKewLOZ7.js} +1 -1
- package/assets/{index-aWPj5LNH.js → index-DXbLCZL4.js} +1 -1
- package/assets/{index-D6G1eVBw.js → index-DiHK-ypD.js} +1 -1
- package/assets/{index-DIMb2qTx.js → index-DiX8jfOz.js} +1 -1
- package/assets/{index-BAgLTJQC.js → index-Dn9Pxudm.js} +1 -1
- package/assets/{index-DnXaf_28.js → index-DprMjbvv.js} +1 -1
- package/assets/{index-CcZ_aO1r.js → index-Dw8xiBHu.js} +1 -1
- package/assets/{index-BsL6EcA1.js → index-DyGFvyMP.js} +3 -3
- package/assets/{index-C7dh-AbD.js → index-POoM1fB4.js} +2 -2
- package/assets/{index-Bj6vwNIk.js → index-RnHbMsps.js} +1 -1
- package/assets/{index-DWGjNbEm.js → index-VT1wNEWr.js} +1 -1
- package/assets/{index-CCidLmBj.js → index-ZNqzZwnz.js} +1 -1
- package/assets/{index-BydDLvNI.js → index-e_7-B1ow.js} +1 -1
- package/assets/{index-8vuqXajV.js → index-j3O81hit.js} +2 -2
- package/assets/{index-CzK1bz00.js → index-jaAvXNFF.js} +1 -1
- package/assets/{index.es-WIKYy9BI.js → index.es-BCgpKnhB.js} +1 -1
- package/assets/{index.es-BHmJ3HE8.js → index.es-DLOLLwhc.js} +1 -1
- package/assets/{index.es-AvZc0iwU.js → index.es-uQUz0uPi.js} +4 -4
- package/assets/{localBatchGatewayRequest-DAEYAZDW.js → localBatchGatewayRequest-DCKNeCfz.js} +1 -1
- package/assets/{mana-rate-Cj4WJyFX.js → mana-rate-Boaa1HMt.js} +1 -1
- package/assets/network-C9miAzGt.js +1 -0
- package/assets/{networks-eeU54tZ7.js → networks-D0pJRUuY.js} +1 -1
- package/assets/{onramp-DhSiFszx.js → onramp-pQdY_9aS.js} +1 -1
- package/assets/{openzeppelin-TUhCXc3W.js → openzeppelin-diCOMn_P.js} +1 -1
- package/assets/{ownerOf-DU-JKoHi.js → ownerOf-CFYID7oD.js} +1 -1
- package/assets/{parseNft-BvVevHMp.js → parseNft-CmySAMrV.js} +2 -2
- package/assets/{parseSignature-CqBaxebK.js → parseSignature-bCWekXGm.js} +1 -1
- package/assets/{parseSignature-fzdlClLS.js → parseSignature-t4gfdMWw.js} +3 -3
- package/assets/{pay-with-exchange-CcXMWyyR.js → pay-with-exchange-DbEbHfpX.js} +1 -1
- package/assets/{qr-overlay-CoU3_96F.js → qr-overlay-rU0bVDln.js} +1 -1
- package/assets/{receive-DlVMqTPT.js → receive-C22Daqnd.js} +1 -1
- package/assets/{resolveImplementation-DTf71Ha-.js → resolveImplementation-DynwR0lM.js} +1 -1
- package/assets/{rpc-qmK5iTzE.js → rpc-C7dS7ng8.js} +1 -1
- package/assets/{secp256k1-xb6034EE.js → secp256k1-DcKiXZY-.js} +1 -1
- package/assets/{secp256k1-nA5uVAYh.js → secp256k1-DoZorCJw.js} +1 -1
- package/assets/{secp256k1-DFuDr3b6.js → secp256k1-DznyzAlp.js} +1 -1
- package/assets/{send-u3ctJaL6.js → send-DYQ25bRQ.js} +1 -1
- package/assets/{send-batch-transaction-BFEKzC9O.js → send-batch-transaction-EluRyTwS.js} +1 -1
- package/assets/{send-eip712-transaction-BQihd29J.js → send-eip712-transaction-DTR4eE0C.js} +2 -2
- package/assets/{send-gasless-transaction-BqA4bIvc.js → send-gasless-transaction-oXMw6C-s.js} +2 -2
- package/assets/{sendRawTransaction-C8j0qQ9e.js → sendRawTransaction-BU7jVR59.js} +3 -3
- package/assets/{serializeTransaction-Dz4GBhoh.js → serializeTransaction-yZGwGRzm.js} +1 -1
- package/assets/{session-proposal-Db4KYIHa.js → session-proposal-BwNkG3_v.js} +1 -1
- package/assets/{session-request-CihuU88c.js → session-request-CBPwxxaY.js} +2 -2
- package/assets/{sha256-CgtTKrQj.js → sha256-Dh2CN2ka.js} +1 -1
- package/assets/{signing-BpshFomj.js → signing-GS-zzaze.js} +4 -4
- package/assets/{socials-CVrxuzLr.js → socials-D941TnMp.js} +1 -1
- package/assets/{swaps-BgpJ5WXk.js → swaps-5Z0exdjC.js} +1 -1
- package/assets/{thirdweb-CYxasBJb.js → thirdweb-BhSo-VaG.js} +3 -3
- package/assets/{totalSupply-B1JXRs3G.js → totalSupply-Dn2mGU3K.js} +1 -1
- package/assets/{transactionReceipt-C76rMl4n.js → transactionReceipt-DXzK83SA.js} +1 -1
- package/assets/{transactions-4VkJkzU5.js → transactions-BB8fY56R.js} +1 -1
- package/assets/{useInfiniteGrid-DWCJkphW.js → useInfiniteGrid-BdBxLsy8.js} +1 -1
- package/assets/{verifyHash-ETsOfWG5.js → verifyHash-DcUfBKkE.js} +1 -1
- package/assets/{w3m-modal-DnfQqgSb.js → w3m-modal-B_8aqWPZ.js} +1 -1
- package/assets/{w3m-modal-Dsohngdn.js → w3m-modal-C2IuKDb_.js} +1 -1
- package/assets/{wait-for-tx-receipt-B7QM3M94.js → wait-for-tx-receipt-DYUfif7J.js} +1 -1
- package/assets/{wallet-kind-B1XTGpW3.js → wallet-kind-I4wsazAy.js} +1 -1
- package/assets/{wallets-Bvy8SYUi.js → wallets-BCm8dv3V.js} +6 -6
- package/assets/{web-connector-D7aGkNQq.js → web-connector-PEOwt9A9.js} +3 -3
- package/assets/{writeContract-B9ry2Fzp.js → writeContract-KYMfI9ra.js} +1 -1
- package/assets/{zoraTestnet-CbeIIuai.js → zoraTestnet-DOA24Pam.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/decimals-CP_7HUio.js +0 -1
- package/assets/network-BWxaW3rR.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var dM=Object.defineProperty;var M_=e=>{throw TypeError(e)};var fM=(e,t,r)=>t in e?dM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Cn=(e,t,r)=>fM(e,typeof t!="symbol"?t+"":t,r),kl=(e,t,r)=>t.has(e)||M_("Cannot "+r);var oe=(e,t,r)=>(kl(e,t,"read from private field"),r?r.call(e):t.get(e)),Ge=(e,t,r)=>t.has(e)?M_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),De=(e,t,r,n)=>(kl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=(e,t,r)=>(kl(e,t,"access private method"),r);var Eu=(e,t,r,n)=>({set _(i){De(e,t,i,r)},get _(){return oe(e,t,n)}});import{r as Ye,j as fe,l as pw,g as mw,R as hw,c as vy,L as Gc,b as ug,m as Dn,d as pM,n as mM,o as sr,N as hM,p as yM,B as gM}from"./react-E8ng6RF2.js";import{g as zc,p as Uc,W as _M,m as EM,h as C_,f as yw}from"./ethers-DbXGgxrh.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var yo=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(){}},ji,Bn,Aa,nw,vM=(nw=class extends yo{constructor(){super();Ge(this,ji);Ge(this,Bn);Ge(this,Aa);De(this,Aa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){oe(this,Bn)||this.setEventListener(oe(this,Aa))}onUnsubscribe(){var t;this.hasListeners()||((t=oe(this,Bn))==null||t.call(this),De(this,Bn,void 0))}setEventListener(t){var r;De(this,Aa,t),(r=oe(this,Bn))==null||r.call(this),De(this,Bn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){oe(this,ji)!==t&&(De(this,ji,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof oe(this,ji)=="boolean"?oe(this,ji):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ji=new WeakMap,Bn=new WeakMap,Aa=new WeakMap,nw),cg=new vM,bM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Un,og,iw,TM=(iw=class{constructor(){Ge(this,Un,bM);Ge(this,og,!1)}setTimeoutProvider(e){De(this,Un,e)}setTimeout(e,t){return oe(this,Un).setTimeout(e,t)}clearTimeout(e){oe(this,Un).clearTimeout(e)}setInterval(e,t){return oe(this,Un).setInterval(e,t)}clearInterval(e){oe(this,Un).clearInterval(e)}},Un=new WeakMap,og=new WeakMap,iw),Di=new TM;function SM(e){setTimeout(e,0)}var IM=typeof window>"u"||"Deno"in globalThis;function hr(){}function RM(e,t){return typeof e=="function"?e(t):e}function by(e){return typeof e=="number"&&e>=0&&e!==1/0}function gw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yn(e,t){return typeof e=="function"?e(t):e}function Sr(e,t){return typeof e=="function"?e(t):e}function D_(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==lg(s,t.options))return!1}else if(!eo(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function j_(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(xs(t.options.mutationKey)!==xs(a))return!1}else if(!eo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function lg(e,t){return((t==null?void 0:t.queryKeyHashFn)||xs)(e)}function xs(e){return JSON.stringify(e,(t,r)=>Sy(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>eo(e[r],t[r])):!1}var AM=Object.prototype.hasOwnProperty;function _w(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=$_(e)&&$_(t);if(!n&&!(Sy(e)&&Sy(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:AM.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const E=_w(m,p,r+1);u[d]=E,E===m&&l++}return a===o&&l===a?e:u}function Ty(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function $_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sy(e){if(!L_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!L_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L_(e){return Object.prototype.toString.call(e)==="[object Object]"}function wM(e){return new Promise(t=>{Di.setTimeout(t,e)})}function Iy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?_w(e,t):t}function C3(e){return e}function OM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function NM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var dg=Symbol();function Ew(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===dg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vw(e,t){return typeof e=="function"?e(...t):!!e}function PM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var to=(()=>{let e=()=>IM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ry(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var MM=SM;function CM(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=MM;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Kt=CM(),wa,Fn,Oa,aw,DM=(aw=class extends yo{constructor(){super();Ge(this,wa,!0);Ge(this,Fn);Ge(this,Oa);De(this,Oa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){oe(this,Fn)||this.setEventListener(oe(this,Oa))}onUnsubscribe(){var t;this.hasListeners()||((t=oe(this,Fn))==null||t.call(this),De(this,Fn,void 0))}setEventListener(t){var r;De(this,Oa,t),(r=oe(this,Fn))==null||r.call(this),De(this,Fn,t(this.setOnline.bind(this)))}setOnline(t){oe(this,wa)!==t&&(De(this,wa,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return oe(this,wa)}},wa=new WeakMap,Fn=new WeakMap,Oa=new WeakMap,aw),Wc=new DM;function jM(e){return Math.min(1e3*2**e,3e4)}function bw(e){return(e??"online")==="online"?Wc.isOnline():!0}var Ay=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Tw(e){let t=!1,r=0,n;const i=Ry(),a=()=>i.status!=="pending",s=A=>{var R;if(!a()){const O=new Ay(A);m(O),(R=e.onCancel)==null||R.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>cg.isFocused()&&(e.networkMode==="always"||Wc.isOnline())&&e.canRun(),c=()=>bw(e.networkMode)&&e.canRun(),d=A=>{a()||(n==null||n(),i.resolve(A))},m=A=>{a()||(n==null||n(),i.reject(A))},p=()=>new Promise(A=>{var R;n=O=>{(a()||l())&&A(O)},(R=e.onPause)==null||R.call(e)}).then(()=>{var A;n=void 0,a()||(A=e.onContinue)==null||A.call(e)}),E=()=>{if(a())return;let A;const R=r===0?e.initialPromise:void 0;try{A=R??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(d).catch(O=>{var T;if(a())return;const f=e.retry??(to.isServer()?0:3),v=e.retryDelay??jM,b=typeof v=="function"?v(r,O):v,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,O);if(t||!h){m(O);return}r++,(T=e.onFail)==null||T.call(e,r,O),wM(b).then(()=>l()?void 0:p()).then(()=>{t?m(O):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?E():p().then(E),i)}}var $i,sw,Sw=(sw=class{constructor(){Ge(this,$i)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),by(this.gcTime)&&De(this,$i,Di.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(to.isServer()?1/0:300*1e3))}clearGcTimeout(){oe(this,$i)!==void 0&&(Di.clearTimeout(oe(this,$i)),De(this,$i,void 0))}},$i=new WeakMap,sw);function $M(e){return{onFetch:(t,r)=>{var c,d,m,p,E;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let A=!1;const R=v=>{PM(v,()=>t.signal,()=>A=!0)},O=Ew(t.options,t.fetchOptions),f=async(v,b,h)=>{if(A)return Promise.reject(t.signal.reason);if(b==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return R(K),K})(),P=await O(w),{maxPages:B}=t.options,J=h?NM:OM;return{pages:J(v.pages,P,B),pageParams:J(v.pageParams,b,B)}};if(i&&a.length){const v=i==="backward",b=v?Iw:wy,h={pages:a,pageParams:s},T=b(n,h);o=await f(h,T,v)}else{const v=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:wy(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<v)}return o};t.options.persister?t.fetchFn=()=>{var A,R;return(R=(A=t.options).persister)==null?void 0:R.call(A,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function wy(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Iw(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function D3(e,t){return t?wy(e,t)!=null:!1}function j3(e,t){return!t||!e.getPreviousPageParam?!1:Iw(e,t)!=null}var Na,Li,Pa,Rr,qi,Ht,lo,ki,Tr,Rw,bn,ow,LM=(ow=class extends Sw{constructor(t){super();Ge(this,Tr);Ge(this,Na);Ge(this,Li);Ge(this,Pa);Ge(this,Rr);Ge(this,qi);Ge(this,Ht);Ge(this,lo);Ge(this,ki);De(this,ki,!1),De(this,lo,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,qi,t.client),De(this,Rr,oe(this,qi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Li,k_(this.options)),this.state=t.state??oe(this,Li),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return oe(this,Na)}get promise(){var t;return(t=oe(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...oe(this,lo),...t},t!=null&&t._type&&De(this,Na,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=k_(this.options);r.data!==void 0&&(this.setState(q_(r.data,r.dataUpdatedAt)),De(this,Li,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&oe(this,Rr).remove(this)}setData(t,r){const n=Iy(this.state.data,t,this.options);return tt(this,Tr,bn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){tt(this,Tr,bn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=oe(this,Ht))==null?void 0:n.promise;return(i=oe(this,Ht))==null||i.cancel(t),r?r.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return oe(this,Li)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Sr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gw(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=oe(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=oe(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),oe(this,Rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(oe(this,Ht)&&(oe(this,ki)||tt(this,Tr,Rw).call(this)?oe(this,Ht).cancel({revert:!0}):oe(this,Ht).cancelRetry()),this.scheduleGc()),oe(this,Rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Tr,bn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,E,A,R,O,f,v;if(this.state.fetchStatus!=="idle"&&((l=oe(this,Ht))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(oe(this,Ht))return oe(this,Ht).continueRetry(),oe(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(De(this,ki,!0),n.signal)})},a=()=>{const b=Ew(this.options,r),T=(()=>{const w={client:oe(this,qi),queryKey:this.queryKey,meta:this.meta};return i(w),w})();return De(this,ki,!1),this.options.persister?this.options.persister(b,T,this):b(T)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:oe(this,qi),state:this.state,fetchFn:a};return i(b),b})(),u=oe(this,Na)==="infinite"?$M(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),De(this,Pa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&tt(this,Tr,bn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),De(this,Ht,Tw({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof Ay&&b.revert&&this.setState({...oe(this,Pa),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{tt(this,Tr,bn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{tt(this,Tr,bn).call(this,{type:"pause"})},onContinue:()=>{tt(this,Tr,bn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await oe(this,Ht).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=oe(this,Rr).config).onSuccess)==null||p.call(m,b,this),(A=(E=oe(this,Rr).config).onSettled)==null||A.call(E,b,this.state.error,this),b}catch(b){if(b instanceof Ay){if(b.silent)return oe(this,Ht).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw tt(this,Tr,bn).call(this,{type:"error",error:b}),(O=(R=oe(this,Rr).config).onError)==null||O.call(R,b,this),(v=(f=oe(this,Rr).config).onSettled)==null||v.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Na=new WeakMap,Li=new WeakMap,Pa=new WeakMap,Rr=new WeakMap,qi=new WeakMap,Ht=new WeakMap,lo=new WeakMap,ki=new WeakMap,Tr=new WeakSet,Rw=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},bn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Aw(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...q_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,Pa,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),oe(this,Rr).notify({query:this,type:"updated",action:t})})},ow);function Aw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function k_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mr,it,fo,ur,Bi,Ma,In,Vn,po,Ca,Da,Ui,Fi,Hn,ja,ht,Rs,Oy,Ny,Py,My,Cy,Dy,jy,ww,uw,qM=(uw=class extends yo{constructor(t,r){super();Ge(this,ht);Ge(this,mr);Ge(this,it);Ge(this,fo);Ge(this,ur);Ge(this,Bi);Ge(this,Ma);Ge(this,In);Ge(this,Vn);Ge(this,po);Ge(this,Ca);Ge(this,Da);Ge(this,Ui);Ge(this,Fi);Ge(this,Hn);Ge(this,ja,new Set);this.options=r,De(this,mr,t),De(this,Vn,null),De(this,In,Ry()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(oe(this,it).addObserver(this),B_(oe(this,it),this.options)?tt(this,ht,Rs).call(this):this.updateResult(),tt(this,ht,My).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $y(oe(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $y(oe(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,ht,Cy).call(this),tt(this,ht,Dy).call(this),oe(this,it).removeObserver(this)}setOptions(t){const r=this.options,n=oe(this,it);if(this.options=oe(this,mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sr(this.options.enabled,oe(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,ht,jy).call(this),oe(this,it).setOptions(this.options),r._defaulted&&!Ty(this.options,r)&&oe(this,mr).getQueryCache().notify({type:"observerOptionsUpdated",query:oe(this,it),observer:this});const i=this.hasListeners();i&&U_(oe(this,it),n,this.options,r)&&tt(this,ht,Rs).call(this),this.updateResult(),i&&(oe(this,it)!==n||Sr(this.options.enabled,oe(this,it))!==Sr(r.enabled,oe(this,it))||Yn(this.options.staleTime,oe(this,it))!==Yn(r.staleTime,oe(this,it)))&&tt(this,ht,Oy).call(this);const a=tt(this,ht,Ny).call(this);i&&(oe(this,it)!==n||Sr(this.options.enabled,oe(this,it))!==Sr(r.enabled,oe(this,it))||a!==oe(this,Hn))&&tt(this,ht,Py).call(this,a)}getOptimisticResult(t){const r=oe(this,mr).getQueryCache().build(oe(this,mr),t),n=this.createResult(r,t);return BM(this,n)&&(De(this,ur,n),De(this,Ma,this.options),De(this,Bi,oe(this,it).state)),n}getCurrentResult(){return oe(this,ur)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&oe(this,In).status==="pending"&&oe(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){oe(this,ja).add(t)}getCurrentQuery(){return oe(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=oe(this,mr).defaultQueryOptions(t),n=oe(this,mr).getQueryCache().build(oe(this,mr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return tt(this,ht,Rs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),oe(this,ur)))}createResult(t,r){var B;const n=oe(this,it),i=this.options,a=oe(this,ur),s=oe(this,Bi),o=oe(this,Ma),l=t!==n?t.state:oe(this,fo),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const J=this.hasListeners(),K=!J&&B_(t,r),z=J&&U_(t,n,r,i);(K||z)&&(d={...d,...Aw(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:A,status:R}=d;p=d.data;let O=!1;if(r.placeholderData!==void 0&&p===void 0&&R==="pending"){let J;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(J=a.data,O=!0):J=typeof r.placeholderData=="function"?r.placeholderData((B=oe(this,Da))==null?void 0:B.state.data,oe(this,Da)):r.placeholderData,J!==void 0&&(R="success",p=Iy(a==null?void 0:a.data,J,r),m=!0)}if(r.select&&p!==void 0&&!O)if(a&&p===(s==null?void 0:s.data)&&r.select===oe(this,po))p=oe(this,Ca);else try{De(this,po,r.select),p=r.select(p),p=Iy(a==null?void 0:a.data,p,r),De(this,Ca,p),De(this,Vn,null)}catch(J){De(this,Vn,J)}oe(this,Vn)&&(E=oe(this,Vn),p=oe(this,Ca),A=Date.now(),R="error");const f=d.fetchStatus==="fetching",v=R==="pending",b=R==="error",h=v&&f,T=p!==void 0,P={status:R,fetchStatus:d.fetchStatus,isPending:v,isSuccess:R==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:A,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!v,isLoadingError:b&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&T,isStale:fg(t,r),refetch:this.refetch,promise:oe(this,In),isEnabled:Sr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const J=P.data!==void 0,K=P.status==="error"&&!J,z=ue=>{K?ue.reject(P.error):J&&ue.resolve(P.data)},U=()=>{const ue=De(this,In,P.promise=Ry());z(ue)},F=oe(this,In);switch(F.status){case"pending":t.queryHash===n.queryHash&&z(F);break;case"fulfilled":(K||P.data!==F.value)&&U();break;case"rejected":(!K||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=oe(this,ur),r=this.createResult(oe(this,it),this.options);if(De(this,Bi,oe(this,it).state),De(this,Ma,this.options),oe(this,Bi).data!==void 0&&De(this,Da,oe(this,it)),Ty(r,t))return;De(this,ur,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!oe(this,ja).size)return!0;const s=new Set(a??oe(this,ja));return this.options.throwOnError&&s.add("error"),Object.keys(oe(this,ur)).some(o=>{const u=o;return oe(this,ur)[u]!==t[u]&&s.has(u)})};tt(this,ht,ww).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,ht,My).call(this)}},mr=new WeakMap,it=new WeakMap,fo=new WeakMap,ur=new WeakMap,Bi=new WeakMap,Ma=new WeakMap,In=new WeakMap,Vn=new WeakMap,po=new WeakMap,Ca=new WeakMap,Da=new WeakMap,Ui=new WeakMap,Fi=new WeakMap,Hn=new WeakMap,ja=new WeakMap,ht=new WeakSet,Rs=function(t){tt(this,ht,jy).call(this);let r=oe(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(hr)),r},Oy=function(){tt(this,ht,Cy).call(this);const t=Yn(this.options.staleTime,oe(this,it));if(to.isServer()||oe(this,ur).isStale||!by(t))return;const n=gw(oe(this,ur).dataUpdatedAt,t)+1;De(this,Ui,Di.setTimeout(()=>{oe(this,ur).isStale||this.updateResult()},n))},Ny=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(oe(this,it)):this.options.refetchInterval)??!1},Py=function(t){tt(this,ht,Dy).call(this),De(this,Hn,t),!(to.isServer()||Sr(this.options.enabled,oe(this,it))===!1||!by(oe(this,Hn))||oe(this,Hn)===0)&&De(this,Fi,Di.setInterval(()=>{(this.options.refetchIntervalInBackground||cg.isFocused())&&tt(this,ht,Rs).call(this)},oe(this,Hn)))},My=function(){tt(this,ht,Oy).call(this),tt(this,ht,Py).call(this,tt(this,ht,Ny).call(this))},Cy=function(){oe(this,Ui)!==void 0&&(Di.clearTimeout(oe(this,Ui)),De(this,Ui,void 0))},Dy=function(){oe(this,Fi)!==void 0&&(Di.clearInterval(oe(this,Fi)),De(this,Fi,void 0))},jy=function(){const t=oe(this,mr).getQueryCache().build(oe(this,mr),this.options);if(t===oe(this,it))return;const r=oe(this,it);De(this,it,t),De(this,fo,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ww=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(oe(this,ur))}),oe(this,mr).getQueryCache().notify({query:oe(this,it),type:"observerResultsUpdated"})})},uw);function kM(e,t){return Sr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Sr(t.retryOnMount,e)===!1)}function B_(e,t){return kM(e,t)||e.state.data!==void 0&&$y(e,t,t.refetchOnMount)}function $y(e,t,r){if(Sr(t.enabled,e)!==!1&&Yn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&fg(e,t)}return!1}function U_(e,t,r,n){return(e!==t||Sr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&fg(e,r)}function fg(e,t){return Sr(t.enabled,e)!==!1&&e.isStaleByTime(Yn(t.staleTime,e))}function BM(e,t){return!Ty(e.getCurrentResult(),t)}var mo,tn,nr,Vi,rn,Ln,cw,UM=(cw=class extends Sw{constructor(t){super();Ge(this,rn);Ge(this,mo);Ge(this,tn);Ge(this,nr);Ge(this,Vi);De(this,mo,t.client),this.mutationId=t.mutationId,De(this,nr,t.mutationCache),De(this,tn,[]),this.state=t.state||FM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){oe(this,tn).includes(t)||(oe(this,tn).push(t),this.clearGcTimeout(),oe(this,nr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,tn,oe(this,tn).filter(r=>r!==t)),this.scheduleGc(),oe(this,nr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){oe(this,tn).length||(this.state.status==="pending"?this.scheduleGc():oe(this,nr).remove(this))}continue(){var t;return((t=oe(this,Vi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,m,p,E,A,R,O,f,v,b,h,T,w;const r=()=>{tt(this,rn,Ln).call(this,{type:"continue"})},n={client:oe(this,mo),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Vi,Tw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,B)=>{tt(this,rn,Ln).call(this,{type:"failed",failureCount:P,error:B})},onPause:()=>{tt(this,rn,Ln).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>oe(this,nr).canRun(this)}));const i=this.state.status==="pending",a=!oe(this,Vi).canStart();try{if(i)r();else{tt(this,rn,Ln).call(this,{type:"pending",variables:t,isPaused:a}),oe(this,nr).config.onMutate&&await oe(this,nr).config.onMutate(t,this,n);const B=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));B!==this.state.context&&tt(this,rn,Ln).call(this,{type:"pending",context:B,variables:t,isPaused:a})}const P=await oe(this,Vi).start();return await((l=(u=oe(this,nr).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((p=(m=oe(this,nr).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,P,null,t,this.state.context,n)),tt(this,rn,Ln).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(R=oe(this,nr).config).onError)==null?void 0:O.call(R,P,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((v=(f=this.options).onError)==null?void 0:v.call(f,P,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((h=(b=oe(this,nr).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((w=(T=this.options).onSettled)==null?void 0:w.call(T,void 0,P,t,this.state.context,n))}catch(B){Promise.reject(B)}throw tt(this,rn,Ln).call(this,{type:"error",error:P}),P}finally{oe(this,nr).runNext(this)}}},mo=new WeakMap,tn=new WeakMap,nr=new WeakMap,Vi=new WeakMap,rn=new WeakSet,Ln=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Kt.batch(()=>{oe(this,tn).forEach(n=>{n.onMutationUpdate(t)}),oe(this,nr).notify({mutation:this,type:"updated",action:t})})},cw);function FM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rn,qr,ho,lw,VM=(lw=class extends yo{constructor(t={}){super();Ge(this,Rn);Ge(this,qr);Ge(this,ho);this.config=t,De(this,Rn,new Set),De(this,qr,new Map),De(this,ho,0)}build(t,r,n){const i=new UM({client:t,mutationCache:this,mutationId:++Eu(this,ho)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){oe(this,Rn).add(t);const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r);n?n.push(t):oe(this,qr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(oe(this,Rn).delete(t)){const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&oe(this,qr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=vu(t);if(typeof r=="string"){const i=(n=oe(this,qr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{oe(this,Rn).forEach(t=>{this.notify({type:"removed",mutation:t})}),oe(this,Rn).clear(),oe(this,qr).clear()})}getAll(){return Array.from(oe(this,Rn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>j_(r,n))}findAll(t={}){return this.getAll().filter(r=>j_(t,r))}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(hr))))}},Rn=new WeakMap,qr=new WeakMap,ho=new WeakMap,lw);function vu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var nn,dw,HM=(dw=class extends yo{constructor(t={}){super();Ge(this,nn);this.config=t,De(this,nn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??lg(i,r);let s=this.get(a);return s||(s=new LM({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){oe(this,nn).has(t.queryHash)||(oe(this,nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=oe(this,nn).get(t.queryHash);r&&(t.destroy(),r===t&&oe(this,nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return oe(this,nn).get(t)}getAll(){return[...oe(this,nn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>D_(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>D_(t,n)):r}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nn=new WeakMap,dw),jt,Gn,zn,$a,La,Wn,qa,ka,fw,GM=(fw=class{constructor(e={}){Ge(this,jt);Ge(this,Gn);Ge(this,zn);Ge(this,$a);Ge(this,La);Ge(this,Wn);Ge(this,qa);Ge(this,ka);De(this,jt,e.queryCache||new HM),De(this,Gn,e.mutationCache||new VM),De(this,zn,e.defaultOptions||{}),De(this,$a,new Map),De(this,La,new Map),De(this,Wn,0)}mount(){Eu(this,Wn)._++,oe(this,Wn)===1&&(De(this,qa,cg.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,jt).onFocus())})),De(this,ka,Wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,jt).onOnline())})))}unmount(){var e,t;Eu(this,Wn)._--,oe(this,Wn)===0&&((e=oe(this,qa))==null||e.call(this),De(this,qa,void 0),(t=oe(this,ka))==null||t.call(this),De(this,ka,void 0))}isFetching(e){return oe(this,jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return oe(this,Gn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=oe(this,jt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=oe(this,jt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return oe(this,jt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=oe(this,jt).get(n.queryHash),a=i==null?void 0:i.state.data,s=RM(t,a);if(s!==void 0)return oe(this,jt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>oe(this,jt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=oe(this,jt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=oe(this,jt);Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=oe(this,jt);return Kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Kt.batch(()=>oe(this,jt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(e,t={}){return Kt.batch(()=>(oe(this,jt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Kt.batch(()=>oe(this,jt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(hr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=oe(this,jt).build(this,t);return r.isStaleByTime(Yn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hr).catch(hr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hr).catch(hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Wc.isOnline()?oe(this,Gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return oe(this,jt)}getMutationCache(){return oe(this,Gn)}getDefaultOptions(){return oe(this,zn)}setDefaultOptions(e){De(this,zn,e)}setQueryDefaults(e,t){oe(this,$a).set(xs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...oe(this,$a).values()],r={};return t.forEach(n=>{eo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){oe(this,La).set(xs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...oe(this,La).values()],r={};return t.forEach(n=>{eo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...oe(this,zn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...oe(this,zn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){oe(this,jt).clear(),oe(this,Gn).clear()}},jt=new WeakMap,Gn=new WeakMap,zn=new WeakMap,$a=new WeakMap,La=new WeakMap,Wn=new WeakMap,qa=new WeakMap,ka=new WeakMap,fw),Ow=Ye.createContext(void 0),zM=e=>{const t=Ye.useContext(Ow);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},WM=({client:e,children:t})=>(Ye.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),fe.jsx(Ow.Provider,{value:e,children:t})),Nw=Ye.createContext(!1),YM=()=>Ye.useContext(Nw);Nw.Provider;function KM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JM=Ye.createContext(KM()),XM=()=>Ye.useContext(JM),QM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?vw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},ZM=e=>{Ye.useEffect(()=>{e.clearReset()},[e])},xM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||vw(r,[e.error,n])),eC=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},tC=(e,t)=>e.isLoading&&e.isFetching&&!t,rC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,F_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function nC(e,t,r){var p,E,A,R;const n=YM(),i=XM(),a=zM(),s=a.defaultQueryOptions(e);(E=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||E.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,eC(s),QM(s,i,o),ZM(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Ye.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(Ye.useSyncExternalStore(Ye.useCallback(O=>{const f=m?c.subscribe(Kt.batchCalls(O)):hr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Ye.useEffect(()=>{c.setOptions(s)},[s,c]),rC(s,d))throw F_(s,c,i);if(xM({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((R=(A=a.getDefaultOptions().queries)==null?void 0:A._experimental_afterQuery)==null||R.call(A,s,d),s.experimental_prefetchInRender&&!to.isServer()&&tC(d,n)){const O=l?F_(s,c,i):o==null?void 0:o.promise;O==null||O.catch(hr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function tl(e,t){return nC(e,qM)}const iC="modulepreload",aC=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28749696583.commit-1ceed46/"+e},V_={},Xt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=aC(l),l in V_)return;V_[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":iC,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,E)=>{m.addEventListener("load",p),m.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},Pw=Object.prototype.toString;function pg(e){switch(Pw.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return An(e,Error)}}function za(e,t){return Pw.call(e)===`[object ${t}]`}function mg(e){return za(e,"ErrorEvent")}function H_(e){return za(e,"DOMError")}function sC(e){return za(e,"DOMException")}function on(e){return za(e,"String")}function hg(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function yg(e){return e===null||hg(e)||typeof e!="object"&&typeof e!="function"}function Gi(e){return za(e,"Object")}function rl(e){return typeof Event<"u"&&An(e,Event)}function oC(e){return typeof Element<"u"&&An(e,Element)}function uC(e){return za(e,"RegExp")}function Wa(e){return!!(e&&e.then&&typeof e.then=="function")}function cC(e){return Gi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Mw(e){return typeof e=="number"&&e!==e}function An(e,t){try{return e instanceof t}catch{return!1}}function Cw(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ba(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function G_(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{Cw(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function lC(e,t,r=!1){return on(e)?uC(t)?t.test(e):on(t)?r?e===t:e.includes(t):!1:!1}function go(e,t=[],r=!1){return t.some(n=>lC(e,n,r))}function dC(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!An(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=fC(Ly(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Ly(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(An(n[i],Error)){z_(s,o);const l=e(t,n[i]),c=u.length;W_(l,i,c,o),u=Ly(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(An(l,Error)){z_(s,o);const d=e(t,l),m=u.length;W_(d,`errors[${c}]`,m,o),u=Ly(e,t,r,l,i,[d,...u],d,m)}}),u}function z_(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function W_(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function fC(e,t){return e.map(r=>(r.value&&(r.value=ba(r.value,t)),r))}function bu(e){return e&&e.Math==Math?e:void 0}const at=typeof globalThis=="object"&&bu(globalThis)||typeof window=="object"&&bu(window)||typeof self=="object"&&bu(self)||typeof zc=="object"&&bu(zc)||(function(){return this})()||{};function gg(){return at}function nl(e,t,r){const n=r||at,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Ta=gg(),pC=80;function Ba(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||pC;for(;r&&a++<n&&(l=mC(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function mC(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Ta.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&on(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function hC(){try{return Ta.document.location.href}catch{return""}}function yC(e){return Ta.document&&Ta.document.querySelector?Ta.document.querySelector(e):null}function Dw(e){if(!Ta.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Ya=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,gC="Sentry Logger ",qy=["debug","info","warn","error","log","assert","trace"],Yc={};function _o(e){if(!("console"in at))return e();const t=at.console,r={},n=Object.keys(Yc);n.forEach(i=>{const a=Yc[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function _C(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ya?qy.forEach(r=>{t[r]=(...n)=>{e&&_o(()=>{at.console[r](`${gC}[${r}]:`,...n)})}}):qy.forEach(r=>{t[r]=()=>{}}),t}const Re=_C(),EC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function vC(e){return e==="http"||e==="https"}function Qi(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function bC(e){const t=EC.exec(e);if(!t){_o(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return jw({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function jw(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function TC(e){if(!Ya)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?vC(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function $w(e){const t=typeof e=="string"?bC(e):jw(e);if(!(!t||!TC(t)))return t}class an extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function Jt(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&Lw(i,n),e[t]=i}function zi(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Ya&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Lw(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,zi(e,"__sentry_original__",t)}catch{}}function _g(e){return e.__sentry_original__}function SC(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function qw(e){if(pg(e))return{message:e.message,name:e.name,stack:e.stack,...K_(e)};if(rl(e)){const t={type:e.type,target:Y_(e.target),currentTarget:Y_(e.currentTarget),...K_(e)};return typeof CustomEvent<"u"&&An(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Y_(e){try{return oC(e)?Ba(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function K_(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function IC(e,t=40){const r=Object.keys(qw(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return ba(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:ba(i,t)}return""}function kt(e){return ky(e,new Map)}function ky(e,t){if(RC(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=ky(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(ky(i,t))}),n}return e}function RC(e){if(!Gi(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const kw=50,J_=/\(error: (.*)\)/,X_=/captureMessage|captureException/;function Bw(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D8ALyBMQ.js","assets/react-E8ng6RF2.js","assets/network-C9miAzGt.js","assets/SvgIcon-D2AubmSV.js","assets/generateUtilityClasses-68H80U2m.js","assets/ethers-DbXGgxrh.js","assets/index-POoM1fB4.js","assets/index-CeSnh-cF.js","assets/index-B5lBgsVo.js","assets/CircularProgress-ePyo1lbd.js","assets/TradeService-BK-xq9ht.js","assets/index-DKewLOZ7.js","assets/Assets-FMrABFH_.js","assets/SkeletonCards-yV2mi4oc.js","assets/LoadMore-DB6TwvRe.js","assets/useInfiniteGrid-BdBxLsy8.js","assets/Market-Cr-J1I9u.js","assets/mana-rate-Boaa1HMt.js","assets/buy-_5Wro-EH.js","assets/buy-gasless-Da6cXp5w.js","assets/ItemDetail-Sn2B-MA3.js","assets/ItemDetail-yNwYjl_l.css","assets/Collection-DJjtkyI0.js","assets/collection-Dj1PGTaS.js","assets/collection-Ds5shVfK.css","assets/Creator-Cd6xMnQk.js","assets/MyAssets-CpoF2iAy.js","assets/import-BEVHrqgg.js","assets/wallet-kind-I4wsazAy.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-b3vHnYMr.js","assets/MyPurchases-DVXmppAu.js","assets/ImportListings-CXvHkADP.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-COyAPJn1.js","assets/GetCredits-BC7Z51_v.js","assets/Success-CNdczbFT.js","assets/NotFound-BK3mhtdy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var dM=Object.defineProperty;var M_=e=>{throw TypeError(e)};var fM=(e,t,r)=>t in e?dM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Cn=(e,t,r)=>fM(e,typeof t!="symbol"?t+"":t,r),kl=(e,t,r)=>t.has(e)||M_("Cannot "+r);var oe=(e,t,r)=>(kl(e,t,"read from private field"),r?r.call(e):t.get(e)),Ge=(e,t,r)=>t.has(e)?M_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),De=(e,t,r,n)=>(kl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=(e,t,r)=>(kl(e,t,"access private method"),r);var Eu=(e,t,r,n)=>({set _(i){De(e,t,i,r)},get _(){return oe(e,t,n)}});import{r as Ye,j as fe,l as pw,g as mw,R as hw,c as vy,L as Gc,b as ug,m as Dn,d as pM,n as mM,o as sr,N as hM,p as yM,B as gM}from"./react-E8ng6RF2.js";import{g as zc,p as Uc,W as _M,m as EM,h as C_,f as yw}from"./ethers-DbXGgxrh.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var yo=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(){}},ji,Bn,Aa,nw,vM=(nw=class extends yo{constructor(){super();Ge(this,ji);Ge(this,Bn);Ge(this,Aa);De(this,Aa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){oe(this,Bn)||this.setEventListener(oe(this,Aa))}onUnsubscribe(){var t;this.hasListeners()||((t=oe(this,Bn))==null||t.call(this),De(this,Bn,void 0))}setEventListener(t){var r;De(this,Aa,t),(r=oe(this,Bn))==null||r.call(this),De(this,Bn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){oe(this,ji)!==t&&(De(this,ji,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof oe(this,ji)=="boolean"?oe(this,ji):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ji=new WeakMap,Bn=new WeakMap,Aa=new WeakMap,nw),cg=new vM,bM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Un,og,iw,TM=(iw=class{constructor(){Ge(this,Un,bM);Ge(this,og,!1)}setTimeoutProvider(e){De(this,Un,e)}setTimeout(e,t){return oe(this,Un).setTimeout(e,t)}clearTimeout(e){oe(this,Un).clearTimeout(e)}setInterval(e,t){return oe(this,Un).setInterval(e,t)}clearInterval(e){oe(this,Un).clearInterval(e)}},Un=new WeakMap,og=new WeakMap,iw),Di=new TM;function SM(e){setTimeout(e,0)}var IM=typeof window>"u"||"Deno"in globalThis;function hr(){}function RM(e,t){return typeof e=="function"?e(t):e}function by(e){return typeof e=="number"&&e>=0&&e!==1/0}function gw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yn(e,t){return typeof e=="function"?e(t):e}function Sr(e,t){return typeof e=="function"?e(t):e}function D_(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==lg(s,t.options))return!1}else if(!eo(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function j_(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(xs(t.options.mutationKey)!==xs(a))return!1}else if(!eo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function lg(e,t){return((t==null?void 0:t.queryKeyHashFn)||xs)(e)}function xs(e){return JSON.stringify(e,(t,r)=>Sy(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>eo(e[r],t[r])):!1}var AM=Object.prototype.hasOwnProperty;function _w(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=$_(e)&&$_(t);if(!n&&!(Sy(e)&&Sy(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:AM.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const E=_w(m,p,r+1);u[d]=E,E===m&&l++}return a===o&&l===a?e:u}function Ty(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function $_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sy(e){if(!L_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!L_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L_(e){return Object.prototype.toString.call(e)==="[object Object]"}function wM(e){return new Promise(t=>{Di.setTimeout(t,e)})}function Iy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?_w(e,t):t}function C3(e){return e}function OM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function NM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var dg=Symbol();function Ew(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===dg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vw(e,t){return typeof e=="function"?e(...t):!!e}function PM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var to=(()=>{let e=()=>IM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ry(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var MM=SM;function CM(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=MM;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Kt=CM(),wa,Fn,Oa,aw,DM=(aw=class extends yo{constructor(){super();Ge(this,wa,!0);Ge(this,Fn);Ge(this,Oa);De(this,Oa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){oe(this,Fn)||this.setEventListener(oe(this,Oa))}onUnsubscribe(){var t;this.hasListeners()||((t=oe(this,Fn))==null||t.call(this),De(this,Fn,void 0))}setEventListener(t){var r;De(this,Oa,t),(r=oe(this,Fn))==null||r.call(this),De(this,Fn,t(this.setOnline.bind(this)))}setOnline(t){oe(this,wa)!==t&&(De(this,wa,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return oe(this,wa)}},wa=new WeakMap,Fn=new WeakMap,Oa=new WeakMap,aw),Wc=new DM;function jM(e){return Math.min(1e3*2**e,3e4)}function bw(e){return(e??"online")==="online"?Wc.isOnline():!0}var Ay=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Tw(e){let t=!1,r=0,n;const i=Ry(),a=()=>i.status!=="pending",s=A=>{var R;if(!a()){const O=new Ay(A);m(O),(R=e.onCancel)==null||R.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>cg.isFocused()&&(e.networkMode==="always"||Wc.isOnline())&&e.canRun(),c=()=>bw(e.networkMode)&&e.canRun(),d=A=>{a()||(n==null||n(),i.resolve(A))},m=A=>{a()||(n==null||n(),i.reject(A))},p=()=>new Promise(A=>{var R;n=O=>{(a()||l())&&A(O)},(R=e.onPause)==null||R.call(e)}).then(()=>{var A;n=void 0,a()||(A=e.onContinue)==null||A.call(e)}),E=()=>{if(a())return;let A;const R=r===0?e.initialPromise:void 0;try{A=R??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(d).catch(O=>{var T;if(a())return;const f=e.retry??(to.isServer()?0:3),v=e.retryDelay??jM,b=typeof v=="function"?v(r,O):v,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,O);if(t||!h){m(O);return}r++,(T=e.onFail)==null||T.call(e,r,O),wM(b).then(()=>l()?void 0:p()).then(()=>{t?m(O):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?E():p().then(E),i)}}var $i,sw,Sw=(sw=class{constructor(){Ge(this,$i)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),by(this.gcTime)&&De(this,$i,Di.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(to.isServer()?1/0:300*1e3))}clearGcTimeout(){oe(this,$i)!==void 0&&(Di.clearTimeout(oe(this,$i)),De(this,$i,void 0))}},$i=new WeakMap,sw);function $M(e){return{onFetch:(t,r)=>{var c,d,m,p,E;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let A=!1;const R=v=>{PM(v,()=>t.signal,()=>A=!0)},O=Ew(t.options,t.fetchOptions),f=async(v,b,h)=>{if(A)return Promise.reject(t.signal.reason);if(b==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return R(K),K})(),P=await O(w),{maxPages:B}=t.options,J=h?NM:OM;return{pages:J(v.pages,P,B),pageParams:J(v.pageParams,b,B)}};if(i&&a.length){const v=i==="backward",b=v?Iw:wy,h={pages:a,pageParams:s},T=b(n,h);o=await f(h,T,v)}else{const v=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:wy(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<v)}return o};t.options.persister?t.fetchFn=()=>{var A,R;return(R=(A=t.options).persister)==null?void 0:R.call(A,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function wy(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Iw(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function D3(e,t){return t?wy(e,t)!=null:!1}function j3(e,t){return!t||!e.getPreviousPageParam?!1:Iw(e,t)!=null}var Na,Li,Pa,Rr,qi,Ht,lo,ki,Tr,Rw,bn,ow,LM=(ow=class extends Sw{constructor(t){super();Ge(this,Tr);Ge(this,Na);Ge(this,Li);Ge(this,Pa);Ge(this,Rr);Ge(this,qi);Ge(this,Ht);Ge(this,lo);Ge(this,ki);De(this,ki,!1),De(this,lo,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,qi,t.client),De(this,Rr,oe(this,qi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,Li,k_(this.options)),this.state=t.state??oe(this,Li),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return oe(this,Na)}get promise(){var t;return(t=oe(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...oe(this,lo),...t},t!=null&&t._type&&De(this,Na,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=k_(this.options);r.data!==void 0&&(this.setState(q_(r.data,r.dataUpdatedAt)),De(this,Li,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&oe(this,Rr).remove(this)}setData(t,r){const n=Iy(this.state.data,t,this.options);return tt(this,Tr,bn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){tt(this,Tr,bn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=oe(this,Ht))==null?void 0:n.promise;return(i=oe(this,Ht))==null||i.cancel(t),r?r.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return oe(this,Li)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Sr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gw(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=oe(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=oe(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),oe(this,Rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(oe(this,Ht)&&(oe(this,ki)||tt(this,Tr,Rw).call(this)?oe(this,Ht).cancel({revert:!0}):oe(this,Ht).cancelRetry()),this.scheduleGc()),oe(this,Rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Tr,bn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,E,A,R,O,f,v;if(this.state.fetchStatus!=="idle"&&((l=oe(this,Ht))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(oe(this,Ht))return oe(this,Ht).continueRetry(),oe(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(De(this,ki,!0),n.signal)})},a=()=>{const b=Ew(this.options,r),T=(()=>{const w={client:oe(this,qi),queryKey:this.queryKey,meta:this.meta};return i(w),w})();return De(this,ki,!1),this.options.persister?this.options.persister(b,T,this):b(T)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:oe(this,qi),state:this.state,fetchFn:a};return i(b),b})(),u=oe(this,Na)==="infinite"?$M(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),De(this,Pa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&tt(this,Tr,bn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),De(this,Ht,Tw({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof Ay&&b.revert&&this.setState({...oe(this,Pa),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{tt(this,Tr,bn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{tt(this,Tr,bn).call(this,{type:"pause"})},onContinue:()=>{tt(this,Tr,bn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await oe(this,Ht).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=oe(this,Rr).config).onSuccess)==null||p.call(m,b,this),(A=(E=oe(this,Rr).config).onSettled)==null||A.call(E,b,this.state.error,this),b}catch(b){if(b instanceof Ay){if(b.silent)return oe(this,Ht).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw tt(this,Tr,bn).call(this,{type:"error",error:b}),(O=(R=oe(this,Rr).config).onError)==null||O.call(R,b,this),(v=(f=oe(this,Rr).config).onSettled)==null||v.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Na=new WeakMap,Li=new WeakMap,Pa=new WeakMap,Rr=new WeakMap,qi=new WeakMap,Ht=new WeakMap,lo=new WeakMap,ki=new WeakMap,Tr=new WeakSet,Rw=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},bn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Aw(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...q_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,Pa,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),oe(this,Rr).notify({query:this,type:"updated",action:t})})},ow);function Aw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function k_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mr,it,fo,ur,Bi,Ma,In,Vn,po,Ca,Da,Ui,Fi,Hn,ja,ht,Rs,Oy,Ny,Py,My,Cy,Dy,jy,ww,uw,qM=(uw=class extends yo{constructor(t,r){super();Ge(this,ht);Ge(this,mr);Ge(this,it);Ge(this,fo);Ge(this,ur);Ge(this,Bi);Ge(this,Ma);Ge(this,In);Ge(this,Vn);Ge(this,po);Ge(this,Ca);Ge(this,Da);Ge(this,Ui);Ge(this,Fi);Ge(this,Hn);Ge(this,ja,new Set);this.options=r,De(this,mr,t),De(this,Vn,null),De(this,In,Ry()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(oe(this,it).addObserver(this),B_(oe(this,it),this.options)?tt(this,ht,Rs).call(this):this.updateResult(),tt(this,ht,My).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $y(oe(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $y(oe(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,ht,Cy).call(this),tt(this,ht,Dy).call(this),oe(this,it).removeObserver(this)}setOptions(t){const r=this.options,n=oe(this,it);if(this.options=oe(this,mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sr(this.options.enabled,oe(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,ht,jy).call(this),oe(this,it).setOptions(this.options),r._defaulted&&!Ty(this.options,r)&&oe(this,mr).getQueryCache().notify({type:"observerOptionsUpdated",query:oe(this,it),observer:this});const i=this.hasListeners();i&&U_(oe(this,it),n,this.options,r)&&tt(this,ht,Rs).call(this),this.updateResult(),i&&(oe(this,it)!==n||Sr(this.options.enabled,oe(this,it))!==Sr(r.enabled,oe(this,it))||Yn(this.options.staleTime,oe(this,it))!==Yn(r.staleTime,oe(this,it)))&&tt(this,ht,Oy).call(this);const a=tt(this,ht,Ny).call(this);i&&(oe(this,it)!==n||Sr(this.options.enabled,oe(this,it))!==Sr(r.enabled,oe(this,it))||a!==oe(this,Hn))&&tt(this,ht,Py).call(this,a)}getOptimisticResult(t){const r=oe(this,mr).getQueryCache().build(oe(this,mr),t),n=this.createResult(r,t);return BM(this,n)&&(De(this,ur,n),De(this,Ma,this.options),De(this,Bi,oe(this,it).state)),n}getCurrentResult(){return oe(this,ur)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&oe(this,In).status==="pending"&&oe(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){oe(this,ja).add(t)}getCurrentQuery(){return oe(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=oe(this,mr).defaultQueryOptions(t),n=oe(this,mr).getQueryCache().build(oe(this,mr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return tt(this,ht,Rs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),oe(this,ur)))}createResult(t,r){var B;const n=oe(this,it),i=this.options,a=oe(this,ur),s=oe(this,Bi),o=oe(this,Ma),l=t!==n?t.state:oe(this,fo),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const J=this.hasListeners(),K=!J&&B_(t,r),z=J&&U_(t,n,r,i);(K||z)&&(d={...d,...Aw(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:A,status:R}=d;p=d.data;let O=!1;if(r.placeholderData!==void 0&&p===void 0&&R==="pending"){let J;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(J=a.data,O=!0):J=typeof r.placeholderData=="function"?r.placeholderData((B=oe(this,Da))==null?void 0:B.state.data,oe(this,Da)):r.placeholderData,J!==void 0&&(R="success",p=Iy(a==null?void 0:a.data,J,r),m=!0)}if(r.select&&p!==void 0&&!O)if(a&&p===(s==null?void 0:s.data)&&r.select===oe(this,po))p=oe(this,Ca);else try{De(this,po,r.select),p=r.select(p),p=Iy(a==null?void 0:a.data,p,r),De(this,Ca,p),De(this,Vn,null)}catch(J){De(this,Vn,J)}oe(this,Vn)&&(E=oe(this,Vn),p=oe(this,Ca),A=Date.now(),R="error");const f=d.fetchStatus==="fetching",v=R==="pending",b=R==="error",h=v&&f,T=p!==void 0,P={status:R,fetchStatus:d.fetchStatus,isPending:v,isSuccess:R==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:A,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!v,isLoadingError:b&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&T,isStale:fg(t,r),refetch:this.refetch,promise:oe(this,In),isEnabled:Sr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const J=P.data!==void 0,K=P.status==="error"&&!J,z=ue=>{K?ue.reject(P.error):J&&ue.resolve(P.data)},U=()=>{const ue=De(this,In,P.promise=Ry());z(ue)},F=oe(this,In);switch(F.status){case"pending":t.queryHash===n.queryHash&&z(F);break;case"fulfilled":(K||P.data!==F.value)&&U();break;case"rejected":(!K||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=oe(this,ur),r=this.createResult(oe(this,it),this.options);if(De(this,Bi,oe(this,it).state),De(this,Ma,this.options),oe(this,Bi).data!==void 0&&De(this,Da,oe(this,it)),Ty(r,t))return;De(this,ur,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!oe(this,ja).size)return!0;const s=new Set(a??oe(this,ja));return this.options.throwOnError&&s.add("error"),Object.keys(oe(this,ur)).some(o=>{const u=o;return oe(this,ur)[u]!==t[u]&&s.has(u)})};tt(this,ht,ww).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,ht,My).call(this)}},mr=new WeakMap,it=new WeakMap,fo=new WeakMap,ur=new WeakMap,Bi=new WeakMap,Ma=new WeakMap,In=new WeakMap,Vn=new WeakMap,po=new WeakMap,Ca=new WeakMap,Da=new WeakMap,Ui=new WeakMap,Fi=new WeakMap,Hn=new WeakMap,ja=new WeakMap,ht=new WeakSet,Rs=function(t){tt(this,ht,jy).call(this);let r=oe(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(hr)),r},Oy=function(){tt(this,ht,Cy).call(this);const t=Yn(this.options.staleTime,oe(this,it));if(to.isServer()||oe(this,ur).isStale||!by(t))return;const n=gw(oe(this,ur).dataUpdatedAt,t)+1;De(this,Ui,Di.setTimeout(()=>{oe(this,ur).isStale||this.updateResult()},n))},Ny=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(oe(this,it)):this.options.refetchInterval)??!1},Py=function(t){tt(this,ht,Dy).call(this),De(this,Hn,t),!(to.isServer()||Sr(this.options.enabled,oe(this,it))===!1||!by(oe(this,Hn))||oe(this,Hn)===0)&&De(this,Fi,Di.setInterval(()=>{(this.options.refetchIntervalInBackground||cg.isFocused())&&tt(this,ht,Rs).call(this)},oe(this,Hn)))},My=function(){tt(this,ht,Oy).call(this),tt(this,ht,Py).call(this,tt(this,ht,Ny).call(this))},Cy=function(){oe(this,Ui)!==void 0&&(Di.clearTimeout(oe(this,Ui)),De(this,Ui,void 0))},Dy=function(){oe(this,Fi)!==void 0&&(Di.clearInterval(oe(this,Fi)),De(this,Fi,void 0))},jy=function(){const t=oe(this,mr).getQueryCache().build(oe(this,mr),this.options);if(t===oe(this,it))return;const r=oe(this,it);De(this,it,t),De(this,fo,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ww=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(oe(this,ur))}),oe(this,mr).getQueryCache().notify({query:oe(this,it),type:"observerResultsUpdated"})})},uw);function kM(e,t){return Sr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Sr(t.retryOnMount,e)===!1)}function B_(e,t){return kM(e,t)||e.state.data!==void 0&&$y(e,t,t.refetchOnMount)}function $y(e,t,r){if(Sr(t.enabled,e)!==!1&&Yn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&fg(e,t)}return!1}function U_(e,t,r,n){return(e!==t||Sr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&fg(e,r)}function fg(e,t){return Sr(t.enabled,e)!==!1&&e.isStaleByTime(Yn(t.staleTime,e))}function BM(e,t){return!Ty(e.getCurrentResult(),t)}var mo,tn,nr,Vi,rn,Ln,cw,UM=(cw=class extends Sw{constructor(t){super();Ge(this,rn);Ge(this,mo);Ge(this,tn);Ge(this,nr);Ge(this,Vi);De(this,mo,t.client),this.mutationId=t.mutationId,De(this,nr,t.mutationCache),De(this,tn,[]),this.state=t.state||FM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){oe(this,tn).includes(t)||(oe(this,tn).push(t),this.clearGcTimeout(),oe(this,nr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,tn,oe(this,tn).filter(r=>r!==t)),this.scheduleGc(),oe(this,nr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){oe(this,tn).length||(this.state.status==="pending"?this.scheduleGc():oe(this,nr).remove(this))}continue(){var t;return((t=oe(this,Vi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,m,p,E,A,R,O,f,v,b,h,T,w;const r=()=>{tt(this,rn,Ln).call(this,{type:"continue"})},n={client:oe(this,mo),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Vi,Tw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,B)=>{tt(this,rn,Ln).call(this,{type:"failed",failureCount:P,error:B})},onPause:()=>{tt(this,rn,Ln).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>oe(this,nr).canRun(this)}));const i=this.state.status==="pending",a=!oe(this,Vi).canStart();try{if(i)r();else{tt(this,rn,Ln).call(this,{type:"pending",variables:t,isPaused:a}),oe(this,nr).config.onMutate&&await oe(this,nr).config.onMutate(t,this,n);const B=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));B!==this.state.context&&tt(this,rn,Ln).call(this,{type:"pending",context:B,variables:t,isPaused:a})}const P=await oe(this,Vi).start();return await((l=(u=oe(this,nr).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((p=(m=oe(this,nr).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,P,null,t,this.state.context,n)),tt(this,rn,Ln).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(R=oe(this,nr).config).onError)==null?void 0:O.call(R,P,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((v=(f=this.options).onError)==null?void 0:v.call(f,P,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((h=(b=oe(this,nr).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((w=(T=this.options).onSettled)==null?void 0:w.call(T,void 0,P,t,this.state.context,n))}catch(B){Promise.reject(B)}throw tt(this,rn,Ln).call(this,{type:"error",error:P}),P}finally{oe(this,nr).runNext(this)}}},mo=new WeakMap,tn=new WeakMap,nr=new WeakMap,Vi=new WeakMap,rn=new WeakSet,Ln=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Kt.batch(()=>{oe(this,tn).forEach(n=>{n.onMutationUpdate(t)}),oe(this,nr).notify({mutation:this,type:"updated",action:t})})},cw);function FM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rn,qr,ho,lw,VM=(lw=class extends yo{constructor(t={}){super();Ge(this,Rn);Ge(this,qr);Ge(this,ho);this.config=t,De(this,Rn,new Set),De(this,qr,new Map),De(this,ho,0)}build(t,r,n){const i=new UM({client:t,mutationCache:this,mutationId:++Eu(this,ho)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){oe(this,Rn).add(t);const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r);n?n.push(t):oe(this,qr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(oe(this,Rn).delete(t)){const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&oe(this,qr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=vu(t);if(typeof r=="string"){const n=oe(this,qr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=vu(t);if(typeof r=="string"){const i=(n=oe(this,qr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{oe(this,Rn).forEach(t=>{this.notify({type:"removed",mutation:t})}),oe(this,Rn).clear(),oe(this,qr).clear()})}getAll(){return Array.from(oe(this,Rn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>j_(r,n))}findAll(t={}){return this.getAll().filter(r=>j_(t,r))}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(hr))))}},Rn=new WeakMap,qr=new WeakMap,ho=new WeakMap,lw);function vu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var nn,dw,HM=(dw=class extends yo{constructor(t={}){super();Ge(this,nn);this.config=t,De(this,nn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??lg(i,r);let s=this.get(a);return s||(s=new LM({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){oe(this,nn).has(t.queryHash)||(oe(this,nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=oe(this,nn).get(t.queryHash);r&&(t.destroy(),r===t&&oe(this,nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return oe(this,nn).get(t)}getAll(){return[...oe(this,nn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>D_(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>D_(t,n)):r}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nn=new WeakMap,dw),jt,Gn,zn,$a,La,Wn,qa,ka,fw,GM=(fw=class{constructor(e={}){Ge(this,jt);Ge(this,Gn);Ge(this,zn);Ge(this,$a);Ge(this,La);Ge(this,Wn);Ge(this,qa);Ge(this,ka);De(this,jt,e.queryCache||new HM),De(this,Gn,e.mutationCache||new VM),De(this,zn,e.defaultOptions||{}),De(this,$a,new Map),De(this,La,new Map),De(this,Wn,0)}mount(){Eu(this,Wn)._++,oe(this,Wn)===1&&(De(this,qa,cg.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,jt).onFocus())})),De(this,ka,Wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),oe(this,jt).onOnline())})))}unmount(){var e,t;Eu(this,Wn)._--,oe(this,Wn)===0&&((e=oe(this,qa))==null||e.call(this),De(this,qa,void 0),(t=oe(this,ka))==null||t.call(this),De(this,ka,void 0))}isFetching(e){return oe(this,jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return oe(this,Gn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=oe(this,jt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=oe(this,jt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return oe(this,jt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=oe(this,jt).get(n.queryHash),a=i==null?void 0:i.state.data,s=RM(t,a);if(s!==void 0)return oe(this,jt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>oe(this,jt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=oe(this,jt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=oe(this,jt);Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=oe(this,jt);return Kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Kt.batch(()=>oe(this,jt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(e,t={}){return Kt.batch(()=>(oe(this,jt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Kt.batch(()=>oe(this,jt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(hr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=oe(this,jt).build(this,t);return r.isStaleByTime(Yn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hr).catch(hr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hr).catch(hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Wc.isOnline()?oe(this,Gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return oe(this,jt)}getMutationCache(){return oe(this,Gn)}getDefaultOptions(){return oe(this,zn)}setDefaultOptions(e){De(this,zn,e)}setQueryDefaults(e,t){oe(this,$a).set(xs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...oe(this,$a).values()],r={};return t.forEach(n=>{eo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){oe(this,La).set(xs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...oe(this,La).values()],r={};return t.forEach(n=>{eo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...oe(this,zn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...oe(this,zn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){oe(this,jt).clear(),oe(this,Gn).clear()}},jt=new WeakMap,Gn=new WeakMap,zn=new WeakMap,$a=new WeakMap,La=new WeakMap,Wn=new WeakMap,qa=new WeakMap,ka=new WeakMap,fw),Ow=Ye.createContext(void 0),zM=e=>{const t=Ye.useContext(Ow);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},WM=({client:e,children:t})=>(Ye.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),fe.jsx(Ow.Provider,{value:e,children:t})),Nw=Ye.createContext(!1),YM=()=>Ye.useContext(Nw);Nw.Provider;function KM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JM=Ye.createContext(KM()),XM=()=>Ye.useContext(JM),QM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?vw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},ZM=e=>{Ye.useEffect(()=>{e.clearReset()},[e])},xM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||vw(r,[e.error,n])),eC=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},tC=(e,t)=>e.isLoading&&e.isFetching&&!t,rC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,F_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function nC(e,t,r){var p,E,A,R;const n=YM(),i=XM(),a=zM(),s=a.defaultQueryOptions(e);(E=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||E.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,eC(s),QM(s,i,o),ZM(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Ye.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(Ye.useSyncExternalStore(Ye.useCallback(O=>{const f=m?c.subscribe(Kt.batchCalls(O)):hr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Ye.useEffect(()=>{c.setOptions(s)},[s,c]),rC(s,d))throw F_(s,c,i);if(xM({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((R=(A=a.getDefaultOptions().queries)==null?void 0:A._experimental_afterQuery)==null||R.call(A,s,d),s.experimental_prefetchInRender&&!to.isServer()&&tC(d,n)){const O=l?F_(s,c,i):o==null?void 0:o.promise;O==null||O.catch(hr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function tl(e,t){return nC(e,qM)}const iC="modulepreload",aC=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28749698227.commit-0c859e2/"+e},V_={},Xt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=aC(l),l in V_)return;V_[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":iC,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,E)=>{m.addEventListener("load",p),m.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},Pw=Object.prototype.toString;function pg(e){switch(Pw.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return An(e,Error)}}function za(e,t){return Pw.call(e)===`[object ${t}]`}function mg(e){return za(e,"ErrorEvent")}function H_(e){return za(e,"DOMError")}function sC(e){return za(e,"DOMException")}function on(e){return za(e,"String")}function hg(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function yg(e){return e===null||hg(e)||typeof e!="object"&&typeof e!="function"}function Gi(e){return za(e,"Object")}function rl(e){return typeof Event<"u"&&An(e,Event)}function oC(e){return typeof Element<"u"&&An(e,Element)}function uC(e){return za(e,"RegExp")}function Wa(e){return!!(e&&e.then&&typeof e.then=="function")}function cC(e){return Gi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Mw(e){return typeof e=="number"&&e!==e}function An(e,t){try{return e instanceof t}catch{return!1}}function Cw(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ba(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function G_(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{Cw(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function lC(e,t,r=!1){return on(e)?uC(t)?t.test(e):on(t)?r?e===t:e.includes(t):!1:!1}function go(e,t=[],r=!1){return t.some(n=>lC(e,n,r))}function dC(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!An(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=fC(Ly(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Ly(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(An(n[i],Error)){z_(s,o);const l=e(t,n[i]),c=u.length;W_(l,i,c,o),u=Ly(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(An(l,Error)){z_(s,o);const d=e(t,l),m=u.length;W_(d,`errors[${c}]`,m,o),u=Ly(e,t,r,l,i,[d,...u],d,m)}}),u}function z_(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function W_(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function fC(e,t){return e.map(r=>(r.value&&(r.value=ba(r.value,t)),r))}function bu(e){return e&&e.Math==Math?e:void 0}const at=typeof globalThis=="object"&&bu(globalThis)||typeof window=="object"&&bu(window)||typeof self=="object"&&bu(self)||typeof zc=="object"&&bu(zc)||(function(){return this})()||{};function gg(){return at}function nl(e,t,r){const n=r||at,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Ta=gg(),pC=80;function Ba(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||pC;for(;r&&a++<n&&(l=mC(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function mC(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Ta.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&on(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function hC(){try{return Ta.document.location.href}catch{return""}}function yC(e){return Ta.document&&Ta.document.querySelector?Ta.document.querySelector(e):null}function Dw(e){if(!Ta.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Ya=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,gC="Sentry Logger ",qy=["debug","info","warn","error","log","assert","trace"],Yc={};function _o(e){if(!("console"in at))return e();const t=at.console,r={},n=Object.keys(Yc);n.forEach(i=>{const a=Yc[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function _C(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ya?qy.forEach(r=>{t[r]=(...n)=>{e&&_o(()=>{at.console[r](`${gC}[${r}]:`,...n)})}}):qy.forEach(r=>{t[r]=()=>{}}),t}const Re=_C(),EC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function vC(e){return e==="http"||e==="https"}function Qi(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function bC(e){const t=EC.exec(e);if(!t){_o(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return jw({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function jw(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function TC(e){if(!Ya)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?vC(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function $w(e){const t=typeof e=="string"?bC(e):jw(e);if(!(!t||!TC(t)))return t}class an extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function Jt(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&Lw(i,n),e[t]=i}function zi(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Ya&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Lw(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,zi(e,"__sentry_original__",t)}catch{}}function _g(e){return e.__sentry_original__}function SC(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function qw(e){if(pg(e))return{message:e.message,name:e.name,stack:e.stack,...K_(e)};if(rl(e)){const t={type:e.type,target:Y_(e.target),currentTarget:Y_(e.currentTarget),...K_(e)};return typeof CustomEvent<"u"&&An(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Y_(e){try{return oC(e)?Ba(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function K_(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function IC(e,t=40){const r=Object.keys(qw(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return ba(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:ba(i,t)}return""}function kt(e){return ky(e,new Map)}function ky(e,t){if(RC(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=ky(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(ky(i,t))}),n}return e}function RC(e){if(!Gi(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const kw=50,J_=/\(error: (.*)\)/,X_=/captureMessage|captureException/;function Bw(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
|
|
3
3
|
`);for(let s=n;s<a.length;s++){const o=a[s];if(o.length>1024)continue;const u=J_.test(o)?o.replace(J_,"$1"):o;if(!u.match(/\S*Error: /)){for(const l of t){const c=l(u);if(c){i.push(c);break}}if(i.length>=kw)break}}return wC(i)}}function AC(e){return Array.isArray(e)?Bw(...e):e}function wC(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),X_.test(t[t.length-1].function||"")&&(t.pop(),X_.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,kw).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const Bl="<anonymous>";function wn(e){try{return!e||typeof e!="function"?Bl:e.name||Bl}catch{return Bl}}const Fc={},Q_={};function Zi(e,t){Fc[e]=Fc[e]||[],Fc[e].push(t)}function xi(e,t){Q_[e]||(t(),Q_[e]=!0)}function kr(e,t){const r=e&&Fc[e];if(r)for(const n of r)try{n(t)}catch(i){Ya&&Re.error(`Error while triggering instrumentation handler.
|
|
4
4
|
Type: ${e}
|
|
5
5
|
Name: ${wn(n)}
|
|
@@ -31,7 +31,7 @@ Error:`,i)}}function P$(){return m$(e=>{xa("cls",{metric:e}),DO=e},{reportAllCha
|
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the MIT license found in the
|
|
33
33
|
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var LE;function Nq(){if(LE)return mt;LE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,R=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function v(h){if(typeof h=="object"&&h!==null){var T=h.$$typeof;switch(T){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case E:case p:case s:return h;default:return T}}case r:return T}}}function b(h){return v(h)===l}return mt.AsyncMode=u,mt.ConcurrentMode=l,mt.ContextConsumer=o,mt.ContextProvider=s,mt.Element=t,mt.ForwardRef=c,mt.Fragment=n,mt.Lazy=E,mt.Memo=p,mt.Portal=r,mt.Profiler=a,mt.StrictMode=i,mt.Suspense=d,mt.isAsyncMode=function(h){return b(h)||v(h)===u},mt.isConcurrentMode=b,mt.isContextConsumer=function(h){return v(h)===o},mt.isContextProvider=function(h){return v(h)===s},mt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},mt.isForwardRef=function(h){return v(h)===c},mt.isFragment=function(h){return v(h)===n},mt.isLazy=function(h){return v(h)===E},mt.isMemo=function(h){return v(h)===p},mt.isPortal=function(h){return v(h)===r},mt.isProfiler=function(h){return v(h)===a},mt.isStrictMode=function(h){return v(h)===i},mt.isSuspense=function(h){return v(h)===d},mt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===E||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===R||h.$$typeof===O||h.$$typeof===f||h.$$typeof===A)},mt.typeOf=v,mt}var qE;function Pq(){return qE||(qE=1,Wl.exports=Nq()),Wl.exports}var Yl,kE;function Mq(){if(kE)return Yl;kE=1;var e=Pq(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(E){return e.isMemo(E)?i:a[E.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(E,A,R){if(typeof A!="string"){if(m){var O=d(A);O&&O!==m&&p(E,O,R)}var f=u(A);l&&(f=f.concat(l(A)));for(var v=s(E),b=s(A),h=0;h<f.length;++h){var T=f[h];if(!r[T]&&!(R&&R[T])&&!(b&&b[T])&&!(v&&v[T])){var w=c(A,T);try{o(E,T,w)}catch{}}}}return E}return Yl=p,Yl}Mq();const Cq=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Dq(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const BE={componentStack:null,error:null,eventId:null};function jq(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class Lg extends Ye.Component{constructor(t){super(t),Lg.prototype.__init.call(this),this.state=BE,this._openFallbackReportDialog=!0;const r=cr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&$E({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;eO(o=>{if(Dq(Ye.version)&&pg(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,jq(t,l)}n&&n(o,t,r);const u=Ig(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&$E({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(BE)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Ye.isValidElement(i)?i:(t&&Cq&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const $q=Ye.lazy(()=>Xt(()=>import("./index-
|
|
34
|
+
*/var LE;function Nq(){if(LE)return mt;LE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,R=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function v(h){if(typeof h=="object"&&h!==null){var T=h.$$typeof;switch(T){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case E:case p:case s:return h;default:return T}}case r:return T}}}function b(h){return v(h)===l}return mt.AsyncMode=u,mt.ConcurrentMode=l,mt.ContextConsumer=o,mt.ContextProvider=s,mt.Element=t,mt.ForwardRef=c,mt.Fragment=n,mt.Lazy=E,mt.Memo=p,mt.Portal=r,mt.Profiler=a,mt.StrictMode=i,mt.Suspense=d,mt.isAsyncMode=function(h){return b(h)||v(h)===u},mt.isConcurrentMode=b,mt.isContextConsumer=function(h){return v(h)===o},mt.isContextProvider=function(h){return v(h)===s},mt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},mt.isForwardRef=function(h){return v(h)===c},mt.isFragment=function(h){return v(h)===n},mt.isLazy=function(h){return v(h)===E},mt.isMemo=function(h){return v(h)===p},mt.isPortal=function(h){return v(h)===r},mt.isProfiler=function(h){return v(h)===a},mt.isStrictMode=function(h){return v(h)===i},mt.isSuspense=function(h){return v(h)===d},mt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===E||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===R||h.$$typeof===O||h.$$typeof===f||h.$$typeof===A)},mt.typeOf=v,mt}var qE;function Pq(){return qE||(qE=1,Wl.exports=Nq()),Wl.exports}var Yl,kE;function Mq(){if(kE)return Yl;kE=1;var e=Pq(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(E){return e.isMemo(E)?i:a[E.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(E,A,R){if(typeof A!="string"){if(m){var O=d(A);O&&O!==m&&p(E,O,R)}var f=u(A);l&&(f=f.concat(l(A)));for(var v=s(E),b=s(A),h=0;h<f.length;++h){var T=f[h];if(!r[T]&&!(R&&R[T])&&!(b&&b[T])&&!(v&&v[T])){var w=c(A,T);try{o(E,T,w)}catch{}}}}return E}return Yl=p,Yl}Mq();const Cq=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Dq(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const BE={componentStack:null,error:null,eventId:null};function jq(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class Lg extends Ye.Component{constructor(t){super(t),Lg.prototype.__init.call(this),this.state=BE,this._openFallbackReportDialog=!0;const r=cr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&$E({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;eO(o=>{if(Dq(Ye.version)&&pg(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,jq(t,l)}n&&n(o,t,r);const u=Ig(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&$E({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(BE)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Ye.isValidElement(i)?i:(t&&Cq&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const $q=Ye.lazy(()=>Xt(()=>import("./index-D8ALyBMQ.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.Navbar})));function Lq(e){return fe.jsx(Ye.Suspense,{fallback:fe.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:fe.jsx($q,{...e})})}const qq={},UE=e=>{let t;const r=new Set,n=(c,d)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const p=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(E=>E(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(qq?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},l=t=e(n,i,u);return u},kq=e=>e?UE(e):UE;var Kl={exports:{}},Jl={},Xl={exports:{}},Ql={};/**
|
|
35
35
|
* @license React
|
|
36
36
|
* use-sync-external-store-shim.production.js
|
|
37
37
|
*
|
|
@@ -71,4 +71,4 @@ Error:`,i)}}function P$(){return m$(e=>{xa("cls",{metric:e}),DO=e},{reportAllCha
|
|
|
71
71
|
Ephemeral address: ${X}
|
|
72
72
|
Expiration: ${W.toISOString()}`}e.Authenticator={validateSignature:m,isValidAuthChain:p,createEIP1271MessageHash:E,createSimpleAuthChain:A,createAuthChain:R,initializeAuthChain:O,signPayload:f,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:v,ownerAddress:b,getEphemeralMessage:h};const T=async(X,W)=>({nextAuthority:W.payload});e.SIGNER_VALIDATOR=T;const w=async(X,W)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const $=(0,o.recoverAddressFromEthSignature)(W.signature,W.payload),D=X.toLocaleLowerCase(),L=$.toLocaleLowerCase();if(D===L)return{nextAuthority:W.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${L}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=w;const P=async(X,W,$)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:L,expiration:H}=F(W.payload),N=($==null?void 0:$.dateToValidateExpirationInMillis)||Date.now();if(H>N){const j=(0,o.recoverAddressFromEthSignature)(W.signature,D),Z=X.toLocaleLowerCase(),Ee=j.toLocaleLowerCase();if(Z===Ee)return{nextAuthority:L};throw new Error(`Invalid signer address. Expected: ${Z}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${H}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const B=async(X,W,$)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:L,expiration:H}=F(W.payload),N=($==null?void 0:$.dateToValidateExpirationInMillis)||Date.now();if(H>N&&await ae($==null?void 0:$.provider,X,D,W.signature,N))return{nextAuthority:L};throw new Error(`Ephemeral key expired. Expiration: ${H}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=B;const J=async(X,W,$)=>{if(!W.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!$)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await ae($.provider,X,W.payload,W.signature,$.dateToValidateExpirationInMillis))return{nextAuthority:W.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=J;const K=async(X,W)=>({error:"Error Validator."});function z(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function F(X){const W=X.replace(/\r/g,""),$=W.split(`
|
|
73
73
|
`),D="Ephemeral address: ",L="Expiration: ";if($.length<3||!$[1].startsWith(D)||!$[2].startsWith(L))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${D}" on line 2 and "${L}" on line 3.`);const H=$[1].substring(D.length),N=$[2].substring(L.length),j=Date.parse(N);if(Number.isNaN(j))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:W,ephemeralAddress:H,expiration:j}}e.parseEmphemeralPayload=F;async function ue(X,W,$,D){const L=E(W),H=(0,a.hexToBytes)($);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature(L,H,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const j=(0,o.createEthereumMessageHash)(W);try{N=(0,a.bytesToHex)(await X.isValidSignature(j,H,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function ae(X,W,$,D,L){if(!X)throw new Error("Missing provider");const H=new a.default(X),N=await(0,s.SignatureValidator)(H,W);let j=await ue(N,$,D);if(j)return!0;const Z=new u.default(H);try{const{block:Ee}=await Z.getDate(L,!1);if(j=await ue(N,$,D,Ee),j)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: ${j}`)}function re(X){switch(X){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return K}}})(Cr)),Cr}var _n={},MR;function mV(){return MR||(MR=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.AUTH_METADATA_HEADER=_n.AUTH_TIMESTAMP_HEADER=_n.AUTH_CHAIN_HEADER_PREFIX=void 0,_n.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",_n.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",_n.AUTH_METADATA_HEADER="x-identity-metadata"),_n}var CR;function hV(){return CR||(CR=1,(function(e){var t=mi&&mi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=mi&&mi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(EP(),e),r(mV(),e),r(_P(),e)})(mi)),mi}var yV=hV(),Mi={},Lr={},Cc={exports:{}},Dc={exports:{}},DR;function u_(){return DR||(DR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=t.default,e.exports.default=t.default})(Dc,Dc.exports)),Dc.exports}var jc={exports:{}},jR;function gV(){return jR||(jR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,a){for(var s=0;s<a.length;s++){var o=a[s];if(i===o||r(o)&&o.test(i))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(jc,jc.exports)),jc.exports}var $c={exports:{}},$R;function _V(){return $R||($R=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(i,a){return i.indexOf(a)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})($c,$c.exports)),$c.exports}var Lc={exports:{}},qc={exports:{}},LR;function vP(){return LR||(LR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},r(i)}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(r(i)!=="object"||i===null)&&(i={});for(var s in a)typeof i[s]>"u"&&(i[s]=a[s]);return i}e.exports=t.default,e.exports.default=t.default})(qc,qc.exports)),qc.exports}var qR;function EV(){return qR||(qR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(u_()),n=i(vP());function i(o){return o&&o.__esModule?o:{default:o}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function s(o,u){(0,r.default)(o),u=(0,n.default)(u,a),u.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),u.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var l=o.split("."),c=l[l.length-1];return u.require_tld&&(l.length<2||!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(c)||/\s/.test(c))||!u.allow_numeric_tld&&/^\d+$/.test(c)?!1:l.every(function(d){return!(d.length>63&&!u.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(d)||/[\uff01-\uff5e]/.test(d)||/^-|-$/.test(d)||!u.allow_underscores&&/_/.test(d))})}e.exports=t.default,e.exports.default=t.default})(Lc,Lc.exports)),Lc.exports}var kc={exports:{}},kR;function vV(){return kR||(kR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(u_());function n(d){return d&&d.__esModule?d:{default:d}}function i(d){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},i(d)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",s="(".concat(a,"[.]){3}").concat(a),o=new RegExp("^".concat(s,"$")),u="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(s,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(s,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(s,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(s,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(s,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(s,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(s,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function c(d){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var p=(i(m)==="object"?m.version:arguments[1])||"";return p?p.toString()==="4"?o.test(d):p.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(kc,kc.exports)),kc.exports}var BR;function bV(){return BR||(BR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r=u(u_()),n=u(gV()),i=u(_V()),a=u(EV()),s=u(vV()),o=u(vP());function u(f){return f&&f.__esModule?f:{default:f}}function l(f,v){return E(f)||p(f,v)||d(f,v)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(f,v){if(f){if(typeof f=="string")return m(f,v);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,v):void 0}}function m(f,v){(v==null||v>f.length)&&(v=f.length);for(var b=0,h=Array(v);b<v;b++)h[b]=f[b];return h}function p(f,v){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,T,w,P,B=[],J=!0,K=!1;try{if(w=(b=b.call(f)).next,v!==0)for(;!(J=(h=w.call(b)).done)&&(B.push(h.value),B.length!==v);J=!0);}catch(z){K=!0,T=z}finally{try{if(!J&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(K)throw T}}return B}}function E(f){if(Array.isArray(f))return f}var A={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},R=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(f,v){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(v=(0,o.default)(v,A),v.validate_length&&f.length>v.max_allowed_length)||!v.allow_fragments&&(0,i.default)(f,"#")||!v.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,T,w,P,B,J,K;J=f.split("#"),f=J.shift(),J=f.split("?"),f=J.shift();var z=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(ce){return U=!0,b=ce.toLowerCase(),v.require_valid_protocol&&v.protocols.indexOf(b)===-1?!1:f.substring(z[0].length)};if(z){var ue=z[1],ae=f.substring(z[0].length),re=ae.slice(0,2)==="//";if(re){if(f=F(ue),f===!1)return!1}else{var X=ae.indexOf("/"),W=X===-1?ae:ae.substring(0,X),$=W.indexOf("@");if($!==-1){var D=W.substring(0,$),L=/^[a-zA-Z0-9\-_.%:]*$/,H=L.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(H&&!N){if(v.require_protocol)return!1}else if(f=F(ue),f===!1)return!1}else{var j=/^[0-9]/.test(ae);if(j){if(v.require_protocol)return!1}else if(f=F(ue),f===!1)return!1}}}else if(v.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!v.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(J=f.split("/"),f=J.shift(),f===""&&!v.require_host)return!0;if(J=f.split("@"),J.length>1){if(v.disallow_auth||J[0]===""||(h=J.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}w=J.join("@"),B=null,K=null;var Ie=w.match(R);if(Ie?(T="",K=Ie[1],B=Ie[2]||null):(J=w.split(":"),T=J.shift(),J.length&&(B=J.join(":"))),B!==null&&B.length>0){if(P=parseInt(B,10),!/^[0-9]+$/.test(B)||P<=0||P>65535)return!1}else if(v.require_port)return!1;return v.host_whitelist?(0,n.default)(T,v.host_whitelist):T===""&&!v.require_host?!0:!(!(0,s.default)(T)&&!(0,a.default)(T,v)&&(!K||!(0,s.default)(K,6))||(T=T||K,v.host_blacklist&&(0,n.default)(T,v.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(Cc,Cc.exports)),Cc.exports}var bh={},UR;function bP(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(bh)),bh}var FR;function TV(){if(FR)return Lr;FR=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.clearIdentity=Lr.storeIdentity=Lr.getIdentity=Lr.init=void 0;const e=bV(),t=bP(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(R,O={}){if(!(0,e.default)(R,{...o,...O}))throw new Error(`Invalid url: ${R}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=R,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=R}Lr.init=u;async function l(R){let O;try{O=(await p(await m(),t.Action.GET,{user:R})).identity??null}catch(f){A(f),O=(0,t.localStorageGetIdentity)(R)}return O}Lr.getIdentity=l;async function c(R,O){try{await p(await m(),t.Action.STORE,{user:R,identity:O})}catch(f){A(f),(0,t.localStorageStoreIdentity)(R,O)}}Lr.storeIdentity=c;async function d(R){try{await p(await m(),t.Action.CLEAR,{user:R})}catch(O){A(O),(0,t.localStorageClearIdentity)(R)}}Lr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let R=0;R<i;R++){const O=document.getElementById(r),f=O==null?void 0:O.contentWindow;if(!f){await E(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(R,O,f,v=0){a++;const b=a;let h=null;const T=new Promise((w,P)=>{h=({data:B})=>{!B||B.target!==t.SINGLE_SIGN_ON_TARGET||B.id!==b||(B.error?P(new Error(B.error)):w(B))},window.addEventListener("message",h)});R.postMessage((0,t.createMessage)({id:b,action:O,...f}),s);try{return await(v?Promise.race([T,new Promise((w,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),v))]):T)}catch(w){throw w}finally{h&&window.removeEventListener("message",h)}}function E(R){return new Promise(O=>setTimeout(O,R))}function A(R){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",R.message)}return Lr}var VR;function SV(){return VR||(VR=1,(function(e){var t=Mi&&Mi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Mi&&Mi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(TV(),e),r(bP(),e)})(Mi)),Mi}var ag=SV();function IV(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?un.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?un.STAGING:t.endsWith(".io")||t.endsWith(".zone")?un.DEVELOPMENT:null}function RV(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(SP(n))return n}return null}var HR={},un;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(un||(un={}));function TP(){return Object.values(un)}function SP(e){return TP().includes(e)}function Bc(e){if(SP(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${TP().map(t=>`"${t}"`).join(", ")}.`)}function AV(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?Bc(t):r?Bc(r):n?Bc(n):i?Bc(i):un.PRODUCTION}function wV(e){if(typeof window<"u"){const r=RV(window.location);if(r)return r;const n=IV(window.location);if(n)return n}return AV(typeof e>"u"&&typeof Uc=="object"&&typeof HR=="object"?HR:e)}function OV(e,t){const r=wV(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const NV="development",PV="80002",MV="https://marketplace-api.decentraland.zone",CV="https://marketplace-api.decentraland.zone",DV="/auth",jV="https://rpc.decentraland.org/amoy",$V="https://credits.decentraland.zone",LV="https://builder-api.decentraland.zone",qV="https://peer.decentraland.zone",kV="",BV="",UV="",FV="",VV={ENVIRONMENT:NV,CHAIN_ID:PV,MARKETPLACE_SERVER_URL:MV,NFT_API_URL:CV,AUTH_URL:DV,RPC_URL:jV,CREDITS_SERVER_URL:$V,BUILDER_SERVER_URL:LV,PEER_URL:qV,SHOP_SERVER_URL:kV,STRIPE_PUBLISHABLE_KEY:BV,SEGMENT_WRITE_KEY:UV,SENTRY_DSN:FV},HV="staging",GV="80002",zV="https://marketplace-api.decentraland.zone",WV="https://marketplace-api.decentraland.zone",YV="/auth",KV="https://rpc.decentraland.org/amoy",JV="https://credits.decentraland.zone",XV="https://builder-api.decentraland.zone",QV="https://peer.decentraland.zone",ZV="",xV="",eH="",tH="",rH={ENVIRONMENT:HV,CHAIN_ID:GV,MARKETPLACE_SERVER_URL:zV,NFT_API_URL:WV,AUTH_URL:YV,RPC_URL:KV,CREDITS_SERVER_URL:JV,BUILDER_SERVER_URL:XV,PEER_URL:QV,SHOP_SERVER_URL:ZV,STRIPE_PUBLISHABLE_KEY:xV,SEGMENT_WRITE_KEY:eH,SENTRY_DSN:tH},nH="production",iH="137",aH="https://marketplace-api.decentraland.org",sH="https://marketplace-api.decentraland.org",oH="/auth",uH="https://rpc.decentraland.org/polygon",cH="https://credits.decentraland.org",lH="https://builder-api.decentraland.org",dH="https://peer.decentraland.org",fH="",pH="",mH="",hH="",yH={ENVIRONMENT:nH,CHAIN_ID:iH,MARKETPLACE_SERVER_URL:aH,NFT_API_URL:sH,AUTH_URL:oH,RPC_URL:uH,CREDITS_SERVER_URL:cH,BUILDER_SERVER_URL:lH,PEER_URL:dH,SHOP_SERVER_URL:fH,STRIPE_PUBLISHABLE_KEY:pH,SEGMENT_WRITE_KEY:mH,SENTRY_DSN:hH},gH={},br=OV({[un.DEVELOPMENT]:VV,[un.STAGING]:rH,[un.PRODUCTION]:yH},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),rr=gH,Dt={marketplaceServerUrl:rr.VITE_MARKETPLACE_SERVER_URL??br.get("MARKETPLACE_SERVER_URL"),nftApiUrl:rr.VITE_NFT_API_URL??br.get("NFT_API_URL"),chainId:Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID")),authUrl:rr.VITE_AUTH_URL??br.get("AUTH_URL"),rpcUrl:rr.VITE_RPC_URL??br.get("RPC_URL"),creditsServerUrl:rr.VITE_CREDITS_SERVER_URL??br.get("CREDITS_SERVER_URL"),builderServerUrl:rr.VITE_BUILDER_SERVER_URL??br.get("BUILDER_SERVER_URL"),peerUrl:rr.VITE_PEER_URL??br.get("PEER_URL"),shopServerUrl:rr.VITE_SHOP_SERVER_URL??br.get("SHOP_SERVER_URL"),stripePublishableKey:rr.VITE_STRIPE_PK??br.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:rr.VITE_SEGMENT_WRITE_KEY??br.get("SEGMENT_WRITE_KEY"),sentryDsn:rr.VITE_SENTRY_DSN??br.get("SENTRY_DSN"),sentryEnvironment:rr.VITE_SENTRY_ENVIRONMENT??(Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:rr.VITE_SENTRY_RELEASE??`shop@${rr.VITE_APP_VERSION??"0.0.0-dev"}`},_H=744*60;async function IP(){return(await Xt(async()=>{const{connection:e}=await import("./index-C7dh-AbD.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([6,1]))).connection}async function EH(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new _M(e.provider),n=r.getSigner();let i=ag.localStorageGetIdentity(t);if(!i){const a=EM.createRandom();i=await yV.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:C_(a.publicKey),privateKey:C_(a.privateKey)},_H,s=>n.signMessage(s)),ag.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function vH(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Dt.authUrl}/login?redirectTo=${e}`)}async function bH(){try{const t=await(await IP()).tryPreviousConnection();return!t.account||!ag.localStorageGetIdentity(t.account.toLowerCase())?null:await EH(t)}catch{return null}}async function TH(){try{await(await IP()).disconnect()}catch{}}const SH=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,IH=Dt.chainId===80002?"amoy":"polygon",RH=Dt.chainId===80002?"dev":"prod";function RP(){return window.analytics}function AH(){let e=null;try{e=Al.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:SH,network:IH,app_env:RH}}function Ji(e,t={}){const r={...AH(),...t},n=RP();n&&n.track(e,r)}function wH(e,t={}){const r=RP();r&&r.identify(e.toLowerCase(),t)}function OH(e){Ji("Shop Viewed Page",{page:e})}function GR(e){return e===oo.ProviderType.MAGIC||e===oo.ProviderType.MAGIC_TEST?"magic":"wallet"}function NH(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function uo(e){return Math.round(e*10)/100}function AP(e){return!e.tokenId}function k3(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:uo(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:AP(e)}}function B3(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(AP);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:uo(n.priceCredits)})),value_credits:t,value_usd:uo(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function PH(e){const t=e;if((t==null?void 0:t.code)===4001)return"user_rejected";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("reject")||r.includes("denied")||r.includes("cancel")?"user_rejected":r.includes("insufficient")?"insufficient_credits":r.includes("not for sale")||r.includes("no active listing")||r.includes("sold")?"not_for_sale":"unknown"}function U3(e){return PH(e)==="user_rejected"}function MH(e){const t=window;if(t.analytics&&t.analytics.invoked)return;const r=t.analytics||[];r.invoked=!0,r.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],r.factory=n=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let zR=!1;function CH(){if(zR)return;zR=!0;const e=Dt.segmentWriteKey;e&&MH(e)}let sg=null;function DH(e){sg=e}function WR(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),sg)try{sg(e,t)}catch{}}const jH=/0x[a-fA-F0-9]{130}\b/g,$H=/0x[a-fA-F0-9]{64}\b/g,LH=/(sk_[a-z]+_[A-Za-z0-9]+|pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+|[A-Za-z0-9-]*secret[A-Za-z0-9-]*)/gi,qH=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Ss(e){return e.replace(jH,"<signature>").replace(LH,"<secret>").replace($H,"<hex32>")}function kH(e){var r;e.message&&(e.message=Ss(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Ss(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Ss(n.message));e.request&&(e.request.url&&(e.request.url=Ss(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(qH.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Ss(n[i]))}};return t(e.tags),t(e.extra),e}let YR=!1;function BH(){if(YR)return;const e=Dt.sentryDsn;if(!e)return;YR=!0,Oq({dsn:e,environment:Dt.sentryEnvironment,release:Dt.sentryRelease,integrations:[new hL],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:kH});const t=UH();t&&kD({id:t}),DH((r,n)=>Ig(r,{extra:n}))}function UH(){var e;try{return((e=Al.getState().session)==null?void 0:e.address)??null}catch{return null}}const Th="shop:signing_in",Al=Ro(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(Th,"1")}catch{}vH()},disconnect:async()=>{Ji("Shop Signed Out");try{await TH()}catch(t){WR(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await bH()}catch(n){WR(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),wH(t.address,{sign_in_method:GR(t.providerType)});let r=!1;try{r=sessionStorage.getItem(Th)==="1",r&&sessionStorage.removeItem(Th)}catch{}r&&Ji("Shop Signed In",{method:GR(t.providerType),is_new_user:NH(t.address)})}})),FH=Dt.peerUrl;function wP(e){return tl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${FH}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return;const r=await t.json();return(n=r==null?void 0:r.avatars)==null?void 0:n[0]}})}var En={},Sh={},KR;function OP(){return KR||(KR=1,Object.defineProperty(Sh,"__esModule",{value:!0})),Sh}var vn={},xr={},ya={},Ci={},JR={},Is,XR;function zr(){if(XR)return Is;XR=1;var e=function(t){return t&&t.Math===Math&&t};return Is=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof vy=="object"&&vy)||e(typeof Is=="object"&&Is)||(function(){return this})()||Function("return this")(),Is}var Ih,QR;function oa(){return QR||(QR=1,Ih=function(e){try{return!!e()}catch{return!0}}),Ih}var Rh,ZR;function wl(){if(ZR)return Rh;ZR=1;var e=oa();return Rh=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Rh}var Ah,xR;function VH(){if(xR)return Ah;xR=1;var e=wl(),t=Function.prototype,r=t.apply,n=t.call;return Ah=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Ah}var wh,eA;function es(){if(eA)return wh;eA=1;var e=wl(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return wh=e?n:function(i){return function(){return r.apply(i,arguments)}},wh}var Oh,tA;function NP(){if(tA)return Oh;tA=1;var e=es(),t=e({}.toString),r=e("".slice);return Oh=function(n){return r(t(n),8,-1)},Oh}var Nh,rA;function PP(){if(rA)return Nh;rA=1;var e=NP(),t=es();return Nh=function(r){if(e(r)==="Function")return t(r)},Nh}var Ph,nA;function ua(){if(nA)return Ph;nA=1;var e=typeof document=="object"&&document.all;return Ph=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Ph}var Mh={},Ch,iA;function Mo(){if(iA)return Ch;iA=1;var e=oa();return Ch=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ch}var Dh,aA;function c_(){if(aA)return Dh;aA=1;var e=wl(),t=Function.prototype.call;return Dh=e?t.bind(t):function(){return t.apply(t,arguments)},Dh}var jh={},sA;function HH(){if(sA)return jh;sA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return jh.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,jh}var $h,oA;function MP(){return oA||(oA=1,$h=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),$h}var Lh,uA;function GH(){if(uA)return Lh;uA=1;var e=es(),t=oa(),r=NP(),n=Object,i=e("".split);return Lh=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,Lh}var qh,cA;function CP(){return cA||(cA=1,qh=function(e){return e==null}),qh}var kh,lA;function DP(){if(lA)return kh;lA=1;var e=CP(),t=TypeError;return kh=function(r){if(e(r))throw new t("Can't call method on "+r);return r},kh}var Bh,dA;function zH(){if(dA)return Bh;dA=1;var e=GH(),t=DP();return Bh=function(r){return e(t(r))},Bh}var Uh,fA;function Ol(){if(fA)return Uh;fA=1;var e=ua();return Uh=function(t){return typeof t=="object"?t!==null:e(t)},Uh}var Fh,pA;function jP(){return pA||(pA=1,Fh={}),Fh}var Vh,mA;function WH(){if(mA)return Vh;mA=1;var e=jP(),t=zr(),r=ua(),n=function(i){return r(i)?i:void 0};return Vh=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Vh}var Hh,hA;function YH(){if(hA)return Hh;hA=1;var e=es();return Hh=e({}.isPrototypeOf),Hh}var Gh,yA;function KH(){if(yA)return Gh;yA=1;var e=zr(),t=e.navigator,r=t&&t.userAgent;return Gh=r?String(r):"",Gh}var zh,gA;function JH(){if(gA)return zh;gA=1;var e=zr(),t=KH(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),zh=o,zh}var Wh,_A;function $P(){if(_A)return Wh;_A=1;var e=JH(),t=oa(),r=zr(),n=r.String;return Wh=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Wh}var Yh,EA;function LP(){if(EA)return Yh;EA=1;var e=$P();return Yh=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Yh}var Kh,vA;function qP(){if(vA)return Kh;vA=1;var e=WH(),t=ua(),r=YH(),n=LP(),i=Object;return Kh=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Kh}var Jh,bA;function XH(){if(bA)return Jh;bA=1;var e=String;return Jh=function(t){try{return e(t)}catch{return"Object"}},Jh}var Xh,TA;function kP(){if(TA)return Xh;TA=1;var e=ua(),t=XH(),r=TypeError;return Xh=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Xh}var Qh,SA;function QH(){if(SA)return Qh;SA=1;var e=kP(),t=CP();return Qh=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Qh}var Zh,IA;function ZH(){if(IA)return Zh;IA=1;var e=c_(),t=ua(),r=Ol(),n=TypeError;return Zh=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},Zh}var xh={exports:{}},ey,RA;function xH(){return RA||(RA=1,ey=!0),ey}var ty,AA;function eG(){if(AA)return ty;AA=1;var e=zr(),t=Object.defineProperty;return ty=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},ty}var wA;function tG(){if(wA)return xh.exports;wA=1;var e=xH(),t=zr(),r=eG(),n="__core-js_shared__",i=xh.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),xh.exports}var ry,OA;function rG(){if(OA)return ry;OA=1;var e=tG();return ry=function(t,r){return e[t]||(e[t]=r||{})},ry}var ny,NA;function nG(){if(NA)return ny;NA=1;var e=DP(),t=Object;return ny=function(r){return t(e(r))},ny}var iy,PA;function l_(){if(PA)return iy;PA=1;var e=es(),t=nG(),r=e({}.hasOwnProperty);return iy=Object.hasOwn||function(i,a){return r(t(i),a)},iy}var ay,MA;function iG(){if(MA)return ay;MA=1;var e=es(),t=0,r=Math.random(),n=e(1.1.toString);return ay=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},ay}var sy,CA;function aG(){if(CA)return sy;CA=1;var e=zr(),t=rG(),r=l_(),n=iG(),i=$P(),a=LP(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return sy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},sy}var oy,DA;function sG(){if(DA)return oy;DA=1;var e=c_(),t=Ol(),r=qP(),n=QH(),i=ZH(),a=aG(),s=TypeError,o=a("toPrimitive");return oy=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},oy}var uy,jA;function BP(){if(jA)return uy;jA=1;var e=sG(),t=qP();return uy=function(r){var n=e(r,"string");return t(n)?n:n+""},uy}var cy,$A;function oG(){if($A)return cy;$A=1;var e=zr(),t=Ol(),r=e.document,n=t(r)&&t(r.createElement);return cy=function(i){return n?r.createElement(i):{}},cy}var ly,LA;function UP(){if(LA)return ly;LA=1;var e=Mo(),t=oa(),r=oG();return ly=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),ly}var qA;function uG(){if(qA)return Mh;qA=1;var e=Mo(),t=c_(),r=HH(),n=MP(),i=zH(),a=BP(),s=l_(),o=UP(),u=Object.getOwnPropertyDescriptor;return Mh.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},Mh}var dy,kA;function cG(){if(kA)return dy;kA=1;var e=oa(),t=ua(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return dy=n,dy}var fy,BA;function lG(){if(BA)return fy;BA=1;var e=PP(),t=kP(),r=wl(),n=e(e.bind);return fy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},fy}var py={},my,UA;function dG(){if(UA)return my;UA=1;var e=Mo(),t=oa();return my=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),my}var hy,FA;function fG(){if(FA)return hy;FA=1;var e=Ol(),t=String,r=TypeError;return hy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},hy}var VA;function pG(){if(VA)return py;VA=1;var e=Mo(),t=UP(),r=dG(),n=fG(),i=BP(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return py.f=e?r?function(m,p,E){if(n(m),p=i(p),n(E),typeof m=="function"&&p==="prototype"&&"value"in E&&c in E&&!E[c]){var A=o(m,p);A&&A[c]&&(m[p]=E.value,E={configurable:l in E?E[l]:A[l],enumerable:u in E?E[u]:A[u],writable:!1})}return s(m,p,E)}:s:function(m,p,E){if(n(m),p=i(p),n(E),t)try{return s(m,p,E)}catch{}if("get"in E||"set"in E)throw new a("Accessors not supported");return"value"in E&&(m[p]=E.value),m},py}var yy,HA;function mG(){if(HA)return yy;HA=1;var e=Mo(),t=pG(),r=MP();return yy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},yy}var gy,GA;function hG(){if(GA)return gy;GA=1;var e=zr(),t=VH(),r=PP(),n=ua(),i=uG().f,a=cG(),s=jP(),o=lG(),u=mG(),l=l_(),c=function(d){var m=function(p,E,A){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,E)}return new d(p,E,A)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return gy=function(d,m){var p=d.target,E=d.global,A=d.stat,R=d.proto,O=E?e:A?e[p]:e[p]&&e[p].prototype,f=E?s:s[p]||u(s,p,{})[p],v=f.prototype,b,h,T,w,P,B,J,K,z;for(w in m)b=a(E?w:p+(A?".":"#")+w,d.forced),h=!b&&O&&l(O,w),B=f[w],h&&(d.dontCallGetSet?(z=i(O,w),J=z&&z.value):J=O[w]),P=h&&J?J:m[w],!(!b&&!R&&typeof B==typeof P)&&(d.bind&&h?K=o(P,e):d.wrap&&h?K=c(P):R&&n(P)?K=r(P):K=P,(d.sham||P&&P.sham||B&&B.sham)&&u(K,"sham",!0),u(f,w,K),R&&(T=p+"Prototype",l(s,T)||u(s,T,{}),u(s[T],w,P),d.real&&v&&(b||!v[w])&&u(v,w,P)))},gy}var zA;function yG(){if(zA)return JR;zA=1;var e=hG(),t=zr();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),JR}var _y,WA;function gG(){return WA||(WA=1,yG(),_y=zr()),_y}var Ey,YA;function _G(){if(YA)return Ey;YA=1;var e=gG();return Ey=e,Ey}var KA;function FP(){if(KA)return Ci;KA=1;var e=Ci&&Ci.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.getImplementation=void 0;var t=e(_G());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return Ci.getImplementation=r,Ci}var JA;function VP(){if(JA)return ya;JA=1;var e=ya&&ya.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ya,"__esModule",{value:!0});var t=EP(),r=FP(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,m,p,E){var A,R,O=new u(E),f=String(Date.now()),v=JSON.stringify(p),b=[d,m,f,v].join(":").toLowerCase(),h=0,T=t.Authenticator.signPayload(c,b);try{for(var w=e(T),P=w.next();!P.done;P=w.next()){var B=P.value;O.set(n+h,JSON.stringify(B)),h++}}catch(J){A={error:J}}finally{try{P&&!P.done&&(R=w.return)&&R.call(w)}finally{if(A)throw A.error}}return O.set(i,f),O.set(a,v),O}}return ya.default=s,ya}var XA;function HP(){if(XA)return xr;XA=1;var e=xr&&xr.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=xr&&xr.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=xr&&xr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(xr,"__esModule",{value:!0});var n=r(VP()),i=FP();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(m,p){if(p&&p.identity){var E=p.identity,A=p.metadata,R=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var O=typeof m=="string"?new u(m):m,f=new l(O.toString(),e(e({},R),{headers:o(E,p.method||"GET",O.pathname,A||{},R==null?void 0:R.headers)}));return c(f)}var v=new u(m.url),b=new l(m),h=o(E,m.method||"GET",v.pathname,A||{});return h.forEach(function(T,w){b.headers.set(w,T)}),c(b)}return c(m,p)}}return xr.default=a,xr}var QA;function EG(){return QA||(QA=1,(function(e){var t=vn&&vn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=vn&&vn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=vn&&vn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(OP(),e);var i=HP();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=VP();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(vn)),vn}var ZA;function vG(){return ZA||(ZA=1,(function(e){var t=En&&En.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=En&&En.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=En&&En.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(OP(),e),r(EG(),e);var i=n(HP());e.default=(0,i.default)()})(En)),En}var bG=vG();const Nl=mw(bG);async function TG(e,t){const r=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await Nl(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function SG(e,t){const{usd:r}=await TG(e,t);return r??{balanceCents:0,credits:0}}async function F3(e,t,r){const n=`${Dt.creditsServerUrl}/credits/authorize`,i=await Nl(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function V3(e,t,r){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(r.first)),(r==null?void 0:r.skip)!=null&&n.set("offset",String(r.skip));const i=n.toString(),a=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await Nl(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function H3(e,t){if(t.length===0)return 0;const r=`${Dt.creditsServerUrl}/credits/authorize/cancel`,n=await Nl(r,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:t})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function G3(e,t=1e3){const r=await fetch(`${Dt.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:t})});if(!r.ok)throw new Error(`devMintUsd ${r.status}: ${await r.text()}`);return r.json()}function IG(e){return tl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>SG(e.address,e.identity)})}const RG=e=>uo(e.reduce((t,r)=>t+r.priceCredits,0)),Ra=Ro((e,t)=>({items:[],open:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;Ji("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:uo(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:RG(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&Ji("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r})})),Xi={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function z3(e){return`${e} ${e===1?Xi.nameSingular:Xi.name}`}function AG(){const e=Ra(a=>a.items),t=Ra(a=>a.open),r=Ra(a=>a.setOpen),n=Ye.useRef(null),i=e.reduce((a,s)=>a+s.priceCredits,0);return Ye.useEffect(()=>{if(!t)return;const a=setTimeout(()=>r(!1),4500),s=o=>{n.current&&!n.current.contains(o.target)&&r(!1)};return document.addEventListener("mousedown",s),()=>{clearTimeout(a),document.removeEventListener("mousedown",s)}},[t,e.length,r]),!t||e.length===0?null:fe.jsxs("div",{className:"cart-pop",ref:n,role:"dialog","aria-label":"Cart",children:[fe.jsxs("div",{className:"cart-pop__head",children:[fe.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),fe.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(a=>fe.jsxs("div",{className:"cart-pop__row",children:[fe.jsx("div",{className:"cart-pop__thumb",children:a.thumbnail?fe.jsx("img",{src:a.thumbnail,alt:a.name}):null}),fe.jsx("div",{className:"cart-pop__name",title:a.name,children:a.name}),fe.jsxs("div",{className:"cart-pop__price",children:[Xi.symbol," ",a.priceCredits]})]},a.id))}),fe.jsxs("div",{className:"cart-pop__foot",children:[fe.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",fe.jsxs("strong",{children:[Xi.symbol," ",i]})]}),fe.jsx(Gc,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})}function el({className:e}){return fe.jsx("span",{className:`ico ${Xi.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function wG(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Al(),a=e==null?void 0:e.address,{data:s,isLoading:o}=wP(a),{data:u}=IG(e),l=Ra(R=>R.items.length),c=ug(),[d,m]=Ye.useState(""),p=Ye.useRef();Ye.useEffect(()=>{i()},[i]);function E(R){c(R.trim()?`/assets?q=${encodeURIComponent(R.trim())}`:"/assets",{replace:!0})}function A(R){m(R),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>E(R),300)}return fe.jsxs(fe.Fragment,{children:[fe.jsx(Lq,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),fe.jsxs("div",{className:"subnav",children:[fe.jsxs("nav",{className:"subnav__tabs",children:[fe.jsx(Dn,{to:"/overview",children:"Overview"}),fe.jsx(Dn,{to:"/assets",children:"Assets"}),fe.jsx(Dn,{to:"/market",children:"Market"}),fe.jsx(Dn,{to:"/my-assets",children:"My Assets"}),fe.jsx(Dn,{to:"/my-favorites",children:"My Favorites"}),e?fe.jsx(Dn,{to:"/my-purchases",children:"My Purchases"}):null]}),fe.jsxs("div",{className:"subnav__search",children:[fe.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),fe.jsx("input",{value:d,placeholder:"Search item, creator, collection, name...",onChange:R=>A(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(p.current&&clearTimeout(p.current),E(d))}})]}),e?fe.jsxs("span",{className:"subnav__balance",title:`Your ${Xi.name}`,children:[fe.jsx(el,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,fe.jsxs(Dn,{to:"/credits",className:"subnav__credits",children:[fe.jsx(el,{className:"subnav__credits-ico"}),"Get ",Xi.name]}),fe.jsxs("div",{className:"subnav__cart-wrap",children:[fe.jsxs(Dn,{to:"/cart",className:"subnav__cart","aria-label":"Cart",children:[fe.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?fe.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),fe.jsx(AG,{})]})]})]})}let OG=0;const Zs=Ro(e=>({toasts:[],push:t=>{const r=++OG;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),W3={success:e=>Zs.getState().push({message:e,kind:"success"}),error:e=>Zs.getState().push({message:e,kind:"error"}),info:e=>Zs.getState().push({message:e,kind:"info"})},NG={success:"✓",error:"!",info:"i"};function PG({t:e}){const t=Zs(r=>r.dismiss);return Ye.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),fe.jsxs("div",{className:`toast toast--${e.kind}`,role:"status",onClick:()=>t(e.id),children:[fe.jsx("span",{className:"toast__icon","aria-hidden":!0,children:NG[e.kind]}),fe.jsx("span",{className:"toast__msg",children:e.message})]})}function MG(){const e=Zs(t=>t.toasts);return e.length===0?null:fe.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>fe.jsx(PG,{t},t.id))})}const CG=Ye.lazy(()=>Xt(()=>import("./index-BxSPmv0Y.js"),__vite__mapDeps([7,1,8,5,3,4,9])).then(e=>({default:e.WearablePreview})));function GP(e){return fe.jsx(Ye.Suspense,{fallback:null,children:fe.jsx(CG,{...e})})}function DG(){const[e,t]=Ye.useState(!1);return Ye.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?fe.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:fe.jsx(GP,{id:"preview-warmer",profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function jG(){const e=Al(t=>t.session);Ye.useEffect(()=>{if(!e||e.providerType!==oo.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}const d_=`${Dt.nftApiUrl}/v1`;function zP(e){if(!e)return 0;try{return Math.ceil(Number(yw(e))*10)}catch{return 0}}function Y3(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function K3(e){const{listings:t}=await Pl({contractAddress:e,first:200}),r={};for(const n of t)n.listingType!=="primary"||n.itemId==null||(r[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return r}async function $G(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${d_}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function WP(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 Pl(e){var i,a;const t=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&t.set("category",e.category),e.first!=null&&t.set("first",String(e.first)),e.skip!=null&&t.set("skip",String(e.skip)),e.contractAddress&&t.set("contractAddress",e.contractAddress),e.itemId!=null&&t.set("itemId",e.itemId),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.length&&t.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&t.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&t.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&t.set("search",e.search),e.sortBy&&t.set("sortBy",e.sortBy);const r=await fetch(`${Dt.marketplaceServerUrl}/v3/catalog/shop?${t.toString()}`);if(!r.ok)throw new Error(`fetchShopListings ${r.status}`);const n=await r.json();return{listings:n.data??[],total:n.total??0}}async function J3(e,t){const{listings:r}=await Pl({contractAddress:e,itemId:t,first:1});return r[0]?WP(r[0]):null}async function LG({first:e=100,...t}={}){const{listings:r,total:n}=await Pl({...t,first:e});return{items:r.map(WP),total:n}}function qG(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??Dt.chainId,createdAt:e.createdAt??0}}async function X3({first:e=100,...t}={}){var s,o;const r=new URLSearchParams;(t.category==="wearable"||t.category==="emote")&&r.set("category",t.category),r.set("first",String(e)),t.skip!=null&&r.set("skip",String(t.skip)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Dt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(qG),total:i.total??a.length}}async function Q3(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${d_}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,m,p,E;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?zP(l.order.price):void 0,tradeId:(E=l.order)==null?void 0:E.tradeId}}),total:o}}const kG="dcl:marketplace";async function Z3(e,t){const{TradeService:r}=await Xt(async()=>{const{TradeService:i}=await import("./TradeService-Bis1RE0m.js");return{TradeService:i}},__vite__mapDeps([10,5,1,11,2,6]));return new r(kG,Dt.marketplaceServerUrl,()=>t).addTrade(e)}async function YP(e){const t=await fetch(`${Dt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function BG(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${d_}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function x3(e){var u,l;let t;try{t=await YP(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=zP(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===oo.TradeAssetType.COLLECTION_ITEM){const c=await BG(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await $G(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 e4(e,t){var i;const{listings:r}=await Pl({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?YP(n):null}const UG={};function FG(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const co=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return co(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return co(n)(r)}}}},VG=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:R=>R,version:0,merge:(R,O)=>({...O,...R}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...R)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...R)},n,i);const c=co(a.serialize),d=()=>{const R=a.partialize({...n()});let O;const f=c({state:R,version:a.version}).then(v=>l.setItem(a.name,v)).catch(v=>{O=v});if(O)throw O;return f},m=i.setState;i.setState=(R,O)=>{m(R,O),d()};const p=e((...R)=>{r(...R),d()},n,i);let E;const A=()=>{var R;if(!l)return;s=!1,o.forEach(f=>f(n()));const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,n()))||void 0;return co(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var v;return E=a.merge(f,(v=n())!=null?v:p),r(E,!0),d()}).then(()=>{O==null||O(E,void 0),s=!0,u.forEach(f=>f(E))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:R=>{a={...a,...R},R.getStorage&&(l=R.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>A(),hasHydrated:()=>s,onHydrate:R=>(o.add(R),()=>{o.delete(R)}),onFinishHydration:R=>(u.add(R),()=>{u.delete(R)})},A(),E||p},HG=(e,t)=>(r,n,i)=>{let a={storage:FG(()=>localStorage),partialize:A=>A,version:0,merge:(A,R)=>({...R,...A}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...A)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...A)},n,i);const c=()=>{const A=a.partialize({...n()});return l.setItem(a.name,{state:A,version:a.version})},d=i.setState;i.setState=(A,R)=>{d(A,R),c()};const m=e((...A)=>{r(...A),c()},n,i);i.getInitialState=()=>m;let p;const E=()=>{var A,R;if(!l)return;s=!1,o.forEach(f=>{var v;return f((v=n())!=null?v:m)});const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,(A=n())!=null?A:m))||void 0;return co(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var v;const[b,h]=f;if(p=a.merge(h,(v=n())!=null?v:m),r(p,!0),b)return c()}).then(()=>{O==null||O(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:A=>{a={...a,...A},A.storage&&(l=A.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:A=>(o.add(A),()=>{o.delete(A)}),onFinishHydration:A=>(u.add(A),()=>{u.delete(A)})},a.skipHydration||E(),p||m},GG=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((UG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),VG(e,t)):HG(e,t),zG=GG,xA=Ro()(zG(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function WG(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function YG({address:e,className:t,linkToProfile:r}){var u,l;const n=ug(),{data:i}=wP(e);if(!e)return null;const a=(i==null?void 0:i.name)||WG(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=fe.jsxs(fe.Fragment,{children:[s?fe.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):fe.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),fe.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?fe.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):fe.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function ew(e){if(!e)return"#a09ba8";try{return oo.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function KG(e){const t=e.replace("#","");if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}const JG=120,XG=250;function QG(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function f_(e){const{item:t}=e,r=e.mode==="market",[n,i]=Ye.useState(!1),[a,s]=Ye.useState(!1),o=Ye.useRef(),u=Ye.useRef(),l=Ra(T=>T.add),c=Ra(T=>T.items.some(w=>w.id===t.id)),d=xA(T=>T.toggle),m=xA(T=>!!T.items[t.id]),p=ug(),E=!!t.contractAddress&&!!t.itemId,A=t.tokenId??t.itemId,R=!r&&!!t.contractAddress&&!!A;function O(){R&&p(`/item/${t.contractAddress}/${A}`,{state:{item:t,tradeId:t.tradeId}})}function f(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),JG)}function v(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function b(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),XG)}const h=QG(t.gender);return fe.jsxs("article",{className:`card${n?" card--hover":""}`,style:R?{cursor:"pointer"}:void 0,onMouseEnter:f,onMouseLeave:v,onClick:O,role:R?"link":void 0,tabIndex:R?0:void 0,onKeyDown:R?T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),O())}:void 0,children:[fe.jsxs("div",{className:"card__media",children:[fe.jsx("button",{className:`card__fav${m?" is-on":""}`,onClick:T=>{T.stopPropagation(),d(t)},"aria-label":m?"Remove from favorites":"Add to favorites",children:fe.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?fe.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&E?fe.jsxs(fe.Fragment,{children:[fe.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:fe.jsx(GP,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:b})}),fe.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:fe.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),fe.jsxs("div",{className:"card__body",children:[fe.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?fe.jsx(YG,{address:t.creator,className:"card__creator",linkToProfile:!0}):fe.jsx("div",{className:"card__creator",children:" "}),n?r&&e.mode==="market"?fe.jsx("button",{className:"card__cart",onClick:T=>{T.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"UNAVAILABLE":"BUY NOW"}):fe.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:T=>{T.stopPropagation(),l(t,"grid")},disabled:c,children:[fe.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),c?"IN CART":"ADD TO CART"]}):fe.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?fe.jsxs("div",{className:"card__price card__price--market",children:[fe.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),fe.jsx(el,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,fe.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):fe.jsxs("div",{className:"card__price",children:[fe.jsx(el,{className:"card__diamond"}),t.priceCredits]}),fe.jsxs("div",{className:"card__chips",children:[fe.jsx("span",{className:"chip chip--rarity",style:{background:ew(t.rarity),color:KG(ew(t.rarity))},children:t.rarity}),t.category==="wearable"?fe.jsx("span",{className:"chip chip--icon",children:fe.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,h?fe.jsx("span",{className:"chip chip--icon",children:h}):null]})]})]})]})}function ZG(e){if(!e)return 0;try{return Math.ceil(Number(yw(e))*10)}catch{return 0}}function xG(e){if(!e||e.length===0)return null;const t=e.some(n=>n.includes("Male")),r=e.some(n=>n.includes("Female"));return t&&r?"unisex":t?"male":r?"female":null}function KP(e){var t,r,n,i,a,s;return{id:e.id,name:e.name,creator:e.creator??"",contractAddress:e.contractAddress,itemId:e.itemId??null,category:e.category,wearableCategory:((r=(t=e.data)==null?void 0:t.wearable)==null?void 0:r.category)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:ZG(e.price??e.minPrice),gender:xG((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function t4(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(KP);return{items:o,total:s??r+o.length}}async function e3(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(KP);return{items:o,total:s??r+o.length}}const JP="shop:followed-creators:v1",t3=200;function r3(){try{const e=localStorage.getItem(JP);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function tw(e){try{localStorage.setItem(JP,JSON.stringify(e))}catch{}}const n3=Ro((e,t)=>({followed:r3(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,t3);tw(i),e({followed:i}),Ji("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);tw(i),e({followed:i}),Ji("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r)})),i3=8,a3=8,s3=12;function o3(){const t=n3(i=>i.followed).slice(0,i3),{data:r=[],isLoading:n}=tl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>e3(a,{first:a3}).then(s=>s.items).catch(()=>[])));return u3(i).filter(a=>a.priceCredits>0).slice(0,s3)}});return t.length===0||!n&&r.length===0?null:fe.jsxs("section",{className:"row",children:[fe.jsx("div",{className:"row__head",children:fe.jsx("h2",{className:"row__title",children:"From creators you follow"})}),fe.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>fe.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>fe.jsx(f_,{item:i},i.id))})]})}function u3(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const XP="shop:recently-viewed",QP=12;function ZP(){try{const e=localStorage.getItem(XP);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,QP):[]}catch{return[]}}function r4(e){if(e!=null&&e.id)try{const t=[e,...ZP().filter(r=>r.id!==e.id)].slice(0,QP);localStorage.setItem(XP,JSON.stringify(t))}catch{}}function c3({excludeId:e}){const t=Ye.useMemo(()=>ZP().filter(r=>r.id!==e),[e]);return t.length===0?null:fe.jsxs("section",{className:"row",children:[fe.jsx("div",{className:"row__head",children:fe.jsx("h2",{className:"row__title",children:"Recently viewed"})}),fe.jsx("div",{className:"row__track",children:t.map(r=>fe.jsx(f_,{item:r},r.id))})]})}function rw({title:e,items:t,loading:r}){return fe.jsxs("section",{className:"row",children:[fe.jsxs("div",{className:"row__head",children:[fe.jsx("h2",{className:"row__title",children:e}),fe.jsxs(Gc,{className:"row__viewall",to:"/assets",children:["VIEW ALL ",fe.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),fe.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>fe.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>fe.jsx(f_,{item:n},n.id))})]})}function l3(){const{data:e,isLoading:t}=tl({queryKey:["overview-listings"],queryFn:()=>LG({first:24})}),r=(e==null?void 0:e.items)??[];return fe.jsxs("div",{className:"overview",children:[fe.jsx("section",{className:"hero",children:fe.jsxs("div",{className:"hero__inner",children:[fe.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),fe.jsx(Gc,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),fe.jsx(o3,{}),fe.jsx(c3,{}),t||r.length>0?fe.jsxs(fe.Fragment,{children:[fe.jsx(rw,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?fe.jsx(rw,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):fe.jsxs("div",{className:"overview__empty",children:[fe.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),fe.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),fe.jsx(Gc,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]})]})}const d3={"/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"},f3=Ye.lazy(()=>Xt(()=>import("./Assets-aLMhp0dt.js"),__vite__mapDeps([12,1,13,14,15,5])).then(e=>({default:e.Assets}))),p3=Ye.lazy(()=>Xt(()=>import("./Market-D5ojlVRL.js"),__vite__mapDeps([16,1,17,11,5,13,14,18,19,15])).then(e=>({default:e.Market}))),m3=Ye.lazy(()=>Xt(()=>import("./ItemDetail-8nTYzMUv.js"),__vite__mapDeps([20,1,18,11,5,19,21])).then(e=>({default:e.ItemDetail}))),h3=Ye.lazy(()=>Xt(()=>import("./Collection-D2tlaWRj.js"),__vite__mapDeps([22,1,23,24,13,14,15,5])).then(e=>({default:e.Collection}))),y3=Ye.lazy(()=>Xt(()=>import("./Creator-nG5HN86G.js"),__vite__mapDeps([25,1,23,24,13,14,15,5])).then(e=>({default:e.Creator}))),g3=Ye.lazy(()=>Xt(()=>import("./MyAssets-D9VUj3Zr.js"),__vite__mapDeps([26,1,27,18,11,5,17,28,14,15,29])).then(e=>({default:e.MyAssets}))),_3=Ye.lazy(()=>Xt(()=>import("./MyFavorites-DeEu4CEV.js"),__vite__mapDeps([30,1,14,5])).then(e=>({default:e.MyFavorites}))),E3=Ye.lazy(()=>Xt(()=>import("./MyPurchases-DvIbgEFO.js"),__vite__mapDeps([31,1,14,15,5])).then(e=>({default:e.MyPurchases}))),v3=Ye.lazy(()=>Xt(()=>import("./ImportListings-CJDBHXeE.js"),__vite__mapDeps([32,1,27,18,11,5,17,28,33])).then(e=>({default:e.ImportListings}))),b3=Ye.lazy(()=>Xt(()=>import("./Cart-De2Zl3dM.js"),__vite__mapDeps([34,1,18,11,5,19])).then(e=>({default:e.Cart}))),T3=Ye.lazy(()=>Xt(()=>import("./GetCredits-Dpbjid38.js"),__vite__mapDeps([35,1,9,4,5])).then(e=>({default:e.GetCredits}))),S3=Ye.lazy(()=>Xt(()=>import("./Success-B3A8ZBjK.js"),__vite__mapDeps([36,1,28,5])).then(e=>({default:e.Success}))),I3=Ye.lazy(()=>Xt(()=>import("./NotFound-BK3mhtdy.js"),__vite__mapDeps([37,1])).then(e=>({default:e.NotFound})));function R3(){return fe.jsx("div",{className:"page-loading","aria-busy":"true",children:fe.jsx("span",{className:"spinner","aria-hidden":!0})})}function A3(){return fe.jsxs("div",{className:"overview__empty",children:[fe.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),fe.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),fe.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function w3(){jG();const e=pM();return Ye.useEffect(()=>{CH()},[]),Ye.useEffect(()=>{const t=e.pathname,r=d3[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");OH(r)},[e.pathname]),fe.jsxs(fe.Fragment,{children:[fe.jsx(MG,{}),fe.jsx(DG,{}),fe.jsx(wG,{}),fe.jsx("main",{className:"page",children:fe.jsx(Lg,{fallback:fe.jsx(A3,{}),children:fe.jsx(Ye.Suspense,{fallback:fe.jsx(R3,{}),children:fe.jsxs(mM,{children:[fe.jsx(sr,{path:"/",element:fe.jsx(hM,{to:"/overview",replace:!0})}),fe.jsx(sr,{path:"/overview",element:fe.jsx(l3,{})}),fe.jsx(sr,{path:"/assets",element:fe.jsx(f3,{})}),fe.jsx(sr,{path:"/market",element:fe.jsx(p3,{})}),fe.jsx(sr,{path:"/item/:contractAddress/:tokenId",element:fe.jsx(m3,{})}),fe.jsx(sr,{path:"/collection/:contractAddress",element:fe.jsx(h3,{})}),fe.jsx(sr,{path:"/creator/:address",element:fe.jsx(y3,{})}),fe.jsx(sr,{path:"/my-assets",element:fe.jsx(g3,{})}),fe.jsx(sr,{path:"/my-favorites",element:fe.jsx(_3,{})}),fe.jsx(sr,{path:"/my-purchases",element:fe.jsx(E3,{})}),fe.jsx(sr,{path:"/import",element:fe.jsx(v3,{})}),fe.jsx(sr,{path:"/cart",element:fe.jsx(b3,{})}),fe.jsx(sr,{path:"/credits",element:fe.jsx(T3,{})}),fe.jsx(sr,{path:"/success",element:fe.jsx(S3,{})}),fe.jsx(sr,{path:"*",element:fe.jsx(I3,{})})]})})})})]})}BH();const O3=new GM({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});yM.createRoot(document.getElementById("root")).render(fe.jsx(hw.StrictMode,{children:fe.jsx(WM,{client:O3,children:fe.jsx(gM,{children:fe.jsx(w3,{})})})}));export{$U as $,f_ as A,cb as B,Xi as C,n3 as D,e3 as E,el as F,W3 as G,z3 as H,X3 as I,j3 as J,D3 as K,nC as L,C3 as M,Nl as N,G3 as O,wP as P,qM as Q,k3 as R,r4 as S,J3 as T,Q3 as U,K3 as V,GP as W,OV as X,un as Y,Vr as Z,Xt as _,YG as a,bG as a0,No as a1,Zg as a2,cF as a3,KU as a4,Fg as a5,gN as a6,_N as a7,t4 as b,Al as c,V3 as d,tl as e,LG as f,x3 as g,YP as h,Dt as i,Ra as j,IG as k,zM as l,uo as m,e4 as n,F3 as o,Z3 as p,B3 as q,U3 as r,WR as s,Ji as t,xA as u,PH as v,H3 as w,Y3 as x,oo as y,Fr as z};
|
|
74
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(f,v){if(f){if(typeof f=="string")return m(f,v);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,v):void 0}}function m(f,v){(v==null||v>f.length)&&(v=f.length);for(var b=0,h=Array(v);b<v;b++)h[b]=f[b];return h}function p(f,v){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,T,w,P,B=[],J=!0,K=!1;try{if(w=(b=b.call(f)).next,v!==0)for(;!(J=(h=w.call(b)).done)&&(B.push(h.value),B.length!==v);J=!0);}catch(z){K=!0,T=z}finally{try{if(!J&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(K)throw T}}return B}}function E(f){if(Array.isArray(f))return f}var A={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},R=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(f,v){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(v=(0,o.default)(v,A),v.validate_length&&f.length>v.max_allowed_length)||!v.allow_fragments&&(0,i.default)(f,"#")||!v.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,T,w,P,B,J,K;J=f.split("#"),f=J.shift(),J=f.split("?"),f=J.shift();var z=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(ce){return U=!0,b=ce.toLowerCase(),v.require_valid_protocol&&v.protocols.indexOf(b)===-1?!1:f.substring(z[0].length)};if(z){var ue=z[1],ae=f.substring(z[0].length),re=ae.slice(0,2)==="//";if(re){if(f=F(ue),f===!1)return!1}else{var X=ae.indexOf("/"),W=X===-1?ae:ae.substring(0,X),$=W.indexOf("@");if($!==-1){var D=W.substring(0,$),L=/^[a-zA-Z0-9\-_.%:]*$/,H=L.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(H&&!N){if(v.require_protocol)return!1}else if(f=F(ue),f===!1)return!1}else{var j=/^[0-9]/.test(ae);if(j){if(v.require_protocol)return!1}else if(f=F(ue),f===!1)return!1}}}else if(v.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!v.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(J=f.split("/"),f=J.shift(),f===""&&!v.require_host)return!0;if(J=f.split("@"),J.length>1){if(v.disallow_auth||J[0]===""||(h=J.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}w=J.join("@"),B=null,K=null;var Ie=w.match(R);if(Ie?(T="",K=Ie[1],B=Ie[2]||null):(J=w.split(":"),T=J.shift(),J.length&&(B=J.join(":"))),B!==null&&B.length>0){if(P=parseInt(B,10),!/^[0-9]+$/.test(B)||P<=0||P>65535)return!1}else if(v.require_port)return!1;return v.host_whitelist?(0,n.default)(T,v.host_whitelist):T===""&&!v.require_host?!0:!(!(0,s.default)(T)&&!(0,a.default)(T,v)&&(!K||!(0,s.default)(K,6))||(T=T||K,v.host_blacklist&&(0,n.default)(T,v.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(Cc,Cc.exports)),Cc.exports}var bh={},UR;function bP(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(bh)),bh}var FR;function TV(){if(FR)return Lr;FR=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.clearIdentity=Lr.storeIdentity=Lr.getIdentity=Lr.init=void 0;const e=bV(),t=bP(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(R,O={}){if(!(0,e.default)(R,{...o,...O}))throw new Error(`Invalid url: ${R}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=R,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=R}Lr.init=u;async function l(R){let O;try{O=(await p(await m(),t.Action.GET,{user:R})).identity??null}catch(f){A(f),O=(0,t.localStorageGetIdentity)(R)}return O}Lr.getIdentity=l;async function c(R,O){try{await p(await m(),t.Action.STORE,{user:R,identity:O})}catch(f){A(f),(0,t.localStorageStoreIdentity)(R,O)}}Lr.storeIdentity=c;async function d(R){try{await p(await m(),t.Action.CLEAR,{user:R})}catch(O){A(O),(0,t.localStorageClearIdentity)(R)}}Lr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let R=0;R<i;R++){const O=document.getElementById(r),f=O==null?void 0:O.contentWindow;if(!f){await E(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(R,O,f,v=0){a++;const b=a;let h=null;const T=new Promise((w,P)=>{h=({data:B})=>{!B||B.target!==t.SINGLE_SIGN_ON_TARGET||B.id!==b||(B.error?P(new Error(B.error)):w(B))},window.addEventListener("message",h)});R.postMessage((0,t.createMessage)({id:b,action:O,...f}),s);try{return await(v?Promise.race([T,new Promise((w,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),v))]):T)}catch(w){throw w}finally{h&&window.removeEventListener("message",h)}}function E(R){return new Promise(O=>setTimeout(O,R))}function A(R){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",R.message)}return Lr}var VR;function SV(){return VR||(VR=1,(function(e){var t=Mi&&Mi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Mi&&Mi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(TV(),e),r(bP(),e)})(Mi)),Mi}var ag=SV();function IV(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?un.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?un.STAGING:t.endsWith(".io")||t.endsWith(".zone")?un.DEVELOPMENT:null}function RV(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(SP(n))return n}return null}var HR={},un;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(un||(un={}));function TP(){return Object.values(un)}function SP(e){return TP().includes(e)}function Bc(e){if(SP(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${TP().map(t=>`"${t}"`).join(", ")}.`)}function AV(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?Bc(t):r?Bc(r):n?Bc(n):i?Bc(i):un.PRODUCTION}function wV(e){if(typeof window<"u"){const r=RV(window.location);if(r)return r;const n=IV(window.location);if(n)return n}return AV(typeof e>"u"&&typeof Uc=="object"&&typeof HR=="object"?HR:e)}function OV(e,t){const r=wV(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const NV="development",PV="80002",MV="https://marketplace-api.decentraland.zone",CV="https://marketplace-api.decentraland.zone",DV="/auth",jV="https://rpc.decentraland.org/amoy",$V="https://credits.decentraland.zone",LV="https://builder-api.decentraland.zone",qV="https://peer.decentraland.zone",kV="",BV="",UV="",FV="",VV={ENVIRONMENT:NV,CHAIN_ID:PV,MARKETPLACE_SERVER_URL:MV,NFT_API_URL:CV,AUTH_URL:DV,RPC_URL:jV,CREDITS_SERVER_URL:$V,BUILDER_SERVER_URL:LV,PEER_URL:qV,SHOP_SERVER_URL:kV,STRIPE_PUBLISHABLE_KEY:BV,SEGMENT_WRITE_KEY:UV,SENTRY_DSN:FV},HV="staging",GV="80002",zV="https://marketplace-api.decentraland.zone",WV="https://marketplace-api.decentraland.zone",YV="/auth",KV="https://rpc.decentraland.org/amoy",JV="https://credits.decentraland.zone",XV="https://builder-api.decentraland.zone",QV="https://peer.decentraland.zone",ZV="",xV="",eH="",tH="",rH={ENVIRONMENT:HV,CHAIN_ID:GV,MARKETPLACE_SERVER_URL:zV,NFT_API_URL:WV,AUTH_URL:YV,RPC_URL:KV,CREDITS_SERVER_URL:JV,BUILDER_SERVER_URL:XV,PEER_URL:QV,SHOP_SERVER_URL:ZV,STRIPE_PUBLISHABLE_KEY:xV,SEGMENT_WRITE_KEY:eH,SENTRY_DSN:tH},nH="production",iH="137",aH="https://marketplace-api.decentraland.org",sH="https://marketplace-api.decentraland.org",oH="/auth",uH="https://rpc.decentraland.org/polygon",cH="https://credits.decentraland.org",lH="https://builder-api.decentraland.org",dH="https://peer.decentraland.org",fH="",pH="",mH="",hH="",yH={ENVIRONMENT:nH,CHAIN_ID:iH,MARKETPLACE_SERVER_URL:aH,NFT_API_URL:sH,AUTH_URL:oH,RPC_URL:uH,CREDITS_SERVER_URL:cH,BUILDER_SERVER_URL:lH,PEER_URL:dH,SHOP_SERVER_URL:fH,STRIPE_PUBLISHABLE_KEY:pH,SEGMENT_WRITE_KEY:mH,SENTRY_DSN:hH},gH={},br=OV({[un.DEVELOPMENT]:VV,[un.STAGING]:rH,[un.PRODUCTION]:yH},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),rr=gH,Dt={marketplaceServerUrl:rr.VITE_MARKETPLACE_SERVER_URL??br.get("MARKETPLACE_SERVER_URL"),nftApiUrl:rr.VITE_NFT_API_URL??br.get("NFT_API_URL"),chainId:Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID")),authUrl:rr.VITE_AUTH_URL??br.get("AUTH_URL"),rpcUrl:rr.VITE_RPC_URL??br.get("RPC_URL"),creditsServerUrl:rr.VITE_CREDITS_SERVER_URL??br.get("CREDITS_SERVER_URL"),builderServerUrl:rr.VITE_BUILDER_SERVER_URL??br.get("BUILDER_SERVER_URL"),peerUrl:rr.VITE_PEER_URL??br.get("PEER_URL"),shopServerUrl:rr.VITE_SHOP_SERVER_URL??br.get("SHOP_SERVER_URL"),stripePublishableKey:rr.VITE_STRIPE_PK??br.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:rr.VITE_SEGMENT_WRITE_KEY??br.get("SEGMENT_WRITE_KEY"),sentryDsn:rr.VITE_SENTRY_DSN??br.get("SENTRY_DSN"),sentryEnvironment:rr.VITE_SENTRY_ENVIRONMENT??(Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:rr.VITE_SENTRY_RELEASE??`shop@${rr.VITE_APP_VERSION??"0.0.0-dev"}`},_H=744*60;async function IP(){return(await Xt(async()=>{const{connection:e}=await import("./index-POoM1fB4.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([6,1]))).connection}async function EH(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new _M(e.provider),n=r.getSigner();let i=ag.localStorageGetIdentity(t);if(!i){const a=EM.createRandom();i=await yV.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:C_(a.publicKey),privateKey:C_(a.privateKey)},_H,s=>n.signMessage(s)),ag.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function vH(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Dt.authUrl}/login?redirectTo=${e}`)}async function bH(){try{const t=await(await IP()).tryPreviousConnection();return!t.account||!ag.localStorageGetIdentity(t.account.toLowerCase())?null:await EH(t)}catch{return null}}async function TH(){try{await(await IP()).disconnect()}catch{}}const SH=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,IH=Dt.chainId===80002?"amoy":"polygon",RH=Dt.chainId===80002?"dev":"prod";function RP(){return window.analytics}function AH(){let e=null;try{e=Al.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:SH,network:IH,app_env:RH}}function Ji(e,t={}){const r={...AH(),...t},n=RP();n&&n.track(e,r)}function wH(e,t={}){const r=RP();r&&r.identify(e.toLowerCase(),t)}function OH(e){Ji("Shop Viewed Page",{page:e})}function GR(e){return e===oo.ProviderType.MAGIC||e===oo.ProviderType.MAGIC_TEST?"magic":"wallet"}function NH(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function uo(e){return Math.round(e*10)/100}function AP(e){return!e.tokenId}function k3(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:uo(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:AP(e)}}function B3(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(AP);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:uo(n.priceCredits)})),value_credits:t,value_usd:uo(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function PH(e){const t=e;if((t==null?void 0:t.code)===4001)return"user_rejected";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("reject")||r.includes("denied")||r.includes("cancel")?"user_rejected":r.includes("insufficient")?"insufficient_credits":r.includes("not for sale")||r.includes("no active listing")||r.includes("sold")?"not_for_sale":"unknown"}function U3(e){return PH(e)==="user_rejected"}function MH(e){const t=window;if(t.analytics&&t.analytics.invoked)return;const r=t.analytics||[];r.invoked=!0,r.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],r.factory=n=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let zR=!1;function CH(){if(zR)return;zR=!0;const e=Dt.segmentWriteKey;e&&MH(e)}let sg=null;function DH(e){sg=e}function WR(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),sg)try{sg(e,t)}catch{}}const jH=/0x[a-fA-F0-9]{130}\b/g,$H=/0x[a-fA-F0-9]{64}\b/g,LH=/(sk_[a-z]+_[A-Za-z0-9]+|pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+|[A-Za-z0-9-]*secret[A-Za-z0-9-]*)/gi,qH=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Ss(e){return e.replace(jH,"<signature>").replace(LH,"<secret>").replace($H,"<hex32>")}function kH(e){var r;e.message&&(e.message=Ss(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Ss(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Ss(n.message));e.request&&(e.request.url&&(e.request.url=Ss(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(qH.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Ss(n[i]))}};return t(e.tags),t(e.extra),e}let YR=!1;function BH(){if(YR)return;const e=Dt.sentryDsn;if(!e)return;YR=!0,Oq({dsn:e,environment:Dt.sentryEnvironment,release:Dt.sentryRelease,integrations:[new hL],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:kH});const t=UH();t&&kD({id:t}),DH((r,n)=>Ig(r,{extra:n}))}function UH(){var e;try{return((e=Al.getState().session)==null?void 0:e.address)??null}catch{return null}}const Th="shop:signing_in",Al=Ro(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(Th,"1")}catch{}vH()},disconnect:async()=>{Ji("Shop Signed Out");try{await TH()}catch(t){WR(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await bH()}catch(n){WR(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),wH(t.address,{sign_in_method:GR(t.providerType)});let r=!1;try{r=sessionStorage.getItem(Th)==="1",r&&sessionStorage.removeItem(Th)}catch{}r&&Ji("Shop Signed In",{method:GR(t.providerType),is_new_user:NH(t.address)})}})),FH=Dt.peerUrl;function wP(e){return tl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${FH}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return;const r=await t.json();return(n=r==null?void 0:r.avatars)==null?void 0:n[0]}})}var En={},Sh={},KR;function OP(){return KR||(KR=1,Object.defineProperty(Sh,"__esModule",{value:!0})),Sh}var vn={},xr={},ya={},Ci={},JR={},Is,XR;function zr(){if(XR)return Is;XR=1;var e=function(t){return t&&t.Math===Math&&t};return Is=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof vy=="object"&&vy)||e(typeof Is=="object"&&Is)||(function(){return this})()||Function("return this")(),Is}var Ih,QR;function oa(){return QR||(QR=1,Ih=function(e){try{return!!e()}catch{return!0}}),Ih}var Rh,ZR;function wl(){if(ZR)return Rh;ZR=1;var e=oa();return Rh=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Rh}var Ah,xR;function VH(){if(xR)return Ah;xR=1;var e=wl(),t=Function.prototype,r=t.apply,n=t.call;return Ah=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Ah}var wh,eA;function es(){if(eA)return wh;eA=1;var e=wl(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return wh=e?n:function(i){return function(){return r.apply(i,arguments)}},wh}var Oh,tA;function NP(){if(tA)return Oh;tA=1;var e=es(),t=e({}.toString),r=e("".slice);return Oh=function(n){return r(t(n),8,-1)},Oh}var Nh,rA;function PP(){if(rA)return Nh;rA=1;var e=NP(),t=es();return Nh=function(r){if(e(r)==="Function")return t(r)},Nh}var Ph,nA;function ua(){if(nA)return Ph;nA=1;var e=typeof document=="object"&&document.all;return Ph=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Ph}var Mh={},Ch,iA;function Mo(){if(iA)return Ch;iA=1;var e=oa();return Ch=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ch}var Dh,aA;function c_(){if(aA)return Dh;aA=1;var e=wl(),t=Function.prototype.call;return Dh=e?t.bind(t):function(){return t.apply(t,arguments)},Dh}var jh={},sA;function HH(){if(sA)return jh;sA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return jh.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,jh}var $h,oA;function MP(){return oA||(oA=1,$h=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),$h}var Lh,uA;function GH(){if(uA)return Lh;uA=1;var e=es(),t=oa(),r=NP(),n=Object,i=e("".split);return Lh=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,Lh}var qh,cA;function CP(){return cA||(cA=1,qh=function(e){return e==null}),qh}var kh,lA;function DP(){if(lA)return kh;lA=1;var e=CP(),t=TypeError;return kh=function(r){if(e(r))throw new t("Can't call method on "+r);return r},kh}var Bh,dA;function zH(){if(dA)return Bh;dA=1;var e=GH(),t=DP();return Bh=function(r){return e(t(r))},Bh}var Uh,fA;function Ol(){if(fA)return Uh;fA=1;var e=ua();return Uh=function(t){return typeof t=="object"?t!==null:e(t)},Uh}var Fh,pA;function jP(){return pA||(pA=1,Fh={}),Fh}var Vh,mA;function WH(){if(mA)return Vh;mA=1;var e=jP(),t=zr(),r=ua(),n=function(i){return r(i)?i:void 0};return Vh=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Vh}var Hh,hA;function YH(){if(hA)return Hh;hA=1;var e=es();return Hh=e({}.isPrototypeOf),Hh}var Gh,yA;function KH(){if(yA)return Gh;yA=1;var e=zr(),t=e.navigator,r=t&&t.userAgent;return Gh=r?String(r):"",Gh}var zh,gA;function JH(){if(gA)return zh;gA=1;var e=zr(),t=KH(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),zh=o,zh}var Wh,_A;function $P(){if(_A)return Wh;_A=1;var e=JH(),t=oa(),r=zr(),n=r.String;return Wh=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Wh}var Yh,EA;function LP(){if(EA)return Yh;EA=1;var e=$P();return Yh=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Yh}var Kh,vA;function qP(){if(vA)return Kh;vA=1;var e=WH(),t=ua(),r=YH(),n=LP(),i=Object;return Kh=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Kh}var Jh,bA;function XH(){if(bA)return Jh;bA=1;var e=String;return Jh=function(t){try{return e(t)}catch{return"Object"}},Jh}var Xh,TA;function kP(){if(TA)return Xh;TA=1;var e=ua(),t=XH(),r=TypeError;return Xh=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Xh}var Qh,SA;function QH(){if(SA)return Qh;SA=1;var e=kP(),t=CP();return Qh=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Qh}var Zh,IA;function ZH(){if(IA)return Zh;IA=1;var e=c_(),t=ua(),r=Ol(),n=TypeError;return Zh=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},Zh}var xh={exports:{}},ey,RA;function xH(){return RA||(RA=1,ey=!0),ey}var ty,AA;function eG(){if(AA)return ty;AA=1;var e=zr(),t=Object.defineProperty;return ty=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},ty}var wA;function tG(){if(wA)return xh.exports;wA=1;var e=xH(),t=zr(),r=eG(),n="__core-js_shared__",i=xh.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),xh.exports}var ry,OA;function rG(){if(OA)return ry;OA=1;var e=tG();return ry=function(t,r){return e[t]||(e[t]=r||{})},ry}var ny,NA;function nG(){if(NA)return ny;NA=1;var e=DP(),t=Object;return ny=function(r){return t(e(r))},ny}var iy,PA;function l_(){if(PA)return iy;PA=1;var e=es(),t=nG(),r=e({}.hasOwnProperty);return iy=Object.hasOwn||function(i,a){return r(t(i),a)},iy}var ay,MA;function iG(){if(MA)return ay;MA=1;var e=es(),t=0,r=Math.random(),n=e(1.1.toString);return ay=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},ay}var sy,CA;function aG(){if(CA)return sy;CA=1;var e=zr(),t=rG(),r=l_(),n=iG(),i=$P(),a=LP(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return sy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},sy}var oy,DA;function sG(){if(DA)return oy;DA=1;var e=c_(),t=Ol(),r=qP(),n=QH(),i=ZH(),a=aG(),s=TypeError,o=a("toPrimitive");return oy=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},oy}var uy,jA;function BP(){if(jA)return uy;jA=1;var e=sG(),t=qP();return uy=function(r){var n=e(r,"string");return t(n)?n:n+""},uy}var cy,$A;function oG(){if($A)return cy;$A=1;var e=zr(),t=Ol(),r=e.document,n=t(r)&&t(r.createElement);return cy=function(i){return n?r.createElement(i):{}},cy}var ly,LA;function UP(){if(LA)return ly;LA=1;var e=Mo(),t=oa(),r=oG();return ly=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),ly}var qA;function uG(){if(qA)return Mh;qA=1;var e=Mo(),t=c_(),r=HH(),n=MP(),i=zH(),a=BP(),s=l_(),o=UP(),u=Object.getOwnPropertyDescriptor;return Mh.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},Mh}var dy,kA;function cG(){if(kA)return dy;kA=1;var e=oa(),t=ua(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return dy=n,dy}var fy,BA;function lG(){if(BA)return fy;BA=1;var e=PP(),t=kP(),r=wl(),n=e(e.bind);return fy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},fy}var py={},my,UA;function dG(){if(UA)return my;UA=1;var e=Mo(),t=oa();return my=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),my}var hy,FA;function fG(){if(FA)return hy;FA=1;var e=Ol(),t=String,r=TypeError;return hy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},hy}var VA;function pG(){if(VA)return py;VA=1;var e=Mo(),t=UP(),r=dG(),n=fG(),i=BP(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return py.f=e?r?function(m,p,E){if(n(m),p=i(p),n(E),typeof m=="function"&&p==="prototype"&&"value"in E&&c in E&&!E[c]){var A=o(m,p);A&&A[c]&&(m[p]=E.value,E={configurable:l in E?E[l]:A[l],enumerable:u in E?E[u]:A[u],writable:!1})}return s(m,p,E)}:s:function(m,p,E){if(n(m),p=i(p),n(E),t)try{return s(m,p,E)}catch{}if("get"in E||"set"in E)throw new a("Accessors not supported");return"value"in E&&(m[p]=E.value),m},py}var yy,HA;function mG(){if(HA)return yy;HA=1;var e=Mo(),t=pG(),r=MP();return yy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},yy}var gy,GA;function hG(){if(GA)return gy;GA=1;var e=zr(),t=VH(),r=PP(),n=ua(),i=uG().f,a=cG(),s=jP(),o=lG(),u=mG(),l=l_(),c=function(d){var m=function(p,E,A){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,E)}return new d(p,E,A)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return gy=function(d,m){var p=d.target,E=d.global,A=d.stat,R=d.proto,O=E?e:A?e[p]:e[p]&&e[p].prototype,f=E?s:s[p]||u(s,p,{})[p],v=f.prototype,b,h,T,w,P,B,J,K,z;for(w in m)b=a(E?w:p+(A?".":"#")+w,d.forced),h=!b&&O&&l(O,w),B=f[w],h&&(d.dontCallGetSet?(z=i(O,w),J=z&&z.value):J=O[w]),P=h&&J?J:m[w],!(!b&&!R&&typeof B==typeof P)&&(d.bind&&h?K=o(P,e):d.wrap&&h?K=c(P):R&&n(P)?K=r(P):K=P,(d.sham||P&&P.sham||B&&B.sham)&&u(K,"sham",!0),u(f,w,K),R&&(T=p+"Prototype",l(s,T)||u(s,T,{}),u(s[T],w,P),d.real&&v&&(b||!v[w])&&u(v,w,P)))},gy}var zA;function yG(){if(zA)return JR;zA=1;var e=hG(),t=zr();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),JR}var _y,WA;function gG(){return WA||(WA=1,yG(),_y=zr()),_y}var Ey,YA;function _G(){if(YA)return Ey;YA=1;var e=gG();return Ey=e,Ey}var KA;function FP(){if(KA)return Ci;KA=1;var e=Ci&&Ci.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.getImplementation=void 0;var t=e(_G());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return Ci.getImplementation=r,Ci}var JA;function VP(){if(JA)return ya;JA=1;var e=ya&&ya.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ya,"__esModule",{value:!0});var t=EP(),r=FP(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,m,p,E){var A,R,O=new u(E),f=String(Date.now()),v=JSON.stringify(p),b=[d,m,f,v].join(":").toLowerCase(),h=0,T=t.Authenticator.signPayload(c,b);try{for(var w=e(T),P=w.next();!P.done;P=w.next()){var B=P.value;O.set(n+h,JSON.stringify(B)),h++}}catch(J){A={error:J}}finally{try{P&&!P.done&&(R=w.return)&&R.call(w)}finally{if(A)throw A.error}}return O.set(i,f),O.set(a,v),O}}return ya.default=s,ya}var XA;function HP(){if(XA)return xr;XA=1;var e=xr&&xr.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=xr&&xr.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=xr&&xr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(xr,"__esModule",{value:!0});var n=r(VP()),i=FP();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(m,p){if(p&&p.identity){var E=p.identity,A=p.metadata,R=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var O=typeof m=="string"?new u(m):m,f=new l(O.toString(),e(e({},R),{headers:o(E,p.method||"GET",O.pathname,A||{},R==null?void 0:R.headers)}));return c(f)}var v=new u(m.url),b=new l(m),h=o(E,m.method||"GET",v.pathname,A||{});return h.forEach(function(T,w){b.headers.set(w,T)}),c(b)}return c(m,p)}}return xr.default=a,xr}var QA;function EG(){return QA||(QA=1,(function(e){var t=vn&&vn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=vn&&vn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=vn&&vn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(OP(),e);var i=HP();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=VP();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(vn)),vn}var ZA;function vG(){return ZA||(ZA=1,(function(e){var t=En&&En.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=En&&En.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=En&&En.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(OP(),e),r(EG(),e);var i=n(HP());e.default=(0,i.default)()})(En)),En}var bG=vG();const Nl=mw(bG);async function TG(e,t){const r=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await Nl(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function SG(e,t){const{usd:r}=await TG(e,t);return r??{balanceCents:0,credits:0}}async function F3(e,t,r){const n=`${Dt.creditsServerUrl}/credits/authorize`,i=await Nl(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function V3(e,t,r){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(r.first)),(r==null?void 0:r.skip)!=null&&n.set("offset",String(r.skip));const i=n.toString(),a=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await Nl(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function H3(e,t){if(t.length===0)return 0;const r=`${Dt.creditsServerUrl}/credits/authorize/cancel`,n=await Nl(r,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:t})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function G3(e,t=1e3){const r=await fetch(`${Dt.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:t})});if(!r.ok)throw new Error(`devMintUsd ${r.status}: ${await r.text()}`);return r.json()}function IG(e){return tl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>SG(e.address,e.identity)})}const RG=e=>uo(e.reduce((t,r)=>t+r.priceCredits,0)),Ra=Ro((e,t)=>({items:[],open:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;Ji("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:uo(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:RG(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&Ji("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r})})),Xi={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function z3(e){return`${e} ${e===1?Xi.nameSingular:Xi.name}`}function AG(){const e=Ra(a=>a.items),t=Ra(a=>a.open),r=Ra(a=>a.setOpen),n=Ye.useRef(null),i=e.reduce((a,s)=>a+s.priceCredits,0);return Ye.useEffect(()=>{if(!t)return;const a=setTimeout(()=>r(!1),4500),s=o=>{n.current&&!n.current.contains(o.target)&&r(!1)};return document.addEventListener("mousedown",s),()=>{clearTimeout(a),document.removeEventListener("mousedown",s)}},[t,e.length,r]),!t||e.length===0?null:fe.jsxs("div",{className:"cart-pop",ref:n,role:"dialog","aria-label":"Cart",children:[fe.jsxs("div",{className:"cart-pop__head",children:[fe.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),fe.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(a=>fe.jsxs("div",{className:"cart-pop__row",children:[fe.jsx("div",{className:"cart-pop__thumb",children:a.thumbnail?fe.jsx("img",{src:a.thumbnail,alt:a.name}):null}),fe.jsx("div",{className:"cart-pop__name",title:a.name,children:a.name}),fe.jsxs("div",{className:"cart-pop__price",children:[Xi.symbol," ",a.priceCredits]})]},a.id))}),fe.jsxs("div",{className:"cart-pop__foot",children:[fe.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",fe.jsxs("strong",{children:[Xi.symbol," ",i]})]}),fe.jsx(Gc,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})}function el({className:e}){return fe.jsx("span",{className:`ico ${Xi.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function wG(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Al(),a=e==null?void 0:e.address,{data:s,isLoading:o}=wP(a),{data:u}=IG(e),l=Ra(R=>R.items.length),c=ug(),[d,m]=Ye.useState(""),p=Ye.useRef();Ye.useEffect(()=>{i()},[i]);function E(R){c(R.trim()?`/assets?q=${encodeURIComponent(R.trim())}`:"/assets",{replace:!0})}function A(R){m(R),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>E(R),300)}return fe.jsxs(fe.Fragment,{children:[fe.jsx(Lq,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),fe.jsxs("div",{className:"subnav",children:[fe.jsxs("nav",{className:"subnav__tabs",children:[fe.jsx(Dn,{to:"/overview",children:"Overview"}),fe.jsx(Dn,{to:"/assets",children:"Assets"}),fe.jsx(Dn,{to:"/market",children:"Market"}),fe.jsx(Dn,{to:"/my-assets",children:"My Assets"}),fe.jsx(Dn,{to:"/my-favorites",children:"My Favorites"}),e?fe.jsx(Dn,{to:"/my-purchases",children:"My Purchases"}):null]}),fe.jsxs("div",{className:"subnav__search",children:[fe.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),fe.jsx("input",{value:d,placeholder:"Search item, creator, collection, name...",onChange:R=>A(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(p.current&&clearTimeout(p.current),E(d))}})]}),e?fe.jsxs("span",{className:"subnav__balance",title:`Your ${Xi.name}`,children:[fe.jsx(el,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,fe.jsxs(Dn,{to:"/credits",className:"subnav__credits",children:[fe.jsx(el,{className:"subnav__credits-ico"}),"Get ",Xi.name]}),fe.jsxs("div",{className:"subnav__cart-wrap",children:[fe.jsxs(Dn,{to:"/cart",className:"subnav__cart","aria-label":"Cart",children:[fe.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?fe.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),fe.jsx(AG,{})]})]})]})}let OG=0;const Zs=Ro(e=>({toasts:[],push:t=>{const r=++OG;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),W3={success:e=>Zs.getState().push({message:e,kind:"success"}),error:e=>Zs.getState().push({message:e,kind:"error"}),info:e=>Zs.getState().push({message:e,kind:"info"})},NG={success:"✓",error:"!",info:"i"};function PG({t:e}){const t=Zs(r=>r.dismiss);return Ye.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),fe.jsxs("div",{className:`toast toast--${e.kind}`,role:"status",onClick:()=>t(e.id),children:[fe.jsx("span",{className:"toast__icon","aria-hidden":!0,children:NG[e.kind]}),fe.jsx("span",{className:"toast__msg",children:e.message})]})}function MG(){const e=Zs(t=>t.toasts);return e.length===0?null:fe.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>fe.jsx(PG,{t},t.id))})}const CG=Ye.lazy(()=>Xt(()=>import("./index-CeSnh-cF.js"),__vite__mapDeps([7,1,8,5,3,4,9])).then(e=>({default:e.WearablePreview})));function GP(e){return fe.jsx(Ye.Suspense,{fallback:null,children:fe.jsx(CG,{...e})})}function DG(){const[e,t]=Ye.useState(!1);return Ye.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?fe.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:fe.jsx(GP,{id:"preview-warmer",profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function jG(){const e=Al(t=>t.session);Ye.useEffect(()=>{if(!e||e.providerType!==oo.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}const d_=`${Dt.nftApiUrl}/v1`;function zP(e){if(!e)return 0;try{return Math.ceil(Number(yw(e))*10)}catch{return 0}}function Y3(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function K3(e){const{listings:t}=await Pl({contractAddress:e,first:200}),r={};for(const n of t)n.listingType!=="primary"||n.itemId==null||(r[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return r}async function $G(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${d_}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function WP(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 Pl(e){var i,a;const t=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&t.set("category",e.category),e.first!=null&&t.set("first",String(e.first)),e.skip!=null&&t.set("skip",String(e.skip)),e.contractAddress&&t.set("contractAddress",e.contractAddress),e.itemId!=null&&t.set("itemId",e.itemId),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.length&&t.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&t.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&t.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&t.set("search",e.search),e.sortBy&&t.set("sortBy",e.sortBy);const r=await fetch(`${Dt.marketplaceServerUrl}/v3/catalog/shop?${t.toString()}`);if(!r.ok)throw new Error(`fetchShopListings ${r.status}`);const n=await r.json();return{listings:n.data??[],total:n.total??0}}async function J3(e,t){const{listings:r}=await Pl({contractAddress:e,itemId:t,first:1});return r[0]?WP(r[0]):null}async function LG({first:e=100,...t}={}){const{listings:r,total:n}=await Pl({...t,first:e});return{items:r.map(WP),total:n}}function qG(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??Dt.chainId,createdAt:e.createdAt??0}}async function X3({first:e=100,...t}={}){var s,o;const r=new URLSearchParams;(t.category==="wearable"||t.category==="emote")&&r.set("category",t.category),r.set("first",String(e)),t.skip!=null&&r.set("skip",String(t.skip)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Dt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(qG),total:i.total??a.length}}async function Q3(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${d_}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,m,p,E;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?zP(l.order.price):void 0,tradeId:(E=l.order)==null?void 0:E.tradeId}}),total:o}}const kG="dcl:marketplace";async function Z3(e,t){const{TradeService:r}=await Xt(async()=>{const{TradeService:i}=await import("./TradeService-BK-xq9ht.js");return{TradeService:i}},__vite__mapDeps([10,5,1,11,2,6]));return new r(kG,Dt.marketplaceServerUrl,()=>t).addTrade(e)}async function YP(e){const t=await fetch(`${Dt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function BG(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${d_}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function x3(e){var u,l;let t;try{t=await YP(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=zP(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===oo.TradeAssetType.COLLECTION_ITEM){const c=await BG(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await $G(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 e4(e,t){var i;const{listings:r}=await Pl({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?YP(n):null}const UG={};function FG(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const co=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return co(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return co(n)(r)}}}},VG=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:R=>R,version:0,merge:(R,O)=>({...O,...R}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...R)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...R)},n,i);const c=co(a.serialize),d=()=>{const R=a.partialize({...n()});let O;const f=c({state:R,version:a.version}).then(v=>l.setItem(a.name,v)).catch(v=>{O=v});if(O)throw O;return f},m=i.setState;i.setState=(R,O)=>{m(R,O),d()};const p=e((...R)=>{r(...R),d()},n,i);let E;const A=()=>{var R;if(!l)return;s=!1,o.forEach(f=>f(n()));const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,n()))||void 0;return co(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var v;return E=a.merge(f,(v=n())!=null?v:p),r(E,!0),d()}).then(()=>{O==null||O(E,void 0),s=!0,u.forEach(f=>f(E))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:R=>{a={...a,...R},R.getStorage&&(l=R.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>A(),hasHydrated:()=>s,onHydrate:R=>(o.add(R),()=>{o.delete(R)}),onFinishHydration:R=>(u.add(R),()=>{u.delete(R)})},A(),E||p},HG=(e,t)=>(r,n,i)=>{let a={storage:FG(()=>localStorage),partialize:A=>A,version:0,merge:(A,R)=>({...R,...A}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...A)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...A)},n,i);const c=()=>{const A=a.partialize({...n()});return l.setItem(a.name,{state:A,version:a.version})},d=i.setState;i.setState=(A,R)=>{d(A,R),c()};const m=e((...A)=>{r(...A),c()},n,i);i.getInitialState=()=>m;let p;const E=()=>{var A,R;if(!l)return;s=!1,o.forEach(f=>{var v;return f((v=n())!=null?v:m)});const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,(A=n())!=null?A:m))||void 0;return co(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var v;const[b,h]=f;if(p=a.merge(h,(v=n())!=null?v:m),r(p,!0),b)return c()}).then(()=>{O==null||O(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:A=>{a={...a,...A},A.storage&&(l=A.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:A=>(o.add(A),()=>{o.delete(A)}),onFinishHydration:A=>(u.add(A),()=>{u.delete(A)})},a.skipHydration||E(),p||m},GG=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((UG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),VG(e,t)):HG(e,t),zG=GG,xA=Ro()(zG(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function WG(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function YG({address:e,className:t,linkToProfile:r}){var u,l;const n=ug(),{data:i}=wP(e);if(!e)return null;const a=(i==null?void 0:i.name)||WG(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=fe.jsxs(fe.Fragment,{children:[s?fe.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):fe.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),fe.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?fe.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):fe.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function ew(e){if(!e)return"#a09ba8";try{return oo.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function KG(e){const t=e.replace("#","");if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}const JG=120,XG=250;function QG(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function f_(e){const{item:t}=e,r=e.mode==="market",[n,i]=Ye.useState(!1),[a,s]=Ye.useState(!1),o=Ye.useRef(),u=Ye.useRef(),l=Ra(T=>T.add),c=Ra(T=>T.items.some(w=>w.id===t.id)),d=xA(T=>T.toggle),m=xA(T=>!!T.items[t.id]),p=ug(),E=!!t.contractAddress&&!!t.itemId,A=t.tokenId??t.itemId,R=!r&&!!t.contractAddress&&!!A;function O(){R&&p(`/item/${t.contractAddress}/${A}`,{state:{item:t,tradeId:t.tradeId}})}function f(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),JG)}function v(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function b(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),XG)}const h=QG(t.gender);return fe.jsxs("article",{className:`card${n?" card--hover":""}`,style:R?{cursor:"pointer"}:void 0,onMouseEnter:f,onMouseLeave:v,onClick:O,role:R?"link":void 0,tabIndex:R?0:void 0,onKeyDown:R?T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),O())}:void 0,children:[fe.jsxs("div",{className:"card__media",children:[fe.jsx("button",{className:`card__fav${m?" is-on":""}`,onClick:T=>{T.stopPropagation(),d(t)},"aria-label":m?"Remove from favorites":"Add to favorites",children:fe.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?fe.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&E?fe.jsxs(fe.Fragment,{children:[fe.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:fe.jsx(GP,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:b})}),fe.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:fe.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),fe.jsxs("div",{className:"card__body",children:[fe.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?fe.jsx(YG,{address:t.creator,className:"card__creator",linkToProfile:!0}):fe.jsx("div",{className:"card__creator",children:" "}),n?r&&e.mode==="market"?fe.jsx("button",{className:"card__cart",onClick:T=>{T.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"UNAVAILABLE":"BUY NOW"}):fe.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:T=>{T.stopPropagation(),l(t,"grid")},disabled:c,children:[fe.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),c?"IN CART":"ADD TO CART"]}):fe.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?fe.jsxs("div",{className:"card__price card__price--market",children:[fe.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),fe.jsx(el,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,fe.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):fe.jsxs("div",{className:"card__price",children:[fe.jsx(el,{className:"card__diamond"}),t.priceCredits]}),fe.jsxs("div",{className:"card__chips",children:[fe.jsx("span",{className:"chip chip--rarity",style:{background:ew(t.rarity),color:KG(ew(t.rarity))},children:t.rarity}),t.category==="wearable"?fe.jsx("span",{className:"chip chip--icon",children:fe.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,h?fe.jsx("span",{className:"chip chip--icon",children:h}):null]})]})]})]})}function ZG(e){if(!e)return 0;try{return Math.ceil(Number(yw(e))*10)}catch{return 0}}function xG(e){if(!e||e.length===0)return null;const t=e.some(n=>n.includes("Male")),r=e.some(n=>n.includes("Female"));return t&&r?"unisex":t?"male":r?"female":null}function KP(e){var t,r,n,i,a,s;return{id:e.id,name:e.name,creator:e.creator??"",contractAddress:e.contractAddress,itemId:e.itemId??null,category:e.category,wearableCategory:((r=(t=e.data)==null?void 0:t.wearable)==null?void 0:r.category)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:ZG(e.price??e.minPrice),gender:xG((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function t4(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(KP);return{items:o,total:s??r+o.length}}async function e3(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(KP);return{items:o,total:s??r+o.length}}const JP="shop:followed-creators:v1",t3=200;function r3(){try{const e=localStorage.getItem(JP);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function tw(e){try{localStorage.setItem(JP,JSON.stringify(e))}catch{}}const n3=Ro((e,t)=>({followed:r3(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,t3);tw(i),e({followed:i}),Ji("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);tw(i),e({followed:i}),Ji("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r)})),i3=8,a3=8,s3=12;function o3(){const t=n3(i=>i.followed).slice(0,i3),{data:r=[],isLoading:n}=tl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>e3(a,{first:a3}).then(s=>s.items).catch(()=>[])));return u3(i).filter(a=>a.priceCredits>0).slice(0,s3)}});return t.length===0||!n&&r.length===0?null:fe.jsxs("section",{className:"row",children:[fe.jsx("div",{className:"row__head",children:fe.jsx("h2",{className:"row__title",children:"From creators you follow"})}),fe.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>fe.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>fe.jsx(f_,{item:i},i.id))})]})}function u3(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const XP="shop:recently-viewed",QP=12;function ZP(){try{const e=localStorage.getItem(XP);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,QP):[]}catch{return[]}}function r4(e){if(e!=null&&e.id)try{const t=[e,...ZP().filter(r=>r.id!==e.id)].slice(0,QP);localStorage.setItem(XP,JSON.stringify(t))}catch{}}function c3({excludeId:e}){const t=Ye.useMemo(()=>ZP().filter(r=>r.id!==e),[e]);return t.length===0?null:fe.jsxs("section",{className:"row",children:[fe.jsx("div",{className:"row__head",children:fe.jsx("h2",{className:"row__title",children:"Recently viewed"})}),fe.jsx("div",{className:"row__track",children:t.map(r=>fe.jsx(f_,{item:r},r.id))})]})}function rw({title:e,items:t,loading:r}){return fe.jsxs("section",{className:"row",children:[fe.jsxs("div",{className:"row__head",children:[fe.jsx("h2",{className:"row__title",children:e}),fe.jsxs(Gc,{className:"row__viewall",to:"/assets",children:["VIEW ALL ",fe.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),fe.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>fe.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>fe.jsx(f_,{item:n},n.id))})]})}function l3(){const{data:e,isLoading:t}=tl({queryKey:["overview-listings"],queryFn:()=>LG({first:24})}),r=(e==null?void 0:e.items)??[];return fe.jsxs("div",{className:"overview",children:[fe.jsx("section",{className:"hero",children:fe.jsxs("div",{className:"hero__inner",children:[fe.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),fe.jsx(Gc,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),fe.jsx(o3,{}),fe.jsx(c3,{}),t||r.length>0?fe.jsxs(fe.Fragment,{children:[fe.jsx(rw,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?fe.jsx(rw,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):fe.jsxs("div",{className:"overview__empty",children:[fe.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),fe.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),fe.jsx(Gc,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]})]})}const d3={"/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"},f3=Ye.lazy(()=>Xt(()=>import("./Assets-FMrABFH_.js"),__vite__mapDeps([12,1,13,14,15,5])).then(e=>({default:e.Assets}))),p3=Ye.lazy(()=>Xt(()=>import("./Market-Cr-J1I9u.js"),__vite__mapDeps([16,1,17,11,5,13,14,18,19,15])).then(e=>({default:e.Market}))),m3=Ye.lazy(()=>Xt(()=>import("./ItemDetail-Sn2B-MA3.js"),__vite__mapDeps([20,1,18,11,5,19,21])).then(e=>({default:e.ItemDetail}))),h3=Ye.lazy(()=>Xt(()=>import("./Collection-DJjtkyI0.js"),__vite__mapDeps([22,1,23,24,13,14,15,5])).then(e=>({default:e.Collection}))),y3=Ye.lazy(()=>Xt(()=>import("./Creator-Cd6xMnQk.js"),__vite__mapDeps([25,1,23,24,13,14,15,5])).then(e=>({default:e.Creator}))),g3=Ye.lazy(()=>Xt(()=>import("./MyAssets-CpoF2iAy.js"),__vite__mapDeps([26,1,27,18,11,5,17,28,14,15,29])).then(e=>({default:e.MyAssets}))),_3=Ye.lazy(()=>Xt(()=>import("./MyFavorites-b3vHnYMr.js"),__vite__mapDeps([30,1,14,5])).then(e=>({default:e.MyFavorites}))),E3=Ye.lazy(()=>Xt(()=>import("./MyPurchases-DVXmppAu.js"),__vite__mapDeps([31,1,14,15,5])).then(e=>({default:e.MyPurchases}))),v3=Ye.lazy(()=>Xt(()=>import("./ImportListings-CXvHkADP.js"),__vite__mapDeps([32,1,27,18,11,5,17,28,33])).then(e=>({default:e.ImportListings}))),b3=Ye.lazy(()=>Xt(()=>import("./Cart-COyAPJn1.js"),__vite__mapDeps([34,1,18,11,5,19])).then(e=>({default:e.Cart}))),T3=Ye.lazy(()=>Xt(()=>import("./GetCredits-BC7Z51_v.js"),__vite__mapDeps([35,1,9,4,5])).then(e=>({default:e.GetCredits}))),S3=Ye.lazy(()=>Xt(()=>import("./Success-CNdczbFT.js"),__vite__mapDeps([36,1,28,5])).then(e=>({default:e.Success}))),I3=Ye.lazy(()=>Xt(()=>import("./NotFound-BK3mhtdy.js"),__vite__mapDeps([37,1])).then(e=>({default:e.NotFound})));function R3(){return fe.jsx("div",{className:"page-loading","aria-busy":"true",children:fe.jsx("span",{className:"spinner","aria-hidden":!0})})}function A3(){return fe.jsxs("div",{className:"overview__empty",children:[fe.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),fe.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),fe.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function w3(){jG();const e=pM();return Ye.useEffect(()=>{CH()},[]),Ye.useEffect(()=>{const t=e.pathname,r=d3[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");OH(r)},[e.pathname]),fe.jsxs(fe.Fragment,{children:[fe.jsx(MG,{}),fe.jsx(DG,{}),fe.jsx(wG,{}),fe.jsx("main",{className:"page",children:fe.jsx(Lg,{fallback:fe.jsx(A3,{}),children:fe.jsx(Ye.Suspense,{fallback:fe.jsx(R3,{}),children:fe.jsxs(mM,{children:[fe.jsx(sr,{path:"/",element:fe.jsx(hM,{to:"/overview",replace:!0})}),fe.jsx(sr,{path:"/overview",element:fe.jsx(l3,{})}),fe.jsx(sr,{path:"/assets",element:fe.jsx(f3,{})}),fe.jsx(sr,{path:"/market",element:fe.jsx(p3,{})}),fe.jsx(sr,{path:"/item/:contractAddress/:tokenId",element:fe.jsx(m3,{})}),fe.jsx(sr,{path:"/collection/:contractAddress",element:fe.jsx(h3,{})}),fe.jsx(sr,{path:"/creator/:address",element:fe.jsx(y3,{})}),fe.jsx(sr,{path:"/my-assets",element:fe.jsx(g3,{})}),fe.jsx(sr,{path:"/my-favorites",element:fe.jsx(_3,{})}),fe.jsx(sr,{path:"/my-purchases",element:fe.jsx(E3,{})}),fe.jsx(sr,{path:"/import",element:fe.jsx(v3,{})}),fe.jsx(sr,{path:"/cart",element:fe.jsx(b3,{})}),fe.jsx(sr,{path:"/credits",element:fe.jsx(T3,{})}),fe.jsx(sr,{path:"/success",element:fe.jsx(S3,{})}),fe.jsx(sr,{path:"*",element:fe.jsx(I3,{})})]})})})})]})}BH();const O3=new GM({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});yM.createRoot(document.getElementById("root")).render(fe.jsx(hw.StrictMode,{children:fe.jsx(WM,{client:O3,children:fe.jsx(gM,{children:fe.jsx(w3,{})})})}));export{$U as $,f_ as A,cb as B,Xi as C,n3 as D,e3 as E,el as F,W3 as G,z3 as H,X3 as I,j3 as J,D3 as K,nC as L,C3 as M,Nl as N,G3 as O,wP as P,qM as Q,k3 as R,r4 as S,J3 as T,Q3 as U,K3 as V,GP as W,OV as X,un as Y,Vr as Z,Xt as _,YG as a,bG as a0,No as a1,Zg as a2,cF as a3,KU as a4,Fg as a5,gN as a6,_N as a7,t4 as b,Al as c,V3 as d,tl as e,LG as f,x3 as g,YP as h,Dt as i,Ra as j,IG as k,zM as l,uo as m,e4 as n,F3 as o,Z3 as p,B3 as q,U3 as r,WR as s,Ji as t,xA as u,PH as v,H3 as w,Y3 as x,oo as y,Fr as z};
|