@dcl/shop 0.5.1-30937489674.commit-7b5f7ec → 0.5.1-30941423866.commit-16bb43e
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-D6HGEkBY.js +357 -0
- package/_assets/{AnimatedBackground-Bjoz5yE_.js → AnimatedBackground-Bz6-eXM-.js} +2 -2
- package/_assets/{Assets-BxK2PTe5.js → Assets-91-VU1Yf.js} +2 -2
- package/_assets/{Assets.styles-VFZDtV-L.js → Assets.styles-nkCcUHhi.js} +1 -1
- package/_assets/{Authorizations-Dk24wf9N.js → Authorizations-CEIgVod3.js} +1 -1
- package/_assets/{Cart-t8K6Hez2.js → Cart-bL5VUwar.js} +2 -2
- package/_assets/{CircularProgress-ocqiOFwz.js → CircularProgress-t5C2xMSa.js} +1 -1
- package/_assets/{Collection-CqxTIiTW.js → Collection-B3QlNwPP.js} +1 -1
- package/_assets/{CollectionCarousel-DK1GQlTQ.js → CollectionCarousel-BofN3PUd.js} +1 -1
- package/_assets/{Creator-MrzjHPNF.js → Creator-BvEpySRn.js} +1 -1
- package/_assets/{ErrorNotice-uoSUw6uz.js → ErrorNotice-SoCdrSmZ.js} +1 -1
- package/_assets/{ExchangeController-xP28M4re.js → ExchangeController-CfUvjqK_.js} +1 -1
- package/_assets/{GetCredits-B0xA7J-B.js → GetCredits-DoaG2_0N.js} +1 -1
- package/_assets/{HelpersUtil-3gFlrCTY.js → HelpersUtil-BMGSbn7T.js} +1 -1
- package/_assets/ItemDetail-DgqMo17C.js +3324 -0
- package/_assets/{LoadMore-C0MsRFAE.js → LoadMore-QZxbtyl3.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-DAzIc42S.js → ManaPricingBanner.styles-CfeNfvcw.js} +1 -1
- package/_assets/{MenuList-CbV8jiXv.js → MenuList-3Ove0Kax.js} +1 -1
- package/_assets/{MyAssets-CcOi2fL-.js → MyAssets-Dfi9GJY7.js} +1 -1
- package/_assets/{MyFavorites-22WPJMqY.js → MyFavorites-4NZPS72p.js} +1 -1
- package/_assets/{NotFound-D9cWw9u4.js → NotFound-BJON5Kwq.js} +1 -1
- package/_assets/{NotificationsBell-DBQ0fDk3.js → NotificationsBell-C3ZVZms3.js} +1 -1
- package/_assets/{OutfitDetail-BJ3owKrx.js → OutfitDetail-BnpYR8Sn.js} +1 -1
- package/_assets/{OutfitPreview-fzgtTYGf.js → OutfitPreview-Ds73Fyio.js} +1 -1
- package/_assets/{OutfitStudio-Alyfoac0.js → OutfitStudio-BcZDs5Sw.js} +1 -1
- package/_assets/{StoreSettings-VMrIBOxF.js → StoreSettings-DgkB-s8z.js} +1 -1
- package/_assets/{Success-B7QER1pk.js → Success-CFrayKii.js} +1 -1
- package/_assets/{SwapController-Dljt42lz.js → SwapController-B0I2SBMi.js} +1 -1
- package/_assets/{Tooltip-CmakEXxx.js → Tooltip-DrwaXxlg.js} +1 -1
- package/_assets/{TradeService-Bwt0lbfd.js → TradeService-wTgWWF_f.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-C8-47Rcd.js → W3MFrameProviderSingleton-DmUcIZ1-.js} +3 -3
- package/_assets/{WebCryptoP256-DmUARNki.js → WebCryptoP256-Bh90kMb3.js} +1 -1
- package/_assets/{authorizations-DiCizdf8.js → authorizations-LULzuipv.js} +1 -1
- package/_assets/{basic-CA1aEmBR.js → basic-BJTMzaq4.js} +1 -1
- package/_assets/{biconomy-SwZIbMwk.js → biconomy-DwCfSXz5.js} +1 -1
- package/_assets/{browseLayout.styles-HpCz3gHu.js → browseLayout.styles-Cb1bSjYL.js} +1 -1
- package/_assets/{builder-6kwRAptb.js → builder-CsWf7X7a.js} +1 -1
- package/_assets/{buy-CAtkwGsU.js → buy-Cs1e8dwt.js} +1 -1
- package/_assets/{buy-gasless-CwGKDSKP.js → buy-gasless-nMph8utE.js} +1 -1
- package/_assets/{categories-CLN28P36.js → categories-Al7TFiZ3.js} +1 -1
- package/_assets/{ccip-CprmDCNP.js → ccip-BwXOtHnt.js} +1 -1
- package/_assets/{ccip-C72ffo0Q.js → ccip-D1z2vDZ1.js} +1 -1
- package/_assets/{clsx-DMh9fL43.js → clsx-CF2rJgou.js} +1 -1
- package/_assets/{controller-DHU-FUxQ.js → controller-Dd98YdMj.js} +2 -2
- package/_assets/{core-FzD1qHVC.js → core-D1SojbPa.js} +4 -4
- package/_assets/{createSvgIcon-C8hW4bVO.js → createSvgIcon-BD9EM61r.js} +1 -1
- package/_assets/{custom-DSLGRsLr.js → custom-COzYkjQL.js} +1 -1
- package/_assets/{data-capture-DZbiDCwX.js → data-capture-BjEF_GLG.js} +1 -1
- package/_assets/{email-B6b7Pihn.js → email-ps4Ivz5i.js} +1 -1
- package/_assets/{embedded-wallet-B0umeTds.js → embedded-wallet-CVLG0kXZ.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-mh182qus.js → emotion-styled.browser.esm-CDuZD50Q.js} +1 -1
- package/_assets/{engine-BVwkhnlH.js → engine-pr6_tb_z.js} +1 -1
- package/_assets/{errors-DDxkr-df.js → errors-5vlAB2Zg.js} +1 -1
- package/_assets/{estimate-l1-fee-DkXKfMMP.js → estimate-l1-fee-B3g-FnFs.js} +1 -1
- package/_assets/{execute-CQY30MRS.js → execute-Cel7d92K.js} +2 -2
- package/_assets/{features-aABiY83f.js → features-D5rLpDoE.js} +1 -1
- package/_assets/{fetchTokenMetadata-B-ittUXv.js → fetchTokenMetadata-DryrCOLG.js} +2 -2
- package/_assets/{field.styles-AnVl2SkN.js → field.styles-C90By0S4.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DYzdNY3r.js → get-ecosystem-wallet-info-DS2uBDFK.js} +1 -1
- package/_assets/{getBalance-B25lcD9r.js → getBalance-DzSIaYv8.js} +1 -1
- package/_assets/{getNFT-BPKHDI15.js → getNFT-BYs-Lc0M.js} +1 -1
- package/_assets/{getNFT-3gQ0u_Ad.js → getNFT-B_38vu3d.js} +1 -1
- package/_assets/{getThemeProps-BtZT8-J5.js → getThemeProps-CMN_iN9O.js} +1 -1
- package/_assets/{grid.styles-CEjkD1f9.js → grid.styles-_dq0Z7zy.js} +1 -1
- package/_assets/{hashTypedData-B6Ns7uwn.js → hashTypedData-U2WpRL9J.js} +1 -1
- package/_assets/{hashTypedData-C90fm0lo.js → hashTypedData-nZ5SahOR.js} +1 -1
- package/_assets/{in-app-pXzv7C_J.js → in-app-CrkxD8Cc.js} +1 -1
- package/_assets/{in-app-wallet-calls-DCv6deqZ.js → in-app-wallet-calls-Li6zp_GH.js} +1 -1
- package/_assets/{index-CMuJ-UZF.js → index-18uEK4oZ.js} +1 -1
- package/_assets/{index-BVqb5Xn1.js → index-1geQS8z5.js} +1 -1
- package/_assets/{index-Dq8QHFiA.js → index-3p-1HM0o.js} +1 -1
- package/_assets/{index-DUGGEaWM.js → index-3swvxeAv.js} +1 -1
- package/_assets/{index-DosEHc_-.js → index-AnVlYA8W.js} +1 -1
- package/_assets/{index-B9tSckDx.js → index-B-cFSgSm.js} +1 -1
- package/_assets/{index-JTqfub3n.js → index-B5d3bUu8.js} +3 -3
- package/_assets/{index-k4tf1CLH.js → index-B7jpRyRq.js} +1 -1
- package/_assets/{index-CKjylYSE.js → index-BB2cIvLa.js} +1 -1
- package/_assets/{index-OAxN4fc3.js → index-BRUTO6r3.js} +1 -1
- package/_assets/{index-CNx03geY.js → index-BXLMe2R7.js} +1 -1
- package/_assets/{index-Dm6iw_dl.js → index-BZWjyqNw.js} +1 -1
- package/_assets/{index-JK8hABNP.js → index-BfJ9y_zu.js} +1 -1
- package/_assets/{index-BFBb0rfQ.js → index-Bie49yv7.js} +2 -2
- package/_assets/{index-Cy4PNM6A.js → index-BjGq2FUA.js} +1 -1
- package/_assets/{index-7Hk55boV.js → index-BpktVBiY.js} +1 -1
- package/_assets/{index-BxLAJ5x3.js → index-BzJy8rqx.js} +1 -1
- package/_assets/{index-CcgIVLBV.js → index-BzjKhN7Z.js} +1 -1
- package/_assets/{index-CH298nNs.js → index-C23YPWAe.js} +1 -1
- package/_assets/{index-DRc8upCX.js → index-C6vWyFJn.js} +1 -1
- package/_assets/{index-B5JBd4fr.js → index-C9YePsjK.js} +1 -1
- package/_assets/{index-Chom5dJx.js → index-CIJrlsx5.js} +1 -1
- package/_assets/{index-DoqNeaqf.js → index-CPEW56oC.js} +1 -1
- package/_assets/{index-DY1F0LWT.js → index-CVaetlkF.js} +1 -1
- package/_assets/{index-oHxf4tR1.js → index-CZ-oyr8d.js} +1 -1
- package/_assets/{index-B8pZZJz-.js → index-CbbOEMBd.js} +1 -1
- package/_assets/{index-BIBwoiYY.js → index-Ccc-pGrt.js} +1 -1
- package/_assets/{index-BRLHYe51.js → index-ChlDHmTZ.js} +1 -1
- package/_assets/{index-Cap8a-RE.js → index-CkDVG_a0.js} +1 -1
- package/_assets/{index-DykCPSFI.js → index-Cl61ltQF.js} +1 -1
- package/_assets/{index-BClXql-a.js → index-Cnjifnkg.js} +1 -1
- package/_assets/{index-BR6IEMrM.js → index-CqLzAYYu.js} +11 -11
- package/_assets/{index-N1xuzaCt.js → index-Crfc7kEB.js} +2 -2
- package/_assets/{index-DFbrx-dL.js → index-CroRq_48.js} +1 -1
- package/_assets/{index-CIksKUax.js → index-CtSdDkYg.js} +2 -2
- package/_assets/{index-DC4Kv9-V.js → index-CycLf6t0.js} +1 -1
- package/_assets/{index-D7cHIqYc.js → index-DI5MJwtI.js} +1 -1
- package/_assets/{index-BeXckPt5.js → index-DNQcT8i8.js} +3 -3
- package/_assets/{index-VGBz5J8e.js → index-DfH6m-Ar.js} +1 -1
- package/_assets/{index-A4O9UD-C.js → index-DhVlJ1ll.js} +1 -1
- package/_assets/{index-DUkz3Hx0.js → index-Dl3xGhv0.js} +1 -1
- package/_assets/{index-Co-gW5Hp.js → index-DptqVcuN.js} +1 -1
- package/_assets/{index-Ceayuq0S.js → index-DqDSn6aV.js} +1 -1
- package/_assets/{index-BAnEsc71.js → index-DxPgc0KP.js} +1 -1
- package/_assets/{index-BxFAMFrH.js → index-Dy8SH7iw.js} +1 -1
- package/_assets/{index-BesOjXiK.js → index-EbRcCO2e.js} +1 -1
- package/_assets/{index-ByYcwLlF.js → index-T4DelPen.js} +1 -1
- package/_assets/{index-C-PYa491.js → index-YQoU1Oij.js} +1 -1
- package/_assets/{index-CCZG6i6u.js → index-Z5BMZOu5.js} +18 -16
- package/_assets/{index-BZs9emRd.js → index-onFl5MgF.js} +3 -3
- package/_assets/{index-CrM8tpME.js → index-uA72jFdu.js} +1 -1
- package/_assets/{index-YfEt1Rml.js → index-voVSpMmf.js} +1 -1
- package/_assets/{index.es-C8eU1wA8.js → index.es-CToxxyBw.js} +1 -1
- package/_assets/{index.es-DZzFd5-b.js → index.es-CvbAgxyC.js} +1 -1
- package/_assets/{index.es-CK_ga1Is.js → index.es-DRByKX1-.js} +4 -4
- package/_assets/{localBatchGatewayRequest-DTVgXIFF.js → localBatchGatewayRequest-DTJgI3xj.js} +1 -1
- package/_assets/{mana-convert-gocBeMiL.js → mana-convert-BvzeO7sG.js} +1 -1
- package/_assets/{networks-NA0vFG8W.js → networks-CFK3bJYy.js} +1 -1
- package/_assets/{onramp-piEEcDx9.js → onramp-okVUuWV0.js} +1 -1
- package/_assets/{openzeppelin-DqdNqCan.js → openzeppelin-De_HqqIc.js} +1 -1
- package/_assets/{parseNft-BUAibBaN.js → parseNft-q8FmdH8G.js} +2 -2
- package/_assets/{parseSignature-CLxsZU9k.js → parseSignature-B5R6ASNp.js} +1 -1
- package/_assets/{parseSignature-BD7TDX9C.js → parseSignature-CqPrGTDR.js} +3 -3
- package/_assets/{passkeys-eWclvb1O.js → passkeys-DSnfSnMU.js} +1 -1
- package/_assets/{pay-with-exchange-C8DalAYE.js → pay-with-exchange-W6o_xhiT.js} +1 -1
- package/_assets/{qr-overlay-BMuU__O0.js → qr-overlay-yLQ0IoEW.js} +1 -1
- package/_assets/{receive-38k_LlRS.js → receive-B1if_96A.js} +1 -1
- package/_assets/{resolveImplementation-SB0AO_yR.js → resolveImplementation-DO2_Regw.js} +1 -1
- package/_assets/{rpc-DEZlb2Y-.js → rpc-Byx0dACz.js} +1 -1
- package/_assets/{secp256k1-DOOppOlV.js → secp256k1-DZugY34I.js} +1 -1
- package/_assets/{secp256k1-Boxg6ZAq.js → secp256k1-DdXA0G93.js} +1 -1
- package/_assets/{secp256k1-B-O8Geq4.js → secp256k1-qgQXh0MJ.js} +1 -1
- package/_assets/{send-YrDd7FYi.js → send-DtosPy0k.js} +1 -1
- package/_assets/{send-batch-transaction-Dyy9Uesb.js → send-batch-transaction-_L7mjvMY.js} +1 -1
- package/_assets/{send-eip712-transaction-3GcoolNv.js → send-eip712-transaction-DurwgWTK.js} +2 -2
- package/_assets/{send-gasless-transaction-QtEZzpC5.js → send-gasless-transaction-B3bmXUxJ.js} +2 -2
- package/_assets/{send-transaction-DSdOj9eC.js → send-transaction-CZKkuF5l.js} +2 -2
- package/_assets/{sendMetaTransaction-D3FwHHTn.js → sendMetaTransaction-4my7kZiF.js} +1 -1
- package/_assets/{sendRawTransaction-CjOHZO88.js → sendRawTransaction-BwVANbYg.js} +3 -3
- package/_assets/{serializeTransaction-D_Dc_9Gp.js → serializeTransaction-cVp_FJox.js} +1 -1
- package/_assets/{session-proposal-Ba1SoCtq.js → session-proposal-CYvptxU7.js} +1 -1
- package/_assets/{session-request-CDBg7zst.js → session-request-Bn37Dem4.js} +2 -2
- package/_assets/{signing-BSzxbe16.js → signing-DEItZ-F3.js} +3 -3
- package/_assets/{socials-CCZXYTfQ.js → socials-CdpDKKrQ.js} +1 -1
- package/_assets/{swaps-UHy-bRsG.js → swaps-DnenFD5w.js} +1 -1
- package/_assets/{thirdweb-k1S3G2Wc.js → thirdweb-Bp130Dcj.js} +3 -3
- package/_assets/{to-serializable-transaction-BUvEWstJ.js → to-serializable-transaction-CcF0iJ96.js} +2 -2
- package/_assets/{trade-encoding-DhmJ3YE9.js → trade-encoding-BRe43PSw.js} +1 -1
- package/_assets/{transactionReceipt-DFrpXDGO.js → transactionReceipt-lMu7BRwr.js} +1 -1
- package/_assets/{transactions-B4l-FEOR.js → transactions-B14lINkM.js} +1 -1
- package/_assets/{useCreditPacks-m_96quiO.js → useCreditPacks-C5VR3CBS.js} +1 -1
- package/_assets/{useImportable-Ck2Tt8Ei.js → useImportable-B5bQ22LQ.js} +1 -1
- package/_assets/{useInfiniteGrid-XWDqyvpD.js → useInfiniteGrid-eJ_aRWUt.js} +1 -1
- package/_assets/useManaRate-CEsFS4D7.js +1 -0
- package/_assets/{useStore-DUJBpXit.js → useStore-BZhz06Vz.js} +1 -1
- package/_assets/{useTheme-ViRtXA8G.js → useTheme--KekSHIk.js} +1 -1
- package/_assets/{verifyHash-Drn9Way6.js → verifyHash-Bt7jFOSN.js} +1 -1
- package/_assets/{w3m-modal-B0M073Ob.js → w3m-modal-CDIk6daa.js} +1 -1
- package/_assets/{w3m-modal-B7mGVnE3.js → w3m-modal-Dn7of9MZ.js} +1 -1
- package/_assets/{wait-for-tx-receipt-BW8Z_n83.js → wait-for-tx-receipt-BUw9UtP4.js} +1 -1
- package/_assets/{wallets-DZ2SYb3M.js → wallets-A7pRwPiu.js} +5 -5
- package/_assets/{web-connector-Yp5dVaCI.js → web-connector-P4z47D9H.js} +3 -3
- package/_assets/{writeContract-BL3rIi0q.js → writeContract-Bx4xVEvO.js} +1 -1
- package/_assets/{zoraTestnet-Cmcli8zw.js → zoraTestnet-CuzBONzv.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-CKACY7GY.js +0 -336
- package/_assets/ItemDetail-AFjL4E8F.js +0 -3324
- package/_assets/useManaRate-sGau1wQV.js +0 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-Z5BMZOu5.js","_assets/react-DehiWSvs.js","_assets/index-CqLzAYYu.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-B5bQ22LQ.js","_assets/buy-Cs1e8dwt.js","_assets/mana-convert-BvzeO7sG.js","_assets/authorizations-LULzuipv.js","_assets/sendMetaTransaction-4my7kZiF.js","_assets/trade-encoding-BRe43PSw.js","_assets/ManaPricingBanner.styles-CfeNfvcw.js","_assets/field.styles-C90By0S4.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bn as bt,s as h,t as s,o as yt,B as vt,n as wt,q as jt,b as d,u as $,I as j,bo as Z,bp as J,bq as kt,_ as It,w as P,br as At,b3 as H,ar as $t,bs as Pt,bt as q}from"./index-CqLzAYYu.js";import{r as y,e as Lt,j as e,L as et,a as Tt}from"./react-DehiWSvs.js";import{m as Nt}from"./mana-convert-BvzeO7sG.js";import{u as Et}from"./useManaRate-CEsFS4D7.js";import{u as Ct}from"./useImportable-B5bQ22LQ.js";import{L as St}from"./LoadMore-QZxbtyl3.js";import{u as I}from"./useInfiniteGrid-eJ_aRWUt.js";import{m as it}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-Cs1e8dwt.js";import"./authorizations-LULzuipv.js";import"./sendMetaTransaction-4my7kZiF.js";import"./trade-encoding-BRe43PSw.js";const Ft=15e3;function Mt(t,a){return t.txHash&&a.txHash?t.txHash===a.txHash:t.txHash||a.txHash?!1:t.status===a.status&&Math.abs(t.createdAt-a.createdAt)<=Ft}function Dt(t){const a=[...t].sort((i,c)=>c.createdAt-i.createdAt),n=[];for(const i of a){const c=n[n.length-1];c&&Mt(c[c.length-1],i)?c.push(i):n.push([i])}return n.map(i=>{var c;return{id:((c=i.find(r=>r.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,u)=>r+u.credits,0),lines:i}})}function Ht(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function qt(t){const a=[],n=new Map;for(const i of t){const c=Ht(i);if(!c){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=n.get(c);if(r){r.quantity+=1,r.credits+=i.credits;continue}const u={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(c,u),a.push(u)}return a}function zt(t,a){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:a?Nt(t.manaWei,a):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Ot(t){const n=Dt(t.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=t.sales.map(o=>{const p=zt(o,t.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),c=(t.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),r=new Set(t.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(t.manaPurchases??[]).filter(o=>!r.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...c,...u].sort((o,p)=>p.createdAt-o.createdAt||(o.id<p.id?-1:1))}function Wt(t,a){return a==="all"?t:a==="sales"?t.filter(n=>n.kind==="sale"):t.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const at=t=>t.trim().toLowerCase();function Rt(t){const a=new Map;for(const n of t??[]){const i=at(n.txHash??"");if(!i)continue;const c=a.get(i);c?c.push(n):a.set(i,[n])}return a}function _t(t,a,n=Date.now()){const i=a.txHash?t.get(at(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?Bt(i[0].netCents):null,r=i.filter(o=>!o.available&&o.availableAt>n);if(r.length===0)return{kind:"credited",credits:c};const u=r.reduce((o,p)=>Math.max(o,p.availableAt),0);return{kind:"pending",credits:c,availableAt:u}}function Bt(t){return bt(t)}const Gt="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/credits-product-vs4Q6u6l.svg",z=yt`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,Ut=h.section`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
min-height: 60vh;
|
|
9
|
+
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
10
|
+
the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
|
|
11
|
+
max-width: 760px;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
|
|
14
|
+
/* The migration tool's row (thumbnail + name + a 144px price field) does not survive the feed's
|
|
15
|
+
column: squeezed to 760px the price field lands on its own line on a desktop. Widening the whole
|
|
16
|
+
column keeps heading, chips and panel as one block, which is the point of the constraint above.
|
|
17
|
+
1003px is the tool's own width in the design, which puts its rows at the 979px they are drawn at. */
|
|
18
|
+
&[data-view='migrate'] {
|
|
19
|
+
max-width: 1003px;
|
|
20
|
+
}
|
|
21
|
+
`,Kt=h.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: baseline;
|
|
24
|
+
gap: 12px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
`,Vt=h.h1`
|
|
27
|
+
font-family: ${s.font.sans};
|
|
28
|
+
margin: 0;
|
|
29
|
+
`;h.span`
|
|
30
|
+
color: ${s.colors.muted};
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
`;const Qt=h.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
margin-bottom: 20px;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
`,st=h.button`
|
|
38
|
+
appearance: none;
|
|
39
|
+
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
40
|
+
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
41
|
+
pills carry. */
|
|
42
|
+
border: 0.5px solid ${s.colors.gray4};
|
|
43
|
+
background: ${s.colors.white};
|
|
44
|
+
color: ${s.colors.text};
|
|
45
|
+
font-family: ${s.font.sans};
|
|
46
|
+
font-size: 13px;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
line-height: 24px;
|
|
49
|
+
letter-spacing: 0.46px;
|
|
50
|
+
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
51
|
+
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
padding: 0 16px;
|
|
56
|
+
min-height: 40px;
|
|
57
|
+
border-radius: ${s.radius.pill};
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
transition:
|
|
60
|
+
background 0.15s,
|
|
61
|
+
border-color 0.15s,
|
|
62
|
+
color 0.15s;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background: ${s.colors.media};
|
|
66
|
+
}
|
|
67
|
+
&:focus-visible {
|
|
68
|
+
outline: 2px solid ${s.colors.accent};
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
&[data-active='true'] {
|
|
72
|
+
background: ${s.colors.accent};
|
|
73
|
+
border-color: ${s.colors.accent};
|
|
74
|
+
color: ${s.colors.white};
|
|
75
|
+
}
|
|
76
|
+
`,Xt=h(st)`
|
|
77
|
+
position: relative;
|
|
78
|
+
|
|
79
|
+
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
80
|
+
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
81
|
+
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
82
|
+
background: ${s.colors.white};
|
|
83
|
+
color: ${s.colors.accent};
|
|
84
|
+
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
85
|
+
box-shadow: 0 0 0 2px ${s.colors.accent};
|
|
86
|
+
}
|
|
87
|
+
`,Zt=h.span`
|
|
88
|
+
position: absolute;
|
|
89
|
+
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
90
|
+
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
91
|
+
top: -6.5px;
|
|
92
|
+
right: -3.5px;
|
|
93
|
+
display: grid;
|
|
94
|
+
place-items: center;
|
|
95
|
+
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
96
|
+
letter-spacing: normal;
|
|
97
|
+
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
98
|
+
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
99
|
+
min-width: 20px;
|
|
100
|
+
height: 20px;
|
|
101
|
+
padding: 0 6px;
|
|
102
|
+
border-radius: ${s.radius.pill};
|
|
103
|
+
background: ${s.colors.brandViolet};
|
|
104
|
+
/**
|
|
105
|
+
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
106
|
+
*
|
|
107
|
+
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
108
|
+
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
109
|
+
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
110
|
+
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
111
|
+
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
112
|
+
*
|
|
113
|
+
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
114
|
+
* shadow draws outside the box.
|
|
115
|
+
*/
|
|
116
|
+
box-shadow: 0 0 0 2px ${s.colors.white};
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
line-height: 1.6;
|
|
120
|
+
color: ${s.colors.white};
|
|
121
|
+
`,Jt=h.div`
|
|
122
|
+
min-height: 60vh;
|
|
123
|
+
`,Y=h.div`
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 16px;
|
|
127
|
+
`,L=h.div`
|
|
128
|
+
background: ${s.colors.white};
|
|
129
|
+
border: 1px solid ${s.colors.line};
|
|
130
|
+
border-radius: 16px;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
`,T=h.div`
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
gap: 12px;
|
|
137
|
+
padding: 14px 18px;
|
|
138
|
+
background: ${s.colors.softWhite};
|
|
139
|
+
border-bottom: 1px solid ${s.colors.line};
|
|
140
|
+
|
|
141
|
+
${s.media.maxWidth("mobile")} {
|
|
142
|
+
flex-wrap: wrap;
|
|
143
|
+
}
|
|
144
|
+
`,N=h.div`
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 2px;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
`,E=h.span`
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
color: ${s.colors.text};
|
|
152
|
+
`,C=h.span`
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
color: ${s.colors.muted};
|
|
155
|
+
`,S=h.div`
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: 14px;
|
|
159
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
160
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
161
|
+
margin-left: auto;
|
|
162
|
+
`,Yt=h.div`
|
|
163
|
+
flex: 0 0 auto;
|
|
164
|
+
width: 52px;
|
|
165
|
+
height: 52px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
background: ${s.colors.media};
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
|
|
172
|
+
img {
|
|
173
|
+
width: 30px;
|
|
174
|
+
height: 30px;
|
|
175
|
+
display: block;
|
|
176
|
+
}
|
|
177
|
+
`,F=h.span`
|
|
178
|
+
font-size: 11px;
|
|
179
|
+
font-weight: 700;
|
|
180
|
+
text-transform: uppercase;
|
|
181
|
+
letter-spacing: 0.03em;
|
|
182
|
+
padding: 4px 10px;
|
|
183
|
+
border-radius: ${s.radius.pill};
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
|
|
186
|
+
&[data-status='SETTLED'] {
|
|
187
|
+
background: rgba(30, 166, 114, 0.14);
|
|
188
|
+
color: ${s.colors.okStrong};
|
|
189
|
+
}
|
|
190
|
+
&[data-status='PENDING'] {
|
|
191
|
+
background: rgba(245, 166, 35, 0.16);
|
|
192
|
+
color: #b5790a;
|
|
193
|
+
}
|
|
194
|
+
&[data-status='SOLD'] {
|
|
195
|
+
background: rgba(103, 58, 183, 0.14);
|
|
196
|
+
color: ${s.colors.accent};
|
|
197
|
+
}
|
|
198
|
+
&[data-status='FAILED'] {
|
|
199
|
+
background: rgba(214, 61, 61, 0.14);
|
|
200
|
+
color: #b02a2a;
|
|
201
|
+
}
|
|
202
|
+
`,v=h.div`
|
|
203
|
+
display: flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
gap: 5px;
|
|
206
|
+
font-weight: 800;
|
|
207
|
+
color: ${s.colors.text};
|
|
208
|
+
white-space: nowrap;
|
|
209
|
+
|
|
210
|
+
.ccy-mark {
|
|
211
|
+
width: 16px;
|
|
212
|
+
height: 16px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
216
|
+
&[data-kind='income'] {
|
|
217
|
+
color: ${s.colors.okStrong};
|
|
218
|
+
}
|
|
219
|
+
`,nt=h.img`
|
|
220
|
+
width: 16px;
|
|
221
|
+
height: 16px;
|
|
222
|
+
vertical-align: -0.15em;
|
|
223
|
+
`,te=h.span`
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
`,ee=h.span`
|
|
228
|
+
position: fixed;
|
|
229
|
+
transform: translateX(-50%);
|
|
230
|
+
padding: 6px 8px;
|
|
231
|
+
border-radius: 6px;
|
|
232
|
+
background: #16141a;
|
|
233
|
+
color: ${s.colors.white};
|
|
234
|
+
font-size: 12px;
|
|
235
|
+
font-weight: 600;
|
|
236
|
+
line-height: 1;
|
|
237
|
+
white-space: nowrap;
|
|
238
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
z-index: 9999;
|
|
241
|
+
`,O=h.div`
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
`,M=h.div`
|
|
245
|
+
display: grid;
|
|
246
|
+
grid-template-columns: 52px 1fr auto;
|
|
247
|
+
align-items: center;
|
|
248
|
+
gap: 14px;
|
|
249
|
+
padding: 12px 18px;
|
|
250
|
+
text-decoration: none;
|
|
251
|
+
color: inherit;
|
|
252
|
+
|
|
253
|
+
& + & {
|
|
254
|
+
border-top: 1px solid ${s.colors.line};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&[data-link='true'] {
|
|
258
|
+
transition: background 0.15s;
|
|
259
|
+
}
|
|
260
|
+
&[data-link='true']:hover {
|
|
261
|
+
background: ${s.colors.media};
|
|
262
|
+
}
|
|
263
|
+
&[data-link='true']:focus-visible {
|
|
264
|
+
outline: 2px solid ${s.colors.accent};
|
|
265
|
+
outline-offset: -2px;
|
|
266
|
+
}
|
|
267
|
+
`,W=h.div`
|
|
268
|
+
width: 52px;
|
|
269
|
+
height: 52px;
|
|
270
|
+
border-radius: 10px;
|
|
271
|
+
background: ${s.colors.media};
|
|
272
|
+
overflow: hidden;
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
color: ${s.colors.muted2};
|
|
277
|
+
|
|
278
|
+
img {
|
|
279
|
+
width: 100%;
|
|
280
|
+
height: 100%;
|
|
281
|
+
object-fit: contain;
|
|
282
|
+
}
|
|
283
|
+
`,R=h.div`
|
|
284
|
+
width: 52px;
|
|
285
|
+
height: 52px;
|
|
286
|
+
border-radius: 10px;
|
|
287
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
288
|
+
background-size: 200% 100%;
|
|
289
|
+
animation: ${z} 1.3s infinite linear;
|
|
290
|
+
|
|
291
|
+
@media (prefers-reduced-motion: reduce) {
|
|
292
|
+
animation: none;
|
|
293
|
+
}
|
|
294
|
+
`,_=h.div`
|
|
295
|
+
min-width: 0;
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
gap: 2px;
|
|
299
|
+
`,B=h.span`
|
|
300
|
+
font-weight: 700;
|
|
301
|
+
white-space: nowrap;
|
|
302
|
+
overflow: hidden;
|
|
303
|
+
text-overflow: ellipsis;
|
|
304
|
+
`,G=h.span`
|
|
305
|
+
display: inline-block;
|
|
306
|
+
width: 140px;
|
|
307
|
+
max-width: 60%;
|
|
308
|
+
height: 12px;
|
|
309
|
+
border-radius: 6px;
|
|
310
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
311
|
+
background-size: 200% 100%;
|
|
312
|
+
animation: ${z} 1.3s infinite linear;
|
|
313
|
+
|
|
314
|
+
@media (prefers-reduced-motion: reduce) {
|
|
315
|
+
animation: none;
|
|
316
|
+
}
|
|
317
|
+
`,U=h.span`
|
|
318
|
+
font-size: 13px;
|
|
319
|
+
color: ${s.colors.muted};
|
|
320
|
+
`,ie=h.div`
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
gap: 4px;
|
|
324
|
+
font-weight: 700;
|
|
325
|
+
color: ${s.colors.text};
|
|
326
|
+
white-space: nowrap;
|
|
327
|
+
|
|
328
|
+
.ccy-mark {
|
|
329
|
+
width: 14px;
|
|
330
|
+
height: 14px;
|
|
331
|
+
}
|
|
332
|
+
`,tt=h.div`
|
|
333
|
+
height: 132px;
|
|
334
|
+
border-radius: 16px;
|
|
335
|
+
border: 1px solid transparent;
|
|
336
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
337
|
+
background-size: 200% 100%;
|
|
338
|
+
animation: ${z} 1.3s infinite linear;
|
|
339
|
+
|
|
340
|
+
@media (prefers-reduced-motion: reduce) {
|
|
341
|
+
animation: none;
|
|
342
|
+
}
|
|
343
|
+
`,rt=h.div`
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
align-items: center;
|
|
347
|
+
gap: 8px;
|
|
348
|
+
text-align: center;
|
|
349
|
+
padding: 90px 20px;
|
|
350
|
+
min-height: 50vh;
|
|
351
|
+
`,ot=h.p`
|
|
352
|
+
font-size: 22px;
|
|
353
|
+
font-weight: 700;
|
|
354
|
+
margin: 6px 0 0;
|
|
355
|
+
`,ae=h(vt)`
|
|
356
|
+
margin-top: 12px;
|
|
357
|
+
`,K=M.withComponent(et),se=y.lazy(()=>It(()=>import("./index-Z5BMZOu5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.ImportListings}))),A=24,ne=["all","purchases","sales"],D="migrate";function w(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ct(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function dt(t){const a=Number(t)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function lt({children:t}){const a=y.useRef(null),[n,i]=y.useState(null),c=()=>{var u;const r=(u=a.current)==null?void 0:u.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return e.jsxs(te,{ref:a,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[t,n?Tt.createPortal(e.jsx(ee,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function re({item:t}){const a=!!t.contractAddress&&!!t.itemId,n=!!t.tradeId||a,{data:i,isLoading:c}=$({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Pt(t.tradeId):q(t.contractAddress,{itemId:t.itemId}),enabled:n,staleTime:5*6e4}),r=n&&c,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",p=H({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,x=e.jsxs(e.Fragment,{children:[r?e.jsx(R,{}):e.jsx(W,{children:o?e.jsx("img",{src:o,alt:u}):e.jsx(j,{name:"cart",size:20})}),e.jsxs(_,{children:[r?e.jsx(G,{}):e.jsx(B,{title:u,children:u}),t.quantity>1?e.jsx(U,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(ie,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(K,{to:p,"data-link":"true",children:x}):e.jsx(M,{children:x})}function oe({order:t}){const a=qt(t.lines),n=a.reduce((i,c)=>i+c.quantity,0);return e.jsxs(L,{"data-testid":"purchase-order",children:[e.jsxs(T,{children:[e.jsxs(N,{children:[e.jsx(E,{children:w(t.createdAt)}),e.jsxs(C,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(v,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(O,{children:a.map(i=>e.jsx(re,{item:i},i.key))})]})}function ce({sale:t}){const{data:a,isLoading:n}=$({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),c=(a==null?void 0:a.thumbnail)??"",r=H({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[n?e.jsx(R,{}):e.jsx(W,{children:c?e.jsx("img",{src:c,alt:i}):e.jsx(j,{name:"offer",size:20})}),e.jsxs(_,{children:[n?e.jsx(G,{}):e.jsx(B,{title:i,children:i}),e.jsx(U,{children:d("activity.boughtFrom",{account:ct(t.seller)})})]})]});return e.jsxs(L,{"data-testid":"activity-mana-purchase",children:[e.jsxs(T,{children:[e.jsxs(N,{children:[e.jsx(E,{children:w(t.createdAt)}),e.jsx(C,{children:d("activity.paidWithMana")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(v,{children:[dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(nt,{src:it,alt:"MANA"})})]})]})]}),e.jsx(O,{children:r?e.jsx(K,{to:r,"data-link":"true",children:u}):e.jsx(M,{children:u})})]})}function de({sale:t,payout:a}){const{data:n,isLoading:i}=$({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),c=(n==null?void 0:n.name)??d("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",u=H({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,o=e.jsxs(e.Fragment,{children:[i?e.jsx(R,{}):e.jsx(W,{children:r?e.jsx("img",{src:r,alt:c}):e.jsx(j,{name:"offer",size:20})}),e.jsxs(_,{children:[i?e.jsx(G,{}):e.jsx(B,{title:c,children:c}),e.jsxs(U,{children:[d("activity.soldTo",{account:ct(t.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:w(a.availableAt)})}`:""]})]})]});return e.jsxs(L,{"data-testid":"activity-sale",children:[e.jsxs(T,{children:[e.jsxs(N,{children:[e.jsx(E,{children:w(t.createdAt)}),e.jsx(C,{children:d("activity.saleLabel")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?e.jsxs(v,{"data-kind":"income",children:["+",dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(nt,{src:it,alt:"MANA"})})]}):a.credits!==null?e.jsxs(v,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",$t(a.credits)]}):e.jsx(v,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(O,{children:u?e.jsx(K,{to:u,"data-link":"true",children:o}):e.jsx(M,{children:o})})]})}function le({order:t}){const a=`$${(t.usdCents/100).toFixed(2)}`,n=At(t.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(L,{"data-testid":"credit-order",children:e.jsxs(T,{children:[e.jsx(Yt,{children:e.jsx("img",{src:Gt,alt:"","aria-hidden":!0})}),e.jsxs(N,{children:[e.jsx(E,{children:w(t.createdAt)}),e.jsxs(C,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":n,children:i}),e.jsxs(v,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function he({filter:t}){const a={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(rt,{children:[e.jsx(j,{name:a.icon,size:40,color:s.colors.muted2}),e.jsx(ot,{children:a.title}),e.jsx("p",{className:"muted",children:a.body}),t!=="sales"?e.jsx(ae,{as:et,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Le(){const{session:t}=wt(),[a,n]=y.useState("all"),[i,c]=Lt(),r=i.get("view")===D;jt({title:r?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=Ct(),o=u!==void 0&&(u>0||r),p=!!t&&!r&&a!=="sales",x=!!t&&!r&&a!=="purchases",m=I(["purchases",t==null?void 0:t.address],l=>kt(t.address,t.identity,{first:A,skip:l}),{enabled:p}),g=I(["sales",t==null?void 0:t.address],l=>Z(t.address,{role:"seller",first:A,skip:l}),{enabled:x}),f=I(["credit-orders",t==null?void 0:t.address],l=>J(t.address,t.identity,{first:A,skip:l}),{enabled:p}),b=I(["mana-purchases",t==null?void 0:t.address],l=>Z(t.address,{role:"buyer",first:A,skip:l}),{enabled:p}),{data:V}=$({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>J(t.address,t.identity,{first:200}).then(l=>l.payouts),enabled:x,staleTime:6e4}),ht=y.useMemo(()=>Rt(V),[V]),{data:ut}=Et(x);if(!t)return e.jsxs(rt,{children:[e.jsx(j,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ot,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Q=Wt(Ot({purchases:p?m.items:[],sales:x?g.items:[],creditOrders:p?f.items:[],manaPurchases:p?b.items:[],rate:ut}),a),pt=p&&(m.isLoading||f.isLoading||b.isLoading)||x&&g.isLoading,X=p&&(m.isFetchingNextPage||f.isFetchingNextPage||b.isFetchingNextPage)||x&&g.isFetchingNextPage,xt=p&&(m.hasNextPage||f.hasNextPage||b.hasNextPage)||x&&g.hasNextPage;function mt(){p&&m.hasNextPage&&m.fetchNextPage(),p&&f.hasNextPage&&f.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),x&&g.hasNextPage&&g.fetchNextPage()}function gt(l){if(n(l),!r)return;const k=new URLSearchParams(i);k.delete("view"),c(k,{replace:!0})}function ft(){const l=new URLSearchParams(i);l.set("view",D),c(l,{replace:!0})}return e.jsxs(Ut,{"data-view":r?D:"feed",children:[e.jsx(Kt,{children:e.jsx(Vt,{children:d("nav.activity")})}),e.jsxs(Qt,{role:"tablist","aria-label":d("nav.activity"),children:[ne.map(l=>e.jsx(st,{type:"button",role:"tab","aria-selected":!r&&a===l,"data-active":!r&&a===l,"data-testid":`activity-filter-${l}`,onClick:()=>gt(l),children:d(`activity.filter.${l}`)},l)),o?e.jsxs(Xt,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:ft,children:[d("activity.migrate.chip"),u?e.jsx(Zt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),r?e.jsx(y.Suspense,{fallback:e.jsx(Jt,{"aria-busy":"true"}),children:e.jsx(se,{})}):pt?e.jsx(Y,{children:Array.from({length:5}).map((l,k)=>e.jsx(tt,{},k))}):Q.length===0?e.jsx(he,{filter:a}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[Q.map(l=>l.kind==="purchase"?e.jsx(oe,{order:l.order},l.id):l.kind==="credit"?e.jsx(le,{order:l.order},l.id):l.kind==="mana-purchase"?e.jsx(ce,{sale:l.sale},l.id):e.jsx(de,{sale:l.sale,payout:_t(ht,l.sale)},l.id)),X?e.jsx(tt,{}):null]}),e.jsx(St,{hasNextPage:xt,isFetching:X,onLoadMore:mt})]})]})}export{Le as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-CqLzAYYu.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -94,4 +94,4 @@ void main() {
|
|
|
94
94
|
inset: 0;
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
|
-
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),_=e.getUniformLocation(a,"u_resolution"),y=e.getUniformLocation(a,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let d=!1;const f=L(e,
|
|
97
|
+
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),_=e.getUniformLocation(a,"u_resolution"),y=e.getUniformLocation(a,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let d=!1;const f=L(e,S,()=>d),w=()=>{const c=window.devicePixelRatio||1,E=r.clientWidth*c,g=r.clientHeight*c;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(_,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(y,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=c=>{c.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(i),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${b})`}}),v.jsx(I,{ref:t})]})}export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-
|
|
1
|
+
import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-CqLzAYYu.js";import{r as dt,s as pt,u as ht}from"./buy-Cs1e8dwt.js";import{a as xt,m as Le}from"./mana-convert-BvzeO7sG.js";import{u as Ue}from"./useManaRate-CEsFS4D7.js";import{g as ft,h as mt,i as ut,j as gt,k as bt,C as yt,l as wt,o as jt,m as vt,n as $t,M as Ct,p as kt,E as St,q as Et,r as Rt,s as _t,t as Tt,u as zt,v as It}from"./Assets.styles-nkCcUHhi.js";import{S as Te,R as At,F as Nt,e as Mt}from"./categories-Al7TFiZ3.js";import{L as Pt}from"./LoadMore-QZxbtyl3.js";import{u as Wt}from"./useInfiniteGrid-eJ_aRWUt.js";import{E as Bt}from"./ErrorNotice-SoCdrSmZ.js";import{d as Ft}from"./dcl-schemas-Dr9BTjb7.js";import{s as Lt,G as Ut,w as Ht,S as Ot}from"./buy-gasless-nMph8utE.js";import{j as Gt}from"./trade-encoding-BRe43PSw.js";import{f as Dt}from"./errors-5vlAB2Zg.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-DrwaXxlg.js";import{G as Kt}from"./grid.styles-_dq0Z7zy.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-LULzuipv.js";import"./sendMetaTransaction-4my7kZiF.js";function V(i){const o=i.source??"item",a=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<He?{ok:!1,reason:"too-short"}:o.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Ft.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(i,o={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${a}`);const x=await d.available(i);if((p=o.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return xt(L,i)}async function sn(i,o,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:i,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(i,o){const a=be.from(i.availableAmount),l=be.from(L).sub(a);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(i,o={}){const a=tn,h=o.intervalMs??1e4,l=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${i}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(i){const{name:o,identity:a,signer:h}=i,l=i.chainId??F.chainId,d=i.provider??"across",x=(i.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:o,buyer:x,chainId:l,provider:d});try{const u=await dt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,o,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Lt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ut))throw b;f=await pt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ht(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:o,buyer:x,originConfirmed:r}),u instanceof Ot)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -379,7 +379,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-
|
|
382
|
+
`;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Nn=s.nav`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-Al7TFiZ3.js";import{n as c,T as se}from"./Tooltip-DrwaXxlg.js";import{t as e,s as o,I as g,b as s,ad as ae,C as v}from"./index-CqLzAYYu.js";const re=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 P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,n as G,v as O,I as z,w as B,u as w,x as K,c as Q,y as H,z as A,j as X,A as Z,D as T}from"./index-
|
|
1
|
+
import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,n as G,v as O,I as z,w as B,u as w,x as K,c as Q,y as H,z as A,j as X,A as Z,D as T}from"./index-CqLzAYYu.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-LULzuipv.js";import{f as et}from"./builder-CsWf7X7a.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-5vlAB2Zg.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-4my7kZiF.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 Se,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as le,s as i,b as s,ar as de,a_ as sa,aq as na,I as O,w as Mt,ac as Ne,q as ia,O as Q,ae as dt,n as ra,u as oa,a$ as ca,x as da,b0 as la,b1 as ua,b2 as ha,b3 as pa,v as ga,b4 as lt,R as G,b5 as ut,b6 as xa,j as ae,c as ht,b7 as ma,C as fa,b8 as pt,b9 as Be,ba as ye,bb as be,bc as gt,g as ve,d as ya,e as We,bd as ba}from"./index-
|
|
1
|
+
import{j as e,L as Se,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as le,s as i,b as s,ar as de,a_ as sa,aq as na,I as O,w as Mt,ac as Ne,q as ia,O as Q,ae as dt,n as ra,u as oa,a$ as ca,x as da,b0 as la,b1 as ua,b2 as ha,b3 as pa,v as ga,b4 as lt,R as G,b5 as ut,b6 as xa,j as ae,c as ht,b7 as ma,C as fa,b8 as pt,b9 as Be,ba as ye,bb as be,bc as gt,g as ve,d as ya,e as We,bd as ba}from"./index-CqLzAYYu.js";import{M as va,S as wa,C as Ca,H as ja,a as ka,T as $a,X as Sa,b as Ma,B as Ta,c as Ia,d as xt,e as Pa,f as ke,P as Tt,m as za,g as Aa,h as Ea,i as qa,j as It,k as $e,L as Ra,l as _a,n as mt,o as ft,W as Ba,p as Wa,q as Fa,A as La,r as Ka,s as Ua,t as Na,u as Qa,v as Oa,w as Ha,x as Va,y as Ga,z as Da,D as Ya,E as Ja,F as Xa,G as Za,I as es,J as ts,K as Fe,N as as,O as ss,Q as ns,R as is,U as yt,V as bt,Y as rs,Z as os,_ as cs}from"./CollectionCarousel-BofN3PUd.js";import{u as ds}from"./useManaRate-CEsFS4D7.js";import{u as ls,r as us,g as hs,b as Le}from"./buy-Cs1e8dwt.js";import{j as ps,k as gs,a as xs,n as ms,f as fs,A as ys}from"./authorizations-LULzuipv.js";import{b as bs,w as vs,S as vt,G as ws}from"./buy-gasless-nMph8utE.js";import{u as Cs,M as js,R as we,r as ks,c as $s,p as wt}from"./useCreditPacks-C5VR3CBS.js";import{i as Ss,a as Ms}from"./errors-5vlAB2Zg.js";import{E as Ts}from"./ErrorNotice-SoCdrSmZ.js";import{u as Ct}from"./mana-convert-BvzeO7sG.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-BRe43PSw.js";import"./sendMetaTransaction-4my7kZiF.js";const{colors:se,radius:Is}=le,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 Se,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
|
-
`,Rs="https://cdn.decentraland.org/@dcl/shop/0.5.1-
|
|
61
|
+
`,Rs="https://cdn.decentraland.org/@dcl/shop/0.5.1-30941423866.commit-16bb43e/_assets/buy-error-22UunaPC.png";function _s(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?s("cartCheckout.errorTitle"):l==="nofunds"?s("cartCheckout.titleNoFunds"):l==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(va,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(wa,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Ca,{"data-tall":Y||void 0,children:[e.jsxs(ja,{children:[e.jsxs(ka,{children:[e.jsx($a,{children:D}),!W&&e.jsx(Sa,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Ma,{})})]}),e.jsxs(Ta,{children:[e.jsx(Ia,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Pa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),de(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=za(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Bs,{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(Aa,{"data-testid":"buy-error",children:[e.jsx(Ea,{src:Rs,alt:"",width:64,height:80}),e.jsxs(qa,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:z,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"purple",onClick:o.onRetry??z,children:s("cartCheckout.tryAgain")})]})]})]})]})}function Bs({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?s("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(Ra,{src:sa,alt:"",width:61,height:61}),e.jsx(_a,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}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(Ba,{"data-testid":"nofunds-warning",children:[e.jsx(Wa,{}),e.jsxs(Fa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",s("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(La,{children:[e.jsx(Ka,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ua,{children:[e.jsxs("div",{children:[e.jsxs(Na,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(Es,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Qa,{address:n.item.creator}):null]}),e.jsxs(Oa,{children:[e.jsx(Ha,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Va,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ga,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Da,{}),e.jsx(Ya,{children:de(n.credits)}),e.jsxs(Ja,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Xa,{children:[e.jsxs(Za,{children:[e.jsx(es,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ts,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:Y,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"gradient",onClick:D,children:s("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=le,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{a8 as N,a9 as U,aa as o,ab as n,ac as D,o as M}from"./index-
|
|
1
|
+
import{a8 as N,a9 as U,aa as o,ab as n,ac as D,o as M}from"./index-CqLzAYYu.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-CF2rJgou.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,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as m,u as V,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,W as X,y as T,I as ee,b as a,c as te,j as ae,u as re,q as oe,C as ie,af as F,ag as se,aY as ne,aZ as ce}from"./index-
|
|
1
|
+
import{j as e,r as m,u as V,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,W as X,y as T,I as ee,b as a,c as te,j as ae,u as re,q as oe,C as ie,af as F,ag as se,aY as ne,aZ as ce}from"./index-CqLzAYYu.js";import{E as le}from"./ErrorNotice-SoCdrSmZ.js";import{d as de,g as pe,a as xe,P as ue,C as me,b as ge,c as he,B as be,S as fe,M as je,A as ve}from"./browseLayout.styles-Cb1bSjYL.js";import{u as ye}from"./useStore-BZhz06Vz.js";import{S as z,C as Ce,F as we,c as Ne,P as Se,d as ke,H as Pe,e as $e}from"./categories-Al7TFiZ3.js";import{L as Ae}from"./LoadMore-QZxbtyl3.js";import{u as Me}from"./useInfiniteGrid-eJ_aRWUt.js";import{G as Ee}from"./grid.styles-_dq0Z7zy.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Re=c.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${v.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,b as g,w as k,ar as j,bu as C,C as G,o as Y,I as Q,j as X,g as W,e as B,d as Z,a0 as J,bS as F,ag as q}from"./index-
|
|
1
|
+
import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,b as g,w as k,ar as j,bu as C,C as G,o as Y,I as Q,j as X,g as W,e as B,d as Z,a0 as J,bS as F,ag as q}from"./index-CqLzAYYu.js";import{s as ee,f as U,A as H,g as K,r as te,m as ne,i as ae,M as ie,h as oe}from"./authorizations-LULzuipv.js";import{i as se}from"./errors-5vlAB2Zg.js";import{E as re}from"./ErrorNotice-SoCdrSmZ.js";import{a as ce}from"./buy-Cs1e8dwt.js";import{g as de,f as le}from"./trade-encoding-BRe43PSw.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-4my7kZiF.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,f=be(d,n,s);l>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,m=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as V,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Y,F as je,H as R,G as W,s as r,be as ve,aq as Ce,bf as ye,b as t,bg as $e,bh as _,B as ke,ac as Z,W as J,n as Ne,y as Q,I as T,c as Pe,q as Se,af as S,C as Le,ag as Ae,bd as Fe,bi as Ee}from"./index-
|
|
1
|
+
import{d as V,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Y,F as je,H as R,G as W,s as r,be as ve,aq as Ce,bf as ye,b as t,bg as $e,bh as _,B as ke,ac as Z,W as J,n as Ne,y as Q,I as T,c as Pe,q as Se,af as S,C as Le,ag as Ae,bd as Fe,bi as Ee}from"./index-CqLzAYYu.js";import{d as Me,g as ze,a as Be,P as Ie,C as Re,b as We,c as _e,A as Te,B as He,S as Ge,M as Ue,e as De,f as Ke}from"./browseLayout.styles-Cb1bSjYL.js";import{u as Oe,L as qe}from"./useStore-BZhz06Vz.js";import{S as H,C as Ve,F as Ye,c as Ze,P as Je,d as Qe,H as Xe,e as et}from"./categories-Al7TFiZ3.js";import{L as G}from"./LoadMore-QZxbtyl3.js";import{u as U}from"./useInfiniteGrid-eJ_aRWUt.js";import{E as D}from"./ErrorNotice-SoCdrSmZ.js";import{G as K}from"./grid.styles-_dq0Z7zy.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:tt}=Y,it=r.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
background: ${u.bg};
|
|
4
4
|
border-radius: ${X.card};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-CqLzAYYu.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|