@dcl/shop 0.10.1-31033351584.commit-7c362c4 → 0.10.1-31034473421.commit-bc8c007
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/Activity-CC-drZTD.js +381 -0
- package/_assets/{AnimatedBackground-D9zMzxrX.js → AnimatedBackground-C2Ncq3_E.js} +1 -1
- package/_assets/{Assets-CHz_GnGP.js → Assets-DG4ddvEA.js} +2 -2
- package/_assets/{Assets.styles-WLYC9ZCn.js → Assets.styles-BR6LRzsi.js} +1 -1
- package/_assets/{Authorizations-C_ld2hUu.js → Authorizations-BfVJlMW8.js} +1 -1
- package/_assets/{Cart-DBgyj50N.js → Cart-DDHGXB0M.js} +2 -2
- package/_assets/{CircularProgress-Dd_9a3Fi.js → CircularProgress-CsPPGJq-.js} +1 -1
- package/_assets/{Collection-CgY9imoj.js → Collection-IF46ulmh.js} +1 -1
- package/_assets/{CollectionCarousel-BQc0kPjE.js → CollectionCarousel-BKyJ1qJ0.js} +1 -1
- package/_assets/{Confetti-P7-7XzLV.js → Confetti-BvaNvqo_.js} +1 -1
- package/_assets/{Creator-DX_sw5fh.js → Creator-BZ6noM_Z.js} +1 -1
- package/_assets/{ErrorNotice-6mO-dV9R.js → ErrorNotice-DuHUqzrI.js} +1 -1
- package/_assets/{ExchangeController-CuXSsueh.js → ExchangeController-D18bEO7-.js} +1 -1
- package/_assets/{Faq-MPZMyEz7.js → Faq-C46L8GKX.js} +1 -1
- package/_assets/{GetCredits-DclqIV_n.js → GetCredits-GeJS2N53.js} +1 -1
- package/_assets/{Grow-BwZ30IFC.js → Grow-Dh2-4jak.js} +1 -1
- package/_assets/{HelpersUtil-CgkoCMU8.js → HelpersUtil-daecOugO.js} +1 -1
- package/_assets/{ItemDetail-B57bZ-Jc.js → ItemDetail-DMKpiTyj.js} +1 -1
- package/_assets/LazyEmoteControls-CgDq4t3s.js +2 -0
- package/_assets/{LoadMore-DUO3yo-d.js → LoadMore-DSfpb61Y.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-BHHRlgfm.js → ManaPricingBanner.styles-BR2K9M4o.js} +1 -1
- package/_assets/{MyAssets-DrjJhyAF.js → MyAssets-DK-Fl0qf.js} +1 -1
- package/_assets/{MyFavorites-CeLHszJj.js → MyFavorites-CQSlRzjv.js} +1 -1
- package/_assets/{NotFound-DUBbnvP8.js → NotFound-I4xImBrl.js} +1 -1
- package/_assets/{NotificationsBell-BMPn7Zge.js → NotificationsBell-B3CjtPKY.js} +1 -1
- package/_assets/{OutfitDetail-B1T-zX3T.js → OutfitDetail-JHw4Anck.js} +1 -1
- package/_assets/{OutfitPreview-BSQLpTAp.js → OutfitPreview-CD1I4FGA.js} +1 -1
- package/_assets/{OutfitStudio-CT1p1EwA.js → OutfitStudio-BmPDW-4_.js} +1 -1
- package/_assets/{StoreSettings-DW1tYBTa.js → StoreSettings-BaxaylF_.js} +1 -1
- package/_assets/{Success-BnIfzbBg.js → Success-CmsOOzv5.js} +1 -1
- package/_assets/{SwapController-C6lyTdKK.js → SwapController-C3FH350F.js} +1 -1
- package/_assets/{Tooltip-CeBylumq.js → Tooltip-BUoy_yBS.js} +1 -1
- package/_assets/{TradeService-CxCvVbfV.js → TradeService-BfkCpUVP.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-B9ZlMbe-.js → W3MFrameProviderSingleton-C5e_NZU2.js} +3 -3
- package/_assets/{WebCryptoP256-DqLZ2JeY.js → WebCryptoP256-DThOAe5r.js} +1 -1
- package/_assets/{authorizations-D_b9y1Zd.js → authorizations-C46pWUg_.js} +1 -1
- package/_assets/{basic-6pZpkz1m.js → basic-CFr4oW8e.js} +1 -1
- package/_assets/{biconomy-ZrkAwwyz.js → biconomy-EIHI94HW.js} +1 -1
- package/_assets/{builder-DzG-rWAy.js → builder-BxyqTcR8.js} +1 -1
- package/_assets/{buy-DdP53CVp.js → buy-CrEjBbQr.js} +1 -1
- package/_assets/{buy-gasless-CW77neja.js → buy-gasless-DX2i6M46.js} +1 -1
- package/_assets/{categories-IxSjFqsD.js → categories-Djn1x7W5.js} +1 -1
- package/_assets/{ccip-BOmMoBQj.js → ccip-Cj8VnD6W.js} +1 -1
- package/_assets/{ccip-B3PEEgzH.js → ccip-bf8ZEccw.js} +1 -1
- package/_assets/{collectionPage.styles-Di_BnCwz.js → collectionPage.styles-D2QDYBrf.js} +2 -2
- package/_assets/{controller-2wsshlU9.js → controller-Btwq_67O.js} +2 -2
- package/_assets/{core-uxnhWBlK.js → core-BoZKMv7D.js} +4 -4
- package/_assets/{createSvgIcon-NvyKnNvS.js → createSvgIcon-CFkg424z.js} +1 -1
- package/_assets/{custom-DRMxU13P.js → custom-CnxdXktY.js} +1 -1
- package/_assets/{data-capture-d4fN2Aim.js → data-capture-DE3s9XBD.js} +1 -1
- package/_assets/{email-Emg8tWxu.js → email-CyUtvnHn.js} +1 -1
- package/_assets/{embedded-wallet-Bjr40hue.js → embedded-wallet-CNutXAKp.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-QfXC-KV3.js → emotion-styled.browser.esm-tTp1XoI0.js} +1 -1
- package/_assets/{engine-CicyEMnx.js → engine-DDh_khSi.js} +1 -1
- package/_assets/{errors-B3VCSPGA.js → errors-DB8YoX8H.js} +1 -1
- package/_assets/{estimate-l1-fee-BT6nlWPX.js → estimate-l1-fee-FPPQQb_O.js} +1 -1
- package/_assets/{execute-WaIhUkkd.js → execute-CbtU2HHN.js} +2 -2
- package/_assets/{features-CxpVP8VP.js → features-CTzqOm7l.js} +1 -1
- package/_assets/{fetchTokenMetadata-cnEvxjTn.js → fetchTokenMetadata-DL00Yl1V.js} +2 -2
- package/_assets/{field.styles-C--nSPUE.js → field.styles-VS1Bp3SY.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-6FW4N0DG.js → get-ecosystem-wallet-info-Ts3YeqO0.js} +1 -1
- package/_assets/{getBalance-BAQITwAU.js → getBalance-Ci8oL4mO.js} +1 -1
- package/_assets/{getNFT-oYnvPuKj.js → getNFT-DDI0kKlm.js} +1 -1
- package/_assets/{getNFT-BpsbO0uo.js → getNFT-Fy7sCZrd.js} +1 -1
- package/_assets/{grid.styles-lAALC631.js → grid.styles-B8-aHr-Z.js} +1 -1
- package/_assets/{hashTypedData-Jrl2VmhK.js → hashTypedData-CgBoKib0.js} +1 -1
- package/_assets/{hashTypedData-CsUSXTk_.js → hashTypedData-DRSL-xFv.js} +1 -1
- package/_assets/{in-app-CmfWNhfE.js → in-app-CZhXNWAN.js} +1 -1
- package/_assets/{in-app-wallet-calls-DtB6x1ba.js → in-app-wallet-calls-BiloEdY1.js} +1 -1
- package/_assets/{index-BD8q0Ac0.js → index-0Vjq0BuP.js} +1 -1
- package/_assets/{index-BzAMjUfs.js → index-3uaNnNo1.js} +1 -1
- package/_assets/{index-Chwj7fux.js → index-8JB2rkjo.js} +1 -1
- package/_assets/{index-CqgBrAa3.js → index-9o15Whth.js} +1 -1
- package/_assets/{index-B0RmgR_d.js → index-9yrtZWWe.js} +12 -12
- package/_assets/{index-BP8QvCSU.js → index-B1qAF-bB.js} +1 -1
- package/_assets/{index-DS0wbCkf.js → index-B44uRV_0.js} +1 -1
- package/_assets/{index-I09RqTLV.js → index-B5Ot6UoK.js} +1 -1
- package/_assets/{index-BX_TKzNw.js → index-BB1Alh6i.js} +1 -1
- package/_assets/{index-C2ZjqrRW.js → index-BFPc-Id9.js} +1 -1
- package/_assets/{index-BXDc0uKc.js → index-BGDJC7BF.js} +3 -3
- package/_assets/{index-DZg6weKS.js → index-BIsmMKyp.js} +1 -1
- package/_assets/{index-ZjJ5_frA.js → index-BNALoEFc.js} +2 -2
- package/_assets/{index-C9B5P4Dg.js → index-BV1tKLO5.js} +1 -1
- package/_assets/{index-Bixh0fkw.js → index-BW_by1p8.js} +1 -1
- package/_assets/{index-uvJyV1hQ.js → index-B_dDd-2o.js} +1 -1
- package/_assets/{index-DGETq3uL.js → index-BaZrYmBG.js} +1 -1
- package/_assets/{index-DMIDDxCt.js → index-BbcqV6dl.js} +1 -1
- package/_assets/{index-CgBr7agx.js → index-BcYeQL6D.js} +1 -1
- package/_assets/{index-BlHE6_qG.js → index-Be3z0ef5.js} +1 -1
- package/_assets/{index-OY9eT885.js → index-Bkq0noih.js} +1 -1
- package/_assets/{index-BVGUt6Gs.js → index-BqiBjV7M.js} +1 -1
- package/_assets/{index-BipKcd4N.js → index-BtW2kxAX.js} +1 -1
- package/_assets/{index-CuJX4PqH.js → index-Bw4kOn5N.js} +3 -3
- package/_assets/{index-D9gu_V-T.js → index-CAAx9kV_.js} +1 -1
- package/_assets/{index-DwlPIy0M.js → index-CAixpuE6.js} +1 -1
- package/_assets/{index-B7HzCYv7.js → index-CMdaU3Fe.js} +1 -1
- package/_assets/{index-DrmR7S6Q.js → index-CMsqXnmJ.js} +2 -2
- package/_assets/{index-CQE18d4g.js → index-CN25d8be.js} +1 -1
- package/_assets/{index-CtNSOsEl.js → index-COM2HkFw.js} +1 -1
- package/_assets/{index-DyR3H03X.js → index-CRLgNgTE.js} +1 -1
- package/_assets/{index-BFBXL8wW.js → index-CVQqdafr.js} +1 -1
- package/_assets/{index-CL8GjkKH.js → index-CWQ_hyD9.js} +2 -2
- package/_assets/{index-CyH1prYm.js → index-Cb-Xyz4U.js} +1 -1
- package/_assets/{index-DVirP4aU.js → index-CcEkPG2d.js} +1 -1
- package/_assets/{index-Cc0dtF8p.js → index-CeFSJ06M.js} +1 -1
- package/_assets/{index-DPaAk7j3.js → index-CeLWKxYJ.js} +3 -3
- package/_assets/{index-DzZYiqRk.js → index-D5xfzJYu.js} +1 -1
- package/_assets/{index-DF1U0cxT.js → index-D695ADYc.js} +1 -1
- package/_assets/{index-CVOmuhfA.js → index-D8gWMfNo.js} +1 -1
- package/_assets/{index-DfDPH-Yr.js → index-DH5xRkV0.js} +1 -1
- package/_assets/{index-C4VwyLUU.js → index-DKkcKHt7.js} +1 -1
- package/_assets/{index-BhLPInDw.js → index-DN1XWQxE.js} +1 -1
- package/_assets/{index-COJmepdC.js → index-Di-G-FMZ.js} +1 -1
- package/_assets/{index-Bjhe9YfT.js → index-Dk6WNfYc.js} +1 -1
- package/_assets/{index-CIUi1P7h.js → index-Dqgl-D8m.js} +1 -1
- package/_assets/{index-BD1dOfiG.js → index-Gq4sV0iH.js} +1 -1
- package/_assets/{index-Jl1-nAXE.js → index-I-YHePeT.js} +1 -1
- package/_assets/{index-ZasgicCU.js → index-RnP4upXv.js} +1 -1
- package/_assets/{index-COtDNaHu.js → index-Yk813Dlf.js} +1 -1
- package/_assets/{index-D8Ax93UI.js → index-i-zDqv41.js} +68 -68
- package/_assets/{index-DaKcX9sX.js → index-ojZHdJoW.js} +1 -1
- package/_assets/{index.es-G5uWqVOg.js → index.es-BPLGTRUs.js} +1 -1
- package/_assets/{index.es-BLEyVYyK.js → index.es-Bb6fWqbI.js} +1 -1
- package/_assets/{index.es-BCk9rT7_.js → index.es-Cw9YevXi.js} +4 -4
- package/_assets/{localBatchGatewayRequest-BqP45lmY.js → localBatchGatewayRequest-DV-Qiqwg.js} +1 -1
- package/_assets/{networks-C7vkOnsA.js → networks-BidiJn0z.js} +1 -1
- package/_assets/{onramp-B5AsANak.js → onramp-CC1FvFBK.js} +1 -1
- package/_assets/{openzeppelin-BDhUFXKd.js → openzeppelin-DxfcoOmD.js} +1 -1
- package/_assets/{parseNft-CS3ce58Q.js → parseNft-D5_2xvn3.js} +2 -2
- package/_assets/{parseSignature-B-p0IAwY.js → parseSignature-DCVnoEud.js} +3 -3
- package/_assets/{parseSignature-DXiot5Vg.js → parseSignature-DGREosgl.js} +1 -1
- package/_assets/{passkeys-DNv3zmOi.js → passkeys-c0mSn9d_.js} +1 -1
- package/_assets/{pay-with-exchange-DXRFRXNY.js → pay-with-exchange-tOzIsJn8.js} +1 -1
- package/_assets/{qr-overlay-Be9ZguAa.js → qr-overlay-C238jsQe.js} +1 -1
- package/_assets/{receive-DTNyaTyB.js → receive-YJVe-YsN.js} +1 -1
- package/_assets/{resolveImplementation-LSubYu3p.js → resolveImplementation-Bup3lN7e.js} +1 -1
- package/_assets/{rpc-DFIKV5lj.js → rpc-DRG5dkgN.js} +1 -1
- package/_assets/{secp256k1-BeAsAc0R.js → secp256k1-BLTf96Dw.js} +1 -1
- package/_assets/{secp256k1-qX4eq3vO.js → secp256k1-DGfmtJOR.js} +1 -1
- package/_assets/{secp256k1-DR1oWUKC.js → secp256k1-DyD-7xzT.js} +1 -1
- package/_assets/{send-DJjB2M1Q.js → send-HB6wuoPf.js} +1 -1
- package/_assets/{send-batch-transaction-BaUdBZlb.js → send-batch-transaction-BLLreTbC.js} +1 -1
- package/_assets/{send-eip712-transaction-lIj5rFgO.js → send-eip712-transaction-1tvGSDlM.js} +2 -2
- package/_assets/{send-gasless-transaction-DVhS9M3V.js → send-gasless-transaction-Ctg5l4BN.js} +2 -2
- package/_assets/{send-transaction-CMZ9JiTN.js → send-transaction-XQn5-Ih2.js} +2 -2
- package/_assets/{sendMetaTransaction-E1EYSLOv.js → sendMetaTransaction-BHIBWrRl.js} +1 -1
- package/_assets/{sendRawTransaction-kegyDwlO.js → sendRawTransaction-DcRJfXtJ.js} +3 -3
- package/_assets/{serializeTransaction-D8wcgC_5.js → serializeTransaction-BovQs4W4.js} +1 -1
- package/_assets/{session-proposal-D0hYEWkU.js → session-proposal-Dh0H2iMq.js} +1 -1
- package/_assets/{session-request-BOvXEvci.js → session-request-PjE6-slV.js} +2 -2
- package/_assets/{signing-BgAqN9_v.js → signing-D_b9YpxC.js} +3 -3
- package/_assets/{skeleton.styles-B1iQljhe.js → skeleton.styles-BkB0ehmF.js} +1 -1
- package/_assets/{socials-BSKX4wYT.js → socials-BdH7MtQ-.js} +1 -1
- package/_assets/{styled-DhdWG9IN.js → styled-DO__i5OQ.js} +1 -1
- package/_assets/{swaps-CA53eWy9.js → swaps-8XaXvjLz.js} +1 -1
- package/_assets/{thirdweb-BgxGEV7u.js → thirdweb-CQkxIvb0.js} +3 -3
- package/_assets/{to-serializable-transaction-DuWuQs-Y.js → to-serializable-transaction-BKduqsBs.js} +2 -2
- package/_assets/{transactionReceipt-CHx9xgPc.js → transactionReceipt-B0NXQ6bs.js} +1 -1
- package/_assets/{transactions-CwoPg7nZ.js → transactions-B8KmPj9n.js} +1 -1
- package/_assets/{useCreditPacks-Dctt6M21.js → useCreditPacks-B2mrQzTg.js} +1 -1
- package/_assets/{useImportable-CFTNXsyw.js → useImportable-B5Yrq7z2.js} +1 -1
- package/_assets/{useInfiniteGrid-ifHQPotm.js → useInfiniteGrid-ByXPg4Cl.js} +1 -1
- package/_assets/{useTheme-Mu9eB-qd.js → useTheme-Dr5b6sGg.js} +1 -1
- package/_assets/{verifyHash-BlAqphQ6.js → verifyHash-kfqTlL2t.js} +1 -1
- package/_assets/{w3m-modal-DRb7QTWO.js → w3m-modal-D8CVGu-q.js} +1 -1
- package/_assets/{w3m-modal-ecJ1_lBE.js → w3m-modal-qsbw4UhH.js} +1 -1
- package/_assets/{wait-for-tx-receipt-D1uFBLQV.js → wait-for-tx-receipt-C6x4RXLY.js} +1 -1
- package/_assets/{wallets-gt4F0nQN.js → wallets-OabXbDr9.js} +5 -5
- package/_assets/{web-connector-H3XVziku.js → web-connector-BIGf2LgP.js} +3 -3
- package/_assets/{writeContract-Dvy_35iC.js → writeContract-C3LPgHro.js} +1 -1
- package/_assets/{zoraTestnet-BW0MPGSm.js → zoraTestnet-EWvUityH.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-DIFzGCgA.js +0 -381
- package/_assets/LazyEmoteControls-C8p_nuP6.js +0 -2
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-i-zDqv41.js","_assets/react-BYHuwl8r.js","_assets/index-9yrtZWWe.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-B5Yrq7z2.js","_assets/buy-CrEjBbQr.js","_assets/authorizations-C46pWUg_.js","_assets/sendMetaTransaction-BHIBWrRl.js","_assets/ManaPricingBanner.styles-BR2K9M4o.js","_assets/Faq-C46L8GKX.js","_assets/field.styles-VS1Bp3SY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as ke,bM as Ie,o as z,v as A,bN as Ae,s as h,t as a,w as $e,B as Le,x as Pe,b as d,ao as Ne,I as $,bO as te,bP as ie,bQ as Ee,_ as Te,z as N,bR as Ce,A as Se,bh as R,L as Fe,bS as Me,E as De,bT as Oe,bU as _}from"./index-9yrtZWWe.js";import{r as g,u as He,j as t,L as re,e as qe}from"./react-BYHuwl8r.js";import{u as ze}from"./useImportable-B5Yrq7z2.js";import{L as Re}from"./LoadMore-DSfpb61Y.js";import{u as L}from"./useInfiniteGrid-ByXPg4Cl.js";import{m as oe}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-CrEjBbQr.js";import"./authorizations-C46pWUg_.js";import"./sendMetaTransaction-BHIBWrRl.js";const _e=15e3;function Ge(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=_e}function We(e){const s=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of s){const r=n[n.length-1];r&&Ge(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function Be(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ue(e){const s=[],n=new Map;for(const i of e){const r=Be(i);if(!r){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),s.push(u)}return s}function Ke(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?ke(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Qe(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ke(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ve(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function Xe(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const r=s.get(i);r?r.push(n):s.set(i,[n])}return s}function Ye(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Ze(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Ze(e){return Ie(e)}function Je(){const e=z(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const et="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/credits-product-vs4Q6u6l.svg",G=$e`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,tt=h.section`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
min-height: 60vh;
|
|
9
|
+
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
10
|
+
the left edge of a wide page. Centring only the list would leave the heading orphaned from it.
|
|
11
|
+
|
|
12
|
+
ONE width for every view. The migration tool needs 1003px (its row is a thumbnail, a name and a
|
|
13
|
+
144px price field; narrower, the price field drops to its own line on a desktop), and the feed used
|
|
14
|
+
to sit at 760px — so switching chips resized the heading and the whole column under it, which reads
|
|
15
|
+
as the page reloading rather than as a filter changing. */
|
|
16
|
+
max-width: 1003px;
|
|
17
|
+
margin-inline: auto;
|
|
18
|
+
`,it=h.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: baseline;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
margin-bottom: 20px;
|
|
23
|
+
`,st=h.h1`
|
|
24
|
+
font-family: ${a.font.sans};
|
|
25
|
+
margin: 0;
|
|
26
|
+
`;h.span`
|
|
27
|
+
color: ${a.colors.muted};
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
`;const at=h.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
margin-bottom: 20px;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
`,de=h.button`
|
|
35
|
+
appearance: none;
|
|
36
|
+
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
37
|
+
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
38
|
+
pills carry. */
|
|
39
|
+
border: 0.5px solid ${a.colors.gray4};
|
|
40
|
+
background: ${a.colors.white};
|
|
41
|
+
color: ${a.colors.text};
|
|
42
|
+
font-family: ${a.font.sans};
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
line-height: 24px;
|
|
46
|
+
letter-spacing: 0.46px;
|
|
47
|
+
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
48
|
+
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
padding: 0 16px;
|
|
53
|
+
min-height: 40px;
|
|
54
|
+
border-radius: ${a.radius.pill};
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition:
|
|
57
|
+
background 0.15s,
|
|
58
|
+
border-color 0.15s,
|
|
59
|
+
color 0.15s;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background: ${a.colors.media};
|
|
63
|
+
}
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
outline: 2px solid ${a.colors.accent};
|
|
66
|
+
outline-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
&[data-active='true'] {
|
|
69
|
+
background: ${a.colors.accent};
|
|
70
|
+
border-color: ${a.colors.accent};
|
|
71
|
+
color: ${a.colors.white};
|
|
72
|
+
}
|
|
73
|
+
`,nt=h(de)`
|
|
74
|
+
position: relative;
|
|
75
|
+
|
|
76
|
+
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
77
|
+
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
78
|
+
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
79
|
+
background: ${a.colors.white};
|
|
80
|
+
color: ${a.colors.accent};
|
|
81
|
+
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
82
|
+
box-shadow: 0 0 0 2px ${a.colors.accent};
|
|
83
|
+
}
|
|
84
|
+
`,rt=h.span`
|
|
85
|
+
position: absolute;
|
|
86
|
+
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
87
|
+
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
88
|
+
top: -6.5px;
|
|
89
|
+
right: -3.5px;
|
|
90
|
+
display: grid;
|
|
91
|
+
place-items: center;
|
|
92
|
+
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
93
|
+
letter-spacing: normal;
|
|
94
|
+
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
95
|
+
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
96
|
+
min-width: 20px;
|
|
97
|
+
height: 20px;
|
|
98
|
+
padding: 0 6px;
|
|
99
|
+
border-radius: ${a.radius.pill};
|
|
100
|
+
background: ${a.colors.brandViolet};
|
|
101
|
+
/**
|
|
102
|
+
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
103
|
+
*
|
|
104
|
+
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
105
|
+
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
106
|
+
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
107
|
+
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
108
|
+
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
109
|
+
*
|
|
110
|
+
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
111
|
+
* shadow draws outside the box.
|
|
112
|
+
*/
|
|
113
|
+
box-shadow: 0 0 0 2px ${a.colors.white};
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
line-height: 1.6;
|
|
117
|
+
color: ${a.colors.white};
|
|
118
|
+
`,ot=h.div`
|
|
119
|
+
min-height: 60vh;
|
|
120
|
+
`,se=h.div`
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
gap: 16px;
|
|
124
|
+
`,E=h.div`
|
|
125
|
+
background: ${a.colors.white};
|
|
126
|
+
border: 1px solid ${a.colors.line};
|
|
127
|
+
border-radius: 16px;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
`,T=h.div`
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
gap: 12px;
|
|
134
|
+
padding: 14px 18px;
|
|
135
|
+
background: ${a.colors.softWhite};
|
|
136
|
+
border-bottom: 1px solid ${a.colors.line};
|
|
137
|
+
|
|
138
|
+
${a.media.maxWidth("mobile")} {
|
|
139
|
+
flex-wrap: wrap;
|
|
140
|
+
}
|
|
141
|
+
`,C=h.div`
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
gap: 2px;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
`,S=h.span`
|
|
147
|
+
font-weight: 700;
|
|
148
|
+
color: ${a.colors.text};
|
|
149
|
+
`,F=h.span`
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
color: ${a.colors.muted};
|
|
152
|
+
`,M=h.div`
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: 14px;
|
|
156
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
157
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
158
|
+
margin-left: auto;
|
|
159
|
+
`,ct=h.div`
|
|
160
|
+
flex: 0 0 auto;
|
|
161
|
+
width: 52px;
|
|
162
|
+
height: 52px;
|
|
163
|
+
border-radius: 10px;
|
|
164
|
+
background: ${a.colors.media};
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
|
|
169
|
+
img {
|
|
170
|
+
width: 30px;
|
|
171
|
+
height: 30px;
|
|
172
|
+
display: block;
|
|
173
|
+
}
|
|
174
|
+
`,D=h.span`
|
|
175
|
+
font-size: 11px;
|
|
176
|
+
font-weight: 700;
|
|
177
|
+
text-transform: uppercase;
|
|
178
|
+
letter-spacing: 0.03em;
|
|
179
|
+
padding: 4px 10px;
|
|
180
|
+
border-radius: ${a.radius.pill};
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
|
|
183
|
+
&[data-status='SETTLED'] {
|
|
184
|
+
background: rgba(30, 166, 114, 0.14);
|
|
185
|
+
color: ${a.colors.okStrong};
|
|
186
|
+
}
|
|
187
|
+
&[data-status='PENDING'] {
|
|
188
|
+
background: rgba(245, 166, 35, 0.16);
|
|
189
|
+
color: #b5790a;
|
|
190
|
+
}
|
|
191
|
+
&[data-status='SOLD'] {
|
|
192
|
+
background: rgba(103, 58, 183, 0.14);
|
|
193
|
+
color: ${a.colors.accent};
|
|
194
|
+
}
|
|
195
|
+
&[data-status='FAILED'] {
|
|
196
|
+
background: rgba(214, 61, 61, 0.14);
|
|
197
|
+
color: #b02a2a;
|
|
198
|
+
}
|
|
199
|
+
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
200
|
+
amber here is what made an abandoned checkout look like money on its way. */
|
|
201
|
+
&[data-status='UNFINISHED'] {
|
|
202
|
+
background: ${a.colors.line};
|
|
203
|
+
color: ${a.colors.muted};
|
|
204
|
+
}
|
|
205
|
+
`,dt=h.button`
|
|
206
|
+
font-size: 11px;
|
|
207
|
+
font-weight: 700;
|
|
208
|
+
text-transform: uppercase;
|
|
209
|
+
letter-spacing: 0.03em;
|
|
210
|
+
padding: 4px 10px;
|
|
211
|
+
border-radius: ${a.radius.pill};
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
border: 1px solid ${a.colors.accent};
|
|
214
|
+
background: transparent;
|
|
215
|
+
color: ${a.colors.accent};
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
transition: background 0.15s ease;
|
|
218
|
+
|
|
219
|
+
&:hover:not(:disabled) {
|
|
220
|
+
background: rgba(103, 58, 183, 0.08);
|
|
221
|
+
}
|
|
222
|
+
&:disabled {
|
|
223
|
+
opacity: 0.6;
|
|
224
|
+
cursor: default;
|
|
225
|
+
}
|
|
226
|
+
`,j=h.div`
|
|
227
|
+
display: flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
gap: 5px;
|
|
230
|
+
font-weight: 800;
|
|
231
|
+
color: ${a.colors.text};
|
|
232
|
+
white-space: nowrap;
|
|
233
|
+
|
|
234
|
+
.ccy-mark {
|
|
235
|
+
width: 16px;
|
|
236
|
+
height: 16px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
240
|
+
&[data-kind='income'] {
|
|
241
|
+
color: ${a.colors.okStrong};
|
|
242
|
+
}
|
|
243
|
+
`,le=h.img`
|
|
244
|
+
width: 16px;
|
|
245
|
+
height: 16px;
|
|
246
|
+
vertical-align: -0.15em;
|
|
247
|
+
`,lt=h.span`
|
|
248
|
+
display: inline-flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
`,ht=h.span`
|
|
252
|
+
position: fixed;
|
|
253
|
+
transform: translateX(-50%);
|
|
254
|
+
padding: 6px 8px;
|
|
255
|
+
border-radius: 6px;
|
|
256
|
+
background: #16141a;
|
|
257
|
+
color: ${a.colors.white};
|
|
258
|
+
font-size: 12px;
|
|
259
|
+
font-weight: 600;
|
|
260
|
+
line-height: 1;
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
263
|
+
pointer-events: none;
|
|
264
|
+
z-index: 9999;
|
|
265
|
+
`,W=h.div`
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
`,O=h.div`
|
|
269
|
+
display: grid;
|
|
270
|
+
grid-template-columns: 52px 1fr auto;
|
|
271
|
+
align-items: center;
|
|
272
|
+
gap: 14px;
|
|
273
|
+
padding: 12px 18px;
|
|
274
|
+
text-decoration: none;
|
|
275
|
+
color: inherit;
|
|
276
|
+
|
|
277
|
+
& + & {
|
|
278
|
+
border-top: 1px solid ${a.colors.line};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&[data-link='true'] {
|
|
282
|
+
transition: background 0.15s;
|
|
283
|
+
}
|
|
284
|
+
&[data-link='true']:hover {
|
|
285
|
+
background: ${a.colors.media};
|
|
286
|
+
}
|
|
287
|
+
&[data-link='true']:focus-visible {
|
|
288
|
+
outline: 2px solid ${a.colors.accent};
|
|
289
|
+
outline-offset: -2px;
|
|
290
|
+
}
|
|
291
|
+
`,B=h.div`
|
|
292
|
+
width: 52px;
|
|
293
|
+
height: 52px;
|
|
294
|
+
border-radius: 10px;
|
|
295
|
+
background: ${a.colors.media};
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
color: ${a.colors.muted2};
|
|
301
|
+
|
|
302
|
+
img {
|
|
303
|
+
width: 100%;
|
|
304
|
+
height: 100%;
|
|
305
|
+
object-fit: contain;
|
|
306
|
+
}
|
|
307
|
+
`,U=h.div`
|
|
308
|
+
width: 52px;
|
|
309
|
+
height: 52px;
|
|
310
|
+
border-radius: 10px;
|
|
311
|
+
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
312
|
+
background-size: 200% 100%;
|
|
313
|
+
animation: ${G} 1.3s infinite linear;
|
|
314
|
+
|
|
315
|
+
@media (prefers-reduced-motion: reduce) {
|
|
316
|
+
animation: none;
|
|
317
|
+
}
|
|
318
|
+
`,K=h.div`
|
|
319
|
+
min-width: 0;
|
|
320
|
+
display: flex;
|
|
321
|
+
flex-direction: column;
|
|
322
|
+
gap: 2px;
|
|
323
|
+
`,Q=h.span`
|
|
324
|
+
font-weight: 700;
|
|
325
|
+
white-space: nowrap;
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
text-overflow: ellipsis;
|
|
328
|
+
`,V=h.span`
|
|
329
|
+
display: inline-block;
|
|
330
|
+
width: 140px;
|
|
331
|
+
max-width: 60%;
|
|
332
|
+
height: 12px;
|
|
333
|
+
border-radius: 6px;
|
|
334
|
+
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
335
|
+
background-size: 200% 100%;
|
|
336
|
+
animation: ${G} 1.3s infinite linear;
|
|
337
|
+
|
|
338
|
+
@media (prefers-reduced-motion: reduce) {
|
|
339
|
+
animation: none;
|
|
340
|
+
}
|
|
341
|
+
`,X=h.span`
|
|
342
|
+
font-size: 13px;
|
|
343
|
+
color: ${a.colors.muted};
|
|
344
|
+
`,ut=h.div`
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
gap: 4px;
|
|
348
|
+
font-weight: 700;
|
|
349
|
+
color: ${a.colors.text};
|
|
350
|
+
white-space: nowrap;
|
|
351
|
+
|
|
352
|
+
.ccy-mark {
|
|
353
|
+
width: 14px;
|
|
354
|
+
height: 14px;
|
|
355
|
+
}
|
|
356
|
+
`,ae=h.div`
|
|
357
|
+
height: 132px;
|
|
358
|
+
border-radius: 16px;
|
|
359
|
+
border: 1px solid transparent;
|
|
360
|
+
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
361
|
+
background-size: 200% 100%;
|
|
362
|
+
animation: ${G} 1.3s infinite linear;
|
|
363
|
+
|
|
364
|
+
@media (prefers-reduced-motion: reduce) {
|
|
365
|
+
animation: none;
|
|
366
|
+
}
|
|
367
|
+
`,he=h.div`
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
align-items: center;
|
|
371
|
+
gap: 8px;
|
|
372
|
+
text-align: center;
|
|
373
|
+
padding: 90px 20px;
|
|
374
|
+
min-height: 50vh;
|
|
375
|
+
`,ue=h.p`
|
|
376
|
+
font-size: 22px;
|
|
377
|
+
font-weight: 700;
|
|
378
|
+
margin: 6px 0 0;
|
|
379
|
+
`,pt=h(Le)`
|
|
380
|
+
margin-top: 12px;
|
|
381
|
+
`,Y=O.withComponent(re),xt=g.lazy(()=>Te(()=>import("./index-i-zDqv41.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,mt=["all","purchases","sales"],H="section",ne="listings",q="view",gt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function me({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const c=(u=s.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(lt,{ref:s,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(ht,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function ft({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:r}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Oe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=R({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[c?t.jsx(U,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx($,{name:"cart",size:20})}),t.jsxs(K,{children:[c?t.jsx(V,{}):t.jsx(Q,{title:u,children:u}),e.quantity>1?t.jsx(X,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ut,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(Y,{to:x,"data-link":"true",children:f}):t.jsx(O,{children:f})}function bt({order:e}){const s=Ue(e.lines),n=s.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:s.map(i=>t.jsx(ft,{item:i},i.key))})]})}function yt({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",c=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(U,{}):t.jsx(B,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[n?t.jsx(V,{}):t.jsx(Q,{title:i,children:i}),t.jsx(X,{children:d("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(Y,{to:c,"data-link":"true",children:u}):t.jsx(O,{children:u})})]})}function vt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(U,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[i?t.jsx(V,{}):t.jsx(Q,{title:r,children:r}),t.jsxs(X,{children:[d("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),s.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]}):s.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(Y,{to:u,"data-link":"true",children:o}):t.jsx(O,{children:o})})]})}function wt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Ce(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=z(p=>p.session),c=Se(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Me(e.id,r.identity);if(p){window.location.href=p;return}De.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(ct,{children:t.jsx("img",{src:et,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[x?t.jsx(dt,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(D,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function jt({filter:e}){const s={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx($,{name:s.icon,size:40,color:a.colors.muted2}),t.jsx(ue,{children:s.title}),t.jsx("p",{className:"muted",children:s.body}),e!=="sales"?t.jsx(pt,{as:re,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Dt(){const{session:e}=z(),[s,n]=g.useState("all"),[i,r]=He(),c=i.get(H)===ne||i.get(q)===gt;Pe({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=ze(),{count:o}=Je(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&s!=="sales",m=!!e&&!c&&s!=="purchases",b=L(["purchases",e==null?void 0:e.address],l=>Ee(e.address,e.identity,{first:P,skip:l}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],l=>te(e.address,{role:"seller",first:P,skip:l}),{enabled:m}),v=L(["credit-orders",e==null?void 0:e.address],l=>ie(e.address,e.identity,{first:P,skip:l}),{enabled:p}),w=L(["mana-purchases",e==null?void 0:e.address],l=>te(e.address,{role:"buyer",first:P,skip:l}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ie(e.address,e.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ge=g.useMemo(()=>Xe(Z),[Z]),{data:fe}=Ne(m);if(!e)return t.jsxs(he,{children:[t.jsx($,{name:"clock",size:40,color:a.colors.muted2}),t.jsx(ue,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const J=Ve(Qe({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,ee=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function we(l){if(n(l),!c)return;const k=new URLSearchParams(i);k.delete(H),k.delete(q),r(k,{replace:!0})}function je(){const l=new URLSearchParams(i);l.set(H,ne),l.delete(q),r(l,{replace:!0})}return t.jsxs(tt,{children:[t.jsx(it,{children:t.jsx(st,{children:d("nav.activity")})}),t.jsxs(at,{role:"tablist","aria-label":d("nav.activity"),children:[mt.map(l=>t.jsx(de,{type:"button",role:"tab","aria-selected":!c&&s===l,"data-active":!c&&s===l,"data-testid":`activity-filter-${l}`,onClick:()=>we(l),children:d(`activity.filter.${l}`)},l)),f?t.jsxs(nt,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:je,children:[d("activity.migrate.chip"),u?t.jsx(rt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(ot,{"aria-busy":"true"}),children:t.jsx(xt,{})}):be?t.jsx(se,{children:Array.from({length:5}).map((l,k)=>t.jsx(ae,{},k))}):J.length===0?t.jsx(jt,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(se,{children:[J.map(l=>l.kind==="purchase"?t.jsx(bt,{order:l.order},l.id):l.kind==="credit"?t.jsx(wt,{order:l.order},l.id):l.kind==="mana-purchase"?t.jsx(yt,{sale:l.sale},l.id):t.jsx(vt,{sale:l.sale,payout:Ye(ge,l.sale)},l.id)),ee?t.jsx(ae,{}):null]}),t.jsx(Re,{hasNextPage:ye,isFetching:ee,onLoadMore:ve})]})]})}export{Dt as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-BYHuwl8r.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-BYHuwl8r.js";import{s as u}from"./index-9yrtZWWe.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-
|
|
1
|
+
import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-Djn1x7W5.js";import{c as W,r as tt,bm as nt,bn as st,aC as rt,a as it,s,t,o as Me,bc as ot,A as at,L as me,b as n,y as lt,I as T,z as A,bZ as Y,bb as ct,$ as Q,br as dt,bq as pt,x as Ne,ao as Pe,n as We,q as ht,am as xt,aq as Se,ar as G,aG as mt,bK as ft}from"./index-9yrtZWWe.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as $t,m as Ct,n as kt,M as St,u as Et,E as Tt,v as _t,p as Rt,q as zt,r as It,s as At,t as Mt}from"./Assets.styles-BR6LRzsi.js";import{L as Nt}from"./LoadMore-DSfpb61Y.js";import{u as Pt}from"./useInfiniteGrid-ByXPg4Cl.js";import{E as Wt}from"./ErrorNotice-DuHUqzrI.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-DX2i6M46.js";import{s as Ot,k as Gt}from"./buy-CrEjBbQr.js";import{f as Dt}from"./errors-DB8YoX8H.js";import{J as qt,C as Vt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-BUoy_yBS.js";import{G as Kt}from"./grid.styles-B8-aHr-Z.js";import"./skeleton.styles-BkB0ehmF.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-C46pWUg_.js";import"./sendMetaTransaction-BHIBWrRl.js";function D(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return W.chainId===Number(Bt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(r,o={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Vt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await d.available(r);if((c=o.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(r){return rt(B,r)}async function sn(r,o,l={}){var c;const x=l.chainId??W.chainId,h=l.provider??"across",d=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await it(d,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function rn(r,o){const l=fe.from(r.availableAmount),h=fe.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Gt(r.id)}],creditsSignatures:[r.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:B}}async function on(r,o={}){const l=tn,x=o.intervalMs??1e4,h=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(c.ok){const a=await c.json(),m=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,d=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:d});try{const m=await tt(h),g=nn(m);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:m});const u=await sn(l,o,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=rn(v.credit,u);let f;try{f=await Ft({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Lt))throw b;f=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ut(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await on(f,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:o,buyer:p,originConfirmed:a}),m instanceof Ht)return{status:"pending",originTxHash:m.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),m instanceof ue)throw m;const g=new Error(Dt(m,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=m,g}}const ln=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -379,7 +379,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,m]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),f=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?me(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:me(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[$,l]);async function F(){if(!(!x||!b||k||S||f.current)){f.current=!0,m("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),m(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),m("error")}finally{f.current=!1}}}const L=a!=="success"&&a!=="pending",z=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>m("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Tn(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(_e,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Tn(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
382
|
+
`;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,m]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),f=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?me(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:me(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[$,l]);async function F(){if(!(!x||!b||k||S||f.current)){f.current=!0,m("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),m(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),m("error")}finally{f.current=!1}}}const L=a!=="success"&&a!=="pending",z=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>m("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Tn(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(_e,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Tn(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Mn=s.nav`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-BYHuwl8r.js";import{C as O,R as N,a as ce,b as de}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-BYHuwl8r.js";import{C as O,R as N,a as ce,b as de}from"./categories-Djn1x7W5.js";import{n as c,T as pe}from"./Tooltip-BUoy_yBS.js";import{t as e,s as o,I as g,b as s,am as P,C as v}from"./index-9yrtZWWe.js";const xe=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-9yrtZWWe.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-C46pWUg_.js";import{f as et}from"./builder-BxyqTcR8.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-DB8YoX8H.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BHIBWrRl.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as $e,r as P,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t as le,s as i,b as a,L as de,bb as ta,J as aa,I as H,z as $t,K as Ke,x as sa,Y as Q,an as ot,o as na,q as ia,v as ra,bc as oa,A as ca,bd as da,ao as la,be as ua,bf as ct,bg as ha,bh as pa,y as ga,bi as dt,$ as G,bj as lt,bk as xa,F as ae,r as ma,c as ut,bl as fa,C as ya,bm as ht,bn as Be,bo as ba,bp as fe,bq as ye,br as pt,g as be,f as va,h as Re,bs as wa}from"./index-
|
|
1
|
+
import{j as e,L as $e,r as P,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t as le,s as i,b as a,L as de,bb as ta,J as aa,I as H,z as $t,K as Ke,x as sa,Y as Q,an as ot,o as na,q as ia,v as ra,bc as oa,A as ca,bd as da,ao as la,be as ua,bf as ct,bg as ha,bh as pa,y as ga,bi as dt,$ as G,bj as lt,bk as xa,F as ae,r as ma,c as ut,bl as fa,C as ya,bm as ht,bn as Be,bo as ba,bp as fe,bq as ye,br as pt,g as be,f as va,h as Re,bs as wa}from"./index-9yrtZWWe.js";import{M as Ca,S as ja,C as ka,H as $a,a as Sa,T as Ma,X as Ta,b as Ia,B as Pa,c as za,d as gt,e as Aa,f as je,P as St,m as Ea,g as qa,h as Ba,i as Ra,j as Mt,k as ke,L as _a,l as Wa,n as xt,o as mt,W as Fa,p as La,q as Ka,A as Ua,r as Na,s as Qa,t as Ha,u as Oa,v as Va,w as Ga,x as Ya,y as Da,z as Ja,D as Xa,E as Za,F as es,G as ts,I as as,J as ss,K as _e,N as ns,O as is,Q as rs,R as os,U as ft,V as yt,Y as cs,Z as ds,_ as ls}from"./CollectionCarousel-BKyJ1qJ0.js";import{k as us,l as hs,a as ps,n as gs,f as xs,A as ms}from"./authorizations-C46pWUg_.js";import{g as fs,j as We}from"./buy-CrEjBbQr.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-DX2i6M46.js";import{u as ws,M as Cs,R as ve,r as js,c as ks,p as vt}from"./useCreditPacks-B2mrQzTg.js";import{i as $s,a as Ss}from"./errors-DB8YoX8H.js";import{E as Ms}from"./ErrorNotice-DuHUqzrI.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BHIBWrRl.js";const{colors:se,radius:Ts}=le,Is=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as e,L as $e,r as P,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,qs="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
61
|
+
`,qs="https://cdn.decentraland.org/@dcl/shop/0.10.1-31034473421.commit-bc8c007/_assets/buy-error-22UunaPC.png";function Bs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",Y=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),D=l==="processing";return e.jsxs(Ca,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ja,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(ka,{"data-tall":D||void 0,children:[e.jsxs($a,{children:[e.jsxs(Sa,{children:[e.jsx(Ma,{children:Y}),!W&&e.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ia,{})})]}),e.jsxs(Pa,{children:[e.jsx(za,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(gt,{}),e.jsx(Aa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(je,{children:[e.jsxs(Es,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(gt,{}),de(o.totalCredits??0)]})]}),e.jsx(St,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ea(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(_s,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(je,{children:[e.jsxs(qa,{"data-testid":"buy-error",children:[e.jsx(Ba,{src:qs,alt:"",width:64,height:80}),e.jsxs(Ra,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const Y=o==="reserving",D=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(_a,{src:ta,alt:"",width:61,height:61}),e.jsx(Wa,{children:ne}),Y?e.jsxs(Is,{children:[e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{"data-step":!0,style:{width:`${D}%`}})}),I>1?e.jsxs(Ps,{children:[l,"/",I]}):null]}):e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:Y,onCancel:D}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Fa,{"data-testid":"nofunds-warning",children:[e.jsx(La,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Qa,{children:[e.jsxs("div",{children:[e.jsxs(Ha,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Oa,{address:n.item.creator}):null]}),e.jsxs(Va,{children:[e.jsx(Ga,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ya,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Da,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ja,{}),e.jsx(Xa,{children:de(n.credits)}),e.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:D,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"gradient",onClick:Y,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Tt,radius:Z}=le,It="@media (max-width: 1080px)",T="@media (max-width: 880px)",wt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-
|
|
1
|
+
import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-9yrtZWWe.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-DO__i5OQ.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bt as ee,a2 as te,D as R,bu as ae,bv as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,aq as z,ar as de,bw as pe,bx as xe}from"./index-
|
|
1
|
+
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bt as ee,a2 as te,D as R,bu as ae,bv as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,aq as z,ar as de,bw as pe,bx as xe}from"./index-9yrtZWWe.js";import{E as me}from"./ErrorNotice-DuHUqzrI.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-D2QDYBrf.js";import{u as je,S as L,a as ye,F as Ce,c as we,P as $e,d as ke,H as Ne,e as Se}from"./categories-Djn1x7W5.js";import{L as Pe}from"./LoadMore-DSfpb61Y.js";import{u as Ae}from"./useInfiniteGrid-ByXPg4Cl.js";import{G as Me}from"./grid.styles-B8-aHr-Z.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-BkB0ehmF.js";const Te=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as o,b as f,z as k,L as j,bW as C,C as G,w as Y,I as Q,F as X,g as W,h as B,f as Z,at as q,aa as J,b_ as F,ar as ee}from"./index-
|
|
1
|
+
import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as o,b as f,z as k,L as j,bW as C,C as G,w as Y,I as Q,F as X,g as W,h as B,f as Z,at as q,aa as J,b_ as F,ar as ee}from"./index-9yrtZWWe.js";import{s as te,f as U,A as _,g as K,r as ne,m as ae,i as ie,j as oe}from"./authorizations-C46pWUg_.js";import{i as se}from"./errors-DB8YoX8H.js";import{E as re}from"./ErrorNotice-DuHUqzrI.js";import{l as ce,m as de,n as le}from"./buy-CrEjBbQr.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-BHIBWrRl.js";import{I as xe,C as ge}from"./ethers-BDpbhgX6.js";const L="shop:resume_after_signin",fe=900*1e3;function ct(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function dt(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function lt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function pt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ht(a,n){return a.options.find(i=>i.method===n)??null}function ut(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-C4oAOZ2V.js","_assets/react-BYHuwl8r.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as o,_ as a}from"./index-
|
|
2
|
+
import{s as o,_ as a}from"./index-9yrtZWWe.js";import{r as n,j as e}from"./react-BYHuwl8r.js";const s=o.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as de,j as e,L as Le,d as Me,u as Ae,r as L}from"./react-BYHuwl8r.js";import{u as Ie}from"./useUrlFilters-DH-gxdfV.js";import{u as Re,S as Z,R as Te,F as _e,e as Be}from"./categories-
|
|
1
|
+
import{b as de,j as e,L as Le,d as Me,u as Ae,r as L}from"./react-BYHuwl8r.js";import{u as Ie}from"./useUrlFilters-DH-gxdfV.js";import{u as Re,S as Z,R as Te,F as _e,e as Be}from"./categories-Djn1x7W5.js";import{t as he,O as ze,Q as X,P as ee,s as i,bG as We,J as De,bH as Oe,b as o,bI as Ge,bJ as te,B as Ke,K as ue,a2 as me,bt as Ue,o as He,D as pe,bA as qe,bu as Ve,bv as Je,I as oe,c as Qe,x as Ye,v as Ze,am as Xe,ao as et,ap as tt,aq as M,ar as re,bK as se,bL as ot}from"./index-9yrtZWWe.js";import{T as xe}from"./skeleton.styles-BkB0ehmF.js";import{d as rt,P as st,C as it,a as at,b as nt,A as lt,c as ct,e as dt}from"./collectionPage.styles-D2QDYBrf.js";import{g as ht,h as ut,i as mt,j as pt,k as xt,C as gt,l as ft,o as bt,m as wt,n as vt,M as yt,E as jt,p as Ct,q as kt,r as $t,s as St,t as Nt}from"./Assets.styles-BR6LRzsi.js";import{L as ie}from"./LoadMore-DSfpb61Y.js";import{u as ae}from"./useInfiniteGrid-ByXPg4Cl.js";import{E as T}from"./ErrorNotice-DuHUqzrI.js";import{G as ne}from"./grid.styles-B8-aHr-Z.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./Tooltip-BUoy_yBS.js";function Et(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:ge,media:Pt}=he,Ft=i.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
background: ${w.bg};
|
|
4
4
|
border-radius: ${ge.card};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-9yrtZWWe.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|