@dcl/shop 0.1.0-30381444187.commit-e5b9f13 → 0.1.0-30381451752.commit-ab871f3
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-B63zG8uY.js → Activity-DSc7mvP4.js} +18 -18
- package/assets/{AnimatedBackground-CWPdO0WE.js → AnimatedBackground-fVnlmf9F.js} +1 -1
- package/assets/{Assets-WnaUem5h.js → Assets-CH9evMea.js} +11 -11
- package/assets/{Assets.styles-Dmhspue_.js → Assets.styles-CGAD6wJa.js} +5 -5
- package/assets/{Authorizations-CAStHHID.js → Authorizations-DhC0rdm8.js} +4 -4
- package/assets/Button-DOi50GW0.js +74 -0
- package/assets/{Cart-D-YOXeH9.js → Cart-Cn3ZtfkI.js} +1 -1
- package/assets/{CircularProgress-CpOs7g9a.js → CircularProgress-JMezNnqa.js} +5 -5
- package/assets/{Collection-9Fu4_XnC.js → Collection-DjZMT60J.js} +2 -2
- package/assets/{CollectionCarousel-CzvvuUUw.js → CollectionCarousel-Ck_R1F2f.js} +5 -5
- package/assets/Creator-CMnVKtlV.js +1 -0
- package/assets/{ExchangeController-CL_gVqSw.js → ExchangeController-C6mQYps7.js} +1 -1
- package/assets/{GetCredits-DSK7zyc2.js → GetCredits-5VMKvJ-K.js} +11 -11
- package/assets/{HelpersUtil-BfapKZKr.js → HelpersUtil-XXeaUDZE.js} +1 -1
- package/assets/ImportListings-CF7yr8q-.js +5 -0
- package/assets/{ItemDetail-D49gDAwf.js → ItemDetail-BY0kHQB-.js} +185 -185
- package/assets/{LoadMore-DTUpuDyu.js → LoadMore-BekgL6OE.js} +1 -1
- package/assets/MarketCheckout-GA-mHw2T.js +3 -0
- package/assets/{MenuList-DQbLlN7L.js → MenuList-CkcgsIA6.js} +1 -1
- package/assets/{MyAssets-DJ0hwGXR.js → MyAssets-ByTH-epK.js} +1 -1
- package/assets/{MyFavorites-D3n_-d0Z.js → MyFavorites-BFzYjDUH.js} +1 -1
- package/assets/{NotFound-MMFCqdKn.js → NotFound-TS_fVknU.js} +1 -1
- package/assets/NotificationsBell-Bho6wwFJ.js +34 -0
- package/assets/{StoreSettings-CdSK69sU.js → StoreSettings-P1WQMPTt.js} +5 -5
- package/assets/{Success-KKN_AjMe.js → Success-CZvGvIYB.js} +1 -1
- package/assets/{SwapController-BNkoWTIp.js → SwapController-DcTviSiv.js} +1 -1
- package/assets/{Tooltip-CBuz_rc2.js → Tooltip-Ck8OHf1K.js} +1 -1
- package/assets/{TradeService-Dm_ASWCN.js → TradeService-CQyC0ckJ.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-CeSRgOaN.js → W3MFrameProviderSingleton-oH9nrVqa.js} +3 -3
- package/assets/{WebCryptoP256-GalvwmvU.js → WebCryptoP256-D6sJ4GW3.js} +1 -1
- package/assets/{authorizations-Ds7LRLV0.js → authorizations-BxQ2tMzo.js} +1 -1
- package/assets/{basic-D_j1sfcj.js → basic-BRNG7iiw.js} +1 -1
- package/assets/{biconomy-YD94PgiS.js → biconomy-CUHnXsx-.js} +1 -1
- package/assets/{builder-Cc8g4-4q.js → builder-DZ1jvdvk.js} +1 -1
- package/assets/{buy-DnSS_Kop.js → buy-C-oTH9gd.js} +1 -1
- package/assets/{buy-gasless-9Zn1yAMk.js → buy-gasless-BlKkmgRS.js} +1 -1
- package/assets/cart-checkout-BQRIzuA5.js +1 -0
- package/assets/{categories-BI9AXlDF.js → categories-DhS9aD1g.js} +4 -4
- package/assets/{ccip-bHN-8eS1.js → ccip-BQlc06tF.js} +1 -1
- package/assets/{ccip-CiESIEiQ.js → ccip-x24MUJVN.js} +1 -1
- package/assets/collection-CB1x49ld.js +1 -0
- package/assets/{controller-B2JIau8v.js → controller-ab9pqJXK.js} +2 -2
- package/assets/{core-3cHR7yu5.js → core-Dg-XVaV5.js} +4 -4
- package/assets/{custom-BFV9Niby.js → custom-CTXht3LT.js} +1 -1
- package/assets/{data-capture-DTqon_Ye.js → data-capture-gVncKP92.js} +1 -1
- package/assets/{email-CN7CWhKF.js → email-_DXK33a9.js} +1 -1
- package/assets/{embedded-wallet-Q6nTAiGf.js → embedded-wallet-B_k2BCRi.js} +1 -1
- package/assets/emotion-styled.browser.esm-v-WGRXph.js +1 -0
- package/assets/{engine-DoRvgWV1.js → engine-ha18BPJJ.js} +1 -1
- package/assets/{errors-CG6pp58g.js → errors-CRgGE21K.js} +1 -1
- package/assets/{estimate-l1-fee-DIch6QAI.js → estimate-l1-fee-Bz9lwTZI.js} +1 -1
- package/assets/{execute-UcJesME5.js → execute-CLGkeIM4.js} +2 -2
- package/assets/{features-B53I2xTg.js → features-BLGU5qKo.js} +1 -1
- package/assets/{fetchTokenMetadata-CqYkUkwH.js → fetchTokenMetadata-CYxDKmIt.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-HoRTPbSm.js → get-ecosystem-wallet-info-yJH_bkud.js} +1 -1
- package/assets/{getBalance-BMDqICQz.js → getBalance-CXmOkNzY.js} +1 -1
- package/assets/{getNFT-WdF3UG1j.js → getNFT-D0B4erfI.js} +1 -1
- package/assets/{getNFT-6TA-E6XX.js → getNFT-DysvkQcd.js} +1 -1
- package/assets/{getThemeProps-HByDG2pD.js → getThemeProps-DIwZ5N8L.js} +1 -1
- package/assets/{hashTypedData-ug9gj3v5.js → hashTypedData--HdA9-HS.js} +1 -1
- package/assets/{hashTypedData-BGvyK_O1.js → hashTypedData-DziOW2Vc.js} +1 -1
- package/assets/{import-CZZ9-DX_.js → import-CsDUWWqh.js} +1 -1
- package/assets/{in-app-BXpVuL_f.js → in-app-D7O2V44M.js} +1 -1
- package/assets/{in-app-wallet-calls-Cw2KNfOh.js → in-app-wallet-calls-DL6ZAl8I.js} +1 -1
- package/assets/{index-D0fJ7qrq.js → index-7Wsfe2Up.js} +1 -1
- package/assets/{index-C68XxPCY.js → index-B2t3nSe7.js} +1 -1
- package/assets/{index-CYMsLttB.js → index-B7T9Zh6O.js} +1 -1
- package/assets/{index-CaR23uYb.js → index-BCW_w0UN.js} +1 -1
- package/assets/{index-BeeMSgi1.js → index-BE-vH0_t.js} +1 -1
- package/assets/{index-Bq0YYsbG.js → index-BIrUjWEF.js} +1 -1
- package/assets/{index-F-n6GV2b.js → index-BMMsxyuq.js} +1 -1
- package/assets/{index-BHPkQDns.js → index-BUrRDjD6.js} +1 -1
- package/assets/{index-BOMAmQU7.js → index-BaUNQyyt.js} +1 -1
- package/assets/{index-B7jIFcHs.js → index-BaYUVFML.js} +2 -2
- package/assets/{index-CeKksx_X.js → index-Bc2znaCv.js} +1 -1
- package/assets/{index-CmgZ4NMC.js → index-Bg4URcJg.js} +1 -1
- package/assets/{index-CjpRvZkq.js → index-BgsCmFBR.js} +1 -1
- package/assets/{index-Fe4H2sUE.js → index-C1EFfqUT.js} +1 -1
- package/assets/{index-B0SdAX-m.js → index-CB0_zAGI.js} +1 -1
- package/assets/{index-TmxHL85j.js → index-CE-8j9dT.js} +31 -31
- package/assets/{index-euFuE7ah.js → index-CE3I8gyz.js} +1 -1
- package/assets/{index-2jouHGho.js → index-CI3LRVdJ.js} +1 -1
- package/assets/{index-gxa5wyAJ.js → index-CLl3y_zB.js} +3 -3
- package/assets/{index-Cy8JAEGy.js → index-CQ2b-Icm.js} +1 -1
- package/assets/{index-C7TVyPoU.js → index-CQfyml-1.js} +1 -1
- package/assets/{index-b39aIkkP.js → index-CVa7EGSX.js} +1 -1
- package/assets/{index-BEmTYNSG.js → index-CYjzOXa9.js} +1 -1
- package/assets/{index-Dr9lSl0n.js → index-CZKSPj3S.js} +1 -1
- package/assets/{index-B1saYH84.js → index-Cd2tsAns.js} +1 -1
- package/assets/{index-C0ACz6_-.js → index-CkqJHGTd.js} +1 -1
- package/assets/{index-BqPcUFuz.js → index-Cmvj85Uh.js} +1 -1
- package/assets/{index-F_0Er667.js → index-CoKHkfgd.js} +2 -2
- package/assets/{index-G_lkaThL.js → index-CscFkYoq.js} +1 -1
- package/assets/index-Ctx_ebhF.js +2 -0
- package/assets/index-Cv07XGtu.js +4 -0
- package/assets/{index-BBeW5CPj.js → index-D-LfADaw.js} +1 -1
- package/assets/{index-BQe1IsNb.js → index-D-UY1tLQ.js} +1 -1
- package/assets/{index-DqLpZ4oP.js → index-D9jcyP1T.js} +1 -1
- package/assets/{index-DaGhU6Uz.js → index-DAc_icdG.js} +1 -1
- package/assets/{index-CKSJdo5m.js → index-DR4iRFBm.js} +1 -1
- package/assets/{index-Z5LdHVdI.js → index-DalVAnKe.js} +1 -1
- package/assets/{index-DpXleRYB.js → index-DcffeS4F.js} +1 -1
- package/assets/{index-Y77Y_U0L.js → index-Dmk33w1E.js} +1 -1
- package/assets/{index-2RpQo6sW.js → index-DxHwXU1C.js} +1 -1
- package/assets/{index-CDEPMu43.js → index-J1CoPuuN.js} +3 -3
- package/assets/{index-D9gz4wTG.js → index-QZtXXaW6.js} +1 -1
- package/assets/{index-ogLhf7-S.js → index-VytDXqCW.js} +1 -1
- package/assets/{index-ExvBrBJ4.js → index-_Rup9P59.js} +2 -2
- package/assets/{index-CmgoqHgW.js → index-aJlKiR42.js} +1 -1
- package/assets/{index-D7r-KbUN.js → index-lTWpOCxL.js} +1 -1
- package/assets/{index-FvnJRnD5.js → index-mBqsXHEL.js} +3 -3
- package/assets/{index-DGIUeX6X.js → index-oGOYPuqO.js} +1 -1
- package/assets/{index-D95ZUsPD.js → index-odQTruvU.js} +1 -1
- package/assets/{index-_hV86vSn.js → index-palPyzeM.js} +1 -1
- package/assets/{index-B5JNl4HC.js → index-plri7RJC.js} +1 -1
- package/assets/{index.es-DD7iT23u.js → index.es-BKZDd-uH.js} +4 -4
- package/assets/{index.es-CmoiU8SE.js → index.es-frivxByX.js} +1 -1
- package/assets/{index.es-DDEozdoq.js → index.es-kEVHcelo.js} +1 -1
- package/assets/{localBatchGatewayRequest-BGfmM9P7.js → localBatchGatewayRequest-CySxBK0P.js} +1 -1
- package/assets/mana-rate-iDr_vy1I.js +1 -0
- package/assets/{networks-CBAVrHYh.js → networks-3-OnX6AH.js} +1 -1
- package/assets/{onramp-dft5bcN9.js → onramp-Bq5dAlFw.js} +1 -1
- package/assets/{openzeppelin-WekOcr_Z.js → openzeppelin-CML0yooi.js} +1 -1
- package/assets/{parseNft-DTV6iT7B.js → parseNft-Ci6Mgfjs.js} +2 -2
- package/assets/{parseSignature-C7rL0b_w.js → parseSignature-D-9wk3ib.js} +3 -3
- package/assets/{parseSignature-DmkHq9fC.js → parseSignature-cZaawZ6k.js} +1 -1
- package/assets/{passkeys--Px7LRhh.js → passkeys-cg1VKv6x.js} +1 -1
- package/assets/{pay-with-exchange-CMQeyenn.js → pay-with-exchange-BJ4Fzmz1.js} +1 -1
- package/assets/{qr-overlay-Dz377WEQ.js → qr-overlay-DxCAQFuF.js} +1 -1
- package/assets/{receive-CpDxltQB.js → receive-SwsuZNQC.js} +1 -1
- package/assets/{resolveImplementation-CFOrDNcu.js → resolveImplementation-BLaiirJ3.js} +1 -1
- package/assets/{rpc-CjfGBkRY.js → rpc-DmqY-iw7.js} +1 -1
- package/assets/{secp256k1-DSadr9B6.js → secp256k1-B873uX0r.js} +1 -1
- package/assets/{secp256k1-Dgs0hNIB.js → secp256k1-BQjGgvAo.js} +1 -1
- package/assets/{secp256k1-C77TwNwR.js → secp256k1-GhqpoPlI.js} +1 -1
- package/assets/{send-BMIoBrdl.js → send-Gjj-by0g.js} +1 -1
- package/assets/{send-batch-transaction-CZ5LHGtL.js → send-batch-transaction-CQKczqLV.js} +1 -1
- package/assets/{send-eip712-transaction-DmvWUFiv.js → send-eip712-transaction-D5ErRlD2.js} +2 -2
- package/assets/{send-gasless-transaction-DxLNFATn.js → send-gasless-transaction-C2Zr5wl9.js} +2 -2
- package/assets/{send-transaction-DVEripxy.js → send-transaction-BSCBM-eH.js} +2 -2
- package/assets/{sendMetaTransaction-7YAoB-pL.js → sendMetaTransaction-BMgjMfxP.js} +1 -1
- package/assets/{sendRawTransaction-BXyfyJLD.js → sendRawTransaction-DIOHnRnR.js} +3 -3
- package/assets/{serializeTransaction-BkF9WfrN.js → serializeTransaction-DLwJGyyA.js} +1 -1
- package/assets/{session-proposal-DoIVwtwv.js → session-proposal-P-V7WlA3.js} +1 -1
- package/assets/{session-request-C3QQi3mV.js → session-request-DXGq-vPI.js} +2 -2
- package/assets/{signing-BInyigJZ.js → signing-B18L8hB9.js} +3 -3
- package/assets/{socials-HN5nwNut.js → socials-D2NhoS92.js} +1 -1
- package/assets/{swaps-Dbu6ix4y.js → swaps-BjGN9dpo.js} +1 -1
- package/assets/{thirdweb-DY9iSWOj.js → thirdweb-D8LTFb7L.js} +3 -3
- package/assets/{to-serializable-transaction-DFrgce7C.js → to-serializable-transaction-DvD6rPpV.js} +2 -2
- package/assets/{trade-encoding-CcRCeIpG.js → trade-encoding-BjnvL03O.js} +1 -1
- package/assets/{transactionReceipt-5vjrQVvz.js → transactionReceipt-6-pcmsdS.js} +1 -1
- package/assets/{transactions-DLwOfx7v.js → transactions-uHYWIqRs.js} +1 -1
- package/assets/{useCreditPacks-Dft_m4Vq.js → useCreditPacks-CS3eE-oJ.js} +1 -1
- package/assets/{useInfiniteGrid-pff93KiW.js → useInfiniteGrid-7tlbDRJY.js} +1 -1
- package/assets/useManaRate-1Q3qKQkm.js +1 -0
- package/assets/useSecondarySales-Be2j0EMT.js +1 -0
- package/assets/{useStore-CV_90SkB.js → useStore-DCT-CgMe.js} +1 -1
- package/assets/useTheme-BWiusVd4.js +1 -0
- package/assets/{verifyHash-BJDJ-yWB.js → verifyHash-Y9BU7-vn.js} +1 -1
- package/assets/{w3m-modal-C_4vaAKJ.js → w3m-modal-IJXUf9Ad.js} +1 -1
- package/assets/{w3m-modal-Cs01ZX0b.js → w3m-modal-eUhgw2D5.js} +1 -1
- package/assets/{wait-for-tx-receipt-CYy9IgHg.js → wait-for-tx-receipt-ztIanYW8.js} +1 -1
- package/assets/{wallets-D4ZcCkX2.js → wallets-D3bPaCuK.js} +5 -5
- package/assets/{web-connector-p1b6xGQr.js → web-connector-C71ag9VJ.js} +3 -3
- package/assets/{writeContract-Cl5bVpey.js → writeContract-PtF1oxgl.js} +1 -1
- package/assets/{zoraTestnet-Dg220Oc3.js → zoraTestnet-DoARpZBA.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Button-BDUHWtxg.js +0 -74
- package/assets/Creator-3NXIbePD.js +0 -1
- package/assets/ImportListings-DZs_dFSO.js +0 -5
- package/assets/MarketCheckout-CoUO17KO.js +0 -3
- package/assets/NotificationsBell-CNLR9ard.js +0 -34
- package/assets/cart-checkout-BAugwPm6.js +0 -1
- package/assets/collection-DE3QnCpW.js +0 -1
- package/assets/emotion-styled.browser.esm-DU8E1n2c.js +0 -1
- package/assets/index-8wx1oJ_F.js +0 -4
- package/assets/index-CEcu6qlS.js +0 -2
- package/assets/mana-rate-C8zn6Vfu.js +0 -1
- package/assets/useManaRate-C5mRxzeC.js +0 -1
- package/assets/useSecondarySales-BRJGIRwF.js +0 -1
- package/assets/useTheme-cgcgN0ze.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,
|
|
1
|
+
import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{aJ as lt,s as l,L as o,S as ut,B as ht,y as xt,t as d,u as pt,o as j,I as g,aK as R,aL as G,aM as mt,C as v,aN as gt,aq as T,V as Q,D as ft,aO as yt,aP as X}from"./index-CE-8j9dT.js";import{a as bt}from"./mana-rate-iDr_vy1I.js";import{u as jt}from"./useManaRate-1Q3qKQkm.js";import{L as vt}from"./LoadMore-BekgL6OE.js";import{u as f}from"./useInfiniteGrid-7tlbDRJY.js";import"./sentry-BV_ZSgtd.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.js";import"./intl-CBcMB1D2.js";const kt=15e3;function wt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=kt}function It(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&wt(n[n.length-1],a)?n.push(a):s.push([a])}return s.map(a=>{var n;return{id:((n=a.find(c=>c.txHash))==null?void 0:n.txHash)??a[a.length-1].id,createdAt:Math.max(...a.map(c=>c.createdAt)),status:a.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:a.reduce((c,h)=>c+h.credits,0),lines:a}})}function At(t){const i=[],s=new Map;for(const a of t)if(a.tradeId){const n=s.get(a.tradeId);if(n){n.quantity+=1,n.credits+=a.credits;continue}const c={key:a.tradeId,tradeId:a.tradeId,quantity:1,credits:a.credits};s.set(a.tradeId,c),i.push(c)}else i.push({key:a.id,tradeId:null,quantity:1,credits:a.credits});return i}function $t(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?bt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Pt(t){const s=It(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),a=t.sales.map(r=>{const x=$t(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...a,...n,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Lt(t,i){return i==="all"?t:i==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Nt(t){const i=new Map;for(const s of t??[]){const a=J(s.txHash??"");if(!a)continue;const n=i.get(a);n?n.push(s):i.set(a,[s])}return i}function Tt(t,i,s=Date.now()){const a=i.txHash?t.get(J(i.txHash)):void 0;if(!a||a.length===0)return{kind:"direct"};const n=a.length===1?Et(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:h}}function Et(t){return lt(t)}const Ct="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/credits-product-vs4Q6u6l.svg",E=ut`
|
|
2
2
|
0% { background-position: 200% 0; }
|
|
3
3
|
100% { background-position: -200% 0; }
|
|
4
|
-
`,
|
|
4
|
+
`,Ft=l.section`
|
|
5
5
|
width: 100%;
|
|
6
6
|
min-width: 0;
|
|
7
7
|
min-height: 60vh;
|
|
@@ -14,18 +14,18 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
14
14
|
align-items: baseline;
|
|
15
15
|
gap: 12px;
|
|
16
16
|
margin-bottom: 20px;
|
|
17
|
-
`,
|
|
17
|
+
`,Mt=l.h1`
|
|
18
18
|
font-family: ${o.font.sans};
|
|
19
19
|
margin: 0;
|
|
20
20
|
`;l.span`
|
|
21
21
|
color: ${o.colors.muted};
|
|
22
22
|
font-size: 14px;
|
|
23
|
-
`;const
|
|
23
|
+
`;const Dt=l.div`
|
|
24
24
|
display: flex;
|
|
25
25
|
gap: 8px;
|
|
26
26
|
margin-bottom: 20px;
|
|
27
27
|
flex-wrap: wrap;
|
|
28
|
-
`,
|
|
28
|
+
`,Ht=l.button`
|
|
29
29
|
appearance: none;
|
|
30
30
|
border: 1px solid ${o.colors.line};
|
|
31
31
|
background: ${o.colors.white};
|
|
@@ -93,7 +93,7 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
93
93
|
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
94
94
|
leading thumbnail, giving the head three children instead of two). */
|
|
95
95
|
margin-left: auto;
|
|
96
|
-
`,
|
|
96
|
+
`,zt=l.div`
|
|
97
97
|
flex: 0 0 auto;
|
|
98
98
|
width: 52px;
|
|
99
99
|
height: 52px;
|
|
@@ -150,15 +150,15 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
150
150
|
&[data-kind='income'] {
|
|
151
151
|
color: ${o.colors.okStrong};
|
|
152
152
|
}
|
|
153
|
-
`,
|
|
153
|
+
`,V=l.img`
|
|
154
154
|
width: 16px;
|
|
155
155
|
height: 16px;
|
|
156
156
|
vertical-align: -0.15em;
|
|
157
|
-
`,
|
|
157
|
+
`,qt=l.span`
|
|
158
158
|
display: inline-flex;
|
|
159
159
|
align-items: center;
|
|
160
160
|
cursor: pointer;
|
|
161
|
-
`,
|
|
161
|
+
`,Ot=l.span`
|
|
162
162
|
position: fixed;
|
|
163
163
|
transform: translateX(-50%);
|
|
164
164
|
padding: 6px 8px;
|
|
@@ -198,7 +198,7 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
198
198
|
outline: 2px solid ${o.colors.accent};
|
|
199
199
|
outline-offset: -2px;
|
|
200
200
|
}
|
|
201
|
-
`,
|
|
201
|
+
`,F=l.div`
|
|
202
202
|
width: 52px;
|
|
203
203
|
height: 52px;
|
|
204
204
|
border-radius: 10px;
|
|
@@ -214,13 +214,13 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
214
214
|
height: 100%;
|
|
215
215
|
object-fit: contain;
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
217
|
+
`,S=l.div`
|
|
218
218
|
width: 52px;
|
|
219
219
|
height: 52px;
|
|
220
220
|
border-radius: 10px;
|
|
221
221
|
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
222
222
|
background-size: 200% 100%;
|
|
223
|
-
animation: ${
|
|
223
|
+
animation: ${E} 1.3s infinite linear;
|
|
224
224
|
|
|
225
225
|
@media (prefers-reduced-motion: reduce) {
|
|
226
226
|
animation: none;
|
|
@@ -243,7 +243,7 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
243
243
|
border-radius: 6px;
|
|
244
244
|
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
245
245
|
background-size: 200% 100%;
|
|
246
|
-
animation: ${
|
|
246
|
+
animation: ${E} 1.3s infinite linear;
|
|
247
247
|
|
|
248
248
|
@media (prefers-reduced-motion: reduce) {
|
|
249
249
|
animation: none;
|
|
@@ -251,7 +251,7 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
251
251
|
`,z=l.span`
|
|
252
252
|
font-size: 13px;
|
|
253
253
|
color: ${o.colors.muted};
|
|
254
|
-
`,
|
|
254
|
+
`,Wt=l.div`
|
|
255
255
|
display: flex;
|
|
256
256
|
align-items: center;
|
|
257
257
|
gap: 4px;
|
|
@@ -269,12 +269,12 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
269
269
|
border: 1px solid transparent;
|
|
270
270
|
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
271
271
|
background-size: 200% 100%;
|
|
272
|
-
animation: ${
|
|
272
|
+
animation: ${E} 1.3s infinite linear;
|
|
273
273
|
|
|
274
274
|
@media (prefers-reduced-motion: reduce) {
|
|
275
275
|
animation: none;
|
|
276
276
|
}
|
|
277
|
-
`,
|
|
277
|
+
`,Z=l.div`
|
|
278
278
|
display: flex;
|
|
279
279
|
flex-direction: column;
|
|
280
280
|
align-items: center;
|
|
@@ -286,6 +286,6 @@ import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as
|
|
|
286
286
|
font-size: 22px;
|
|
287
287
|
font-weight: 700;
|
|
288
288
|
margin: 6px 0 0;
|
|
289
|
-
`,
|
|
289
|
+
`,Bt=l(ht)`
|
|
290
290
|
margin-top: 12px;
|
|
291
|
-
`,q=N.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var
|
|
291
|
+
`,q=N.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var h;const c=(h=i.current)==null?void 0:h.getBoundingClientRect();c&&a({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:i,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>a(null),onFocus:n,onBlur:()=>a(null),children:[t,s?dt.createPortal(e.jsx(Ot,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Gt({item:t}){const{data:i,isLoading:s}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>yt(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),a=!!t.tradeId&&s,n=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",h=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(S,{}):e.jsx(F,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Wt,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return h?e.jsx(q,{to:h,"data-link":"true",children:r}):e.jsx(N,{children:r})}function Kt({order:t}){const i=At(t.lines),s=i.reduce((a,n)=>a+n.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(a=>e.jsx(Gt,{item:a},a.key))})]})}function Ut({sale:t}){const{data:i,isLoading:s}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(i==null?void 0:i.name)??d("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",c=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(S,{}):e.jsx(F,{children:n?e.jsx("img",{src:n,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[s?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(V,{src:Q,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:h}):e.jsx(N,{children:h})})]})}function _t({sale:t,payout:i}){const{data:s,isLoading:a}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(S,{}):e.jsx(F,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(V,{src:Q,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",ft(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:h?e.jsx(q,{to:h,"data-link":"true",children:r}):e.jsx(N,{children:r})})]})}function Qt({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),a=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(zt,{children:e.jsx("img",{src:Ct,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":s,children:a}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Xt({filter:t}){const i={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")}}[t];return e.jsxs(Z,{children:[e.jsx(g,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Bt,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function re(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=pt(),[i,s]=b.useState("all"),a=!!t&&i!=="sales",n=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],u=>mt(t.address,t.identity,{first:y,skip:u}),{enabled:a}),h=f(["sales",t==null?void 0:t.address],u=>R(t.address,{role:"seller",first:y,skip:u}),{enabled:n}),r=f(["credit-orders",t==null?void 0:t.address],u=>G(t.address,t.identity,{first:y,skip:u}),{enabled:a}),x=f(["mana-purchases",t==null?void 0:t.address],u=>R(t.address,{role:"buyer",first:y,skip:u}),{enabled:a}),{data:O}=j({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>G(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:n,staleTime:6e4}),at=b.useMemo(()=>Nt(O),[O]),{data:nt}=jt(n);if(!t)return e.jsxs(Z,{children:[e.jsx(g,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const W=Lt(Pt({purchases:a?c.items:[],sales:n?h.items:[],creditOrders:a?r.items:[],manaPurchases:a?x.items:[],rate:nt}),i),st=a&&(c.isLoading||r.isLoading||x.isLoading)||n&&h.isLoading,B=a&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||n&&h.isFetchingNextPage,rt=a&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||n&&h.hasNextPage;function ot(){a&&c.hasNextPage&&c.fetchNextPage(),a&&r.hasNextPage&&r.fetchNextPage(),a&&x.hasNextPage&&x.fetchNextPage(),n&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(Ft,{children:[e.jsx(St,{children:e.jsx(Mt,{children:d("nav.activity")})}),e.jsx(Dt,{role:"tablist","aria-label":d("nav.activity"),children:Rt.map(u=>e.jsx(Ht,{type:"button",role:"tab","aria-selected":i===u,"data-active":i===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),st?e.jsx(K,{children:Array.from({length:5}).map((u,ct)=>e.jsx(U,{},ct))}):W.length===0?e.jsx(Xt,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[W.map(u=>u.kind==="purchase"?e.jsx(Kt,{order:u.order},u.id):u.kind==="credit"?e.jsx(Qt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ut,{sale:u.sale},u.id):e.jsx(_t,{sale:u.sale,payout:Tt(at,u.sale)},u.id)),B?e.jsx(U,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:B,onLoadMore:ot})]})]})}export{re as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-BW1xvPTF.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
1
|
+
import{r as l,j as v}from"./react-BW1xvPTF.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/DCL_LogoPattern-BryBPc3d.png",b=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{
|
|
1
|
+
import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{n as W,j as nt,d as st,w as ot,s,L as t,u as ie,a as rt,b as Be,D as Fe,z as it,t as o,I as T,C as F,e as ye,k as J,l as at,m as lt,y as We,M as ct,N as te,aQ as dt,aR as pt}from"./index-CE-8j9dT.js";import{u as ft}from"./useSecondarySales-Be2j0EMT.js";import{r as ht,m as xt,a as He}from"./mana-rate-iDr_vy1I.js";import{u as Ue}from"./useManaRate-1Q3qKQkm.js";import{g as ut,h as mt,i as gt,j as bt,k as yt,C as wt,l as jt,o as vt,m as Ct,n as $t,M as kt,E as St,p as Et,q as Tt,r as It,s as Rt,t as _t,u as zt}from"./Assets.styles-CGAD6wJa.js";import{d as we,R as At,F as Nt,S as je,b as Mt}from"./categories-DhS9aD1g.js";import{L as Pt}from"./LoadMore-BekgL6OE.js";import{M as Lt}from"./MarketCheckout-GA-mHw2T.js";import{u as Bt}from"./useInfiniteGrid-7tlbDRJY.js";import{E as Ft}from"./ErrorNotice-BG40E5Ff.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ut,w as Ot,S as Dt}from"./buy-gasless-BlKkmgRS.js";import{s as Gt}from"./buy-C-oTH9gd.js";import{i as qt}from"./trade-encoding-BjnvL03O.js";import{f as Vt}from"./errors-CRgGE21K.js";import{J as Kt,C as Qt,B as re}from"./ethers-CtVvB8eG.js";import{l as Zt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-BV_ZSgtd.js";import"./intl-CBcMB1D2.js";import"./Tooltip-Ck8OHf1K.js";import"./authorizations-BxQ2tMzo.js";import"./sendMetaTransaction-BMgjMfxP.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Oe=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Oe?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Qt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return xt(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await ht(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});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 nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ut))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ot(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -77,7 +77,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
77
77
|
display: flex;
|
|
78
78
|
align-items: center;
|
|
79
79
|
gap: 16px;
|
|
80
|
-
`,
|
|
80
|
+
`,Re=s.div`
|
|
81
81
|
flex: none;
|
|
82
82
|
display: grid;
|
|
83
83
|
place-items: center;
|
|
@@ -91,7 +91,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
91
91
|
width: 30px;
|
|
92
92
|
height: 30px;
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,_e=s.div`
|
|
95
95
|
flex: 1;
|
|
96
96
|
min-width: 0;
|
|
97
97
|
`,ze=s.div`
|
|
@@ -323,7 +323,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
323
323
|
outline: 2px solid ${t.colors.accent};
|
|
324
324
|
outline-offset: 2px;
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`,Rn=s.a`
|
|
327
327
|
flex: 1;
|
|
328
328
|
display: inline-flex;
|
|
329
329
|
align-items: center;
|
|
@@ -347,7 +347,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,_n=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -366,7 +366,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
366
366
|
flex: none;
|
|
367
367
|
color: ${t.colors.dclRed};
|
|
368
368
|
}
|
|
369
|
-
`;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Be(),a=Le(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Fe(r):"—";f.useEffect(()=>{const g=
|
|
369
|
+
`;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Be(),a=Le(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Fe(r):"—";f.useEffect(()=>{const g=_=>{_.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(Re,{"aria-hidden":!0,children:"@"}),e.jsxs(_e,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(F,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Zt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(Re,{"aria-hidden":!0,children:"@"}),e.jsxs(_e,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(F,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(Rn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/invite-BfwIhP2C.webp",Ln="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381451752.commit-ab871f3/assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
370
370
|
width: 100%;
|
|
371
371
|
min-width: 0;
|
|
372
372
|
`,Fn=s.nav`
|
|
@@ -460,7 +460,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
460
460
|
gap: 12px;
|
|
461
461
|
`,Kn=s.div`
|
|
462
462
|
position: relative;
|
|
463
|
-
`,
|
|
463
|
+
`,Qn=s("div",Jt("invalid"))`
|
|
464
464
|
display: flex;
|
|
465
465
|
align-items: center;
|
|
466
466
|
gap: 8px;
|
|
@@ -476,7 +476,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
476
476
|
${t.media.down("mobile")} {
|
|
477
477
|
border-radius: 16px;
|
|
478
478
|
}
|
|
479
|
-
`,
|
|
479
|
+
`,Zn=s.span`
|
|
480
480
|
position: absolute;
|
|
481
481
|
left: -9999px;
|
|
482
482
|
top: 0;
|
|
@@ -735,7 +735,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
735
735
|
flex-direction: column;
|
|
736
736
|
gap: 6px;
|
|
737
737
|
padding: 12px 16px;
|
|
738
|
-
`,
|
|
738
|
+
`,Q=s.h3`
|
|
739
739
|
margin: 0;
|
|
740
740
|
font-family: ${t.font.sans};
|
|
741
741
|
font-weight: 700;
|
|
@@ -743,7 +743,7 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
743
743
|
line-height: 1.57;
|
|
744
744
|
text-transform: uppercase;
|
|
745
745
|
color: ${t.colors.text};
|
|
746
|
-
`,
|
|
746
|
+
`,Z=s.p`
|
|
747
747
|
margin: 0;
|
|
748
748
|
font-family: ${t.font.sans};
|
|
749
749
|
font-weight: 400;
|
|
@@ -784,4 +784,4 @@ import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h a
|
|
|
784
784
|
clip: rect(0, 0, 0, 0);
|
|
785
785
|
white-space: nowrap;
|
|
786
786
|
border: 0;
|
|
787
|
-
`,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(F,{}),Fe(u)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!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",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Os(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Be(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=B=>{B.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Mt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Bt(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(B=>B!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(B=>B.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of At)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(mt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(gt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(bt,{children:[e.jsx(yt,{children:o("assets.filters")}),e.jsx(wt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(jt,{children:e.jsx(vt,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx(Ct,{children:e.jsx($t,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(kt,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Ft,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(St,{"data-testid":"browse-empty",children:[e.jsx(Et,{src:gs,alt:""}),e.jsxs(Tt,{children:[e.jsx(It,{children:o("assets.empty.title")}),e.jsx(_t,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(Rt,{children:e.jsx(zt,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Pt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(Lt,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Os as Assets};
|
|
787
|
+
`,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(F,{}),Fe(u)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Qn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Zn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:o("names.why1Title")}),e.jsx(Z,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:o("names.why2Title")}),e.jsxs(Z,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:o("names.why3Title")}),e.jsx(Z,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:o("names.why4Title")}),e.jsx(Z,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!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",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Os(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Be(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[_,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!_)return;const i=B=>{B.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[_]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Mt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:R,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Bt(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=R||z,Qe=R?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Ze}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{R||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,R,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(R||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,R,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(B=>B!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(B=>B.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of At)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[_?e.jsx(mt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(gt,{className:_?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(bt,{children:[e.jsx(yt,{children:o("assets.filters")}),e.jsx(wt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(jt,{children:e.jsx(vt,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx(Ct,{children:e.jsx($t,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(kt,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:g,onSort:Y,total:fe,loading:R||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Ze&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Ft,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(St,{"data-testid":"browse-empty",children:[e.jsx(Et,{src:gs,alt:""}),e.jsxs(Tt,{children:[e.jsx(It,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(_t,{children:e.jsx(zt,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Qe}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Pt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(Lt,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Os as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-DhS9aD1g.js";import{T as se}from"./Tooltip-Ck8OHf1K.js";import{L as e,s as o,I as m,t as s,M as re,g as v}from"./index-CE-8j9dT.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function He(i){var l;for(const h of ie){const p=(l=h.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:r,headerTestId:x,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:h,"aria-expanded":l,"aria-label":u,"data-testid":x,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(xe,{desktopHidden:r,children:p}):null,t.jsx(he,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function
|
|
370
|
+
`,d=1e5;function He(i){var l;for(const h of ie){const p=(l=h.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:r,headerTestId:x,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:h,"aria-expanded":l,"aria-label":u,"data-testid":x,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(xe,{desktopHidden:r,children:p}):null,t.jsx(he,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Ye({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:r,priceMax:x,onPriceMin:u,onPriceMax:f,rarities:g,onToggleRarity:L,status:S,onStatus:D,smart:b,onSmart:O}){const[_,M]=$.useState(!0),[Y,B]=$.useState(!0),[W,K]=$.useState(!1),[U,q]=$.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,z=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=z!=null?Math.min(z,d):d,G=w/d*100,V=y/d*100;function X(n){const a=Math.min(n,y);u(a<=0?"":String(a))}function J(n){const a=Math.max(n,w);f(a>=d?"":String(a))}const Q=l?He(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||z!=null?`${r||"0"}-${x||"∞"}`:"",ee=C.filter(n=>g.includes(n)).map(re).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(j,{title:s("assets.category"),open:_,onToggle:()=>M(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:h,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:Y,onToggle:()=>B(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(me,{children:[t.jsxs(T,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(E,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:r,onChange:n=>u(n.target.value)})]})]}),t.jsx(ue,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(E,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>f(n.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:G,maxPct:V,"aria-hidden":!0}),t.jsx(I,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>X(Number(n.target.value))}),t.jsx(I,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs(ye,{children:[t.jsxs(A,{children:[t.jsx(H,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(A,{children:[t.jsx(H,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:W,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx($e,{"data-testid":"rarity-filter",children:C.map(n=>{const a=g.includes(n);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>L(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:a?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>q(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,a])=>t.jsxs(Re,{children:[t.jsx(ze,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>D(n)}),t.jsx(Ce,{children:a})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{name:"smart","aria-hidden":!0}),t.jsx(Fe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ee,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ie,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(Ae,{on:b})})]})]})}const Be=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -376,14 +376,14 @@ import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c a
|
|
|
376
376
|
${e.media.down("lg")} {
|
|
377
377
|
display: block;
|
|
378
378
|
}
|
|
379
|
-
`,
|
|
379
|
+
`,We=o.div`
|
|
380
380
|
flex: 1;
|
|
381
381
|
min-width: 0;
|
|
382
382
|
|
|
383
383
|
${e.media.down("lg")} {
|
|
384
384
|
width: 100%;
|
|
385
385
|
}
|
|
386
|
-
`,
|
|
386
|
+
`,Ke=o.aside`
|
|
387
387
|
flex: none;
|
|
388
388
|
width: 265px;
|
|
389
389
|
|
|
@@ -616,4 +616,4 @@ import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c a
|
|
|
616
616
|
outline: 2px solid ${e.colors.accent};
|
|
617
617
|
outline-offset: 2px;
|
|
618
618
|
}
|
|
619
|
-
`;export{Xe as C,k as D,Ze as E,j as F,
|
|
619
|
+
`;export{Xe as C,k as D,Ze as E,j as F,We as M,$e as R,Re as S,ve as a,ke as b,je as c,Se as d,ze as e,Ce as f,Be as g,qe as h,Ke as i,Ge as j,Ve as k,Ue as l,Je as m,Qe as n,Ye as o,et as p,tt as q,ot as r,it as s,nt as t,st as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as
|
|
1
|
+
import{j as t,L as D,r as M}from"./react-BW1xvPTF.js";import{s as a,B as N,L as o,S as I,y as B,t as e,u as F,z as K,I as f,C as G,V as O,o as w,b as P,n as Q,W as k,K as W,O as $}from"./index-CE-8j9dT.js";import{b as H,c as _,d as V,f as X,s as J,h as U}from"./authorizations-BxQ2tMzo.js";import{a as Y}from"./builder-DZ1jvdvk.js";import{f as Z}from"./errors-CRgGE21K.js";import"./sentry-BV_ZSgtd.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BMgjMfxP.js";const tt=I`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,it=I`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -150,7 +150,7 @@ import{j as t,L as q,r as D}from"./react-BW1xvPTF.js";import{s as a,B as M,K as
|
|
|
150
150
|
outline: 2px solid ${o.colors.accent};
|
|
151
151
|
outline-offset: 2px;
|
|
152
152
|
}
|
|
153
|
-
`,
|
|
153
|
+
`,gt=a.span`
|
|
154
154
|
width: 16px;
|
|
155
155
|
height: 16px;
|
|
156
156
|
border-radius: 50%;
|
|
@@ -177,6 +177,6 @@ import{j as t,L as q,r as D}from"./react-BW1xvPTF.js";import{s as a,B as M,K as
|
|
|
177
177
|
font-size: 22px;
|
|
178
178
|
font-weight: 700;
|
|
179
179
|
margin: 6px 0 0;
|
|
180
|
-
`,E=a(
|
|
180
|
+
`,E=a(N)`
|
|
181
181
|
margin-top: 12px;
|
|
182
|
-
`;function y({descriptor:i,owner:c,signer:l,name:n,description:r,image:d,icon:h}){const b=
|
|
182
|
+
`;function y({descriptor:i,owner:c,signer:l,name:n,description:r,image:d,icon:h}){const b=P(),[m,g]=M.useState(!1),{data:s,isLoading:u,refetch:L}=w({queryKey:["authorization",i.id,c],queryFn:()=>U(i,c),staleTime:3e4});async function R(){if(m||u)return;const x=!s;g(!0);try{await J({auth:i,signer:l,active:x}),await L(),b.setQueryData(["authorization",i.id,c],x),k.success(x?e("authorizations.toastActivated",{name:n}):e("authorizations.toastDeactivated",{name:n}))}catch(v){W(v,{flow:"authorizations",step:x?"grant":"revoke"}),k.error(Z(v,e("authorizations.errorGeneric")))}finally{g(!1)}}const q=u?e("authorizations.checking"):s?e("authorizations.active"):e("authorizations.inactive");return t.jsxs(st,{"data-testid":`authorization-${i.id}`,"data-active":!!s,children:[t.jsx(ct,{children:d?t.jsx("img",{src:d,alt:""}):h}),t.jsxs(lt,{children:[t.jsx(dt,{title:n,children:n}),t.jsx(ut,{children:r})]}),t.jsxs(pt,{children:[t.jsx(ht,{"data-active":!!s,children:q}),m?t.jsx(gt,{"aria-label":e("authorizations.working")}):t.jsx(mt,{type:"button","data-testid":`authorization-toggle-${i.id}`,"data-active":!!s,role:"switch","aria-checked":!!s,"aria-label":s?e("authorizations.deactivateAria",{name:n}):e("authorizations.activateAria",{name:n}),disabled:u,onClick:()=>void R()})]})]})}function xt(i){return w({queryKey:["owned-collections",i],enabled:!!i,staleTime:6e4,queryFn:async()=>{const[c,l]=await Promise.all([$(i,{category:"wearable",first:96}),$(i,{category:"emote",first:96})]),n=new Map;for(const r of[...c.assets,...l.assets]){const d=r.contractAddress.toLowerCase();n.has(d)||n.set(d,r)}return[...n.values()]}})}function ft(i,c){return w({queryKey:["creator-collections",i],enabled:!!i&&!!c,staleTime:6e4,queryFn:async()=>{const l=await Y(i,c),n=new Map;for(const r of l){const d=r.contractAddress.toLowerCase();n.has(d)||n.set(d,r)}return[...n.values()]}})}function Tt(){B({title:e("authorizations.title"),noindex:!0});const{session:i,signIn:c}=F(),l=Q.chainId,n=K(i==null?void 0:i.providerType),{data:r,isLoading:d}=xt(n?i==null?void 0:i.address:void 0),{data:h,isLoading:b}=ft(n?i==null?void 0:i.address:void 0,n?i==null?void 0:i.identity:void 0);if(!i)return t.jsxs(T,{children:[t.jsx(f,{name:"info",size:40,color:"var(--muted-2)"}),t.jsx(S,{children:e("authorizations.signInTitle")}),t.jsx("p",{className:"muted",children:e("authorizations.signInBody")}),t.jsx(E,{variant:"purple",onClick:()=>c(),children:e("storeSettings.signIn")})]});if(!n)return t.jsxs(T,{children:[t.jsx(f,{name:"check",size:40,color:"var(--ok)"}),t.jsx(S,{children:e("authorizations.managedTitle")}),t.jsx("p",{className:"muted",children:e("authorizations.managedBody")}),t.jsx(E,{as:D,to:"/assets",variant:"purple",children:e("authorizations.managedCta")})]});const m=H(l),g=_(l);return t.jsxs(et,{children:[t.jsxs(ot,{children:[t.jsx(at,{children:e("authorizations.title")}),t.jsx(nt,{children:e("authorizations.intro")})]}),t.jsxs(z,{children:[t.jsx(j,{children:e("authorizations.buyingTitle")}),t.jsxs(p,{children:[t.jsx(y,{descriptor:m,owner:i.address,signer:i.signer,name:e("authorizations.creditsName"),description:e("authorizations.creditsDesc"),icon:t.jsx(G,{className:"ccy-mark"})}),t.jsx(y,{descriptor:g,owner:i.address,signer:i.signer,name:e("authorizations.manaName"),description:e("authorizations.manaDesc"),icon:t.jsx(rt,{src:O,alt:"","aria-hidden":!0})})]})]}),t.jsxs(z,{children:[t.jsx(j,{children:e("authorizations.sellingTitle")}),d?t.jsx(p,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((s,u)=>t.jsx(C,{"aria-hidden":!0},u))}):r&&r.length>0?t.jsx(p,{children:r.map(s=>t.jsx(y,{descriptor:V(s.contractAddress,l),owner:i.address,signer:i.signer,name:s.name||e("authorizations.collectionFallback"),description:e("authorizations.sellingDesc"),image:s.image,icon:t.jsx(f,{name:"pen",size:18})},s.contractAddress))}):t.jsx(A,{children:e("authorizations.sellingEmpty")})]}),t.jsxs(z,{children:[t.jsx(j,{children:e("authorizations.mintingTitle")}),b?t.jsx(p,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((s,u)=>t.jsx(C,{"aria-hidden":!0},u))}):h&&h.length>0?t.jsx(p,{children:h.map(s=>t.jsx(y,{descriptor:X(s.contractAddress,l),owner:i.address,signer:i.signer,name:s.name||e("authorizations.collectionFallback"),description:e("authorizations.mintingDesc"),icon:t.jsx(f,{name:"pen",size:18})},s.contractAddress))}):t.jsx(A,{children:e("authorizations.mintingEmpty")})]})]})}export{Tt as Authorizations};
|