@dcl/shop 1.4.2-31318756114.commit-f38062f → 1.4.2-31320232662.commit-67c8edd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity-CH13MWoB.js → Activity-BdAxoMGz.js} +24 -24
- package/_assets/{AnimatedBackground-BtahI2yr.js → AnimatedBackground-DIYjRLfQ.js} +1 -1
- package/_assets/{Assets-B0RTY_4B.js → Assets-CMjWqa8e.js} +2 -2
- package/_assets/{Assets.styles-Cf5P2KoZ.js → Assets.styles-CttJZDai.js} +1 -1
- package/_assets/{Authorizations-C_kJKK0F.js → Authorizations-0OipAfL0.js} +1 -1
- package/_assets/{Cart-DAFR_U42.js → Cart-Bp-r3d9U.js} +57 -57
- package/_assets/{CircularProgress-F5pVOzox.js → CircularProgress-BfW1acKe.js} +1 -1
- package/_assets/{Collection-BFgBwwbW.js → Collection-CBonBbbE.js} +1 -1
- package/_assets/{CollectionCarousel-CTXfQk3n.js → CollectionCarousel-uNk2LGYe.js} +89 -97
- package/_assets/{Confetti-xJuLJyZt.js → Confetti-CGHIAnI_.js} +1 -1
- package/_assets/{ConstantsUtil-CDQZixBe.js → ConstantsUtil-B2POGKSZ.js} +1 -1
- package/_assets/{ContentClient-mI39sHYs.js → ContentClient-xK7WjQYC.js} +1 -1
- package/_assets/{Creator-CtfIixjn.js → Creator-ssK4f2lG.js} +1 -1
- package/_assets/{DeploymentBuilder-BZ6GZi6C.js → DeploymentBuilder-CBoTe7Ib.js} +1 -1
- package/_assets/{ErrorNotice-Bbr5IZyl.js → ErrorNotice-Cj_6GjVe.js} +1 -1
- package/_assets/{ExchangeController-_JFGiO87.js → ExchangeController-DJ_-zVyG.js} +1 -1
- package/_assets/{Faq-Ok7Xf6Az.js → Faq-CAe7bWDz.js} +1 -1
- package/_assets/{GetCredits-B_Bu8SA3.js → GetCredits-FYc91tww.js} +1 -1
- package/_assets/{Grow-Cg_pp1bL.js → Grow-CbDQYXoV.js} +1 -1
- package/_assets/{HelpersUtil-8laLxS6i.js → HelpersUtil-DQRjpxjs.js} +1 -1
- package/_assets/ItemDetail-DBmRXgXP.js +3582 -0
- package/_assets/LazyEmoteControls-VrjfrOSh.js +2 -0
- package/_assets/{LoadMore-BElYLyIk.js → LoadMore-C2i1PhLK.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-W1xFuPQc.js → ManaPricingBanner.styles-C8bcpj3e.js} +1 -1
- package/_assets/{MyAssets-DpRrVTC0.js → MyAssets-BroQxiDd.js} +2 -2
- package/_assets/{MyFavorites-CSAgjHyS.js → MyFavorites-CfPh80xk.js} +1 -1
- package/_assets/{NetworkUtil-rxhycXNt.js → NetworkUtil-Z15mPh_4.js} +1 -1
- package/_assets/{NotFound-BMSaGsh7.js → NotFound-DQfIwr43.js} +1 -1
- package/_assets/{NotificationsBell-BdF1-lqB.js → NotificationsBell-V26yRgY-.js} +1 -1
- package/_assets/{OutfitDetail-CTNY93aj.js → OutfitDetail-EKCBwISz.js} +1 -1
- package/_assets/{OutfitPreview-C88DTtOy.js → OutfitPreview-C9uI8CCA.js} +1 -1
- package/_assets/{OutfitStudio-iXMGFuFY.js → OutfitStudio-CNF81Bbr.js} +1 -1
- package/_assets/{StoreSettings-DVLJIj5-.js → StoreSettings-AjfFeMpm.js} +1 -1
- package/_assets/{Success-f4IsZ-t8.js → Success-mkJhfdY1.js} +1 -1
- package/_assets/{SwapController-CuIGfv30.js → SwapController-BORbGJ3r.js} +1 -1
- package/_assets/{Tooltip-BggcwAzU.js → Tooltip-y1IDtVA-.js} +1 -1
- package/_assets/{TradeService-C8ffaOhF.js → TradeService-BGpdEFPI.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-YT2v-UAO.js → W3MFrameProviderSingleton-VHXt_Dup.js} +3 -3
- package/_assets/{WebCryptoP256-C_HNQel2.js → WebCryptoP256-CjrIvt3n.js} +1 -1
- package/_assets/{authorizations-B2lXGBml.js → authorizations-BaNXoIur.js} +1 -1
- package/_assets/{basic-XjYpshyi.js → basic-DnWEg-Hy.js} +1 -1
- package/_assets/{biconomy-tjuOVhE0.js → biconomy-NjQ2Dmhu.js} +1 -1
- package/_assets/{builder-w2ONbPIy.js → builder-DM3aazAh.js} +1 -1
- package/_assets/{buy-CWZqT4z9.js → buy-DmWa92vh.js} +1 -1
- package/_assets/{buy-gasless-CPOiesVv.js → buy-gasless-B5osCtXy.js} +1 -1
- package/_assets/{categories-C2_r6452.js → categories-DpAor7GL.js} +1 -1
- package/_assets/{ccip-DwB2U-aT.js → ccip-BVHqSS4d.js} +1 -1
- package/_assets/{ccip-DQx2BHRK.js → ccip-Cgrq5RUR.js} +1 -1
- package/_assets/{chains-CeaUuyFk.js → chains-By8mU0dh.js} +1 -1
- package/_assets/{collectionPage.styles-RfmLM7o-.js → collectionPage.styles-CvHG8rEi.js} +6 -6
- package/_assets/{common-CuD9cq2y.js → common-BcsxxowX.js} +1 -1
- package/_assets/{controller-Ggie9io6.js → controller-BkLD67E5.js} +2 -2
- package/_assets/{core-6hPESr7t.js → core-DuF2V96A.js} +4 -4
- package/_assets/{createSvgIcon-DeL6nQf4.js → createSvgIcon-BJ59eVcB.js} +1 -1
- package/_assets/{custom-DeqKJYGU.js → custom-CvLb4FsW.js} +1 -1
- package/_assets/{data-capture-Blelq03f.js → data-capture-ClEtGdRs.js} +1 -1
- package/_assets/{decimals-D_zJ1SGP.js → decimals-B-d9FEU2.js} +1 -1
- package/_assets/decimals-QWia76Wg.js +1 -0
- package/_assets/{detectExtension-fXngWuJO.js → detectExtension-BPuwEotb.js} +1 -1
- package/_assets/{email-Jtvek7bj.js → email-C08V-8ux.js} +1 -1
- package/_assets/{embedded-wallet-Bq0TA7ov.js → embedded-wallet-BElTHCsr.js} +1 -1
- package/_assets/{emotion-styled.browser.esm--4ZBXTCj.js → emotion-styled.browser.esm-D13cOINT.js} +1 -1
- package/_assets/{engine-DvcQogdJ.js → engine-iQSxZVqw.js} +1 -1
- package/_assets/{errors-B9awri0w.js → errors-CzM6yGIv.js} +1 -1
- package/_assets/{estimate-l1-fee-wvYMkwDp.js → estimate-l1-fee-U8wYh3LI.js} +1 -1
- package/_assets/{eth_estimateGas-DpK9Ktrh.js → eth_estimateGas-CKQJj2K0.js} +1 -1
- package/_assets/{eth_getStorageAt-ClWWqBA4.js → eth_getStorageAt-4sxYy_Jr.js} +1 -1
- package/_assets/{eth_getTransactionCount-C_i4wN3-.js → eth_getTransactionCount-D1Og_RPu.js} +1 -1
- package/_assets/{ethereum-B5wbQK7D.js → ethereum-BEUMKHrg.js} +1 -1
- package/_assets/{ethers-KA0WcT1W.js → ethers-BNVA8Ulg.js} +1 -1
- package/_assets/{execute-aC9iqBZr.js → execute-xHfFbMoj.js} +2 -2
- package/_assets/{extractIPFS-H0uQRNED.js → extractIPFS-BEELAV_x.js} +1 -1
- package/_assets/{features-Boe0CxL-.js → features-DBtzFO_F.js} +1 -1
- package/_assets/{fetchTokenMetadata-BoHjxKKz.js → fetchTokenMetadata-GfgwdJZG.js} +2 -2
- package/_assets/{field.styles-Bh0QuWM6.js → field.styles-CZwOpnoa.js} +1 -1
- package/_assets/{get-bytecode-BMQIr7AZ.js → get-bytecode-BEMOpY2b.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-SvSMJ_On.js +1 -0
- package/_assets/{getBalance-nz_Qfvtt.js → getBalance-CYH8e_b5.js} +2 -2
- package/_assets/{getInstalledModules-D3z1V1WH.js → getInstalledModules-BM-l77Ll.js} +1 -1
- package/_assets/{getNFT-odvi-29q.js → getNFT-CIsqj__I.js} +2 -2
- package/_assets/getNFT-CLGff01G.js +1 -0
- package/_assets/{grid.styles-BJJTujqb.js → grid.styles-B7zcogve.js} +1 -1
- package/_assets/{hashTypedData-FbzHIrFn.js → hashTypedData-84EgDalm.js} +1 -1
- package/_assets/{hashTypedData-CLiDq9rD.js → hashTypedData-DBVGTBcM.js} +1 -1
- package/_assets/{in-app-Dc5R2ez_.js → in-app-D2kSN_gx.js} +1 -1
- package/_assets/{in-app-wallet-calls-CC8PxAps.js → in-app-wallet-calls-BbxRzVzw.js} +1 -1
- package/_assets/{index-CbDYHEhS.js → index--bo6LqEP.js} +1 -1
- package/_assets/{index-CZBzbQ0F.js → index-BBxP7Xj6.js} +1 -1
- package/_assets/{index-Bm0qdptx.js → index-BCTMLcN4.js} +1 -1
- package/_assets/{index-vjg1njrW.js → index-BD4x10wc.js} +3 -3
- package/_assets/{index-C8IS1XP2.js → index-BLWyTxxJ.js} +3 -3
- package/_assets/{index-B132S8vh.js → index-BR5Yn0OB.js} +1 -1
- package/_assets/{index-Niu6qsRx.js → index-BXnU3ijX.js} +1 -1
- package/_assets/{index-CheVn-Gb.js → index-BYGYGs2x.js} +1 -1
- package/_assets/{index-D00Vge6w.js → index-BZ6IWdQe.js} +1 -1
- package/_assets/{index-BHPo3ekW.js → index-B_ly0Z2A.js} +1 -1
- package/_assets/{index-BgQVMC1A.js → index-BfG6o5pX.js} +1 -1
- package/_assets/{index-Bs3LqO7Q.js → index-BgMaz2hI.js} +1 -1
- package/_assets/{index-BagqxFca.js → index-BjnTnm5a.js} +1 -1
- package/_assets/{index-BOqYML9Z.js → index-Bl6_ul-D.js} +1 -1
- package/_assets/{index-Deh1RDqU.js → index-BpUJu53B.js} +1 -1
- package/_assets/{index-D_Fy7dRk.js → index-Bqo1OSdb.js} +1 -1
- package/_assets/{index--7OC6PCI.js → index-BuHDEdAX.js} +1 -1
- package/_assets/{index-4Es0FX7_.js → index-BzzbhdF8.js} +2 -2
- package/_assets/{index-DIF4isXI.js → index-C6rHL4F2.js} +1 -1
- package/_assets/{index-Dz7CytEG.js → index-CDhroxCr.js} +1 -1
- package/_assets/{index-Bv6DmmCw.js → index-CMJlOjfB.js} +1 -1
- package/_assets/{index-Du2tzQIs.js → index-COJM8DHh.js} +1 -1
- package/_assets/{index-BeEyqq5A.js → index-COzviLA0.js} +1 -1
- package/_assets/{index-D_seoFht.js → index-Ccca6YnC.js} +1 -1
- package/_assets/{index-DWdQDIa2.js → index-CilR-prW.js} +1 -1
- package/_assets/{index-CrCNYDrn.js → index-Cmw0oYam.js} +1 -1
- package/_assets/{index-tXaUa8Cs.js → index-Cn8YM8FO.js} +1 -1
- package/_assets/{index-DJTY02Lm.js → index-CowIypOj.js} +1 -1
- package/_assets/{index-BWIedksf.js → index-CsJo38ms.js} +1 -1
- package/_assets/{index-BTR_LXd2.js → index-CtbRzA22.js} +1 -1
- package/_assets/{index-4edBJ43Q.js → index-CwHpUcBq.js} +1 -1
- package/_assets/{index-DOMF5Qpu.js → index-D9n9IfPO.js} +2 -2
- package/_assets/{index-Chx3QVFR.js → index-DB756UVD.js} +1 -1
- package/_assets/{index-BLV9z85v.js → index-DB8ptMg5.js} +2 -2
- package/_assets/{index-B2257SH-.js → index-DDRHocw2.js} +1 -1
- package/_assets/{index-CgEFqINh.js → index-DI8sKT_C.js} +1 -1
- package/_assets/{index-CMUsZlxr.js → index-DMPUvtDu.js} +1 -1
- package/_assets/{index-ByqdPx-g.js → index-DOu_RZ8c.js} +1 -1
- package/_assets/{index-D4WtCbvP.js → index-DQv9RCQq.js} +68 -68
- package/_assets/{index-BfN8JyCc.js → index-DQzKOoZ0.js} +1 -1
- package/_assets/{index-BdxoCMJE.js → index-DRM_4dlS.js} +1 -1
- package/_assets/{index-B5yfAnPU.js → index-DVVwr_DU.js} +1 -1
- package/_assets/{index-Bl2zhAS_.js → index-DaynmOMh.js} +1 -1
- package/_assets/{index-CwLrALgf.js → index-DggjePc0.js} +1 -1
- package/_assets/{index-Co0PSPLX.js → index-DicNx8gJ.js} +1 -1
- package/_assets/{index-DCC4AH_W.js → index-DquNz2me.js} +1 -1
- package/_assets/{index-hhwq3d4P.js → index-DrQW2qs5.js} +3 -3
- package/_assets/{index-B1jABDUh.js → index-DrcIVK2p.js} +1 -1
- package/_assets/{index-VzCVOadZ.js → index-DtbcRO9g.js} +1 -1
- package/_assets/{index-Dmadp6QB.js → index-Du3nsemu.js} +2 -2
- package/_assets/{index-Df6A1qsv.js → index-KChlNz82.js} +1 -1
- package/_assets/{index-CR4kmTnE.js → index-SXkCoPPZ.js} +1 -1
- package/_assets/{index-DV_oamj_.js → index-U7HEkcvX.js} +1 -1
- package/_assets/{index-D5-D9dKC.js → index-VasVoe6e.js} +1 -1
- package/_assets/{index-CXQ7hfZf.js → index-XPCOdV7R.js} +1 -1
- package/_assets/{index-CuzwAHOg.js → index-Yq74iVgG.js} +1 -1
- package/_assets/{index-avyoZsuC.js → index-cAd-kulP.js} +1 -1
- package/_assets/{index-B0Vq5ejV.js → index-pju1O06J.js} +1 -1
- package/_assets/{index-CO1boh5B.js → index-pvUm6DNB.js} +1 -1
- package/_assets/{index-DQ_VLK_b.js → index-rT-9B6j-.js} +1 -1
- package/_assets/{index-DBHaPShO.js → index-vrn7z-wj.js} +1 -1
- package/_assets/{index-G_eDeNVf.js → index-wQcK3tLf.js} +1 -1
- package/_assets/{index.es-CL05QnJW.js → index.es-B9guaNnV.js} +1 -1
- package/_assets/{index.es-Dc6t3ivq.js → index.es-C4ahaUkG.js} +4 -4
- package/_assets/{index.es-CLntoI58.js → index.es-DWweMtzF.js} +1 -1
- package/_assets/{linkAccount-PtSN0QcL.js → linkAccount-DvBA_d5f.js} +1 -1
- package/_assets/{localBatchGatewayRequest-BFytMsdf.js → localBatchGatewayRequest-D55IAvhY.js} +1 -1
- package/_assets/{native-dHHbZdbJ.js → native-am5dw0PN.js} +1 -1
- package/_assets/{networks-yQg4rbqq.js → networks-Celeq4CX.js} +1 -1
- package/_assets/{onramp-D_yYR0s5.js → onramp-DJxOit2Y.js} +1 -1
- package/_assets/{openzeppelin-BLjFbX3r.js → openzeppelin-iutICZox.js} +1 -1
- package/_assets/{ownerOf-B0wWnGAM.js → ownerOf-KPcimPwP.js} +1 -1
- package/_assets/{parseNft-CUXYgxsd.js → parseNft-BP8ry6m6.js} +2 -2
- package/_assets/{parseSignature-B4E7CQmy.js → parseSignature-D9XRu0Am.js} +3 -3
- package/_assets/{parseSignature-auGHp-jm.js → parseSignature-sddzt64t.js} +1 -1
- package/_assets/{passkeys-BZSRAVgt.js → passkeys-B0sj7Vge.js} +1 -1
- package/_assets/{pay-with-exchange-uqccuNZX.js → pay-with-exchange-CJJvdHOU.js} +1 -1
- package/_assets/{prepare-contract-call-D2QFN7zR.js → prepare-contract-call-COp3d1ll.js} +1 -1
- package/_assets/{qr-overlay-BNMX_WIE.js → qr-overlay-d6czDO7A.js} +1 -1
- package/_assets/{receive-BT1UePgl.js → receive-D0rYG-Ru.js} +1 -1
- package/_assets/{resolveImplementation-CYaOQ5sv.js → resolveImplementation-PKF9v-36.js} +1 -1
- package/_assets/{rpc-BIVRXDns.js → rpc-CGuVz6ZU.js} +1 -1
- package/_assets/{secp256k1-_bm2fnpV.js → secp256k1-B7Vw7DCw.js} +1 -1
- package/_assets/{secp256k1-Sh8sTQXG.js → secp256k1-VmEQa0aa.js} +1 -1
- package/_assets/{secp256k1-DE1S7xuz.js → secp256k1-goT4cfFb.js} +1 -1
- package/_assets/{send-Dm0GvghF.js → send-Dofcscvg.js} +1 -1
- package/_assets/{send-batch-transaction-BW7JqYr-.js → send-batch-transaction-mdF3I3qP.js} +1 -1
- package/_assets/{send-eip712-transaction-D8UYfBzy.js → send-eip712-transaction-B3pe0swM.js} +2 -2
- package/_assets/send-gasless-transaction-4dIGMkd5.js +2 -0
- package/_assets/{send-transaction-BS4mKukV.js → send-transaction-MkLJ3i-I.js} +2 -2
- package/_assets/{sendMetaTransaction-BOQmFcY9.js → sendMetaTransaction-DnAgmSFb.js} +1 -1
- package/_assets/{sendRawTransaction-2OEfpgbg.js → sendRawTransaction-a2apK1sb.js} +3 -3
- package/_assets/{sentry-1EfTvlEd.js → sentry-CrmSoDwt.js} +1 -1
- package/_assets/{serializeTransaction-CuDu3vwz.js → serializeTransaction-C-RaU7t3.js} +1 -1
- package/_assets/{session-proposal-D_H9xlHz.js → session-proposal-t3e09MmG.js} +1 -1
- package/_assets/{session-request-DjHYCh5G.js → session-request-CE-hLkat.js} +2 -2
- package/_assets/{sha256-CxKrCdyI.js → sha256-CnOc2-Yk.js} +1 -1
- package/_assets/{signing-Dq3sLeI8.js → signing-BCtaGMwS.js} +3 -3
- package/_assets/{skeleton.styles-y_b4J2xL.js → skeleton.styles-BVKbiyma.js} +1 -1
- package/_assets/{socials-BMK4uEMR.js → socials-Ie9Cd6AX.js} +1 -1
- package/_assets/{styled-C7i5Orxw.js → styled-BeKzrQgz.js} +1 -1
- package/_assets/{swaps-fhdUUEjy.js → swaps-Dpb1M0NW.js} +1 -1
- package/_assets/{thirdweb-Co67--fA.js → thirdweb-CL_tbbur.js} +3 -3
- package/_assets/{to-serializable-transaction-DMM_ICCl.js → to-serializable-transaction-DbPi3W-2.js} +2 -2
- package/_assets/{totalSupply-B_0Pn62r.js → totalSupply-C1fV25i0.js} +1 -1
- package/_assets/{transaction-D83MU1Bp.js → transaction-Dx9RUnzT.js} +1 -1
- package/_assets/{transactionReceipt-Cz-1bZ1D.js → transactionReceipt-BhBfGbtY.js} +1 -1
- package/_assets/{transactions-Ce2E_vT5.js → transactions-Blvb-eh_.js} +1 -1
- package/_assets/{useCreditPacks-DYIEt5ni.js → useCreditPacks-BUNkFxv2.js} +1 -1
- package/_assets/{useImportable-CgYCyKZ9.js → useImportable-Df3xXqBw.js} +1 -1
- package/_assets/{useInfiniteGrid-CKUzdlpU.js → useInfiniteGrid-_fAjW7XJ.js} +1 -1
- package/_assets/{useStore-D6WwYrDv.js → useStore-DWms-sYK.js} +2 -2
- package/_assets/{useTheme-BZ-lMk44.js → useTheme-Bhqn-d9f.js} +1 -1
- package/_assets/{utils-CfFH9jvF.js → utils-Dy-V3x7s.js} +1 -1
- package/_assets/{verifyHash-D7K4ylcs.js → verifyHash-BBHvhqgx.js} +1 -1
- package/_assets/{w3m-modal-Cs4OGOy-.js → w3m-modal-CZ57kWmJ.js} +1 -1
- package/_assets/{w3m-modal-CfudP4Ab.js → w3m-modal-hZga13Md.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CxEEJm9u.js → wait-for-tx-receipt-Bcbb_-Ff.js} +1 -1
- package/_assets/{wallets-2d1wGxwj.js → wallets-DtAWP3aq.js} +5 -5
- package/_assets/{web-connector-By0422b-.js → web-connector-0yysPmu1.js} +3 -3
- package/_assets/{writeContract-D_cXCGKD.js → writeContract-CXi_wbgo.js} +1 -1
- package/_assets/{zora-sepolia-BdgZOQdg.js → zora-sepolia-kZf0HhR9.js} +1 -1
- package/_assets/{zoraTestnet-DzYJOdjJ.js → zoraTestnet-De-OGXOR.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/ItemDetail-DDVvGiAK.js +0 -3577
- package/_assets/LazyEmoteControls-BiDyYsAZ.js +0 -2
- package/_assets/decimals-CTd11MEC.js +0 -1
- package/_assets/get-ecosystem-wallet-info-CEmkl3oD.js +0 -1
- package/_assets/getNFT-D13p0fnl.js +0 -1
- package/_assets/send-gasless-transaction-C10kFc-4.js +0 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{j as e,L as
|
|
1
|
+
import{j as e,L as Ne,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t as ue,s as i,b as a,L as le,C as Le,ax as ca,ay as Ee,az as la,J as da,I as O,A as zt,K as Qe,y as ua,X as H,am as ut,v as ha,w as pa,l as ga,aA as ma,D as xa,aB as fa,an as ya,aC as ba,aD as ht,aE as va,aF as wa,z as Ca,aG as pt,Z as D,aH as gt,aI as ja,k as se,r as ka,c as mt,aJ as $a,aK as xt,aL as Be,aM as Sa,aN as ye,aO as be,aP as ft,g as yt,f as bt,aQ as Ma}from"./index-DQv9RCQq.js";import{M as Ta,S as Ia,C as Pa,H as Aa,a as za,T as Ea,X as Ba,b as Ra,B as qa,c as Fa,d as vt,e as _a,f as je,P as Et,g as Wa,h as La,i as Ka,j as Na,k as Ke,l as de,L as Qa,m as Ua,n as wt,o as Ct,W as Ga,p as Ha,q as Oa,r as Va,A as Da,s as Ja,t as Xa,u as Ya,v as Za,w as es,x as ts,y as as,z as ss,D as ns,E as is,F as rs,G as os,I as cs,J as ls,K as ds,N as us,O as Re,Q as hs,R as ps,U as gs,V as ms,Y as jt,Z as kt,_ as xs,$ as fs,a0 as ys,a1 as bs,a2 as $t,a3 as vs}from"./CollectionCarousel-uNk2LGYe.js";import{f as ws,h as Cs,a as js,n as ks,i as $s,A as Ss}from"./authorizations-BaNXoIur.js";import{g as Ms,h as qe,p as Ts}from"./buy-DmWa92vh.js";import{b as Is,w as Ps,S as St,G as As}from"./buy-gasless-B5osCtXy.js";import{u as zs,M as Es,R as ve,r as Bs,c as Rs,p as Mt,a as Fe}from"./useCreditPacks-BUNkFxv2.js";import{i as qs,a as Fs}from"./errors-CzM6yGIv.js";import{E as _s}from"./ErrorNotice-Cj_6GjVe.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-CrmSoDwt.js";import"./ethers-BNVA8Ulg.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DnAgmSFb.js";const{colors:ne,radius:Ws}=ue,Ls=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
gap: 8px;
|
|
6
6
|
width: 100%;
|
|
7
|
-
`,
|
|
7
|
+
`,Ks=i.span`
|
|
8
8
|
font-size: 16px;
|
|
9
9
|
line-height: 22px;
|
|
10
10
|
color: ${ne.text2};
|
|
11
11
|
text-transform: capitalize;
|
|
12
12
|
white-space: nowrap;
|
|
13
|
-
`,
|
|
13
|
+
`,Ns=i.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
gap: 12px;
|
|
@@ -34,14 +34,14 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
34
34
|
}
|
|
35
35
|
&::-webkit-scrollbar-thumb {
|
|
36
36
|
background: #a2a2a2;
|
|
37
|
-
border-radius: ${
|
|
37
|
+
border-radius: ${Ws.btn};
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,Qs=i.span`
|
|
40
40
|
margin-left: 8px;
|
|
41
41
|
font-size: 13px;
|
|
42
42
|
font-weight: 600;
|
|
43
43
|
color: ${ne.muted};
|
|
44
|
-
`,
|
|
44
|
+
`,Us=i.div`
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: space-between;
|
|
@@ -58,7 +58,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${ne.text};
|
|
60
60
|
}
|
|
61
|
-
`;function
|
|
61
|
+
`;function Gs(o){const{phase:p,balanceCredits:P,onClose:A}=o,W=p==="processing",J=p==="error"?a("cartCheckout.errorTitle"):p==="nofunds"?a("cartCheckout.titleNoFunds"):p==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),X=p==="processing";return e.jsxs(Ta,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(Ia,{onClick:W?void 0:A,"aria-hidden":!0}),e.jsxs(Pa,{"data-tall":X||void 0,children:[e.jsxs(Aa,{children:[e.jsxs(za,{children:[e.jsx(Ea,{children:J}),!W&&e.jsx(Ba,{onClick:A,"aria-label":a("buyModal.close"),children:e.jsx(Ra,{})})]}),e.jsxs(qa,{children:[e.jsx(Fa,{children:p==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(vt,{}),e.jsx(_a,{children:le(P)})]})]}),p==="choose"&&e.jsxs(je,{children:[e.jsxs(Us,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(vt,{}),le(o.totalCredits??0)]})]}),e.jsx(Et,{options:o.options??[],totalCents:o.totalCents??0,shortfall:o.shortfall,onPay:o.onPay??(()=>{})})]}),p==="processing"&&e.jsx(Hs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),p==="nofunds"&&e.jsx(Os,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:A}),p==="error"&&e.jsxs(je,{children:[e.jsxs(Wa,{"data-testid":"buy-error",children:[e.jsx(La,{src:Ka,alt:"",width:64,height:80}),e.jsxs(Na,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.heldCredits?e.jsxs(e.Fragment,{children:[o.message?e.jsxs(e.Fragment,{children:[o.message," "]}):null,a("cartCheckout.heldLead",{currency:Le.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Le.name})]}):o.message??a("cartCheckout.errorBody")]})]}),o.heldCredits?e.jsx(Ke,{children:e.jsx(de,{"data-variant":"purple","data-full":!0,onClick:A,children:a("cartCheckout.gotIt")})}):e.jsxs(Ke,{children:[e.jsx(de,{"data-variant":"outline",onClick:A,children:a("buyModal.cancel")}),e.jsx(de,{"data-variant":"purple",onClick:o.onRetry??A,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Hs({stage:o,step:p,total:P,isSelfCustody:A,signatures:W}){const J=o==="reserving",X=P>0?Math.min(100,Math.round(p/P*100)):0,K=A&&W&&W.total>1,ie=o==="awaiting-signature"?A?K?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(Qa,{src:ca,alt:"",width:61,height:61}),e.jsx(Ua,{children:ie}),J?e.jsxs(Ls,{children:[e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{"data-step":!0,style:{width:`${X}%`}})}),P>1?e.jsxs(Ks,{children:[p,"/",P]}):null]}):e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{})})]})}function Os({lines:o,shortfallCredits:p,packs:P,selectedPack:A,onSelectPack:W,onBuyPacks:J,onCancel:X}){const K=P.find(n=>n.id===A),ie=o.reduce((n,N)=>n+(N.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Ga,{"data-testid":"nofunds-warning",children:[e.jsx(Ha,{}),e.jsxs(Oa,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,p)})})," ",a("buyModal.warningToPurchase",{count:ie}),Ee()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Va,{href:la("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(Ns,{children:o.map(n=>{const N=n.quantity??1;return e.jsxs(Da,{children:[e.jsx(Ja,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Xa,{children:[e.jsxs("div",{children:[e.jsxs(Ya,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),N>1?e.jsx(Qs,{children:a("cartCheckout.qty",{count:N})}):null]}),n.item.creator?e.jsx(Za,{address:n.item.creator}):null]}),e.jsxs(es,{children:[e.jsx(ts,{}),e.jsx("span",{children:le(n.priceCredits*N)})]})]})]},n.item.id)})}),Ee()?null:e.jsxs(e.Fragment,{children:[e.jsx(as,{children:P.map(n=>{const N=n.id===A;return e.jsxs(ss,{"data-testid":"credit-pack","data-on":N||void 0,onClick:()=>W(n.id),children:[e.jsx(ns,{src:is,alt:""}),e.jsx(rs,{children:le(n.credits)}),e.jsxs(os,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(cs,{children:[e.jsxs(ls,{children:[e.jsx(ds,{}),e.jsx("span",{children:le((K==null?void 0:K.credits)??0)})]}),e.jsxs(us,{children:["$",((K==null?void 0:K.usd)??0).toFixed(2)]})]})]}),e.jsxs(Ke,{children:[e.jsx(de,{"data-variant":"outline",onClick:X,children:a("buyModal.cancel")}),Ee()?null:e.jsx(de,{"data-variant":"gradient",onClick:J,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:Vs,radius:te}=ue,Bt="@media (max-width: 1080px)",I="@media (max-width: 880px)",Tt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -98,7 +98,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
98
98
|
${I} {
|
|
99
99
|
display: none;
|
|
100
100
|
}
|
|
101
|
-
`,
|
|
101
|
+
`,Ds=i.div`
|
|
102
102
|
display: grid;
|
|
103
103
|
grid-template-columns: minmax(0, 1fr) 615px;
|
|
104
104
|
gap: 24px;
|
|
@@ -147,12 +147,12 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
147
147
|
top: -16px; /* .page's mobile padding */
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,Js=i.div`
|
|
151
151
|
min-width: 0;
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: column;
|
|
154
154
|
gap: 12px;
|
|
155
|
-
`,
|
|
155
|
+
`,Xs=i.div`
|
|
156
156
|
display: flex;
|
|
157
157
|
align-items: center;
|
|
158
158
|
justify-content: space-between;
|
|
@@ -174,7 +174,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
174
174
|
${I} {
|
|
175
175
|
padding: 16px;
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,Ys=i(Rt)`
|
|
178
178
|
display: flex;
|
|
179
179
|
flex-direction: column;
|
|
180
180
|
align-items: center;
|
|
@@ -189,13 +189,13 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
189
189
|
min-height: 320px;
|
|
190
190
|
padding: 32px 16px;
|
|
191
191
|
}
|
|
192
|
-
`,
|
|
192
|
+
`,Zs=i.div`
|
|
193
193
|
display: flex;
|
|
194
194
|
flex-direction: column;
|
|
195
195
|
align-items: center;
|
|
196
196
|
gap: 12px;
|
|
197
197
|
padding-bottom: 16px;
|
|
198
|
-
`,
|
|
198
|
+
`,en=i.p`
|
|
199
199
|
margin: 0;
|
|
200
200
|
font-size: 24px;
|
|
201
201
|
font-weight: 700;
|
|
@@ -204,7 +204,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
204
204
|
${ue.media.maxWidth("mobile")} {
|
|
205
205
|
font-size: 20px;
|
|
206
206
|
}
|
|
207
|
-
`,
|
|
207
|
+
`,tn=i.p`
|
|
208
208
|
margin: 0;
|
|
209
209
|
font-size: 20px;
|
|
210
210
|
font-weight: 400;
|
|
@@ -213,7 +213,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
213
213
|
${ue.media.maxWidth("mobile")} {
|
|
214
214
|
font-size: 16px;
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`,an=i(Ne)`
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
align-items: center;
|
|
219
219
|
justify-content: center;
|
|
@@ -239,7 +239,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
239
239
|
outline: 2px solid ${l.accent};
|
|
240
240
|
outline-offset: 2px;
|
|
241
241
|
}
|
|
242
|
-
`,
|
|
242
|
+
`,sn=i.button`
|
|
243
243
|
display: none;
|
|
244
244
|
|
|
245
245
|
${I} {
|
|
@@ -257,7 +257,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
257
257
|
height: 20px;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
`,
|
|
260
|
+
`,nn=i.h1`
|
|
261
261
|
margin: 0;
|
|
262
262
|
font-size: 14px;
|
|
263
263
|
font-weight: 600;
|
|
@@ -269,7 +269,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
269
269
|
min-width: 0;
|
|
270
270
|
font-size: 16px;
|
|
271
271
|
}
|
|
272
|
-
`,
|
|
272
|
+
`,rn=i.button`
|
|
273
273
|
display: inline-flex;
|
|
274
274
|
align-items: center;
|
|
275
275
|
justify-content: center;
|
|
@@ -310,11 +310,11 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
310
310
|
border-color: ${l.text};
|
|
311
311
|
color: ${l.text};
|
|
312
312
|
}
|
|
313
|
-
`,
|
|
313
|
+
`,on=i.div`
|
|
314
314
|
display: flex;
|
|
315
315
|
flex-direction: column;
|
|
316
316
|
gap: 24px;
|
|
317
|
-
`,
|
|
317
|
+
`,cn=i.div`
|
|
318
318
|
position: relative;
|
|
319
319
|
display: flex;
|
|
320
320
|
align-items: stretch;
|
|
@@ -333,7 +333,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
333
333
|
&[data-unavailable] [data-desc] {
|
|
334
334
|
opacity: 0.7;
|
|
335
335
|
}
|
|
336
|
-
`,
|
|
336
|
+
`,ln=i.div`
|
|
337
337
|
position: relative;
|
|
338
338
|
flex-shrink: 0;
|
|
339
339
|
width: 137.5px;
|
|
@@ -355,12 +355,12 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
355
355
|
width: 120px;
|
|
356
356
|
height: 120px;
|
|
357
357
|
}
|
|
358
|
-
`,
|
|
358
|
+
`,dn=i(Ne)`
|
|
359
359
|
position: absolute;
|
|
360
360
|
inset: 0;
|
|
361
361
|
display: grid;
|
|
362
362
|
place-items: center;
|
|
363
|
-
`,
|
|
363
|
+
`,un=i.span`
|
|
364
364
|
position: absolute;
|
|
365
365
|
top: 7.5px;
|
|
366
366
|
left: 7.5px;
|
|
@@ -370,7 +370,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
370
370
|
background: #34ce77;
|
|
371
371
|
display: grid;
|
|
372
372
|
place-items: center;
|
|
373
|
-
`,
|
|
373
|
+
`,hn=i.div`
|
|
374
374
|
flex: 1;
|
|
375
375
|
min-width: 0;
|
|
376
376
|
display: flex;
|
|
@@ -382,13 +382,13 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
382
382
|
${I} {
|
|
383
383
|
padding: 12px 4px 12px 0;
|
|
384
384
|
}
|
|
385
|
-
`,
|
|
385
|
+
`,pn=i.div`
|
|
386
386
|
display: flex;
|
|
387
387
|
flex-direction: column;
|
|
388
388
|
gap: 4px;
|
|
389
389
|
min-width: 0;
|
|
390
390
|
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
391
|
-
`,qt=
|
|
391
|
+
`,qt=Qe`
|
|
392
392
|
display: block;
|
|
393
393
|
font-size: 16px;
|
|
394
394
|
font-weight: 600;
|
|
@@ -410,11 +410,11 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
410
410
|
line-clamp: 2;
|
|
411
411
|
-webkit-box-orient: vertical;
|
|
412
412
|
}
|
|
413
|
-
`,
|
|
413
|
+
`,gn=i.div`
|
|
414
414
|
${qt};
|
|
415
|
-
`,
|
|
415
|
+
`,mn=i(Ne)`
|
|
416
416
|
${qt};
|
|
417
|
-
`,
|
|
417
|
+
`,xn=i(da)`
|
|
418
418
|
font-size: 10px;
|
|
419
419
|
line-height: 1.43;
|
|
420
420
|
color: ${l.muted};
|
|
@@ -426,13 +426,13 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
426
426
|
font-size: 10px;
|
|
427
427
|
line-height: 1.43;
|
|
428
428
|
}
|
|
429
|
-
`,
|
|
429
|
+
`,fn=i.div`
|
|
430
430
|
display: flex;
|
|
431
431
|
align-items: center;
|
|
432
432
|
justify-content: space-between;
|
|
433
433
|
gap: 12px;
|
|
434
434
|
padding-right: 8px;
|
|
435
|
-
`,
|
|
435
|
+
`,yn=i.div`
|
|
436
436
|
display: inline-flex;
|
|
437
437
|
align-items: center;
|
|
438
438
|
gap: 8px;
|
|
@@ -454,14 +454,14 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
454
454
|
color: ${l.muted2};
|
|
455
455
|
cursor: default;
|
|
456
456
|
}
|
|
457
|
-
`,
|
|
457
|
+
`,bn=i.span`
|
|
458
458
|
min-width: 12px;
|
|
459
459
|
font-size: 14px;
|
|
460
460
|
font-weight: 500;
|
|
461
461
|
line-height: 1.2;
|
|
462
462
|
color: ${l.text};
|
|
463
463
|
text-align: center;
|
|
464
|
-
`,
|
|
464
|
+
`,vn=i.div`
|
|
465
465
|
display: inline-flex;
|
|
466
466
|
align-items: center;
|
|
467
467
|
gap: 4px;
|
|
@@ -475,7 +475,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
475
475
|
${I} {
|
|
476
476
|
font-size: 20px;
|
|
477
477
|
}
|
|
478
|
-
`,
|
|
478
|
+
`,wn=i(zt)`
|
|
479
479
|
width: 24px;
|
|
480
480
|
height: 24px;
|
|
481
481
|
background: ${l.text};
|
|
@@ -484,20 +484,20 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
484
484
|
width: 20px;
|
|
485
485
|
height: 20px;
|
|
486
486
|
}
|
|
487
|
-
`,
|
|
487
|
+
`,Cn=i.span`
|
|
488
488
|
margin-left: 6px;
|
|
489
489
|
font-size: 14px;
|
|
490
490
|
font-weight: 500;
|
|
491
491
|
color: ${l.muted};
|
|
492
492
|
text-decoration: line-through;
|
|
493
|
-
`,
|
|
493
|
+
`,jn=i.div`
|
|
494
494
|
position: absolute;
|
|
495
495
|
top: 9px;
|
|
496
496
|
right: 7px;
|
|
497
497
|
display: flex;
|
|
498
498
|
align-items: flex-start;
|
|
499
499
|
gap: 12px;
|
|
500
|
-
|
|
500
|
+
`,kn=i.span`
|
|
501
501
|
display: inline-flex;
|
|
502
502
|
align-items: center;
|
|
503
503
|
gap: 4px;
|
|
@@ -506,9 +506,9 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
506
506
|
line-height: 1;
|
|
507
507
|
text-transform: uppercase;
|
|
508
508
|
color: ${l.text2};
|
|
509
|
-
|
|
509
|
+
`,$n=i(O)`
|
|
510
510
|
color: #f48221;
|
|
511
|
-
`,
|
|
511
|
+
`,Sn=i.span`
|
|
512
512
|
align-self: flex-start;
|
|
513
513
|
display: inline-flex;
|
|
514
514
|
align-items: center;
|
|
@@ -520,11 +520,11 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
520
520
|
font-weight: 400;
|
|
521
521
|
line-height: 14px;
|
|
522
522
|
color: ${l.text};
|
|
523
|
-
`,
|
|
523
|
+
`,Mn=i(O)`
|
|
524
524
|
width: 11.31px;
|
|
525
525
|
height: 10.94px;
|
|
526
526
|
background: ${l.text};
|
|
527
|
-
`,Ft=
|
|
527
|
+
`,Ft=Qe`
|
|
528
528
|
display: grid;
|
|
529
529
|
place-items: center;
|
|
530
530
|
width: 24px;
|
|
@@ -540,7 +540,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
540
540
|
opacity: 0.5;
|
|
541
541
|
cursor: default;
|
|
542
542
|
}
|
|
543
|
-
`,
|
|
543
|
+
`,Tn=i.button`
|
|
544
544
|
${Ft};
|
|
545
545
|
|
|
546
546
|
&:hover:not(:disabled) {
|
|
@@ -549,13 +549,13 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
549
549
|
&[data-on] {
|
|
550
550
|
color: ${l.dclRed};
|
|
551
551
|
}
|
|
552
|
-
`,
|
|
552
|
+
`,In=i.button`
|
|
553
553
|
${Ft};
|
|
554
554
|
|
|
555
555
|
&:hover:not(:disabled) {
|
|
556
556
|
color: ${l.dclRed};
|
|
557
557
|
}
|
|
558
|
-
`,
|
|
558
|
+
`,Pn=i.div`
|
|
559
559
|
display: flex;
|
|
560
560
|
gap: 20px;
|
|
561
561
|
margin-top: 16px;
|
|
@@ -568,7 +568,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
568
568
|
& .link:hover:not(:disabled) {
|
|
569
569
|
color: ${l.text};
|
|
570
570
|
}
|
|
571
|
-
`,
|
|
571
|
+
`,An=i.aside`
|
|
572
572
|
position: sticky;
|
|
573
573
|
top: 172px;
|
|
574
574
|
display: flex;
|
|
@@ -594,7 +594,7 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
594
594
|
border-radius: 0;
|
|
595
595
|
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
|
|
596
596
|
}
|
|
597
|
-
`,
|
|
597
|
+
`,zn=i.h2`
|
|
598
598
|
margin: 0 0 24px;
|
|
599
599
|
padding-bottom: 16px;
|
|
600
600
|
border-bottom: 1px solid ${l.gray4};
|
|
@@ -608,28 +608,28 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
608
608
|
font-size: 16px;
|
|
609
609
|
line-height: 1.6;
|
|
610
610
|
}
|
|
611
|
-
`,
|
|
611
|
+
`,En=i.div`
|
|
612
612
|
display: flex;
|
|
613
613
|
flex-direction: column;
|
|
614
614
|
gap: 12px;
|
|
615
|
-
`,
|
|
615
|
+
`,Bn=i.div`
|
|
616
616
|
display: flex;
|
|
617
617
|
align-items: flex-start;
|
|
618
618
|
justify-content: space-between;
|
|
619
619
|
gap: 12px;
|
|
620
|
-
`,
|
|
620
|
+
`,Rn=i.span`
|
|
621
621
|
font-size: 14px;
|
|
622
622
|
font-weight: 600;
|
|
623
623
|
line-height: 1.57;
|
|
624
624
|
color: ${l.muted1};
|
|
625
|
-
`,
|
|
625
|
+
`,qn=i.span`
|
|
626
626
|
display: inline-flex;
|
|
627
627
|
align-items: center;
|
|
628
628
|
gap: 8px;
|
|
629
629
|
font-size: 24px;
|
|
630
630
|
font-weight: 700;
|
|
631
631
|
color: ${l.text};
|
|
632
|
-
`,
|
|
632
|
+
`,Fn=i.span`
|
|
633
633
|
display: flex;
|
|
634
634
|
flex-direction: column;
|
|
635
635
|
align-items: flex-end;
|
|
@@ -674,14 +674,14 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
674
674
|
opacity: 0.6;
|
|
675
675
|
cursor: default;
|
|
676
676
|
}
|
|
677
|
-
`;const
|
|
677
|
+
`;const _t=Qe`
|
|
678
678
|
margin: 0;
|
|
679
679
|
font-size: 13px;
|
|
680
680
|
`,we=i.p`
|
|
681
|
-
${
|
|
682
|
-
`,
|
|
683
|
-
${
|
|
684
|
-
`,
|
|
681
|
+
${_t};
|
|
682
|
+
`,Wn=i(_s)`
|
|
683
|
+
${_t};
|
|
684
|
+
`,Ln=i.div`
|
|
685
685
|
position: relative;
|
|
686
686
|
flex: 1 0 auto;
|
|
687
687
|
margin-top: 48px;
|
|
@@ -693,4 +693,4 @@ import{j as e,L as Ke,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t
|
|
|
693
693
|
& section {
|
|
694
694
|
margin-top: 0;
|
|
695
695
|
}
|
|
696
|
-
`;function Fe(o){if(Fs(o))return a("errors.rejected");const h=(o.message??"").toLowerCase();return h.includes("insufficient")?a("cart.error.insufficient",{currency:_e.name}):h.includes("no active listing")||h.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Qn(o){const h=[];return o.unavailable.length&&h.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&h.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:h.join(` ${a("cart.drop.and")} `)})}const We=o=>o.reduce((h,P)=>h+P.priceCredits*P.quantity,0),Ce=o=>o.flatMap(h=>Array.from({length:h.quantity},()=>({...h,quantity:1})));function ni(){ua({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),h=H(t=>t.remove),P=H(t=>t.increment),A=H(t=>t.decrement),L=H(t=>t.clear),J=H(t=>t.restore),X=H(t=>t.setFittingOpen),E=ut(t=>t.items),ie=ut(t=>t.toggle),{session:n,signIn:N}=ha(),_t=pa(),he=Es().packs.slice(0,Bs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Lt=o.some(t=>t.category!=="emote"),{data:ke}=ga({queryKey:["upsell-listings"],queryFn:()=>Ma({first:40}),staleTime:6e4}),{data:S}=ma(n),v=xa(),Y=ra(),{state:B}=oa(),[Kt,re]=T.useState(null),[Qe,pe]=T.useState(null),[Nt,F]=T.useState(!1),[W,D]=T.useState(null),Ue=T.useRef(0),[p,j]=T.useState(null),{data:ge}=fa(n),{data:oe}=ya(!0),[$e,Ge]=T.useState(""),ce=T.useRef(null),He=ba(o),Oe=t=>pt(He[t.id]),Se=o.filter(Oe),De=o.length>0&&Se.length===0,Qt=Se.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ut=o.reduce((t,s)=>t+s.quantity,0),Gt=Se.reduce((t,s)=>t+s.quantity,0),Ve=W?W.liveTotalCredits:Qt,Ht=new Set(o.map(t=>t.id)),Je=((ke==null?void 0:ke.items)??[]).filter(t=>!Ht.has(t.id)).slice(0,12),Ot=new Map(W==null?void 0:W.buyable.map(t=>[t.item.id,t])),me=(S==null?void 0:S.credits)??0,Me=Ve*10,Dt=oe?ht(Me,oe):0n,Te=Be({priceCents:Me,priceManaWei:Dt,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n}),Vt=t=>t.flatMap(s=>{const c=qe(s);return c.kind==="store"?[c.mint]:[]}),Jt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Xt=ja,Yt=t=>$a(t.contractAddress,String(t.itemId));function xe(t){t(),D(null),pe(null),re(null)}function Zt(){j(null),F(!1)}function Xe(t){const s=We(t),c=Math.max(0,s-me),r=he.find(d=>d.credits>=c)??he[he.length-1];Ge(r.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),j({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),F(!1)}async function Ie(t){if(!n||t.length===0)return;const s=Ce(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),r=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),d=[];let b="authorize";const x=new Set,R=new Set,K=new Set,_=[];let w=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[];for(let u=0;u<s.length;u++){const g=s[u];j({phase:"processing",stage:"reserving",step:u+1,total:s.length});try{const $=g.acquisition==="trade"?g.trade.id:void 0,y=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:z,maxCreditedValue:q}=await xt(n.identity,g.usdCents,$,y);d.push({salt:z.id,itemId:g.item.id}),m.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[z],maxCreditedValue:q,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[z],maxCreditedValue:q})}catch($){if(Ws($)){if(d.length){try{await Ee(n.identity,d.map(y=>y.salt))}catch(y){se(y,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Xe(t);return}throw $}}b="submit";const k=Ts(m).length,Q=u=>k>1?{current:u,total:k}:void 0,U=(u,g)=>j({phase:"processing",stage:u,step:s.length,total:s.length,signatures:Q(g)}),G=u=>u<k?U("awaiting-signature",u+1):U("settling",k);U("awaiting-signature",1);let M=[];if(Cs())try{const u=new Map;M=await Ps({purchases:m,buyer:n.address,signer:n.signer,onSigned:()=>G(k),onBroadcast:({txHash:y,salts:z})=>{u.set(y,z),z.forEach(q=>x.add(q))}});const g=await Promise.allSettled(M.map(y=>As(y)));g.forEach((y,z)=>{const q=u.get(M[z])??[];y.status==="fulfilled"?(q.forEach(ae=>R.add(ae)),_.push(M[z])):y.reason instanceof St||q.forEach(ae=>K.add(ae))});const $=g.flatMap(y=>y.status==="rejected"?[y.reason]:[]);if($.length&&!$.some(y=>y instanceof St))throw $[0];w=!0}catch(u){if(!(u instanceof zs)||!Sa(n.providerType))throw u;M=await Re({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach($=>x.add($)),onSettled:({txHash:g,salts:$})=>{$.forEach(y=>R.add(y)),_.push(g)},onReverted:({salts:g})=>g.forEach($=>K.add($))})}else M=await Re({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:u})=>u.forEach(g=>x.add(g)),onSettled:({txHash:u,salts:g})=>{g.forEach($=>R.add($)),_.push(u)},onReverted:({salts:u})=>u.forEach(g=>K.add(g))});t.forEach(u=>h(u.item.id)),D(null),V("Shop Completed Purchase",{...ye(c),payment_type:"credits",no_crypto_step:w,transaction_hash:M[0]??null}),kt(v);const C=ce.current;ce.current=null,j(null),F(!1);const f={items:r,txHash:M[0]??void 0,txHashes:M,settled:!0,...C?{creditsAdded:C}:{}};Y("/success",{state:f,replace:!0})}catch(m){be(m)||se(m,{flow:"cart_checkout",step:b,cart_size:t.length});const k=new Set([...x].filter(f=>!K.has(f))),{toRelease:Q,boughtItemIds:U}=Mt({reservations:d,spent:k,settled:R}),G=[...k].some(f=>!R.has(f)),M=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(V(be(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:b,error_code:ft(m),value_usd:gt(C.reduce((f,u)=>f+u.priceCredits,0)),cart_size:s.length,partial:M.length>0}),Q.length)try{await Ee(n.identity,Q)}catch(f){se(f,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),M.length>0){U.forEach(f=>h(f)),D(null),kt(v),V("Shop Completed Purchase",{...ye(M),payment_type:"credits",no_crypto_step:w,transaction_hash:_[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),F(!1);return}j({phase:"error",message:G?void 0:Fe(m),heldCredits:G})}}function Ye(t,s){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const c=ce.current;ce.current=null,j(null),F(!1);const r={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Y("/success",{state:r,replace:!0})}function Ze(t,s){be(t)||se(t,{flow:s,step:"submit"}),V(be(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ft(t)}),j({phase:"error",message:Fe(t)}),F(!1)}async function ea(t,s,c){const r=yt(bt.MANAToken,s),d=yt(bt.CreditsManager,s);await Ss({auth:{kind:Ms.Allowance,contractAddress:r.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function et(){if(oe)return oe;try{return await v.fetchQuery({queryKey:["mana-rate",mt.chainId],queryFn:()=>ka(mt.chainId),staleTime:6e4})}catch{return}}async function ta(t){const s=Ce(t).reduce((b,x)=>b+x.usdCents,0),r=(ge??0n)>0n?await et():oe,d=r?ht(s,r):0n;return{totalCents:s,manaWei:d}}async function tt(t,s){const c=We(t),{totalCents:r,manaWei:d}=await ta(t),b=Be({priceCents:r,priceManaWei:d,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n});if(s&&b.options.some(x=>x.method===s)){if(s==="credits"){Ie(t);return}const x=nt(b,s);await Ae(st(s,t),x,()=>s==="mana"?void it(t,x):void rt(t,r,d));return}if(b.options.some(x=>x.method==="mana"||x.method==="combined")){j({phase:"choose",lines:t,totalCents:r,manaWei:d}),F(!1);return}if(S!=null&&S.credits<c){Xe(t);return}Ie(t)}function at(t){return Be({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n})}const[Pe,fe]=T.useState(null);function st(t,s){const c=new Map;for(const r of s){const d=fs(t,qe(r));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function Ae(t,s,c){const[r,...d]=t;if(!r){c();return}await aa(r.spender,r.chainId,s,()=>void Ae(d,s,c))}async function aa(t,s,c,r){const d=js(s,t),b=n?await ks(d,n.address,c).catch(()=>!0):!0;if($s(n==null?void 0:n.providerType,b)){F(!1),fe({auth:d,run:r});return}r()}function nt(t,s){var c;return((c=t.options.find(r=>r.method===s))==null?void 0:c.manaWei)??0n}function sa(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:r}=p;if(t==="credits"){Ie(s);return}const d=nt(at(p),t);Ae(st(t,s),d,()=>t==="mana"?void it(s,d):void rt(s,c,r))}async function it(t,s){if(!n||t.length===0)return;const c=Ce(t),r=c.map(x=>({...x.item,priceCredits:x.priceCredits})),d=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),b=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const x=await ys({trades:Jt(c),mints:Vt(c),buyer:n.address,signer:n.signer,onSigned:b,manaWei:s});t.forEach(R=>h(R.item.id)),D(null),V("Shop Completed Purchase",{...ye(r),payment_type:"mana",transaction_hash:x[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ye(d,x)}catch(x){Ze(x,"buy_cart_mana")}}async function rt(t,s,c){if(!n||t.length===0)return;const r=Ce(t),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),b=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),x=bs(r.map(w=>w.usdCents),(S==null?void 0:S.balanceCents)??0),R=[],K=new Set,_=new Set;j({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(qe),m=[],k=new Map,Q=new Map;for(let C=0;C<r.length;C++){const f=r[C],u=w[C],g=x[C],$=vs(Math.max(0,f.usdCents-g),s,c);let y;if(g<=0)y=$t(u,[],"0");else{j({phase:"processing",stage:"reserving",step:C+1,total:r.length});const q=f.item,{credit:ae,maxCreditedValue:ia}=await xt(n.identity,g,u.kind==="trade"?u.trade.id:void 0,q.contractAddress&&q.itemId!=null?{contractAddress:q.contractAddress,itemId:String(q.itemId)}:void 0);R.push({salt:ae.id,itemId:q.id}),y=$t(u,[ae],ia)}const z=Is(y);k.set(z,(k.get(z)??0n)+$),Q.has(z)||Q.set(z,m.length),m.push(y)}for(const[C,f]of k){const u=Q.get(C);u==null||f<=0n||(m[u]={...m[u],maxCreditedValue:(BigInt(m[u].maxCreditedValue)+f).toString()})}const U=[...k.values()].reduce((C,f)=>C+f,0n);await ea(n.signer,ws(w[0]),U);const G=()=>j({phase:"processing",stage:"settling",step:r.length,total:r.length});j({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const M=await Re({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>K.add(f)),onReverted:({salts:C})=>C.forEach(f=>_.add(f))});t.forEach(C=>h(C.item.id)),D(null),V("Shop Completed Purchase",{...ye(d),payment_type:"credits_and_mana",transaction_hash:M[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ye(b,M)}catch(w){const{toRelease:m}=Mt({reservations:R,spent:new Set([...K].filter(k=>!_.has(k))),settled:new Set});m.length&&Ee(n.identity,m).catch(()=>{}),R.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Ze(w,"buy_cart_combined")}}async function Z(t){if(!n){jt({type:"cart-checkout"}),N();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;re(null),pe(null),F(!0);const c=s.reduce((r,d)=>r+d.priceCredits*d.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:gt(c),has_sufficient_credits:me>=c});try{const r=await Rs(s,n.address,Xt,await et(),Yt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(b=>h(b.id)),pe(Qn(r))),r.buyable.length===0){re(a("cart.error.noneAvailable")),D(null);return}if(r.orderChanged){D(r),Ue.current=Date.now();return}await tt(r.buyable,t)}catch(r){se(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),re(Fe(r))}finally{F(!1)}}async function ot(){if(W){if(!n){jt({type:"cart-checkout"}),N();return}if(Date.now()-Ue.current>Nn){D(null),pe(null),await Z();return}re(null),tt(W.buyable)}}async function na(){if($e){try{sessionStorage.setItem(ve,JSON.stringify(H.getState().items))}catch{}F(!0);try{const t=await qs($e,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Y("/credits")}catch(t){try{sessionStorage.removeItem(ve)}catch{}se(t,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{F(!1)}}}const ct=T.useRef(!1);T.useEffect(()=>{if(!n||ct.current||!ps("cart-checkout"))return;ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const lt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||lt.current)return;lt.current=!0,ce.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(ve);if(s){sessionStorage.removeItem(ve);const c=JSON.parse(s);Array.isArray(c)&&c.length&&J(c)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const dt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||dt.current)return;dt.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=Nt||(p==null?void 0:p.phase)==="processing";return o.length===0&&!p?e.jsx(Tt,{children:e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Zs,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(en,{children:[e.jsx(tn,{children:a("cart.empty.title")}),e.jsx(an,{children:a("cart.empty.body")})]}),e.jsx(sn,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(Tt,{children:[e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Js,{children:[e.jsxs(Xs,{children:[e.jsxs(Ys,{children:[e.jsx(nn,{onClick:()=>Y(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(rn,{children:a("cart.panelTitle",{count:Ut})}),Lt?e.jsxs(on,{onClick:()=>X(!0),disabled:ee,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(Rt,{children:[e.jsx(cn,{children:o.map(t=>{const s=Ot.get(t.id),c=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,b=t.quantity,x=typeof t.available=="number"&&b>=t.available,R=c*b,K=va(t),_=!!K&&!!E[K],w=wa(t),m=He[t.id],k=!pt(m),Q=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(ln,{"data-unavailable":k||void 0,children:[e.jsxs(dn,{"data-thumb":!0,children:[w?e.jsx(un,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(hn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(pn,{children:[e.jsxs(gn,{"data-desc":!0,children:[w?e.jsx(xn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(mn,{title:t.name,children:t.name}),t.creator?e.jsx(fn,{address:t.creator,linkToProfile:!0}):null,_t&&d?e.jsxs(Mn,{"data-testid":"cart-creator-tag",children:[e.jsx(Tn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(yn,{children:k?e.jsxs($n,{children:[e.jsx(Sn,{name:"warning-fill",size:24}),Q]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(bn,{children:[e.jsx(At,{onClick:()=>xe(()=>A(t.id)),disabled:ee||b<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(vn,{children:b}),e.jsx(At,{onClick:()=>xe(()=>P(t.id)),disabled:ee||x,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(wn,{children:[e.jsx(Cn,{})," ",R,r?e.jsx(jn,{children:t.priceCredits*b}):null]})]})})]}),e.jsxs(kn,{children:[K?e.jsx(In,{"data-on":_||void 0,onClick:()=>ie(t),"aria-label":_?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:_?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:_?"heart-solid":"heart"})}):null,e.jsx(Pn,{onClick:()=>xe(()=>h(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(An,{children:e.jsx("button",{className:"link",onClick:()=>xe(L),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(zn,{children:[e.jsx(En,{children:a("cart.purchaseSummary")}),e.jsxs(Bn,{children:[e.jsxs(Rn,{children:[e.jsx(qn,{children:a("cart.totalItems",{count:Gt})}),e.jsx(Wn,{children:e.jsxs(Fn,{children:[e.jsx(_n,{})," ",Ve]})})]}),e.jsx(Et,{options:Te.options,totalCents:Me,shortfall:Te.manaShortfall,showCreditsAmount:!1,creditsLabel:W?a("marketCheckout.confirmPurchase"):Te.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||De,onPay:t=>void(W?ot():Z(t)),creditsFallback:{label:ee?a("cart.working"):W?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(W?ot():Z())}}),De?e.jsx(we,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(we,{className:"muted",children:a("cart.signInHint")}),W?e.jsx(we,{className:"muted",children:a("cart.priceChanged")}):null,Qe?e.jsx(we,{className:"muted",children:Qe}):null,e.jsx(Ln,{message:Kt})]})]})]})]}),Je.length>0?e.jsx(Kn,{children:e.jsx(gs,{title:a("cart.youMightAlsoLike"),items:Je})}):null,Pe&&n?e.jsx(ms,{auth:Pe.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:xs,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Pe;fe(null),t()},onCancel:()=>fe(null),onClose:()=>fe(null)}):null,p?e.jsx(Hs,{phase:p.phase,balanceCredits:me,onClose:Zt,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:Ca(n==null?void 0:n.providerType),signatures:p.phase==="processing"?p.signatures:void 0,options:p.phase==="choose"?at(p).options:void 0,onPay:sa,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?We(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:he,selectedPack:$e,onSelectPack:Ge,onBuyPacks:()=>void na(),message:p.phase==="error"?p.message:void 0,heldCredits:p.phase==="error"&&!!p.heldCredits,onRetry:()=>void Z()}):null]})}export{ni as Cart};
|
|
696
|
+
`;function _e(o){if(qs(o))return a("errors.rejected");const p=(o.message??"").toLowerCase();return p.includes("insufficient")?a("cart.error.insufficient",{currency:Le.name}):p.includes("no active listing")||p.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Kn=12e4;function Nn(o){const p=[];return o.unavailable.length&&p.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&p.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:p.join(` ${a("cart.drop.and")} `)})}const We=o=>o.reduce((p,P)=>p+P.priceCredits*P.quantity,0),Ce=o=>o.flatMap(p=>Array.from({length:p.quantity},()=>({...p,quantity:1})));function si(){ua({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),p=H(t=>t.remove),P=H(t=>t.increment),A=H(t=>t.decrement),W=H(t=>t.clear),J=H(t=>t.restore),X=H(t=>t.setFittingOpen),K=ut(t=>t.items),ie=ut(t=>t.toggle),{session:n,signIn:N}=ha(),Wt=pa(),he=zs().packs.slice(0,Es);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Lt=o.some(t=>t.category!=="emote"),{data:ke}=ga({queryKey:["upsell-listings"],queryFn:()=>Ma({first:40}),staleTime:6e4}),{data:S}=ma(n),v=xa(),Y=ra(),{state:E}=oa(),[Kt,re]=T.useState(null),[Ue,pe]=T.useState(null),[Nt,q]=T.useState(!1),[F,V]=T.useState(null),Ge=T.useRef(0),[h,j]=T.useState(null),{data:ge}=fa(n),{data:oe}=ya(!0),[$e,He]=T.useState(""),ce=T.useRef(null),Oe=ba(o),Ve=t=>pt(Oe[t.id]),Se=o.filter(Ve),De=o.length>0&&Se.length===0,Qt=Se.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ut=o.reduce((t,s)=>t+s.quantity,0),Gt=Se.reduce((t,s)=>t+s.quantity,0),Je=F?F.liveTotalCredits:Qt,Ht=new Set(o.map(t=>t.id)),Xe=((ke==null?void 0:ke.items)??[]).filter(t=>!Ht.has(t.id)).slice(0,12),Ot=new Map(F==null?void 0:F.buyable.map(t=>[t.item.id,t])),me=(S==null?void 0:S.credits)??0,Me=Je*10,Vt=oe?ht(Me,oe):0n,Te=Re({priceCents:Me,priceManaWei:Vt,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n}),Dt=t=>t.flatMap(s=>{const c=Fe(s);return c.kind==="store"?[c.mint]:[]}),Jt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Xt=ja,Yt=t=>$a(t.contractAddress,String(t.itemId));function xe(t){t(),V(null),pe(null),re(null)}function Zt(){j(null),q(!1)}function Ye(t){const s=We(t),c=Math.max(0,s-me),r=he.find(d=>d.credits>=c)??he[he.length-1];He(r.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),j({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),q(!1)}async function Ie(t){if(!n||t.length===0)return;const s=Ce(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),r=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),d=[];let b="authorize";const x=new Set,B=new Set,L=new Set,_=[];let w=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[];for(let u=0;u<s.length;u++){const g=s[u];j({phase:"processing",stage:"reserving",step:u+1,total:s.length});try{const $=g.acquisition==="trade"?g.trade.id:void 0,y=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:z,maxCreditedValue:R}=await xt(n.identity,g.usdCents,$,y);d.push({salt:z.id,itemId:g.item.id}),m.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[z],maxCreditedValue:R,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[z],maxCreditedValue:R})}catch($){if(Fs($)){if(d.length){try{await Be(n.identity,d.map(y=>y.salt))}catch(y){se(y,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Ye(t);return}throw $}}b="submit";const k=Ms(m).length,Q=u=>k>1?{current:u,total:k}:void 0,U=(u,g)=>j({phase:"processing",stage:u,step:s.length,total:s.length,signatures:Q(g)}),G=u=>u<k?U("awaiting-signature",u+1):U("settling",k);U("awaiting-signature",1);let M=[];if(ws())try{const u=new Map;M=await Is({purchases:m,buyer:n.address,signer:n.signer,onSigned:()=>G(k),onBroadcast:({txHash:y,salts:z})=>{u.set(y,z),z.forEach(R=>x.add(R))}});const g=await Promise.allSettled(M.map(y=>Ps(y)));g.forEach((y,z)=>{const R=u.get(M[z])??[];y.status==="fulfilled"?(R.forEach(ae=>B.add(ae)),_.push(M[z])):y.reason instanceof St||R.forEach(ae=>L.add(ae))});const $=g.flatMap(y=>y.status==="rejected"?[y.reason]:[]);if($.length&&!$.some(y=>y instanceof St))throw $[0];w=!0}catch(u){if(!(u instanceof As)||!Sa(n.providerType))throw u;M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach($=>x.add($)),onSettled:({txHash:g,salts:$})=>{$.forEach(y=>B.add(y)),_.push(g)},onReverted:({salts:g})=>g.forEach($=>L.add($))})}else M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:u})=>u.forEach(g=>x.add(g)),onSettled:({txHash:u,salts:g})=>{g.forEach($=>B.add($)),_.push(u)},onReverted:({salts:u})=>u.forEach(g=>L.add(g))});t.forEach(u=>p(u.item.id)),V(null),D("Shop Completed Purchase",{...ye(c),payment_type:"credits",no_crypto_step:w,transaction_hash:M[0]??null}),kt(v);const C=ce.current;ce.current=null,j(null),q(!1);const f={items:r,txHash:M[0]??void 0,txHashes:M,settled:!0,...C?{creditsAdded:C}:{}};Y("/success",{state:f,replace:!0})}catch(m){be(m)||se(m,{flow:"cart_checkout",step:b,cart_size:t.length});const k=new Set([...x].filter(f=>!L.has(f))),{toRelease:Q,boughtItemIds:U}=Mt({reservations:d,spent:k,settled:B}),G=[...k].some(f=>!B.has(f)),M=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(D(be(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:b,error_code:ft(m),value_usd:gt(C.reduce((f,u)=>f+u.priceCredits,0)),cart_size:s.length,partial:M.length>0}),Q.length)try{await Be(n.identity,Q)}catch(f){se(f,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),M.length>0){U.forEach(f=>p(f)),V(null),kt(v),D("Shop Completed Purchase",{...ye(M),payment_type:"credits",no_crypto_step:w,transaction_hash:_[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),q(!1);return}j({phase:"error",message:G?void 0:_e(m),heldCredits:G})}}function Ze(t,s){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const c=ce.current;ce.current=null,j(null),q(!1);const r={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Y("/success",{state:r,replace:!0})}function et(t,s){be(t)||se(t,{flow:s,step:"submit"}),D(be(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ft(t)}),j({phase:"error",message:_e(t)}),q(!1)}async function ea(t,s,c){const r=yt(bt.MANAToken,s),d=yt(bt.CreditsManager,s);await $s({auth:{kind:Ss.Allowance,contractAddress:r.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function tt(){if(oe)return oe;try{return await v.fetchQuery({queryKey:["mana-rate",mt.chainId],queryFn:()=>ka(mt.chainId),staleTime:6e4})}catch{return}}async function ta(t){const s=Ce(t).reduce((b,x)=>b+x.usdCents,0),r=(ge??0n)>0n?await tt():oe,d=r?ht(s,r):0n;return{totalCents:s,manaWei:d}}async function at(t,s){const c=We(t),{totalCents:r,manaWei:d}=await ta(t),b=Re({priceCents:r,priceManaWei:d,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n});if(s&&b.options.some(x=>x.method===s)){if(s==="credits"){Ie(t);return}const x=nt(b,s);await ze(st(s,t),x,()=>s==="mana"?void it(t,x):void rt(t,r,d));return}if(b.options.some(x=>x.method==="mana"||x.method==="combined")){j({phase:"choose",lines:t,totalCents:r,manaWei:d}),q(!1);return}if(S!=null&&S.credits<c){Ye(t);return}Ie(t)}function Pe(t){return Re({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n})}const[Ae,fe]=T.useState(null);function st(t,s){const c=new Map;for(const r of s){const d=xs(t,Fe(r));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function ze(t,s,c){const[r,...d]=t;if(!r){c();return}await aa(r.spender,r.chainId,s,()=>void ze(d,s,c))}async function aa(t,s,c,r){const d=Cs(s,t),b=n?await js(d,n.address,c).catch(()=>!0):!0;if(ks(n==null?void 0:n.providerType,b)){q(!1),fe({auth:d,run:r});return}r()}function nt(t,s){var c;return((c=t.options.find(r=>r.method===s))==null?void 0:c.manaWei)??0n}function sa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:r}=h;if(t==="credits"){Ie(s);return}const d=nt(Pe(h),t);ze(st(t,s),d,()=>t==="mana"?void it(s,d):void rt(s,c,r))}async function it(t,s){if(!n||t.length===0)return;const c=Ce(t),r=c.map(x=>({...x.item,priceCredits:x.priceCredits})),d=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),b=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const x=await fs({trades:Jt(c),mints:Dt(c),buyer:n.address,signer:n.signer,onSigned:b,manaWei:s});t.forEach(B=>p(B.item.id)),V(null),D("Shop Completed Purchase",{...ye(r),payment_type:"mana",transaction_hash:x[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ze(d,x)}catch(x){et(x,"buy_cart_mana")}}async function rt(t,s,c){if(!n||t.length===0)return;const r=Ce(t),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),b=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),x=ys(r.map(w=>w.usdCents),(S==null?void 0:S.balanceCents)??0),B=[],L=new Set,_=new Set;j({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(Fe),m=[],k=new Map,Q=new Map;for(let C=0;C<r.length;C++){const f=r[C],u=w[C],g=x[C],$=bs(Math.max(0,f.usdCents-g),s,c);let y;if(g<=0)y=$t(u,[],"0");else{j({phase:"processing",stage:"reserving",step:C+1,total:r.length});const R=f.item,{credit:ae,maxCreditedValue:ia}=await xt(n.identity,g,u.kind==="trade"?u.trade.id:void 0,R.contractAddress&&R.itemId!=null?{contractAddress:R.contractAddress,itemId:String(R.itemId)}:void 0);B.push({salt:ae.id,itemId:R.id}),y=$t(u,[ae],ia)}const z=Ts(y);k.set(z,(k.get(z)??0n)+$),Q.has(z)||Q.set(z,m.length),m.push(y)}for(const[C,f]of k){const u=Q.get(C);u==null||f<=0n||(m[u]={...m[u],maxCreditedValue:(BigInt(m[u].maxCreditedValue)+f).toString()})}const U=[...k.values()].reduce((C,f)=>C+f,0n);await ea(n.signer,vs(w[0]),U);const G=()=>j({phase:"processing",stage:"settling",step:r.length,total:r.length});j({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>L.add(f)),onReverted:({salts:C})=>C.forEach(f=>_.add(f))});t.forEach(C=>p(C.item.id)),V(null),D("Shop Completed Purchase",{...ye(d),payment_type:"credits_and_mana",transaction_hash:M[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ze(b,M)}catch(w){const{toRelease:m}=Mt({reservations:B,spent:new Set([...L].filter(k=>!_.has(k))),settled:new Set});m.length&&Be(n.identity,m).catch(()=>{}),B.length&&v.invalidateQueries({queryKey:["usd-balance"]}),et(w,"buy_cart_combined")}}async function Z(t){if(!n){jt({type:"cart-checkout"}),N();return}const s=H.getState().items.filter(Ve);if(s.length===0)return;re(null),pe(null),q(!0);const c=s.reduce((r,d)=>r+d.priceCredits*d.quantity,0);D("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:gt(c),has_sufficient_credits:me>=c});try{const r=await Bs(s,n.address,Xt,await tt(),Yt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(b=>p(b.id)),pe(Nn(r))),r.buyable.length===0){re(a("cart.error.noneAvailable")),V(null);return}if(r.orderChanged){V(r),Ge.current=Date.now();return}await at(r.buyable,t)}catch(r){se(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),re(_e(r))}finally{q(!1)}}async function ot(){if(F){if(!n){jt({type:"cart-checkout"}),N();return}if(Date.now()-Ge.current>Kn){V(null),pe(null),await Z();return}re(null),at(F.buyable)}}async function na(){if($e){try{sessionStorage.setItem(ve,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Rs($e,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Y("/credits")}catch(t){try{sessionStorage.removeItem(ve)}catch{}se(t,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const ct=T.useRef(!1);T.useEffect(()=>{if(!n||ct.current||!hs("cart-checkout"))return;ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const lt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||lt.current)return;lt.current=!0,ce.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(ve);if(s){sessionStorage.removeItem(ve);const c=JSON.parse(s);Array.isArray(c)&&c.length&&J(c)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[E==null?void 0:E.resumeCheckout]);const dt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||dt.current)return;dt.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[E==null?void 0:E.startCheckout]);const ee=Nt||(h==null?void 0:h.phase)==="processing";return o.length===0&&!h?e.jsx(Tt,{children:e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Ys,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(Zs,{children:[e.jsx(en,{children:a("cart.empty.title")}),e.jsx(tn,{children:a("cart.empty.body")})]}),e.jsx(an,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(Tt,{children:[e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Ds,{children:[e.jsxs(Js,{children:[e.jsxs(Xs,{children:[e.jsx(sn,{onClick:()=>Y(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(nn,{children:a("cart.panelTitle",{count:Ut})}),Lt?e.jsxs(rn,{onClick:()=>X(!0),disabled:ee,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(Rt,{children:[e.jsx(on,{children:o.map(t=>{const s=Ot.get(t.id),c=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,b=t.quantity,x=typeof t.available=="number"&&b>=t.available,B=c*b,L=va(t),_=!!L&&!!K[L],w=wa(t),m=Oe[t.id],k=!pt(m),Q=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(cn,{"data-unavailable":k||void 0,children:[e.jsxs(ln,{"data-thumb":!0,children:[w?e.jsx(dn,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(un,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(hn,{children:[e.jsxs(pn,{"data-desc":!0,children:[w?e.jsx(mn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(gn,{title:t.name,children:t.name}),t.creator?e.jsx(xn,{address:t.creator,linkToProfile:!0}):null,Wt&&d?e.jsxs(Sn,{"data-testid":"cart-creator-tag",children:[e.jsx(Mn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(fn,{children:k?e.jsxs(kn,{children:[e.jsx($n,{name:"warning-fill",size:24}),Q]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(yn,{children:[e.jsx(At,{onClick:()=>xe(()=>A(t.id)),disabled:ee||b<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(bn,{children:b}),e.jsx(At,{onClick:()=>xe(()=>P(t.id)),disabled:ee||x,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(vn,{children:[e.jsx(wn,{})," ",B,r?e.jsx(Cn,{children:t.priceCredits*b}):null]})]})})]}),e.jsxs(jn,{children:[L?e.jsx(Tn,{"data-on":_||void 0,onClick:()=>ie(t),"aria-label":_?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:_?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:_?"heart-solid":"heart"})}):null,e.jsx(In,{onClick:()=>xe(()=>p(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Pn,{children:e.jsx("button",{className:"link",onClick:()=>xe(W),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(An,{children:[e.jsx(zn,{children:a("cart.purchaseSummary")}),e.jsxs(En,{children:[e.jsxs(Bn,{children:[e.jsx(Rn,{children:a("cart.totalItems",{count:Gt})}),e.jsx(Fn,{children:e.jsxs(qn,{children:[e.jsx(_n,{})," ",Je]})})]}),e.jsx(Et,{options:Te.options,totalCents:Me,shortfall:Te.manaShortfall,showCreditsAmount:!1,creditsLabel:F?a("marketCheckout.confirmPurchase"):Te.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||De,onPay:t=>void(F?ot():Z(t)),creditsFallback:{label:ee?a("cart.working"):F?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(F?ot():Z())}}),De?e.jsx(we,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(we,{className:"muted",children:a("cart.signInHint")}),F?e.jsx(we,{className:"muted",children:a("cart.priceChanged")}):null,Ue?e.jsx(we,{className:"muted",children:Ue}):null,e.jsx(Wn,{message:Kt})]})]})]})]}),Xe.length>0?e.jsx(Ln,{children:e.jsx(ps,{title:a("cart.youMightAlsoLike"),items:Xe})}):null,Ae&&n?e.jsx(gs,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:ms,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Ae;fe(null),t()},onCancel:()=>fe(null),onClose:()=>fe(null)}):null,h?e.jsx(Gs,{phase:h.phase,balanceCredits:me,onClose:Zt,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ca(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?Pe(h).options:void 0,shortfall:h.phase==="choose"?Pe(h).manaShortfall:void 0,onPay:sa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?We(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:he,selectedPack:$e,onSelectPack:He,onBuyPacks:()=>void na(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{si as Cart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-
|
|
1
|
+
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-DQv9RCQq.js";import{r as w,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-BeKzrQgz.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-
|
|
1
|
+
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-DQv9RCQq.js";import{E as xe}from"./ErrorNotice-Cj_6GjVe.js";import{d as me,P as he,C as ge,a as ue,b as be}from"./collectionPage.styles-CvHG8rEi.js";import{u as fe}from"./useStore-DWms-sYK.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-DpAor7GL.js";import{L as Se}from"./LoadMore-C2i1PhLK.js";import{u as Pe}from"./useInfiniteGrid-_fAjW7XJ.js";import{G as Ae}from"./grid.styles-B7zcogve.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-CrmSoDwt.js";import"./ethers-BNVA8Ulg.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-BVKbiyma.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|