@dcl/shop 0.1.0-30461849576.commit-12d07d4 → 0.1.0-30491920077.commit-b636261
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-CSuhDydH.js → Activity-B1PUyPvs.js} +7 -7
- package/assets/{AnimatedBackground-8Z_8Mlol.js → AnimatedBackground-TVJS-gH0.js} +1 -1
- package/assets/{Assets-SN3Y76GI.js → Assets-Dg2UL1q0.js} +7 -7
- package/assets/{Assets.styles-ciQtjliZ.js → Assets.styles-DXfpYzAi.js} +2 -2
- package/assets/{Authorizations-lx92TdPJ.js → Authorizations-D-4hw46l.js} +1 -1
- package/assets/{Cart-B21LiuAo.js → Cart-CxyHlX2J.js} +16 -11
- package/assets/{CircularProgress-Djai3zyH.js → CircularProgress-NzNCIVEM.js} +1 -1
- package/assets/{Collection-CEQxSX4E.js → Collection-pFKxEeja.js} +1 -1
- package/assets/{CollectionCarousel-DfMAEnsm.js → CollectionCarousel-CTx_WmhK.js} +34 -16
- package/assets/{ConstantsUtil-CJLq5-wb.js → ConstantsUtil-Dfwpy1eP.js} +1 -1
- package/assets/{ContentClient-Dt2-TsxC.js → ContentClient-gZyDAKO3.js} +1 -1
- package/assets/Creator-BB3XvV9Z.js +306 -0
- package/assets/{DeploymentBuilder-Cu-VDjOR.js → DeploymentBuilder-DufsvYDr.js} +1 -1
- package/assets/{ErrorNotice-CyxiR_Rh.js → ErrorNotice-AcMffEAY.js} +1 -1
- package/assets/{ExchangeController-Z_fhiIuM.js → ExchangeController-wlmVCi1v.js} +1 -1
- package/assets/{GetCredits-Ctz5CKT1.js → GetCredits-Dz-bnwEB.js} +4 -4
- package/assets/{HelpersUtil-CfY7XYFI.js → HelpersUtil-DcfnZGQ4.js} +1 -1
- package/assets/{ImportListings-DmVwt0Ax.js → ImportListings-CxprZUOI.js} +8 -8
- package/assets/{ItemDetail-CX5br1KM.js → ItemDetail-DhZQXVky.js} +151 -149
- package/assets/{LoadMore-BpBgRt6U.js → LoadMore-CbGw7_AZ.js} +1 -1
- package/assets/{MenuList-D6x9iVBq.js → MenuList-BDM-Jnmn.js} +1 -1
- package/assets/{MyAssets-BexRoK4a.js → MyAssets-BwXozDej.js} +1 -1
- package/assets/{MyFavorites-YMHXyXLK.js → MyFavorites-DBNdZQwR.js} +1 -1
- package/assets/{NetworkUtil-DrZx-6FF.js → NetworkUtil-HlUKXKcF.js} +1 -1
- package/assets/{NotFound-BGBtr9uR.js → NotFound-Dg3tao6l.js} +1 -1
- package/assets/{NotificationsBell-DC-1Irju.js → NotificationsBell-B5rxWs0X.js} +1 -1
- package/assets/{StoreSettings-U-7XtzFv.js → StoreSettings-RchStPPt.js} +1 -1
- package/assets/{Success-DpsXoJt6.js → Success-BXQb9XGi.js} +1 -1
- package/assets/{SwapController-DYEFHcHa.js → SwapController-DpGp1Ynj.js} +1 -1
- package/assets/Tooltip-CaPywNj_.js +45 -0
- package/assets/{TradeService-DctYnk8d.js → TradeService-DK22dfVy.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-E3LZaKPB.js → W3MFrameProviderSingleton-CgZVr29H.js} +3 -3
- package/assets/{WebCryptoP256-CVsQ_o8H.js → WebCryptoP256-DjQsZliH.js} +1 -1
- package/assets/{authorizations-wLlzXVR-.js → authorizations-CBQpjv0Y.js} +1 -1
- package/assets/{basic-CKpMAJq4.js → basic-OCyD-MQ8.js} +1 -1
- package/assets/{biconomy-C-ggcRFD.js → biconomy-CMy-5ybX.js} +1 -1
- package/assets/{browseLayout.styles-4wApiFUk.js → browseLayout.styles-nIInl7-_.js} +1 -1
- package/assets/{browser-CNT004n0.js → browser-BGlawS--.js} +1 -1
- package/assets/browser-ponyfill-B4tSdV4O.js +1 -0
- package/assets/{browser-ponyfill-C5PEoXZC.js → browser-ponyfill-BvriZgAo.js} +1 -1
- package/assets/{builder-DMvOfu4D.js → builder-102Lb9G5.js} +1 -1
- package/assets/{buy-F5h0O1Oz.js → buy-YzKhoSZr.js} +1 -1
- package/assets/{buy-gasless-Bx1g9q5n.js → buy-gasless-DNXWk0IK.js} +1 -1
- package/assets/{categories-DSuB3dEO.js → categories-fg4FNysa.js} +1 -1
- package/assets/{ccip-DFl4XluK.js → ccip-BlzuXBcO.js} +1 -1
- package/assets/{ccip-BO523Iyo.js → ccip-D7pzspy6.js} +1 -1
- package/assets/{chains-B1nqR6QI.js → chains-DjVUcpdx.js} +1 -1
- package/assets/{clsx-CdAehort.js → clsx-DwIdSwcx.js} +2 -2
- package/assets/{common-D06fGQP-.js → common-BzdjGk0Y.js} +1 -1
- package/assets/{controller--bXZwMEA.js → controller-BJZNt1wD.js} +2 -2
- package/assets/{core-BBTEsxmO.js → core-FKpkmBFa.js} +4 -4
- package/assets/{createSvgIcon-CthtS2fU.js → createSvgIcon-DGQlBR6A.js} +2 -2
- package/assets/{custom-CsWArT5d.js → custom-CIyThiRk.js} +1 -1
- package/assets/{data-capture-kKOdMtvw.js → data-capture-CfDNvCcR.js} +1 -1
- package/assets/decimals-CTAJwKFW.js +1 -0
- package/assets/{decimals-DxZ5UHfB.js → decimals-rMqzXjFU.js} +1 -1
- package/assets/{detectExtension-FEABfJC9.js → detectExtension-0JcORGBX.js} +1 -1
- package/assets/{email-vr9UbC4V.js → email-KcRIrjEE.js} +1 -1
- package/assets/{embedded-wallet-DFmANWep.js → embedded-wallet-Ce1sNhFM.js} +1 -1
- package/assets/{emotion-styled.browser.esm-BjmVKpEM.js → emotion-styled.browser.esm-Cz2UYW4L.js} +1 -1
- package/assets/{engine-CIkOAXtz.js → engine-CrjpfCPZ.js} +1 -1
- package/assets/{errors-BHFRAZhi.js → errors-D5A1rAhl.js} +1 -1
- package/assets/estimate-l1-fee-Dl1G4kze.js +1 -0
- package/assets/eth_estimateGas-BfIHMLbI.js +1 -0
- package/assets/{eth_getStorageAt-DTRcHmRI.js → eth_getStorageAt-DIGus6Ic.js} +1 -1
- package/assets/eth_getTransactionCount-CmmgCgZ1.js +1 -0
- package/assets/{ethereum-BtCbkX0F.js → ethereum-7duKFA0R.js} +1 -1
- package/assets/{ethers-C3WgUna9.js → ethers-CpLYx0ea.js} +1 -1
- package/assets/{execute-DXk7xWDJ.js → execute-CiexXudY.js} +2 -2
- package/assets/{extractIPFS-CSmwBy8V.js → extractIPFS-CTs5XnuT.js} +1 -1
- package/assets/{features-CB_msUrB.js → features-DsYpCrnC.js} +1 -1
- package/assets/{fetchTokenMetadata-BonBD4HK.js → fetchTokenMetadata-DWypYxbA.js} +2 -2
- package/assets/{fortmatic-ClwQlaPX.js → fortmatic-CCMQbesB.js} +1 -1
- package/assets/{get-bytecode-DKGahtxz.js → get-bytecode-Bg8NviKV.js} +1 -1
- package/assets/get-ecosystem-wallet-info-DZWKxVA6.js +1 -0
- package/assets/{getBalance-CthDORPr.js → getBalance-Cz6bGYhR.js} +2 -2
- package/assets/{getInstalledModules-Cox2YDyF.js → getInstalledModules-KP-LSI0j.js} +1 -1
- package/assets/{getNFT-Bjg_w6DD.js → getNFT-720NoLwo.js} +2 -2
- package/assets/getNFT-BZS561d1.js +1 -0
- package/assets/{getThemeProps-B7lAOokG.js → getThemeProps-FLQVbLMg.js} +1 -1
- package/assets/{grid.styles-BWHADUFG.js → grid.styles-DtrFzApp.js} +1 -1
- package/assets/{hashTypedData-D3KNbXgE.js → hashTypedData-BILWs9dJ.js} +1 -1
- package/assets/{hashTypedData-BXeSV9EI.js → hashTypedData-DCSgTQmF.js} +1 -1
- package/assets/{import-C0ulsb8r.js → import-BJPDoosw.js} +1 -1
- package/assets/{in-app-8FmH0RQh.js → in-app-NKvMMEfv.js} +1 -1
- package/assets/{in-app-wallet-calls-BFluJbdo.js → in-app-wallet-calls-BajxVBH8.js} +1 -1
- package/assets/{index-M0lk4EtX.js → index-3x98-rKq.js} +1 -1
- package/assets/{index-CuZV-f-I.js → index-8EYFemjW.js} +1 -1
- package/assets/{index-BO_zSTNJ.js → index-8_bleNab.js} +1 -1
- package/assets/index-9H7pG6F1.js +1 -0
- package/assets/{index-C7NK0fVJ.js → index-B-Kqr2Lr.js} +1 -1
- package/assets/{index-D8AjAhj_.js → index-B0bMnciA.js} +1 -1
- package/assets/{index-CnNIEazo.js → index-B1lZILIS.js} +1 -1
- package/assets/{index-CnxZGgAx.js → index-B37cKX5v.js} +1 -1
- package/assets/{index-cZ6tjlq1.js → index-B7EC32ed.js} +1 -1
- package/assets/{index-DH1wbhHD.js → index-B7ResnK5.js} +1 -1
- package/assets/{index-CUCrSrys.js → index-B7orTJ4q.js} +1 -1
- package/assets/{index-C80znnDW.js → index-B8RL4ysF.js} +1 -1
- package/assets/{index-DN4XOFSE.js → index-BJQJ6qaf.js} +1 -1
- package/assets/{index-DX3DHT9n.js → index-BJsueJq0.js} +1 -1
- package/assets/{index-BD3ZPd_8.js → index-BQAp3En-.js} +1 -1
- package/assets/{index-C29PIOfp.js → index-BSDt-TOn.js} +1 -1
- package/assets/{index-CDf3efkp.js → index-BSxUgJbK.js} +2 -2
- package/assets/{index-DuM4noYk.js → index-BgYtilT2.js} +1 -1
- package/assets/{index-B6O6tYQ5.js → index-BqEB64AU.js} +3 -3
- package/assets/{index-VW-lnGw2.js → index-BsH-rkvg.js} +1 -1
- package/assets/{index-Bhux6d7O.js → index-BsS1iZx_.js} +1 -1
- package/assets/{index-DNViA462.js → index-C1GOiHEJ.js} +1 -1
- package/assets/{index-12wxaJ06.js → index-C51fg_o7.js} +1 -1
- package/assets/{index-DMlCumM5.js → index-C6zvyoZv.js} +1 -1
- package/assets/{index-C76nP1O6.js → index-C8fZFdzo.js} +1 -1
- package/assets/{index-rLHhvU40.js → index-CDkwk3uv.js} +2 -2
- package/assets/{index-CgvLEwoy.js → index-CI5h_2tO.js} +1 -1
- package/assets/{index-CyiPWf5n.js → index-CK7WvZif.js} +1 -1
- package/assets/{index-cfvsnH5y.js → index-CKJj9-cA.js} +1 -1
- package/assets/{index-Bycb_NiK.js → index-CMFzXxIX.js} +2 -2
- package/assets/{index-D3kilUkp.js → index-COfMk8pw.js} +1 -1
- package/assets/{index-BUxWfTma.js → index-CcRW7qMf.js} +1 -1
- package/assets/{index-Cq2ACCOS.js → index-Cg9dnh8b.js} +1 -1
- package/assets/{index-B17_4zRY.js → index-ChU8wlCy.js} +1 -1
- package/assets/{index-DkOjkCdA.js → index-CjOntfrV.js} +1 -1
- package/assets/{index-3AqvKhGz.js → index-CkYD3Y0h.js} +1 -1
- package/assets/{index-9-Neoanw.js → index-CrcHD3o5.js} +1 -1
- package/assets/{index-Brd7ji4Z.js → index-Czb_P6bY.js} +602 -480
- package/assets/{index-C4j5Yt0J.js → index-D1allDkb.js} +1 -1
- package/assets/{index-IwNV31qY.js → index-D3ZrYxPz.js} +1 -1
- package/assets/{index-Cjb2XrcZ.js → index-D4PpnM4d.js} +1 -1
- package/assets/{index-Dig_dNhS.js → index-DAgJW1gr.js} +1 -1
- package/assets/{index-DoxTF6om.js → index-DBaksDK_.js} +1 -1
- package/assets/{index-JCA7K3yc.js → index-DCNThdFK.js} +1 -1
- package/assets/{index-CAnUnOx3.js → index-DCYqHavJ.js} +1 -1
- package/assets/{index-pYqFSwbF.js → index-DQXbQePN.js} +2 -2
- package/assets/{index-PPPdjER1.js → index-DVmEcWE3.js} +3 -3
- package/assets/{index-CBA5ujss.js → index-DWqBh31y.js} +1 -1
- package/assets/{index-C2y7hJrh.js → index-DbGOPqdW.js} +1 -1
- package/assets/{index-CMZZ1Nga.js → index-DecjPWBu.js} +1 -1
- package/assets/{index-kLxn63lr.js → index-DgMAf2q5.js} +1 -1
- package/assets/{index-Bsc1WoyD.js → index-DiTVVm7E.js} +1 -1
- package/assets/{index-DdfWi7TC.js → index-DjEA7xwB.js} +1 -1
- package/assets/{index-C1OJ-tO9.js → index-DlkFYSp0.js} +1 -1
- package/assets/{index-BWWTHnLr.js → index-DppjTFXj.js} +1 -1
- package/assets/{index-DV8kBwEP.js → index-Drskl51X.js} +1 -1
- package/assets/{index-DLXZ5p81.js → index-DutOGRmD.js} +1 -1
- package/assets/{index-CFTDHoZh.js → index-DyW_Wdzl.js} +1 -1
- package/assets/{index-DwMtnb8J.js → index-DzIOprpI.js} +1 -1
- package/assets/{index-CyJEkuRi.js → index-Fyrl3bgj.js} +1 -1
- package/assets/{index-ce0Tcydb.js → index-KcjPp4F-.js} +3 -3
- package/assets/index-YUVIXaKh.css +1 -0
- package/assets/{index-BEgz8ixE.js → index-hV1Yn1B5.js} +1 -1
- package/assets/{index-CUa9_lhM.js → index-qU86FliS.js} +1 -1
- package/assets/{index.es-CO16vBVD.js → index.es-BdQmhh-2.js} +1 -1
- package/assets/{index.es-BTrwCm6j.js → index.es-BowEO4n4.js} +1 -1
- package/assets/{index.es-ZvhCWtmg.js → index.es-nVYBSx0q.js} +4 -4
- package/assets/{linkAccount-D6C-iWP9.js → linkAccount-D303ryxj.js} +1 -1
- package/assets/{localBatchGatewayRequest-D0lgdcRM.js → localBatchGatewayRequest-BKtZM-Qe.js} +1 -1
- package/assets/{mana-convert-BSx_Udpc.js → mana-convert-BKXDkQzP.js} +1 -1
- package/assets/{mana-rate-BZhaJjml.js → mana-rate-EViaZGqN.js} +1 -1
- package/assets/{native-DzURTJjQ.js → native-BbO8hggJ.js} +1 -1
- package/assets/{networks-DPBJRt6B.js → networks-CNY8UPfr.js} +1 -1
- package/assets/{onramp-D-V8FIFR.js → onramp-DkE5Rw9T.js} +1 -1
- package/assets/{openzeppelin-B7Q08QJ0.js → openzeppelin-DxhZ29H0.js} +1 -1
- package/assets/{ownerOf-6qjJmcwz.js → ownerOf-B0AowHTZ.js} +1 -1
- package/assets/{parseNft-CZxwd5ZF.js → parseNft-zmNDvjeQ.js} +2 -2
- package/assets/{parseSignature-3qwrNvoW.js → parseSignature-C1Ay4M4x.js} +1 -1
- package/assets/{parseSignature-CtyJ-6L0.js → parseSignature-D0zZ_iJp.js} +3 -3
- package/assets/{passkeys-Cj0tHoDP.js → passkeys-DfCeNvv_.js} +1 -1
- package/assets/{pay-with-exchange-B3f1_w5e.js → pay-with-exchange-CjKH2Vnu.js} +1 -1
- package/assets/{prepare-contract-call-ydWcAfZ2.js → prepare-contract-call-BreQKHF6.js} +1 -1
- package/assets/{qr-overlay-DWPthnKn.js → qr-overlay-DKcOFez0.js} +3 -3
- package/assets/{react-CDiFgvN_.js → react-vyZjIDcS.js} +1 -1
- package/assets/{receive-CsXmvAKt.js → receive-B1DDFUkH.js} +1 -1
- package/assets/{resolveImplementation-BOT-NVc7.js → resolveImplementation-kR8NFXDP.js} +1 -1
- package/assets/{rpc-DSWXzB82.js → rpc-CzGt6OT0.js} +1 -1
- package/assets/{secp256k1-ByXzWbcW.js → secp256k1-B2x_fUXG.js} +1 -1
- package/assets/{secp256k1-uUJiV589.js → secp256k1-DZ44C2PU.js} +1 -1
- package/assets/{secp256k1-BaOo-or_.js → secp256k1-Dar84kjJ.js} +1 -1
- package/assets/{send-C05YEc1T.js → send-Cx4AaCX3.js} +1 -1
- package/assets/{send-batch-transaction-Be0wAoEe.js → send-batch-transaction-Bf0o63Vf.js} +1 -1
- package/assets/{send-eip712-transaction-BJNkYYKf.js → send-eip712-transaction-Bivcwwzr.js} +2 -2
- package/assets/send-gasless-transaction-Dh3lQi9l.js +2 -0
- package/assets/{send-transaction-Bes27L5G.js → send-transaction-D9t290rO.js} +2 -2
- package/assets/{sendMetaTransaction-CDDozl0u.js → sendMetaTransaction-C0YDqCJk.js} +1 -1
- package/assets/{sendRawTransaction-CaQYbFlQ.js → sendRawTransaction-BL7dRGJ_.js} +3 -3
- package/assets/{sentry-DGsLxYkt.js → sentry-B35L1FdR.js} +1 -1
- package/assets/{serializeTransaction-DLXlE_fY.js → serializeTransaction-jsQLtetC.js} +1 -1
- package/assets/{session-proposal-269TY8JU.js → session-proposal-DMe52htu.js} +1 -1
- package/assets/{session-request-DxaePUXl.js → session-request-CvcdX1D8.js} +2 -2
- package/assets/{sha256-BkM0tz1g.js → sha256-NdAeiB0X.js} +1 -1
- package/assets/{signing-ZKf523YR.js → signing-C5rH_Fds.js} +3 -3
- package/assets/{socials-JFjng574.js → socials-DGbsF9Wj.js} +1 -1
- package/assets/{swaps-Cq3Wdoki.js → swaps-BFA3CceQ.js} +1 -1
- package/assets/{thirdweb-BNmNZhah.js → thirdweb-iDY8G1WY.js} +3 -3
- package/assets/{to-serializable-transaction-PJm0PzIG.js → to-serializable-transaction-BG0Kqkd3.js} +2 -2
- package/assets/{totalSupply-C71_H-lN.js → totalSupply-BVfGieGk.js} +1 -1
- package/assets/{trade-encoding-BmLGOyo-.js → trade-encoding-GuhikRmN.js} +1 -1
- package/assets/{transaction-DLOHYmaw.js → transaction-8aHmZ7ni.js} +1 -1
- package/assets/{transactionReceipt-CSJT-pKm.js → transactionReceipt-cJ7HWOtq.js} +1 -1
- package/assets/{transactions-DDewGRUS.js → transactions-C16e5T9v.js} +1 -1
- package/assets/{useCreditPacks-Bqe9pTXx.js → useCreditPacks-DZTzWK5B.js} +1 -1
- package/assets/{useInfiniteGrid-C1qvdQfd.js → useInfiniteGrid-C3613jLi.js} +1 -1
- package/assets/useManaRate-CYlUk99_.js +1 -0
- package/assets/{useSecondarySales-CVaNw0md.js → useSecondarySales-DuNNHIPd.js} +1 -1
- package/assets/{useStore-oZmFLyam.js → useStore-BTXlSV66.js} +2 -2
- package/assets/useTheme-CIMhjSM_.js +1 -0
- package/assets/{utils-a6twR_kC.js → utils-jd03xFBb.js} +1 -1
- package/assets/{verifyHash-BPxoGPRB.js → verifyHash-_9QIIq3n.js} +1 -1
- package/assets/{w3m-modal-BKND42Yg.js → w3m-modal-Cn_rTfFF.js} +1 -1
- package/assets/{w3m-modal-B7e4dFsC.js → w3m-modal-Ozmvjq7b.js} +1 -1
- package/assets/{wait-for-tx-receipt-Dkm_Ycmc.js → wait-for-tx-receipt-BuZtG6lp.js} +1 -1
- package/assets/{wallets-Dcnx0DBg.js → wallets-Du25_N-1.js} +5 -5
- package/assets/{web-connector-B41jHtWN.js → web-connector-CWWf4u_L.js} +3 -3
- package/assets/{writeContract-BBk0XlYd.js → writeContract-DIiudXie.js} +1 -1
- package/assets/{zora-sepolia-o_iB8zm8.js → zora-sepolia-Bt1F-uU9.js} +1 -1
- package/assets/{zoraTestnet-AMJQiMJL.js → zoraTestnet-B26jFGGx.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Creator-BPKqpaQ0.js +0 -283
- package/assets/Tooltip-azUGAy-5.js +0 -48
- package/assets/browser-ponyfill-U6QFC0pq.js +0 -1
- package/assets/decimals-2E8lbkVo.js +0 -1
- package/assets/estimate-l1-fee-DKfVBk0L.js +0 -1
- package/assets/eth_estimateGas-CYhr9GQg.js +0 -1
- package/assets/eth_getTransactionCount-ZhW4UX5p.js +0 -1
- package/assets/get-ecosystem-wallet-info-B_lrKX-x.js +0 -1
- package/assets/getNFT-BTjqjEEe.js +0 -1
- package/assets/index-867E6STW.js +0 -1
- package/assets/index-DCpWUtOQ.css +0 -1
- package/assets/send-gasless-transaction-ytRd_Rwn.js +0 -2
- package/assets/useManaRate-LgUHZXYp.js +0 -1
- package/assets/useTheme-1sGnebNp.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as e,L as _,
|
|
1
|
+
import{r as b,j as e,L as _,d as dt}from"./react-vyZjIDcS.js";import{aE as lt,s as l,t as o,w as ut,B as ht,l as xt,d,m as pt,u as j,I as g,aF as G,aG as R,aH as mt,y as v,aI as gt,al as E,z as Q,H as ft,aJ as yt,aK as X}from"./index-Czb_P6bY.js";import{m as bt}from"./mana-convert-BKXDkQzP.js";import{u as jt}from"./useManaRate-CYlUk99_.js";import{L as vt}from"./LoadMore-CbGw7_AZ.js";import{u as f}from"./useInfiniteGrid-C3613jLi.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-rate-EViaZGqN.js";const kt=15e3;function wt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=kt}function It(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&wt(n[n.length-1],a)?n.push(a):s.push([a])}return s.map(a=>{var n;return{id:((n=a.find(c=>c.txHash))==null?void 0:n.txHash)??a[a.length-1].id,createdAt:Math.max(...a.map(c=>c.createdAt)),status:a.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:a.reduce((c,h)=>c+h.credits,0),lines:a}})}function At(t){const i=[],s=new Map;for(const a of t)if(a.tradeId){const n=s.get(a.tradeId);if(n){n.quantity+=1,n.credits+=a.credits;continue}const c={key:a.tradeId,tradeId:a.tradeId,quantity:1,credits:a.credits};s.set(a.tradeId,c),i.push(c)}else i.push({key:a.id,tradeId:null,quantity:1,credits:a.credits});return i}function $t(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?bt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Pt(t){const s=It(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),a=t.sales.map(r=>{const x=$t(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...a,...n,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Lt(t,i){return i==="all"?t:i==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Nt(t){const i=new Map;for(const s of t??[]){const a=J(s.txHash??"");if(!a)continue;const n=i.get(a);n?n.push(s):i.set(a,[s])}return i}function Et(t,i,s=Date.now()){const a=i.txHash?t.get(J(i.txHash)):void 0;if(!a||a.length===0)return{kind:"direct"};const n=a.length===1?Tt(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:h}}function Tt(t){return lt(t)}const Ct="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/credits-product-vs4Q6u6l.svg",T=ut`
|
|
2
2
|
0% { background-position: 200% 0; }
|
|
3
3
|
100% { background-position: -200% 0; }
|
|
4
4
|
`,Ft=l.section`
|
|
@@ -14,13 +14,13 @@ import{r as b,j as e,L as _,e as dt}from"./react-CDiFgvN_.js";import{aB as lt,s
|
|
|
14
14
|
align-items: baseline;
|
|
15
15
|
gap: 12px;
|
|
16
16
|
margin-bottom: 20px;
|
|
17
|
-
`,
|
|
17
|
+
`,Mt=l.h1`
|
|
18
18
|
font-family: ${o.font.sans};
|
|
19
19
|
margin: 0;
|
|
20
20
|
`;l.span`
|
|
21
21
|
color: ${o.colors.muted};
|
|
22
22
|
font-size: 14px;
|
|
23
|
-
`;const
|
|
23
|
+
`;const Dt=l.div`
|
|
24
24
|
display: flex;
|
|
25
25
|
gap: 8px;
|
|
26
26
|
margin-bottom: 20px;
|
|
@@ -150,7 +150,7 @@ import{r as b,j as e,L as _,e as dt}from"./react-CDiFgvN_.js";import{aB as lt,s
|
|
|
150
150
|
&[data-kind='income'] {
|
|
151
151
|
color: ${o.colors.okStrong};
|
|
152
152
|
}
|
|
153
|
-
`,
|
|
153
|
+
`,Z=l.img`
|
|
154
154
|
width: 16px;
|
|
155
155
|
height: 16px;
|
|
156
156
|
vertical-align: -0.15em;
|
|
@@ -225,12 +225,12 @@ import{r as b,j as e,L as _,e as dt}from"./react-CDiFgvN_.js";import{aB as lt,s
|
|
|
225
225
|
@media (prefers-reduced-motion: reduce) {
|
|
226
226
|
animation: none;
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,M=l.div`
|
|
229
229
|
min-width: 0;
|
|
230
230
|
display: flex;
|
|
231
231
|
flex-direction: column;
|
|
232
232
|
gap: 2px;
|
|
233
|
-
`,
|
|
233
|
+
`,D=l.span`
|
|
234
234
|
font-weight: 700;
|
|
235
235
|
white-space: nowrap;
|
|
236
236
|
overflow: hidden;
|
|
@@ -288,4 +288,4 @@ import{r as b,j as e,L as _,e as dt}from"./react-CDiFgvN_.js";import{aB as lt,s
|
|
|
288
288
|
margin: 6px 0 0;
|
|
289
289
|
`,Bt=l(ht)`
|
|
290
290
|
margin-top: 12px;
|
|
291
|
-
`,q=N.withComponent(_),y=24,Gt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var h;const c=(h=i.current)==null?void 0:h.getBoundingClientRect();c&&a({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:i,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>a(null),onFocus:n,onBlur:()=>a(null),children:[t,s?dt.createPortal(e.jsx(Ot,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Rt({item:t}){const{data:i,isLoading:s}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>yt(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),a=!!t.tradeId&&s,n=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",h=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(S,{}):e.jsx(F,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(
|
|
291
|
+
`,q=N.withComponent(_),y=24,Gt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var h;const c=(h=i.current)==null?void 0:h.getBoundingClientRect();c&&a({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:i,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>a(null),onFocus:n,onBlur:()=>a(null),children:[t,s?dt.createPortal(e.jsx(Ot,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Rt({item:t}){const{data:i,isLoading:s}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>yt(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),a=!!t.tradeId&&s,n=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",h=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(S,{}):e.jsx(F,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Wt,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return h?e.jsx(q,{to:h,"data-link":"true",children:r}):e.jsx(N,{children:r})}function Kt({order:t}){const i=At(t.lines),s=i.reduce((a,n)=>a+n.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(a=>e.jsx(Rt,{item:a},a.key))})]})}function Ut({sale:t}){const{data:i,isLoading:s}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(i==null?void 0:i.name)??d("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",c=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(S,{}):e.jsx(F,{children:n?e.jsx("img",{src:n,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[s?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:h}):e.jsx(N,{children:h})})]})}function _t({sale:t,payout:i}){const{data:s,isLoading:a}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(S,{}):e.jsx(F,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",ft(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:h?e.jsx(q,{to:h,"data-link":"true",children:r}):e.jsx(N,{children:r})})]})}function Qt({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),a=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(zt,{children:e.jsx("img",{src:Ct,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":s,children:a}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Xt({filter:t}){const i={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(g,{name:i.icon,size:40,color:o.colors.muted2}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Bt,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function oe(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=pt(),[i,s]=b.useState("all"),a=!!t&&i!=="sales",n=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],u=>mt(t.address,t.identity,{first:y,skip:u}),{enabled:a}),h=f(["sales",t==null?void 0:t.address],u=>G(t.address,{role:"seller",first:y,skip:u}),{enabled:n}),r=f(["credit-orders",t==null?void 0:t.address],u=>R(t.address,t.identity,{first:y,skip:u}),{enabled:a}),x=f(["mana-purchases",t==null?void 0:t.address],u=>G(t.address,{role:"buyer",first:y,skip:u}),{enabled:a}),{data:O}=j({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>R(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:n,staleTime:6e4}),at=b.useMemo(()=>Nt(O),[O]),{data:nt}=jt(n);if(!t)return e.jsxs(V,{children:[e.jsx(g,{name:"clock",size:40,color:o.colors.muted2}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const W=Lt(Pt({purchases:a?c.items:[],sales:n?h.items:[],creditOrders:a?r.items:[],manaPurchases:a?x.items:[],rate:nt}),i),st=a&&(c.isLoading||r.isLoading||x.isLoading)||n&&h.isLoading,B=a&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||n&&h.isFetchingNextPage,rt=a&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||n&&h.hasNextPage;function ot(){a&&c.hasNextPage&&c.fetchNextPage(),a&&r.hasNextPage&&r.fetchNextPage(),a&&x.hasNextPage&&x.fetchNextPage(),n&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(Ft,{children:[e.jsx(St,{children:e.jsx(Mt,{children:d("nav.activity")})}),e.jsx(Dt,{role:"tablist","aria-label":d("nav.activity"),children:Gt.map(u=>e.jsx(Ht,{type:"button",role:"tab","aria-selected":i===u,"data-active":i===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),st?e.jsx(K,{children:Array.from({length:5}).map((u,ct)=>e.jsx(U,{},ct))}):W.length===0?e.jsx(Xt,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[W.map(u=>u.kind==="purchase"?e.jsx(Kt,{order:u.order},u.id):u.kind==="credit"?e.jsx(Qt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ut,{sale:u.sale},u.id):e.jsx(_t,{sale:u.sale,payout:Et(at,u.sale)},u.id)),B?e.jsx(U,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:B,onLoadMore:ot})]})]})}export{oe as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-
|
|
1
|
+
import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-Czb_P6bY.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ze,r as m,j as e,u as Ve}from"./react-
|
|
1
|
+
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq as Ze,ar as Ke,b as Je,s as n,t,m as Ie,ai as Qe,D as Xe,H as Ae,x as Ye,d as s,I as R,y as W,aN as he,an as J,au as et,at as tt,l as Ne,n as nt,S as fe,A as O,aO as st,aP as ot}from"./index-Czb_P6bY.js";import{u as it}from"./useSecondarySales-DuNNHIPd.js";import{a as rt,m as Me}from"./mana-convert-BKXDkQzP.js";import{u as Pe}from"./useManaRate-CYlUk99_.js";import{g as at,h as lt,i as ct,j as dt,k as pt,C as xt,l as ht,o as ft,m as mt,n as ut,M as gt,p as bt,E as yt,q as wt,r as jt,s as vt,t as $t,u as Ct,v as kt}from"./Assets.styles-DXfpYzAi.js";import{c as me,R as St,F as Et,S as Rt}from"./categories-fg4FNysa.js";import{L as Tt}from"./LoadMore-CbGw7_AZ.js";import{u as _t}from"./useInfiniteGrid-C3613jLi.js";import{E as zt}from"./ErrorNotice-AcMffEAY.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{s as At,G as Nt,w as Mt,S as Pt}from"./buy-gasless-DNXWk0IK.js";import{s as Wt}from"./buy-YzKhoSZr.js";import{i as Bt}from"./trade-encoding-GuhikRmN.js";import{r as Ft}from"./mana-rate-EViaZGqN.js";import{f as Lt}from"./errors-D5A1rAhl.js";import{J as Ht,C as Ut,B as ee}from"./ethers-CpLYx0ea.js";import{l as Ot}from"./loader-logo-BzY9EKdC.js";import{n as Dt}from"./Tooltip-CaPywNj_.js";import{G as Gt}from"./grid.styles-DtrFzApp.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-CBQpjv0Y.js";import"./sendMetaTransaction-C0YDqCJk.js";function D(o){const i=o.source??"item",l=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${l}`}const F="100000000000000000000",We=2,Q=15,qt=/^[a-zA-Z0-9]+$/;function ue(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:qt.test(i)?i.length<We?{ok:!1,reason:"too-short"}:i.length>Q?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,Q)}const Zt=["function available(string _subdomain) view returns (bool)"],ge={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Kt(){return B.chainId===Number(It.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Jt(o,i={}){var p;const{rpc:l,address:x}=Kt(),c=new Ht(l),d=new Ut(x,Zt,c);console.info(`[names] availability check → DCLRegistrar(${x}).available("${o}") on ${l}`);const h=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${h}`),h?"available":"taken"}const Qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Xt(o){return rt(F,o)}async function Yt(o,i,l={}){var p;const x=l.chainId??B.chainId,c=l.provider??"across",d=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${x}&provider=${c}`,h=await Je(d,{method:"GET",identity:o,metadata:{}});if(!h.ok){let a;try{a=(p=await h.json())==null?void 0:p.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${h.status}`)}return h.json()}function en(o,i){const l=ee.from(o.availableAmount),c=ee.from(F).sub(l);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Bt(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:c.isNegative()?"0":c.toString(),maxCreditedValue:F}}async function tn(o,i={}){const l=Qt,x=i.intervalMs??1e4,c=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let h=0;h<c;h++){try{const p=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const a=await p.json(),u=(a.status??"pending").toLowerCase(),b=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:b,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:b,actionsSucceeded:w}}}catch{}h<c-1&&await new Promise(p=>setTimeout(p,x))}return d}async function nn(o){const{name:i,identity:l,signer:x}=o,c=o.chainId??B.chainId,d=o.provider??"across",h=(o.beneficiary??await x.getAddress()).toLowerCase();let p=null,a=!1;console.info("[names] register start",{name:i,buyer:h,chainId:c,provider:d});try{const u=await Ft(c),b=Xt(u);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:u});const w=await Yt(l,i,{chainId:c,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 Ze(l,b);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ee.from(j.maxCreditedValue).lt(F))throw new Error("Credit under-sized for the name price");const $=en(j.credit,w);let f;try{f=await At({chainId:c,buyer:h,signer:x,args:$})}catch(y){if(!(y instanceof Nt))throw y;f=await Wt(c,$,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Mt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const y=await tn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:f};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:h,originConfirmed:a}),u instanceof Pt)return{status:"pending",originTxHash:u.txHash};if(p&&!a&&await Ke(l,[p]).catch(()=>{}),u instanceof Be)throw u;const b=new Error(Lt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=u,b}}const sn=n.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -366,7 +366,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
366
366
|
flex: none;
|
|
367
367
|
color: ${t.colors.dclRed};
|
|
368
368
|
}
|
|
369
|
-
`;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
369
|
+
`;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/governance-DnazlIjy.webp",In=n.div`
|
|
370
370
|
width: 100%;
|
|
371
371
|
min-width: 0;
|
|
372
372
|
`,An=n.nav`
|
|
@@ -538,7 +538,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
538
538
|
gap: 0;
|
|
539
539
|
cursor: text;
|
|
540
540
|
overflow: hidden;
|
|
541
|
-
`,
|
|
541
|
+
`,Zn=n.span`
|
|
542
542
|
flex: none;
|
|
543
543
|
margin-right: 8px;
|
|
544
544
|
font-family: ${t.font.sans};
|
|
@@ -550,7 +550,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
550
550
|
${t.media.maxWidth("mobile")} {
|
|
551
551
|
font-size: 20px;
|
|
552
552
|
}
|
|
553
|
-
`,
|
|
553
|
+
`,Kn=n.input`
|
|
554
554
|
flex: 0 1 auto;
|
|
555
555
|
min-width: 0;
|
|
556
556
|
max-width: 100%;
|
|
@@ -735,7 +735,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
735
735
|
flex-direction: column;
|
|
736
736
|
gap: 6px;
|
|
737
737
|
padding: 12px 16px;
|
|
738
|
-
`,
|
|
738
|
+
`,Z=n.h3`
|
|
739
739
|
margin: 0;
|
|
740
740
|
font-family: ${t.font.sans};
|
|
741
741
|
font-weight: 700;
|
|
@@ -743,7 +743,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
743
743
|
line-height: 1.57;
|
|
744
744
|
text-transform: uppercase;
|
|
745
745
|
color: ${t.colors.text};
|
|
746
|
-
`,
|
|
746
|
+
`,K=n.p`
|
|
747
747
|
margin: 0;
|
|
748
748
|
font-family: ${t.font.sans};
|
|
749
749
|
font-weight: 400;
|
|
@@ -784,4 +784,4 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-CDiFgvN_.js";import{c as B,aq
|
|
|
784
784
|
clip: rect(0, 0, 0, 0);
|
|
785
785
|
white-space: nowrap;
|
|
786
786
|
border: 0;
|
|
787
|
-
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(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 ds({onBack:o}){Ne({title:s("seo.names.title"),description:s("seo.names.description")});const{session:i,signIn:l}=Ie(),{data:x}=Pe(),c=x?Me(F,x):null,[d,h]=m.useState(""),[p,a]=m.useState("idle"),[u,b]=m.useState(!1),w=m.useRef(null),[j,$]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&$(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ue(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const z=new AbortController,E=setTimeout(()=>{(async()=>{try{const g=await Jt(d,{signal:z.signal});a(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(E),z.abort()}},[d]);const f=ue(d),y=f.ok&&(p==="available"||p==="error");function v(){if(y){if(!i){l();return}b(!0)}}const k=e.jsxs(e.Fragment,{children:[s("names.claim"),c!=null?e.jsxs(Yn,{children:[e.jsx(W,{}),Ae(c)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:o,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Mn,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:s("names.heroTitle")}),e.jsx(Ln,{children:s("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(Un,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Zn,{value:d,onChange:C=>h(Vt(C.target.value)),placeholder:s("names.inputPlaceholder"),"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Q,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||s("names.inputPlaceholder")}),e.jsx(Jn,{children:s("names.suffix")})]}),d.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[d.length,"/",Q]}):null,e.jsx(Fe,{onClick:v,disabled:!y,"data-testid":"names-claim",children:k})]}),p==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(qn,{href:cs(d),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:v,disabled:!y,children:k}),p==="checking"?e.jsx(X,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):p==="error"?e.jsx(X,{tone:"muted",role:"status",children:s("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(X,{tone:"muted",role:"status",children:s("names.tooShort",{min:We})}):null,e.jsx(rs,{role:"status","aria-live":"polite",children:p==="available"?s("names.available",{name:d}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:s("names.whyTitle")}),e.jsx(ss,{children:s("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(G,{children:[e.jsx(q,{src:Rn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why1Title")}),e.jsx(Z,{children:s("names.why1")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:Tn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why2Title")}),e.jsxs(Z,{children:[s("names.why2")," ",e.jsx(is,{children:s("names.why2Address")})]}),e.jsxs(_e,{href:as,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:_n,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why3Title")}),e.jsx(Z,{children:s("names.why3")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:zn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why4Title")}),e.jsx(Z,{children:s("names.why4")}),e.jsxs(_e,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(Sn,{name:d,priceCredits:c,onClose:()=>b(!1)}):null]})}const ps="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",Y=48;function Ps(){const[o]=Ve(),i=ze(),l=(o.get("q")??"").trim().toLowerCase(),x=(o.get("q")??"").trim();Ne({title:x?s("seo.collectibles.searchTitle",{query:x}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const[c,d]=m.useState("wearable"),[h,p]=m.useState(null),[a,u]=m.useState([]),[b,w]=m.useState(""),[j,$]=m.useState(""),[f,y]=m.useState("on_sale"),[v,k]=m.useState(!1),[C,z]=m.useState("newest"),[E,g]=m.useState(!1);m.useEffect(()=>{if(!E)return;const r=N=>{N.key==="Escape"&&g(!1)};document.addEventListener("keydown",r);const S=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=S}},[E]);const I=f==="on_sale",T=b&&!Number.isNaN(Number(b))?Number(b):void 0,M=j&&!Number.isNaN(Number(j))?Number(j):void 0,Le=it(),te=h?Rt[h]:void 0,ne=(me.find(r=>r.key===C)??me[0]).server,se={category:c,rarities:a.length?a:void 0,wearableCategories:te,minPriceCredits:T,maxPriceCredits:M,search:l||void 0,sortBy:ne,isSmart:v||void 0,onSale:!0,listingType:Le?void 0:"primary"},oe={category:c,rarities:a.length?a:void 0,wearableCategories:te,search:l||void 0,sortBy:ne,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:L,total:ie,isLoading:_,isPlaceholderData:A,error:re,hasNextPage:He,isFetchingNextPage:ae,fetchNextPage:Ue}=_t(I?["shop-items",se]:["catalog-items",oe],r=>I?st({...se,first:Y,skip:r}):ot({...oe,first:Y,skip:r}),{enabled:c!=="names"}),H=ie,le=_||A,Oe=_?15:Math.min(Math.max(L.length,1),Y),{data:ce,isError:De}=Pe(),Ge=r=>ce&&r.manaWei?Me(r.manaWei,ce):null,de=m.useRef(null);m.useEffect(()=>{_||A||!l||de.current===l||(de.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,A,H]);const U=m.useRef("__init__");m.useEffect(()=>{if(_||A)return;const r=JSON.stringify({category:c,subCategory:h,rarities:a,min:T,max:M,sort:C,status:f,smart:v});if(U.current==="__init__"||U.current===r){U.current=r;return}U.current=r,J("Shop Applied Filter",{filters:{category:c,sub_category:h,rarities:a,min_price_credits:T??null,max_price_credits:M??null,status:f,smart:v,sort:C},result_count:H})},[c,h,a,T,M,C,f,v,_,A,H]);function pe(r){d(r),p(null)}function xe(r){u(S=>S.includes(r)?S.filter(N=>N!==r):[...S,r])}function qe(){d("wearable"),p(null),u([]),w(""),$(""),y("on_sale"),k(!1)}const P=[];(T!=null||M!=null)&&P.push({key:"price",label:s("filter.price"),onRemove:()=>{w(""),$("")}});for(const r of St)a.includes(r)&&P.push({key:`rarity-${r}`,label:nt(r),onRemove:()=>xe(r)});return v&&P.push({key:"smart",label:s("filter.smart"),onRemove:()=>k(!1)}),f!=="on_sale"&&P.push({key:"status",label:f==="all"?s("filter.statusAll"):s("filter.notForSale"),onRemove:()=>y("on_sale")}),e.jsxs(at,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[E?e.jsx(lt,{onClick:()=>g(!1),"aria-hidden":!0}):null,e.jsxs(ct,{"data-open":E||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(dt,{children:[e.jsx(pt,{children:s("assets.filters")}),e.jsx(xt,{onClick:()=>g(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(ft,{category:c,subCategory:h,onCategory:pe,onSub:p,priceMin:b,priceMax:j,onPriceMin:w,onPriceMax:$,rarities:a,onToggleRarity:xe,status:f,onStatus:y,smart:v,onSmart:k})}),e.jsx(mt,{children:e.jsx(ut,{type:"button",onClick:()=>g(!1),children:s("assets.showItems")})})]})]}),e.jsx(gt,{children:c==="names"?e.jsx(ds,{onBack:()=>pe("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Et,{sort:C,onSort:z,total:ie,loading:_||A,query:l,onOpenFilters:()=>g(!0),chips:P,onClearChips:qe}),De&&I&&L.some(r=>r.source==="legacy")?e.jsx(bt,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,re?e.jsx(zt,{message:s("assets.loadError"),testId:"browse-error"}):null,!le&&L.length===0&&!re?e.jsxs(yt,{"data-testid":"browse-empty",children:[e.jsx(wt,{src:ps,alt:""}),e.jsxs(jt,{children:[e.jsx(vt,{children:s("assets.empty.title")}),e.jsx($t,{children:x?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:x}),s("assets.empty.searchAfter")]}):s("assets.empty.filters")})]}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>i("/overview"),children:s("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Gt,{"data-testid":"grid",children:le?e.jsx(fe,{count:Oe}):e.jsxs(e.Fragment,{children:[L.map(r=>{if(!I)return e.jsx(O,{item:r,mode:"view"},D(r));const S=r;if(S.source!=="legacy")return e.jsx(O,{item:r},D(r));const N=Ge(S);return N==null?e.jsx(O,{item:r,mode:"view"},D(r)):e.jsx(O,{item:{...S,priceCredits:N}},D(r))}),ae?e.jsx(fe,{count:6}):null]})}),e.jsx(Tt,{hasNextPage:He,isFetching:ae,onLoadMore:()=>void Ue()})]})]})})]})}export{Ps as Assets};
|
|
787
|
+
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(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 ds({onBack:o}){Ne({title:s("seo.names.title"),description:s("seo.names.description")});const{session:i,signIn:l}=Ie(),{data:x}=Pe(),c=x?Me(F,x):null,[d,h]=m.useState(""),[p,a]=m.useState("idle"),[u,b]=m.useState(!1),w=m.useRef(null),[j,$]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&$(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ue(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const z=new AbortController,E=setTimeout(()=>{(async()=>{try{const g=await Jt(d,{signal:z.signal});a(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(E),z.abort()}},[d]);const f=ue(d),y=f.ok&&(p==="available"||p==="error");function v(){if(y){if(!i){l();return}b(!0)}}const k=e.jsxs(e.Fragment,{children:[s("names.claim"),c!=null?e.jsxs(Yn,{children:[e.jsx(W,{}),Ae(c)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:o,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Mn,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:s("names.heroTitle")}),e.jsx(Ln,{children:s("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(Un,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Kn,{value:d,onChange:C=>h(Vt(C.target.value)),placeholder:s("names.inputPlaceholder"),"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Q,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||s("names.inputPlaceholder")}),e.jsx(Jn,{children:s("names.suffix")})]}),d.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[d.length,"/",Q]}):null,e.jsx(Fe,{onClick:v,disabled:!y,"data-testid":"names-claim",children:k})]}),p==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(qn,{href:cs(d),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:v,disabled:!y,children:k}),p==="checking"?e.jsx(X,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):p==="error"?e.jsx(X,{tone:"muted",role:"status",children:s("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(X,{tone:"muted",role:"status",children:s("names.tooShort",{min:We})}):null,e.jsx(rs,{role:"status","aria-live":"polite",children:p==="available"?s("names.available",{name:d}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:s("names.whyTitle")}),e.jsx(ss,{children:s("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(G,{children:[e.jsx(q,{src:Rn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why1Title")}),e.jsx(K,{children:s("names.why1")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:Tn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why2Title")}),e.jsxs(K,{children:[s("names.why2")," ",e.jsx(is,{children:s("names.why2Address")})]}),e.jsxs(_e,{href:as,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:_n,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why3Title")}),e.jsx(K,{children:s("names.why3")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:zn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why4Title")}),e.jsx(K,{children:s("names.why4")}),e.jsxs(_e,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(Sn,{name:d,priceCredits:c,onClose:()=>b(!1)}):null]})}const ps="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",Y=48;function Ps(){const[o]=Ve(),i=ze(),l=(o.get("q")??"").trim().toLowerCase(),x=(o.get("q")??"").trim();Ne({title:x?s("seo.collectibles.searchTitle",{query:x}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const[c,d]=m.useState("wearable"),[h,p]=m.useState(null),[a,u]=m.useState([]),[b,w]=m.useState(""),[j,$]=m.useState(""),[f,y]=m.useState("on_sale"),[v,k]=m.useState(!1),[C,z]=m.useState("newest"),[E,g]=m.useState(!1);m.useEffect(()=>{if(!E)return;const r=N=>{N.key==="Escape"&&g(!1)};document.addEventListener("keydown",r);const S=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=S}},[E]);const I=f==="on_sale",T=b&&!Number.isNaN(Number(b))?Number(b):void 0,M=j&&!Number.isNaN(Number(j))?Number(j):void 0,Le=it(),te=h?Rt[h]:void 0,ne=(me.find(r=>r.key===C)??me[0]).server,se={category:c,rarities:a.length?a:void 0,wearableCategories:te,minPriceCredits:T,maxPriceCredits:M,search:l||void 0,sortBy:ne,isSmart:v||void 0,onSale:!0,listingType:Le?void 0:"primary"},oe={category:c,rarities:a.length?a:void 0,wearableCategories:te,search:l||void 0,sortBy:ne,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:L,total:ie,isLoading:_,isPlaceholderData:A,error:re,hasNextPage:He,isFetchingNextPage:ae,fetchNextPage:Ue}=_t(I?["shop-items",se]:["catalog-items",oe],r=>I?st({...se,first:Y,skip:r}):ot({...oe,first:Y,skip:r}),{enabled:c!=="names"}),H=ie,le=_||A,Oe=_?15:Math.min(Math.max(L.length,1),Y),{data:ce,isError:De}=Pe(),Ge=r=>ce&&r.manaWei?Me(r.manaWei,ce):null,de=m.useRef(null);m.useEffect(()=>{_||A||!l||de.current===l||(de.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,A,H]);const U=m.useRef("__init__");m.useEffect(()=>{if(_||A)return;const r=JSON.stringify({category:c,subCategory:h,rarities:a,min:T,max:M,sort:C,status:f,smart:v});if(U.current==="__init__"||U.current===r){U.current=r;return}U.current=r,J("Shop Applied Filter",{filters:{category:c,sub_category:h,rarities:a,min_price_credits:T??null,max_price_credits:M??null,status:f,smart:v,sort:C},result_count:H})},[c,h,a,T,M,C,f,v,_,A,H]);function pe(r){d(r),p(null)}function xe(r){u(S=>S.includes(r)?S.filter(N=>N!==r):[...S,r])}function qe(){d("wearable"),p(null),u([]),w(""),$(""),y("on_sale"),k(!1)}const P=[];(T!=null||M!=null)&&P.push({key:"price",label:s("filter.price"),onRemove:()=>{w(""),$("")}});for(const r of St)a.includes(r)&&P.push({key:`rarity-${r}`,label:nt(r),onRemove:()=>xe(r)});return v&&P.push({key:"smart",label:s("filter.smart"),onRemove:()=>k(!1)}),f!=="on_sale"&&P.push({key:"status",label:f==="all"?s("filter.statusAll"):s("filter.notForSale"),onRemove:()=>y("on_sale")}),e.jsxs(at,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[E?e.jsx(lt,{onClick:()=>g(!1),"aria-hidden":!0}):null,e.jsxs(ct,{"data-open":E||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(dt,{children:[e.jsx(pt,{children:s("assets.filters")}),e.jsx(xt,{onClick:()=>g(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(ft,{category:c,subCategory:h,onCategory:pe,onSub:p,priceMin:b,priceMax:j,onPriceMin:w,onPriceMax:$,rarities:a,onToggleRarity:xe,status:f,onStatus:y,smart:v,onSmart:k})}),e.jsx(mt,{children:e.jsx(ut,{type:"button",onClick:()=>g(!1),children:s("assets.showItems")})})]})]}),e.jsx(gt,{children:c==="names"?e.jsx(ds,{onBack:()=>pe("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Et,{sort:C,onSort:z,total:ie,loading:_||A,query:l,onOpenFilters:()=>g(!0),chips:P,onClearChips:qe}),De&&I&&L.some(r=>r.source==="legacy")?e.jsx(bt,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,re?e.jsx(zt,{message:s("assets.loadError"),testId:"browse-error"}):null,!le&&L.length===0&&!re?e.jsxs(yt,{"data-testid":"browse-empty",children:[e.jsx(wt,{src:ps,alt:""}),e.jsxs(jt,{children:[e.jsx(vt,{children:s("assets.empty.title")}),e.jsx($t,{children:x?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:x}),s("assets.empty.searchAfter")]}):s("assets.empty.filters")})]}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>i("/overview"),children:s("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Gt,{"data-testid":"grid",children:le?e.jsx(fe,{count:Oe}):e.jsxs(e.Fragment,{children:[L.map(r=>{if(!I)return e.jsx(O,{item:r,mode:"view"},D(r));const S=r;if(S.source!=="legacy")return e.jsx(O,{item:r},D(r));const N=Ge(S);return N==null?e.jsx(O,{item:r,mode:"view"},D(r)):e.jsx(O,{item:{...S,priceCredits:N}},D(r))}),ae?e.jsx(fe,{count:6}):null]})}),e.jsx(Tt,{hasNextPage:He,isFetching:ae,onLoadMore:()=>void Ue()})]})]})})]})}export{Ps as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-
|
|
1
|
+
import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-fg4FNysa.js";import{n as c,T as se}from"./Tooltip-CaPywNj_.js";import{t as e,s as o,I as g,d as s,n as ae,e as v}from"./index-Czb_P6bY.js";const re=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-CDiFgvN_.js";import{R as C,a as oe,C as ie,b a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function Ae(i){var l;for(const h of ie){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(ne,{up:l,size:24,color:e.colors.text});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:a,onClick:h,"aria-expanded":l,"aria-label":f,"data-testid":x,children:[t.jsx(de,{children:i}),a?t.jsx(pe,{children:m}):m]}),!l&&p?t.jsx(xe,{desktopHidden:a,children:p}):null,t.jsx(he,{open:l,desktopStatic:a,children:t.jsx(me,{children:u})})]})}function Oe({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:a,priceMax:x,onPriceMin:f,onPriceMax:u,rarities:m,onToggleRarity:H,status:S,onStatus:B,smart:b,onSmart:D}){const[L,O]=$.useState(!0),[_,M]=$.useState(!0),[Y,K]=$.useState(!1),[U,q]=$.useState(!0),R=a&&!Number.isNaN(Number(a))?Number(a):void 0,z=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=z!=null?Math.min(z,d):d,G=w/d*100,V=y/d*100;function X(n){const r=Math.min(n,y);f(r<=0?"":String(r))}function J(n){const r=Math.max(n,w);u(r>=d?"":String(r))}const Q=l?Ae(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||z!=null?`${a||"0"}-${x||"∞"}`:"",ee=C.filter(n=>m.includes(n)).map(ae).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(re,{children:[t.jsx(j,{title:s("assets.category"),open:L,onToggle:()=>O(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:h,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:_,onToggle:()=>M(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(ge,{children:[t.jsxs(T,{children:[t.jsx(W,{children:s("assets.min")}),t.jsxs(N,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(F,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:a,onChange:n=>f(n.target.value)})]})]}),t.jsx(fe,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(W,{children:s("assets.max")}),t.jsxs(N,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(F,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>u(n.target.value)})]})]})]}),t.jsxs(ue,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:G,maxPct:V,"aria-hidden":!0}),t.jsx(E,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>X(Number(n.target.value))}),t.jsx(E,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs(ye,{children:[t.jsxs(I,{children:[t.jsx(A,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(I,{children:[t.jsx(A,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:Y,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx($e,{"data-testid":"rarity-filter",children:C.map(n=>{const r=m.includes(n);return t.jsxs(ve,{type:"button",selected:r,"aria-pressed":r,onClick:()=>H(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:r?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:r,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>q(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,r])=>t.jsxs(Re,{children:[t.jsx(ze,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>B(n)}),t.jsx(Ce,{children:r})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(We,{children:[t.jsx(Ne,{name:"smart","aria-hidden":!0}),t.jsx(Pe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Fe,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ee,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>D(!b),children:t.jsx(Ie,{on:b})})]})]})}const _e=o.div`
|
|
370
|
+
`,d=1e5;function Ae(i){var l;for(const h of ie){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(ne,{up:l,size:24,color:e.colors.text});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:a,onClick:h,"aria-expanded":l,"aria-label":f,"data-testid":x,children:[t.jsx(de,{children:i}),a?t.jsx(pe,{children:m}):m]}),!l&&p?t.jsx(xe,{desktopHidden:a,children:p}):null,t.jsx(he,{open:l,desktopStatic:a,children:t.jsx(me,{children:u})})]})}function Oe({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:a,priceMax:x,onPriceMin:f,onPriceMax:u,rarities:m,onToggleRarity:H,status:S,onStatus:B,smart:b,onSmart:D}){const[L,O]=$.useState(!0),[_,M]=$.useState(!0),[Y,K]=$.useState(!1),[U,q]=$.useState(!0),R=a&&!Number.isNaN(Number(a))?Number(a):void 0,z=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=z!=null?Math.min(z,d):d,G=w/d*100,V=y/d*100;function X(n){const r=Math.min(n,y);f(r<=0?"":String(r))}function J(n){const r=Math.max(n,w);u(r>=d?"":String(r))}const Q=l?Ae(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||z!=null?`${a||"0"}-${x||"∞"}`:"",ee=C.filter(n=>m.includes(n)).map(ae).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(re,{children:[t.jsx(j,{title:s("assets.category"),open:L,onToggle:()=>O(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:h,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:_,onToggle:()=>M(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(ge,{children:[t.jsxs(T,{children:[t.jsx(W,{children:s("assets.min")}),t.jsxs(N,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(F,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:a,onChange:n=>f(n.target.value)})]})]}),t.jsx(fe,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(W,{children:s("assets.max")}),t.jsxs(N,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(F,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>u(n.target.value)})]})]})]}),t.jsxs(ue,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:G,maxPct:V,"aria-hidden":!0}),t.jsx(E,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>X(Number(n.target.value))}),t.jsx(E,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs(ye,{children:[t.jsxs(I,{children:[t.jsx(A,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(I,{children:[t.jsx(A,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:Y,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx($e,{"data-testid":"rarity-filter",children:C.map(n=>{const r=m.includes(n);return t.jsxs(ve,{type:"button",selected:r,"aria-pressed":r,onClick:()=>H(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:r?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:r,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>q(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,r])=>t.jsxs(Re,{children:[t.jsx(ze,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>B(n)}),t.jsx(Ce,{children:r})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(We,{children:[t.jsx(Ne,{name:"smart","aria-hidden":!0}),t.jsx(Pe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Fe,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0,"data-testid":"smart-hint"})})]}),t.jsx(Ee,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>D(!b),children:t.jsx(Ie,{on:b})})]})]})}const _e=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as q,r as M}from"./react-
|
|
1
|
+
import{j as t,L as q,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,w as I,l as B,d as e,m as F,x as W,I as f,y as G,z as K,u as w,D as P,c as Q,E as k,k as H,o as $}from"./index-Czb_P6bY.js";import{a as O,b as _,c as X,d as J,s as U,f as V}from"./authorizations-CBQpjv0Y.js";import{a as Y}from"./builder-102Lb9G5.js";import{f as Z}from"./errors-D5A1rAhl.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-C0YDqCJk.js";const tt=I`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,it=I`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-
|
|
1
|
+
import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t as ee,s as i,d as a,H as Z,F as Qt,I as R,y as xt,G as ze,l as Kt,ah as q,O as Ze,m as Ut,u as Ot,ai as Ht,D as Vt,aj as Dt,ak as Gt,al as Yt,x as Jt,am as et,an as Q,ao as tt,ap as Xt,k as V,c as at,e as Zt,aq as st,ar as je,as as ke,at as ce,au as nt,g as le,a as ea,C as $e,av as ta}from"./index-Czb_P6bY.js";import{M as aa,S as sa,C as na,H as ia,a as ra,T as oa,X as ca,b as la,B as da,c as ua,d as it,e as ha,f as pe,P as gt,m as mt,g as pa,h as xa,i as ga,j as ft,k as xe,L as ma,l as fa,n as rt,o as ot,W as ya,p as ba,q as va,A as Ca,r as wa,s as ja,t as ka,u as $a,v as Sa,w as Ma,x as Ta,y as Pa,z as za,D as Aa,E as Ia,F as qa,G as Ra,I as _a,J as Ba,K as Se,N as Ea,O as Fa,Q as Wa,R as La,U as ct,V as Na,Y as Qa,Z as Ka,_ as Ua}from"./CollectionCarousel-CTx_WmhK.js";import{u as Oa}from"./useManaRate-CYlUk99_.js";import{r as Ha}from"./mana-rate-EViaZGqN.js";import{i as Va,j as Da,f as Ga,n as Ya,h as Ja,A as Xa}from"./authorizations-CBQpjv0Y.js";import{b as Me}from"./buy-YzKhoSZr.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-DNXWk0IK.js";import{u as ss,M as ns,R as de,r as is,c as rs}from"./useCreditPacks-DZTzWK5B.js";import{l as os}from"./loader-logo-BzY9EKdC.js";import{i as cs,a as ls}from"./errors-D5A1rAhl.js";import{E as ds}from"./ErrorNotice-AcMffEAY.js";import{u as lt}from"./mana-convert-BKXDkQzP.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-GuhikRmN.js";import"./sendMetaTransaction-C0YDqCJk.js";const{colors:D,radius:us}=ee,hs=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -14,6 +14,11 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
gap: 8px;
|
|
17
|
+
/* The list is the modal's elastic region: inside a viewport-capped card it gives up height first, so
|
|
18
|
+
the pack picker, total and Cancel/Buy below it stay on screen without scrolling. The floor is an
|
|
19
|
+
explicit ~one row because a scroll container's automatic minimum size is zero — it would otherwise
|
|
20
|
+
collapse to nothing on a short screen. */
|
|
21
|
+
min-height: 120px;
|
|
17
22
|
max-height: 360px;
|
|
18
23
|
overflow-y: auto;
|
|
19
24
|
width: 100%;
|
|
@@ -53,7 +58,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
53
58
|
font-weight: 700;
|
|
54
59
|
color: ${D.text};
|
|
55
60
|
}
|
|
56
|
-
`,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
61
|
+
`,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-30491920077.commit-b636261/assets/buy-error-22UunaPC.png";function ys(c){const{phase:d,balanceCredits:k,onClose:T}=c,_=d==="processing",F=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),W=d==="processing";return e.jsxs(aa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(sa,{onClick:_?void 0:T,"aria-hidden":!0}),e.jsxs(na,{"data-tall":W||void 0,children:[e.jsxs(ia,{children:[e.jsxs(ra,{children:[e.jsx(oa,{children:F}),!_&&e.jsx(ca,{onClick:T,"aria-label":a("buyModal.close"),children:e.jsx(la,{})})]}),e.jsxs(da,{children:[e.jsx(ua,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(it,{}),e.jsx(ha,{children:Z(k)})]})]}),d==="choose"&&e.jsxs(pe,{children:[e.jsxs(ms,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(it,{}),Z(c.totalCredits??0)]})]}),e.jsx(gt,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const z=mt(c.totalCents??0,c.totalManaWei??0n);return z!=null?a("buyModal.manaRate",{mana:z.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),d==="processing"&&e.jsx(bs,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),d==="nofunds"&&e.jsx(vs,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:T}),d==="error"&&e.jsxs(pe,{children:[e.jsxs(pa,{"data-testid":"buy-error",children:[e.jsx(xa,{src:fs,alt:"",width:64,height:80}),e.jsxs(ga,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:T,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"purple",onClick:c.onRetry??T,children:a("cartCheckout.tryAgain")})]})]})]})]})}function bs({stage:c,step:d,total:k,isSelfCustody:T}){const _=c==="reserving",F=k>0?Math.min(100,Math.round(d/k*100)):0,W=c==="awaiting-signature"?T?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):c==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(pe,{"data-processing":!0,children:[e.jsx(ma,{src:os,alt:"",width:61,height:61}),e.jsx(fa,{children:W}),_?e.jsxs(hs,{children:[e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{"data-step":!0,style:{width:`${F}%`}})}),k>1?e.jsxs(ps,{children:[d,"/",k]}):null]}):e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{})})]})}function vs({lines:c,shortfallCredits:d,packs:k,selectedPack:T,onSelectPack:_,onBuyPacks:F,onCancel:W}){const z=k.find(n=>n.id===T),me=c.reduce((n,I)=>n+(I.quantity??1),0);return e.jsxs(pe,{children:[e.jsxs(ya,{"data-testid":"nofunds-warning",children:[e.jsx(ba,{}),e.jsxs(va,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:me})]})]}),e.jsx(xs,{children:c.map(n=>{const I=n.quantity??1;return e.jsxs(Ca,{children:[e.jsx(wa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(ja,{children:[e.jsxs("div",{children:[e.jsxs(ka,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),I>1?e.jsx(gs,{children:a("cartCheckout.qty",{count:I})}):null]}),n.item.creator?e.jsx($a,{address:n.item.creator}):null]}),e.jsxs(Sa,{children:[e.jsx(Ma,{}),e.jsx("span",{children:Z(n.priceCredits*I)})]})]})]},n.item.id)})}),e.jsx(Ta,{children:k.map(n=>{const I=n.id===T;return e.jsxs(Pa,{"data-testid":"credit-pack","data-on":I||void 0,onClick:()=>_(n.id),children:[e.jsx(za,{}),e.jsx(Aa,{children:Z(n.credits)}),e.jsxs(Ia,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(qa,{children:[e.jsxs(Ra,{children:[e.jsx(_a,{}),e.jsx("span",{children:Z((z==null?void 0:z.credits)??0)})]}),e.jsxs(Ba,{children:["$",((z==null?void 0:z.usd)??0).toFixed(2)]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:W,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"gradient",onClick:F,children:a("buyModal.buy")})]})]})}const{colors:o,gradients:yt,radius:K}=ee,bt="@media (max-width: 1080px)",S="@media (max-width: 880px)",dt=i.div`
|
|
57
62
|
max-width: 1510px;
|
|
58
63
|
margin: 0 auto;
|
|
59
64
|
|
|
@@ -98,12 +103,12 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
98
103
|
}
|
|
99
104
|
`,ht=i.div`
|
|
100
105
|
position: relative;
|
|
101
|
-
`,
|
|
106
|
+
`,ws=i.div`
|
|
102
107
|
min-width: 0;
|
|
103
108
|
display: flex;
|
|
104
109
|
flex-direction: column;
|
|
105
110
|
gap: 12px;
|
|
106
|
-
`,
|
|
111
|
+
`,js=i.div`
|
|
107
112
|
display: flex;
|
|
108
113
|
align-items: center;
|
|
109
114
|
justify-content: space-between;
|
|
@@ -490,7 +495,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
490
495
|
width: 11.31px;
|
|
491
496
|
height: 10.94px;
|
|
492
497
|
background: ${o.text};
|
|
493
|
-
`,
|
|
498
|
+
`,wt=ze`
|
|
494
499
|
display: grid;
|
|
495
500
|
place-items: center;
|
|
496
501
|
width: 24px;
|
|
@@ -507,7 +512,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
507
512
|
cursor: default;
|
|
508
513
|
}
|
|
509
514
|
`,en=i.button`
|
|
510
|
-
${
|
|
515
|
+
${wt};
|
|
511
516
|
|
|
512
517
|
&:hover:not(:disabled) {
|
|
513
518
|
color: ${o.text};
|
|
@@ -516,7 +521,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
516
521
|
color: ${o.dclRed};
|
|
517
522
|
}
|
|
518
523
|
`,tn=i.button`
|
|
519
|
-
${
|
|
524
|
+
${wt};
|
|
520
525
|
|
|
521
526
|
&:hover:not(:disabled) {
|
|
522
527
|
color: ${o.dclRed};
|
|
@@ -636,13 +641,13 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
636
641
|
opacity: 0.6;
|
|
637
642
|
cursor: default;
|
|
638
643
|
}
|
|
639
|
-
`,
|
|
644
|
+
`,jt=ze`
|
|
640
645
|
margin: 0;
|
|
641
646
|
font-size: 13px;
|
|
642
647
|
`,ue=i.p`
|
|
643
|
-
${
|
|
648
|
+
${jt};
|
|
644
649
|
`,xn=i(ds)`
|
|
645
|
-
${
|
|
650
|
+
${jt};
|
|
646
651
|
`,gn=i.div`
|
|
647
652
|
position: relative;
|
|
648
653
|
margin-top: 48px;
|
|
@@ -668,4 +673,4 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-CDiFgvN_.js";import{t
|
|
|
668
673
|
& section {
|
|
669
674
|
margin-top: 0;
|
|
670
675
|
}
|
|
671
|
-
`;function Te(c){if(cs(c))return a("errors.rejected");const d=(c.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Zt.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const mn=12e4;function fn(c){const d=[];return c.unavailable.length&&d.push(a("cart.drop.unavailable",{count:c.unavailable.length})),c.own.length&&d.push(a("cart.drop.own",{count:c.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Pe=c=>c.reduce((d,k)=>d+k.priceCredits*k.quantity,0),he=c=>c.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function En(){Kt({title:a("nav.cart"),noindex:!0});const c=q(t=>t.items),d=q(t=>t.remove),k=q(t=>t.increment),T=q(t=>t.decrement),_=q(t=>t.clear),F=q(t=>t.restore),W=q(t=>t.setFittingOpen),z=Ze(t=>t.items),me=Ze(t=>t.toggle),{session:n,signIn:I}=Ut(),te=ss().packs.slice(0,ns);$.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const kt=c.some(t=>t.category!=="emote"),{data:fe}=Ot({queryKey:["upsell-listings"],queryFn:()=>ta({first:40}),staleTime:6e4}),{data:C}=Ht(n),m=Vt(),U=Lt(),{state:L}=Nt(),[$t,G]=$.useState(null),[Ae,ae]=$.useState(null),[St,A]=$.useState(!1),[P,N]=$.useState(null),Ie=$.useRef(0),[p,b]=$.useState(null),{data:Y}=Dt(n),{data:J}=Oa(!0),[ye,qe]=$.useState(""),X=$.useRef(null),Re=Gt(c),_e=t=>et(Re[t.id]),be=c.filter(_e),ve=c.length>0&&be.length===0,Mt=be.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Tt=c.reduce((t,s)=>t+s.quantity,0),Pt=be.reduce((t,s)=>t+s.quantity,0),Be=P?P.liveTotalCredits:Mt,zt=new Set(c.map(t=>t.id)),Ee=((fe==null?void 0:fe.items)??[]).filter(t=>!zt.has(t.id)).slice(0,12),At=new Map(P==null?void 0:P.buyable.map(t=>[t.item.id,t])),se=(C==null?void 0:C.credits)??0,ne=Be*10,Fe=J?lt(ne,J):0n,ie=Se({priceCents:ne,priceManaWei:Fe,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n}),We=mt(ne,Fe),Le=We!=null?a("buyModal.manaRate",{mana:We.toLocaleString("en",{maximumFractionDigits:2})}):null,It=Xt;function re(t){t(),N(null),ae(null),G(null)}function qt(){b(null),A(!1)}function Ne(t){const s=Pe(t),l=Math.max(0,s-se),r=te.find(u=>u.credits>=l)??te[te.length-1];qe(r.id),Q("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:se,shortfall:l}),b({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:l}),A(!1)}async function Ce(t){if(!n||t.length===0)return;const s=he(t),l=s.map(g=>({...g.item,priceCredits:g.priceCredits})),r=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),u=[];let h="authorize",f=!1;b({phase:"processing",stage:"reserving",step:1,total:s.length});try{const g=[];for(let w=0;w<s.length;w++){const v=s[w];b({phase:"processing",stage:"reserving",step:w+1,total:s.length});try{const{credit:j,maxCreditedValue:H}=await st(n.identity,v.usdCents,v.trade.id);u.push(j.id),g.push({trade:v.trade,credits:[j],maxCreditedValue:H})}catch(j){if(ls(j)){if(u.length){try{await we(n.identity,u)}catch(H){V(H,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}Ne(t);return}throw j}}h="submit";const M=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});let y=[];if(Va())try{y=await Za({purchases:g,buyer:n.address,signer:n.signer,onSigned:M});const v=(await Promise.allSettled(y.map(j=>es(j)))).flatMap(j=>j.status==="rejected"?[j.reason]:[]);if(v.length&&!v.some(j=>j instanceof ts))throw v[0];f=!0}catch(w){if(!(w instanceof as))throw w;y=await Me({purchases:g,buyer:n.address,signer:n.signer,onSigned:M})}else y=await Me({purchases:g,buyer:n.address,signer:n.signer});t.forEach(w=>d(w.item.id)),N(null),Q("Shop Completed Purchase",{...ke(l),payment_type:"credits",no_crypto_step:f,transaction_hash:y[0]??null}),Na(m);const x=X.current;X.current=null,b(null),A(!1);const E={items:r,txHash:y[0]??void 0,settled:!0,...x?{creditsAdded:x}:{}};U("/success",{state:E,replace:!0})}catch(g){if(ce(g)||V(g,{flow:"cart_checkout",step:h,cart_size:t.length}),Q(ce(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:nt(g),value_usd:tt(l.reduce((M,y)=>M+y.priceCredits,0)),cart_size:s.length}),u.length){try{await we(n.identity,u)}catch(M){V(M,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}b({phase:"error",message:Te(g)})}}function Qe(t,s){m.invalidateQueries({queryKey:["usd-balance"]}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["owned-token"]}),m.invalidateQueries({queryKey:["public-token"]}),m.invalidateQueries({queryKey:["item-resales"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]}),m.invalidateQueries({queryKey:["owned-item-count"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]});const l=X.current;X.current=null,b(null),A(!1);const r={items:t,txHash:s[0]??void 0,settled:!0,...l?{creditsAdded:l}:{}};U("/success",{state:r,replace:!0})}function Ke(t,s){ce(t)||V(t,{flow:s,step:"submit"}),Q(ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:nt(t)}),b({phase:"error",message:Te(t)}),A(!1)}async function Rt(t,s){const l=le($e.MANAToken,s),r=le($e.CreditsManager,s);await Ja({auth:{kind:Xa.Allowance,contractAddress:l.address,spenderAddress:r.address,chainId:s},signer:t})}async function Ue(){if(J)return J;try{return await m.fetchQuery({queryKey:["mana-rate",at.chainId],queryFn:()=>Ha(at.chainId),staleTime:6e4})}catch{return}}async function _t(t){const s=he(t).reduce((h,f)=>h+f.usdCents,0),r=(Y??0n)>0n?await Ue():J,u=r?lt(s,r):0n;return{totalCents:s,manaWei:u}}async function Oe(t,s){const l=Pe(t),{totalCents:r,manaWei:u}=await _t(t),h=Se({priceCents:r,priceManaWei:u,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n});if(s&&h.options.some(f=>f.method===s)){if(s==="credits"){Ce(t);return}const{spender:f,chainId:g}=He(s,t);await Ve(f,g,()=>s==="mana"?void De(t):void Ge(t,r,u));return}if(h.options.some(f=>f.method==="mana"||f.method==="combined")){b({phase:"choose",lines:t,totalCents:r,manaWei:u}),A(!1);return}if(C!=null&&C.credits<l){Ne(t);return}Ce(t)}function Bt(t){return Se({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n})}const[je,oe]=$.useState(null);function He(t,s){const l=s[0].trade;return{spender:t==="mana"?le(ea(l.contract),l.chainId).address:le($e.CreditsManager,l.chainId).address,chainId:l.chainId}}async function Ve(t,s,l){const r=Da(s,t),u=n?await Ga(r,n.address).catch(()=>!0):!0;if(Ya(n==null?void 0:n.providerType,u)){A(!1),oe({auth:r,run:l});return}l()}function Et(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:l,manaWei:r}=p;if(t==="credits"){Ce(s);return}const{spender:u,chainId:h}=He(t,s);Ve(u,h,()=>t==="mana"?void De(s):void Ge(s,l,r))}async function De(t){if(!n||t.length===0)return;const s=he(t),l=s.map(h=>({...h.item,priceCredits:h.priceCredits})),r=t.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await Qa({trades:s.map(f=>f.trade),buyer:n.address,signer:n.signer,onSigned:u});t.forEach(f=>d(f.item.id)),N(null),Q("Shop Completed Purchase",{...ke(l),payment_type:"mana",transaction_hash:h[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Qe(r,h)}catch(h){Ke(h,"buy_cart_mana")}}async function Ge(t,s,l){if(!n||t.length===0)return;const r=he(t),u=r.map(x=>({...x.item,priceCredits:x.priceCredits})),h=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),f=Ka(r.map(x=>x.usdCents),(C==null?void 0:C.balanceCents)??0),g=f.reduce((x,E)=>x+E,0),M=Ua(Math.max(0,s-g),s,l),y=[];b({phase:"processing",stage:"reserving",step:1,total:r.length});try{const x=[];for(let v=0;v<r.length;v++){const j=f[v];if(j<=0)continue;b({phase:"processing",stage:"reserving",step:v+1,total:r.length});const{credit:H,maxCreditedValue:Wt}=await st(n.identity,j,r[v].trade.id);y.push(H.id),x.push({trade:r[v].trade,credits:[H],maxCreditedValue:Wt})}r.forEach((v,j)=>{f[j]<=0&&x.push({trade:v.trade,credits:[],maxCreditedValue:"0"})}),x[0]={...x[0],maxCreditedValue:(BigInt(x[0].maxCreditedValue)+M).toString()},await Rt(n.signer,r[0].trade.chainId);const E=()=>b({phase:"processing",stage:"settling",step:r.length,total:r.length});b({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const w=await Me({purchases:x,buyer:n.address,signer:n.signer,onSigned:E});t.forEach(v=>d(v.item.id)),N(null),Q("Shop Completed Purchase",{...ke(u),payment_type:"credits_and_mana",transaction_hash:w[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Qe(h,w)}catch(x){y.length&&(we(n.identity,y).catch(()=>{}),m.invalidateQueries({queryKey:["usd-balance"]})),Ke(x,"buy_cart_combined")}}async function O(t){if(!n){ct({type:"cart-checkout"}),I();return}const s=q.getState().items.filter(_e);if(s.length===0)return;G(null),ae(null),A(!0);const l=s.reduce((r,u)=>r+u.priceCredits*u.quantity,0);Q("Shop Started Checkout",{cart_size:s.length,cart_value_credits:l,cart_value_usd:tt(l),has_sufficient_credits:se>=l});try{const r=await is(s,n.address,It,await Ue()),u=[...r.unavailable,...r.own];if(u.length&&(u.forEach(h=>d(h.id)),ae(fn(r))),r.buyable.length===0){G(a("cart.error.noneAvailable")),N(null);return}if(r.orderChanged){N(r),Ie.current=Date.now();return}await Oe(r.buyable,t)}catch(r){V(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),G(Te(r))}finally{A(!1)}}async function Ye(){if(P){if(!n){ct({type:"cart-checkout"}),I();return}if(Date.now()-Ie.current>mn){N(null),ae(null),await O();return}G(null),Oe(P.buyable)}}async function Ft(){if(ye){try{sessionStorage.setItem(de,JSON.stringify(q.getState().items))}catch{}A(!0);try{const t=await rs(ye,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}U("/credits")}catch(t){try{sessionStorage.removeItem(de)}catch{}V(t,{flow:"cart_buy_credits"}),b({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{A(!1)}}}const Je=$.useRef(!1);$.useEffect(()=>{if(!n||Je.current||!Ea("cart-checkout"))return;Je.current=!0;const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[n]);const Xe=$.useRef(!1);$.useEffect(()=>{if(!(L!=null&&L.resumeCheckout)||Xe.current)return;Xe.current=!0,X.current=L.creditsAdded??null;try{const s=sessionStorage.getItem(de);if(s){sessionStorage.removeItem(de);const l=JSON.parse(s);Array.isArray(l)&&l.length&&F(l)}}catch{}m.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[L==null?void 0:L.resumeCheckout]);const B=St||(p==null?void 0:p.phase)==="processing";return c.length===0&&!p?e.jsx(dt,{children:e.jsxs(ht,{children:[e.jsxs(ut,{onClick:()=>U(-1),type:"button",children:[e.jsx(R,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(ks,{"data-testid":"cart-empty",children:[e.jsx(R,{name:"cart-plus",size:110}),e.jsxs($s,{children:[e.jsx(Ss,{children:a("cart.empty.title")}),e.jsx(Ms,{children:a("cart.empty.body")})]}),e.jsx(Ts,{to:"/assets",children:a("cart.empty.cta")})]})]})}):e.jsxs(dt,{children:[e.jsxs(ht,{children:[e.jsxs(ut,{onClick:()=>U(-1),type:"button",children:[e.jsx(R,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Cs,{children:[e.jsxs(js,{children:[e.jsxs(ws,{children:[e.jsx(Ps,{onClick:()=>U(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(R,{name:"arrow-left"})}),e.jsx(zs,{children:a("cart.panelTitle",{count:Tt})}),kt?e.jsxs(As,{onClick:()=>W(!0),disabled:B,children:[e.jsx(R,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(vt,{children:[e.jsx(Is,{children:c.map(t=>{const s=At.get(t.id),l=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,h=t.quantity,f=typeof t.available=="number"&&h>=t.available,g=l*h,M=!!z[t.id],y=Yt(t),x=Re[t.id],E=!et(x),w=x==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(qs,{"data-unavailable":E||void 0,children:[e.jsxs(Rs,{"data-thumb":!0,children:[y?e.jsx(_s,{to:y,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Bs,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(Es,{children:[e.jsxs(Fs,{"data-desc":!0,children:[y?e.jsx(Ls,{to:y,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Ws,{title:t.name,children:t.name}),t.creator?e.jsx(Ns,{address:t.creator,linkToProfile:!0}):null,u?e.jsxs(Xs,{"data-testid":"cart-creator-tag",children:[e.jsx(Zs,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Qs,{children:E?e.jsxs(e.Fragment,{children:[e.jsxs(Gs,{children:[e.jsx(Ys,{name:"warning-fill",size:24}),w]}),y?e.jsx(Js,{to:y,state:{item:t,tradeId:t.tradeId},children:a("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Ks,{children:[e.jsx(pt,{onClick:()=>re(()=>T(t.id)),disabled:B||h<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Us,{children:h}),e.jsx(pt,{onClick:()=>re(()=>k(t.id)),disabled:B||f,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(Os,{children:[e.jsx(Hs,{})," ",g,r?e.jsx(Vs,{children:t.priceCredits*h}):null]})]})})]}),e.jsxs(Ds,{children:[e.jsx(en,{"data-on":M||void 0,onClick:()=>me(t),"aria-label":M?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:M?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(R,{name:M?"heart-solid":"heart"})}),e.jsx(tn,{onClick:()=>re(()=>d(t.id)),disabled:B,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(R,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(an,{children:e.jsx("button",{className:"link",onClick:()=>re(_),disabled:B,children:a("cart.clearCart")})})]})]}),e.jsxs(sn,{children:[e.jsx(nn,{children:a("cart.purchaseSummary")}),e.jsxs(rn,{children:[e.jsxs(on,{children:[e.jsx(cn,{children:a("cart.totalItems",{count:Pt})}),e.jsxs(dn,{children:[e.jsxs(ln,{children:[e.jsx(hn,{})," ",Be]}),Le&&(Y??0n)>0n?e.jsx(un,{"data-testid":"cart-mana-rate",children:Le}):null]})]}),ie.options.length>0||ie.manaShortfall?e.jsx(gt,{options:ie.options,totalCents:ne,shortfall:ie.manaShortfall,creditsLabel:P?a("marketCheckout.confirmPurchase"):a("cart.buyWithCredits"),busy:B||ve,onPay:t=>void(P?Ye():O(t))}):e.jsx(pn,{onClick:()=>void(P?Ye():O()),disabled:B||ve,children:B?a("cart.working"):P?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),ve?e.jsx(ue,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(ue,{className:"muted",children:a("cart.signInHint")}),P?e.jsx(ue,{className:"muted",children:a("cart.priceChanged")}):null,Ae?e.jsx(ue,{className:"muted",children:Ae}):null,e.jsx(xn,{message:$t})]})]})]})]}),Ee.length>0?e.jsx(gn,{children:e.jsx(Fa,{title:a("cart.youMightAlsoLike"),items:Ee})}):null,je&&n?e.jsx(Wa,{auth:je.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:La,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=je;oe(null),t()},onCancel:()=>oe(null),onClose:()=>oe(null)}):null,p?e.jsx(ys,{phase:p.phase,balanceCredits:se,onClose:qt,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:Jt(n==null?void 0:n.providerType),options:p.phase==="choose"?Bt(p).options:void 0,onPay:Et,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?Pe(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:te,selectedPack:ye,onSelectPack:qe,onBuyPacks:()=>void Ft(),message:p.phase==="error"?p.message:void 0,onRetry:()=>void O()}):null]})}export{En as Cart};
|
|
676
|
+
`;function Te(c){if(cs(c))return a("errors.rejected");const d=(c.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Zt.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const mn=12e4;function fn(c){const d=[];return c.unavailable.length&&d.push(a("cart.drop.unavailable",{count:c.unavailable.length})),c.own.length&&d.push(a("cart.drop.own",{count:c.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Pe=c=>c.reduce((d,k)=>d+k.priceCredits*k.quantity,0),he=c=>c.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function En(){Kt({title:a("nav.cart"),noindex:!0});const c=q(t=>t.items),d=q(t=>t.remove),k=q(t=>t.increment),T=q(t=>t.decrement),_=q(t=>t.clear),F=q(t=>t.restore),W=q(t=>t.setFittingOpen),z=Ze(t=>t.items),me=Ze(t=>t.toggle),{session:n,signIn:I}=Ut(),te=ss().packs.slice(0,ns);$.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const kt=c.some(t=>t.category!=="emote"),{data:fe}=Ot({queryKey:["upsell-listings"],queryFn:()=>ta({first:40}),staleTime:6e4}),{data:C}=Ht(n),m=Vt(),U=Lt(),{state:L}=Nt(),[$t,G]=$.useState(null),[Ae,ae]=$.useState(null),[St,A]=$.useState(!1),[P,N]=$.useState(null),Ie=$.useRef(0),[p,b]=$.useState(null),{data:Y}=Dt(n),{data:J}=Oa(!0),[ye,qe]=$.useState(""),X=$.useRef(null),Re=Gt(c),_e=t=>et(Re[t.id]),be=c.filter(_e),ve=c.length>0&&be.length===0,Mt=be.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Tt=c.reduce((t,s)=>t+s.quantity,0),Pt=be.reduce((t,s)=>t+s.quantity,0),Be=P?P.liveTotalCredits:Mt,zt=new Set(c.map(t=>t.id)),Ee=((fe==null?void 0:fe.items)??[]).filter(t=>!zt.has(t.id)).slice(0,12),At=new Map(P==null?void 0:P.buyable.map(t=>[t.item.id,t])),se=(C==null?void 0:C.credits)??0,ne=Be*10,Fe=J?lt(ne,J):0n,ie=Se({priceCents:ne,priceManaWei:Fe,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n}),We=mt(ne,Fe),Le=We!=null?a("buyModal.manaRate",{mana:We.toLocaleString("en",{maximumFractionDigits:2})}):null,It=Xt;function re(t){t(),N(null),ae(null),G(null)}function qt(){b(null),A(!1)}function Ne(t){const s=Pe(t),l=Math.max(0,s-se),r=te.find(u=>u.credits>=l)??te[te.length-1];qe(r.id),Q("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:se,shortfall:l}),b({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:l}),A(!1)}async function Ce(t){if(!n||t.length===0)return;const s=he(t),l=s.map(g=>({...g.item,priceCredits:g.priceCredits})),r=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),u=[];let h="authorize",f=!1;b({phase:"processing",stage:"reserving",step:1,total:s.length});try{const g=[];for(let j=0;j<s.length;j++){const v=s[j];b({phase:"processing",stage:"reserving",step:j+1,total:s.length});try{const{credit:w,maxCreditedValue:H}=await st(n.identity,v.usdCents,v.trade.id);u.push(w.id),g.push({trade:v.trade,credits:[w],maxCreditedValue:H})}catch(w){if(ls(w)){if(u.length){try{await je(n.identity,u)}catch(H){V(H,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}Ne(t);return}throw w}}h="submit";const M=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});let y=[];if(Va())try{y=await Za({purchases:g,buyer:n.address,signer:n.signer,onSigned:M});const v=(await Promise.allSettled(y.map(w=>es(w)))).flatMap(w=>w.status==="rejected"?[w.reason]:[]);if(v.length&&!v.some(w=>w instanceof ts))throw v[0];f=!0}catch(j){if(!(j instanceof as))throw j;y=await Me({purchases:g,buyer:n.address,signer:n.signer,onSigned:M})}else y=await Me({purchases:g,buyer:n.address,signer:n.signer});t.forEach(j=>d(j.item.id)),N(null),Q("Shop Completed Purchase",{...ke(l),payment_type:"credits",no_crypto_step:f,transaction_hash:y[0]??null}),Na(m);const x=X.current;X.current=null,b(null),A(!1);const E={items:r,txHash:y[0]??void 0,settled:!0,...x?{creditsAdded:x}:{}};U("/success",{state:E,replace:!0})}catch(g){if(ce(g)||V(g,{flow:"cart_checkout",step:h,cart_size:t.length}),Q(ce(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:nt(g),value_usd:tt(l.reduce((M,y)=>M+y.priceCredits,0)),cart_size:s.length}),u.length){try{await je(n.identity,u)}catch(M){V(M,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}b({phase:"error",message:Te(g)})}}function Qe(t,s){m.invalidateQueries({queryKey:["usd-balance"]}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["owned-token"]}),m.invalidateQueries({queryKey:["public-token"]}),m.invalidateQueries({queryKey:["item-resales"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]}),m.invalidateQueries({queryKey:["owned-item-count"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]});const l=X.current;X.current=null,b(null),A(!1);const r={items:t,txHash:s[0]??void 0,settled:!0,...l?{creditsAdded:l}:{}};U("/success",{state:r,replace:!0})}function Ke(t,s){ce(t)||V(t,{flow:s,step:"submit"}),Q(ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:nt(t)}),b({phase:"error",message:Te(t)}),A(!1)}async function Rt(t,s){const l=le($e.MANAToken,s),r=le($e.CreditsManager,s);await Ja({auth:{kind:Xa.Allowance,contractAddress:l.address,spenderAddress:r.address,chainId:s},signer:t})}async function Ue(){if(J)return J;try{return await m.fetchQuery({queryKey:["mana-rate",at.chainId],queryFn:()=>Ha(at.chainId),staleTime:6e4})}catch{return}}async function _t(t){const s=he(t).reduce((h,f)=>h+f.usdCents,0),r=(Y??0n)>0n?await Ue():J,u=r?lt(s,r):0n;return{totalCents:s,manaWei:u}}async function Oe(t,s){const l=Pe(t),{totalCents:r,manaWei:u}=await _t(t),h=Se({priceCents:r,priceManaWei:u,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n});if(s&&h.options.some(f=>f.method===s)){if(s==="credits"){Ce(t);return}const{spender:f,chainId:g}=He(s,t);await Ve(f,g,()=>s==="mana"?void De(t):void Ge(t,r,u));return}if(h.options.some(f=>f.method==="mana"||f.method==="combined")){b({phase:"choose",lines:t,totalCents:r,manaWei:u}),A(!1);return}if(C!=null&&C.credits<l){Ne(t);return}Ce(t)}function Bt(t){return Se({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(C==null?void 0:C.balanceCents)??0,manaBalanceWei:Y??0n})}const[we,oe]=$.useState(null);function He(t,s){const l=s[0].trade;return{spender:t==="mana"?le(ea(l.contract),l.chainId).address:le($e.CreditsManager,l.chainId).address,chainId:l.chainId}}async function Ve(t,s,l){const r=Da(s,t),u=n?await Ga(r,n.address).catch(()=>!0):!0;if(Ya(n==null?void 0:n.providerType,u)){A(!1),oe({auth:r,run:l});return}l()}function Et(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:l,manaWei:r}=p;if(t==="credits"){Ce(s);return}const{spender:u,chainId:h}=He(t,s);Ve(u,h,()=>t==="mana"?void De(s):void Ge(s,l,r))}async function De(t){if(!n||t.length===0)return;const s=he(t),l=s.map(h=>({...h.item,priceCredits:h.priceCredits})),r=t.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await Qa({trades:s.map(f=>f.trade),buyer:n.address,signer:n.signer,onSigned:u});t.forEach(f=>d(f.item.id)),N(null),Q("Shop Completed Purchase",{...ke(l),payment_type:"mana",transaction_hash:h[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Qe(r,h)}catch(h){Ke(h,"buy_cart_mana")}}async function Ge(t,s,l){if(!n||t.length===0)return;const r=he(t),u=r.map(x=>({...x.item,priceCredits:x.priceCredits})),h=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),f=Ka(r.map(x=>x.usdCents),(C==null?void 0:C.balanceCents)??0),g=f.reduce((x,E)=>x+E,0),M=Ua(Math.max(0,s-g),s,l),y=[];b({phase:"processing",stage:"reserving",step:1,total:r.length});try{const x=[];for(let v=0;v<r.length;v++){const w=f[v];if(w<=0)continue;b({phase:"processing",stage:"reserving",step:v+1,total:r.length});const{credit:H,maxCreditedValue:Wt}=await st(n.identity,w,r[v].trade.id);y.push(H.id),x.push({trade:r[v].trade,credits:[H],maxCreditedValue:Wt})}r.forEach((v,w)=>{f[w]<=0&&x.push({trade:v.trade,credits:[],maxCreditedValue:"0"})}),x[0]={...x[0],maxCreditedValue:(BigInt(x[0].maxCreditedValue)+M).toString()},await Rt(n.signer,r[0].trade.chainId);const E=()=>b({phase:"processing",stage:"settling",step:r.length,total:r.length});b({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const j=await Me({purchases:x,buyer:n.address,signer:n.signer,onSigned:E});t.forEach(v=>d(v.item.id)),N(null),Q("Shop Completed Purchase",{...ke(u),payment_type:"credits_and_mana",transaction_hash:j[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Qe(h,j)}catch(x){y.length&&(je(n.identity,y).catch(()=>{}),m.invalidateQueries({queryKey:["usd-balance"]})),Ke(x,"buy_cart_combined")}}async function O(t){if(!n){ct({type:"cart-checkout"}),I();return}const s=q.getState().items.filter(_e);if(s.length===0)return;G(null),ae(null),A(!0);const l=s.reduce((r,u)=>r+u.priceCredits*u.quantity,0);Q("Shop Started Checkout",{cart_size:s.length,cart_value_credits:l,cart_value_usd:tt(l),has_sufficient_credits:se>=l});try{const r=await is(s,n.address,It,await Ue()),u=[...r.unavailable,...r.own];if(u.length&&(u.forEach(h=>d(h.id)),ae(fn(r))),r.buyable.length===0){G(a("cart.error.noneAvailable")),N(null);return}if(r.orderChanged){N(r),Ie.current=Date.now();return}await Oe(r.buyable,t)}catch(r){V(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),G(Te(r))}finally{A(!1)}}async function Ye(){if(P){if(!n){ct({type:"cart-checkout"}),I();return}if(Date.now()-Ie.current>mn){N(null),ae(null),await O();return}G(null),Oe(P.buyable)}}async function Ft(){if(ye){try{sessionStorage.setItem(de,JSON.stringify(q.getState().items))}catch{}A(!0);try{const t=await rs(ye,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}U("/credits")}catch(t){try{sessionStorage.removeItem(de)}catch{}V(t,{flow:"cart_buy_credits"}),b({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{A(!1)}}}const Je=$.useRef(!1);$.useEffect(()=>{if(!n||Je.current||!Ea("cart-checkout"))return;Je.current=!0;const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[n]);const Xe=$.useRef(!1);$.useEffect(()=>{if(!(L!=null&&L.resumeCheckout)||Xe.current)return;Xe.current=!0,X.current=L.creditsAdded??null;try{const s=sessionStorage.getItem(de);if(s){sessionStorage.removeItem(de);const l=JSON.parse(s);Array.isArray(l)&&l.length&&F(l)}}catch{}m.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[L==null?void 0:L.resumeCheckout]);const B=St||(p==null?void 0:p.phase)==="processing";return c.length===0&&!p?e.jsx(dt,{children:e.jsxs(ht,{children:[e.jsxs(ut,{onClick:()=>U(-1),type:"button",children:[e.jsx(R,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(ks,{"data-testid":"cart-empty",children:[e.jsx(R,{name:"cart-plus",size:110}),e.jsxs($s,{children:[e.jsx(Ss,{children:a("cart.empty.title")}),e.jsx(Ms,{children:a("cart.empty.body")})]}),e.jsx(Ts,{to:"/assets",children:a("cart.empty.cta")})]})]})}):e.jsxs(dt,{children:[e.jsxs(ht,{children:[e.jsxs(ut,{onClick:()=>U(-1),type:"button",children:[e.jsx(R,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Cs,{children:[e.jsxs(ws,{children:[e.jsxs(js,{children:[e.jsx(Ps,{onClick:()=>U(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(R,{name:"arrow-left"})}),e.jsx(zs,{children:a("cart.panelTitle",{count:Tt})}),kt?e.jsxs(As,{onClick:()=>W(!0),disabled:B,children:[e.jsx(R,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(vt,{children:[e.jsx(Is,{children:c.map(t=>{const s=At.get(t.id),l=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,h=t.quantity,f=typeof t.available=="number"&&h>=t.available,g=l*h,M=!!z[t.id],y=Yt(t),x=Re[t.id],E=!et(x),j=x==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(qs,{"data-unavailable":E||void 0,children:[e.jsxs(Rs,{"data-thumb":!0,children:[y?e.jsx(_s,{to:y,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Bs,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(Es,{children:[e.jsxs(Fs,{"data-desc":!0,children:[y?e.jsx(Ls,{to:y,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Ws,{title:t.name,children:t.name}),t.creator?e.jsx(Ns,{address:t.creator,linkToProfile:!0}):null,u?e.jsxs(Xs,{"data-testid":"cart-creator-tag",children:[e.jsx(Zs,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Qs,{children:E?e.jsxs(e.Fragment,{children:[e.jsxs(Gs,{children:[e.jsx(Ys,{name:"warning-fill",size:24}),j]}),y?e.jsx(Js,{to:y,state:{item:t,tradeId:t.tradeId},children:a("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Ks,{children:[e.jsx(pt,{onClick:()=>re(()=>T(t.id)),disabled:B||h<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Us,{children:h}),e.jsx(pt,{onClick:()=>re(()=>k(t.id)),disabled:B||f,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(Os,{children:[e.jsx(Hs,{})," ",g,r?e.jsx(Vs,{children:t.priceCredits*h}):null]})]})})]}),e.jsxs(Ds,{children:[e.jsx(en,{"data-on":M||void 0,onClick:()=>me(t),"aria-label":M?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:M?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(R,{name:M?"heart-solid":"heart"})}),e.jsx(tn,{onClick:()=>re(()=>d(t.id)),disabled:B,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(R,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(an,{children:e.jsx("button",{className:"link",onClick:()=>re(_),disabled:B,children:a("cart.clearCart")})})]})]}),e.jsxs(sn,{children:[e.jsx(nn,{children:a("cart.purchaseSummary")}),e.jsxs(rn,{children:[e.jsxs(on,{children:[e.jsx(cn,{children:a("cart.totalItems",{count:Pt})}),e.jsxs(dn,{children:[e.jsxs(ln,{children:[e.jsx(hn,{})," ",Be]}),Le&&(Y??0n)>0n?e.jsx(un,{"data-testid":"cart-mana-rate",children:Le}):null]})]}),ie.options.length>0||ie.manaShortfall?e.jsx(gt,{options:ie.options,totalCents:ne,shortfall:ie.manaShortfall,creditsLabel:P?a("marketCheckout.confirmPurchase"):a("cart.buyWithCredits"),busy:B||ve,onPay:t=>void(P?Ye():O(t))}):e.jsx(pn,{onClick:()=>void(P?Ye():O()),disabled:B||ve,children:B?a("cart.working"):P?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),ve?e.jsx(ue,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(ue,{className:"muted",children:a("cart.signInHint")}),P?e.jsx(ue,{className:"muted",children:a("cart.priceChanged")}):null,Ae?e.jsx(ue,{className:"muted",children:Ae}):null,e.jsx(xn,{message:$t})]})]})]})]}),Ee.length>0?e.jsx(gn,{children:e.jsx(Fa,{title:a("cart.youMightAlsoLike"),items:Ee})}):null,we&&n?e.jsx(Wa,{auth:we.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:La,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=we;oe(null),t()},onCancel:()=>oe(null),onClose:()=>oe(null)}):null,p?e.jsx(ys,{phase:p.phase,balanceCredits:se,onClose:qt,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:Jt(n==null?void 0:n.providerType),options:p.phase==="choose"?Bt(p).options:void 0,onPay:Et,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?Pe(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:te,selectedPack:ye,onSelectPack:qe,onBuyPacks:()=>void Ft(),message:p.phase==="error"?p.message:void 0,onRetry:()=>void O()}):null]})}export{En as Cart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-
|
|
1
|
+
import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-Czb_P6bY.js";import{r as U,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as K,s as v}from"./clsx-DwIdSwcx.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const G=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,L=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,
|
|
1
|
+
import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ad as J,ae as z,I as X,d as a,c as ee,k as te,u as ae,l as re,e as oe,S as E,A as ie,af as se,ag as ne}from"./index-Czb_P6bY.js";import{E as ce}from"./ErrorNotice-AcMffEAY.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-nIInl7-_.js";import{u as ve}from"./useStore-BTXlSV66.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-fg4FNysa.js";import{L as $e}from"./LoadMore-CbGw7_AZ.js";import{u as Pe}from"./useInfiniteGrid-C3613jLi.js";import{G as Me}from"./grid.styles-DtrFzApp.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const Re=c.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${v.radius.card};
|
|
4
4
|
overflow: hidden;
|