@dcl/shop 0.6.0 → 0.6.1-30950057562.commit-5ce11cd
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-Bge7lOuf.js → Activity-Gzy4GicN.js} +3 -3
- package/_assets/{AnimatedBackground-D0qNZ1uk.js → AnimatedBackground-Biiq2Y4P.js} +2 -2
- package/_assets/{Assets-CxGe_ZM9.js → Assets-B3QTH2pR.js} +57 -57
- package/_assets/{Assets.styles-BiOSgFHZ.js → Assets.styles-BbXlLgvi.js} +1 -1
- package/_assets/{Authorizations-CsTEC_Hm.js → Authorizations-DEGUI_-D.js} +1 -1
- package/_assets/{Cart-CHYrwY74.js → Cart-CG6BPi0p.js} +2 -2
- package/_assets/{CircularProgress-DDBADFDe.js → CircularProgress-BHeCdSwv.js} +1 -1
- package/_assets/{Collection-nSwc5Ptd.js → Collection-DeXbCENt.js} +1 -1
- package/_assets/{CollectionCarousel-D5MnwNN7.js → CollectionCarousel-DGelHypZ.js} +1 -1
- package/_assets/{Creator-BVoAg8vx.js → Creator-DbMBaOUq.js} +1 -1
- package/_assets/{ErrorNotice-CHXOd3mv.js → ErrorNotice-D5yaB3Z_.js} +1 -1
- package/_assets/{ExchangeController-Bi0S9a9G.js → ExchangeController-DnTekpEE.js} +1 -1
- package/_assets/{GetCredits-DBdIhuBL.js → GetCredits-Dhtzz_nn.js} +6 -6
- package/_assets/{HelpersUtil-BWrob0lV.js → HelpersUtil-DsfsYJYj.js} +1 -1
- package/_assets/{ItemDetail-BLZNqNQh.js → ItemDetail-NzNfUTW6.js} +3 -3
- package/_assets/{LoadMore-BRkbiHQL.js → LoadMore-DtVUvE_o.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-DdfpyUuV.js → ManaPricingBanner.styles-tAMFzN8I.js} +1 -1
- package/_assets/{MenuList-UXGLAgD2.js → MenuList-0BtiFlBr.js} +1 -1
- package/_assets/{MyAssets-DdKYWk0O.js → MyAssets-BaOL_xvH.js} +1 -1
- package/_assets/{MyFavorites-DdKVRDaf.js → MyFavorites-CS3x1nw4.js} +1 -1
- package/_assets/{NotFound-BkW0P3dR.js → NotFound-Cjh1AYGW.js} +1 -1
- package/_assets/{NotificationsBell-7ShIRJH3.js → NotificationsBell-DZkHVwW_.js} +1 -1
- package/_assets/{OutfitDetail-CNOkA_8O.js → OutfitDetail-BG-aXjtW.js} +1 -1
- package/_assets/{OutfitPreview-DyGfIKQi.js → OutfitPreview-Ds-E41xg.js} +1 -1
- package/_assets/{OutfitStudio-DPE8kpg1.js → OutfitStudio-B45FZ7f2.js} +1 -1
- package/_assets/{StoreSettings-DfBHIW4j.js → StoreSettings-x-eB9azk.js} +1 -1
- package/_assets/{Success-crgO4feC.js → Success-GJTwaVK-.js} +1 -1
- package/_assets/{SwapController-Ht-IFVno.js → SwapController-BOkswRBU.js} +1 -1
- package/_assets/{Tooltip-CLv-UZmX.js → Tooltip-BrPrB_FF.js} +1 -1
- package/_assets/{TradeService-B-NE5VaA.js → TradeService-BeFUQo8S.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-Dew4UHCH.js → W3MFrameProviderSingleton-pXBowcJX.js} +3 -3
- package/_assets/{WebCryptoP256-C5HbbLGD.js → WebCryptoP256-DNvuHIon.js} +1 -1
- package/_assets/{authorizations-BZyk6WdU.js → authorizations-B8y7ie6D.js} +1 -1
- package/_assets/{basic-B6EVXOl2.js → basic-jTDdNVTt.js} +1 -1
- package/_assets/{biconomy-Ug4_y9HZ.js → biconomy-D6iQ1Qz7.js} +1 -1
- package/_assets/{builder-BtJop_Py.js → builder-DC4gtQTj.js} +1 -1
- package/_assets/{buy-DdQ4SGHv.js → buy-D7FZvFCT.js} +1 -1
- package/_assets/{buy-gasless-DduUmbTM.js → buy-gasless-Bn8YCJUN.js} +1 -1
- package/_assets/{categories-BaRCBxVv.js → categories-CR3vurm1.js} +1 -1
- package/_assets/{ccip-Db74k1Pr.js → ccip-DWg6dYhE.js} +1 -1
- package/_assets/{ccip-BMULKFZu.js → ccip-DaB7uDx0.js} +1 -1
- package/_assets/{clsx-CEPd4QO3.js → clsx-Dzrazxv9.js} +1 -1
- package/_assets/{collectionPage.styles-D9bc4PtY.js → collectionPage.styles-qZQe9tC2.js} +5 -5
- package/_assets/{controller-CWp6YNJV.js → controller-BuQdjcgl.js} +2 -2
- package/_assets/{core-CwiW5Nem.js → core-BK1g_OXy.js} +4 -4
- package/_assets/{createSvgIcon-Bs2ci5m0.js → createSvgIcon-J8yChvhn.js} +1 -1
- package/_assets/{custom-uHB6JExE.js → custom--rWIIG-D.js} +1 -1
- package/_assets/{data-capture-D3NMxO3v.js → data-capture-CN0COz6e.js} +1 -1
- package/_assets/{email-DVnSEa3r.js → email-D_dJRcsa.js} +1 -1
- package/_assets/{embedded-wallet-DbVoNaLe.js → embedded-wallet-Bp75sJw7.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-B3uXeLtp.js → emotion-styled.browser.esm-DMxIZn9h.js} +1 -1
- package/_assets/{engine-BmkWePcn.js → engine-D6hd1szl.js} +1 -1
- package/_assets/{errors-DT8BUFd8.js → errors-BQIZnT7j.js} +1 -1
- package/_assets/{estimate-l1-fee-LcCTQkbO.js → estimate-l1-fee-DO8EDZWK.js} +1 -1
- package/_assets/{execute-CBj5JHAd.js → execute-BCnNryMb.js} +2 -2
- package/_assets/{features-BXQRcYZ3.js → features-BbAiY1Jf.js} +1 -1
- package/_assets/{fetchTokenMetadata-DJbq1Gx7.js → fetchTokenMetadata-zps63-TP.js} +2 -2
- package/_assets/{field.styles-CIQ-1Gyi.js → field.styles-gjTACzK4.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-L-cqSPfk.js → get-ecosystem-wallet-info-bG3GimfG.js} +1 -1
- package/_assets/{getBalance-DX1WnXFT.js → getBalance-BE89ywjU.js} +1 -1
- package/_assets/{getNFT-Cgfi4Vmu.js → getNFT-D14_mrBb.js} +1 -1
- package/_assets/{getNFT-fH2QMDXF.js → getNFT-D38v5tzD.js} +1 -1
- package/_assets/{getThemeProps-D85rRXiV.js → getThemeProps-v7o8wjpE.js} +1 -1
- package/_assets/{grid.styles-BbfBfqCV.js → grid.styles-B9VqL4eC.js} +1 -1
- package/_assets/{hashTypedData-DP-1NjnI.js → hashTypedData-D09x9kVt.js} +1 -1
- package/_assets/{hashTypedData-BbQ-AHc3.js → hashTypedData-DpbwbA5Y.js} +1 -1
- package/_assets/{in-app-CtBGXFNg.js → in-app-DHJssTEZ.js} +1 -1
- package/_assets/{in-app-wallet-calls-yAvikrwR.js → in-app-wallet-calls-BVCtyy0o.js} +1 -1
- package/_assets/{index-BpzRndQt.js → index-0yVVDwVO.js} +1 -1
- package/_assets/{index-BbUGeidq.js → index-2D5lvzn3.js} +1 -1
- package/_assets/{index-DW8xuXKL.js → index-7ZmsD7pV.js} +3 -3
- package/_assets/{index-B1CRrsWx.js → index-B83Hgnlb.js} +1 -1
- package/_assets/{index-7ncft_vv.js → index-BI1kDThq.js} +1 -1
- package/_assets/{index-Bf7FRpyE.js → index-BOIPVf6Y.js} +1 -1
- package/_assets/{index-DzETqrsC.js → index-BOi75v-l.js} +1 -1
- package/_assets/{index-BrXEqk1O.js → index-BQCxs7C9.js} +1 -1
- package/_assets/{index-C_D2J-BR.js → index-BSk7Bxcl.js} +1 -1
- package/_assets/{index-rurXcTSu.js → index-BgOwfYhI.js} +3 -3
- package/_assets/{index-B7gpJ7FK.js → index-BgiFUjpr.js} +1 -1
- package/_assets/{index-DIVlNKTA.js → index-Bs1_PcA9.js} +1 -1
- package/_assets/{index-BEe4QBLJ.js → index-Bx9FQGUD.js} +1 -1
- package/_assets/{index-Bl0Kh3_k.js → index-C05A2Y5e.js} +1 -1
- package/_assets/{index-CF2mk15z.js → index-CF866r37.js} +1 -1
- package/_assets/{index-3T1Up4ST.js → index-CGtw5iLJ.js} +2 -2
- package/_assets/{index-BUe1EUX7.js → index-CHV83zbw.js} +1 -1
- package/_assets/{index-nf5H3h6Q.js → index-CKFRCfS4.js} +1 -1
- package/_assets/{index-CK0YA4GV.js → index-C_Egq9tp.js} +1 -1
- package/_assets/{index-BSu1IoGB.js → index-CaP_Za_c.js} +1 -1
- package/_assets/{index-C-j8K69Q.js → index-CkuUHmKI.js} +1 -1
- package/_assets/{index-B_a8jknM.js → index-CnBcGWDj.js} +1 -1
- package/_assets/{index-BqH8KAmH.js → index-Crv-6FMt.js} +335 -360
- package/_assets/{index-DTMwjYEd.js → index-CtjyKch3.js} +2 -2
- package/_assets/{index-H8YACMnu.js → index-Cv-aotc4.js} +1 -1
- package/_assets/{index-DWEx5TbM.js → index-CwJqeIVQ.js} +1 -1
- package/_assets/{index-7aVl6hlf.js → index-Cy9EOdYJ.js} +1 -1
- package/_assets/{index-DrMKJdtC.js → index-CyA8lg3a.js} +1 -1
- package/_assets/{index-BcPJYMIm.js → index-D0J6AIzv.js} +1 -1
- package/_assets/{index-C0Hpoz_1.js → index-D4a1k1Lx.js} +1 -1
- package/_assets/{index-DdXDqIhp.js → index-D6knqZUY.js} +1 -1
- package/_assets/{index-C9ALJu8v.js → index-D8ruhsoC.js} +1 -1
- package/_assets/{index-B1Gnpvim.js → index-DBVdLIyV.js} +2 -2
- package/_assets/{index-BTt9L5Av.js → index-DNRAeXhX.js} +1 -1
- package/_assets/{index-CfJ4lbnY.js → index-DT-li7A4.js} +1 -1
- package/_assets/{index-Cou1KO6b.js → index-DVXg4hbd.js} +1 -1
- package/_assets/{index-5sbt15fG.js → index-DW0v82LH.js} +1 -1
- package/_assets/{index-Dmf3D7KE.js → index-DWDGpmbP.js} +1 -1
- package/_assets/{index-DqtsvtM3.js → index-DXK0dOW2.js} +1 -1
- package/_assets/{index-BSAtCb0u.js → index-Dg5jak8-.js} +1 -1
- package/_assets/{index-ZEf4-UtL.js → index-DlyyISQj.js} +1 -1
- package/_assets/{index-e4M6K87M.js → index-Dv7d7TF7.js} +1 -1
- package/_assets/{index-CFyRWGpS.js → index-FgbyyQq_.js} +1 -1
- package/_assets/{index-C7JkPo6K.js → index-KhNGJKgC.js} +1 -1
- package/_assets/{index-X3LYABjY.js → index-P2UKF5rf.js} +1 -1
- package/_assets/{index-C64LKUby.js → index-ROWP5zCo.js} +1 -1
- package/_assets/{index-DgiMo6hh.js → index-SZ_CvoIV.js} +1 -1
- package/_assets/{index-CdUpjD0Z.js → index-aARUoJGj.js} +1 -1
- package/_assets/{index-B3GREAKI.js → index-fcirgr-r.js} +1 -1
- package/_assets/{index-DMHLNLqi.js → index-kB6El_bb.js} +1 -1
- package/_assets/{index-ul5wIAT0.js → index-m-mREpXI.js} +3 -3
- package/_assets/{index-BRbIAs-h.js → index-zUSsLBXU.js} +1 -1
- package/_assets/{index.es-B4CfzT8f.js → index.es-CEzDYUYH.js} +4 -4
- package/_assets/{index.es-Bn8h3cHG.js → index.es-ChO6Qu9w.js} +1 -1
- package/_assets/{index.es-CqtFRAJI.js → index.es-vvA0Lt9I.js} +1 -1
- package/_assets/{localBatchGatewayRequest-CZC8IBaQ.js → localBatchGatewayRequest-BTNx9qgN.js} +1 -1
- package/_assets/{networks-0i8YZqHL.js → networks-CVci8sPT.js} +1 -1
- package/_assets/{onramp-jLRLYivy.js → onramp-BCoU4Jyj.js} +1 -1
- package/_assets/{openzeppelin-Cg2_q1PI.js → openzeppelin-DZ76Bjhm.js} +1 -1
- package/_assets/{parseNft-TDEqNX1Z.js → parseNft-Wz3HLkrh.js} +2 -2
- package/_assets/{parseSignature-U7pY0kT6.js → parseSignature-D-GX-OPq.js} +1 -1
- package/_assets/{parseSignature-BalN-8VI.js → parseSignature-h1NXN_yq.js} +3 -3
- package/_assets/{passkeys-1owiFaBv.js → passkeys-5-LJYN4N.js} +1 -1
- package/_assets/{pay-with-exchange-CxpzU3qT.js → pay-with-exchange-B3YFxSq-.js} +1 -1
- package/_assets/{qr-overlay-CPsiG3BP.js → qr-overlay-DhBzxblG.js} +1 -1
- package/_assets/{receive-Bj4S4vrF.js → receive-B_6FCkZX.js} +1 -1
- package/_assets/{resolveImplementation-BgFFYcu4.js → resolveImplementation-D1PTZvev.js} +1 -1
- package/_assets/{rpc-C5i5d_Hd.js → rpc-Dnr7Ho6n.js} +1 -1
- package/_assets/{secp256k1-CHxQAK4O.js → secp256k1-DRVWswpU.js} +1 -1
- package/_assets/{secp256k1-PzBXITZB.js → secp256k1-DSyr_erP.js} +1 -1
- package/_assets/{secp256k1-CVOBgeVv.js → secp256k1-_hKozEef.js} +1 -1
- package/_assets/{send-B1VWG_GM.js → send-CkVArLZ6.js} +1 -1
- package/_assets/{send-batch-transaction-BhVc50dx.js → send-batch-transaction-D_N3Pmuj.js} +1 -1
- package/_assets/{send-eip712-transaction-G6HchcdI.js → send-eip712-transaction-CD7uH6nJ.js} +2 -2
- package/_assets/{send-gasless-transaction-XGwNLlF0.js → send-gasless-transaction-CIlguYRL.js} +2 -2
- package/_assets/{send-transaction-C1XI8fYZ.js → send-transaction-C5_TnN20.js} +2 -2
- package/_assets/{sendMetaTransaction-6e7RT25o.js → sendMetaTransaction-B7Mr50I5.js} +1 -1
- package/_assets/{sendRawTransaction-lz2apptP.js → sendRawTransaction-B058K9Kh.js} +3 -3
- package/_assets/{serializeTransaction-CtWH-IFd.js → serializeTransaction-KF-03cJY.js} +1 -1
- package/_assets/{session-proposal-DceQ_mD9.js → session-proposal-D8lydRcg.js} +1 -1
- package/_assets/{session-request-CPsFtvuK.js → session-request-CaHU4009.js} +2 -2
- package/_assets/{signing-CeXE5YMl.js → signing-Bq3g4A7Y.js} +3 -3
- package/_assets/{socials-Dn0c1c-x.js → socials-BrG-c6Aa.js} +1 -1
- package/_assets/{swaps-fYZLHQYX.js → swaps-DHaKmVZn.js} +1 -1
- package/_assets/{thirdweb-9nUi4NTx.js → thirdweb-aTdCGpIK.js} +3 -3
- package/_assets/{to-serializable-transaction-D4biQiPj.js → to-serializable-transaction-BcqoQHx0.js} +2 -2
- package/_assets/{trade-encoding-DED17fJl.js → trade-encoding-Bf-VP6DB.js} +1 -1
- package/_assets/{transactionReceipt-D6xTzzAw.js → transactionReceipt-DcJzxeq0.js} +1 -1
- package/_assets/{transactions-D3QkVO0W.js → transactions-BLfm3Gn6.js} +1 -1
- package/_assets/{useCreditPacks-BcNkRZz6.js → useCreditPacks-RMR6xQ90.js} +1 -1
- package/_assets/{useImportable-B6vGX6b2.js → useImportable-DDSrqfP0.js} +1 -1
- package/_assets/{useInfiniteGrid-DaAZHneB.js → useInfiniteGrid-Bxq6R4at.js} +1 -1
- package/_assets/{useTheme-BJh8uAMV.js → useTheme-CT47H6Fl.js} +1 -1
- package/_assets/{verifyHash-DDW5fWXv.js → verifyHash-ClgmzB1L.js} +1 -1
- package/_assets/{w3m-modal-CbSLOTQ6.js → w3m-modal-16eQ9GHq.js} +1 -1
- package/_assets/{w3m-modal-BrowLxPF.js → w3m-modal-DbJYmEbS.js} +1 -1
- package/_assets/{wait-for-tx-receipt-Chc522wr.js → wait-for-tx-receipt-DdcASAzC.js} +1 -1
- package/_assets/{wallets-1JYF6nkF.js → wallets-CQ9eMOop.js} +5 -5
- package/_assets/{web-connector-C19h992M.js → web-connector-CT2Y5er0.js} +3 -3
- package/_assets/{writeContract-DvQTemxv.js → writeContract-D-02hbjh.js} +1 -1
- package/_assets/{zoraTestnet-DwCWuKz_.js → zoraTestnet-1Y8XuTqt.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Le,r as u,j as e,e as
|
|
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 ot,bd as rt,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,bK 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 mt,ae as ft,ag as Ie,ah as V,ax as ut,bH as gt}from"./index-Crv-6FMt.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 zt,p as It,q as At,r as Nt,s as Pt,t as Mt}from"./Assets.styles-BbXlLgvi.js";import{S as Ae,R as Wt,F as Bt,e as Ft}from"./categories-CR3vurm1.js";import{L as Lt}from"./LoadMore-DtVUvE_o.js";import{u as Ut}from"./useInfiniteGrid-Bxq6R4at.js";import{E as Ht}from"./ErrorNotice-D5yaB3Z_.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-Bn8YCJUN.js";import{s as Kt}from"./buy-D7FZvFCT.js";import{j as Zt}from"./trade-encoding-Bf-VP6DB.js";import{f as Jt}from"./errors-BQIZnT7j.js";import{J as Qt,C as Xt,B as ye}from"./ethers-CtNGBird.js";import{n as Yt}from"./Tooltip-BrPrB_FF.js";import{G as en}from"./grid.styles-B9VqL4eC.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-B8y7ie6D.js";import"./sendMetaTransaction-B7Mr50I5.js";function K(o){const i=o.source??"item",h=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${h}`}const H="100000000000000000000",De=2,te=15,tn=/^[a-zA-Z0-9]+$/;function Ne(o){const i=o.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(o){return o.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 on(){return U.chainId===Number(Ot.ChainId.MATIC_MAINNET)?Pe.mainnet:Pe.sepolia}async function rn(o,i={}){var l;const{rpc:h,address:c}=on(),d=new Qt(h),a=new Xt(c,sn,d);console.info(`[names] availability check → DCLRegistrar(${c}).available("${o}") on ${h}`);const m=await a.available(o);if((l=i.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${m}`),m?"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(o){return it(H,o)}async function cn(o,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}`,m=await at(a,{method:"GET",identity:o,metadata:{}});if(!m.ok){let p;try{p=(l=await m.json())==null?void 0:l.code}catch{}throw p==="ROUTE_COST_TOO_HIGH"?new we:new Error(`fetchNameCreditRoute ${m.status}`)}return m.json()}function dn(o,i){const h=ye.from(o.availableAmount),d=ye.from(H).sub(h);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Zt(o.id)}],creditsSignatures:[o.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(o,i={}){const h=an,c=i.intervalMs??1e4,d=i.maxAttempts??60;let a={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let m=0;m<d;m++){try{const l=await fetch(`${h}/deposit/status?originChainId=137&depositTxHash=${o}`);if(l.ok){const p=await l.json(),x=(p.status??"pending").toLowerCase(),y=p.fillTx??p.fillTxnRef??null,f=p.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:y,actionsSucceeded:f};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};a={status:"pending",destinationTxHash:y,actionsSucceeded:f}}}catch{}m<d-1&&await new Promise(l=>setTimeout(l,c))}return a}async function hn(o){const{name:i,identity:h,signer:c}=o,d=o.chainId??U.chainId,a=o.provider??"across",m=(o.beneficiary??await c.getAddress()).toLowerCase();let l=null,p=!1;console.info("[names] register start",{name:i,buyer:m,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 f=await cn(h,i,{chainId:d,provider:a});console.info("[names] step 2/6 route fetched",{target:f.externalCall.target,selector:f.externalCall.selector,provider:f.provider,quoteId:f.quoteId});const C=await ot(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,f);let g;try{g=await Gt({chainId:d,buyer:m,signer:c,args:k})}catch(b){if(!(b instanceof Dt))throw b;g=await Kt(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,o.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:m,originConfirmed:p}),x instanceof Vt)return{status:"pending",originTxHash:x.txHash};if(l&&!p&&await rt(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 et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
background: rgba(22, 21, 24, 0.55);
|
|
10
|
-
`,
|
|
10
|
+
`,mn=s.div`
|
|
11
11
|
width: 560px;
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
max-height: 92vh;
|
|
@@ -20,12 +20,12 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
20
20
|
${t.media.maxWidth("mobile")} {
|
|
21
21
|
padding: 16px;
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,oe=s.div`
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: flex-start;
|
|
26
26
|
justify-content: space-between;
|
|
27
27
|
gap: 12px;
|
|
28
|
-
`,
|
|
28
|
+
`,re=s.h2`
|
|
29
29
|
margin: 0;
|
|
30
30
|
font-family: ${t.font.sans};
|
|
31
31
|
font-weight: 700;
|
|
@@ -112,7 +112,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
112
112
|
font-family: ${t.font.sans};
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
color: ${t.colors.muted2};
|
|
115
|
-
`,
|
|
115
|
+
`,me=s.div`
|
|
116
116
|
flex: none;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -127,17 +127,17 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
127
127
|
height: 22px;
|
|
128
128
|
color: ${t.colors.brandViolet};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,fn=s.div`
|
|
131
131
|
margin-top: 16px;
|
|
132
132
|
padding: 16px;
|
|
133
133
|
border-radius: 12px;
|
|
134
134
|
background: #f2e7fc;
|
|
135
|
-
`,
|
|
135
|
+
`,un=s.div`
|
|
136
136
|
font-family: ${t.font.sans};
|
|
137
137
|
font-weight: 700;
|
|
138
138
|
font-size: 16px;
|
|
139
139
|
color: ${t.colors.text};
|
|
140
|
-
`,
|
|
140
|
+
`,gn=s.p`
|
|
141
141
|
margin: 8px 0 16px;
|
|
142
142
|
font-family: ${t.font.sans};
|
|
143
143
|
font-size: 14px;
|
|
@@ -148,7 +148,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
148
148
|
font-weight: 700;
|
|
149
149
|
color: ${t.colors.brandViolet};
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`,bn=s.label`
|
|
152
152
|
display: flex;
|
|
153
153
|
align-items: center;
|
|
154
154
|
gap: 8px;
|
|
@@ -161,12 +161,12 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
161
161
|
&:focus-within {
|
|
162
162
|
border-color: ${t.colors.magenta};
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,yn=s.span`
|
|
165
165
|
flex: none;
|
|
166
166
|
font-family: ${t.font.sans};
|
|
167
167
|
font-size: 18px;
|
|
168
168
|
color: ${t.colors.muted2};
|
|
169
|
-
`,
|
|
169
|
+
`,wn=s.input`
|
|
170
170
|
flex: 0 1 auto;
|
|
171
171
|
min-width: 0;
|
|
172
172
|
border: 0;
|
|
@@ -181,7 +181,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
181
181
|
color: ${t.colors.muted2};
|
|
182
182
|
font-weight: 400;
|
|
183
183
|
}
|
|
184
|
-
`,
|
|
184
|
+
`,jn=s.span`
|
|
185
185
|
flex: none;
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
@@ -213,27 +213,27 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
213
213
|
background: #ddc7ec;
|
|
214
214
|
color: #f4ecfa;
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`,vn=s.div`
|
|
217
217
|
display: flex;
|
|
218
218
|
flex-direction: column;
|
|
219
219
|
align-items: flex-start;
|
|
220
220
|
gap: 20px;
|
|
221
221
|
padding: 32px 0 8px;
|
|
222
|
-
|
|
222
|
+
`,$n=s.img`
|
|
223
223
|
align-self: center;
|
|
224
224
|
width: 56px;
|
|
225
225
|
height: 56px;
|
|
226
|
-
`,
|
|
226
|
+
`,Cn=s.div`
|
|
227
227
|
font-family: ${t.font.sans};
|
|
228
228
|
font-weight: 700;
|
|
229
229
|
font-size: 18px;
|
|
230
230
|
color: ${t.colors.text};
|
|
231
|
-
|
|
231
|
+
`,kn=s.div`
|
|
232
232
|
display: flex;
|
|
233
233
|
align-items: center;
|
|
234
234
|
gap: 12px;
|
|
235
235
|
width: 100%;
|
|
236
|
-
`,
|
|
236
|
+
`,Sn=s.div`
|
|
237
237
|
flex: 1;
|
|
238
238
|
height: 8px;
|
|
239
239
|
border-radius: 999px;
|
|
@@ -257,12 +257,12 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
257
257
|
transform: translateX(320%);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
`,
|
|
260
|
+
`,En=s.span`
|
|
261
261
|
flex: none;
|
|
262
262
|
font-family: ${t.font.sans};
|
|
263
263
|
font-size: 14px;
|
|
264
264
|
color: ${t.colors.muted};
|
|
265
|
-
`,
|
|
265
|
+
`,Rn=s.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
align-items: center;
|
|
@@ -271,7 +271,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
271
271
|
border-radius: 12px;
|
|
272
272
|
background: #e2f5ea;
|
|
273
273
|
text-align: center;
|
|
274
|
-
`,
|
|
274
|
+
`,_n=s.div`
|
|
275
275
|
display: grid;
|
|
276
276
|
place-items: center;
|
|
277
277
|
width: 56px;
|
|
@@ -284,7 +284,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
284
284
|
width: 30px;
|
|
285
285
|
height: 30px;
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`,Tn=s.p`
|
|
288
288
|
margin: 0;
|
|
289
289
|
font-family: ${t.font.sans};
|
|
290
290
|
font-size: 16px;
|
|
@@ -323,7 +323,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
323
323
|
outline: 2px solid ${t.colors.accent};
|
|
324
324
|
outline-offset: 2px;
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`,zn=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 et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,fe=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -379,10 +379,10 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function
|
|
382
|
+
`;function In({name:o,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),m=ct(),l=Le(),[p,x]=u.useState("confirm"),[y,f]=u.useState(""),[C,k]=u.useState(null),g=u.useRef(!1),b=y.trim().toLowerCase()===o.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 I(){if(!(!c||!b||_||$||g.current)){g.current=!0,x("completing"),k(null);try{const w=await hn({name:o,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}),m.invalidateQueries({queryKey:["usd-balance"]}),m.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(mn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(re,{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:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(M,{}),v]})]}),p==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{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(fn,{children:[e.jsx(un,{children:n("names.confirmTitle")}),e.jsx(gn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(o)}</b>`})}}),e.jsxs(bn,{children:[e.jsx(yn,{"aria-hidden":!0,children:"@"}),e.jsx(wn,{value:y,onChange:w=>f(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(fe,{"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 I(),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(oe,{children:[e.jsx(re,{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(fe,{"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:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{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(oe,{children:[e.jsx(re,{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:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(M,{}),v]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")}),e.jsx(zn,{href:U.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.6.1-30950057562.commit-5ce11cd/_assets/identity-B4DXDuJP.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.6.1-30950057562.commit-5ce11cd/_assets/world-B-9aPlxu.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.6.1-30950057562.commit-5ce11cd/_assets/invite-BfwIhP2C.webp",Wn="https://cdn.decentraland.org/@dcl/shop/0.6.1-30950057562.commit-5ce11cd/_assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
|
-
`,
|
|
385
|
+
`,Fn=s.nav`
|
|
386
386
|
display: flex;
|
|
387
387
|
align-items: center;
|
|
388
388
|
gap: 6px;
|
|
@@ -391,7 +391,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
391
391
|
font-size: 12px;
|
|
392
392
|
line-height: 1;
|
|
393
393
|
color: ${t.colors.muted};
|
|
394
|
-
`,
|
|
394
|
+
`,Ln=s.button`
|
|
395
395
|
border: 0;
|
|
396
396
|
background: none;
|
|
397
397
|
padding: 0;
|
|
@@ -406,10 +406,10 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
406
406
|
outline: 2px solid ${t.colors.accent};
|
|
407
407
|
outline-offset: 2px;
|
|
408
408
|
}
|
|
409
|
-
`,
|
|
409
|
+
`,Un=s.span`
|
|
410
410
|
font-weight: 700;
|
|
411
411
|
color: ${t.colors.muted};
|
|
412
|
-
`,
|
|
412
|
+
`,Hn=s.div`
|
|
413
413
|
display: flex;
|
|
414
414
|
flex-direction: column;
|
|
415
415
|
gap: 48px;
|
|
@@ -422,7 +422,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
422
422
|
gap: 32px;
|
|
423
423
|
padding-bottom: 32px;
|
|
424
424
|
}
|
|
425
|
-
`,
|
|
425
|
+
`,On=s.div`
|
|
426
426
|
position: relative;
|
|
427
427
|
border-radius: ${t.radius.banner};
|
|
428
428
|
overflow: hidden;
|
|
@@ -438,12 +438,12 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
438
438
|
padding: 40px 20px;
|
|
439
439
|
gap: 28px;
|
|
440
440
|
}
|
|
441
|
-
`,
|
|
441
|
+
`,Gn=s.div`
|
|
442
442
|
display: flex;
|
|
443
443
|
flex-direction: column;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: 12px;
|
|
446
|
-
`,
|
|
446
|
+
`,Dn=s.h1`
|
|
447
447
|
margin: 0;
|
|
448
448
|
font-family: ${t.font.sans};
|
|
449
449
|
font-weight: 600;
|
|
@@ -454,7 +454,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
454
454
|
${t.media.maxWidth("mobile")} {
|
|
455
455
|
font-size: 26px;
|
|
456
456
|
}
|
|
457
|
-
`,
|
|
457
|
+
`,qn=s.p`
|
|
458
458
|
margin: 0;
|
|
459
459
|
max-width: 760px;
|
|
460
460
|
font-family: ${t.font.sans};
|
|
@@ -466,30 +466,30 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
466
466
|
${t.media.maxWidth("mobile")} {
|
|
467
467
|
font-size: 16px;
|
|
468
468
|
}
|
|
469
|
-
`,
|
|
469
|
+
`,Vn=s.div`
|
|
470
470
|
width: min(785px, 100%);
|
|
471
471
|
display: flex;
|
|
472
472
|
flex-direction: column;
|
|
473
473
|
gap: 12px;
|
|
474
|
-
`,
|
|
474
|
+
`,Kn=s.div`
|
|
475
475
|
position: relative;
|
|
476
|
-
`,
|
|
476
|
+
`,Zn=s("div",Yt("invalid"))`
|
|
477
477
|
display: flex;
|
|
478
478
|
align-items: center;
|
|
479
479
|
gap: 8px;
|
|
480
480
|
padding: 8px 8px 8px 16px;
|
|
481
481
|
background: ${t.colors.softWhite};
|
|
482
|
-
border: 1.5px solid ${({invalid:
|
|
482
|
+
border: 1.5px solid ${({invalid:o})=>o?t.colors.dclRed:t.colors.line};
|
|
483
483
|
border-radius: 20px;
|
|
484
484
|
|
|
485
485
|
&:focus-within {
|
|
486
|
-
border-color: ${({invalid:
|
|
486
|
+
border-color: ${({invalid:o})=>o?t.colors.dclRed:t.colors.magenta};
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
${t.media.maxWidth("mobile")} {
|
|
490
490
|
border-radius: 16px;
|
|
491
491
|
}
|
|
492
|
-
`,
|
|
492
|
+
`,Jn=s.span`
|
|
493
493
|
position: absolute;
|
|
494
494
|
left: -9999px;
|
|
495
495
|
top: 0;
|
|
@@ -504,7 +504,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
504
504
|
${t.media.maxWidth("mobile")} {
|
|
505
505
|
font-size: 16px;
|
|
506
506
|
}
|
|
507
|
-
`,
|
|
507
|
+
`,Qn=s.div`
|
|
508
508
|
position: absolute;
|
|
509
509
|
top: calc(100% + 8px);
|
|
510
510
|
left: 0;
|
|
@@ -529,7 +529,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
529
529
|
align-items: flex-start;
|
|
530
530
|
flex-wrap: wrap;
|
|
531
531
|
}
|
|
532
|
-
`,
|
|
532
|
+
`,Xn=s.a`
|
|
533
533
|
display: inline-flex;
|
|
534
534
|
align-items: center;
|
|
535
535
|
gap: 2px;
|
|
@@ -543,7 +543,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
543
543
|
${t.media.maxWidth("mobile")} {
|
|
544
544
|
margin-left: 0;
|
|
545
545
|
}
|
|
546
|
-
`,
|
|
546
|
+
`,Yn=s.label`
|
|
547
547
|
flex: 1;
|
|
548
548
|
min-width: 0;
|
|
549
549
|
display: flex;
|
|
@@ -551,7 +551,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
551
551
|
gap: 0;
|
|
552
552
|
cursor: text;
|
|
553
553
|
overflow: hidden;
|
|
554
|
-
`,
|
|
554
|
+
`,es=s.span`
|
|
555
555
|
flex: none;
|
|
556
556
|
margin-right: 8px;
|
|
557
557
|
font-family: ${t.font.sans};
|
|
@@ -563,7 +563,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
563
563
|
${t.media.maxWidth("mobile")} {
|
|
564
564
|
font-size: 20px;
|
|
565
565
|
}
|
|
566
|
-
`,
|
|
566
|
+
`,ts=s.input`
|
|
567
567
|
flex: 0 1 auto;
|
|
568
568
|
min-width: 0;
|
|
569
569
|
max-width: 100%;
|
|
@@ -585,7 +585,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
585
585
|
${t.media.maxWidth("mobile")} {
|
|
586
586
|
font-size: 16px;
|
|
587
587
|
}
|
|
588
|
-
`,
|
|
588
|
+
`,ns=s.span`
|
|
589
589
|
flex: none;
|
|
590
590
|
margin-left: 2px;
|
|
591
591
|
font-family: ${t.font.sans};
|
|
@@ -597,7 +597,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
597
597
|
${t.media.maxWidth("mobile")} {
|
|
598
598
|
font-size: 16px;
|
|
599
599
|
}
|
|
600
|
-
`,
|
|
600
|
+
`,ss=s.span`
|
|
601
601
|
flex: none;
|
|
602
602
|
font-family: ${t.font.sans};
|
|
603
603
|
font-size: 13px;
|
|
@@ -639,7 +639,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
639
639
|
${t.media.maxWidth("mobile")} {
|
|
640
640
|
display: none;
|
|
641
641
|
}
|
|
642
|
-
`,
|
|
642
|
+
`,os=s(qe)`
|
|
643
643
|
display: none;
|
|
644
644
|
|
|
645
645
|
${t.media.maxWidth("mobile")} {
|
|
@@ -648,7 +648,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
648
648
|
height: 48px;
|
|
649
649
|
border-radius: 12px;
|
|
650
650
|
}
|
|
651
|
-
`,
|
|
651
|
+
`,rs=s.span`
|
|
652
652
|
display: inline-flex;
|
|
653
653
|
align-items: center;
|
|
654
654
|
gap: 4px;
|
|
@@ -669,15 +669,15 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
669
669
|
font-weight: 500;
|
|
670
670
|
text-align: left;
|
|
671
671
|
|
|
672
|
-
background: ${({tone:
|
|
673
|
-
color: ${({tone:
|
|
672
|
+
background: ${({tone:o})=>o==="error"?"rgba(255, 45, 85, 0.12)":o==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
673
|
+
color: ${({tone:o})=>o==="error"?t.colors.dclRed:o==="ok"?"#0f7a4f":"#ecebed"};
|
|
674
674
|
|
|
675
675
|
.ico {
|
|
676
676
|
width: 16px;
|
|
677
677
|
height: 16px;
|
|
678
678
|
flex: none;
|
|
679
679
|
}
|
|
680
|
-
`,
|
|
680
|
+
`,is=s.section`
|
|
681
681
|
display: flex;
|
|
682
682
|
flex-direction: column;
|
|
683
683
|
gap: 48px;
|
|
@@ -687,12 +687,12 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
687
687
|
gap: 32px;
|
|
688
688
|
padding: 0 20px;
|
|
689
689
|
}
|
|
690
|
-
`,
|
|
690
|
+
`,as=s.div`
|
|
691
691
|
display: flex;
|
|
692
692
|
flex-direction: column;
|
|
693
693
|
align-items: center;
|
|
694
694
|
gap: 24px;
|
|
695
|
-
`,
|
|
695
|
+
`,ls=s.h2`
|
|
696
696
|
margin: 0;
|
|
697
697
|
text-align: center;
|
|
698
698
|
font-family: ${t.font.sans};
|
|
@@ -704,7 +704,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
704
704
|
${t.media.maxWidth("mobile")} {
|
|
705
705
|
font-size: 22px;
|
|
706
706
|
}
|
|
707
|
-
`,
|
|
707
|
+
`,cs=s.p`
|
|
708
708
|
margin: 0;
|
|
709
709
|
max-width: 907px;
|
|
710
710
|
text-align: center;
|
|
@@ -717,7 +717,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
717
717
|
${t.media.maxWidth("mobile")} {
|
|
718
718
|
font-size: 16px;
|
|
719
719
|
}
|
|
720
|
-
`,
|
|
720
|
+
`,ds=s.div`
|
|
721
721
|
display: grid;
|
|
722
722
|
grid-template-columns: repeat(4, 1fr);
|
|
723
723
|
gap: 24px;
|
|
@@ -763,7 +763,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
763
763
|
font-size: 14px;
|
|
764
764
|
line-height: 1.57;
|
|
765
765
|
color: ${t.colors.text};
|
|
766
|
-
`,
|
|
766
|
+
`,ps=s.span`
|
|
767
767
|
font-weight: 600;
|
|
768
768
|
color: ${t.colors.accent};
|
|
769
769
|
`,Fe=s.a`
|
|
@@ -787,7 +787,7 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
787
787
|
width: 13px;
|
|
788
788
|
height: 13px;
|
|
789
789
|
}
|
|
790
|
-
`,
|
|
790
|
+
`,hs=s.span`
|
|
791
791
|
position: absolute;
|
|
792
792
|
width: 1px;
|
|
793
793
|
height: 1px;
|
|
@@ -797,4 +797,4 @@ import{d as Le,r as u,j as e,e as et}from"./react-DehiWSvs.js";import{c as L,k a
|
|
|
797
797
|
clip: rect(0, 0, 0, 0);
|
|
798
798
|
white-space: nowrap;
|
|
799
799
|
border: 0;
|
|
800
|
-
`,ps="https://docs.decentraland.org/creator/worlds/about/",hs="https://governance.decentraland.org";function xs(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 fs({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(U,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,M=setTimeout(()=>{(async()=>{try{const $=await sn(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),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(ss,{children:[e.jsx(P,{}),be(d)]}):null]});return e.jsxs(Mn,{"data-testid":"names-page",children:[e.jsxs(Wn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Bn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Fn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Ln,{children:[e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsx(On,{children:n("names.heroTitle")}),e.jsx(Gn,{children:n("names.heroSubtitle")})]}),e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsxs(Vn,{invalid:l==="taken",children:[e.jsxs(Qn,{children:[e.jsx(Xn,{"aria-hidden":!0,children:"@"}),e.jsx(Yn,{value:a,onChange:_=>f(en(_.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(Kn,{ref:m,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(es,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ts,{"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(Zn,{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(Jn,{href:xs(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(ns,{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(ds,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(rs,{children:[e.jsxs(os,{children:[e.jsx(is,{children:n("names.whyTitle")}),e.jsx(as,{children:n("names.whyIntro")})]}),e.jsxs(ls,{children:[e.jsxs(Z,{children:[e.jsx(J,{src:In,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:An,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(cs,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:ps,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:Nn,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:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(Tn,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const ms="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,us=["all","on_sale","not_for_sale"];function Ms(){const[r,i]=et(),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&&us.includes(f)?f:"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),[m,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,M]=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 W=l==="on_sale",I=k&&!Number.isNaN(Number(k))?Number(k):void 0,A=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=ht(),H=x?Wt[x]:void 0,O=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:m.length?m:void 0,wearableCategories:H,minPriceCredits:I,maxPriceCredits:A,search:c||void 0,sortBy:O,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:m.length?m:void 0,wearableCategories:H,search:c||void 0,sortBy:O,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:G,total:$e,isLoading:N,isPlaceholderData:B,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ke,fetchNextPage:Ze}=Ft(W?["shop-items",je]:["catalog-items",ve],o=>W?ft({...je,first:ge,skip:o}):mt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,Se=N||B,Je=N?15:Math.min(Math.max(G.length,1),ge),{data:Ee,isError:Qe}=Oe(),Xe=o=>Ee&&o.manaWei?Ge(o.manaWei,Ee):null,Re=u.useRef(null);u.useEffect(()=>{N||B||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,N,B,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(N||B)return;const o=JSON.stringify({category:a,subCategory:x,rarities:m,min:I,max:A,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:I??null,max_price_credits:A??null,status:l,smart:v,sort:E},result_count:D})},[a,x,m,I,A,E,l,v,N,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 Ye(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const F=[];(I!=null||A!=null)&&F.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Pt)m.includes(o)&&F.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>ze(o)});return v&&F.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&F.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(gt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:m,onToggleRarity:ze,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(fs,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:E,onSort:M,total:$e,loading:N||B,query:c,onOpenFilters:()=>T(!0),chips:F,onClearChips:Ye}),Qe&&W&&G.some(o=>o.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&G.length===0&&!Ce?e.jsxs(Rt,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ms,alt:""}),e.jsxs(Tt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{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(At,{children:e.jsx(Nt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Xt,{"data-testid":"grid",children:Se?e.jsx(Ie,{count:Je}):e.jsxs(e.Fragment,{children:[G.map(o=>{if(!W)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(Bt,{hasNextPage:Ve,isFetching:ke,isError:Ke,onLoadMore:()=>void Ze()})]})]})})]})}export{Ms as Assets};
|
|
800
|
+
`,xs="https://docs.decentraland.org/creator/worlds/about/",ms="https://governance.decentraland.org";function fs(o){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(o)}`}function us({onBack:o}){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 rn(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(rs,{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:o,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(os,{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[o,i]=nt(),h=Le(),c=(o.get("q")??"").trim().toLowerCase(),d=(o.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=o.get("category")??(c?"all":"wearable"),m=o.get("status"),l=m&&bs.includes(m)?m:"on_sale",p=(r,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(r):ne.set(r,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 r=z=>{z.key==="Escape"&&T(!1)};document.addEventListener("keydown",r);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),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(r=>r.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],r=>I?ut({...je,first:ge,skip:r}):gt({...ve,first:ge,skip:r}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=r=>Se&&r.manaWei?Ge(r.manaWei,Se):null,Ye=I&&Qe&&F.some(r=>r.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 r=JSON.stringify({category:a,subCategory:x,rarities:f,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===r){q.current=r;return}q.current=r,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(r){p("category",r),y(null)}function Te(r){p("status",r==="on_sale"?null:r)}function ze(r){C(j=>j.includes(r)?j.filter(z=>z!==r):[...j,r])}function tt(){i(r=>{const j=new URLSearchParams(r);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 r of Wt)f.includes(r)&&L.push({key:`rarity-${r}`,label:ft(r),onRemove:()=>ze(r)});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(r=>r.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(r=>{if(!I)return e.jsx(V,{item:r,mode:"view"},K(r));const j=r;if(j.source!=="legacy")return e.jsx(V,{item:r},K(r));const z=Xe(j);return z==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...j,priceCredits:z}},K(r))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ke,onLoadMore:()=>void Ze()})]})]})})]})}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-CR3vurm1.js";import{n as c,T as le}from"./Tooltip-BrPrB_FF.js";import{t as e,s as o,I as g,d as s,ae as ce,e as v}from"./index-Crv-6FMt.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-Crv-6FMt.js";import{d as J,f as U,b as V,h as Y,s as tt,a as it}from"./authorizations-B8y7ie6D.js";import{f as et}from"./builder-DC4gtQTj.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-BQIZnT7j.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-B7Mr50I5.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as ue,s as i,d as a,av as le,b0 as sa,au as na,I as H,x as Mt,ad as Qe,v as ia,Q as N,af as dt,l as ra,n as oa,o as ca,b1 as da,y as la,b2 as ua,b3 as ha,b4 as pa,b5 as lt,b6 as ga,b7 as xa,w as ma,b8 as ut,U as G,b9 as ht,ba as fa,D as ae,k as ya,c as pt,bb as ba,e as va,bc as gt,bd as _e,be as ye,bf as be,bg as xt,g as ve,a as wa,C as We,bh as Ca}from"./index-
|
|
1
|
+
import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as ue,s as i,d as a,av as le,b0 as sa,au as na,I as H,x as Mt,ad as Qe,v as ia,Q as N,af as dt,l as ra,n as oa,o as ca,b1 as da,y as la,b2 as ua,b3 as ha,b4 as pa,b5 as lt,b6 as ga,b7 as xa,w as ma,b8 as ut,U as G,b9 as ht,ba as fa,D as ae,k as ya,c as pt,bb as ba,e as va,bc as gt,bd as _e,be as ye,bf as be,bg as xt,g as ve,a as wa,C as We,bh as Ca}from"./index-Crv-6FMt.js";import{M as ja,S as ka,C as Sa,H as $a,a as Ma,T as Ta,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as ke,P as Tt,m as qa,g as Ba,h as Ra,i as _a,j as It,k as Se,L as Wa,l as Fa,n as ft,o as yt,W as La,p as Ua,q as Ka,A as Qa,r as Na,s as Ha,t as Oa,u as Va,v as Ga,w as Da,x as Ya,y as Ja,z as Xa,D as Za,E as es,F as ts,G as as,I as ss,J as ns,K as Fe,N as is,O as rs,Q as os,R as cs,U as bt,V as vt,Y as ds,Z as ls,_ as us}from"./CollectionCarousel-DGelHypZ.js";import{j as hs,k as ps,a as gs,n as xs,i as ms,A as fs}from"./authorizations-B8y7ie6D.js";import{g as ys,b as Le}from"./buy-D7FZvFCT.js";import{b as bs,w as vs,S as wt,G as ws}from"./buy-gasless-Bn8YCJUN.js";import{u as Cs,M as js,R as we,r as ks,c as Ss,p as Ct}from"./useCreditPacks-RMR6xQ90.js";import{i as $s,a as Ms}from"./errors-BQIZnT7j.js";import{E as Ts}from"./ErrorNotice-D5yaB3Z_.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-Bf-VP6DB.js";import"./sendMetaTransaction-B7Mr50I5.js";const{colors:se,radius:Is}=ue,Ps=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,Bs="https://cdn.decentraland.org/@dcl/shop/0.6.
|
|
61
|
+
`,Bs="https://cdn.decentraland.org/@dcl/shop/0.6.1-30950057562.commit-5ce11cd/_assets/buy-error-22UunaPC.png";function Rs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Sa,{"data-tall":Y||void 0,children:[e.jsxs($a,{children:[e.jsxs(Ma,{children:[e.jsx(Ta,{children:D}),!W&&e.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Pa,{})})]}),e.jsxs(za,{children:[e.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(mt,{}),e.jsx(Ea,{children:le(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(mt,{}),le(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=qa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(_s,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Ws,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(ke,{children:[e.jsxs(Ba,{"data-testid":"buy-error",children:[e.jsx(Ra,{src:Bs,alt:"",width:64,height:80}),e.jsxs(_a,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function _s({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(Wa,{src:sa,alt:"",width:61,height:61}),e.jsx(Fa,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{})})]})}function Ws({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(La,{"data-testid":"nofunds-warning",children:[e.jsx(Ua,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Qa,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ha,{children:[e.jsxs("div",{children:[e.jsxs(Oa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(Es,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Va,{address:n.item.creator}):null]}),e.jsxs(Ga,{children:[e.jsx(Da,{}),e.jsx("span",{children:le(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ya,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ja,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Xa,{}),e.jsx(Za,{children:le(n.credits)}),e.jsxs(es,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(ts,{children:[e.jsxs(as,{children:[e.jsx(ss,{}),e.jsx("span",{children:le((A==null?void 0:A.credits)??0)})]}),e.jsxs(ns,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=ue,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a9 as N,aa as U,ab as o,ac as n,ad as D,q as M}from"./index-
|
|
1
|
+
import{a9 as N,aa as U,ab as o,ac as n,ad as D,q as M}from"./index-Crv-6FMt.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-Dzrazxv9.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const a=44,q=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,u as Z,d as J}from"./react-DehiWSvs.js";import{t as b,s,bi as ee,X as te,z as T,bj as ae,bk as oe,I as ie,d as a,c as re,D as se,o as ne,v as ce,e as le,ag as F,ah as de,bl as pe,bm as xe}from"./index-
|
|
1
|
+
import{j as e,r as h,u as Z,d as J}from"./react-DehiWSvs.js";import{t as b,s,bi as ee,X as te,z as T,bj as ae,bk as oe,I as ie,d as a,c as re,D as se,o as ne,v as ce,e as le,ag as F,ah as de,bl as pe,bm as xe}from"./index-Crv-6FMt.js";import{E as me}from"./ErrorNotice-D5yaB3Z_.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-qZQe9tC2.js";import{S as L,C as je,F as ye,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-CR3vurm1.js";import{L as Pe}from"./LoadMore-DtVUvE_o.js";import{u as Se}from"./useInfiniteGrid-Bxq6R4at.js";import{G as Ae}from"./grid.styles-B9VqL4eC.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|