@dcl/shop 0.1.0-29337358135.commit-2e4bf7e → 0.1.0-29341264529.commit-3758d56
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/{AnimatedBackground-DimPo0o6.js → AnimatedBackground-fvzwNhlg.js} +3 -3
- package/assets/Assets-C2SMY4Wn.js +1 -0
- package/assets/Button-BMI2yWqO.js +74 -0
- package/assets/{Cart-DfisnztS.js → Cart-BzFXsMma.js} +1 -1
- package/assets/CircularProgress-Cjnyi6sF.js +28 -0
- package/assets/Collection-DeiH22k9.js +1 -0
- package/assets/{ConstantsUtil-CiDezLbv.js → ConstantsUtil-DrbbN8Db.js} +1 -1
- package/assets/{Creator-DXuvF7aY.js → Creator-BRKRY9NQ.js} +1 -1
- package/assets/{ExchangeController-DKuss9DL.js → ExchangeController-BsoPlnUg.js} +1 -1
- package/assets/GetCredits-Df0EJOrT.js +2 -0
- package/assets/{HelpersUtil-BIYA4n9B.js → HelpersUtil-CG8lWgZZ.js} +1 -1
- package/assets/ImportListings-DFJCBiyn.js +1 -0
- package/assets/ItemDetail-DiMc18RR.js +2 -0
- package/assets/{LoadMore-BOCtgPLI.js → LoadMore-7qZApSeo.js} +1 -1
- package/assets/{MenuItem-Ci7Oxa0S.js → MenuItem-BNFaj4bv.js} +2 -2
- package/assets/MyAssets-ChOIdS7f.js +1 -0
- package/assets/{MyFavorites-BzUnpL59.js → MyFavorites-dpxOF1kK.js} +1 -1
- package/assets/{MyPurchases-C-MppIV4.js → MyPurchases-Dg0Dl_Ff.js} +1 -1
- package/assets/{NetworkUtil-DDES604E.js → NetworkUtil-BI8jZwmc.js} +1 -1
- package/assets/{NotFound-stjqjmfW.js → NotFound-BplOnkUp.js} +1 -1
- package/assets/{RealCheckout-BXu8QwUw.js → RealCheckout-BRvLBHx9.js} +1 -1
- package/assets/{ShopFooterInner-Bw0tZ5jz.js → ShopFooterInner-Bk4iHJAH.js} +3 -3
- package/assets/{SkeletonCards-BysJEVmg.js → SkeletonCards-DSpqiDzZ.js} +1 -1
- package/assets/{Success-BmFgC1Fj.js → Success-DznSzYm_.js} +1 -1
- package/assets/{SwapController-Daflx-KH.js → SwapController-DUcM1Ja2.js} +1 -1
- package/assets/{TradeService-mwlprIfz.js → TradeService-CbUgwZEW.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-OCCNZtGo.js → W3MFrameProviderSingleton-BS8u2E5h.js} +3 -3
- package/assets/{WebCryptoP256-DcxhTaIn.js → WebCryptoP256-BNECkcp8.js} +1 -1
- package/assets/{basic-DokGV68e.js → basic-ExMbnGJU.js} +1 -1
- package/assets/{biconomy-BFplpB0T.js → biconomy-DE4NulP5.js} +1 -1
- package/assets/{browser-DHYOtFa8.js → browser-D_5JuNNR.js} +1 -1
- package/assets/{browser-ponyfill-rND5WOqr.js → browser-ponyfill-ClcxEFdz.js} +1 -1
- package/assets/{buy-gasless-B5QPf-sE.js → buy-gasless-BCY1xiea.js} +1 -1
- package/assets/{buy-Cei5j8eO.js → buy-qZ6pCz4O.js} +1 -1
- package/assets/{ccip-38EHg6W8.js → ccip-BItjvNVe.js} +1 -1
- package/assets/{ccip-n6rH3sVb.js → ccip-Dc2Sl0Cx.js} +1 -1
- package/assets/{chains-Bk629xE3.js → chains-BsN0T6nV.js} +1 -1
- package/assets/{collection-dxCKqLM-.js → collection-DJ02EuIR.js} +1 -1
- package/assets/{common-CEkVtB9E.js → common-TfzpxC2l.js} +1 -1
- package/assets/{controller-DG_iRQPR.js → controller-RTLxVvZ6.js} +2 -2
- package/assets/{core-CIi4Ex77.js → core-DqO1PhnS.js} +4 -4
- package/assets/{custom-Cjfua0Ef.js → custom-BYzsjJ7t.js} +1 -1
- package/assets/{data-capture-DXahe72x.js → data-capture-DXHtqKgM.js} +1 -1
- package/assets/decimals-BKxae-RP.js +1 -0
- package/assets/{decimals-teeH97v6.js → decimals-CapXBEic.js} +1 -1
- package/assets/{detectExtension-DX1a8DfW.js → detectExtension-C019UiWG.js} +1 -1
- package/assets/{email-CPaGg29O.js → email-BDtokP8K.js} +1 -1
- package/assets/{embedded-wallet-BhVpPp0v.js → embedded-wallet-CpQg8tqs.js} +1 -1
- package/assets/emotion-styled.browser.esm-BhzSSuXb.js +1 -0
- package/assets/{engine-CwdwAsnd.js → engine-BQqxATpN.js} +1 -1
- package/assets/{estimate-l1-fee-BnSv7s_G.js → estimate-l1-fee-D-hSejEm.js} +1 -1
- package/assets/eth_estimateGas-Cu6PWoKP.js +1 -0
- package/assets/{eth_getStorageAt-DIueLfGz.js → eth_getStorageAt-r25nMq53.js} +1 -1
- package/assets/eth_getTransactionCount-IgHrxRqD.js +1 -0
- package/assets/{ethereum-CdeRZR9J.js → ethereum-A1QWZFDW.js} +1 -1
- package/assets/{ethers-JeCAM1sd.js → ethers-DXxh-eEm.js} +1 -1
- package/assets/{extractIPFS-BrP7LeOr.js → extractIPFS-WJH_KjST.js} +1 -1
- package/assets/{features-KCpkg70J.js → features-Df2C7VrE.js} +1 -1
- package/assets/{fetchTokenMetadata-ZA_LtwkO.js → fetchTokenMetadata-DQlS8SuK.js} +2 -2
- package/assets/{fortmatic-B9IU5L1m.js → fortmatic-Beo5lxXY.js} +1 -1
- package/assets/get-ecosystem-wallet-info-hp9qo9J3.js +1 -0
- package/assets/{getBalance-DGzGIvMz.js → getBalance-D4rmYxNh.js} +2 -2
- package/assets/{getInstalledModules-Bx09uT4y.js → getInstalledModules-C8Hva7AE.js} +1 -1
- package/assets/{getNFT-Zd5KGmRs.js → getNFT-CBawyAHj.js} +1 -1
- package/assets/{getNFT-tiy4hesk.js → getNFT-Dfj2l-Ch.js} +2 -2
- package/assets/{hashTypedData-CvnNX2YB.js → hashTypedData-BHGrMNK6.js} +1 -1
- package/assets/{hashTypedData-CtOt2WpE.js → hashTypedData-CM9F6RUI.js} +1 -1
- package/assets/{import-Ct60HkEi.js → import-Cx-OZqAE.js} +1 -1
- package/assets/{in-app-wallet-calls-nAqAaeZM.js → in-app-wallet-calls-Dch1hsg5.js} +1 -1
- package/assets/{index-CImDhWkL.js → index-42gEBfTi.js} +2 -2
- package/assets/{index-CtPBA1jA.js → index-48uPzbtE.js} +1 -1
- package/assets/{index-Ds5QdmMB.js → index-5E9VLIdh.js} +1 -1
- package/assets/{index-DXaR1qC5.js → index-9oav_WyD.js} +1 -1
- package/assets/index-B-jeDoF7.js +1 -0
- package/assets/{index-BKUufNAr.js → index-B0fp_BTU.js} +1 -1
- package/assets/{index-O4fffv47.js → index-BAWcl7uQ.js} +1 -1
- package/assets/{index-ClaWRN-y.js → index-BBL-hAHr.js} +1 -1
- package/assets/{index-OFpebMSe.js → index-BEVNPg7X.js} +3 -3
- package/assets/{index-BcyJUD4U.js → index-BOJUx2yW.js} +1 -1
- package/assets/{index-NMzNXj-b.js → index-BSCJHKfS.js} +1 -1
- package/assets/{index-Doasr1W7.js → index-BXvfWw1i.js} +1 -1
- package/assets/{index-CUREiiKP.js → index-BZvR1iax.js} +1 -1
- package/assets/{index-B8kuIs26.js → index-Ba8jdmry.js} +1 -1
- package/assets/{index-Bgq0v2Vw.js → index-Balk147I.js} +2 -2
- package/assets/{index-CSh-BHOv.js → index-BclUryz1.js} +1 -1
- package/assets/{index-BLmKUFKr.js → index-Bs_hiiN9.js} +1 -1
- package/assets/{index-CmJ_3H94.js → index-Buef3xrK.js} +1 -1
- package/assets/{index-Ca3Sav7N.js → index-BwpJa7L4.js} +1 -1
- package/assets/{index-C0sZ2G0D.js → index-BzjsXx68.js} +1 -1
- package/assets/{index-9GLN8yqL.js → index-C-qe8hE_.js} +1 -1
- package/assets/index-CIcEGlWj.js +1 -0
- package/assets/{index-ChvdYvQ4.js → index-CJ21qPJU.js} +1 -1
- package/assets/{index-CbNdOGip.js → index-CM1EzVrf.js} +1 -1
- package/assets/{index-CM4C6c3v.js → index-CN6e_bJW.js} +1 -1
- package/assets/{index-BTe18ABT.js → index-CQTErWBm.js} +1 -1
- package/assets/{index-DW9-slpM.js → index-CSZn1axc.js} +3 -3
- package/assets/{index-ChQKLd7_.js → index-CWDqSaNg.js} +1 -1
- package/assets/{index-CCamfLVz.js → index-CaVzt9Zg.js} +1 -1
- package/assets/{index-B_xrDWUL.js → index-Cc4Zz6Zy.js} +1 -1
- package/assets/{index-DGRE-ml6.js → index-Ccl-BImo.js} +1 -1
- package/assets/{index-U6KrdqpT.js → index-Ce01n-03.js} +1 -1
- package/assets/{index-t3MAsdpb.js → index-D6jFYOn4.js} +1 -1
- package/assets/{index-eOTACaIJ.js → index-DAZ3T5le.js} +1 -1
- package/assets/index-DBVEZzhi.js +4 -0
- package/assets/{index-D5Mm7yXQ.js → index-DGN5055N.js} +1 -1
- package/assets/{index-Zhfk6Aoz.js → index-DHzrcOiN.js} +1 -1
- package/assets/index-DIkXA0Hv.js +1 -0
- package/assets/{index-qVJufJAm.js → index-DJIAaV2A.js} +1 -1
- package/assets/{index-BFVyBGs8.js → index-DUfRRmta.js} +1 -1
- package/assets/{index-DvhSyBnM.js → index-Da42Ph0g.js} +2 -2
- package/assets/{index-U2hrSY35.js → index-DekR2YhX.js} +1 -1
- package/assets/{index-CqQ8Hs5j.js → index-Dit_Tadt.js} +1 -1
- package/assets/{index-xd5vYVHb.js → index-Dt4XXlAo.js} +1 -1
- package/assets/{index-T0IQCR4g.js → index-DzTAB8XM.js} +1 -1
- package/assets/{index-Bg4LriAo.js → index-FyW6lWdg.js} +1 -1
- package/assets/{index-CmD3WgD4.js → index-H3dPSebS.js} +1 -1
- package/assets/{index-Bt1JjNoo.js → index-K-cpVYNW.js} +1 -1
- package/assets/{index-Bqxd3bRY.js → index-KXOxVBmY.js} +1 -1
- package/assets/{index-fOgQisFj.css → index-Kb_kdzXZ.css} +1 -1
- package/assets/index-L5rl4tyv.js +103 -0
- package/assets/{index-Bz7iJIvj.js → index-Py7lPUfJ.js} +1 -1
- package/assets/{index-DZHh5kfE.js → index-VxjWNgq4.js} +1 -1
- package/assets/{index-B9fMKYcR.js → index-Z24VwtH-.js} +1 -1
- package/assets/{index-RyQIoZwA.js → index-aayYBIgE.js} +1 -1
- package/assets/index-g06cE3ON.js +1 -0
- package/assets/{index-CYwcDn0L.js → index-mRwFYme8.js} +2 -2
- package/assets/{index-CIpCj8f1.js → index-r-eIHibn.js} +1 -1
- package/assets/index-r9qogMtw.js +1 -0
- package/assets/{index-DssZGhOb.js → index-ue8m9AA_.js} +1 -1
- package/assets/{index.es-sLZupOx6.js → index.es-BpB0a1Th.js} +1 -1
- package/assets/{index.es-CBUy80x9.js → index.es-Dfabzma5.js} +4 -4
- package/assets/{index.es-1m0x5CpA.js → index.es-DhN91Wpt.js} +1 -1
- package/assets/{localBatchGatewayRequest-Bwch9V5u.js → localBatchGatewayRequest-k-UZ-HMO.js} +1 -1
- package/assets/{mana-rate-BrvfDold.js → mana-rate-GO2pCGLs.js} +1 -1
- package/assets/{native-C_y7cRlS.js → native-B9_hMdpy.js} +1 -1
- package/assets/network-QssBB6oI.js +1 -0
- package/assets/{networks-KNRT4yhl.js → networks-Cf-N-9Xq.js} +1 -1
- package/assets/{onramp-vni5tJjM.js → onramp-BGEfyVAt.js} +1 -1
- package/assets/{openzeppelin-Dm8mC4Oq.js → openzeppelin-Dqbxfcec.js} +1 -1
- package/assets/{ownerOf-lof10XBl.js → ownerOf-CljeAL21.js} +1 -1
- package/assets/{parseNft-COV0EcO6.js → parseNft-BC_5oKiz.js} +2 -2
- package/assets/{parseSignature-Dx8_igyj.js → parseSignature-CtI5iMV2.js} +1 -1
- package/assets/{parseSignature-DH_zPldG.js → parseSignature-V_kdzkxI.js} +3 -3
- package/assets/{pay-with-exchange-D7fz03Hw.js → pay-with-exchange-CZQdYVAY.js} +1 -1
- package/assets/{qr-overlay-B_s_8Smu.js → qr-overlay-BuM1P1vl.js} +3 -3
- package/assets/{react-Vu6nbGi5.js → react-CQ5qhqs6.js} +1 -1
- package/assets/{receive-Cm4r3Dka.js → receive-DmQKXpZf.js} +1 -1
- package/assets/{resolveImplementation-DG9O52l9.js → resolveImplementation-Bv53gP5B.js} +1 -1
- package/assets/{rpc-BA6d-g1R.js → rpc-BMKNIejp.js} +1 -1
- package/assets/{secp256k1-DqnVksGc.js → secp256k1--hQ4zJbr.js} +1 -1
- package/assets/{secp256k1-zTnesHEt.js → secp256k1-D-BnaYDw.js} +1 -1
- package/assets/{secp256k1-K3jrkFCF.js → secp256k1-D6E_Hi1m.js} +1 -1
- package/assets/{send-batch-transaction-D8RkjDD6.js → send-batch-transaction-Dz6j3z1q.js} +1 -1
- package/assets/{send-eip712-transaction-D224ueJ-.js → send-eip712-transaction-DjWFMOzt.js} +2 -2
- package/assets/{send-gasless-transaction-B_0JoAQE.js → send-gasless-transaction-CGFByKRT.js} +2 -2
- package/assets/{send-D-iD-Eqx.js → send-qU9iYsqh.js} +1 -1
- package/assets/{sendRawTransaction-CA5sPEMX.js → sendRawTransaction-B7PaRJhQ.js} +3 -3
- package/assets/{serializeTransaction-DoiqxhWF.js → serializeTransaction-BKFBSxXm.js} +1 -1
- package/assets/{session-proposal-gostBQZ3.js → session-proposal-B5Mu6CaX.js} +1 -1
- package/assets/{session-request-CTrIE5mc.js → session-request-C5RIloQJ.js} +2 -2
- package/assets/{sha256-DvVglGNs.js → sha256-CzoB8HGh.js} +1 -1
- package/assets/{signing-BNXs2XCn.js → signing-Ck4I48Ky.js} +5 -5
- package/assets/{socials-B0f9Npjf.js → socials-CjlOiNOa.js} +1 -1
- package/assets/{swaps-CrDXCLmL.js → swaps-DUV5kVh5.js} +1 -1
- package/assets/{thirdweb-BHHkLfZd.js → thirdweb-46ahlzaq.js} +3 -3
- package/assets/{totalSupply-OMptbxGo.js → totalSupply-juJGV40_.js} +1 -1
- package/assets/{trade-encoding-Dbk3clLx.js → trade-encoding-BnwDZb1r.js} +1 -1
- package/assets/{transactionReceipt-wg3yR0Lm.js → transactionReceipt-CjIrYUrd.js} +1 -1
- package/assets/{transactions-7oX42CZi.js → transactions-C4k8y4fS.js} +1 -1
- package/assets/useInfiniteGrid-BA-VoNAn.js +1 -0
- package/assets/{utils-BmX8TqzP.js → utils-CebgHLxz.js} +1 -1
- package/assets/{verifyHash-D-LCgkGR.js → verifyHash-CRPE73-q.js} +1 -1
- package/assets/{w3m-modal-ZsakVEYv.js → w3m-modal-CSsFueoj.js} +1 -1
- package/assets/{w3m-modal-BUd4eWHh.js → w3m-modal-DlKBtHap.js} +1 -1
- package/assets/{wait-for-tx-receipt-gZ6Dq1Eb.js → wait-for-tx-receipt-C6eRPabX.js} +1 -1
- package/assets/{wallet-kind-DtWrr4AZ.js → wallet-kind-BiP1tBJS.js} +1 -1
- package/assets/{wallets-C7iol5XW.js → wallets-DNThg_Tf.js} +6 -6
- package/assets/{web-connector-Dgg6xNHV.js → web-connector-Bsz2goeK.js} +3 -3
- package/assets/{writeContract-Bue8cAhq.js → writeContract-CQyj5ohz.js} +1 -1
- package/assets/{zora-sepolia-kNKNf7Kl.js → zora-sepolia-BXcKZl5q.js} +1 -1
- package/assets/{zoraTestnet-CrA1iIe2.js → zoraTestnet-D4vOnerF.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/Assets-0rXRECQy.js +0 -1
- package/assets/Button-C5iun1df.js +0 -74
- package/assets/CircularProgress-e_Dj0fmx.js +0 -28
- package/assets/Collection-CAJMA4Fe.js +0 -1
- package/assets/FilterBar-CdU8B66A.js +0 -1
- package/assets/GetCredits-DrLnYOdO.js +0 -2
- package/assets/ImportListings-CZkdcWaF.js +0 -1
- package/assets/ItemDetail-BMgOoWU8.js +0 -2
- package/assets/Market-B6NMpu2_.js +0 -1
- package/assets/MyAssets-DGLbKyUN.js +0 -1
- package/assets/SvgIcon-CBDCsycQ.js +0 -1
- package/assets/decimals-CN9Xxdem.js +0 -1
- package/assets/eth_estimateGas-Ds0QjpUA.js +0 -1
- package/assets/eth_getTransactionCount-joBCO4C6.js +0 -1
- package/assets/generateUtilityClasses-uRdMg1ON.js +0 -9
- package/assets/get-ecosystem-wallet-info-DezSaPim.js +0 -1
- package/assets/index-CKwxO0xv.js +0 -95
- package/assets/index-CLIR3TTD.js +0 -1
- package/assets/index-CQB-2hib.js +0 -1
- package/assets/index-CWxLUWXU.js +0 -4
- package/assets/index-CmIVXtjA.js +0 -1
- package/assets/index-GZKxkqGp.js +0 -1
- package/assets/index-l6x72Ai4.js +0 -1
- package/assets/network-DjfG_0s1.js +0 -1
- package/assets/useInfiniteGrid-D88R70KF.js +0 -1
package/index.html
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<link rel="canonical" href="https://shop.decentraland.zone/" />
|
|
17
17
|
|
|
18
18
|
<!-- Favicon: the Decentraland mark (same as the marketplace). -->
|
|
19
|
-
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
20
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/apple-touch-icon.png" />
|
|
21
21
|
<meta name="apple-mobile-web-app-title" content="DCL Shop" />
|
|
22
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/site.webmanifest" />
|
|
23
23
|
|
|
24
24
|
<!-- Open Graph -->
|
|
25
25
|
<meta property="og:type" content="website" />
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
|
|
49
49
|
|
|
50
50
|
<!-- Sitemap -->
|
|
51
|
-
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
51
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/sitemap.xml" />
|
|
52
52
|
|
|
53
53
|
<!-- Warm the 3D preview / fonts -->
|
|
54
54
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
61
61
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
62
62
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
63
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
64
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
65
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
66
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
63
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/assets/index-L5rl4tyv.js"></script>
|
|
64
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/assets/react-CQ5qhqs6.js">
|
|
65
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/assets/ethers-DXxh-eEm.js">
|
|
66
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29341264529.commit-3758d56/assets/index-Kb_kdzXZ.css">
|
|
67
67
|
</head>
|
|
68
68
|
<body>
|
|
69
69
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-29341264529.commit-3758d56",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/decentraland/shop.git"
|
|
10
10
|
},
|
|
11
|
-
"commit": "
|
|
11
|
+
"commit": "3758d56bd1efe28873841935a0c32790eacf358a"
|
|
12
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e,b as D}from"./react-Vu6nbGi5.js";import{j as P,k as I,A as K,l as J}from"./index-CKwxO0xv.js";import{S as F,F as W,a as Y}from"./FilterBar-CdU8B66A.js";import{S as A}from"./SkeletonCards-BysJEVmg.js";import{L as Z}from"./LoadMore-BOCtgPLI.js";import{u as z}from"./useInfiniteGrid-D88R70KF.js";import"./ethers-JeCAM1sd.js";const Q=[{key:"all",label:"Shop All"},{key:"wearable",label:"Wearables",expandable:!0,subs:[{key:"Head",label:"Head",icon:"cat-head"},{key:"Upper Body",label:"Upper Body",icon:"cat-upper"},{key:"Handwear",label:"Handwear",icon:"cat-handwear"},{key:"Lower Body",label:"Lower Body",icon:"cat-lower"},{key:"Feet",label:"Feet",icon:"cat-feet"},{key:"Accessories",label:"Accessories",icon:"cat-accessories"},{key:"Skins",label:"Skins",icon:"cat-skins"}]},{key:"emote",label:"Emotes",expandable:!0,subs:[{key:"Dance",label:"Dance",icon:"emote-dance"},{key:"Stunt",label:"Stunt",icon:"emote-stunt"},{key:"Greetings",label:"Greetings",icon:"emote-greetings"},{key:"Fun",label:"Fun",icon:"emote-fun"},{key:"Poses",label:"Poses",icon:"emote-poses"},{key:"Reactions",label:"Reactions",icon:"emote-reactions"},{key:"Horror",label:"Horror",icon:"emote-horror"},{key:"Miscellaneous",label:"Miscellaneous",icon:"emote-misc"}]}];function V({category:f,subCategory:n,onCategory:l,onSub:x}){const[c,p]=i.useState(()=>f==="wearable"?"wearable":null);function o(s){s.subs?p(t=>{const u=t!==s.key;return u&&l(s.key),u?s.key:null}):(l(s.key),p(null))}return e.jsx("div",{className:"catfilter",children:Q.map(s=>{const t=c===s.key&&!!s.subs,u=s.key===f;return e.jsxs("div",{className:"catfilter__group",children:[e.jsxs("button",{type:"button",className:`catfilter__cat${t?" is-expanded":""}${u?" is-selected":""}`,onClick:()=>o(s),children:[e.jsx("span",{className:"catfilter__cat-label",children:s.label}),s.expandable?e.jsx("span",{className:`ico ico-chevron catfilter__chev${t?" is-up":""}`,"aria-hidden":!0}):null]}),s.subs?e.jsx("div",{className:`catfilter__subs${t?" is-open":""}`,children:e.jsx("div",{className:"catfilter__subs-inner",children:s.subs.map(r=>e.jsx("button",{type:"button",className:`catfilter__sub${n===r.key?" is-active":""}`,onClick:()=>x(n===r.key?null:r.key),children:e.jsxs("span",{className:"catfilter__sub-left",children:[e.jsx("span",{className:`ico ico-${r.icon} catfilter__sub-ico`,"aria-hidden":!0}),e.jsx("span",{className:"catfilter__sub-label",children:r.label})]})},r.key))})}):null]},s.key)})})}const X=48,ee={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"],Dance:["dance"],Stunt:["stunt"],Greetings:["greetings"],Fun:["fun"],Poses:["poses"],Reactions:["reactions"],Horror:["horror"],Miscellaneous:["miscellaneous"]};function ce(){const[f]=D(),n=(f.get("q")??"").trim().toLowerCase(),[l,x]=i.useState("wearable"),[c,p]=i.useState(null),[o,s]=i.useState([]),[t,u]=i.useState(""),[r,N]=i.useState(""),[b,M]=i.useState("newest"),y=t&&!Number.isNaN(Number(t))?Number(t):void 0,h=r&&!Number.isNaN(Number(r))?Number(r):void 0,R=c?ee[c]:void 0,E=(F.find(a=>a.key===b)??F[0]).server,j={category:l,rarities:o.length?o:void 0,wearableCategories:R,minPriceCredits:y,maxPriceCredits:h,search:n||void 0,sortBy:E},{items:S,total:w,isLoading:d,error:L,hasNextPage:B,isFetchingNextPage:v,fetchNextPage:H}=z(["listings",j],a=>J({...j,first:X,skip:a})),_=w,C=i.useRef(null);i.useEffect(()=>{d||!n||C.current===n||(C.current=n,P("Shop Searched",{query:n,result_count:_}))},[n,d,_]);const g=i.useRef("__init__");i.useEffect(()=>{if(d)return;const a=JSON.stringify({category:l,subCategory:c,rarities:o,min:y,max:h,sort:b});if(g.current==="__init__"||g.current===a){g.current=a;return}g.current=a,P("Shop Applied Filter",{filters:{category:l,sub_category:c,rarities:o,min_price_credits:y??null,max_price_credits:h??null,sort:b},result_count:_})},[l,c,o,y,h,b,d,_]);function $(a){x(a),p(null)}function G(a){s(m=>m.includes(a)?m.filter(O=>O!==a):[...m,a])}function T(){x("wearable"),p(null),s([]),u(""),N("")}const k=!!(y||h),U=k?`${t||"0"}–${r||"∞"}`:"Price",q=l!=="wearable"||!!c||o.length>0||k;return e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(V,{category:l,subCategory:c,onCategory:$,onSub:p})}),e.jsxs("div",{className:"browse__main",children:[e.jsx(W,{rarities:o,onToggleRarity:G,sort:b,onSort:M,total:w,loading:d,query:n,anyActive:q,onClear:T,renderTrailing:a=>e.jsx(Y,{panelKey:"price",label:U,active:k,panel:a,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"Min",value:t,onChange:m=>u(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"Max",value:r,onChange:m=>N(m.target.value)})]}),e.jsxs("p",{className:"filter-pop__hint",children:["Price in ",I.name]})]})})}),L?e.jsx("p",{className:"error",children:"Couldn’t load items — please try again."}):null,e.jsx("div",{className:"grid",children:d?e.jsx(A,{count:15}):e.jsxs(e.Fragment,{children:[S.map(a=>e.jsx(K,{item:a},a.id)),v?e.jsx(A,{count:6}):null]})}),e.jsx(Z,{hasNextPage:B,isFetching:v,onLoadMore:()=>H()}),!d&&S.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null]})]})}export{ce as Assets};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import{r as a,i as st,j as z,e as lt,R as H}from"./react-Vu6nbGi5.js";import{b as m,C as Ne,d as M,T as ut,t as ct,v as dt,x as pt,y as ft,_ as Y,c as I,a as ee,u as fe,s as A,k as he,g as Se,e as Ve,n as ht,z as mt,A as bt,q as gt,p as J}from"./generateUtilityClasses-uRdMg1ON.js";import{S as Ce}from"./SvgIcon-CBDCsycQ.js";var se={};function vt(...e){return e.reduce((t,n)=>n==null?t:function(...r){t.apply(this,r),n.apply(this,r)},()=>{})}function xt(e,t=166){let n;function o(...r){const i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return o.clear=()=>{clearTimeout(n)},o}function yt(e,t){return()=>null}function Ct(e,t){var n,o;return a.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}function ke(e){return e&&e.ownerDocument||document}function Rt(e){return ke(e).defaultView||window}function Et(e,t){return()=>null}function Le(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const _e=typeof window<"u"?a.useLayoutEffect:a.useEffect;let Re=0;function It(e){const[t,n]=a.useState(e),o=e||t;return a.useEffect(()=>{t==null&&(Re+=1,n(`mui-${Re}`))},[t]),o}const Ee=st.useId;function Tt(e){if(Ee!==void 0){const t=Ee();return e??t}return It(e)}function Mt(e,t,n,o,r){return null}function zt({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=a.useRef(e!==void 0),[i,s]=a.useState(t),c=r?e:i,u=a.useCallback(d=>{r||s(d)},[]);return[c,u]}function X(e){const t=a.useRef(e);return _e(()=>{t.current=e}),a.useRef((...n)=>(0,t.current)(...n)).current}function ue(...e){return a.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Le(n,t)})},e)}const Ie={};function $t(e,t){const n=a.useRef(Ie);return n.current===Ie&&(n.current=e(t)),n}const Bt=[];function Pt(e){a.useEffect(e,Bt)}class te{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new te}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Nt(){const e=$t(te.create).current;return Pt(e.disposeEffect),e}let ne=!0,ce=!1;const St=new te,Vt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function kt(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Vt[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Lt(e){e.metaKey||e.altKey||e.ctrlKey||(ne=!0)}function le(){ne=!1}function _t(){this.visibilityState==="hidden"&&ce&&(ne=!0)}function Ft(e){e.addEventListener("keydown",Lt,!0),e.addEventListener("mousedown",le,!0),e.addEventListener("pointerdown",le,!0),e.addEventListener("touchstart",le,!0),e.addEventListener("visibilitychange",_t,!0)}function Dt(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return ne||kt(t)}function Fe(){const e=a.useCallback(r=>{r!=null&&Ft(r.ownerDocument)},[]),t=a.useRef(!1);function n(){return t.current?(ce=!0,St.start(100,()=>{ce=!1}),t.current=!1,!0):!1}function o(r){return Dt(r)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:o,onBlur:n,ref:e}}function jt(e,t){function n(o,r){return z.jsx(Ce,m({"data-testid":`${t}Icon`,ref:r},o,{children:e}))}return n.muiName=Ce.muiName,a.memo(a.forwardRef(n))}const Ot={configure:e=>{Ne.configure(e)}},Ut=Object.freeze(Object.defineProperty({__proto__:null,capitalize:M,createChainedFunction:vt,createSvgIcon:jt,debounce:xt,deprecatedPropType:yt,isMuiElement:Ct,ownerDocument:ke,ownerWindow:Rt,requirePropFactory:Et,setRef:Le,unstable_ClassNameGenerator:Ot,unstable_useEnhancedEffect:_e,unstable_useId:Tt,unsupportedProp:Mt,useControlled:zt,useEventCallback:X,useForkRef:ue,useIsFocusVisible:Fe},Symbol.toStringTag,{value:"Module"})),Wt=lt(Ut);var Te;function Vn(){return Te||(Te=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Wt})(se)),se}function wt(e){return Object.keys(e).length===0}function At(e=null){const t=a.useContext(ut);return!t||wt(t)?e:t}const Kt=ct();function Gt(e=Kt){return At(e)}function De(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=De(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Ht(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=De(e))&&(o&&(o+=" "),o+=t);return o}const Xt=["className","component"];function Yt(e={}){const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:r}=e,i=dt("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(pt);return a.forwardRef(function(u,d){const f=Gt(n),b=ft(u),{className:g,component:x="div"}=b,h=Y(b,Xt);return z.jsx(i,m({as:x,ref:d,className:Ht(g,r?r(o):o),theme:t&&f[t]||f},h))})}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},de(e,t)}function qt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,de(e,t)}const Me=H.createContext(null);function Zt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function me(e,t){var n=function(i){return t&&a.isValidElement(i)?t(i):i},o=Object.create(null);return e&&a.Children.map(e,function(r){return r}).forEach(function(r){o[r.key]=n(r)}),o}function Jt(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var s,c={};for(var u in t){if(o[u])for(s=0;s<o[u].length;s++){var d=o[u][s];c[o[u][s]]=n(d)}c[u]=n(u)}for(s=0;s<r.length;s++)c[r[s]]=n(r[s]);return c}function w(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Qt(e,t){return me(e.children,function(n){return a.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:w(n,"appear",e),enter:w(n,"enter",e),exit:w(n,"exit",e)})})}function en(e,t,n){var o=me(e.children),r=Jt(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(a.isValidElement(s)){var c=i in t,u=i in o,d=t[i],f=a.isValidElement(d)&&!d.props.in;u&&(!c||f)?r[i]=a.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:w(s,"exit",e),enter:w(s,"enter",e)}):!u&&c&&!f?r[i]=a.cloneElement(s,{in:!1}):u&&c&&a.isValidElement(d)&&(r[i]=a.cloneElement(s,{onExited:n.bind(null,s),in:d.props.in,exit:w(s,"exit",e),enter:w(s,"enter",e)}))}}),r}var tn=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},nn={component:"div",childFactory:function(t){return t}},be=(function(e){qt(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var s=i.handleExited.bind(Zt(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var s=i.children,c=i.handleExited,u=i.firstRender;return{children:u?Qt(r,c):en(r,s,c),firstRender:!1}},n.handleExited=function(r,i){var s=me(this.props.children);r.key in s||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(c){var u=m({},c.children);return delete u[r.key],{children:u}}))},n.render=function(){var r=this.props,i=r.component,s=r.childFactory,c=Y(r,["component","childFactory"]),u=this.state.contextValue,d=tn(this.state.children).map(s);return delete c.appear,delete c.enter,delete c.exit,i===null?H.createElement(Me.Provider,{value:u},d):H.createElement(Me.Provider,{value:u},H.createElement(i,c,d))},t})(H.Component);be.propTypes={};be.defaultProps=nn;function on(e){const{className:t,classes:n,pulsate:o=!1,rippleX:r,rippleY:i,rippleSize:s,in:c,onExited:u,timeout:d}=e,[f,b]=a.useState(!1),g=I(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),x={width:s,height:s,top:-(s/2)+i,left:-(s/2)+r},h=I(n.child,f&&n.childLeaving,o&&n.childPulsate);return!c&&!f&&b(!0),a.useEffect(()=>{if(!c&&u!=null){const C=setTimeout(u,d);return()=>{clearTimeout(C)}}},[u,c,d]),z.jsx("span",{className:g,style:x,children:z.jsx("span",{className:h})})}const T=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),rn=["center","classes","className"];let oe=e=>e,ze,$e,Be,Pe;const pe=550,an=80,sn=he(ze||(ze=oe`
|
|
2
|
-
0% {
|
|
3
|
-
transform: scale(0);
|
|
4
|
-
opacity: 0.1;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
100% {
|
|
8
|
-
transform: scale(1);
|
|
9
|
-
opacity: 0.3;
|
|
10
|
-
}
|
|
11
|
-
`)),ln=he($e||($e=oe`
|
|
12
|
-
0% {
|
|
13
|
-
opacity: 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
100% {
|
|
17
|
-
opacity: 0;
|
|
18
|
-
}
|
|
19
|
-
`)),un=he(Be||(Be=oe`
|
|
20
|
-
0% {
|
|
21
|
-
transform: scale(1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
50% {
|
|
25
|
-
transform: scale(0.92);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
100% {
|
|
29
|
-
transform: scale(1);
|
|
30
|
-
}
|
|
31
|
-
`)),cn=A("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),dn=A(on,{name:"MuiTouchRipple",slot:"Ripple"})(Pe||(Pe=oe`
|
|
32
|
-
opacity: 0;
|
|
33
|
-
position: absolute;
|
|
34
|
-
|
|
35
|
-
&.${0} {
|
|
36
|
-
opacity: 0.3;
|
|
37
|
-
transform: scale(1);
|
|
38
|
-
animation-name: ${0};
|
|
39
|
-
animation-duration: ${0}ms;
|
|
40
|
-
animation-timing-function: ${0};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.${0} {
|
|
44
|
-
animation-duration: ${0}ms;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
& .${0} {
|
|
48
|
-
opacity: 1;
|
|
49
|
-
display: block;
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
background-color: currentColor;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& .${0} {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
animation-name: ${0};
|
|
59
|
-
animation-duration: ${0}ms;
|
|
60
|
-
animation-timing-function: ${0};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .${0} {
|
|
64
|
-
position: absolute;
|
|
65
|
-
/* @noflip */
|
|
66
|
-
left: 0px;
|
|
67
|
-
top: 0;
|
|
68
|
-
animation-name: ${0};
|
|
69
|
-
animation-duration: 2500ms;
|
|
70
|
-
animation-timing-function: ${0};
|
|
71
|
-
animation-iteration-count: infinite;
|
|
72
|
-
animation-delay: 200ms;
|
|
73
|
-
}
|
|
74
|
-
`),T.rippleVisible,sn,pe,({theme:e})=>e.transitions.easing.easeInOut,T.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,T.child,T.childLeaving,ln,pe,({theme:e})=>e.transitions.easing.easeInOut,T.childPulsate,un,({theme:e})=>e.transitions.easing.easeInOut),pn=a.forwardRef(function(t,n){const o=fe({props:t,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:s}=o,c=Y(o,rn),[u,d]=a.useState([]),f=a.useRef(0),b=a.useRef(null);a.useEffect(()=>{b.current&&(b.current(),b.current=null)},[u]);const g=a.useRef(!1),x=Nt(),h=a.useRef(null),C=a.useRef(null),j=a.useCallback(p=>{const{pulsate:R,rippleX:v,rippleY:y,rippleSize:L,cb:O}=p;d(E=>[...E,z.jsx(dn,{classes:{ripple:I(i.ripple,T.ripple),rippleVisible:I(i.rippleVisible,T.rippleVisible),ripplePulsate:I(i.ripplePulsate,T.ripplePulsate),child:I(i.child,T.child),childLeaving:I(i.childLeaving,T.childLeaving),childPulsate:I(i.childPulsate,T.childPulsate)},timeout:pe,pulsate:R,rippleX:v,rippleY:y,rippleSize:L},f.current)]),f.current+=1,b.current=O},[i]),V=a.useCallback((p={},R={},v=()=>{})=>{const{pulsate:y=!1,center:L=r||R.pulsate,fakeElement:O=!1}=R;if((p==null?void 0:p.type)==="mousedown"&&g.current){g.current=!1;return}(p==null?void 0:p.type)==="touchstart"&&(g.current=!0);const E=O?null:C.current,_=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let P,F,D;if(L||p===void 0||p.clientX===0&&p.clientY===0||!p.clientX&&!p.touches)P=Math.round(_.width/2),F=Math.round(_.height/2);else{const{clientX:U,clientY:N}=p.touches&&p.touches.length>0?p.touches[0]:p;P=Math.round(U-_.left),F=Math.round(N-_.top)}if(L)D=Math.sqrt((2*_.width**2+_.height**2)/3),D%2===0&&(D+=1);else{const U=Math.max(Math.abs((E?E.clientWidth:0)-P),P)*2+2,N=Math.max(Math.abs((E?E.clientHeight:0)-F),F)*2+2;D=Math.sqrt(U**2+N**2)}p!=null&&p.touches?h.current===null&&(h.current=()=>{j({pulsate:y,rippleX:P,rippleY:F,rippleSize:D,cb:v})},x.start(an,()=>{h.current&&(h.current(),h.current=null)})):j({pulsate:y,rippleX:P,rippleY:F,rippleSize:D,cb:v})},[r,j,x]),k=a.useCallback(()=>{V({},{pulsate:!0})},[V]),B=a.useCallback((p,R)=>{if(x.clear(),(p==null?void 0:p.type)==="touchend"&&h.current){h.current(),h.current=null,x.start(0,()=>{B(p,R)});return}h.current=null,d(v=>v.length>0?v.slice(1):v),b.current=R},[x]);return a.useImperativeHandle(n,()=>({pulsate:k,start:V,stop:B}),[k,V,B]),z.jsx(cn,m({className:I(T.root,i.root,s),ref:C},c,{children:z.jsx(be,{component:null,exit:!0,children:u})}))});function fn(e){return Se("MuiButtonBase",e)}const hn=ee("MuiButtonBase",["root","disabled","focusVisible"]),mn=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bn=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,s=Ve({root:["root",t&&"disabled",n&&"focusVisible"]},fn,r);return n&&o&&(s.root+=` ${o}`),s},gn=A("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${hn.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vn=a.forwardRef(function(t,n){const o=fe({props:t,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:s,className:c,component:u="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:b=!1,focusRipple:g=!1,LinkComponent:x="a",onBlur:h,onClick:C,onContextMenu:j,onDragLeave:V,onFocus:k,onFocusVisible:B,onKeyDown:p,onKeyUp:R,onMouseDown:v,onMouseLeave:y,onMouseUp:L,onTouchEnd:O,onTouchMove:E,onTouchStart:_,tabIndex:P=0,TouchRippleProps:F,touchRippleRef:D,type:U}=o,N=Y(o,mn),K=a.useRef(null),$=a.useRef(null),Oe=ue($,D),{isFocusVisibleRef:ge,onFocus:Ue,onBlur:We,ref:we}=Fe(),[W,q]=a.useState(!1);d&&W&&q(!1),a.useImperativeHandle(r,()=>({focusVisible:()=>{q(!0),K.current.focus()}}),[]);const[re,Ae]=a.useState(!1);a.useEffect(()=>{Ae(!0)},[]);const Ke=re&&!f&&!d;a.useEffect(()=>{W&&g&&!f&&re&&$.current.pulsate()},[f,g,W,re]);function S(l,xe,at=b){return X(ye=>(xe&&xe(ye),!at&&$.current&&$.current[l](ye),!0))}const Ge=S("start",v),He=S("stop",j),Xe=S("stop",V),Ye=S("stop",L),qe=S("stop",l=>{W&&l.preventDefault(),y&&y(l)}),Ze=S("start",_),Je=S("stop",O),Qe=S("stop",E),et=S("stop",l=>{We(l),ge.current===!1&&q(!1),h&&h(l)},!1),tt=X(l=>{K.current||(K.current=l.currentTarget),Ue(l),ge.current===!0&&(q(!0),B&&B(l)),k&&k(l)}),ie=()=>{const l=K.current;return u&&u!=="button"&&!(l.tagName==="A"&&l.href)},ae=a.useRef(!1),nt=X(l=>{g&&!ae.current&&W&&$.current&&l.key===" "&&(ae.current=!0,$.current.stop(l,()=>{$.current.start(l)})),l.target===l.currentTarget&&ie()&&l.key===" "&&l.preventDefault(),p&&p(l),l.target===l.currentTarget&&ie()&&l.key==="Enter"&&!d&&(l.preventDefault(),C&&C(l))}),ot=X(l=>{g&&l.key===" "&&$.current&&W&&!l.defaultPrevented&&(ae.current=!1,$.current.stop(l,()=>{$.current.pulsate(l)})),R&&R(l),C&&l.target===l.currentTarget&&ie()&&l.key===" "&&!l.defaultPrevented&&C(l)});let Z=u;Z==="button"&&(N.href||N.to)&&(Z=x);const G={};Z==="button"?(G.type=U===void 0?"button":U,G.disabled=d):(!N.href&&!N.to&&(G.role="button"),d&&(G["aria-disabled"]=d));const rt=ue(n,we,K),ve=m({},o,{centerRipple:i,component:u,disabled:d,disableRipple:f,disableTouchRipple:b,focusRipple:g,tabIndex:P,focusVisible:W}),it=bn(ve);return z.jsxs(gn,m({as:Z,className:I(it.root,c),ownerState:ve,onBlur:et,onClick:C,onContextMenu:He,onFocus:tt,onKeyDown:nt,onKeyUp:ot,onMouseDown:Ge,onMouseLeave:qe,onMouseUp:Ye,onDragLeave:Xe,onTouchEnd:Je,onTouchMove:Qe,onTouchStart:Ze,ref:rt,tabIndex:d?-1:P,type:U},G,N,{children:[s,Ke?z.jsx(pn,m({ref:Oe,center:i},F)):null]}))}),xn=ee("MuiBox",["root"]),yn=mt(),kn=Yt({themeId:ht,defaultTheme:yn,defaultClassName:xn.root,generateClassName:Ne.generate});function Cn(e){return Se("MuiButton",e)}const Q=ee("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Rn=a.createContext({}),En=a.createContext(void 0),In=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Tn=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,classes:s}=e,c={root:["root",i,`${i}${M(t)}`,`size${M(r)}`,`${i}Size${M(r)}`,`color${M(t)}`,n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${M(r)}`],endIcon:["icon","endIcon",`iconSize${M(r)}`]},u=Ve(c,Cn,s);return m({},s,u)},je=e=>m({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Mn=A(vn,{shouldForwardProp:e=>gt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${M(n.color)}`],t[`size${M(n.size)}`],t[`${n.variant}Size${M(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,o;const r=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return m({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":m({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":m({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Q.focusVisible}`]:m({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Q.disabled}`]:m({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${J.alpha(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(o=e.palette).getContrastText)==null?void 0:n.call(o,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:r,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Q.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Q.disabled}`]:{boxShadow:"none"}}),zn=A("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${M(n.size)}`]]}})(({ownerState:e})=>m({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},je(e))),$n=A("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${M(n.size)}`]]}})(({ownerState:e})=>m({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},je(e))),Ln=a.forwardRef(function(t,n){const o=a.useContext(Rn),r=a.useContext(En),i=bt(o,t),s=fe({props:i,name:"MuiButton"}),{children:c,color:u="primary",component:d="button",className:f,disabled:b=!1,disableElevation:g=!1,disableFocusRipple:x=!1,endIcon:h,focusVisibleClassName:C,fullWidth:j=!1,size:V="medium",startIcon:k,type:B,variant:p="text"}=s,R=Y(s,In),v=m({},s,{color:u,component:d,disabled:b,disableElevation:g,disableFocusRipple:x,fullWidth:j,size:V,type:B,variant:p}),y=Tn(v),L=k&&z.jsx(zn,{className:y.startIcon,ownerState:v,children:k}),O=h&&z.jsx($n,{className:y.endIcon,ownerState:v,children:h}),E=r||"";return z.jsxs(Mn,m({ownerState:v,className:I(o.className,y.root,f,E),component:d,disabled:b,focusRipple:!x,focusVisibleClassName:I(y.focusVisible,C),ref:n,type:B},R,{classes:y,children:[L,c,O]}))});export{vn as B,Me as T,qt as _,ue as a,_e as b,Nt as c,At as d,Tt as e,Rt as f,X as g,vt as h,xt as i,Ln as j,kn as k,zt as l,Fe as m,Rn as n,ke as o,En as p,Vn as r,Le as s,Gt as u};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{g as N,a as U,u as w,_ as z,b as o,c as E,d as n,e as I,s as v,f as D,k as _}from"./generateUtilityClasses-uRdMg1ON.js";import{r as F,j as g}from"./react-Vu6nbGi5.js";function K(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=_(P||(P=l`
|
|
2
|
-
0% {
|
|
3
|
-
transform: rotate(0deg);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
100% {
|
|
7
|
-
transform: rotate(360deg);
|
|
8
|
-
}
|
|
9
|
-
`)),G=_(b||(b=l`
|
|
10
|
-
0% {
|
|
11
|
-
stroke-dasharray: 1px, 200px;
|
|
12
|
-
stroke-dashoffset: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
50% {
|
|
16
|
-
stroke-dasharray: 100px, 200px;
|
|
17
|
-
stroke-dashoffset: -15px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
100% {
|
|
21
|
-
stroke-dasharray: 100px, 200px;
|
|
22
|
-
stroke-dashoffset: -125px;
|
|
23
|
-
}
|
|
24
|
-
`)),L=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,u={root:["root",s,`color${n(a)}`],svg:["svg"],circle:["circle",`circle${n(s)}`,d&&"circleDisableShrink"]};return I(u,K,e)},V=v("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${n(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(S||(S=l`
|
|
25
|
-
animation: ${0} 1.4s linear infinite;
|
|
26
|
-
`),B)),Z=v("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),q=v("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${n(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&D($||($=l`
|
|
27
|
-
animation: ${0} 1.4s ease-in-out infinite;
|
|
28
|
-
`),G)),J=F.forwardRef(function(e,s){const a=w({props:e,name:"MuiCircularProgress"}),{className:d,color:u="primary",disableShrink:M=!1,size:m=40,style:R,thickness:i=3.6,value:f=0,variant:k="indeterminate"}=a,j=z(a,W),c=o({},a,{color:u,disableShrink:M,size:m,thickness:i,value:f,variant:k}),p=L(c),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(f),h.strokeDashoffset=`${((100-f)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return g.jsx(V,o({className:E(p.root,d),style:o({width:m,height:m},x,R),ownerState:c,ref:s,role:"progressbar"},y,j,{children:g.jsx(Z,{className:p.svg,ownerState:c,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:g.jsx(q,{className:p.circle,style:h,ownerState:c,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{J as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as h,a as g,j as e}from"./react-Vu6nbGi5.js";import{C as x,A as j,f as _}from"./index-CKwxO0xv.js";import{A as N}from"./collection-dxCKqLM-.js";import{S as m}from"./SkeletonCards-BysJEVmg.js";import{L as f}from"./LoadMore-BOCtgPLI.js";import{u as C}from"./useInfiniteGrid-D88R70KF.js";import"./ethers-JeCAM1sd.js";const b=48;function F(){var i;const{contractAddress:o}=h(),d=g(),{items:s,total:c,isLoading:a,error:t,hasNextPage:u,isFetchingNextPage:n,fetchNextPage:p}=C(["collection-page",o],l=>_(o,{first:b,skip:l}),{enabled:!!o}),r=(i=s[0])==null?void 0:i.creator;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>d("/assets"),children:"Collectibles"}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:"Collection"})]}),e.jsxs("header",{className:"collection-page__head",children:[e.jsx("h1",{className:"collection-page__title",children:"Collection"}),r?e.jsx(x,{address:r,className:"collection-page__creator"}):null,e.jsx("span",{className:"muted collection-page__count",children:a?"…":`${c.toLocaleString()} item${c===1?"":"s"}`})]}),!a&&s.length>0?e.jsx(N,{items:s,source:"collection"}):null,t?e.jsx("p",{className:"error",children:"Couldn’t load this collection — please try again."}):null,e.jsx("div",{className:"grid",children:a?e.jsx(m,{count:12}):e.jsxs(e.Fragment,{children:[s.map(l=>e.jsx(j,{item:l},l.id)),n?e.jsx(m,{count:6}):null]})}),e.jsx(f,{hasNextPage:u,isFetching:n,onLoadMore:()=>p()}),!a&&!t&&s.length===0?e.jsx("p",{className:"muted",children:"This collection has no items to show."}):null]})}export{F as Collection,F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as N,j as e}from"./react-Vu6nbGi5.js";const k=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],y=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function _({panelKey:a,label:o,active:p,badge:t,align:h="left",panel:c,children:r}){const i=c.open===a,n=h==="right"?"filterbar__sort":"filterbar__trigger";return e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`${n}${i?" is-open":""}${p?" is-active":""}`,onClick:()=>c.toggle(a),children:[o," ",t?e.jsx("span",{className:"filterbar__badge",children:t}):null," ",e.jsx("span",{className:`ico ico-chevron filterbar__chev${i?" is-up":""}`,"aria-hidden":!0})]}),i?r:null]})}function $({rarities:a,onToggleRarity:o,rarityOptions:p=k,sort:t,onSort:h,sortOptions:c=y,total:r,loading:i,query:n,anyActive:f,onClear:d,renderLeading:m,renderTrailing:b}){const[x,u]=N.useState(null),s={open:x,toggle:l=>u(v=>v===l?null:l),close:()=>u(null)},j=c.find(l=>l.key===t)??c[0];return e.jsxs(e.Fragment,{children:[x?e.jsx("div",{className:"filterbar__scrim",onClick:s.close,"aria-hidden":!0}):null,e.jsxs("div",{className:"filterbar",children:[e.jsxs("div",{className:"filterbar__filters",children:[m==null?void 0:m(s),e.jsx(_,{panelKey:"rarity",label:"Rarity",active:a.length>0,badge:a.length||void 0,panel:s,children:e.jsx("div",{className:"filter-pop filter-pop--rarity",children:p.map(l=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:a.includes(l),onChange:()=>o(l)}),e.jsx("span",{children:l})]},l))})}),b==null?void 0:b(s),f?e.jsx("button",{className:"filterbar__clear",onClick:()=>{d(),s.close()},children:"Clear all"}):null]}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[i?"…":`${r.toLocaleString()} item${r===1?"":"s"}`,n?` for “${n}”`:""]}),e.jsx(_,{panelKey:"sort",label:`Sort by: ${j.label}`,align:"right",panel:s,children:e.jsx("div",{className:"filter-pop filter-pop--sort",children:c.map(l=>e.jsx("button",{className:`filter-pop__sort${l.key===t?" is-active":""}`,onClick:()=>{h(l.key),s.close()},children:l.label},l.key))})})]})]})]})}export{$ as F,y as S,_ as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RealCheckout-BXu8QwUw.js","assets/react-Vu6nbGi5.js","assets/index-CKwxO0xv.js","assets/ethers-JeCAM1sd.js","assets/index-fOgQisFj.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Y as $,h as y,Z as U,a as F,y as L,j as _,D as S,H as E,k as u,d as N,Q as R,_ as V}from"./index-CKwxO0xv.js";import{a as Y,r as l,j as e}from"./react-Vu6nbGi5.js";import{C as k}from"./CircularProgress-e_Dj0fmx.js";import"./ethers-JeCAM1sd.js";import"./generateUtilityClasses-uRdMg1ON.js";function I(){return y.shopServerUrl||y.creditsServerUrl}async function K(t,s){const r=await $(`${I()}/credits/checkout`,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:t})});if(!r.ok)throw new Error(`checkout ${r.status}: ${await r.text()}`);const{orderId:a,clientSecret:n}=await r.json();return{orderId:a,clientSecret:n,mock:!1}}async function z(t,s,r={}){const{intervalMs:a=1500,timeoutMs:n=6e4,signal:c}=r,i=Date.now()+n;for(;;){if(c!=null&&c.aborted)throw new DOMException("Aborted","AbortError");const m=await q(t,s,c);if(m.status!=="processing")return m;if(Date.now()>i)return{status:"failed",error:"Timed out waiting for your credits."};await H(a,c)}}async function q(t,s,r){const a=await $(`${I()}/credits/orders/${t}`,{method:"GET",identity:s,metadata:{},signal:r});if(!a.ok)throw new Error(`order status ${a.status}`);return a.json()}function H(t,s){return new Promise((r,a)=>{const n=setTimeout(r,t);s==null||s.addEventListener("abort",()=>{clearTimeout(n),a(new DOMException("Aborted","AbortError"))})})}const Q=.1,T=[{id:"pack_5",usd:5,credits:f(5)},{id:"pack_10",usd:10,credits:f(10)},{id:"pack_25",usd:25,credits:f(25),bestValue:!0},{id:"pack_50",usd:50,credits:f(50)}];function f(t){return Math.round(t/Q)}function G(t){return T.find(s=>s.id===t)}const x="mock_cs_",W=new Set([80002,11155111,1337,31337]);function C(){const t=!y.stripePublishableKey;if(t&&!W.has(y.chainId))throw new Error(`Stripe publishable key is missing on chainId=${y.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return t}async function J(t,s){const r=G(t);if(!r)throw new Error("Unknown pack");if(C())return Z(r);if(!(s!=null&&s.identity))throw new Error("Sign in to get credits.");return K(t,s.identity)}async function X(t,s={}){const{intervalMs:r,timeoutMs:a,signal:n,identity:c}=s;if(C()||t.startsWith(x))return ee(t,s);if(!c)throw new Error("Sign in to get credits.");return z(t,c,{intervalMs:r,timeoutMs:a,signal:n})}function Z(t){const s=`${x}${t.id}_${Date.now()}`;return M(400).then(()=>({orderId:s,clientSecret:`${x}${t.id}`,mock:!0}))}async function ee(t,s={}){await M(s.intervalMs??900);const r=t.replace(x,"").replace(/_\d+$/,""),a=G(r),n=(a==null?void 0:a.credits)??0;if(s.address&&a)try{const c=await U(s.address,Math.round(a.usd*100));return{status:"credited",creditsGranted:n,newBalance:c.credits}}catch(c){return{status:"failed",error:c.message}}return{status:"credited",creditsGranted:n,newBalance:n}}function M(t,s){return new Promise((r,a)=>{setTimeout(r,t)})}const b=C()?"mock":"stripe",se=l.lazy(()=>V(()=>import("./RealCheckout-BXu8QwUw.js"),__vite__mapDeps([0,1,2,3,4])));function P(t){const s=t;if((s==null?void 0:s.name)==="AbortError")return"You cancelled the request.";const r=((s==null?void 0:s.message)??"").toLowerCase();return r.includes("sign in")?`Sign in to get ${u.name}.`:r.includes("timed out")?`This is taking longer than usual — your ${u.name} will appear shortly.`:"Couldn't complete your purchase — please try again."}function le(){const t=Y(),{session:s,signIn:r}=F(),a=L(),[n,c]=l.useState("select"),[i,m]=l.useState(null),[h,w]=l.useState(null),[D,v]=l.useState(null),[A,p]=l.useState(null),j=l.useRef(null);l.useEffect(()=>()=>{var o;return(o=j.current)==null?void 0:o.abort()},[]);const B=l.useCallback(async o=>{if(!s){r();return}p(null),m(o),c("paying"),_("Shop Started Buy Credits",{pack_usd:o.usd,credits:o.credits,provider:b});try{const d=await J(o.id,{address:s.address,identity:s.identity});w(d)}catch(d){S(d,{flow:"get_credits",step:"checkout",provider:b}),_("Shop Buy Credits Failed",{step:"checkout",error_code:E(d),pack_usd:o.usd}),p(P(d)),c("error")}},[s,r]),O=l.useCallback(async()=>{if(!h)return;c("processing");const o=new AbortController;j.current=o;try{const d=await X(h.orderId,{signal:o.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});d.status==="credited"?(v(d.creditsGranted??(i==null?void 0:i.credits)??0),c("success"),_("Shop Completed Buy Credits",{order_id:h.orderId,pack_usd:(i==null?void 0:i.usd)??null,credits:d.creditsGranted??(i==null?void 0:i.credits)??0,provider:b}),a.invalidateQueries({queryKey:["usd-balance"]})):(_("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(i==null?void 0:i.usd)??null}),p(d.error??`Couldn't add your ${u.name} — please try again.`),c("error"))}catch(d){S(d,{flow:"get_credits",step:"grant",order_id:h.orderId}),_("Shop Buy Credits Failed",{step:"grant",error_code:E(d),pack_usd:(i==null?void 0:i.usd)??null}),p(P(d)),c("error")}},[h,i,s,a]);function g(){var o;(o=j.current)==null||o.abort(),c("select"),m(null),w(null),v(null),p(null)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsxs("h1",{className:"getcredits__title",children:["Get ",u.name]}),e.jsxs("p",{className:"muted",children:["Add ",u.name," to your account to shop. Pay with any card."]})]}),s?e.jsxs(e.Fragment,{children:[n==="select"&&e.jsx(te,{onSelect:B}),n==="paying"&&i&&e.jsx(re,{pack:i,checkout:h,onPaid:O,onCancel:g}),n==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(k,{size:40}),e.jsxs("p",{className:"getcredits__status-title",children:["Adding your ",u.name,"…"]}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),n==="success"&&e.jsxs("div",{className:"getcredits__status getcredits__status--ok",role:"status","aria-live":"polite",children:[e.jsx("div",{className:"getcredits__confetti","aria-hidden":!0,children:"🎉"}),e.jsx("p",{className:"getcredits__status-title",children:"You’re all set!"}),e.jsxs("p",{className:"muted",children:[e.jsxs("strong",{children:[e.jsx(N,{className:"ccy-mark"})," ",D]})," ",u.name," added to your account."]}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>t("/cart"),children:"Back to cart"}),e.jsxs("button",{className:"btn btn--ghost",onClick:g,children:["Get more ",u.name]})]})]}),n==="error"&&e.jsxs("div",{className:"getcredits__status getcredits__status--err",role:"alert",children:[e.jsx("p",{className:"getcredits__status-title",children:"Something went wrong"}),e.jsx("p",{className:"error",children:A}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:g,children:"Try again"})})]})]}):e.jsxs("div",{className:"getcredits__status",role:"status",children:[e.jsxs("p",{className:"getcredits__status-title",children:["Sign in to get ",u.name]}),e.jsxs("p",{className:"muted",children:["Connect your account to buy ",u.name," and start shopping."]}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn btn--purple",onClick:r,children:"Sign in"})})]})]})}function te({onSelect:t}){return e.jsx("div",{className:"packs",children:T.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>t(s),"aria-label":`Get ${R(s.credits)} for $${s.usd}`,children:[s.bestValue&&e.jsx("span",{className:"pack__ribbon",children:"Best value"}),e.jsxs("span",{className:"pack__credits",children:[e.jsx(N,{className:"pack__credits-ico"}),s.credits]}),e.jsx("span",{className:"pack__label",children:u.name}),e.jsxs("span",{className:"pack__price",children:["$",s.usd]}),e.jsxs("span",{className:"pack__cta",children:["Get ",u.name]})]},s.id))})}function re({pack:t,checkout:s,onPaid:r,onCancel:a}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:a,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:[e.jsx(N,{className:"ccy-mark"})," ",R(t.credits)]})]}),e.jsxs("div",{className:"pay__summary-row pay__summary-row--total",children:[e.jsx("span",{children:"You pay"}),e.jsxs("strong",{children:["$",t.usd]})]})]}),e.jsx("div",{className:"pay__form",children:s?s.mock?e.jsx(ae,{onPaid:r,amountUsd:t.usd}):e.jsx(l.Suspense,{fallback:e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(k,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]}),children:e.jsx(se,{clientSecret:s.clientSecret,onComplete:r})}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(k,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function ae({onPaid:t,amountUsd:s}){const[r,a]=l.useState("4242 4242 4242 4242"),[n,c]=l.useState(!1);function i(){c(!0),setTimeout(()=>t(),700)}return e.jsxs("div",{className:"card-form","aria-label":"Payment details",children:[e.jsx("p",{className:"muted small card-form__note",children:"Demo mode — no real charge is made."}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Card number"}),e.jsx("input",{value:r,onChange:m=>a(m.target.value),disabled:n,inputMode:"numeric"})]}),e.jsxs("div",{className:"card-form__row",children:[e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Expiry"}),e.jsx("input",{defaultValue:"12 / 34",disabled:n})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:n,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:i,disabled:n,children:n?"Processing…":`Pay $${s}`})]})}export{le as GetCredits,le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E,r as p,j as e,L as A}from"./react-Vu6nbGi5.js";import{j as Q,D as L,k as S,d as v,a as R,y as F,c as K,s as P}from"./index-CKwxO0xv.js";import{i as W,R as Y,f as G}from"./import-Ct60HkEi.js";import{s as O}from"./wallet-kind-DtWrr4AZ.js";import"./ethers-JeCAM1sd.js";import"./buy-Cei5j8eO.js";import"./trade-encoding-Dbk3clLx.js";import"./index-NMzNXj-b.js";import"./mana-rate-BrvfDold.js";function B({queue:l,session:I,onClose:g,onDone:h}){const x=E(),c=O(I.providerType),[d,j]=p.useState(()=>l.map(()=>"pending")),[b,C]=p.useState("running"),w=p.useRef(!1);p.useEffect(()=>{if(w.current)return;w.current=!0;let t=!1;return(async()=>{for(let s=0;s<l.length;s++){if(t)return;j(r=>r.map((m,o)=>o===s?"active":m));try{await W(l[s].item,l[s].priceCredits,I),Q("Shop Migrated Listing",{item_id:l[s].item.itemId??l[s].item.oldTradeId??null,contract_address:l[s].item.contractAddress,new_price_credits:l[s].priceCredits,new_price_usd:l[s].priceCredits/10}),t||j(r=>r.map((m,o)=>o===s?"done":m))}catch(r){if(r instanceof Y)L(r,{flow:"import_listing",step:"relist",itemId:l[s].item.itemId??l[s].item.oldTradeId}),t||j(m=>m.map((o,y)=>y===s?"unlisted":o));else{const m=r,o=m.code===4001||/reject|denied|cancel/i.test(m.message??"");o||L(r,{flow:"import_listing",itemId:l[s].item.itemId??l[s].item.oldTradeId}),t||j(y=>y.map((T,a)=>a===s?o?"skipped":"failed":T))}}}t||C("finished")})(),()=>{t=!0}},[]);const u=d.filter(t=>t==="done").length,N=d.findIndex(t=>t==="active"),_=Math.round(d.filter(t=>t!=="pending"&&t!=="active").length/l.length*100);function f(){h(),g()}if(b==="finished"){const t=d.filter(r=>r==="skipped"||r==="failed").length,s=d.filter(r=>r==="unlisted").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:u>0?"You're in the Shop! 🎉":"Nothing listed"}),e.jsxs("p",{className:"muted",style:{margin:0},children:[u>0?`${u} ${u===1?"item is":"items are"} now for sale with ${S.name}.`:"No items were listed.",t>0?` ${t} skipped — you can try those again anytime.`:"",s>0?` ${s} ${s===1?"item was":"items were"} taken off the old marketplace but couldn't be re-listed — re-list ${s===1?"it":"them"} from My Assets.`:""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:f,children:"Done"}),s>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),g(),x("/my-assets")},children:"Go to My Assets"}):u>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),g(),x("/assets")},children:"View in Shop"}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:"Listing your items"}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[c?"We take down each old listing and re-list it for credits — confirm each step.":"Moving your items to the Shop."," ",N>=0?`${N+1} of ${l.length}`:""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${_}%`}})}),e.jsx("ul",{className:"migrate__list",children:l.map((t,s)=>e.jsxs("li",{className:`migrate__row migrate__row--${d[s]}`,children:[e.jsx("span",{className:"migrate__thumb",children:t.item.thumbnail?e.jsx("img",{src:t.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:t.item.name,children:t.item.name||"Item"}),e.jsxs("span",{className:"migrate__price",children:[e.jsx(v,{className:"ccy-mark"})," ",t.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:d[s]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",c?"Confirm…":"Adding…"]}):d[s]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):d[s]==="skipped"?e.jsx("span",{className:"migrate__skip",children:"Skipped"}):d[s]==="failed"?e.jsx("span",{className:"migrate__skip",children:"Failed"}):d[s]==="unlisted"?e.jsx("span",{className:"migrate__skip",title:"Removed from the old marketplace but not re-listed — re-list it from My Assets.",children:"Not listed"}):e.jsx("span",{className:"migrate__wait",children:"Waiting"})})]},t.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:c?"A couple of quick confirmations pop up per item (take down + re-list). Keep this open.":"This only takes a moment — keep this open."})]})})}const D=[{key:"creations",title:"Your creations",sub:"Items you made. Put them on sale in the Shop."},{key:"owned",title:"Items you own",sub:"Things you've bought elsewhere — resell them in the Shop."}];function se(){const{session:l,signIn:I,restore:g}=R(),h=F(),x=l==null?void 0:l.address;p.useEffect(()=>{g()},[g]);const{data:c,isLoading:d}=K({queryKey:["importable",x],queryFn:()=>G(x),enabled:!!x}),[j,b]=p.useState({}),[C,w]=p.useState(new Set),[u,N]=p.useState(null),_=p.useMemo(()=>[...(c==null?void 0:c.creations)??[],...(c==null?void 0:c.owned)??[]],[c]);p.useEffect(()=>{_.length&&b(a=>{const n={...a};for(const i of _)n[i.oldTradeId]==null&&(n[i.oldTradeId]=i.suggestedCredits);return n})},[_]);const f=a=>!C.has(a),t=a=>j[a.oldTradeId]??a.suggestedCredits,s=_.filter(a=>f(a.oldTradeId)),r=s.reduce((a,n)=>a+t(n),0);function m(a,n){const i=n.replace(/[^\d]/g,"");b(k=>({...k,[a]:i===""?0:parseInt(i,10)}))}function o(a){w(n=>{const i=new Set(n);return i.has(a)?i.delete(a):i.add(a),i})}function y(a){return a.map(n=>({item:n,priceCredits:Math.max(1,t(n))}))}function T(){h.invalidateQueries({queryKey:["importable"]}),h.invalidateQueries({queryKey:["listings"]}),h.invalidateQueries({queryKey:["my-assets"]}),h.invalidateQueries({queryKey:["collection-sale-state"]}),P.success("Your Shop is updated.")}return l?!d&&_.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:"You're all caught up"}),e.jsx("p",{className:"muted",children:"Everything you sell is already in the Shop — nothing to import."}),e.jsx(A,{className:"btn btn--purple",to:"/my-assets",children:"Go to My Assets"})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:"Import to the Shop"}),e.jsxs("h1",{className:"imp__title",children:["Bring your listings ",e.jsx("span",{className:"imp__grad",children:"into the Shop"})]}),e.jsxs("p",{className:"imp__lede",children:["These items are already for sale elsewhere. We suggested a price in ",S.name," for each — matched to today's rate and rounded up. Adjust anything, then list them."]})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx(v,{className:"ccy-mark imp__diamond"})," 1 ",S.nameSingular," = $0.10 · prices rounded up"]}),d?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((a,n)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},n))}):D.map(a=>{const n=(c==null?void 0:c[a.key])??[];return n.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:a.title}),e.jsx("span",{className:"imp__section-sub",children:a.sub})]}),e.jsx("div",{className:"imp__list",children:n.map(i=>{const k=t(i),M=k!==i.suggestedCredits;return e.jsxs("article",{className:`imp-row${f(i.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:f(i.oldTradeId),onChange:()=>o(i.oldTradeId),"aria-label":`Include ${i.name}`}),e.jsx("div",{className:"imp-thumb",children:i.thumbnail?e.jsx("img",{src:i.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:i.name,children:i.name||"Item"}),e.jsx("span",{className:"imp-chip",children:i.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx(v,{className:"ccy-mark imp-price__diamond"}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:k.toLocaleString(),onChange:$=>m(i.oldTradeId,$.target.value),"aria-label":`Price in ${S.name} for ${i.name}`})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(k*.1).toFixed(2)]}),M?e.jsxs("button",{className:"imp-price__reset",onClick:()=>b($=>({...$,[i.oldTradeId]:i.suggestedCredits})),children:["Reset to ",e.jsx(v,{className:"ccy-mark"}),i.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!f(i.oldTradeId),onClick:()=>N(y([i])),children:"List"})})]},i.oldTradeId)})})]},a.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx(v,{className:"ccy-mark imp__diamond"})," ",r.toLocaleString()]}),e.jsxs("div",{className:"imp-dock__sub",children:[s.length," item",s.length===1?"":"s"," selected · $",(r*.1).toFixed(2)]})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsxs("button",{className:"btn btn--purple imp-dock__cta",disabled:s.length===0,onClick:()=>N(y(s)),children:["List all (",s.length,")"]})]})}),u&&l?e.jsx(B,{queue:u,session:l,onClose:()=>N(null),onDone:T}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:"Import your listings"}),e.jsx("p",{className:"muted",children:"Sign in to bring the items you already sell into the Shop."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>I(),children:"Sign in"})]})}export{se as ImportListings};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-GZKxkqGp.js","assets/react-Vu6nbGi5.js","assets/index-CKwxO0xv.js","assets/ethers-JeCAM1sd.js","assets/index-fOgQisFj.css","assets/generateUtilityClasses-uRdMg1ON.js","assets/Button-C5iun1df.js","assets/SvgIcon-CBDCsycQ.js","assets/CircularProgress-e_Dj0fmx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as e,r as c,u as fe,d as ve,a as xe,L as je}from"./react-Vu6nbGi5.js";import{_ as Ne,a as Q,K as be,N as ye,M as ge,a1 as Ie,W as we,i as A,h as Z,a2 as Ce,o as T,d as L,s as Ae,u as K,x as ke,c as P,a3 as Se,j as O,a4 as Ee,a5 as Le,q as Pe,C as Te,a6 as Y,a7 as Fe,g as Re,v as $e,w as Be,E as qe,F as Me,G as H,D as Ve,I as Oe,z as We,H as Ge,k as Ue,f as ze,a8 as De,a9 as Ke,J as Ye}from"./index-CKwxO0xv.js";import{a as J}from"./buy-Cei5j8eO.js";import{g as He,a as Je,w as Qe,S as Ze,G as Xe}from"./buy-gasless-B5QPf-sE.js";import"./ethers-JeCAM1sd.js";import"./trade-encoding-Dbk3clLx.js";import"./index-NMzNXj-b.js";const es=c.lazy(()=>Ne(()=>import("./index-GZKxkqGp.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(t=>({default:t.EmoteControls})));function ss(t){return e.jsx(c.Suspense,{fallback:null,children:e.jsx(es,{...t})})}function as({item:t}){const n=Q(I=>{var b;return(b=I.session)==null?void 0:b.address}),{data:r,isLoading:p}=be(n),g=n&&r?n:"default",m=t.category==="emote",[x,l]=c.useState("avatar"),h=!m&&x==="item",[s,i]=c.useState(!0);c.useEffect(()=>{i(!0)},[t.id,h]);const o=!!n&&!!r,f=o&&ye(t,ge(r)),N=Ie(t)[0],_=o&&!f&&!m;return e.jsxs(e.Fragment,{children:[p?null:e.jsx(we,{id:"shop-item-preview",contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0,profile:h?void 0:f?g:"default",bodyShape:h||f?void 0:N,type:m?void 0:h?A.PreviewType.WEARABLE:A.PreviewType.AVATAR,emote:m||h?void 0:A.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:m?1.5:void 0,wheelStart:m?100:void 0,dev:Z.chainId===80002,onLoad:()=>i(!1)},t.id),p||s?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,_&&!h?e.jsxs("p",{className:"item-preview__note",children:["Shown on a ",Ce(N)," body — this item isn’t made for your avatar’s shape."]}):null,m?e.jsx("div",{className:"item-preview__emote-controls",children:e.jsx(ss,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":"Preview mode",children:[e.jsx("button",{type:"button",className:x==="avatar"?"is-active":"","aria-pressed":x==="avatar",onClick:()=>l("avatar"),children:"On avatar"}),e.jsx("button",{type:"button",className:x==="item"?"is-active":"","aria-pressed":x==="item",onClick:()=>l("item"),children:"Item"})]})]})}function ts(t){return t==="male"?"♂":t==="female"?"♀":t==="unisex"?"⚥":""}function is({title:t,items:n,activeId:r,onSelect:p,onViewAll:g}){const m=c.useRef(null),x=T(i=>i.add),l=T(i=>i.items.map(o=>o.id));if(n.length===0)return null;function h(i){x(i,"carousel"),Ae.success(`“${i.name}” added to your cart.`)}function s(i){const o=m.current;o&&o.scrollBy({left:i*Math.round(o.clientWidth*.8),behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:t}),e.jsxs("div",{className:"collection-carousel__head-right",children:[g?e.jsx("button",{className:"collection-carousel__viewall",onClick:g,children:"View all"}):null,e.jsxs("div",{className:"collection-carousel__arrows",children:[e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>s(-1),"aria-label":"Scroll left",children:"‹"}),e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>s(1),"aria-label":"Scroll right",children:"›"})]})]})]}),e.jsx("div",{className:"collection-carousel__track",ref:m,children:n.map(i=>{const o=ts(i.gender),f=i.id===r,N=i.priceCredits>0,_=l.includes(i.id);return e.jsxs("article",{className:`collection-carousel__card${f?" is-active":""}`,children:[e.jsx("button",{className:"collection-carousel__select","aria-label":`View ${i.name}`,"aria-current":f||void 0,onClick:()=>p(i)}),e.jsxs("div",{className:"collection-carousel__media",children:[i.thumbnail?e.jsx("img",{className:"collection-carousel__img",src:i.thumbnail,alt:i.name,loading:"lazy"}):null,N?e.jsx("button",{className:"collection-carousel__add",disabled:_,"aria-label":_?"In cart":`Add ${i.name} to cart`,title:_?"In cart":"Add to cart",onClick:I=>{I.stopPropagation(),_||h(i)},children:e.jsx("span",{className:`ico ${_?"ico-cart-solid":"ico-cart"}`,"aria-hidden":!0})}):null]}),e.jsxs("div",{className:"collection-carousel__body",children:[e.jsx("div",{className:"collection-carousel__name",title:i.name,children:i.name}),e.jsxs("div",{className:"collection-carousel__meta",children:[N?e.jsxs("span",{className:"collection-carousel__price",children:[e.jsx(L,{className:"collection-carousel__diamond"}),i.priceCredits]}):e.jsx("span",{className:"collection-carousel__price collection-carousel__na",children:"Not listed"}),e.jsxs("span",{className:"collection-carousel__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:i.rarity}),o?e.jsx("span",{className:"chip chip--icon",children:o}):null]})]})]})]},i.id)})})]})}function rs(t){return Object.values(A.Rarity).includes(t)}function ns(t){return t==="male"?"Male":t==="female"?"Female":t==="unisex"?"Unisex":null}function cs(t){const n=t,r=(n.message??"").toLowerCase();return n.code===4001||r.includes("reject")||r.includes("denied")||r.includes("cancel")?"You cancelled the request.":r.includes("insufficient")?`You don't have enough ${Ue.name} — get more first.`:r.includes("no active listing")||r.includes("not for sale")?"This item is not for sale right now.":"Couldn't complete checkout — please try again."}function ps(){const{contractAddress:t,tokenId:n}=fe(),{state:r}=ve(),p=xe(),g=T(a=>a.add),m=T(a=>a.items),x=K(a=>a.toggle),{session:l}=Q(),{data:h}=ke(l),[s,i]=c.useState(()=>r!=null&&r.item?{...r.item,tradeId:r.tradeId??r.item.tradeId}:{id:`${t}-${n}`,name:"",creator:"",contractAddress:t??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:Z.chainId,thumbnail:"",priceCredits:0,gender:null,tokenId:n??void 0,tradeId:r==null?void 0:r.tradeId}),[o,f]=c.useState(!1),[N,_]=c.useState(null),[I,b]=c.useState(null),{data:w=[],isFetched:X}=P({queryKey:["collection-items",s.contractAddress],enabled:!!s.contractAddress,queryFn:()=>ze(s.contractAddress,{first:20}).then(a=>a.items)}),{data:F,isLoading:ee}=P({queryKey:["shop-item",s.contractAddress,n],enabled:!(r!=null&&r.item)&&!!s.contractAddress&&!!n,queryFn:()=>De(s.contractAddress,n)});c.useEffect(()=>{F&&i(a=>a.tradeId?a:{...F})},[F]);const[W,se]=c.useState(!1),{data:R=""}=P({queryKey:["item-desc",s.contractAddress,s.itemId],enabled:!!s.contractAddress&&!!s.itemId,staleTime:5*6e4,queryFn:()=>Ke(s.contractAddress,s.itemId)});c.useEffect(()=>{if(s.name||w.length===0)return;const a=n&&w.find(d=>d.tokenId===n||d.itemId===n)||w.find(d=>d.contractAddress===s.contractAddress);a&&i(d=>({...a,tradeId:d.tradeId??a.tradeId}))},[w]);const ae=c.useMemo(()=>{const a=new Set,d=[];for(const u of w){if(u.id===s.id||s.itemId&&u.itemId===s.itemId||s.tokenId&&u.tokenId===s.tokenId)continue;const E=`${u.contractAddress}-${u.itemId??u.tokenId??u.id}`;a.has(E)||(a.add(E),d.push(u))}return d},[w,s.id,s.itemId,s.tokenId]),{data:te,isLoading:k}=P({queryKey:["detail-trade",s.id,s.tradeId,s.contractAddress,s.itemId],enabled:!!s.contractAddress,queryFn:async()=>{if(s.tradeId)return s.tradeId;if(s.itemId){const a=await Ye(s.contractAddress,s.itemId);return(a==null?void 0:a.id)??null}return null}}),y=s.tradeId??te??void 0,j=!!y,ie=Se({priceCredits:s.priceCredits,compareAtCredits:s.compareAtCredits,saleEndsAt:s.saleEndsAt}),S=c.useMemo(()=>({...s,tradeId:y,id:y??s.id}),[s,y]),$=m.some(a=>a.id===S.id),B=K(a=>!!a.items[s.id]);c.useEffect(()=>{_(null),b(null)},[s.id]);const G=c.useRef(null);c.useEffect(()=>{!s.name||k||G.current===s.id||(G.current=s.id,O("Shop Viewed Item",{...Ee(s),for_sale:j}),Le(s))},[s.id,s.name,k,j]);function re(a){i(a);const d=a.tokenId??a.itemId;a.contractAddress&&d&&p(`/item/${a.contractAddress}/${d}`,{replace:!0,state:{item:a}}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}function ne(){!j||$||z||g(S,"item_detail")}async function ce(){var E;if(!j||!y)return;if(!l){b("Sign in to check out.");return}b(null),f(!0);let a,d="authorize",u=!1;try{_(`Buying ${s.name||"item"}…`);const v=await Re(y);if(!v)throw new Error("not for sale");if($e(v,l.address)){b("You can't buy your own listing."),_(null),f(!1);return}const q=(E=v.received)==null?void 0:E[0],_e=Be(q==null?void 0:q.amount),{credit:D,maxCreditedValue:pe}=await qe(l.identity,_e,y);a=D.id,d="submit";const M={trade:v,buyer:l.address,signer:l.signer,credits:[D],maxCreditedValue:pe};let C;if(He())try{C=await Je(M),await Qe(C),u=!0}catch(V){if(V instanceof Ze)u=!0;else if(V instanceof Xe)C=await J(M);else throw V}else C=await J(M);a=void 0,O("Shop Completed Purchase",{...Me([S]),payment_type:"credits",no_crypto_step:u,transaction_hash:C??null}),p("/success",{state:{items:[S],txHash:C}})}catch(v){H(v)||Ve(v,{flow:"buy",step:d,gasless:u}),a&&Oe(l.identity,[a]).catch(()=>{}),O(H(v)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:d,error_code:Ge(v),value_usd:We(S.priceCredits)}),b(cs(v)),_(null)}finally{f(!1)}}const le=rs(s.rarity)?s.rarity:A.Rarity.COMMON,[de]=A.Rarity.getGradient(le),U=ns(s.gender),oe=j&&ie,ue="More from this collection",z=Pe(s,l==null?void 0:l.address),me=j?$?"In cart":k?"Checking…":"Add to cart":"Not for sale",he=ee||!!s.contractAddress&&!X;return!s.name&&!he?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx("span",{className:"ico ico-cart item-detail__notfound-ico","aria-hidden":!0}),e.jsx("h1",{className:"item-detail__notfound-title",children:"This item isn’t available"}),e.jsx("p",{className:"muted",children:"It may have been delisted or moved. Browse Collectibles for something else."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>p("/assets"),children:"Browse Collectibles"})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>p("/assets"),children:"Collectibles"}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:s.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",style:{background:`radial-gradient(circle at 50% 38%, ${de}33 0%, var(--media) 68%)`},children:s.name?e.jsx(as,{item:s}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})})}),e.jsxs("div",{className:"item-detail__info",children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:s.name||"Loading…"}),e.jsx("button",{className:`item-detail__fav${B?" is-on":""}`,onClick:()=>x(s),"aria-pressed":B,"aria-label":B?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:"ico ico-heart","aria-hidden":!0})})]}),s.creator?e.jsx(Te,{address:s.creator,className:"item-detail__creator",linkToProfile:!0}):null,e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:s.rarity}),e.jsx("span",{className:"chip",children:s.category==="emote"?"Emote":"Wearable"}),U?e.jsx("span",{className:"chip",children:U}):null]}),R?e.jsxs("div",{className:"item-detail__description",children:[e.jsx("p",{className:`item-detail__desc-text${W?" is-expanded":""}`,children:R}),R.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>se(a=>!a),children:W?"Show less":"Read more"}):null]}):null,e.jsxs("div",{className:"item-detail__card",children:[e.jsxs("div",{className:"item-detail__price-block",children:[e.jsx("div",{className:"item-detail__price-label",children:"Price"}),j?oe?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(L,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(L,{className:"item-detail__diamond item-detail__diamond--was"}),s.compareAtCredits]}),Y(s.compareAtCredits,s.priceCredits)>0?e.jsxs("span",{className:"item-detail__sale-badge",children:["SALE -",Y(s.compareAtCredits,s.priceCredits),"%"]}):null,e.jsx(Fe,{endsAt:s.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(L,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"}),l?e.jsxs("div",{className:"item-detail__balance muted",children:["Your balance: ",e.jsx(L,{className:"ccy-mark"})," ",(h==null?void 0:h.credits)??0]}):null]}),e.jsx("div",{className:"item-detail__ctas",children:z?e.jsxs("p",{className:"item-detail__own-note muted",children:["This is your item — manage it in ",e.jsx(je,{to:"/my-assets",children:"My Assets"}),"."]}):e.jsxs(e.Fragment,{children:[j?e.jsx("button",{className:"btn btn--purple item-detail__cta",onClick:ce,disabled:o||k,children:o?"Buying…":"Buy now"}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:ne,disabled:!j||$||k||o,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),me]})]})}),N?e.jsx("p",{className:"muted item-detail__status",children:N}):null,I?e.jsx("p",{className:"error item-detail__status",children:I}):null]})]})]}),e.jsx(is,{title:ue,items:ae,activeId:s.id,onSelect:re,onViewAll:s.contractAddress?()=>p(`/collection/${s.contractAddress}`):void 0})]})}export{ps as ItemDetail,ps as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ee,r as u,j as e,b as ae}from"./react-Vu6nbGi5.js";import{c as te,h as G,a as re,x as se,y as z,g as ie,v as ne,E as oe,I,j as M,H as W,G as $,d as T,Q as H,k as U,A as ce,R as de}from"./index-CKwxO0xv.js";import{r as le,a as q,m as ue}from"./mana-rate-BrvfDold.js";import{S as Q,F as me,a as he}from"./FilterBar-CdU8B66A.js";import{S as Y}from"./SkeletonCards-BysJEVmg.js";import{L as ye}from"./LoadMore-BOCtgPLI.js";import{a as K}from"./buy-Cei5j8eO.js";import{g as pe,a as fe,w as ke,S as be,G as _e}from"./buy-gasless-B5QPf-sE.js";import{u as ge}from"./useInfiniteGrid-D88R70KF.js";import"./ethers-JeCAM1sd.js";import"./index-NMzNXj-b.js";import"./trade-encoding-Dbk3clLx.js";function xe(){return te({queryKey:["mana-rate",G.chainId],queryFn:()=>le(G.chainId),staleTime:6e4,refetchInterval:6e4,retry:1})}function O(a){const m=a,d=(m.message??"").toLowerCase();return m.code===4001||d.includes("reject")||d.includes("denied")||d.includes("cancel")?"You cancelled the request.":d.includes("insufficient")?`Not enough ${U.name} — get more first.`:d.includes("not found")||d.includes("no active listing")||d.includes("404")?"This item was just sold or removed. Refreshing the market…":d.includes("your own listing")?"You can't buy your own listing.":"Couldn't complete checkout — please try again."}function Ce(a){return{id:a.tradeId,tradeId:a.tradeId,name:a.name,creator:a.creator,contractAddress:a.contractAddress,itemId:a.itemId,category:a.category,wearableCategory:a.wearableCategory??void 0,rarity:a.rarity,network:a.network,chainId:a.chainId,thumbnail:a.thumbnail,priceCredits:0,gender:null}}function ve({listing:a,rate:m,onClose:d,onSold:p}){const{session:i}=re(),{data:o}=se(i),f=z(),k=ee(),[v,b]=u.useState("confirm"),[j,w]=u.useState("Locking today’s price…"),[x,C]=u.useState(null),[s,E]=u.useState(null),l=u.useRef(null),F=Math.ceil(q(a.manaWei,m)/10);u.useEffect(()=>{let h=!1;if(!i){b("error"),C("Sign in to check out.");return}return(async()=>{try{const r=await ie(a.tradeId);if(!r)throw new Error("not found");if(ne(r,i.address))throw new Error("You can't buy your own listing.");const c=q(a.manaWei,m);if(!Number.isFinite(c)||c<=0)throw new Error("price unavailable");const{credit:y,maxCreditedValue:R,usdCents:A}=await oe(i.identity,c,a.tradeId);if(h){I(i.identity,[y.id]).catch(()=>{});return}l.current=y.id,E({trade:r,credit:y,maxCreditedValue:R,usdCents:A,credits:Math.ceil(A/10)}),w("")}catch(r){if(h)return;console.error("[market] authorize failed",r),M($(r)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:W(r),value_usd:Math.round(q(a.manaWei,m))/100}),b("error"),C(O(r))}})(),()=>{h=!0,l.current&&i&&(I(i.identity,[l.current]).catch(()=>{}),l.current=null)}},[]);const _=!!s&&((o==null?void 0:o.credits)??0)<s.credits;async function L(){if(!i||!s)return;if(_){I(i.identity,[s.credit.id]).catch(()=>{}),l.current=null,k("/credits");return}b("working"),C(null);let h=!1;try{w("Confirming your purchase…");const r={trade:s.trade,buyer:i.address,signer:i.signer,credits:[s.credit],maxCreditedValue:s.maxCreditedValue};let c;if(pe())try{c=await fe(r),await ke(c),h=!0}catch(y){if(y instanceof be)h=!0;else if(y instanceof _e)c=await K(r);else throw y}else c=await K(r);l.current=null,M("Shop Completed Purchase",{items:[{item_id:a.itemId??null,contract_address:a.contractAddress,token_id:null,price_usd:s.usdCents/100}],value_credits:s.credits,value_usd:s.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:h,transaction_hash:c??null}),f.invalidateQueries({queryKey:["usd-balance"]}),k("/success",{state:{items:[Ce(a)],txHash:c}})}catch(r){console.error("[market] buy now failed",r),I(i.identity,[s.credit.id]).catch(()=>{}),l.current=null,M($(r)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:W(r),value_usd:s.usdCents/100}),f.invalidateQueries({queryKey:["usd-balance"]});const c=O(r);C(c),b("error"),/sold or removed/i.test(c)&&p()}}function P(){i&&s&&I(i.identity,[s.credit.id]).catch(()=>{}),l.current=null,d()}const g=v==="working";return e.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${a.name}`,children:[e.jsx("div",{className:"mkt-modal__scrim",onClick:g?void 0:P,"aria-hidden":!0}),e.jsxs("div",{className:"mkt-modal__card",children:[e.jsxs("div",{className:"mkt-modal__head",children:[e.jsx("div",{className:"mkt-modal__thumb",children:a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx("div",{className:"mkt-modal__name",title:a.name,children:a.name||"Item"}),e.jsx("span",{className:"chip chip--rarity",children:a.rarity})]})]}),e.jsx("div",{className:"mkt-modal__price",children:s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Final price"}),e.jsxs("div",{className:"mkt-modal__price-value",children:[e.jsx(T,{className:"mkt-modal__diamond"}),H(s.credits)]}),e.jsxs("div",{className:"mkt-modal__price-sub muted",children:["Locked for this purchase · $",(s.usdCents/100).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Today’s price"}),e.jsxs("div",{className:"mkt-modal__price-value mkt-modal__price-value--approx",children:[e.jsx("span",{className:"mkt-modal__approx","aria-hidden":!0,children:"≈"}),e.jsx(T,{className:"mkt-modal__diamond"}),H(F)]}),e.jsx("div",{className:"mkt-modal__price-sub muted",children:j||"Locking today’s price…"})]})}),i?e.jsxs("div",{className:"mkt-modal__balance muted",children:["Your balance: ",e.jsx(T,{className:"ccy-mark"})," ",(o==null?void 0:o.credits)??0]}):null,_?e.jsxs("p",{className:"muted mkt-modal__note",children:["You’ll need a few more ",U.name," to buy this."]}):null,j&&v==="working"?e.jsx("p",{className:"muted mkt-modal__note",children:j}):null,x?e.jsx("p",{className:"error mkt-modal__note",children:x}):null,e.jsxs("div",{className:"mkt-modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:P,disabled:g,children:"Cancel"}),e.jsx("button",{className:"btn btn--purple",onClick:L,disabled:g||!s,children:g?"Buying…":_?`Get ${U.name}`:"Confirm purchase"})]})]})]})}const je=48,B=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]}],we={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]};function Ne(a){return{id:a.tradeId,tradeId:a.tradeId,name:a.name,creator:a.creator,contractAddress:a.contractAddress,itemId:a.itemId,category:a.category,wearableCategory:a.wearableCategory??void 0,rarity:a.rarity,network:a.network,chainId:a.chainId,thumbnail:a.thumbnail,priceCredits:0,gender:null}}function Ue(){const[a]=ae(),m=(a.get("q")??"").trim().toLowerCase(),d=z(),[p,i]=u.useState("wearable"),[o,f]=u.useState(null),[k,v]=u.useState([]),[b,j]=u.useState("newest"),[w,x]=u.useState(null),C=o?we[o]:void 0,s=(Q.find(t=>t.key===b)??Q[0]).server,E={category:p,rarities:k.length?k:void 0,wearableCategories:C,search:m||void 0,sortBy:s},{items:l,total:F,isLoading:_,error:L,hasNextPage:P,isFetchingNextPage:g,fetchNextPage:h}=ge(["legacy-listings",E],t=>de({...E,first:je,skip:t})),{data:r,isError:c}=xe(),y=t=>r?ue(t.manaWei,r):null;function R(t){i(t),f(null)}function A(t){v(n=>n.includes(t)?n.filter(S=>S!==t):[...n,t])}function V(){i("wearable"),f(null),v([])}function Z(t){const n=l.find(S=>S.tradeId===t.tradeId);n&&x(n)}function D(){d.invalidateQueries({queryKey:["legacy-listings"]})}const N=B.find(t=>t.key===p)??B[0],J=o?`${N.label} · ${o}`:N.label,X=p!=="wearable"||!!o||k.length>0;return e.jsxs("div",{className:"browse",children:[e.jsxs("div",{className:"market-banner",children:[e.jsx("span",{className:"market-banner__ico","aria-hidden":!0,children:"✨"}),e.jsx("span",{children:"Prices here follow the live market and may shift slightly at checkout."})]}),c?e.jsx("p",{className:"market-banner market-banner--warn",children:"The market price is temporarily unavailable — buying is paused for a moment. Please try again shortly."}):null,e.jsx(me,{rarities:k,onToggleRarity:A,sort:b,onSort:j,total:F,loading:_,query:m,anyActive:X,onClear:V,renderLeading:t=>e.jsx(he,{panelKey:"section",label:J,active:!!o||p!=="wearable",panel:t,children:e.jsxs("div",{className:"filter-pop filter-pop--section",children:[e.jsx("ul",{className:"filter-pop__cats",children:B.map(n=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__cat${p===n.key?" is-active":""}`,onClick:()=>R(n.key),children:n.label})},n.key))}),N.sub.length?e.jsxs("ul",{className:"filter-pop__subs",children:[e.jsx("li",{children:e.jsxs("button",{className:`filter-pop__sub${o?"":" is-active"}`,onClick:()=>{f(null),t.close()},children:["All ",N.label]})}),N.sub.map(n=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__sub${o===n?" is-active":""}`,onClick:()=>{f(S=>S===n?null:n),t.close()},children:n})},n))]}):null]})})}),L?e.jsx("p",{className:"error",children:"Couldn’t load the market — please try again."}):null,e.jsx("div",{className:"grid",children:_?e.jsx(Y,{count:15}):e.jsxs(e.Fragment,{children:[l.map(t=>e.jsx(ce,{item:Ne(t),mode:"market",marketPriceCredits:y(t),onBuyNow:Z},t.tradeId)),g?e.jsx(Y,{count:6}):null]})}),e.jsx(ye,{hasNextPage:P,isFetching:g,onLoadMore:()=>h()}),!_&&l.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null,w&&r?e.jsx(ve,{listing:w,rate:r,onClose:()=>x(null),onSold:()=>{x(null),D()}}):null]})}export{Ue as Market,Ue as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as U,r as d,j as s,L as re}from"./react-Vu6nbGi5.js";import{i as z,h as V,Y as le,y as B,d as q,k as C,p as ee,j as P,s as G,D as W,H as se,a as ce,c as D,aa as oe,g as de,ab as me}from"./index-CKwxO0xv.js";import{f as ue}from"./import-Ct60HkEi.js";import{c as he}from"./buy-Cei5j8eO.js";import{a as pe,b as ge,i as be,e as ye,c as xe}from"./trade-encoding-Dbk3clLx.js";import{s as je}from"./wallet-kind-DtWrr4AZ.js";import{L as _e}from"./LoadMore-BOCtgPLI.js";import{u as fe}from"./useInfiniteGrid-D88R70KF.js";import"./ethers-JeCAM1sd.js";import"./mana-rate-BrvfDold.js";import"./index-NMzNXj-b.js";const F=()=>`${V.builderServerUrl}/v1`;function ae(e){return Array.isArray(e)?e:"results"in e&&Array.isArray(e.results)?e.results:"data"in e&&Array.isArray(e.data)?e.data:[]}async function ne(e,i){const n=await le(e,{method:"GET",identity:i,metadata:{}});if(!n.ok)throw new Error(`builder-server ${n.status}: ${await n.text()}`);const c=await n.json();return c.data??c}function Ne(e,i){const n=i-e;return n>0?n:0}function ve(e){var i,n,c,r,l;return((n=(i=e.data)==null?void 0:i.wearable)==null?void 0:n.category)??((r=(c=e.data)==null?void 0:c.emote)==null?void 0:r.category)??((l=e.data)==null?void 0:l.category)??e.type??"wearable"}function J(e){return`${F()}/storage/contents/${e}`}function $(e,i){if(!e)return"";if(/^https?:\/\//.test(e))return e;const n=i==null?void 0:i[e];return n?J(n):/^(ba|Qm)/.test(e)?J(e):""}async function Ie(e,i){try{const n=await fetch(`${F()}/items/${e}/${i}/contents`);if(!n.ok)return{};const c=await n.json();return c.data??c}catch{return{}}}async function ke(e,i,n){const c=$(e.thumbnail,e.contents)||$("thumbnail.png",e.contents);if(c)return c;if(i&&n){const r=await Ie(i,n);return $(e.thumbnail,r)||$("thumbnail.png",r)||$("image.png",r)}return""}async function we(e,i){const n=`${F()}/${e.toLowerCase()}/collections?is_published=true`,c=await ne(n,i);return ae(c).filter(r=>r.is_published&&!!r.contract_address).map(r=>({id:r.id,name:r.name,contractAddress:r.contract_address.toLowerCase(),isPublished:r.is_published,isApproved:r.is_approved,minters:(r.minters??[]).map(l=>l.toLowerCase())}))}async function Ce(e,i){const n=`${F()}/collections/${e.id}/items`,c=await ne(n,i);return(await Promise.all(ae(c).map(async l=>{const v=l.rarity??"common",_=Number(l.total_supply??0)||0;let m=0;try{m=z.Rarity.getMaxSupply(v)}catch{m=0}const f=(l.contract_address??e.contractAddress).toLowerCase(),p=l.blockchain_item_id??"";return{id:l.id,collectionId:e.id,collectionName:e.name,contractAddress:f,blockchainItemId:p,name:l.name,category:ve(l),rarity:v,thumbnail:await ke(l,f,p),type:l.type??"wearable",isPublished:l.is_published??e.isPublished,isApproved:l.is_approved??e.isApproved,totalSupply:_,maxSupply:m,remainingSupply:Ne(_,m),minters:e.minters}}))).filter(Se)}function Se(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function Ae(e,i){const n=await we(e,i);return(await Promise.all(n.map(async r=>{try{return await Ce(r,i)}catch{return[]}}))).flat()}const Pe=1e3*60*60*24*182;function $e(e){const i=e,n=(i.message??"").toLowerCase();return i.code===4001||n.includes("reject")||n.includes("denied")||n.includes("cancel")?"You cancelled the request.":"Couldn't list your item — please try again."}function Le({asset:e,session:i,onClose:n}){const c=B(),r=U(),[l,v]=d.useState("10"),[_,m]=d.useState(null),[f,p]=d.useState(null),[g,k]=d.useState(!1),[j,I]=d.useState(null);async function S(){p(null);const o=Number(l);if(!Number.isInteger(o)||o<=0){p("Enter a whole number of credits");return}k(!0);try{m("Getting your item ready…"),await pe({signer:i.signer,contractAddress:e.contractAddress,chainId:e.chainId}),m("Listing your item…");const N=await ge({signer:i.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:o/10,expiresAtMs:Date.now()+Pe});m("Publishing…"),await ee(N,i.identity),m(null),I(o),P("Shop Listed Item",{item_id:e.itemId??e.tokenId??null,contract_address:e.contractAddress,price_credits:o,price_usd:o/10,listing_type:"secondary",is_primary:!1}),G.success(`“${e.name}” is now on sale!`),c.invalidateQueries({queryKey:["my-assets",i.address]})}catch(N){W(N,{flow:"list_secondary"}),P("Shop Listing Failed",{listing_type:"secondary",error_code:se(N)}),p($e(N)),m(null)}finally{k(!1)}}function x(){n(),r(`/item/${e.contractAddress}/${e.tokenId}`)}return j!==null?s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:o=>o.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[s.jsx(q,{className:"ccy-mark"})," ",j]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:x,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:o=>o.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["List “",e.name,"”"]}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",C.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:o=>v(o.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",C.name," (1 ",C.nameSingular," = $0.10)."]}),_?s.jsx("p",{className:"muted",children:_}):null,f?s.jsx("p",{className:"error",children:f}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:S,disabled:g,children:g?"Listing…":"Put on sale"})]})]})})}const Ee=1e3*60*60*24*182;function Me(e){const i=e,n=(i.message??"").toLowerCase();return i.code===4001||n.includes("reject")||n.includes("denied")||n.includes("cancel")?"You cancelled the request.":"Couldn't publish your item — please try again."}function qe({item:e,session:i,onClose:n}){const c=B(),r=U(),[l,v]=d.useState("10"),[_,m]=d.useState(null),[f,p]=d.useState(null),[g,k]=d.useState(!1),[j,I]=d.useState(null),[S,x]=d.useState(null),o=V.chainId,N=je(i.providerType);d.useEffect(()=>{let u=!1;return(async()=>{try{const b=await be({contractAddress:e.contractAddress,chainId:o});u||I(b)}catch{u||I(!1)}})(),()=>{u=!0}},[e.contractAddress,o]);async function T(){p(null);const u=Number(l);if(!Number.isInteger(u)||u<=0){p("Enter a whole number of credits");return}k(!0);try{j||(m("Enabling sales for this collection…"),await ye({signer:i.signer,contractAddress:e.contractAddress,chainId:o}),I(!0)),m("Publishing your item…");const b=await xe({signer:i.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:z.Network.MATIC,chainId:o},usdPrice:u/10,uses:e.remainingSupply,expiresAtMs:Date.now()+Ee});m("Finishing up…"),await ee(b,i.identity),m(null),x(u),P("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:u,price_usd:u/10,listing_type:"primary",is_primary:!0}),G.success(`“${e.name}” is now on sale!`),c.invalidateQueries({queryKey:["publishable-items"]}),c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(b){W(b,{flow:"list_primary"}),P("Shop Listing Failed",{listing_type:"primary",error_code:se(b)}),p(Me(b)),m(null)}finally{k(!1)}}function O(){n(),r(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const L=g?"Listing…":j===!1?"Enable & put on sale":"Put on sale";return S!==null?s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:u=>u.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[s.jsx(q,{className:"ccy-mark"})," ",S]})," · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:O,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:u=>u.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["Publish “",e.name,"”"]}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsxs("p",{className:"muted small",children:["From your collection “",e.collectionName,"” · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",C.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:u=>v(u.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",C.name," (1 ",C.nameSingular," = $0.10)."]}),j===!1&&!g?N?s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? It needs a one-time approval, then you’ll confirm the listing — two quick confirmations. After this, listing more items from this collection is a single step."]}):s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? Setting it up takes a moment — after that, listing more items from this collection is instant."]}):j===!0&&!g?N?s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is a single confirmation."}):s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is instant."}):null,_?s.jsx("p",{className:"muted",children:_}):null,f?s.jsx("p",{className:"error",children:f}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:T,disabled:g||j===null,children:j===null?"Checking…":L})]})]})})}const Fe=48;function Te(e){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:e.listingPrice??0,gender:null,tokenId:e.tokenId}}function Z(e){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:V.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null}}function He(){const{session:e,error:i,signIn:n,restore:c}=ce(),r=U(),l=B(),[v,_]=d.useState(null),[m,f]=d.useState(null),[p,g]=d.useState(null),[k,j]=d.useState(null);function I(a){const t=a.tokenId??a.itemId??"";!a.contractAddress||!t||r(`/item/${a.contractAddress}/${t}`,{state:{item:a}})}async function S(a,t,h){if(e){j(null),g(h);try{const y=await de(a);await he({trade:y,signer:e.signer}),G.success(`“${t}” is no longer for sale.`),await l.invalidateQueries({queryKey:["my-assets",e.address]}),await l.invalidateQueries({queryKey:["collection-sale-state"]})}catch(y){const E=y,M=(E.message??"").toLowerCase(),X=E.code===4001||M.includes("reject")||M.includes("denied");X||W(y,{flow:"remove-listing",tradeId:a}),j(X?"You cancelled the request.":"Couldn't remove the listing — please try again.")}finally{g(null)}}}d.useEffect(()=>{c()},[c]);const x=e==null?void 0:e.address,{items:o,isLoading:N,error:T,hasNextPage:O,isFetchingNextPage:L,fetchNextPage:u}=fe(["my-assets",x],a=>oe(x,{first:Fe,skip:a}).then(t=>({items:t.assets,total:t.total})),{enabled:!!x}),{data:b}=D({queryKey:["importable",x],queryFn:()=>ue(x),enabled:!!x}),R=((b==null?void 0:b.creations.length)??0)+((b==null?void 0:b.owned.length)??0),{data:A,isLoading:te,isError:ie}=D({queryKey:["publishable-items",x],queryFn:()=>Ae(x,e.identity),enabled:!!e,retry:!1}),K=d.useMemo(()=>[...new Set((A??[]).map(a=>a.contractAddress))],[A]),{data:w}=D({queryKey:["collection-sale-state",x,K],enabled:K.length>0,queryFn:async()=>{const a=await Promise.all(K.map(async h=>[h,await me(h)])),t={};for(const[h,y]of a)for(const[E,M]of Object.entries(y))t[`${h}-${E}`]=M;return t}}),Q=a=>w==null?void 0:w[`${a.contractAddress}-${a.blockchainItemId}`],Y=d.useMemo(()=>(A??[]).filter(a=>{var t;return(t=Q(a))==null?void 0:t.isOnSale}),[A,w]),H=d.useMemo(()=>{var t;const a=new Map;for(const h of A??[]){if((t=w==null?void 0:w[`${h.contractAddress}-${h.blockchainItemId}`])!=null&&t.isOnSale)continue;const y=a.get(h.collectionId)??{id:h.collectionId,name:h.collectionName,items:[]};y.items.push(h),a.set(h.collectionId,y)}return[...a.values()]},[A,w]);return e?s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),R>0?s.jsxs(re,{className:"import-banner",to:"/import",children:[s.jsx("span",{className:"import-banner__ico","aria-hidden":!0,children:"📦"}),s.jsxs("span",{className:"import-banner__text",children:[s.jsx("strong",{children:"Import your listings"}),s.jsxs("span",{className:"import-banner__sub",children:["You have ",R," item",R===1?"":"s"," for sale elsewhere — bring them into the Shop."]})]}),s.jsx("span",{className:"import-banner__cta",children:"Import"})]}):null,s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Items you own"}),s.jsx("p",{className:"myassets__section-sub",children:"Wearables & emotes you’ve bought — resell them in the Shop."})]}),T?s.jsx("p",{className:"error",children:"Couldn’t load your items — please try again."}):null,k?s.jsx("p",{className:"error",children:k}):null,s.jsxs("div",{className:"asset-grid",children:[N?Array.from({length:8}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${t}`)):o.map(a=>s.jsxs("article",{className:"asset-card asset-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${a.name}`,onClick:()=>I(Te(a))}),s.jsx("div",{className:"asset-card__img",children:a.image?s.jsx("img",{src:a.image,alt:a.name}):null}),s.jsx("div",{className:"asset-card__name",title:a.name,children:a.name}),a.isOnSale?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"asset-card__listed",children:[s.jsxs("span",{className:"asset-card__price",children:[s.jsx(q,{className:"ccy-mark"})," ",a.listingPrice]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:p===a.id||!a.tradeId,onClick:t=>{t.stopPropagation(),a.tradeId&&S(a.tradeId,a.name,a.id)},children:p===a.id?"Removing…":"Remove listing"})]}):s.jsx("button",{className:"btn btn--sm",onClick:t=>{t.stopPropagation(),P("Shop Started Listing",{listing_type:"secondary",item_id:a.itemId??a.tokenId??null}),_(a)},children:"Put on sale"})]},a.id)),L?Array.from({length:4}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`msk-${t}`)):null]}),s.jsx(_e,{hasNextPage:O,isFetching:L,onLoadMore:()=>u()}),!N&&o.length===0?s.jsx("p",{className:"muted",children:"No items in your wardrobe yet."}):null]}),s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Your creations"}),s.jsxs("p",{className:"myassets__section-sub",children:["Items you made. Put them on sale in the Shop — set a price in ",C.name," and buyers pay with ",C.name,"."]})]}),te?s.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${t}`))}):ie?s.jsx("p",{className:"publish-empty",children:"We couldn’t load your collections right now. Please try again in a moment."}):Y.length===0&&H.length===0?s.jsx("p",{className:"publish-empty",children:"You don’t have any items to publish yet."}):s.jsxs(s.Fragment,{children:[Y.length>0?s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:"On sale"}),s.jsx("div",{className:"publish-grid",children:Y.map(a=>{var t;return s.jsxs("article",{className:"publish-card publish-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${a.name}`,onClick:()=>I(Z(a))}),s.jsx("div",{className:"publish-card__img",children:a.thumbnail?s.jsx("img",{src:a.thumbnail,alt:a.name}):null}),s.jsx("div",{className:"publish-card__name",title:a.name,children:a.name}),s.jsxs("div",{className:"publish-card__listed",children:[s.jsxs("span",{className:"publish-card__price",children:[s.jsx(q,{className:"ccy-mark"})," ",((t=Q(a))==null?void 0:t.priceCredits)??0]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost publish-card__cta",disabled:p===a.id,onClick:h=>{h.stopPropagation();const y=Q(a);y!=null&&y.tradeId&&S(y.tradeId,a.name,a.id)},children:p===a.id?"Removing…":"Remove listing"})]},`${a.contractAddress}-${a.blockchainItemId}`)})})]}):null,H.map(a=>s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:a.name}),s.jsx("div",{className:"publish-grid",children:a.items.map(t=>s.jsxs("article",{className:"publish-card publish-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${t.name}`,onClick:()=>I(Z(t))}),s.jsx("div",{className:"publish-card__img",children:t.thumbnail?s.jsx("img",{src:t.thumbnail,alt:t.name}):null}),s.jsx("div",{className:"publish-card__name",title:t.name,children:t.name}),s.jsxs("div",{className:"publish-card__meta",children:[s.jsx("span",{className:"publish-chip publish-chip--rarity",children:t.rarity}),s.jsxs("span",{className:"publish-card__supply",children:[t.remainingSupply.toLocaleString()," available"]})]}),s.jsx("button",{className:"btn btn--sm btn--purple publish-card__cta",onClick:h=>{h.stopPropagation(),P("Shop Started Listing",{listing_type:"primary",item_id:t.blockchainItemId}),f(t)},children:"Put on sale"})]},`${t.contractAddress}-${t.blockchainItemId}`))})]},a.id))]})]}),v?s.jsx(Le,{asset:v,session:e,onClose:()=>_(null)}):null,m?s.jsx(qe,{item:m,session:e,onClose:()=>f(null)}):null]}):s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),s.jsx("p",{className:"muted",children:"Sign in to sell your items."}),s.jsx("div",{className:"connect-row",children:s.jsx("button",{className:"btn btn--purple",onClick:()=>n(),children:"Sign in"})}),i?s.jsx("p",{className:"error",children:i}):null]})}export{He as MyAssets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as C,i as k,w as A,T as O,h as B,j as M,r as U,l as D,m as V,g as q,a as G,u as L,_ as W,c as H,d as P,e as J,s as K}from"./generateUtilityClasses-uRdMg1ON.js";import{r as y,j as N}from"./react-Vu6nbGi5.js";var Q=k,X=function(e){return e!=="theme"},T=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?Q:X},E=function(e,o,a){var t;if(o){var l=o.shouldForwardProp;t=e.__emotion_forwardProp&&l?function(d){return e.__emotion_forwardProp(d)&&l(d)}:l}return typeof t!="function"&&a&&(t=e.__emotion_forwardProp),t},Y=function(e){var o=e.cache,a=e.serialized,t=e.isStringTag;return U(o,a,t),D(function(){return V(o,a,t)}),null},Z=function r(e,o){var a=e.__emotion_real===e,t=a&&e.__emotion_base||e,l,d;o!==void 0&&(l=o.label,d=o.target);var m=E(e,o,a),g=m||T(t),f=!g("as");return function(){var u=arguments,i=a&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(l!==void 0&&i.push("label:"+l+";"),u[0]==null||u[0].raw===void 0)i.push.apply(i,u);else{var p=u[0];i.push(p[0]);for(var h=u.length,c=1;c<h;c++)i.push(u[c],p[c])}var s=A(function(n,v,_){var z=f&&n.as||t,S="",$=[],b=n;if(n.theme==null){b={};for(var I in n)b[I]=n[I];b.theme=y.useContext(O)}typeof n.className=="string"?S=B(v.registered,$,n.className):n.className!=null&&(S=n.className+" ");var F=M(i.concat($),v.registered,b);S+=v.key+"-"+F.name,d!==void 0&&(S+=" "+d);var j=f&&m===void 0?T(z):g,w={};for(var x in n)f&&x==="as"||j(x)&&(w[x]=n[x]);return w.className=S,_&&(w.ref=_),y.createElement(y.Fragment,null,y.createElement(Y,{cache:v,serialized:F,isStringTag:typeof z=="string"}),y.createElement(z,w))});return s.displayName=l!==void 0?l:"Styled("+(typeof t=="string"?t:t.displayName||t.name||"Component")+")",s.defaultProps=e.defaultProps,s.__emotion_real=s,s.__emotion_base=t,s.__emotion_styles=i,s.__emotion_forwardProp=m,Object.defineProperty(s,"toString",{value:function(){return"."+d}}),s.withComponent=function(n,v){var _=r(n,C({},o,v,{shouldForwardProp:E(s,v,!0)}));return _.apply(void 0,i)},s}},ee=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],R=Z.bind(null);ee.forEach(function(r){R[r]=R(r)});function te(r){return q("MuiSvgIcon",r)}G("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const re=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],oe=r=>{const{color:e,fontSize:o,classes:a}=r,t={root:["root",e!=="inherit"&&`color${P(e)}`,`fontSize${P(o)}`]};return J(t,te,a)},ae=K("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:o}=r;return[e.root,o.color!=="inherit"&&e[`color${P(o.color)}`],e[`fontSize${P(o.fontSize)}`]]}})(({theme:r,ownerState:e})=>{var o,a,t,l,d,m,g,f,u,i,p,h,c;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(o=r.transitions)==null||(a=o.create)==null?void 0:a.call(o,"fill",{duration:(t=r.transitions)==null||(t=t.duration)==null?void 0:t.shorter}),fontSize:{inherit:"inherit",small:((l=r.typography)==null||(d=l.pxToRem)==null?void 0:d.call(l,20))||"1.25rem",medium:((m=r.typography)==null||(g=m.pxToRem)==null?void 0:g.call(m,24))||"1.5rem",large:((f=r.typography)==null||(u=f.pxToRem)==null?void 0:u.call(f,35))||"2.1875rem"}[e.fontSize],color:(i=(p=(r.vars||r).palette)==null||(p=p[e.color])==null?void 0:p.main)!=null?i:{action:(h=(r.vars||r).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(c=(r.vars||r).palette)==null||(c=c.action)==null?void 0:c.disabled,inherit:void 0}[e.color]}}),ne=y.forwardRef(function(e,o){const a=L({props:e,name:"MuiSvgIcon"}),{children:t,className:l,color:d="inherit",component:m="svg",fontSize:g="medium",htmlColor:f,inheritViewBox:u=!1,titleAccess:i,viewBox:p="0 0 24 24"}=a,h=W(a,re),c=y.isValidElement(t)&&t.type==="svg",s=C({},a,{color:d,component:m,fontSize:g,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:c}),n={};u||(n.viewBox=p);const v=oe(s);return N.jsxs(ae,C({as:m,className:H(v.root,l),focusable:"false",color:f,"aria-hidden":i?void 0:!0,role:i?"img":void 0,ref:o},n,h,c&&t.props,{ownerState:s,children:[c?t.props.children:t,i?N.jsx("title",{children:i}):null]}))});ne.muiName="SvgIcon";export{ne as S,R as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as r}from"./utils-BmX8TqzP.js";import{d as a}from"./decimals-teeH97v6.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./signing-BNXs2XCn.js";import"./index-CKwxO0xv.js";async function s(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{s as decimals};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i}from"./signing-BNXs2XCn.js";import"./utils-BmX8TqzP.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./index-CKwxO0xv.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,a as r}from"./signing-BNXs2XCn.js";import"./utils-BmX8TqzP.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./index-CKwxO0xv.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
|