@dcl/shop 0.6.1-30951438943.commit-29cea86 → 0.6.1
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-CCVwnN-d.js +384 -0
- package/_assets/{AnimatedBackground-C0Bpklcd.js → AnimatedBackground-CNn-Vax_.js} +1 -1
- package/_assets/{Assets-CVN8kbVX.js → Assets-BPgkfGkc.js} +11 -11
- package/_assets/{Assets.styles-DTCjJoYe.js → Assets.styles-BAy3by3Z.js} +1 -1
- package/_assets/{Authorizations-Doo9Zgdg.js → Authorizations-CdqHugnL.js} +1 -1
- package/_assets/{Cart-W7w0zqfv.js → Cart-CzNOpZkY.js} +2 -2
- package/_assets/{CircularProgress-DuQoJ6hf.js → CircularProgress-DqLGsuLk.js} +1 -1
- package/_assets/{Collection-DiBZWSLl.js → Collection-DmrD6mAW.js} +1 -1
- package/_assets/{CollectionCarousel-DbpF1h5w.js → CollectionCarousel-BpMj1RRH.js} +7 -7
- package/_assets/{Creator-gV7PR2lz.js → Creator-DYPK74k6.js} +1 -1
- package/_assets/{ErrorNotice-vGKBE1Hj.js → ErrorNotice-6j32LCd-.js} +1 -1
- package/_assets/{ExchangeController-C7H6XSRu.js → ExchangeController-CjtWowut.js} +1 -1
- package/_assets/{GetCredits-BClB8S1_.js → GetCredits-9nCD-_vL.js} +52 -52
- package/_assets/{HelpersUtil-B2odRbT4.js → HelpersUtil-6C8PzEL7.js} +1 -1
- package/_assets/{ItemDetail-o9GnfAIZ.js → ItemDetail-lJyiLtT6.js} +34 -34
- package/_assets/{LoadMore-69ZjUVQ9.js → LoadMore-C6sUcyIf.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-06X913rg.js → ManaPricingBanner.styles-zp0428S7.js} +1 -1
- package/_assets/{MenuList-CYuJjTkq.js → MenuList-BTdUxA4D.js} +1 -1
- package/_assets/{MyAssets-7DlPFZzH.js → MyAssets-BbmsS4SI.js} +1 -1
- package/_assets/{MyFavorites-CvUWGM2g.js → MyFavorites-B_Mv89Yf.js} +1 -1
- package/_assets/{NotFound-BfKww1lP.js → NotFound-0lsOfC5s.js} +1 -1
- package/_assets/{NotificationsBell-8BV2V_7m.js → NotificationsBell-CaKoTXrL.js} +1 -1
- package/_assets/{OutfitDetail-i6KGnd11.js → OutfitDetail-ME6t5FNU.js} +1 -1
- package/_assets/{OutfitPreview-BO-tY6LN.js → OutfitPreview-BCoX8M6g.js} +1 -1
- package/_assets/{OutfitStudio-DHMsd1iV.js → OutfitStudio-DeiWpnBW.js} +1 -1
- package/_assets/{StoreSettings-BBKP2P89.js → StoreSettings-BxTLlxHn.js} +1 -1
- package/_assets/{Success-RKKJMbUR.js → Success-DMCTT33h.js} +1 -1
- package/_assets/{SwapController-uaC5iBTR.js → SwapController-Ci7sPB_-.js} +1 -1
- package/_assets/{Tooltip-Dh4BuhSJ.js → Tooltip-BZ-qUO0l.js} +1 -1
- package/_assets/{TradeService-B44oeYAt.js → TradeService-Cu6fpwnh.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CtKoZGPW.js → W3MFrameProviderSingleton-8GeYldkk.js} +3 -3
- package/_assets/{WebCryptoP256-BgVEe5M8.js → WebCryptoP256-fMzbuVHl.js} +1 -1
- package/_assets/{authorizations-BWL7qlKm.js → authorizations-DOwEBZw0.js} +1 -1
- package/_assets/{basic-_OLz7uwX.js → basic-CNB5RbBM.js} +1 -1
- package/_assets/{biconomy-U_kcYvmd.js → biconomy-VIh33SiE.js} +1 -1
- package/_assets/{builder-I4cDZvRJ.js → builder-ENYhtC9A.js} +1 -1
- package/_assets/{buy-PW05H439.js → buy-DME37PMo.js} +1 -1
- package/_assets/{buy-gasless-B2bIFHQv.js → buy-gasless-CsB_UciL.js} +1 -1
- package/_assets/{categories-Cewsb8Ef.js → categories-SI1YlvJt.js} +1 -1
- package/_assets/{ccip-BYTqCIcr.js → ccip-BWQZvTr_.js} +1 -1
- package/_assets/{ccip-DZw0ptqC.js → ccip-r6C5X7kR.js} +1 -1
- package/_assets/{clsx-ChZXKlM3.js → clsx-Dp2xNKFR.js} +1 -1
- package/_assets/{collectionPage.styles-Dd3m9ofi.js → collectionPage.styles-DTQE0MEN.js} +1 -1
- package/_assets/{controller-CGfzFXj8.js → controller-D4hrVQu3.js} +2 -2
- package/_assets/{core-Eb3TLPcG.js → core-CG9Ai3BM.js} +4 -4
- package/_assets/{createSvgIcon-DIV4UAHy.js → createSvgIcon-BBqN76DB.js} +1 -1
- package/_assets/{custom-D9XFQnk4.js → custom-CoESkeU0.js} +1 -1
- package/_assets/{data-capture-DH1mVPA3.js → data-capture-DsD2q2fn.js} +1 -1
- package/_assets/{email-Da1yvej9.js → email-2Crwdpgb.js} +1 -1
- package/_assets/{embedded-wallet-DBHQI3mh.js → embedded-wallet-B5qGTlLf.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BQQ0TwU4.js → emotion-styled.browser.esm-Cc0eNU1p.js} +1 -1
- package/_assets/{engine-C32OFyoP.js → engine-DMQKkPgK.js} +1 -1
- package/_assets/{errors-Dyyi7AS1.js → errors-BNZ7sBF_.js} +1 -1
- package/_assets/{estimate-l1-fee-BUpWNCY1.js → estimate-l1-fee-D7epFE-D.js} +1 -1
- package/_assets/{execute-mSR8LGc4.js → execute-DKumTrX9.js} +2 -2
- package/_assets/{features-Dd4HBrMX.js → features-DI5UMV_W.js} +1 -1
- package/_assets/{fetchTokenMetadata-BZB4GCl8.js → fetchTokenMetadata-D4n2TjLB.js} +2 -2
- package/_assets/{field.styles-vC92Xftn.js → field.styles-CjeX0pR0.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DwWRMl-N.js → get-ecosystem-wallet-info-b6CDxjL2.js} +1 -1
- package/_assets/{getBalance-DSh23fMH.js → getBalance-k1LJAZwU.js} +1 -1
- package/_assets/{getNFT-BBp6M0pq.js → getNFT-B39rY-PL.js} +1 -1
- package/_assets/{getNFT-BevVadL_.js → getNFT-BMgMzvsZ.js} +1 -1
- package/_assets/{getThemeProps-BF7zjQVr.js → getThemeProps-CppRRpEN.js} +1 -1
- package/_assets/{grid.styles-Bb1W1YT9.js → grid.styles-Ckr_d1Os.js} +1 -1
- package/_assets/{hashTypedData-C5G1DAop.js → hashTypedData-CiesaRhT.js} +1 -1
- package/_assets/{hashTypedData-Wfn9v-Hf.js → hashTypedData-DUwT6kJz.js} +1 -1
- package/_assets/{in-app-BXEo5oJI.js → in-app-B5W9FA6J.js} +1 -1
- package/_assets/{in-app-wallet-calls-Bd6X0KWG.js → in-app-wallet-calls--fTMhgRz.js} +1 -1
- package/_assets/{index-BqMHKneq.js → index--5-WNACO.js} +1 -1
- package/_assets/{index-DgM4asaI.js → index-3Gl3qzVg.js} +1 -1
- package/_assets/{index-D3ia8xPb.js → index-6hXQkpzo.js} +1 -1
- package/_assets/{index-OM8C66gb.js → index-6lOpuU8D.js} +1 -1
- package/_assets/{index-DbyFw-p2.js → index-7Jx0RbBI.js} +1 -1
- package/_assets/{index-CGga9MZU.js → index-8Gs8aT7x.js} +1 -1
- package/_assets/{index-BNXLnSJ4.js → index-BH9Lj6j_.js} +1 -1
- package/_assets/{index-yp3Medz4.js → index-BPLQs7pP.js} +1 -1
- package/_assets/{index-DNzD8lGd.js → index-BQADEYsi.js} +1 -1
- package/_assets/{index-Bpxazn1C.js → index-BSMtncI0.js} +1 -1
- package/_assets/{index-uYRD9E52.js → index-BYQ4eOXE.js} +2 -2
- package/_assets/{index-ncNzPsNV.js → index-BjDpMJu4.js} +1 -1
- package/_assets/{index-BlneDIUK.js → index-BlTW8bE5.js} +1 -1
- package/_assets/{index-b5E6PDAn.js → index-BvHiSowo.js} +1 -1
- package/_assets/{index-DabDoxcF.js → index-BwnQwSAu.js} +2 -2
- package/_assets/{index-CCwIHj2Z.js → index-C2R_7cZP.js} +1 -1
- package/_assets/{index-B-wUrKiv.js → index-C4Mo9qnf.js} +3 -3
- package/_assets/{index-BK186nFF.js → index-C50bRdDg.js} +50 -50
- package/_assets/{index-DeMedGEt.js → index-C5xtRArG.js} +1 -1
- package/_assets/{index-ti6Xx8KP.js → index-CMt6SGgd.js} +1 -1
- package/_assets/{index-BFwmH5r2.js → index-COM-LGX-.js} +1 -1
- package/_assets/{index-CnYjUY-N.js → index-CROLwqLK.js} +1 -1
- package/_assets/{index-DoaAKgT7.js → index-CWDp9PWh.js} +1 -1
- package/_assets/{index-Cl0OwOQC.js → index-CWl1zAsC.js} +2 -2
- package/_assets/{index-vlz-Aki7.js → index-C_8wyBUp.js} +1 -1
- package/_assets/{index-DBY7pfsX.js → index-CdMXnYZl.js} +1 -1
- package/_assets/{index-7e_Syhad.js → index-CiVLOnq4.js} +1 -1
- package/_assets/{index-BehGKAc6.js → index-CjmdU7lV.js} +3 -3
- package/_assets/{index-CABCJq7C.js → index-CnU32wDE.js} +1 -1
- package/_assets/{index-B8FkQHkj.js → index-CqYYwjL0.js} +1 -1
- package/_assets/{index-6Oq8x_-m.js → index-Ct4YR2LP.js} +1 -1
- package/_assets/{index-Dsgz061o.js → index-Cz0mItuU.js} +1 -1
- package/_assets/{index-BQlATUFi.js → index-D0JaJVwf.js} +1 -1
- package/_assets/{index-2BF-jN6f.js → index-D0VlnNE3.js} +1 -1
- package/_assets/{index-CmOMlUK3.js → index-D1Kwe229.js} +1 -1
- package/_assets/{index-D6jXV4v6.js → index-D3b-6hLL.js} +3 -3
- package/_assets/{index-BCpKNpfr.js → index-DCUHwzVB.js} +1 -1
- package/_assets/{index-D58_3pMX.js → index-DIGH_-jR.js} +1 -1
- package/_assets/{index-QshQ-X06.js → index-DIYC-eqY.js} +1 -1
- package/_assets/{index-D_Rc0VlP.js → index-DIpNccsB.js} +1 -1
- package/_assets/{index-DHBBVF0A.js → index-DJigbyYH.js} +1 -1
- package/_assets/{index-DCDkfxBQ.js → index-DLJMJNYR.js} +1 -1
- package/_assets/{index-B1Fh_Ntj.js → index-DN_XFLDI.js} +4 -4
- package/_assets/{index-mDuPP0v8.js → index-DUdz_zrJ.js} +1 -1
- package/_assets/{index-B1eEwkzz.js → index-DmlHhfEt.js} +1 -1
- package/_assets/{index-BF7hghuG.js → index-DyyMlzME.js} +1 -1
- package/_assets/{index-DtNkXFsH.js → index-MSDyZgBz.js} +2 -2
- package/_assets/{index-DQllllFW.js → index-baUyxxA5.js} +1 -1
- package/_assets/{index-fkuvr7Fy.js → index-brzaaZ1P.js} +1 -1
- package/_assets/{index-vrvK7bcx.js → index-hzUEG0Wn.js} +1 -1
- package/_assets/{index-CpXK1eyp.js → index-pzI9SPYg.js} +1 -1
- package/_assets/{index-BMDKd-Ff.js → index-r_ie-fYk.js} +1 -1
- package/_assets/{index.es-BG9tAoxq.js → index.es-BfycRISM.js} +1 -1
- package/_assets/{index.es-Bq-mnMqp.js → index.es-CEspgBOo.js} +4 -4
- package/_assets/{index.es-D5Y2l8N-.js → index.es-Dz4gJjtG.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DQzEn08n.js → localBatchGatewayRequest-C2ejDWSe.js} +1 -1
- package/_assets/{networks-7mAev_So.js → networks-C8W7qTmi.js} +1 -1
- package/_assets/{onramp-C5rbJZZQ.js → onramp-gMYCcz-L.js} +1 -1
- package/_assets/{openzeppelin-cUgS_fFv.js → openzeppelin-DoXqKfoL.js} +1 -1
- package/_assets/{parseNft-BtgCWBfG.js → parseNft-CG6mXwGw.js} +2 -2
- package/_assets/{parseSignature-BL815h22.js → parseSignature-BtFyUMyh.js} +1 -1
- package/_assets/{parseSignature-0U8LTkYq.js → parseSignature-YB0y-EIH.js} +3 -3
- package/_assets/{passkeys-CenbJOC4.js → passkeys-DMD6dHpE.js} +1 -1
- package/_assets/{pay-with-exchange-fg2iyPQf.js → pay-with-exchange-DmOk5KUk.js} +1 -1
- package/_assets/{qr-overlay-Db9bn8si.js → qr-overlay-BmfI4Van.js} +1 -1
- package/_assets/{receive-Cy92xKIA.js → receive-C8CxHyfZ.js} +1 -1
- package/_assets/{resolveImplementation-CphK2kw-.js → resolveImplementation-D10q4uG8.js} +1 -1
- package/_assets/{rpc-tPaaI0wQ.js → rpc-C6XV-dPj.js} +1 -1
- package/_assets/{secp256k1-BuRL31Pv.js → secp256k1-BmbnB2T6.js} +1 -1
- package/_assets/{secp256k1-rc9cttcQ.js → secp256k1-CplZyQx1.js} +1 -1
- package/_assets/{secp256k1-BefPXR71.js → secp256k1-i1ynB1kh.js} +1 -1
- package/_assets/{send-batch-transaction-IhphBGXV.js → send-batch-transaction-DPGUnjFL.js} +1 -1
- package/_assets/{send-eip712-transaction-D1F2l2MF.js → send-eip712-transaction-DDBiSwZa.js} +2 -2
- package/_assets/{send-gasless-transaction-B32TPIoL.js → send-gasless-transaction-TUww1FFr.js} +2 -2
- package/_assets/{send-B85QTpWb.js → send-r-sbW-NR.js} +1 -1
- package/_assets/{send-transaction-DAsAIcLp.js → send-transaction-INP2LgJd.js} +2 -2
- package/_assets/{sendMetaTransaction-X4QLi3Hi.js → sendMetaTransaction-CtlcvZ2u.js} +1 -1
- package/_assets/{sendRawTransaction-Bp5LMxhF.js → sendRawTransaction-BiF1pCL3.js} +3 -3
- package/_assets/{serializeTransaction-CcoTA2oD.js → serializeTransaction-_CDXrMP2.js} +1 -1
- package/_assets/{session-proposal-BFRFzBM9.js → session-proposal-Cyo4-zWW.js} +1 -1
- package/_assets/{session-request-Kq_RHzZu.js → session-request-DhBEeqtM.js} +2 -2
- package/_assets/{signing-Dqg6cmff.js → signing-eZY4IKkr.js} +3 -3
- package/_assets/{socials-D13NM4Eg.js → socials-ez11BKnF.js} +1 -1
- package/_assets/{swaps-CQuH4Q4P.js → swaps-D50dXpS9.js} +1 -1
- package/_assets/{thirdweb-CIKZzA4I.js → thirdweb-DtMwg5nw.js} +3 -3
- package/_assets/{to-serializable-transaction-Bs3gRQ4f.js → to-serializable-transaction-Bo2k0bHN.js} +2 -2
- package/_assets/{trade-encoding-C7Wym_F1.js → trade-encoding-DBrxq_08.js} +1 -1
- package/_assets/{transactionReceipt-Bp1hf_iD.js → transactionReceipt-D84_cL1Y.js} +1 -1
- package/_assets/{transactions-Bli31a16.js → transactions-BxDrgH0T.js} +1 -1
- package/_assets/{useCreditPacks-CHzNSIvf.js → useCreditPacks-DJGSwrlc.js} +1 -1
- package/_assets/{useImportable-kOA7rsjp.js → useImportable-8-eoe6U0.js} +1 -1
- package/_assets/{useInfiniteGrid-CdPr9eL9.js → useInfiniteGrid-BioQWUj3.js} +1 -1
- package/_assets/{useTheme-CGp2hobC.js → useTheme-CuHYv3yr.js} +1 -1
- package/_assets/{verifyHash-tFRgslhI.js → verifyHash-Dp410C0R.js} +1 -1
- package/_assets/{w3m-modal-Cd7LAwQP.js → w3m-modal-ChBvc6av.js} +1 -1
- package/_assets/{w3m-modal-DIDR69iz.js → w3m-modal-q1294Ir0.js} +1 -1
- package/_assets/{wait-for-tx-receipt-BlFYuYR0.js → wait-for-tx-receipt-GGiAUH7I.js} +1 -1
- package/_assets/{wallets-0QMnCoJB.js → wallets-B8DTTYN0.js} +5 -5
- package/_assets/{web-connector-C-yPSxwg.js → web-connector-CwvhuMom.js} +3 -3
- package/_assets/{writeContract-BWpBg5cs.js → writeContract-CsfeVlnc.js} +1 -1
- package/_assets/{zoraTestnet-YDHc7FSH.js → zoraTestnet-CaYytGcL.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-Bcut5fRy.js +0 -357
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DN_XFLDI.js","_assets/react-DehiWSvs.js","_assets/index-C50bRdDg.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-8-eoe6U0.js","_assets/buy-DME37PMo.js","_assets/authorizations-DOwEBZw0.js","_assets/sendMetaTransaction-CtlcvZ2u.js","_assets/trade-encoding-DBrxq_08.js","_assets/ManaPricingBanner.styles-zp0428S7.js","_assets/field.styles-CjeX0pR0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as ye,bv as ve,s as l,t as s,q as we,B as je,l as te,v as ke,d as c,o as $,b3 as Ie,I as j,bw as Z,bx as J,by as Ae,_ as $e,x as P,bz as Pe,y as Le,b7 as H,av as Ne,bA as Ee,A as Te,bB as Ce,bC as q}from"./index-C50bRdDg.js";import{r as g,e as Se,j as t,L as ie,a as Fe}from"./react-DehiWSvs.js";import{u as De}from"./useImportable-8-eoe6U0.js";import{L as Me}from"./LoadMore-C6sUcyIf.js";import{u as I}from"./useInfiniteGrid-BioQWUj3.js";import{m as ae}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-DME37PMo.js";import"./authorizations-DOwEBZw0.js";import"./sendMetaTransaction-CtlcvZ2u.js";import"./trade-encoding-DBrxq_08.js";const He=15e3;function qe(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=He}function ze(e){const a=[...e].sort((i,o)=>o.createdAt-i.createdAt),n=[];for(const i of a){const o=n[n.length-1];o&&qe(o[o.length-1],i)?o.push(i):n.push([i])}return n.map(i=>{var o;return{id:((o=i.find(r=>r.txHash))==null?void 0:o.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,u)=>r+u.credits,0),lines:i}})}function Oe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Re(e){const a=[],n=new Map;for(const i of e){const o=Oe(i);if(!o){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=n.get(o);if(r){r.quantity+=1,r.credits+=i.credits;continue}const u={key:o,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(o,u),a.push(u)}return a}function We(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?ye(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function _e(e){const n=ze(e.purchases.filter(d=>d.status!=="EXPIRED")).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=e.sales.map(d=>{const p=We(d,e.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),o=(e.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),r=new Set(e.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(d=>!r.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...n,...i,...o,...u].sort((d,p)=>p.createdAt-d.createdAt||(d.id<p.id?-1:1))}function Be(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const se=e=>e.trim().toLowerCase();function Ge(e){const a=new Map;for(const n of e??[]){const i=se(n.txHash??"");if(!i)continue;const o=a.get(i);o?o.push(n):a.set(i,[n])}return a}function Ue(e,a,n=Date.now()){const i=a.txHash?e.get(se(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const o=i.length===1?Ke(i[0].netCents):null,r=i.filter(d=>!d.available&&d.availableAt>n);if(r.length===0)return{kind:"credited",credits:o};const u=r.reduce((d,p)=>Math.max(d,p.availableAt),0);return{kind:"pending",credits:o,availableAt:u}}function Ke(e){return ve(e)}const Qe="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/credits-product-vs4Q6u6l.svg",z=we`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,Ve=l.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
|
+
max-width: 760px;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
|
|
14
|
+
/* The migration tool's row (thumbnail + name + a 144px price field) does not survive the feed's
|
|
15
|
+
column: squeezed to 760px the price field lands on its own line on a desktop. Widening the whole
|
|
16
|
+
column keeps heading, chips and panel as one block, which is the point of the constraint above.
|
|
17
|
+
1003px is the tool's own width in the design, which puts its rows at the 979px they are drawn at. */
|
|
18
|
+
&[data-view='migrate'] {
|
|
19
|
+
max-width: 1003px;
|
|
20
|
+
}
|
|
21
|
+
`,Xe=l.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: baseline;
|
|
24
|
+
gap: 12px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
`,Ze=l.h1`
|
|
27
|
+
font-family: ${s.font.sans};
|
|
28
|
+
margin: 0;
|
|
29
|
+
`;l.span`
|
|
30
|
+
color: ${s.colors.muted};
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
`;const Je=l.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
margin-bottom: 20px;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
`,ne=l.button`
|
|
38
|
+
appearance: none;
|
|
39
|
+
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
40
|
+
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
41
|
+
pills carry. */
|
|
42
|
+
border: 0.5px solid ${s.colors.gray4};
|
|
43
|
+
background: ${s.colors.white};
|
|
44
|
+
color: ${s.colors.text};
|
|
45
|
+
font-family: ${s.font.sans};
|
|
46
|
+
font-size: 13px;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
line-height: 24px;
|
|
49
|
+
letter-spacing: 0.46px;
|
|
50
|
+
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
51
|
+
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
padding: 0 16px;
|
|
56
|
+
min-height: 40px;
|
|
57
|
+
border-radius: ${s.radius.pill};
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
transition:
|
|
60
|
+
background 0.15s,
|
|
61
|
+
border-color 0.15s,
|
|
62
|
+
color 0.15s;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background: ${s.colors.media};
|
|
66
|
+
}
|
|
67
|
+
&:focus-visible {
|
|
68
|
+
outline: 2px solid ${s.colors.accent};
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
&[data-active='true'] {
|
|
72
|
+
background: ${s.colors.accent};
|
|
73
|
+
border-color: ${s.colors.accent};
|
|
74
|
+
color: ${s.colors.white};
|
|
75
|
+
}
|
|
76
|
+
`,Ye=l(ne)`
|
|
77
|
+
position: relative;
|
|
78
|
+
|
|
79
|
+
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
80
|
+
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
81
|
+
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
82
|
+
background: ${s.colors.white};
|
|
83
|
+
color: ${s.colors.accent};
|
|
84
|
+
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
85
|
+
box-shadow: 0 0 0 2px ${s.colors.accent};
|
|
86
|
+
}
|
|
87
|
+
`,et=l.span`
|
|
88
|
+
position: absolute;
|
|
89
|
+
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
90
|
+
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
91
|
+
top: -6.5px;
|
|
92
|
+
right: -3.5px;
|
|
93
|
+
display: grid;
|
|
94
|
+
place-items: center;
|
|
95
|
+
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
96
|
+
letter-spacing: normal;
|
|
97
|
+
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
98
|
+
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
99
|
+
min-width: 20px;
|
|
100
|
+
height: 20px;
|
|
101
|
+
padding: 0 6px;
|
|
102
|
+
border-radius: ${s.radius.pill};
|
|
103
|
+
background: ${s.colors.brandViolet};
|
|
104
|
+
/**
|
|
105
|
+
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
106
|
+
*
|
|
107
|
+
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
108
|
+
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
109
|
+
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
110
|
+
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
111
|
+
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
112
|
+
*
|
|
113
|
+
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
114
|
+
* shadow draws outside the box.
|
|
115
|
+
*/
|
|
116
|
+
box-shadow: 0 0 0 2px ${s.colors.white};
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
line-height: 1.6;
|
|
120
|
+
color: ${s.colors.white};
|
|
121
|
+
`,tt=l.div`
|
|
122
|
+
min-height: 60vh;
|
|
123
|
+
`,Y=l.div`
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 16px;
|
|
127
|
+
`,L=l.div`
|
|
128
|
+
background: ${s.colors.white};
|
|
129
|
+
border: 1px solid ${s.colors.line};
|
|
130
|
+
border-radius: 16px;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
`,N=l.div`
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
gap: 12px;
|
|
137
|
+
padding: 14px 18px;
|
|
138
|
+
background: ${s.colors.softWhite};
|
|
139
|
+
border-bottom: 1px solid ${s.colors.line};
|
|
140
|
+
|
|
141
|
+
${s.media.maxWidth("mobile")} {
|
|
142
|
+
flex-wrap: wrap;
|
|
143
|
+
}
|
|
144
|
+
`,E=l.div`
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 2px;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
`,T=l.span`
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
color: ${s.colors.text};
|
|
152
|
+
`,C=l.span`
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
color: ${s.colors.muted};
|
|
155
|
+
`,S=l.div`
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: 14px;
|
|
159
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
160
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
161
|
+
margin-left: auto;
|
|
162
|
+
`,it=l.div`
|
|
163
|
+
flex: 0 0 auto;
|
|
164
|
+
width: 52px;
|
|
165
|
+
height: 52px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
background: ${s.colors.media};
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
|
|
172
|
+
img {
|
|
173
|
+
width: 30px;
|
|
174
|
+
height: 30px;
|
|
175
|
+
display: block;
|
|
176
|
+
}
|
|
177
|
+
`,F=l.span`
|
|
178
|
+
font-size: 11px;
|
|
179
|
+
font-weight: 700;
|
|
180
|
+
text-transform: uppercase;
|
|
181
|
+
letter-spacing: 0.03em;
|
|
182
|
+
padding: 4px 10px;
|
|
183
|
+
border-radius: ${s.radius.pill};
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
|
|
186
|
+
&[data-status='SETTLED'] {
|
|
187
|
+
background: rgba(30, 166, 114, 0.14);
|
|
188
|
+
color: ${s.colors.okStrong};
|
|
189
|
+
}
|
|
190
|
+
&[data-status='PENDING'] {
|
|
191
|
+
background: rgba(245, 166, 35, 0.16);
|
|
192
|
+
color: #b5790a;
|
|
193
|
+
}
|
|
194
|
+
&[data-status='SOLD'] {
|
|
195
|
+
background: rgba(103, 58, 183, 0.14);
|
|
196
|
+
color: ${s.colors.accent};
|
|
197
|
+
}
|
|
198
|
+
&[data-status='FAILED'] {
|
|
199
|
+
background: rgba(214, 61, 61, 0.14);
|
|
200
|
+
color: #b02a2a;
|
|
201
|
+
}
|
|
202
|
+
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
203
|
+
amber here is what made an abandoned checkout look like money on its way. */
|
|
204
|
+
&[data-status='UNFINISHED'] {
|
|
205
|
+
background: ${s.colors.line};
|
|
206
|
+
color: ${s.colors.muted};
|
|
207
|
+
}
|
|
208
|
+
`,at=l.button`
|
|
209
|
+
font-size: 11px;
|
|
210
|
+
font-weight: 700;
|
|
211
|
+
text-transform: uppercase;
|
|
212
|
+
letter-spacing: 0.03em;
|
|
213
|
+
padding: 4px 10px;
|
|
214
|
+
border-radius: ${s.radius.pill};
|
|
215
|
+
white-space: nowrap;
|
|
216
|
+
border: 1px solid ${s.colors.accent};
|
|
217
|
+
background: transparent;
|
|
218
|
+
color: ${s.colors.accent};
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
transition: background 0.15s ease;
|
|
221
|
+
|
|
222
|
+
&:hover:not(:disabled) {
|
|
223
|
+
background: rgba(103, 58, 183, 0.08);
|
|
224
|
+
}
|
|
225
|
+
&:disabled {
|
|
226
|
+
opacity: 0.6;
|
|
227
|
+
cursor: default;
|
|
228
|
+
}
|
|
229
|
+
`,v=l.div`
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
gap: 5px;
|
|
233
|
+
font-weight: 800;
|
|
234
|
+
color: ${s.colors.text};
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
|
|
237
|
+
.ccy-mark {
|
|
238
|
+
width: 16px;
|
|
239
|
+
height: 16px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
243
|
+
&[data-kind='income'] {
|
|
244
|
+
color: ${s.colors.okStrong};
|
|
245
|
+
}
|
|
246
|
+
`,re=l.img`
|
|
247
|
+
width: 16px;
|
|
248
|
+
height: 16px;
|
|
249
|
+
vertical-align: -0.15em;
|
|
250
|
+
`,st=l.span`
|
|
251
|
+
display: inline-flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
`,nt=l.span`
|
|
255
|
+
position: fixed;
|
|
256
|
+
transform: translateX(-50%);
|
|
257
|
+
padding: 6px 8px;
|
|
258
|
+
border-radius: 6px;
|
|
259
|
+
background: #16141a;
|
|
260
|
+
color: ${s.colors.white};
|
|
261
|
+
font-size: 12px;
|
|
262
|
+
font-weight: 600;
|
|
263
|
+
line-height: 1;
|
|
264
|
+
white-space: nowrap;
|
|
265
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
266
|
+
pointer-events: none;
|
|
267
|
+
z-index: 9999;
|
|
268
|
+
`,O=l.div`
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
`,D=l.div`
|
|
272
|
+
display: grid;
|
|
273
|
+
grid-template-columns: 52px 1fr auto;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: 14px;
|
|
276
|
+
padding: 12px 18px;
|
|
277
|
+
text-decoration: none;
|
|
278
|
+
color: inherit;
|
|
279
|
+
|
|
280
|
+
& + & {
|
|
281
|
+
border-top: 1px solid ${s.colors.line};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
&[data-link='true'] {
|
|
285
|
+
transition: background 0.15s;
|
|
286
|
+
}
|
|
287
|
+
&[data-link='true']:hover {
|
|
288
|
+
background: ${s.colors.media};
|
|
289
|
+
}
|
|
290
|
+
&[data-link='true']:focus-visible {
|
|
291
|
+
outline: 2px solid ${s.colors.accent};
|
|
292
|
+
outline-offset: -2px;
|
|
293
|
+
}
|
|
294
|
+
`,R=l.div`
|
|
295
|
+
width: 52px;
|
|
296
|
+
height: 52px;
|
|
297
|
+
border-radius: 10px;
|
|
298
|
+
background: ${s.colors.media};
|
|
299
|
+
overflow: hidden;
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
justify-content: center;
|
|
303
|
+
color: ${s.colors.muted2};
|
|
304
|
+
|
|
305
|
+
img {
|
|
306
|
+
width: 100%;
|
|
307
|
+
height: 100%;
|
|
308
|
+
object-fit: contain;
|
|
309
|
+
}
|
|
310
|
+
`,W=l.div`
|
|
311
|
+
width: 52px;
|
|
312
|
+
height: 52px;
|
|
313
|
+
border-radius: 10px;
|
|
314
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
315
|
+
background-size: 200% 100%;
|
|
316
|
+
animation: ${z} 1.3s infinite linear;
|
|
317
|
+
|
|
318
|
+
@media (prefers-reduced-motion: reduce) {
|
|
319
|
+
animation: none;
|
|
320
|
+
}
|
|
321
|
+
`,_=l.div`
|
|
322
|
+
min-width: 0;
|
|
323
|
+
display: flex;
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
gap: 2px;
|
|
326
|
+
`,B=l.span`
|
|
327
|
+
font-weight: 700;
|
|
328
|
+
white-space: nowrap;
|
|
329
|
+
overflow: hidden;
|
|
330
|
+
text-overflow: ellipsis;
|
|
331
|
+
`,G=l.span`
|
|
332
|
+
display: inline-block;
|
|
333
|
+
width: 140px;
|
|
334
|
+
max-width: 60%;
|
|
335
|
+
height: 12px;
|
|
336
|
+
border-radius: 6px;
|
|
337
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
338
|
+
background-size: 200% 100%;
|
|
339
|
+
animation: ${z} 1.3s infinite linear;
|
|
340
|
+
|
|
341
|
+
@media (prefers-reduced-motion: reduce) {
|
|
342
|
+
animation: none;
|
|
343
|
+
}
|
|
344
|
+
`,U=l.span`
|
|
345
|
+
font-size: 13px;
|
|
346
|
+
color: ${s.colors.muted};
|
|
347
|
+
`,rt=l.div`
|
|
348
|
+
display: flex;
|
|
349
|
+
align-items: center;
|
|
350
|
+
gap: 4px;
|
|
351
|
+
font-weight: 700;
|
|
352
|
+
color: ${s.colors.text};
|
|
353
|
+
white-space: nowrap;
|
|
354
|
+
|
|
355
|
+
.ccy-mark {
|
|
356
|
+
width: 14px;
|
|
357
|
+
height: 14px;
|
|
358
|
+
}
|
|
359
|
+
`,ee=l.div`
|
|
360
|
+
height: 132px;
|
|
361
|
+
border-radius: 16px;
|
|
362
|
+
border: 1px solid transparent;
|
|
363
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
364
|
+
background-size: 200% 100%;
|
|
365
|
+
animation: ${z} 1.3s infinite linear;
|
|
366
|
+
|
|
367
|
+
@media (prefers-reduced-motion: reduce) {
|
|
368
|
+
animation: none;
|
|
369
|
+
}
|
|
370
|
+
`,oe=l.div`
|
|
371
|
+
display: flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
align-items: center;
|
|
374
|
+
gap: 8px;
|
|
375
|
+
text-align: center;
|
|
376
|
+
padding: 90px 20px;
|
|
377
|
+
min-height: 50vh;
|
|
378
|
+
`,de=l.p`
|
|
379
|
+
font-size: 22px;
|
|
380
|
+
font-weight: 700;
|
|
381
|
+
margin: 6px 0 0;
|
|
382
|
+
`,ot=l(je)`
|
|
383
|
+
margin-top: 12px;
|
|
384
|
+
`,K=D.withComponent(ie),dt=g.lazy(()=>$e(()=>import("./index-DN_XFLDI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),A=24,ct=["all","purchases","sales"],M="migrate";function w(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ce(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function le(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function he({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),o=()=>{var u;const r=(u=a.current)==null?void 0:u.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return t.jsxs(st,{ref:a,tabIndex:0,onMouseEnter:o,onMouseLeave:()=>i(null),onFocus:o,onBlur:()=>i(null),children:[e,n?Fe.createPortal(t.jsx(nt,{style:{top:n.top,left:n.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function lt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:o}=$({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Ce(e.tradeId):q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),r=n&&o,u=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",p=H({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,x=t.jsxs(t.Fragment,{children:[r?t.jsx(W,{}):t.jsx(R,{children:d?t.jsx("img",{src:d,alt:u}):t.jsx(j,{name:"cart",size:20})}),t.jsxs(_,{children:[r?t.jsx(G,{}):t.jsx(B,{title:u,children:u}),e.quantity>1?t.jsx(U,{children:c("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(rt,{children:[t.jsx(P,{className:"ccy-mark"})," ",e.credits]})]});return p?t.jsx(K,{to:p,"data-link":"true",children:x}):t.jsx(D,{children:x})}function ht({order:e}){const a=Re(e.lines),n=a.reduce((i,o)=>i+o.quantity,0);return t.jsxs(L,{"data-testid":"purchase-order",children:[t.jsxs(N,{children:[t.jsxs(E,{children:[t.jsx(T,{children:w(e.createdAt)}),t.jsxs(C,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:n})]})]}),t.jsxs(S,{children:[t.jsx(F,{"data-status":e.status,children:e.status==="PENDING"?c("activity.processing"):c("activity.completed")}),t.jsxs(v,{children:[t.jsx(P,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(O,{children:a.map(i=>t.jsx(lt,{item:i},i.key))})]})}function ut({sale:e}){const{data:a,isLoading:n}=$({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",r=H({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(W,{}):t.jsx(R,{children:o?t.jsx("img",{src:o,alt:i}):t.jsx(j,{name:"offer",size:20})}),t.jsxs(_,{children:[n?t.jsx(G,{}):t.jsx(B,{title:i,children:i}),t.jsx(U,{children:c("activity.boughtFrom",{account:ce(e.seller)})})]})]});return t.jsxs(L,{"data-testid":"activity-mana-purchase",children:[t.jsxs(N,{children:[t.jsxs(E,{children:[t.jsx(T,{children:w(e.createdAt)}),t.jsx(C,{children:c("activity.paidWithMana")})]}),t.jsxs(S,{children:[t.jsx(F,{"data-status":"SETTLED",children:c("activity.completed")}),t.jsxs(v,{children:[le(e.manaWei)," ",t.jsx(he,{children:t.jsx(re,{src:ae,alt:"MANA"})})]})]})]}),t.jsx(O,{children:r?t.jsx(K,{to:r,"data-link":"true",children:u}):t.jsx(D,{children:u})})]})}function pt({sale:e,payout:a}){const{data:n,isLoading:i}=$({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),o=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",u=H({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,d=t.jsxs(t.Fragment,{children:[i?t.jsx(W,{}):t.jsx(R,{children:r?t.jsx("img",{src:r,alt:o}):t.jsx(j,{name:"offer",size:20})}),t.jsxs(_,{children:[i?t.jsx(G,{}):t.jsx(B,{title:o,children:o}),t.jsxs(U,{children:[c("activity.soldTo",{account:ce(e.counterparty)}),a.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:w(a.availableAt)})}`:""]})]})]});return t.jsxs(L,{"data-testid":"activity-sale",children:[t.jsxs(N,{children:[t.jsxs(E,{children:[t.jsx(T,{children:w(e.createdAt)}),t.jsx(C,{children:c("activity.saleLabel")})]}),t.jsxs(S,{children:[t.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),a.kind==="direct"?t.jsxs(v,{"data-kind":"income",children:["+",le(e.manaWei)," ",t.jsx(he,{children:t.jsx(re,{src:ae,alt:"MANA"})})]}):a.credits!==null?t.jsxs(v,{"data-kind":"income",children:[t.jsx(P,{className:"ccy-mark"})," +",Ne(a.credits)]}):t.jsx(v,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),t.jsx(O,{children:u?t.jsx(K,{to:u,"data-link":"true",children:d}):t.jsx(D,{children:d})})]})}function xt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Pe(e.status),i=n==="SETTLED"?c("activity.completed"):n==="FAILED"?c("activity.failed"):n==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),o=te(m=>m.session),r=Le(),[u,d]=g.useState(!1),p=e.status==="initiated"&&!!o;async function x(){if(!(!o||u)){d(!0);try{const m=await Ee(e.id,o.identity);if(m){window.location.href=m;return}Te.info(c("activity.resumeExpired")),r.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return t.jsx(L,{"data-testid":"credit-order",children:t.jsxs(N,{children:[t.jsx(it,{children:t.jsx("img",{src:Qe,alt:"","aria-hidden":!0})}),t.jsxs(E,{children:[t.jsx(T,{children:w(e.createdAt)}),t.jsxs(C,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:a})]})]}),t.jsxs(S,{children:[p?t.jsx(at,{type:"button",onClick:()=>void x(),disabled:u,"data-testid":"resume-order",children:u?c("activity.resuming"):c("activity.resume")}):null,t.jsx(F,{"data-status":n,children:i}),t.jsxs(v,{"data-kind":"income",children:["+",t.jsx(P,{className:"ccy-mark"})," ",e.credits]})]})]})})}function mt({filter:e}){const a={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[e];return t.jsxs(oe,{children:[t.jsx(j,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(de,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ot,{as:ie,to:"/items",variant:"purple",children:c("notFound.cta")}):null]})}function Et(){const{session:e}=te(),[a,n]=g.useState("all"),[i,o]=Se(),r=i.get("view")===M;ke({title:r?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:u}=De(),d=u!==void 0&&(u>0||r),p=!!e&&!r&&a!=="sales",x=!!e&&!r&&a!=="purchases",m=I(["purchases",e==null?void 0:e.address],h=>Ae(e.address,e.identity,{first:A,skip:h}),{enabled:p}),f=I(["sales",e==null?void 0:e.address],h=>Z(e.address,{role:"seller",first:A,skip:h}),{enabled:x}),b=I(["credit-orders",e==null?void 0:e.address],h=>J(e.address,e.identity,{first:A,skip:h}),{enabled:p}),y=I(["mana-purchases",e==null?void 0:e.address],h=>Z(e.address,{role:"buyer",first:A,skip:h}),{enabled:p}),{data:Q}=$({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>J(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:x,staleTime:6e4}),ue=g.useMemo(()=>Ge(Q),[Q]),{data:pe}=Ie(x);if(!e)return t.jsxs(oe,{children:[t.jsx(j,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(de,{children:c("activity.signInTitle")}),t.jsx("p",{className:"muted",children:c("activity.signInBody")})]});const V=Be(_e({purchases:p?m.items:[],sales:x?f.items:[],creditOrders:p?b.items:[],manaPurchases:p?y.items:[],rate:pe}),a),xe=p&&(m.isLoading||b.isLoading||y.isLoading)||x&&f.isLoading,X=p&&(m.isFetchingNextPage||b.isFetchingNextPage||y.isFetchingNextPage)||x&&f.isFetchingNextPage,me=p&&(m.hasNextPage||b.hasNextPage||y.hasNextPage)||x&&f.hasNextPage;function ge(){p&&m.hasNextPage&&m.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),p&&y.hasNextPage&&y.fetchNextPage(),x&&f.hasNextPage&&f.fetchNextPage()}function fe(h){if(n(h),!r)return;const k=new URLSearchParams(i);k.delete("view"),o(k,{replace:!0})}function be(){const h=new URLSearchParams(i);h.set("view",M),o(h,{replace:!0})}return t.jsxs(Ve,{"data-view":r?M:"feed",children:[t.jsx(Xe,{children:t.jsx(Ze,{children:c("nav.activity")})}),t.jsxs(Je,{role:"tablist","aria-label":c("nav.activity"),children:[ct.map(h=>t.jsx(ne,{type:"button",role:"tab","aria-selected":!r&&a===h,"data-active":!r&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>fe(h),children:c(`activity.filter.${h}`)},h)),d?t.jsxs(Ye,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":u?c("activity.migrate.chipAria",{count:u}):void 0,onClick:be,children:[c("activity.migrate.chip"),u?t.jsx(et,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),r?t.jsx(g.Suspense,{fallback:t.jsx(tt,{"aria-busy":"true"}),children:t.jsx(dt,{})}):xe?t.jsx(Y,{children:Array.from({length:5}).map((h,k)=>t.jsx(ee,{},k))}):V.length===0?t.jsx(mt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[V.map(h=>h.kind==="purchase"?t.jsx(ht,{order:h.order},h.id):h.kind==="credit"?t.jsx(xt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(ut,{sale:h.sale},h.id):t.jsx(pt,{sale:h.sale,payout:Ue(ue,h.sale)},h.id)),X?t.jsx(ee,{}):null]}),t.jsx(Me,{hasNextPage:me,isFetching:X,onLoadMore:ge})]})]})}export{Et as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-C50bRdDg.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.6.1/_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{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k as st,bc as rt,bd as ot,aq as it,b as at,s,t,l as Ue,b1 as lt,y as ct,av as be,d as n,w as dt,I as R,x as M,
|
|
1
|
+
import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k as st,bc as rt,bd as ot,aq as it,b as at,s,t,l as Ue,b1 as lt,y as ct,av as be,d as n,w as dt,I as R,x as M,bM as se,b0 as pt,U as ee,bg as ht,bf as xt,v as He,b3 as Oe,m as Ge,n as ft,ae as mt,ag as ze,ah as V,ax as ut,bI as gt}from"./index-C50bRdDg.js";import{g as bt,h as yt,i as wt,j as jt,k as vt,C as $t,l as Ct,o as kt,m as St,n as Et,M as Rt,u as _t,E as Tt,v as It,p as zt,q as At,r as Nt,s as Pt,t as Mt}from"./Assets.styles-BAy3by3Z.js";import{S as Ae,R as Wt,F as Bt,e as Ft}from"./categories-SI1YlvJt.js";import{L as Lt}from"./LoadMore-C6sUcyIf.js";import{u as Ut}from"./useInfiniteGrid-BioQWUj3.js";import{E as Ht}from"./ErrorNotice-6j32LCd-.js";import{d as Ot}from"./dcl-schemas-Dr9BTjb7.js";import{s as Gt,G as Dt,w as qt,S as Vt}from"./buy-gasless-CsB_UciL.js";import{s as Zt}from"./buy-DME37PMo.js";import{j as Kt}from"./trade-encoding-DBrxq_08.js";import{f as Jt}from"./errors-BNZ7sBF_.js";import{J as Qt,C as Xt,B as ye}from"./ethers-CtNGBird.js";import{n as Yt}from"./Tooltip-BZ-qUO0l.js";import{G as en}from"./grid.styles-Ckr_d1Os.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-DOwEBZw0.js";import"./sendMetaTransaction-CtlcvZ2u.js";function Z(r){const i=r.source??"item",h=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${i}:${h}`}const H="100000000000000000000",De=2,te=15,tn=/^[a-zA-Z0-9]+$/;function Ne(r){const i=r.trim();return i.length===0?{ok:!1,reason:"empty"}:tn.test(i)?i.length<De?{ok:!1,reason:"too-short"}:i.length>te?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function nn(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,te)}const sn=["function available(string _subdomain) view returns (bool)"],Pe={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return U.chainId===Number(Ot.ChainId.MATIC_MAINNET)?Pe.mainnet:Pe.sepolia}async function on(r,i={}){var l;const{rpc:h,address:c}=rn(),d=new Qt(h),a=new Xt(c,sn,d);console.info(`[names] availability check → DCLRegistrar(${c}).available("${r}") on ${h}`);const f=await a.available(r);if((l=i.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${f}`),f?"available":"taken"}const an="https://app.across.to/api";class we extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function ln(r){return it(H,r)}async function cn(r,i,h={}){var l;const c=h.chainId??U.chainId,d=h.provider??"across",a=`${U.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${c}&provider=${d}`,f=await at(a,{method:"GET",identity:r,metadata:{}});if(!f.ok){let p;try{p=(l=await f.json())==null?void 0:l.code}catch{}throw p==="ROUTE_COST_TOO_HIGH"?new we:new Error(`fetchNameCreditRoute ${f.status}`)}return f.json()}function dn(r,i){const h=ye.from(r.availableAmount),d=ye.from(H).sub(h);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Kt(r.id)}],creditsSignatures:[r.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:d.isNegative()?"0":d.toString(),maxCreditedValue:H}}async function pn(r,i={}){const h=an,c=i.intervalMs??1e4,d=i.maxAttempts??60;let a={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let f=0;f<d;f++){try{const l=await fetch(`${h}/deposit/status?originChainId=137&depositTxHash=${r}`);if(l.ok){const p=await l.json(),x=(p.status??"pending").toLowerCase(),y=p.fillTx??p.fillTxnRef??null,m=p.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:y,actionsSucceeded:m};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};a={status:"pending",destinationTxHash:y,actionsSucceeded:m}}}catch{}f<d-1&&await new Promise(l=>setTimeout(l,c))}return a}async function hn(r){const{name:i,identity:h,signer:c}=r,d=r.chainId??U.chainId,a=r.provider??"across",f=(r.beneficiary??await c.getAddress()).toLowerCase();let l=null,p=!1;console.info("[names] register start",{name:i,buyer:f,chainId:d,provider:a});try{const x=await st(d),y=ln(x);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:x});const m=await cn(h,i,{chainId:d,provider:a});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await rt(h,y);if(l=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),ye.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const k=dn(C.credit,m);let g;try{g=await Gt({chainId:d,buyer:f,signer:c,args:k})}catch(b){if(!(b instanceof Dt))throw b;g=await Zt(d,k,c)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await qt(g),p=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),a==="across"){const b=await pn(g,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};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:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:i,buyer:f,originConfirmed:p}),x instanceof Vt)return{status:"pending",originTxHash:x.txHash};if(l&&!p&&await ot(h,[l]).catch(()=>{}),x instanceof we)throw x;const y=new Error(Jt(x,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=x,y}}const xn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -7,7 +7,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
background: rgba(22, 21, 24, 0.55);
|
|
10
|
-
`,
|
|
10
|
+
`,fn=s.div`
|
|
11
11
|
width: 560px;
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
max-height: 92vh;
|
|
@@ -112,7 +112,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
112
112
|
font-family: ${t.font.sans};
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
color: ${t.colors.muted2};
|
|
115
|
-
`,
|
|
115
|
+
`,fe=s.div`
|
|
116
116
|
flex: none;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -127,7 +127,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
127
127
|
height: 22px;
|
|
128
128
|
color: ${t.colors.brandViolet};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,mn=s.div`
|
|
131
131
|
margin-top: 16px;
|
|
132
132
|
padding: 16px;
|
|
133
133
|
border-radius: 12px;
|
|
@@ -323,7 +323,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
323
323
|
outline: 2px solid ${t.colors.accent};
|
|
324
324
|
outline-offset: 2px;
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`,In=s.a`
|
|
327
327
|
flex: 1;
|
|
328
328
|
display: inline-flex;
|
|
329
329
|
align-items: center;
|
|
@@ -347,7 +347,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,me=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -379,7 +379,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function
|
|
382
|
+
`;function zn({name:r,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),f=ct(),l=Le(),[p,x]=u.useState("confirm"),[y,m]=u.useState(""),[C,k]=u.useState(null),g=u.useRef(!1),b=y.trim().toLowerCase()===r.toLowerCase(),S=p==="completing",v=i!=null?be(i):"—",_=i==null,E=d==null?void 0:d.credits,W=i!=null&&E!=null?i-E:0,$=W>0,T=_?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:be(W)}):null;u.useEffect(()=>{const w=G=>{G.key==="Escape"&&!S&&h()};document.addEventListener("keydown",w);const O=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=O}},[S,h]);async function z(){if(!(!c||!b||_||$||g.current)){g.current=!0,x("completing"),k(null);try{const w=await hn({name:r,identity:c.identity,signer:c.signer});ee("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:w.status}),f.invalidateQueries({queryKey:["usd-balance"]}),f.invalidateQueries({queryKey:["my-assets"]}),x(w.status==="registered"?"success":"pending")}catch(w){ee(xt(w)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ht(w),purchase_type:"name"}),k(w instanceof we?n("names.errorRouteCost"):(w==null?void 0:w.message)||n("names.errorGeneric")),x("error")}finally{g.current=!1}}}const A=p!=="success"&&p!=="pending",N=dt(c==null?void 0:c.providerType);return e.jsx(xn,{onClick:S?void 0:h,role:"presentation",children:e.jsxs(fn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:p==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:h,disabled:S,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{})]}),(p==="confirm"||p==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),p==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(me,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>x("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(mn,{children:[e.jsx(un,{children:n("names.confirmTitle")}),e.jsx(gn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(r)}</b>`})}}),e.jsxs(bn,{children:[e.jsx(yn,{"aria-hidden":!0,children:"@"}),e.jsx(wn,{value:y,onChange:w=>m(w.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(y.length,8)}ch`}}),e.jsx(jn,{children:".dcl.eth"})]})]}),T?e.jsxs(me,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:T})]}):null,e.jsx(Me,{onClick:()=>void z(),disabled:!b||!c||_||$,children:n("names.buyCta")})]})]}),p==="completing"&&e.jsxs(vn,{children:[e.jsx($n,{src:pt,alt:"",width:56,height:56}),e.jsx(Cn,{children:N?n("names.confirming"):n("names.completing")}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(En,{children:"1/1"})]})]}),p==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(me,{"data-tone":"info",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")})})]}),p==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(Tn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")}),e.jsx(In,{href:U.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(r){return r.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/identity-B4DXDuJP.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/world-B-9aPlxu.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/invite-BfwIhP2C.webp",Wn="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Fn=s.nav`
|
|
@@ -471,9 +471,9 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
471
471
|
display: flex;
|
|
472
472
|
flex-direction: column;
|
|
473
473
|
gap: 12px;
|
|
474
|
-
`,
|
|
474
|
+
`,Zn=s.div`
|
|
475
475
|
position: relative;
|
|
476
|
-
`,
|
|
476
|
+
`,Kn=s("div",Yt("invalid"))`
|
|
477
477
|
display: flex;
|
|
478
478
|
align-items: center;
|
|
479
479
|
gap: 8px;
|
|
@@ -729,7 +729,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
729
729
|
${t.media.maxWidth("mobile")} {
|
|
730
730
|
grid-template-columns: 1fr;
|
|
731
731
|
}
|
|
732
|
-
`,
|
|
732
|
+
`,K=s.article`
|
|
733
733
|
min-width: 0;
|
|
734
734
|
display: flex;
|
|
735
735
|
flex-direction: column;
|
|
@@ -798,4 +798,4 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,k a
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,xs="https://docs.decentraland.org/creator/worlds/about/",ms="https://governance.decentraland.org";function fs(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?Ge(H,c):null,[a,m]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),f=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{f.current&&k(f.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,W=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(W),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{children:[e.jsx(Dn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:_=>m(nn(_.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Jn,{ref:f,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Qn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:fs(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:De})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(Z,{children:[e.jsx(J,{src:Nn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(J,{src:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(J,{src:Mn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(J,{src:Wn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(In,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Bs(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),m=r.get("status"),l=m&&bs.includes(m)?m:"on_sale",p=(o,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[f,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,W]=u.useState("newest"),[$,T]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=z=>{z.key==="Escape"&&T(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const I=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=mt(),O=x?Ft[x]:void 0,G=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:f.length?f:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:G,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:f.length?f:void 0,wearableCategories:O,search:c||void 0,sortBy:G,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:B,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ke,fetchNextPage:Ze}=Ut(I?["shop-items",je]:["catalog-items",ve],o=>I?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=o=>Se&&o.manaWei?Ge(o.manaWei,Se):null,Ye=I&&Qe&&F.some(o=>o.source==="legacy"),Ee=P||B||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||B||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,P,B,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||B)return;const o=JSON.stringify({category:a,subCategory:x,rarities:f,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:f,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:D})},[a,x,f,A,N,E,l,v,P,B,D]);function _e(o){p("category",o),y(null)}function Te(o){p("status",o==="on_sale"?null:o)}function ze(o){C(j=>j.includes(o)?j.filter(z=>z!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Wt)f.includes(o)&&L.push({key:`rarity-${o}`,label:ft(o),onRemove:()=>ze(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:f,onToggleRarity:ze,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Bt,{sort:E,onSort:W,total:$e,loading:P||B,query:c,onOpenFilters:()=>T(!0),chips:L,onClearChips:tt}),Je&&I&&F.some(o=>o.source==="legacy")?e.jsx(_t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(Ie,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!I)return e.jsx(V,{item:o,mode:"view"},K(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},K(o));const z=Xe(j);return z==null?e.jsx(V,{item:o,mode:"view"},K(o)):e.jsx(V,{item:{...j,priceCredits:z}},K(o))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ke,onLoadMore:()=>void Ze()})]})]})})]})}export{Bs as Assets};
|
|
801
|
+
`,xs="https://docs.decentraland.org/creator/worlds/about/",fs="https://governance.decentraland.org";function ms(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?Ge(H,c):null,[a,f]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),m=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{m.current&&k(m.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,W=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(W),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{children:[e.jsx(Dn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Zn,{children:[e.jsxs(Kn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:_=>f(nn(_.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Jn,{ref:m,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Qn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:ms(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:De})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(K,{children:[e.jsx(J,{src:Nn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Mn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Wn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:fs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(zn,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Bs(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),f=r.get("status"),l=f&&bs.includes(f)?f:"on_sale",p=(o,j)=>i(I=>{const ne=new URLSearchParams(I);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[m,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,W]=u.useState("newest"),[$,T]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=I=>{I.key==="Escape"&&T(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const z=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=ft(),O=x?Ft[x]:void 0,G=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:m.length?m:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:G,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:m.length?m:void 0,wearableCategories:O,search:c||void 0,sortBy:G,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:B,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ze,fetchNextPage:Ke}=Ut(z?["shop-items",je]:["catalog-items",ve],o=>z?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=o=>Se&&o.manaWei?Ge(o.manaWei,Se):null,Ye=z&&Qe&&F.some(o=>o.source==="legacy"),Ee=P||B||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||B||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,P,B,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||B)return;const o=JSON.stringify({category:a,subCategory:x,rarities:m,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:m,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:D})},[a,x,m,A,N,E,l,v,P,B,D]);function _e(o){p("category",o),y(null)}function Te(o){p("status",o==="on_sale"?null:o)}function Ie(o){C(j=>j.includes(o)?j.filter(I=>I!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Wt)m.includes(o)&&L.push({key:`rarity-${o}`,label:mt(o),onRemove:()=>Ie(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:m,onToggleRarity:Ie,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Bt,{sort:E,onSort:W,total:$e,loading:P||B,query:c,onOpenFilters:()=>T(!0),chips:L,onClearChips:tt}),Je&&z&&F.some(o=>o.source==="legacy")?e.jsx(_t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:gs,alt:""}),e.jsxs(zt,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(ze,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!z)return e.jsx(V,{item:o,mode:"view"},Z(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},Z(o));const I=Xe(j);return I==null?e.jsx(V,{item:o,mode:"view"},Z(o)):e.jsx(V,{item:{...j,priceCredits:I}},Z(o))}),ke?e.jsx(ze,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ze,onLoadMore:()=>void Ke()})]})]})})]})}export{Bs as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae,b as re}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae,b as re}from"./categories-SI1YlvJt.js";import{n as c,T as le}from"./Tooltip-BZ-qUO0l.js";import{t as e,s as o,I as g,d as s,ae as ce,e as v}from"./index-C50bRdDg.js";const de=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-DehiWSvs.js";import{s as n,B as P,t as a,q as D,v as W,d as e,l as G,w as O,I as b,x as B,o as w,y as K,c as Q,z as H,A,D as X,E as Z,F as E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-DehiWSvs.js";import{s as n,B as P,t as a,q as D,v as W,d as e,l as G,w as O,I as b,x as B,o as w,y as K,c as Q,z as H,A,D as X,E as Z,F as E}from"./index-C50bRdDg.js";import{d as J,f as U,b as V,h as Y,s as tt,a as it}from"./authorizations-DOwEBZw0.js";import{f as et}from"./builder-ENYhtC9A.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-BNZ7sBF_.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CtlcvZ2u.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|