@dcl/shop 1.13.1-35095058100.commit-8d694c8 → 1.13.1-35146304116.commit-0532a2b
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-CUoq5Ec_.js +400 -0
- package/_assets/{AnimatedBackground-DsRNSmF9.js → AnimatedBackground-CkSS8iDv.js} +2 -2
- package/_assets/{Assets--xiu2hf1.js → Assets-SQGh-_eg.js} +3 -3
- package/_assets/{Authorizations-CAq4bDIU.js → Authorizations-L1Pu4suv.js} +2 -2
- package/_assets/{Cart-Dn-yuO7W.js → Cart-CyKZk7CM.js} +2 -2
- package/_assets/{Collection-DmkDiPC5.js → Collection-DeDyoluW.js} +2 -2
- package/_assets/{CollectionCarousel-C2aZMUS6.js → CollectionCarousel-DM2JN-Og.js} +3 -3
- package/_assets/{Confetti-CQ1miyT0.js → Confetti-BLxVbH5o.js} +4 -4
- package/_assets/{ConstantsUtil-DxsGGeAI.js → ConstantsUtil-CzAq2JlG.js} +2 -2
- package/_assets/{ContentClient-DADL-eWJ.js → ContentClient-CwohpHEJ.js} +2 -2
- package/_assets/{Creator-DZvSnP1W.js → Creator-CXCzrdUF.js} +2 -2
- package/_assets/{DeploymentBuilder-DM4wrDOA.js → DeploymentBuilder-CXqgptK8.js} +2 -2
- package/_assets/{EmotePlaybackBar-DKUTpuQ1.js → EmotePlaybackBar-B-oE6PfU.js} +3 -3
- package/_assets/{ErrorNotice-Dhs1BLZ6.js → ErrorNotice-BjKorbeP.js} +2 -2
- package/_assets/{Event-e3lOCI2G.js → Event-_99dGtyj.js} +2 -2
- package/_assets/{ExchangeController-D1BhRLY_.js → ExchangeController-Ca1vSNQH.js} +2 -2
- package/_assets/{Faq-qe1pCR9P.js → Faq-BVnO4obf.js} +2 -2
- package/_assets/{GetCredits-B96wMekN.js → GetCredits-uWqqViY_.js} +2 -2
- package/_assets/{Grow-pyVWvnNE.js → Grow-EG3kvKvE.js} +2 -2
- package/_assets/{HelpersUtil-B-VhnmAV.js → HelpersUtil-BAFzVkMb.js} +2 -2
- package/_assets/{ItemDetail-EQYc-D1i.js → ItemDetail-D9wpx_7k.js} +2 -2
- package/_assets/{LoadMore-3LNbX1EU.js → LoadMore-DE7YSrmA.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-Xpaqvszn.js → ManaPricingBanner.styles-BQp5Kq1w.js} +2 -2
- package/_assets/{MyAssets-Cw8rL4Qm.js → MyAssets-pm-zUWXo.js} +2 -2
- package/_assets/{MyFavorites-C-H9WoDf.js → MyFavorites-CrlDOLqd.js} +2 -2
- package/_assets/{NetworkUtil-Cp-gtHa0.js → NetworkUtil-D5060_28.js} +2 -2
- package/_assets/{NotFound-C_hegLMz.js → NotFound-DWWysD5r.js} +2 -2
- package/_assets/{NotificationsBell-DEOx8fEC.js → NotificationsBell--z2laYR4.js} +2 -2
- package/_assets/{OutfitDetail-DccboofD.js → OutfitDetail-C45j_NQH.js} +2 -2
- package/_assets/{OutfitPreview-BT1g84TM.js → OutfitPreview-DrOdc6y-.js} +2 -2
- package/_assets/{OutfitStudio-DVNHreV-.js → OutfitStudio-BQAYSFVW.js} +2 -2
- package/_assets/{SaleCountdown-BCjbqWcU.js → SaleCountdown-BF0I20W5.js} +2 -2
- package/_assets/{Spinner-hLMP163F.js → Spinner-BA7Ut7Kf.js} +2 -2
- package/_assets/{StoreSettings-C4lpIKgV.js → StoreSettings-yx6fb2zF.js} +3 -3
- package/_assets/{Success-DZwN3t4z.js → Success-NX2ENRib.js} +2 -2
- package/_assets/{SwapController-BPiF_Q9x.js → SwapController-DEOB6qkC.js} +2 -2
- package/_assets/{TradeService-D8Zf_eTM.js → TradeService-B3hWo7M3.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-ByxVGL9W.js → W3MFrameProviderSingleton-B6rhAVVy.js} +4 -4
- package/_assets/{WebCryptoP256-BowGpuyg.js → WebCryptoP256-BeNxJSfZ.js} +2 -2
- package/_assets/{authorizations-D_SudRT-.js → authorizations-B83pvCo5.js} +2 -2
- package/_assets/{basic-sN1HnC_u.js → basic-X15YC4vH.js} +2 -2
- package/_assets/{biconomy-BijOlHn5.js → biconomy-CN8DzcqS.js} +2 -2
- package/_assets/{browseLayout.styles-6-W9YjOC.js → browseLayout.styles-BKjgHcP6.js} +2 -2
- package/_assets/{browser-DynTtmBx.js → browser-BLhgq6bj.js} +2 -2
- package/_assets/{browser-D9YPKxfl.js → browser-CE_WgHCW.js} +2 -2
- package/_assets/{browser-ponyfill-BVvT8_Fp.js → browser-ponyfill-rx4ABrHQ.js} +2 -2
- package/_assets/builder-e1EitLO9.js +2 -0
- package/_assets/{buy-BkbR80Gf.js → buy-D7nFmJT8.js} +2 -2
- package/_assets/{buy-gasless-CQdgMa0F.js → buy-gasless-DNEVxdLb.js} +2 -2
- package/_assets/{categories-Dquh1vbV.js → categories-CBw6i6jK.js} +2 -2
- package/_assets/{ccip-CV07CEfz.js → ccip-CSmx0Ukl.js} +2 -2
- package/_assets/{ccip-BQaVTqUi.js → ccip-WSZ1SOI1.js} +2 -2
- package/_assets/{chains-Bp3h2aaE.js → chains-CSz4uaiN.js} +2 -2
- package/_assets/{collectionPage.styles-St6jJHia.js → collectionPage.styles-CGv38BAV.js} +8 -8
- package/_assets/{common-vsCsmUBn.js → common-CsauCio8.js} +2 -2
- package/_assets/{controller-DIQ9DcOx.js → controller-BZ74u9Mx.js} +3 -3
- package/_assets/{core-Cs979BA0.js → core-DArcUITf.js} +5 -5
- package/_assets/{createSvgIcon-P53Pfdxl.js → createSvgIcon-D90PXHtL.js} +2 -2
- package/_assets/{crumbs.styles-N13K8LJF.js → crumbs.styles-B_xC21o-.js} +2 -2
- package/_assets/{custom-DP7Ww2Mp.js → custom-C1-1hU-n.js} +2 -2
- package/_assets/{data-capture-r6LhzaPe.js → data-capture-BlpHZAMp.js} +2 -2
- package/_assets/{dcl-schemas-n1W5glLl.js → dcl-schemas-DwpPH57a.js} +2 -2
- package/_assets/{decimals-1-P-OpKN.js → decimals-DM3o8F2C.js} +2 -2
- package/_assets/{decimals-BW5hR24C.js → decimals-aCEDG5JH.js} +2 -2
- package/_assets/{detectExtension-DQg6wKZQ.js → detectExtension-0ov0Rrws.js} +2 -2
- package/_assets/{disposePreview-D5gU11Se.js → disposePreview-HoZr4ggw.js} +2 -2
- package/_assets/{email-C4mis8Vg.js → email-C0VnJMNG.js} +2 -2
- package/_assets/{embedded-wallet-CaKg_r8U.js → embedded-wallet-Bi2n7sef.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-BUJmozsy.js → emotion-styled.browser.esm-DA7w4htd.js} +2 -2
- package/_assets/{engine-D07w-XRT.js → engine-Bztsdwml.js} +2 -2
- package/_assets/{errors-DhRbQUQ8.js → errors-CNu2839_.js} +2 -2
- package/_assets/{estimate-l1-fee-CVLkkmbZ.js → estimate-l1-fee-B-J8ubtj.js} +2 -2
- package/_assets/{eth_estimateGas-DcrnZAhD.js → eth_estimateGas-PqNhqizJ.js} +2 -2
- package/_assets/{eth_getStorageAt-D55EQvGL.js → eth_getStorageAt-OHBtIi6n.js} +2 -2
- package/_assets/{eth_getTransactionCount-996c8uw3.js → eth_getTransactionCount-3Fo1K1in.js} +2 -2
- package/_assets/{ethereum-BB2NY3Ze.js → ethereum-DgDIagMf.js} +2 -2
- package/_assets/{ethers-OrSZ5jmz.js → ethers-1M1CfdDX.js} +2 -2
- package/_assets/{events-C-1hKiSc.js → events-ChynmAya.js} +2 -2
- package/_assets/{execute-DkcTGxdS.js → execute-CMhgmHrV.js} +3 -3
- package/_assets/{extractIPFS-DGBDqkFQ.js → extractIPFS-Dmk6yNJt.js} +2 -2
- package/_assets/{features-Dgji4xPv.js → features-BOeSwrw7.js} +2 -2
- package/_assets/{fetchTokenMetadata-CLY3eWo4.js → fetchTokenMetadata-B3gG8lNZ.js} +3 -3
- package/_assets/{field.styles-B66-mhwP.js → field.styles-CjXfWCnd.js} +2 -2
- package/_assets/{fortmatic-CIXGktdE.js → fortmatic-q9_51_t1.js} +2 -2
- package/_assets/{get-bytecode-B4ah9_Ee.js → get-bytecode-C9C09tyO.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-BUVR1h_d.js → get-ecosystem-wallet-info-Md6d1ElT.js} +2 -2
- package/_assets/{getBalance-DcjxPvBd.js → getBalance-B3PyAxk9.js} +3 -3
- package/_assets/{getInstalledModules-CVmsNb5W.js → getInstalledModules-Cc3eGsGW.js} +2 -2
- package/_assets/{getNFT-CNkldXgA.js → getNFT-08MzaPPL.js} +2 -2
- package/_assets/{getNFT-D6Q2R2w8.js → getNFT-Ct0fZovm.js} +3 -3
- package/_assets/{grid.styles-CbKnaEaH.js → grid.styles-DLJDk6Da.js} +2 -2
- package/_assets/{hashTypedData-BXTiCI6R.js → hashTypedData-CHOe753o.js} +2 -2
- package/_assets/{hashTypedData-BMQaC5AO.js → hashTypedData-CwOONztK.js} +2 -2
- package/_assets/{import-nI9C4MLI.js → import-DTtBPLJq.js} +2 -2
- package/_assets/{in-app-qH_5BfXH.js → in-app-CxjWjLLj.js} +2 -2
- package/_assets/{in-app-wallet-calls-D5QY4WMZ.js → in-app-wallet-calls-BmK7j5xu.js} +2 -2
- package/_assets/{index-B8pq8JLn.js → index-2O4398aF.js} +2 -2
- package/_assets/{index-Dbzum1xk.js → index-8pBNkHhZ.js} +2 -2
- package/_assets/{index-B0eaBbwk.js → index-AKVaFU6R.js} +4 -4
- package/_assets/{index-B6gpbqHk.js → index-B4MGZXnJ.js} +3 -3
- package/_assets/{index-CO3xBlL2.js → index-B4g6oTgw.js} +2 -2
- package/_assets/{index-DEL0w41-.js → index-BBshwWxl.js} +2 -2
- package/_assets/{index-D2_5jCAk.js → index-BG18kxxr.js} +2 -2
- package/_assets/{index-7jxYsA5x.js → index-BRPC-KxV.js} +2 -2
- package/_assets/{index-7LiE_2Hn.js → index-BWmCSXNe.js} +2 -2
- package/_assets/{index-DGoH3dH-.js → index-BX1TYBrh.js} +2 -2
- package/_assets/{index-DILi1pU7.js → index-Bbna9UA6.js} +2 -2
- package/_assets/{index-DWpJbdNp.js → index-BdcOwi8k.js} +2 -2
- package/_assets/{index-DuuWxLJb.js → index-Bldxc1rA.js} +2 -2
- package/_assets/{index-Q91sfGFW.js → index-BlsDk8cY.js} +2 -2
- package/_assets/{index-BT2VuKr_.js → index-BmCV7OM0.js} +2 -2
- package/_assets/{index-BbvUH58s.js → index-BmpyzmIh.js} +2 -2
- package/_assets/{index-DxPCOmel.js → index-BvktIHhu.js} +3 -3
- package/_assets/{index-CspzAmAd.js → index-BwmG-IHr.js} +2 -2
- package/_assets/{index-BIDLTLRs.js → index-BxDOHc7K.js} +2 -2
- package/_assets/{index-Cfiy7F58.js → index-C17qo1Vn.js} +2 -2
- package/_assets/{index-DhxbjStl.js → index-C9YXrqLC.js} +2 -2
- package/_assets/{index-CTpgpMEc.js → index-CArhbxfh.js} +2 -2
- package/_assets/{index-CMGA6Ehu.js → index-CI-biK0J.js} +2 -2
- package/_assets/{index-VrmvnTaa.js → index-CNCV5gb2.js} +2 -2
- package/_assets/{index-C_vB1IQd.js → index-CaMOVOnV.js} +2 -2
- package/_assets/{index-BymYE2Hq.js → index-CjJbgwsG.js} +2 -2
- package/_assets/{index-B9LTXTJ_.js → index-CkhwV11V.js} +2 -2
- package/_assets/{index-u3wacysv.js → index-CnEhIH6s.js} +2 -2
- package/_assets/{index-Ci7OJEKI.js → index-CtQRm-uR.js} +2 -2
- package/_assets/{index-BJOeyXU6.js → index-Cxm44GCk.js} +2 -2
- package/_assets/{index-5TanjW1p.js → index-CyRKYgX3.js} +4 -4
- package/_assets/{index-BYf--6IB.js → index-CzFmHLD1.js} +2 -2
- package/_assets/{index-C9g_L_xU.js → index-D4G9X1ch.js} +2 -2
- package/_assets/{index-BUJII-te.js → index-D4mLzE5t.js} +2 -2
- package/_assets/{index-CBqzQu4b.js → index-D5ygN-7N.js} +3 -3
- package/_assets/{index-CLkKFzPp.js → index-DArg0qfu.js} +2 -2
- package/_assets/{index-B767Ef3o.js → index-DB-g40Lk.js} +2 -2
- package/_assets/{index-DzQkIbqv.js → index-DBONtw7H.js} +12 -12
- package/_assets/{index-gl06JVkD.js → index-DIYaVDaM.js} +2 -2
- package/_assets/{index-FgD-q8nY.js → index-DMqzgHxy.js} +2 -2
- package/_assets/{index-CiVDvcz9.js → index-DPzFuzjH.js} +2 -2
- package/_assets/{index-C11xAGLj.js → index-DQb-ID00.js} +2 -2
- package/_assets/{index-CqA25hIa.js → index-DSUMm5bM.js} +3 -3
- package/_assets/{index-CzONDXJm.js → index-DSo-HA-Q.js} +2 -2
- package/_assets/{index-DsKy4xQX.js → index-DT0ol44j.js} +2 -2
- package/_assets/{index-BBmOO_5v.js → index-DcFBuCAU.js} +2 -2
- package/_assets/{index-BHeP5cAB.js → index-Dp05ebh4.js} +2 -2
- package/_assets/{index-CZBL8oDN.css → index-Drj3_D29.css} +1 -1
- package/_assets/{index-ChkZ_3N-.js → index-Du3ibQ0n.js} +2 -2
- package/_assets/{index-CKir0NTC.js → index-DuT7MyhP.js} +2 -2
- package/_assets/{index-DSZlP7vv.js → index-DwPwW3EN.js} +2 -2
- package/_assets/{index-t1CDJb0U.js → index-Dwa5YPI2.js} +2 -2
- package/_assets/{index-CulTnm_-.js → index-Dx5GsTV9.js} +2 -2
- package/_assets/{index-BbOkb2Lk.js → index-Dy1jWaGR.js} +2 -2
- package/_assets/{index-BlyJ0EeU.js → index-Dzt-Eb9V.js} +2 -2
- package/_assets/{index-DHIc5ihj.js → index-Ei6ZjPB-.js} +2 -2
- package/_assets/{index-jsed_aC3.js → index-Lm6gRDgk.js} +2 -2
- package/_assets/{index-DOE5PvRf.js → index-MW2iAiMi.js} +4 -4
- package/_assets/{index-QEKAtx1e.js → index-Nl1WGeRF.js} +2 -2
- package/_assets/{index-Bt53hnH3.js → index-Wiz3KnKQ.js} +2 -2
- package/_assets/{index-3xvycxSp.js → index-ZDi0sa76.js} +2 -2
- package/_assets/{index-aYru672w.js → index-lzsOd2r-.js} +2 -2
- package/_assets/{index-DyXRsRBM.js → index-mA2FGc2n.js} +2 -2
- package/_assets/{index-C3N8gNG5.js → index-mp-W7rgu.js} +2 -2
- package/_assets/{index-Cfg8NIxf.js → index-o4QA-YgI.js} +2 -2
- package/_assets/{index-DrYTVtgg.js → index-p-Gdk04N.js} +2 -2
- package/_assets/{index-2lALaSI0.js → index-qIZigzaT.js} +2 -2
- package/_assets/{index-CFkA928w.js → index-sAHSTD-e.js} +2 -2
- package/_assets/{index.es-89IU7kpU.js → index.es-BojIKfcn.js} +2 -2
- package/_assets/{index.es-BxUByfMu.js → index.es-Bu43E8Od.js} +2 -2
- package/_assets/{index.es-O2YZpGjD.js → index.es-D1GXqsQd.js} +5 -5
- package/_assets/{index.es-CeXL7thu.js → index.es-RB1w60M4.js} +2 -2
- package/_assets/{items-empty-Bo2ok7jY.js → items-empty-DLLWCTVk.js} +2 -2
- package/_assets/{jump-CfxL77MI.js → jump-BPwh2vZy.js} +2 -2
- package/_assets/{linkAccount-CH9thals.js → linkAccount-D8t0rhjQ.js} +2 -2
- package/_assets/{localBatchGatewayRequest-CSeZ4gRB.js → localBatchGatewayRequest-DwX7OXdU.js} +2 -2
- package/_assets/{modal.styles-2uQXkegU.js → modal.styles-XB3kPZSk.js} +2 -2
- package/_assets/{native-CTjG-6uw.js → native-CVoJihlN.js} +2 -2
- package/_assets/{networks-DcWUPxCR.js → networks-k-5FUkuC.js} +2 -2
- package/_assets/{onramp-i_2R0Aty.js → onramp-BlfVZmFE.js} +2 -2
- package/_assets/{openzeppelin-CRJGheas.js → openzeppelin-CHH76T2R.js} +2 -2
- package/_assets/{ownerOf-Cg4HNQ0Q.js → ownerOf-BsF3HIfV.js} +2 -2
- package/_assets/{parseNft-C5TjCi9l.js → parseNft-fbo1tW69.js} +3 -3
- package/_assets/{parseSignature-BkGllSKb.js → parseSignature-C8wluzrl.js} +2 -2
- package/_assets/{parseSignature-DlxX_eFH.js → parseSignature-UG1Z-iRF.js} +4 -4
- package/_assets/{passkeys-DHzFFqFt.js → passkeys-BgD3qEUS.js} +2 -2
- package/_assets/{pay-with-exchange-Da-95QjC.js → pay-with-exchange-Dul7TqcO.js} +2 -2
- package/_assets/{prepare-contract-call-DRyZHwAJ.js → prepare-contract-call-BDx98mcK.js} +2 -2
- package/_assets/{qr-overlay-B5-Cv-4F.js → qr-overlay-CzJOf0PR.js} +4 -4
- package/_assets/{react-DaBuTM6Q.js → react-VV7ruaEe.js} +2 -2
- package/_assets/{receive-BxwWtavl.js → receive-Mbh48-Du.js} +2 -2
- package/_assets/{resolveImplementation-UAeMoslS.js → resolveImplementation-C-Bp0jW1.js} +2 -2
- package/_assets/{resume-buy-DshgN9vm.js → resume-buy-lwwrCAQL.js} +2 -2
- package/_assets/{rpc-xoh1bqpg.js → rpc-dS3qUOUv.js} +2 -2
- package/_assets/{sales-empty-B0QNGz8U.js → sales-empty-CdZ6YLiR.js} +2 -2
- package/_assets/{search-empty-CiaPLxpu.js → search-empty-Xv_q1rjS.js} +2 -2
- package/_assets/{secp256k1-CI4_BdKy.js → secp256k1-B29fjO3k.js} +2 -2
- package/_assets/{secp256k1-IgPcu2TC.js → secp256k1-BYEzJ9Ar.js} +2 -2
- package/_assets/{secp256k1-B6GZ7kat.js → secp256k1-CzYB4UO1.js} +2 -2
- package/_assets/{send-CMxH0R30.js → send-Kib-9VTx.js} +2 -2
- package/_assets/{send-batch-transaction-_47YxVXu.js → send-batch-transaction-Bsec8aWl.js} +2 -2
- package/_assets/{send-eip712-transaction-dUQPsneg.js → send-eip712-transaction-B8xB6E7z.js} +3 -3
- package/_assets/{send-gasless-transaction-C9qimzDD.js → send-gasless-transaction-DOAZoiru.js} +3 -3
- package/_assets/{send-transaction-C00epVak.js → send-transaction-C8HId9c-.js} +3 -3
- package/_assets/{sendMetaTransaction-D_Udygrx.js → sendMetaTransaction-ZH8zQFka.js} +2 -2
- package/_assets/{sendRawTransaction-3Tc8O82f.js → sendRawTransaction-Dj_4qH3D.js} +4 -4
- package/_assets/{sentry-ilLelGl_.js → sentry-o0F_Elyr.js} +3 -3
- package/_assets/{serializeTransaction-BN5Z150K.js → serializeTransaction-Ci108h6S.js} +2 -2
- package/_assets/{session-proposal-DFNQHP37.js → session-proposal-DoiJdtGZ.js} +2 -2
- package/_assets/{session-request-D-kuAKOc.js → session-request-D9ZfIWnv.js} +3 -3
- package/_assets/{sha256-C6I6NkPD.js → sha256-DKc8_pkb.js} +2 -2
- package/_assets/{sha3-CcKshJ6_.js → sha3-Djo6RzzD.js} +2 -2
- package/_assets/signin-empty-0RVG8Orx.js +2 -0
- package/_assets/{signing-D_eQ6aEY.js → signing-B2ulpOrN.js} +4 -4
- package/_assets/{skeleton.styles-B7ceCvK9.js → skeleton.styles-V94rqky6.js} +2 -2
- package/_assets/{socials-DCNPHMgt.js → socials-Oa6dTfHZ.js} +2 -2
- package/_assets/{styled-TsFrVdC0.js → styled-DyNfGwco.js} +2 -2
- package/_assets/{swaps-CicFV6pq.js → swaps-COfyeTsO.js} +2 -2
- package/_assets/{thirdweb-Vp1uscmH.js → thirdweb-DI7ZaNzU.js} +4 -4
- package/_assets/{to-serializable-transaction-BT5px6SS.js → to-serializable-transaction-By8QfhXP.js} +3 -3
- package/_assets/{totalSupply-CkL8_XXt.js → totalSupply-BFOzDnZo.js} +2 -2
- package/_assets/{transaction-sOBP-DPj.js → transaction-B1xgjYJ6.js} +2 -2
- package/_assets/{transactionReceipt--9bOdV8l.js → transactionReceipt-D8BwP6qt.js} +2 -2
- package/_assets/{transactions-CWkneGU6.js → transactions-Bphi4uNv.js} +2 -2
- package/_assets/{useCreditPacks-DGUqMJ6U.js → useCreditPacks-DgnQhl__.js} +2 -2
- package/_assets/{useInfiniteGrid-DpNO4hZU.js → useInfiniteGrid-CqEvXCvo.js} +2 -2
- package/_assets/{useStore-HIvj56kg.js → useStore-BxEjYiKk.js} +3 -3
- package/_assets/{useTheme-5m8LACXM.js → useTheme-BSSQBx8D.js} +2 -2
- package/_assets/{utils-Ci73E7nx.js → utils-ClhrwhHu.js} +2 -2
- package/_assets/{verifyHash-Bk-B5GPz.js → verifyHash-CUVRY0V6.js} +2 -2
- package/_assets/{w3m-modal-BtyAd8rE.js → w3m-modal-BGMNR53_.js} +2 -2
- package/_assets/{w3m-modal-BTUtrhm6.js → w3m-modal-Cl3xsdnY.js} +2 -2
- package/_assets/{wait-for-tx-receipt-Cbmd9TUG.js → wait-for-tx-receipt-CL_z5VGg.js} +2 -2
- package/_assets/{wallets-CUIygOS2.js → wallets-B1ZJrwjj.js} +6 -6
- package/_assets/{web-connector-BIkHBHih.js → web-connector-Dq-fpFU2.js} +4 -4
- package/_assets/{writeContract-CEDCT-Ld.js → writeContract-BvArkAMz.js} +2 -2
- package/_assets/{zora-sepolia-C43Ueozz.js → zora-sepolia-IkBJSEG_.js} +2 -2
- package/_assets/{zoraTestnet-CnMCD5vw.js → zoraTestnet-DP3dbXZ6.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-CjNbjbB8.js +0 -373
- package/_assets/builder-BCPamKJP.js +0 -2
- package/_assets/signin-empty-C52WOkGa.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-
|
|
1
|
+
import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s as r,d as z,c as a,K as Ae,S as ae,bk as Le,C as Te,bl as $a,R as Ke,bm as Sa,Q as Ma,I as Y,x as Ze,H as Ta,aj as O,W as Tt,E as Ia,F as Aa,D as Ea,bn as Pa,L as za,bo as Ra,X as Ba,bp as _a,bq as qa,br as Fa,bs as It,Z as Wa,bt as La,bu as Ka,bv as Qa,aw as Qe,$ as Na,J as Ua,bw as At,al as V,bx as Et,by as Ga,bz as Ha,i as oe,bA as Oa,bB as Da,bC as Va,bD as Ne,a3 as Ya,bE as Ce,bF as je,bG as Pt,bH as Ja,v as zt,w as Rt,bI as Xa}from"./index-DBONtw7H.js";import{M as Za,S as es,C as ts,H as as,a as ss,T as ns,X as is,b as rs,B as os,c as cs,d as Bt,e as ls,f as Ee,g as ds,h as us,i as hs,j as ps,k as Xe,l as ge,L as gs,P as xs,m as _t,n as qt,W as ms,o as fs,p as bs,q as ys,A as vs,r as ws,s as Cs,t as js,u as ks,v as $s,w as Ss,x as Ms,y as Ts,z as Is,D as As,E as Es,F as Ps,G as zs,I as Rs,J as Bs,K as _s,N as Ue,O as qs,Q as Fs,R as Ws,U as Ft,V as Wt,Y as Ls,Z as Ks,_ as Qs,$ as Ns,a0 as Lt,a1 as Us}from"./CollectionCarousel-DM2JN-Og.js";import{m as Ie}from"./mana-matic-light-Bl5duieC.js";import{l as Gs,n as Hs,g as Os,o as Ds,h as Vs,A as Ys}from"./authorizations-B83pvCo5.js";import{p as Kt,g as Js,h as Ge}from"./buy-D7nFmJT8.js";import{w as Xs,S as He,b as Zs,G as en}from"./buy-gasless-DNEVxdLb.js";import{u as tn,M as an,R as ke,r as sn,c as nn,g as rn,a as on,p as Qt,b as Oe}from"./useCreditPacks-DgnQhl__.js";import{i as cn,a as ln}from"./errors-CNu2839_.js";import{E as dn}from"./ErrorNotice-BjKorbeP.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-ZH8zQFka.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new i.Error().stack;d&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[d]="01e2da6c-e8fa-4a56-9536-eaab151d7785",i._sentryDebugIdIdentifier="sentry-dbid-01e2da6c-e8fa-4a56-9536-eaab151d7785")}catch{}})();const un=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -745,4 +745,4 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-DaBuTM6Q.js";import{s
|
|
|
745
745
|
margin-top: 0;
|
|
746
746
|
}
|
|
747
747
|
`;function Ye(i){if(cn(i))return a("errors.rejected");const d=(i.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Te.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const pi=12e4;function gi(i){const d=[];return i.unavailable.length&&d.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&d.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Je=i=>i.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Me=i=>i.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1}))),Vt=8;function Ai(){var $t,St,Mt;Ta({title:a("nav.cart"),noindex:!0});const i=O(t=>t.items),d=O(t=>t.remove),k=O(t=>t.increment),$=O(t=>t.decrement),R=O(t=>t.clear),U=O(t=>t.restore),H=O(t=>t.setFittingOpen),E=Tt(t=>t.items),J=Tt(t=>t.toggle),{session:n,signIn:G}=Ia(),sa=Aa(),xe=tn().packs.slice(0,an);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const na=i.some(t=>t.category!=="emote"),{data:Pe}=Ea({queryKey:["upsell-listings"],queryFn:()=>Xa({first:40}),staleTime:6e4}),{data:j}=Pa(n),y=za(),X=ja(),{state:B}=ka(),[ia,de]=M.useState(null),[et,me]=M.useState(null),[ra,_]=M.useState(!1),[q,D]=M.useState(null),tt=M.useRef(0),[h,S]=M.useState(null),{data:fe}=Ra(n),{data:ue}=Ba(!0),[ze,at]=M.useState(""),he=M.useRef(null),st=_a(i),nt=t=>At(st[t.id]),Re=i.filter(nt),it=i.length>0&&Re.length===0,oa=Re.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ca=i.reduce((t,s)=>t+s.quantity,0),la=Re.reduce((t,s)=>t+s.quantity,0),rt=q?q.liveTotalCredits:oa,da=new Set(i.map(t=>t.id)),ot=((Pe==null?void 0:Pe.items)??[]).filter(t=>!da.has(t.id)).slice(0,12),ct=M.useMemo(()=>i.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[i]),se=qa(Vt,{exclude:ct}),lt=Fa({enabled:se.enabled,hasSignal:se.hasSignal,isLoading:se.isLoading,isError:se.isError,personalized:($t=se.result)==null?void 0:$t.personalized,rowCount:((St=se.result)==null?void 0:St.data.length)??0}),ua=new Map(q==null?void 0:q.buyable.map(t=>[t.item.id,t])),be=(j==null?void 0:j.credits)??0,Be=rt*10,ha=ue?It(Be,ue):0n,_e=Ue({priceCents:Be,priceManaWei:ha,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),pa=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),ga=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),xa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ma=Ga,fa=t=>Da(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),me(null),de(null)}function ba(){S(null),_(!1)}function dt(t){const s=Je(t),o=Math.max(0,s-be),c=xe.find(u=>u.credits>=o)??xe[xe.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:be,shortfall:o}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:o}),_(!1)}async function qe(t){if(!n||t.length===0)return;const s=Me(t),o=s.map(f=>({...f.item,priceCredits:f.priceCredits})),c=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),u=[];let v="authorize";const g=new Set,T=new Set,L=new Set,F=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const f=[],P=rn(s,Kt);let K=0;for(const p of P){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:m,maxCreditedValue:b}=await Va(n.identity,p.units.map(on));p.units.forEach((N,re)=>{u.push({salt:m.id,itemId:N.item.id}),f.push({...p.drafts[re],credits:[m],maxCreditedValue:b})}),K+=p.units.length}catch(m){if(ln(m)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(b=>b.salt))])}catch(b){oe(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}dt(t);return}throw m}}u.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const Q=Js(f).length,te=p=>Q>1?{current:p,total:Q}:void 0,W=(p,m)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(m)}),C=p=>p<Q?W("awaiting-signature",p+1):W("settling",Q);W("awaiting-signature",1);let x=[];const I=new Map,ne=async p=>{const m=await Promise.allSettled(p.map(b=>Xs(b)));return m.forEach((b,N)=>{const re=I.get(p[N])??[];b.status==="fulfilled"?(re.forEach(We=>T.add(We)),F.push(p[N])):b.reason instanceof He||re.forEach(We=>L.add(We))}),m.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(Gs())try{let p=0;x=await Zs({purchases:f,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>W("settling",Math.min(p+1,Q)),onBroadcast:({txHash:b,salts:N})=>{p+=1,I.set(b,N),N.forEach(re=>g.add(re))},onGroupSettling:({settled:b})=>W("settling",b)});const m=await ne(x);if(m.length&&!m.some(b=>b instanceof He))throw m[0];w=!0}catch(p){if(p instanceof He)throw await ne([...I.keys()]),p;if(!(p instanceof en)||!Ya(n.providerType))throw p;x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:m})=>m.forEach(b=>g.add(b)),onSettled:({txHash:m,salts:b})=>{b.forEach(N=>T.add(N)),F.push(m)},onReverted:({salts:m})=>m.forEach(b=>L.add(b))})}else x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(m=>g.add(m)),onSettled:({txHash:p,salts:m})=>{m.forEach(b=>T.add(b)),F.push(p)},onReverted:({salts:p})=>p.forEach(m=>L.add(m))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...Ce(o),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Wt(y);const we=he.current;he.current=null,S(null),_(!1);const ie={items:c,txHash:x[0]??void 0,txHashes:x,settled:!0,...we?{creditsAdded:we}:{}};X("/success",{state:ie,replace:!0})}catch(f){je(f)||oe(f,{flow:"cart_checkout",step:v,cart_size:t.length});const P=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:Q}=Qt({reservations:u,spent:P,settled:T}),te=[...P].some(x=>!T.has(x)),W=o.filter(x=>Q.includes(x.id)),C=o.filter(x=>!Q.includes(x.id));if(V(je(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Pt(f),value_usd:Et(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:W.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){oe(x,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),W.length>0){Q.forEach(x=>d(x)),D(null),Wt(y),V("Shop Completed Purchase",{...Ce(W),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),_(!1);return}S({phase:"error",message:te?void 0:Ye(f),heldCredits:te})}}function ut(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=he.current;he.current=null,S(null),_(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function ht(t,s){je(t)||oe(t,{flow:s,step:"submit"}),V(je(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Pt(t)}),S({phase:"error",message:Ye(t)}),_(!1)}async function ya(t,s,o){const c=zt(Rt.MANAToken,s),u=zt(Rt.CreditsManager,s);await Vs({auth:{kind:Ys.Allowance,contractAddress:c.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(ue)return ue;try{return await y.fetchQuery(Oa())}catch{return}}async function va(t){const s=Me(t).reduce((v,g)=>v+g.usdCents,0),c=(fe??0n)>0n?await pt():ue,u=c?It(s,c):0n;return{totalCents:s,manaWei:u}}async function gt(t,s){const o=Je(t),{totalCents:c,manaWei:u}=await va(t),v=Ue({priceCents:c,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=bt(v,s);await mt(xt(s,t),g,()=>s==="mana"?void yt(t,g):void vt(t,c,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:c,manaWei:u}),_(!1);return}if(j!=null&&j.credits<o){dt(t);return}qe(t)}function Fe(t){return Ue({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[pe,ve]=M.useState(null);function xt(t,s){const o=new Map;for(const c of s){const u=Ls(t,Oe(c));o.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...o.values()]}async function mt(t,s,o){const c=[];for(const{spender:u,chainId:v}of t){const g=Hs(v,u),T=n?await Os(g,n.address,s).catch(()=>!0):!0;Ds(n==null?void 0:n.providerType,T)&&c.push(g)}if(c.length===0){o();return}_(!1),ft(c,0,o)}function ft(t,s,o){ve({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?ft(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function wa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=h;if(t==="credits"){qe(s);return}const u=bt(Fe(h),t);mt(xt(t,s),u,()=>t==="mana"?void yt(s,u):void vt(s,o,c))}async function yt(t,s){if(!n||t.length===0)return;const o=Me(t),c=o.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const g=await Ks({trades:ga(o),coupons:xa(o),mints:pa(o),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(T=>d(T.item.id)),D(null),V("Shop Completed Purchase",{...Ce(c),payment_type:"mana",transaction_hash:g[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(u,g)}catch(g){ht(g,"buy_cart_mana")}}async function vt(t,s,o){if(!n||t.length===0)return;const c=Me(t),u=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=Qs(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),T=[],L=new Set,F=new Set;S({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),f=[],P=new Map,K=new Map;for(let C=0;C<c.length;C++){const x=c[C],I=w[C],ne=g[C],we=Ns(Math.max(0,x.usdCents-ne),s,o);let ie;if(ne<=0)ie=Lt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:c.length});const m=x.item,{credit:b,maxCreditedValue:N}=await Ja(n.identity,ne,I.kind==="trade"?I.trade.id:void 0,m.contractAddress&&m.itemId!=null?{contractAddress:m.contractAddress,itemId:String(m.itemId)}:void 0);T.push({salt:b.id,itemId:m.id}),ie=Lt(I,[b],N)}const p=Kt(ie);P.set(p,(P.get(p)??0n)+we),K.has(p)||K.set(p,f.length),f.push(ie)}T.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of P){const I=K.get(C);I==null||x<=0n||(f[I]={...f[I],maxCreditedValue:(BigInt(f[I].maxCreditedValue)+x).toString()})}const Q=[...P.values()].reduce((C,x)=>C+x,0n);await ya(n.signer,Us(w[0]),Q);const te=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const W=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>F.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...Ce(u),payment_type:"credits_and_mana",transaction_hash:W[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(v,W)}catch(w){const{toRelease:f}=Qt({reservations:T,spent:new Set([...L].filter(P=>!F.has(P))),settled:new Set});f.length&&Ne(n.identity,f).catch(()=>{}),T.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ht(w,"buy_cart_combined")}}async function Z(t){if(!n){Ft({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(nt);if(s.length===0)return;de(null),me(null),_(!0);const o=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:Et(o),has_sufficient_credits:be>=o});try{const c=await sn(s,n.address,ma,await pt(),fa,Ha),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(v=>d(v.id)),me(gi(c))),c.buyable.length===0){de(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){oe(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),de(Ye(c))}finally{_(!1)}}async function wt(){if(q){if(!n){Ft({type:"cart-checkout"}),G();return}if(Date.now()-tt.current>pi){D(null),me(null),await Z();return}de(null),gt(q.buyable)}}async function Ca(){if(ze){try{sessionStorage.setItem(ke,JSON.stringify(O.getState().items))}catch{}_(!0);try{const t=await nn(ze,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(ke)}catch{}oe(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{_(!1)}}}const Ct=M.useRef(!1);M.useEffect(()=>{if(!n||Ct.current||!qs("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const jt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||jt.current)return;jt.current=!0,he.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(ke);if(s){sessionStorage.removeItem(ke);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const kt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.startCheckout)||kt.current)return;kt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ra||(h==null?void 0:h.phase)==="processing";return i.length===0&&!h?e.jsx(Ut,{children:e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(An,{children:e.jsx(Wa,{variant:"light",testId:"cart-empty",icon:La,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ut,{children:[e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Sn,{children:[e.jsxs(Mn,{children:[e.jsxs(Tn,{children:[e.jsx(En,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(Pn,{children:a("cart.panelTitle",{count:ca})}),na?e.jsxs(zn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(In,{children:[e.jsx(Rn,{children:i.map(t=>{const s=ua.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,T=o*v,L=Ka(t),F=!!L&&!!E[L],w=Qa(t),f=st[t.id],P=!At(f),K=f==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(Bn,{"data-unavailable":P||void 0,children:[e.jsxs(_n,{"data-thumb":!0,children:[w?e.jsx(qn,{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(Fn,{"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(Wn,{children:[e.jsxs(Ln,{"data-desc":!0,children:[w?e.jsx(Qn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Kn,{title:t.name,children:t.name}),t.creator?e.jsx(Nn,{address:t.creator,linkToProfile:!0}):null,sa&&u?e.jsxs(Zn,{"data-testid":"cart-creator-tag",children:[e.jsx(ei,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Un,{children:P?e.jsxs(Jn,{children:[e.jsx(Xn,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Gn,{children:[e.jsx(Ot,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=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(Hn,{children:v}),e.jsx(Ot,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"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(On,{children:[e.jsx(Dn,{})," ",e.jsx(Qe,{credits:T}),c?e.jsx(Vn,{children:e.jsx(Qe,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Yn,{children:[L?e.jsx(ti,{"data-on":F||void 0,onClick:()=>J(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:F?"heart-solid":"heart"})}):null,e.jsx(ai,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(si,{children:e.jsx("button",{className:"link",onClick:()=>ye(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(ni,{children:[e.jsx(ii,{children:a("cart.purchaseSummary")}),e.jsxs(ri,{children:[e.jsxs(oi,{children:[e.jsx(ci,{children:a("cart.totalItems",{count:la})}),e.jsx(di,{children:e.jsxs(li,{children:[e.jsx(ui,{})," ",e.jsx(Qe,{credits:rt})]})})]}),e.jsx(Xt,{options:_e.options,totalCents:Be,shortfall:_e.manaShortfall,showCreditsAmount:!1,creditsLabel:q?a("marketCheckout.confirmPurchase"):_e.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||it,onPay:t=>void(q?wt():Z(t)),creditsFallback:{label:ee?a("cart.working"):q?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(q?wt():Z())}}),it?e.jsx(Se,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Se,{className:"muted",children:a("cart.signInHint")}),q?e.jsx(Se,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx(Se,{className:"muted",children:et}):null,e.jsx(hi,{message:ia})]})]})]})]}),lt===null&&e.jsx(Dt,{"data-testid":"cart-personal-upsell",children:e.jsx(Na,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Vt})}),lt!==null&&ot.length>0?e.jsx(Dt,{children:e.jsx(Fs,{title:a("cart.youMightAlsoLike"),items:ot})}):null,pe&&n?e.jsx(Ws,{auth:pe.auth,signer:n.signer,step:{index:pe.index,total:pe.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Ie,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=pe;ve(null),t()},onCancel:()=>ve(null),onClose:()=>ve(null)}):null,h?e.jsx(Cn,{phase:h.phase,balanceCredits:be,heldCreditsCount:((Mt=j==null?void 0:j.held)==null?void 0:Mt.credits)??null,onClose:ba,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:Ua(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?Fe(h).options:void 0,shortfall:h.phase==="choose"?Fe(h).manaShortfall:void 0,onPay:wa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Je(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:xe,selectedPack:ze,onSelectPack:at,onBuyPacks:()=>void Ca(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{Ai as Cart};
|
|
748
|
-
//# sourceMappingURL=Cart-
|
|
748
|
+
//# sourceMappingURL=Cart-CyKZk7CM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as se,u as oe}from"./react-
|
|
1
|
+
import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s as u,i as re,I as ae,k as ie,c as r,a6 as H,M as F,bO as ne,bP as le,e as ce,c4 as de,D as ue,H as me,az as pe,Z as fe,a0 as W,a1 as he,bQ as xe,c5 as be}from"./index-DBONtw7H.js";import{E as ge}from"./ErrorNotice-BjKorbeP.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-CGv38BAV.js";import{u as ke}from"./useStore-BxEjYiKk.js";import{u as Se,S as G,R as $e,a as Ne,b as Ee,c as Ie,D as Fe,d as Me,C as Re,e as Te,F as _e,f as Pe,g as Ae,M as De,h as Le}from"./browseLayout.styles-BKjgHcP6.js";import{L as Be}from"./LoadMore-DE7YSrmA.js";import{u as ze}from"./useInfiniteGrid-CqEvXCvo.js";import{u as Oe,s as We}from"./search-empty-Xv_q1rjS.js";import{S as Ge}from"./categories-CBw6i6jK.js";import{G as Ue}from"./grid.styles-DLJDk6Da.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-B_xC21o-.js";import"./skeleton.styles-V94rqky6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="08b54752-9169-4e47-bbdd-f4d93e1b27dc",o._sentryDebugIdIdentifier="sentry-dbid-08b54752-9169-4e47-bbdd-f4d93e1b27dc")}catch{}})();const He=u.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -131,4 +131,4 @@ import{j as e,r as h,d as se,u as oe}from"./react-DaBuTM6Q.js";import{d as b,s a
|
|
|
131
131
|
background: ${j.blackBtn};
|
|
132
132
|
}
|
|
133
133
|
`;function lt({address:o}){var d,n;const{data:s}=H(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),l=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${ce.profileUrl}/${o}`,m=ne(le({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(at,{"data-testid":"creator-card",children:[l?e.jsx(U,{src:l,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const ct=48,dt=["all","on_sale","not_for_sale"];function Et(){var O;const{contractAddress:o}=se(),s=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Oe(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:M}=l,g=dt.includes(l.status)?l.status:"all",R=t=>a({status:t});Se(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,q=d?Ge[d]:void 0,K=(G.find(t=>t.key===M)??G[0]).server,P={contractAddress:o,category:m,rarities:n.length?n:void 0,wearableCategories:q,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:Z,isLoading:k,error:A,hasNextPage:V,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=ze(["collection-page",P],t=>xe({...P,first:ct,skip:t}),{enabled:!!o}),S=de(Q),{data:c}=ue({queryKey:["collection-meta",o],queryFn:()=>be(o),enabled:!!o,staleTime:5*6e4}),L=(c==null?void 0:c.name)||r("collection.fallbackTitle");me({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=H(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:L})]}),e.jsx(Ve,{name:L,creator:p}),e.jsxs(Ne,{"data-testid":"browse",children:[w?e.jsx(Ee,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(lt,{address:p}),e.jsxs(Ie,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Fe,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Re,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Te,{children:e.jsx(_e,{category:m,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Pe,{children:e.jsx(Ae,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(De,{children:[e.jsx(Le,{sort:M,onSort:t=>a({sort:t}),total:Z,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),A?e.jsx(ge,{message:r("collection.error")}):null,!k&&!A&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:We,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(Be,{hasNextPage:V,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{Et as Collection,Et as default};
|
|
134
|
-
//# sourceMappingURL=Collection-
|
|
134
|
+
//# sourceMappingURL=Collection-DeDyoluW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,j as r}from"./react-
|
|
1
|
+
import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as j,r as R,m as K,k as X,i as U}from"./authorizations-B83pvCo5.js";import{i as ie}from"./errors-CNu2839_.js";import{d as l,s as n,k as oe,c as k,I as Q,i as E,aK as re,bS as O,ci as se,v as A,w as M,aP as G,a3 as de,a4 as J,K as N,av as ce,cj as le,ck as H,a1 as he}from"./index-DBONtw7H.js";import{E as pe}from"./ErrorNotice-BjKorbeP.js";import{j as ue,k as ge,l as fe,m as xe,n as me,o as I,q as be,s as we}from"./buy-D7nFmJT8.js";import{a as ve,w as ye,S as ke,G as Ce}from"./buy-gasless-DNEVxdLb.js";import{M as B,E as F,s as Y}from"./sendMetaTransaction-ZH8zQFka.js";import{C as Z}from"./ethers-1M1CfdDX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e01e4217-4286-4b2f-a655-cdba77702db7",t._sentryDebugIdIdentifier="sentry-dbid-e01e4217-4286-4b2f-a655-cdba77702db7")}catch{}})();const $="shop:resume_after_signin",Ae=900*1e3;function gt(t){try{sessionStorage.setItem($,JSON.stringify({...t,at:Date.now()}))}catch{}}function ft(t){let e;try{e=sessionStorage.getItem($)}catch{return null}if(!e)return null;try{sessionStorage.removeItem($)}catch{}let a;try{a=JSON.parse(e)}catch{return null}return!a||a.type!==t||typeof a.at!="number"||Date.now()-a.at>Ae?null:a.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:a.path}}function xt(t,e){const a=(o,...u)=>void t.invalidateQueries({queryKey:e?[o,...u]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),a("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const Me=oe`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,Te=n.div`
|
|
4
4
|
position: fixed;
|
|
@@ -184,7 +184,7 @@ import{r as C,j as r}from"./react-DaBuTM6Q.js";import{s as ne,h as S,A as P,b as
|
|
|
184
184
|
@media (prefers-reduced-motion: reduce) {
|
|
185
185
|
animation: none;
|
|
186
186
|
}
|
|
187
|
-
`;function mt({auth:t,signer:e,step:a,title:o,reason:u,name:c,image:m,icon:f,onAuthorized:x,onCancel:w,onClose:b}){const[p,g]=C.useState(!1),[s,y]=C.useState(null);async function h(){g(!0),y(null);try{await ne({auth:t,signer:e,active:!0}),x()}catch(d){ie(d)?y(k("authorizeStep.errorRejected")):(E(d,{flow:"authorize_step",kind:t.kind}),y(k("authorizeStep.errorGeneric"))),g(!1)}}return r.jsx(Te,{onClick:p?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:r.jsxs(je,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[r.jsxs(ze,{children:[r.jsx(We,{children:o}),a&&a.total>1?r.jsx(Ie,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:a.index,total:a.total})}):null,r.jsx(Ee,{onClick:b,disabled:p,"aria-label":k("authorizeStep.close"),children:r.jsx(Q,{name:"close",className:"ico"})})]}),r.jsxs($e,{"data-testid":"authorize-step-row",children:[r.jsx(Se,{children:m?r.jsx("img",{src:m,alt:""}):f}),r.jsxs(Pe,{children:[r.jsx(Ne,{title:c,children:c}),r.jsx(Be,{children:u})]})]}),r.jsx(Fe,{children:k("authorizeStep.note")}),r.jsx(pe,{message:s}),r.jsxs(Ve,{children:[r.jsx(De,{type:"button",onClick:w,disabled:p,children:k("authorizeStep.cancel")}),r.jsx(qe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void h(),disabled:p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(Oe,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const bt="data:image/webp;base64,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",wt="https://cdn.decentraland.org/@dcl/shop/1.13.1-35095058100.commit-8d694c8/_assets/buy-error-22UunaPC.png";function He(t,e){return(t+e-1n)/e}function Le(t,e,a){return t<=0||e<=0?0n:t>=e?a:He(a*BigInt(t),BigInt(e))}function vt(t){var b,p,g;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,a=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,u=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];a>=e&&c.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const m=O(a)*se;if(o>0n&&m>0&&m<e){const s=e-m,y=Le(s,e,o);u>=y&&c.push({method:"combined",creditsCents:m,credits:O(m),manaWei:y})}o>0n&&u>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const f=((b=c.find(s=>s.method==="credits"))==null?void 0:b.method)??((p=c.find(s=>s.method==="combined"))==null?void 0:p.method)??((g=c.find(s=>s.method==="mana"))==null?void 0:g.method)??null,w=!c.some(s=>s.method==="mana"||s.method==="combined")&&o>0n&&u>0n?{manaWei:u,manaCents:Re(u,e,o),priceCents:e}:null;return{options:c,preferred:f,manaShortfall:w}}function Re(t,e,a){return Number(t*BigInt(e)/a)}function yt(t,e){let a=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const u=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(u,a);return a-=c,c})}function kt(t,e){return t.options.find(a=>a.method===e)??null}async function Ct(t){const[e]=await _({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function At(t){const[e]=await _({...t,trades:[],mints:[t.mint]});return e}async function _(t){const{trades:e,coupons:a,mints:o=[],buyer:u,signer:c,onSigned:m,manaWei:f}=t;if(e.length===0&&o.length===0)throw new Error("No items to buy");const x=new Map;for(const p of e){const g=`${p.chainId}:${p.contract.toLowerCase()}:${a!=null&&a[p.id]?"coupon":"plain"}`,s=x.get(g);s?s.push(p):x.set(g,[p])}const w=new Map;for(const p of o){const g=w.get(p.chainId);g?g.push(p):w.set(p.chainId,[p])}const b=[];for(const p of x.values()){const g=a?p.map(s=>a[s.id]).filter(s=>s!=null):[];b.push(await Ke({trades:p,coupons:g.length?g:void 0,buyer:u,signer:c,onSigned:m,requiredManaWei:f}))}for(const[p,g]of w){const s=f??g.reduce((y,h)=>y+BigInt(h.item.priceWei),0n);b.push(await Xe({mints:g,chainId:p,buyer:u,signer:c,onSigned:m,requiredManaWei:s}))}return b}async function Ke(t){const{trades:e,coupons:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=e[0],x=A(G(f.contract),f.chainId),w=A(M.MANAToken,f.chainId);await S({auth:{kind:P.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:f.chainId},signer:u,requiredWei:m});const b=e.map(h=>ge(h,o));if(a!=null&&a.length&&a.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${a.length} for ${e.length} trades`);const p=a!=null&&a.length?a.map((h,d)=>fe(h,e[d].sent.length)):void 0;if(j.enabled)try{const{selector:h,data:d}=p?xe(e,a??[],o,x.abi):me(e,o,x.abi),v=h+d.slice(2),T=R(),z=K(u.provider,T),q=await Y(z,T,v,x,{serverURL:j.relayerUrl});return c==null||c(),await X(q,"the MANA purchase"),q}catch(h){if(h instanceof B&&h.code===F.USER_DENIED||h instanceof U)throw h;E(h,{flow:"buy_mana",step:"gasless_fallback"})}await J(u.provider,f.chainId);const g=new Z(x.address,x.abi,u),s=p?await g.acceptWithCoupon(b,p,I(f.chainId)):await g.accept(b,I(f.chainId));return c==null||c(),(await s.wait()).transactionHash}async function Xe(t){const{mints:e,chainId:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=A(M.CollectionStore,a),x=A(M.MANAToken,a),w=e.map(s=>s.item);if(await S({auth:{kind:P.Allowance,contractAddress:x.address,spenderAddress:f.address,chainId:a},signer:u,requiredWei:m}),j.enabled)try{const s=be(w,o,f.abi),y=R(),h=K(u.provider,y),d=await Y(h,y,s,f,{serverURL:j.relayerUrl});return c==null||c(),await X(d,"the MANA purchase"),d}catch(s){if(s instanceof B&&s.code===F.USER_DENIED||s instanceof U)throw s;E(s,{flow:"buy_mint_mana",step:"gasless_fallback"})}await J(u.provider,a);const p=await new Z(f.address,f.abi,u).buy(we(w,o),I(a));return c==null||c(),(await p.wait()).transactionHash}async function Mt(t){const{trade:e,coupon:a,...o}=t;return ee({target:{kind:"trade",trade:e,coupon:a},...o})}async function Tt(t){const{mint:e,...a}=t;return ee({target:{kind:"store",mint:e},...a})}async function ee(t){const{target:e,buyer:a,signer:o,credits:u,manaGapWei:c,providerType:m,onBroadcast:f,onReverted:x,onUnobservable:w}=t;if(u.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=te(e),p=A(M.MANAToken,b),g=A(M.CreditsManager,b);await S({auth:{kind:P.Allowance,contractAddress:p.address,spenderAddress:g.address,chainId:b},signer:o,requiredWei:c});const y=(u.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+c).toString(),h=Ue(e,u,y);if(j.enabled){let d;try{return d=await ve({purchase:h,buyer:a,signer:o}),f==null||f({txHash:d}),await ye(d),d}catch(v){if(v instanceof B&&v.code===F.USER_DENIED||v instanceof ke)throw v;if(!(v instanceof Ce))throw d&&(x==null||x({txHash:d})),v;if(v.reason==="relayer-unreachable")throw w==null||w(),v;if(!de(m))throw v;E(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return ue({purchase:h,buyer:a,signer:o,onBroadcast:f,onReverted:x})}function te(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ue(t,e,a){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:a}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:a}}function jt(t,e){const a=te(e);return t==="combined"?{spender:A(M.CreditsManager,a).address,chainId:a}:{spender:e.kind==="trade"?A(G(e.trade.contract),a).address:A(M.CollectionStore,a).address,chainId:a}}function zt(t){return r.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:r.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Wt(t){return r.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:r.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:V,radius:ae,z:Qe}=l,Et=n.div`
|
|
187
|
+
`;function mt({auth:t,signer:e,step:a,title:o,reason:u,name:c,image:m,icon:f,onAuthorized:x,onCancel:w,onClose:b}){const[p,g]=C.useState(!1),[s,y]=C.useState(null);async function h(){g(!0),y(null);try{await ne({auth:t,signer:e,active:!0}),x()}catch(d){ie(d)?y(k("authorizeStep.errorRejected")):(E(d,{flow:"authorize_step",kind:t.kind}),y(k("authorizeStep.errorGeneric"))),g(!1)}}return r.jsx(Te,{onClick:p?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:r.jsxs(je,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[r.jsxs(ze,{children:[r.jsx(We,{children:o}),a&&a.total>1?r.jsx(Ie,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:a.index,total:a.total})}):null,r.jsx(Ee,{onClick:b,disabled:p,"aria-label":k("authorizeStep.close"),children:r.jsx(Q,{name:"close",className:"ico"})})]}),r.jsxs($e,{"data-testid":"authorize-step-row",children:[r.jsx(Se,{children:m?r.jsx("img",{src:m,alt:""}):f}),r.jsxs(Pe,{children:[r.jsx(Ne,{title:c,children:c}),r.jsx(Be,{children:u})]})]}),r.jsx(Fe,{children:k("authorizeStep.note")}),r.jsx(pe,{message:s}),r.jsxs(Ve,{children:[r.jsx(De,{type:"button",onClick:w,disabled:p,children:k("authorizeStep.cancel")}),r.jsx(qe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void h(),disabled:p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(Oe,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const bt="data:image/webp;base64,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",wt="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/buy-error-22UunaPC.png";function He(t,e){return(t+e-1n)/e}function Le(t,e,a){return t<=0||e<=0?0n:t>=e?a:He(a*BigInt(t),BigInt(e))}function vt(t){var b,p,g;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,a=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,u=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];a>=e&&c.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const m=O(a)*se;if(o>0n&&m>0&&m<e){const s=e-m,y=Le(s,e,o);u>=y&&c.push({method:"combined",creditsCents:m,credits:O(m),manaWei:y})}o>0n&&u>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const f=((b=c.find(s=>s.method==="credits"))==null?void 0:b.method)??((p=c.find(s=>s.method==="combined"))==null?void 0:p.method)??((g=c.find(s=>s.method==="mana"))==null?void 0:g.method)??null,w=!c.some(s=>s.method==="mana"||s.method==="combined")&&o>0n&&u>0n?{manaWei:u,manaCents:Re(u,e,o),priceCents:e}:null;return{options:c,preferred:f,manaShortfall:w}}function Re(t,e,a){return Number(t*BigInt(e)/a)}function yt(t,e){let a=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const u=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(u,a);return a-=c,c})}function kt(t,e){return t.options.find(a=>a.method===e)??null}async function Ct(t){const[e]=await _({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function At(t){const[e]=await _({...t,trades:[],mints:[t.mint]});return e}async function _(t){const{trades:e,coupons:a,mints:o=[],buyer:u,signer:c,onSigned:m,manaWei:f}=t;if(e.length===0&&o.length===0)throw new Error("No items to buy");const x=new Map;for(const p of e){const g=`${p.chainId}:${p.contract.toLowerCase()}:${a!=null&&a[p.id]?"coupon":"plain"}`,s=x.get(g);s?s.push(p):x.set(g,[p])}const w=new Map;for(const p of o){const g=w.get(p.chainId);g?g.push(p):w.set(p.chainId,[p])}const b=[];for(const p of x.values()){const g=a?p.map(s=>a[s.id]).filter(s=>s!=null):[];b.push(await Ke({trades:p,coupons:g.length?g:void 0,buyer:u,signer:c,onSigned:m,requiredManaWei:f}))}for(const[p,g]of w){const s=f??g.reduce((y,h)=>y+BigInt(h.item.priceWei),0n);b.push(await Xe({mints:g,chainId:p,buyer:u,signer:c,onSigned:m,requiredManaWei:s}))}return b}async function Ke(t){const{trades:e,coupons:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=e[0],x=A(G(f.contract),f.chainId),w=A(M.MANAToken,f.chainId);await S({auth:{kind:P.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:f.chainId},signer:u,requiredWei:m});const b=e.map(h=>ge(h,o));if(a!=null&&a.length&&a.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${a.length} for ${e.length} trades`);const p=a!=null&&a.length?a.map((h,d)=>fe(h,e[d].sent.length)):void 0;if(j.enabled)try{const{selector:h,data:d}=p?xe(e,a??[],o,x.abi):me(e,o,x.abi),v=h+d.slice(2),T=R(),z=K(u.provider,T),q=await Y(z,T,v,x,{serverURL:j.relayerUrl});return c==null||c(),await X(q,"the MANA purchase"),q}catch(h){if(h instanceof B&&h.code===F.USER_DENIED||h instanceof U)throw h;E(h,{flow:"buy_mana",step:"gasless_fallback"})}await J(u.provider,f.chainId);const g=new Z(x.address,x.abi,u),s=p?await g.acceptWithCoupon(b,p,I(f.chainId)):await g.accept(b,I(f.chainId));return c==null||c(),(await s.wait()).transactionHash}async function Xe(t){const{mints:e,chainId:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=A(M.CollectionStore,a),x=A(M.MANAToken,a),w=e.map(s=>s.item);if(await S({auth:{kind:P.Allowance,contractAddress:x.address,spenderAddress:f.address,chainId:a},signer:u,requiredWei:m}),j.enabled)try{const s=be(w,o,f.abi),y=R(),h=K(u.provider,y),d=await Y(h,y,s,f,{serverURL:j.relayerUrl});return c==null||c(),await X(d,"the MANA purchase"),d}catch(s){if(s instanceof B&&s.code===F.USER_DENIED||s instanceof U)throw s;E(s,{flow:"buy_mint_mana",step:"gasless_fallback"})}await J(u.provider,a);const p=await new Z(f.address,f.abi,u).buy(we(w,o),I(a));return c==null||c(),(await p.wait()).transactionHash}async function Mt(t){const{trade:e,coupon:a,...o}=t;return ee({target:{kind:"trade",trade:e,coupon:a},...o})}async function Tt(t){const{mint:e,...a}=t;return ee({target:{kind:"store",mint:e},...a})}async function ee(t){const{target:e,buyer:a,signer:o,credits:u,manaGapWei:c,providerType:m,onBroadcast:f,onReverted:x,onUnobservable:w}=t;if(u.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=te(e),p=A(M.MANAToken,b),g=A(M.CreditsManager,b);await S({auth:{kind:P.Allowance,contractAddress:p.address,spenderAddress:g.address,chainId:b},signer:o,requiredWei:c});const y=(u.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+c).toString(),h=Ue(e,u,y);if(j.enabled){let d;try{return d=await ve({purchase:h,buyer:a,signer:o}),f==null||f({txHash:d}),await ye(d),d}catch(v){if(v instanceof B&&v.code===F.USER_DENIED||v instanceof ke)throw v;if(!(v instanceof Ce))throw d&&(x==null||x({txHash:d})),v;if(v.reason==="relayer-unreachable")throw w==null||w(),v;if(!de(m))throw v;E(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return ue({purchase:h,buyer:a,signer:o,onBroadcast:f,onReverted:x})}function te(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ue(t,e,a){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:a}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:a}}function jt(t,e){const a=te(e);return t==="combined"?{spender:A(M.CreditsManager,a).address,chainId:a}:{spender:e.kind==="trade"?A(G(e.trade.contract),a).address:A(M.CollectionStore,a).address,chainId:a}}function zt(t){return r.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:r.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Wt(t){return r.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:r.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:V,radius:ae,z:Qe}=l,Et=n.div`
|
|
188
188
|
position: fixed;
|
|
189
189
|
inset: 0;
|
|
190
190
|
z-index: ${Qe.overlay};
|
|
@@ -848,4 +848,4 @@ import{r as C,j as r}from"./react-DaBuTM6Q.js";import{s as ne,h as S,A as P,b as
|
|
|
848
848
|
transform: scale(1.1);
|
|
849
849
|
}
|
|
850
850
|
`;function ba({title:t,items:e,onViewAll:a}){const o=C.useRef(null),[u,c]=C.useState(1),[m,f]=C.useState(0),[x,w]=C.useState(!0),[b,p]=C.useState(!1),g=C.useCallback(()=>{const h=o.current;if(!h)return;const{scrollLeft:d,scrollWidth:v,clientWidth:T}=h,z=Math.max(1,Math.ceil(v/T));c(z),f(Math.min(z-1,Math.round(d/T))),w(d<=1),p(d+T>=v-1)},[]);if(C.useEffect(()=>{g();const h=o.current;if(h)return h.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),()=>{h.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[g,e.length]),e.length===0)return null;function s(h){const d=o.current;d&&d.scrollBy({left:h*d.clientWidth,behavior:"smooth"})}function y(h){const d=o.current;d&&d.scrollTo({left:h*d.clientWidth,behavior:"smooth"})}return r.jsxs(Je,{"data-testid":"carousel",children:[r.jsxs(Ye,{children:[r.jsx(Ze,{children:t}),a?r.jsxs(_e,{onClick:a,children:[k("collectionCarousel.viewAll"),r.jsx(et,{name:"chevron-down",size:16})]}):null]}),r.jsxs(tt,{children:[r.jsx(L,{"data-side":"left",onClick:()=>s(-1),"aria-label":k("collectionCarousel.scrollLeft"),disabled:x,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})}),r.jsx(at,{ref:o,children:e.map(h=>r.jsx(he,{item:h},h.id))}),r.jsx(L,{"data-side":"right",onClick:()=>s(1),"aria-label":k("collectionCarousel.scrollRight"),disabled:b,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})})]}),u>1?r.jsx(nt,{"aria-label":k("collectionCarousel.pages"),children:Array.from({length:u}).map((h,d)=>r.jsx(it,{"data-active":d===m||void 0,"aria-label":k("collectionCarousel.goToPage",{page:d+1}),"aria-current":d===m?"true":void 0,onClick:()=>y(d)},d))}):null]})}export{Le as $,Ht as A,Ft as B,$t as C,bt as D,ta as E,aa as F,na as G,St as H,ia as I,oa as J,ra as K,ca as L,Et as M,vt as N,ft as O,ua as P,ba as Q,mt as R,It as S,Nt as T,gt as U,xt as V,Gt as W,Bt as X,jt as Y,_ as Z,yt as _,Pt as a,Ue as a0,te as a1,xa as a2,ma as a3,da as a4,kt as a5,Ct as a6,At as a7,Mt as a8,Tt as a9,zt as b,Vt as c,Dt as d,qt as e,Ot as f,la as g,ha as h,wt as i,pa as j,sa as k,Ge as l,ga as m,fa as n,Wt as o,Jt as p,Yt as q,Lt as r,Rt as s,Kt as t,Xt as u,Ut as v,Qt as w,Zt as x,_t as y,ea as z};
|
|
851
|
-
//# sourceMappingURL=CollectionCarousel-
|
|
851
|
+
//# sourceMappingURL=CollectionCarousel-DM2JN-Og.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-
|
|
2
|
-
import{s as o,_ as s}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-RB1w60M4.js","_assets/react-VV7ruaEe.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as o,_ as s}from"./index-DBONtw7H.js";import{r as n,j as i}from"./react-VV7ruaEe.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6c99567c-3c38-42bf-9c7f-6e73b80eeae8",e._sentryDebugIdIdentifier="sentry-dbid-6c99567c-3c38-42bf-9c7f-6e73b80eeae8")}catch{}})();const a=o.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|
|
@@ -14,5 +14,5 @@ import{s as o,_ as s}from"./index-DzQkIbqv.js";import{r as n,j as i}from"./react
|
|
|
14
14
|
*/
|
|
15
15
|
z-index: -1;
|
|
16
16
|
pointer-events: none;
|
|
17
|
-
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-
|
|
18
|
-
//# sourceMappingURL=Confetti-
|
|
17
|
+
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-RB1w60M4.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?i.jsx(a,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
|
|
18
|
+
//# sourceMappingURL=Confetti-BLxVbH5o.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./sentry-
|
|
2
|
-
//# sourceMappingURL=ConstantsUtil-
|
|
1
|
+
import{p as o}from"./sentry-o0F_Elyr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
|
|
2
|
+
//# sourceMappingURL=ConstantsUtil-CzAq2JlG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as z}from"./react-DaBuTM6Q.js";import{r as W}from"./index-DEL0w41-.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="ff71893d-ab65-4572-9315-e8a4195440a4",s._sentryDebugIdIdentifier="sentry-dbid-ff71893d-ab65-4572-9315-e8a4195440a4")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
|
|
2
|
-
//# sourceMappingURL=ContentClient-
|
|
1
|
+
import{g as z}from"./react-VV7ruaEe.js";import{r as W}from"./index-BBshwWxl.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="ff71893d-ab65-4572-9315-e8a4195440a4",s._sentryDebugIdIdentifier="sentry-dbid-ff71893d-ab65-4572-9315-e8a4195440a4")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
|
|
2
|
+
//# sourceMappingURL=ContentClient-CwohpHEJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as ce,j as e,L as Ie,d as Le,a as Me,r as L}from"./react-
|
|
1
|
+
import{u as ce,j as e,L as Ie,d as Le,a as Me,r as L}from"./react-VV7ruaEe.js";import{u as _e,s as ze}from"./search-empty-Xv_q1rjS.js";import{u as Re,S as Z,R as Ae,a as Te,b as Be,c as De,D as We,d as Oe,C as Ge,e as Ke,F as Ue,f as He,g as Qe,M as Ve,h as qe}from"./browseLayout.styles-BKjgHcP6.js";import{d as de,bJ as Ye,ac as J,ab as X,s as i,bK as Ze,Q as Je,bL as Xe,c as o,bM as et,bN as ee,G as tt,x as he,a6 as ue,E as ot,M as me,bO as rt,bP as st,I as te,e as it,H as at,D as nt,az as lt,X as ct,Y as dt,a0 as M,Z as R,a1 as oe,bQ as re,bR as ht}from"./index-DBONtw7H.js";import{T as pe}from"./skeleton.styles-V94rqky6.js";import{d as ut,P as mt,C as pt,a as xt,b as gt,c as ft,e as bt}from"./collectionPage.styles-CGv38BAV.js";import{u as wt,L as yt}from"./useStore-BxEjYiKk.js";import{L as se}from"./LoadMore-DE7YSrmA.js";import{u as ie}from"./useInfiniteGrid-CqEvXCvo.js";import{S as vt}from"./categories-CBw6i6jK.js";import{E as A}from"./ErrorNotice-BjKorbeP.js";import{c as jt,i as Ct}from"./items-empty-DLLWCTVk.js";import{G as ae}from"./grid.styles-DLJDk6Da.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-B_xC21o-.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="6b02b3ae-962c-41ef-af0c-adeb0680750e",r._sentryDebugIdIdentifier="sentry-dbid-6b02b3ae-962c-41ef-af0c-adeb0680750e")}catch{}})();function kt(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:$,media:$t}=de,St=i.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
/* No fill of its own (Figma 922:183803): the mosaic covers the top and the footer paints its own
|
|
4
4
|
translucent black, so the page field is what shows through the corners. */
|
|
@@ -309,4 +309,4 @@ import{u as ce,j as e,L as Ie,d as Le,a as Me,r as L}from"./react-DaBuTM6Q.js";i
|
|
|
309
309
|
background: ${y.blackBtn};
|
|
310
310
|
}
|
|
311
311
|
`,Jt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var m,C;const{data:s}=ue(r),{data:a}=wt(r),l=ot(p=>{var S;return(S=p.session)==null?void 0:S.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(s==null?void 0:s.name)||me(r),b=(C=(m=s==null?void 0:s.avatar)==null?void 0:m.snapshots)==null?void 0:C.face256,j=(a==null?void 0:a.cover)||ut,n=a==null?void 0:a.description,g=`${it.profileUrl}/${r}`,f=yt.filter(p=>a==null?void 0:a.links[p]),h=rt(st({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Dt,{"aria-label":`${d} storefront`,children:[e.jsxs(Wt,{children:[e.jsx(Ot,{src:j,alt:"",loading:"eager"}),e.jsx(Gt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Kt,{children:[f.map(p=>e.jsx(Ut,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(te,{name:Jt[p]})},p)),c&&e.jsx(Ht,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(te,{name:"pen"})})]}),e.jsxs(Qt,{children:[b?e.jsx(ne,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(ne,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(Vt,{children:d}),n?e.jsx(qt,{children:n}):null]}),e.jsxs(Yt,{children:[e.jsx(Zt,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Bt,{address:r,className:"creator-hero__follow"})]})]})]})}const eo=["all","on_sale","not_for_sale"],le=48;function yo(){var q,Y;const{address:r}=Le(),s=ce(),[a]=Me(),l=a.has("collections"),{data:c}=ue(r),d=(c==null?void 0:c.name)||(r?me(r):o("creator.fallbackName"));at({title:d,description:o("seo.creator.description",{name:d}),image:(Y=(q=c==null?void 0:c.avatar)==null?void 0:q.snapshots)==null?void 0:Y.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[j,n]=_e(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:C,smart:p,sort:S}=j,N=eo.includes(j.status)?j.status:"all",T=t=>n({status:t});Re(`${l}:${g}:${f??""}`);const[P,E]=L.useState(!1);L.useEffect(()=>{if(!P)return;const t=Fe=>{Fe.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[P]);const B=m&&!Number.isNaN(Number(m))?Number(m):void 0,D=C&&!Number.isNaN(Number(C))?Number(C):void 0,be=f?vt[f]:void 0,we=(Z.find(t=>t.key===S)??Z[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:be,minPriceCredits:B,maxPriceCredits:D,isWearableSmart:p||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:we},{items:_,total:ye,isLoading:ve,isPlaceholderData:je,error:O,hasNextPage:Ce,isFetchingNextPage:G,isFetchNextPageError:ke,fetchNextPage:$e}=ie(["creator-items",W],t=>re({...W,first:le,skip:t}),{enabled:!!r&&!l}),F=nt({queryKey:["creator-item-count",r],queryFn:()=>re({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=ie(["creator-collections",r],t=>ht(r,{first:le,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function K(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Se(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}`:""},{replace:!0})}function Ne(){if(l){Se();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function U(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function H(){n(b)}const k=[];(g==="wearable"||g==="emote")&&k.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>K("all")}),(B!=null||D!=null)&&k.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of Ae)h.includes(t)&&k.push({key:`rarity-${t}`,label:lt(t),onRemove:()=>U(t)});p&&k.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),N!=="all"&&k.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>T("all")});const I=kt({gridLoading:ve||je,gridError:!!O,gridCount:_.length,baselinePending:F.isPending,baselineError:F.isError,baselineCount:F.data}),Q=I==="skeletons",{data:V}=ct(),Ee=L.useMemo(()=>_.map(t=>({...t,priceCredits:dt(t,V)})),[_,V]),Pe=t=>t.priceCredits>0||!!t.manaWei,z=I==="items"||I==="skeletons"?null:I;return e.jsxs(mt,{children:[e.jsxs(pt,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(xt,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(gt,{children:d})]}),r?e.jsx(Xt,{address:r}):null,e.jsxs(Te,{children:[P?e.jsx(Be,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(De,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(We,{children:[e.jsx(Oe,{children:o("assets.filters")}),e.jsx(Ge,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(Ke,{children:e.jsx(Ue,{category:g,subCategory:f,onCategory:K,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:C,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:U,status:N,onStatus:T,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Ne})}),e.jsx(He,{children:e.jsx(Qe,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(Ve,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(ft,{children:e.jsx(bt,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(pe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(A,{message:o("creator.error")}):null,e.jsx(ae,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Tt,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx(R,{testId:"creator-collections-empty",icon:jt,title:o("creator.collectionsEmptyTitle"),body:o("creator.collectionsEmpty"),cta:{label:o("assets.empty.cta"),to:"/items"}}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(qe,{sort:S,onSort:t=>n({sort:t}),total:ye,loading:Q,onOpenFilters:()=>E(!0),chips:k,onClearChips:H}),O?e.jsx(A,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ae,{"data-testid":"creator-grid",children:Q?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[Ee.map(t=>Pe(t)?e.jsx(oe,{item:t},t.id):e.jsx(oe,{item:t,mode:"view"},t.id)),G?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:Ce,isFetching:G,isError:ke,onLoadMore:()=>void $e()}),z==="error"?e.jsx(A,{message:o("creator.error"),testId:"creator-empty-error"}):z==="no-creations"?e.jsx(R,{testId:"creator-empty-none",icon:Ct,title:o("creator.emptyNoCreationsTitle"),body:o("creator.emptyNoCreations"),cta:{label:o("assets.empty.cta"),to:"/items"}}):z==="filters"?e.jsx(R,{testId:"creator-empty-filters",icon:ze,title:o("creator.emptyFilters.title"),body:o("creator.emptyFilters.body",{count:F.data??0}),cta:{label:o("filterBar.clearAll"),onClick:H}}):null]})})]})]})}export{yo as Creator,yo as default};
|
|
312
|
-
//# sourceMappingURL=Creator-
|
|
312
|
+
//# sourceMappingURL=Creator-CXCzrdUF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as I}from"./react-
|
|
1
|
+
import{g as I}from"./react-VV7ruaEe.js";import{r as H}from"./index-BBshwWxl.js";import{r as M}from"./dcl-schemas-DwpPH57a.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new o.Error().stack;u&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[u]="6c915ad6-d707-40b3-92b8-e83fbdccd12e",o._sentryDebugIdIdentifier="sentry-dbid-6c915ad6-d707-40b3-92b8-e83fbdccd12e")}catch{}})();function O(o,u){for(var w=0;w<u.length;w++){const h=u[w];if(typeof h!="string"&&!Array.isArray(h)){for(const b in h)if(b!=="default"&&!(b in o)){const g=Object.getOwnPropertyDescriptor(h,b);g&&Object.defineProperty(o,b,g.get?g:{enumerable:!0,get:()=>h[b]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var y={},F;function C(){if(F)return y;F=1,Object.defineProperty(y,"__esModule",{value:!0}),y.getHashesByKey=y.buildEntityWithoutNewFiles=y.buildEntity=y.buildEntityAndFile=void 0;const o=H(),u=M();async function w({type:n,pointers:t,timestamp:e,content:a,metadata:r}){var i;if(t.length===0)throw new Error("All entities must have at least one pointer.");const d={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const p of a){const E=p.file.toLowerCase();if(s.has(E))throw new Error(`Error creating the deployable entity: Decentraland's file system is case insensitive, the file ${JSON.stringify(p.file)} is repeated`);s.add(E)}}const c=new TextEncoder().encode(JSON.stringify(d)),l={id:await(0,o.hashV1)(c),...d};if(!u.Entity.validate(l))throw new Error(`Generated entity is not valid:
|
|
2
2
|
`+((i=u.Entity.validate.errors)===null||i===void 0?void 0:i.map(s=>s.message).join(`
|
|
3
3
|
`)));return{entity:l,entityFile:c}}y.buildEntityAndFile=w;async function h({type:n,pointers:t,files:e,metadata:a,timestamp:r}){const i=Array.from(e||[]).map(([l,s])=>({key:l,content:s})),d=await Promise.all(i.map(async({key:l,content:s})=>({key:l,content:s,hash:await(0,o.hashV1)(s)}))),c=new Map(d.map(({hash:l,key:s})=>[s,l])),f=new Map(d.map(({hash:l,content:s})=>[l,s]));return g(n,t,{hashesByKey:c,filesByHash:f,metadata:a,timestamp:r})}y.buildEntity=h;async function b(n,{contentUrl:t,type:e,pointers:a,hashesByKey:r,metadata:i,timestamp:d}){const c=r??i?m(i):void 0;if(c&&D(e,c)){const f=await _(n,t,c),l=await A(f,i);return h({type:e,pointers:a,files:f,metadata:l,timestamp:d})}return g(e,a,{hashesByKey:r,metadata:i,timestamp:d})}y.buildEntityWithoutNewFiles=b;async function g(n,t,e){if(t.length===0)throw new Error("All entities must have at least one pointer.");const a=e!=null&&e.hashesByKey?e==null?void 0:e.hashesByKey:new Map,r=Array.from(a.entries()).map(([l,s])=>({file:l,hash:s})),i=e!=null&&e.timestamp?e==null?void 0:e.timestamp:Date.now(),{entity:d,entityFile:c}=await w({type:n,pointers:t,timestamp:i,content:r,metadata:e==null?void 0:e.metadata}),f=e!=null&&e.filesByHash?e.filesByHash:new Map;return f.set(d.id,c),{files:f,entityId:d.id}}function D(n,t){return n===u.EntityType.PROFILE&&Array.from(t).some(([,e])=>e.toLowerCase().startsWith("qm"))}async function v(n,t){const a=await(await n.fetch(t)).arrayBuffer();return new Uint8Array(a)}async function _(n,t,e){const a=e.get("body.png"),r=e.get("face256.png"),i=new URL(`${t}/contents/${a}`).toString(),d=new URL(`${t}/contents/${r}`).toString(),[c,f]=await Promise.all([v(n,i),v(n,d)]);return new Map([["body.png",c],["face256.png",f]])}async function A(n,t){return t&&(t.avatars=await Promise.all(t.avatars.map(async e=>{const a={face256:"",body:""},r=n.get("face256.png");r&&(a.face256=await(0,o.hashV1)(r));const i=n.get("body.png");return i&&(a.body=await(0,o.hashV1)(i)),e.avatar.snapshots=a,e})),t)}function m(n){const t=n.avatars[0];if(t.avatar.snapshots)return new Map([["body.png",t.avatar.snapshots.body],["face256.png",t.avatar.snapshots.face256]])}return y.getHashesByKey=m,y}var B=C();const P=I(B),j=O({__proto__:null,default:P},[B]);export{j as D};
|
|
4
|
-
//# sourceMappingURL=DeploymentBuilder-
|
|
4
|
+
//# sourceMappingURL=DeploymentBuilder-CXqgptK8.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{j as r,r as d}from"./react-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DIYaVDaM.js","_assets/react-VV7ruaEe.js","_assets/dcl-schemas-DwpPH57a.js","_assets/index-DBONtw7H.js","_assets/sentry-o0F_Elyr.js","_assets/ethers-1M1CfdDX.js","_assets/intl-AKLEHPeO.js","_assets/index-Drj3_D29.css","_assets/createSvgIcon-D90PXHtL.js","_assets/emotion-styled.browser.esm-DA7w4htd.js","_assets/styled-DyNfGwco.js","_assets/index-Dx5GsTV9.js","_assets/useTheme-BSSQBx8D.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as r,r as d}from"./react-VV7ruaEe.js";import{_ as n,d as s,s as p}from"./index-DBONtw7H.js";import{E as u}from"./sentry-o0F_Elyr.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="291da7d9-b29d-493c-a582-edd8fcc50d72",t._sentryDebugIdIdentifier="sentry-dbid-291da7d9-b29d-493c-a582-edd8fcc50d72")}catch{}})();const l=d.lazy(async()=>{const[{EmoteControls:t},{Experimental_CssVarsProvider:o},{light:a}]=await Promise.all([n(()=>import("./index-DIYaVDaM.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),n(()=>import("./index-Dx5GsTV9.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,10])),n(()=>import("./index-DBONtw7H.js").then(i=>i.dS),__vite__mapDeps([3,1,2,4,5,6,7]))]);return{default:i=>r.jsx(o,{theme:a,children:r.jsx(t,{...i})})}});function c(t){return r.jsx(u,{fallback:r.jsx(r.Fragment,{}),children:r.jsx(d.Suspense,{fallback:null,children:r.jsx(l,{...t})})})}const{colors:e,radius:x}=s,g=p.div`
|
|
3
3
|
/* Doubled class: a preview panel may size its children greedily (ItemDetail's stretches every child to
|
|
4
4
|
fill the stage), and the bar's own geometry has to win that whichever order the styles land in. */
|
|
5
5
|
&& {
|
|
@@ -118,4 +118,4 @@ import{j as r,r as d}from"./react-DaBuTM6Q.js";import{_ as n,d as s,s as p}from"
|
|
|
118
118
|
outline-offset: 2px;
|
|
119
119
|
}
|
|
120
120
|
`;function f({previewId:t,testId:o="emote-controls"}){return r.jsx(g,{"data-preview-controls":!0,"data-testid":o,children:r.jsx(c,{wearablePreviewId:t,hideFrameInput:!0})})}export{f as E};
|
|
121
|
-
//# sourceMappingURL=EmotePlaybackBar-
|
|
121
|
+
//# sourceMappingURL=EmotePlaybackBar-B-oE6PfU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as n}from"./react-
|
|
2
|
-
//# sourceMappingURL=ErrorNotice-
|
|
1
|
+
import{j as n}from"./react-VV7ruaEe.js";import{I as o}from"./index-DBONtw7H.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c67eed24-9c07-42e3-aafe-ecbed75d6f90",e._sentryDebugIdIdentifier="sentry-dbid-c67eed24-9c07-42e3-aafe-ecbed75d6f90")}catch{}})();function i({message:e,className:r,testId:t}){return e?n.jsxs("p",{className:r?`error-notice ${r}`:"error-notice","data-testid":t,role:"alert",children:[n.jsx(o,{name:"alert",className:"error-notice__ico",size:18}),n.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{i as E};
|
|
2
|
+
//# sourceMappingURL=ErrorNotice-BjKorbeP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as m,r as p,j as r}from"./react-
|
|
2
|
-
//# sourceMappingURL=Event-
|
|
1
|
+
import{u as m,r as p,j as r}from"./react-VV7ruaEe.js";import{u,a as f,b,l as g,t as y,c as n}from"./index-DBONtw7H.js";import{Assets as x}from"./Assets-SQGh-_eg.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./search-empty-Xv_q1rjS.js";import"./browseLayout.styles-BKjgHcP6.js";import"./categories-CBw6i6jK.js";import"./skeleton.styles-V94rqky6.js";import"./LoadMore-DE7YSrmA.js";import"./useInfiniteGrid-CqEvXCvo.js";import"./ErrorNotice-BjKorbeP.js";import"./buy-gasless-DNEVxdLb.js";import"./authorizations-B83pvCo5.js";import"./sendMetaTransaction-ZH8zQFka.js";import"./buy-D7nFmJT8.js";import"./errors-CNu2839_.js";import"./name-glyph-aUugT8vq.js";import"./crumbs.styles-B_xC21o-.js";import"./grid.styles-DLJDk6Da.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="f88dc570-e06b-4407-9b6e-92a650b9910c",e._sentryDebugIdIdentifier="sentry-dbid-f88dc570-e06b-4407-9b6e-92a650b9910c")}catch{}})();function H(){const e=m(),o=u(l=>l.locale),{campaign:t,isPending:i}=f(),{contracts:a,isPending:c}=b((t==null?void 0:t.tags)??[]),s=!i&&!(t!=null&&t.mainTag);if(p.useEffect(()=>{s&&e("/items",{replace:!0})},[s,e]),i||c||s)return r.jsx("div",{className:"page-loading","aria-busy":"true",children:r.jsx("span",{className:"spinner","aria-hidden":!0})});const d=g(t==null?void 0:t.tabName,y(o))??(t==null?void 0:t.name)??"";return r.jsx(x,{contracts:a,hideNames:!0,lockStatus:"on_sale",seo:{title:d||n("seo.collectibles.title"),description:n("seo.collectibles.description"),noindex:!0}})}export{H as Event};
|
|
2
|
+
//# sourceMappingURL=Event-_99dGtyj.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as p,E as h,b as f,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-
|
|
2
|
-
//# sourceMappingURL=ExchangeController-
|
|
1
|
+
import{C as p,E as h,b as f,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-B6rhAVVy.js";import{g as L,a as D,f as b,b as v,c as T}from"./index-AKVaFU6R.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="d1b56025-afa3-47b6-99cc-51c20361e54e",t._sentryDebugIdIdentifier="sentry-dbid-d1b56025-afa3-47b6-99cc-51c20361e54e")}catch{}})();const W=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=_(C),d={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=T(t),s=await d.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,m,l;const u=a.asset==="native"?P():`${a.network}:${a.asset}`,i=s.find(S=>{var y,g,w;return((w=(g=(y=S.fungibles)==null?void 0:y[0])==null?void 0:g.address)==null?void 0:w.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(l=(m=i==null?void 0:i.fungibles)==null?void 0:m[0])==null?void 0:l.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?P():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=A.bigNumber(e.amount??0).round(8),n=A.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=d.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return d.isPayWithExchangeEnabled()&&p.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(p.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=d.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await v({page:W,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw E.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await D({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return h.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=p.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=f.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await d.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",E.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await d.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),d.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await L({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const m=(r=p.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,h.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?f.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:m||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{d as E};
|
|
2
|
+
//# sourceMappingURL=ExchangeController-Ca1vSNQH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as x,j as o}from"./react-
|
|
1
|
+
import{r as x,j as o}from"./react-VV7ruaEe.js";import{d as e,s as a,c as h,I as w}from"./index-DBONtw7H.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="705ef11d-fc6e-40b8-ac09-a201c0752140",i._sentryDebugIdIdentifier="sentry-dbid-705ef11d-fc6e-40b8-ac09-a201c0752140")}catch{}})();const m=a.section`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 36px;
|
|
@@ -172,4 +172,4 @@ import{r as x,j as o}from"./react-DaBuTM6Q.js";import{d as e,s as a,c as h,I as
|
|
|
172
172
|
}
|
|
173
173
|
`;function S({title:i,entries:s,tone:l="light",className:u}){const[f,g]=x.useState(()=>new Set),p=x.useId();function b(t){g(n=>{const r=new Set(n);return r.delete(t)||r.add(t),r})}return o.jsxs(m,{className:u,"data-tone":l,"data-testid":"faq",children:[o.jsx(k,{"data-testid":"faq-title",children:h(i)}),o.jsx(v,{children:s.map(t=>{const n=f.has(t.question),r=`${p}-panel-${t.question}`,c=`${p}-header-${t.question}`;return o.jsxs($,{"data-open":n,"data-testid":"faq-item",children:[o.jsxs(y,{type:"button",onClick:()=>b(t.question),id:c,"aria-expanded":n,"aria-controls":n?r:void 0,"data-open":n,"data-testid":"faq-question",children:[o.jsx(q,{children:h(t.question)}),o.jsx(I,{"data-open":n,"aria-hidden":!0,children:o.jsx(w,{name:"chevron-up-line",size:36})})]}),n&&o.jsx(j,{id:r,role:"region","aria-labelledby":c,"data-testid":"faq-answer",children:h(t.answer).split(`
|
|
174
174
|
`).map(d=>d.trim()).filter(Boolean).map(d=>o.jsx("p",{children:d},d))})]},t.question)})})]})}export{S as F};
|
|
175
|
-
//# sourceMappingURL=Faq-
|
|
175
|
+
//# sourceMappingURL=Faq-BVnO4obf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as ue,a as ge,r as l,j as t}from"./react-
|
|
1
|
+
import{u as ue,a as ge,r as l,j as t}from"./react-VV7ruaEe.js";import{s as i,d as e,k as B,H as xe,c as o,C as h,E as fe,L as me,al as g,bv as be,i as D,bG as H,b$ as we,bl as M,K as ie,I as ye,aw as ke,c0 as N}from"./index-DBONtw7H.js";import{C as ve}from"./Confetti-BLxVbH5o.js";import{F as Ce}from"./Faq-BVnO4obf.js";import{R as Q}from"./resume-buy-lwwrCAQL.js";import{u as $e,d as je,R as Se,c as Pe,i as Ae,e as _e}from"./useCreditPacks-DgnQhl__.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="ca3d22a3-5737-40d0-80fc-0ca3603b4208",s._sentryDebugIdIdentifier="sentry-dbid-ca3d22a3-5737-40d0-80fc-0ca3603b4208")}catch{}})();const A="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/pack-coins-BDh1ZDbh.webp",re="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/pack-stacks-D-V2jSHW.webp",ne="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/pack-chest-BX_j84xW.webp",Te="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/credit-coin-CmcTCd5i.webp",K="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",O="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Re=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|
|
@@ -852,4 +852,4 @@ import{u as ue,a as ge,r as l,j as t}from"./react-DaBuTM6Q.js";import{s as i,d a
|
|
|
852
852
|
font-family: ${e.font.sans};
|
|
853
853
|
color: ${e.colors.err};
|
|
854
854
|
`,v=Ae()?"mock":"stripe",ee=[A,A,re,ne],Ft={pack_5:A,pack_10:A,pack_25:re,pack_50:ne};function se(s,n){return Ft[s.id]??ee[n%ee.length]}function zt(s,n){return s.artUrl??se(s,n)}const Bt=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function te(s){const n=s;if((n==null?void 0:n.name)==="AbortError")return o("getCredits.errorCanceled");const x=((n==null?void 0:n.message)??"").toLowerCase();return x.includes("sign in")?o("getCredits.errorSignIn",{currency:h.name}):x.includes("timed out")?o("getCredits.errorTimeout",{currency:h.name}):o("getCredits.errorGeneric")}function Qt(){var L;xe({title:o("nav.getCredits",{currency:h.name}),noindex:!0});const s=ue(),{session:n,signIn:x,restored:a}=fe(),m=me(),[b,$]=ge(),{packs:w,isLoading:ae}=$e(),[f,p]=l.useState("select"),[d,I]=l.useState(null),[j,E]=l.useState(null),de=(j!=null?(L=w.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Te,[ce,y]=l.useState(null),[le,S]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const q=l.useCallback(()=>{$(r=>{const c=new URLSearchParams(r);return c.delete("order"),c.delete("canceled"),c},{replace:!0})},[$]),R=l.useCallback(async r=>{p("processing");const c=new AbortController;T.current=c;try{const u=await je(r,{signal:c.signal,address:n==null?void 0:n.address,identity:n==null?void 0:n.identity});if(u.status==="credited"){const k=u.creditsGranted??(d==null?void 0:d.credits)??0;E(k>0?k:null),p("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(d==null?void 0:d.usd)??null,credits:k>0?k:null,provider:v}),m.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(Se)){const P={resumeCheckout:!0,...k>0?{creditsAdded:k}:{}};s("/cart",{state:P});return}}catch{}try{const P=sessionStorage.getItem(Q);if(P){sessionStorage.removeItem(Q);const G=JSON.parse(P),U=be(G);if(U){s(U,{state:{item:G,resumeBuy:!0}});return}}}catch{}}else u.status==="abandoned"||u.status==="initiated"?(g("Shop Buy Credits Cancelled",{order_id:r,provider:v,step:"grant"}),m.invalidateQueries({queryKey:["usd-balance"]}),S(!0),p("select")):u.status==="failed"?(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(d==null?void 0:d.usd)??null}),y(u.error??o("getCredits.errorGrant",{currency:h.name})),p("error")):(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(d==null?void 0:d.usd)??null}),m.invalidateQueries({queryKey:["usd-balance"]}),p("pending"))}catch(u){D(u,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:H(u),pack_usd:(d==null?void 0:d.usd)??null}),y(te(u)),p("error")}},[d,n,m,s]),pe=l.useCallback(async r=>{if(!n){x();return}y(null),S(!1),I(r),p(v==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:v});try{const c=await Pe(r.id,{address:n.address,identity:n.identity});if(c.mock)R(c.orderId);else if(c.url)g("Shop Redirected To Stripe",{order_id:c.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=c.url;else throw new Error("Checkout did not return a redirect url")}catch(c){D(c,{flow:"get_credits",step:"checkout",provider:v}),g("Shop Buy Credits Failed",{step:"checkout",error_code:H(c),pack_usd:r.usd}),y(te(c)),p("error")}},[n,x,R]),F=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(F.current)return;const r=b.get("order");if(b.get("canceled")!=null){if(r&&!a)return;F.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:v}),r&&n&&we(r,n.identity),q(),S(!0),p("select");return}if(r){if(p("processing"),!n){a&&(g("Shop Buy Credits Failed",{step:"grant",error_code:"no_identity",pack_usd:(d==null?void 0:d.usd)??null}),y(o("getCredits.errorSignInAfterPay",{currency:h.name})),p("error"));return}F.current=!0,q(),R(r)}},[b,n,a]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),I(null),E(null),y(null),S(!1)}function he(){const r=W.current;if(!r)return;const c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:c?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(Re,{children:[(f==="select"||f==="redirecting")&&t.jsxs(t.Fragment,{children:[t.jsx(Fe,{"data-testid":"credits-hero",children:t.jsxs(ze,{children:[t.jsxs(Ie,{$hidden:f==="redirecting",children:[t.jsxs(Ee,{children:[t.jsx(qe,{children:o("getCredits.title")}),t.jsxs(We,{children:[t.jsx(Le,{children:o("getCredits.subtitle")}),t.jsx(Ge,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:o("getCredits.learnMore")})]})]}),le&&t.jsx(Ue,{role:"status",children:o("getCredits.canceledNote")}),t.jsx(It,{packs:w,loading:ae,onSelect:r=>void pe(r)})]}),f==="redirecting"&&t.jsxs(Je,{role:"status","aria-live":"polite",children:[t.jsx(rt,{src:M,alt:"",width:72,height:72}),t.jsx(et,{children:o("getCredits.redirecting")})]})]})}),t.jsx(Be,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(Ce,{title:"faq.title",entries:Bt,tone:"on-dark"})})]}),f==="processing"&&t.jsxs(it,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:M,alt:"",width:61,height:61}),t.jsxs(nt,{children:[t.jsxs(ot,{children:[t.jsx("strong",{children:o("getCredits.processing")}),"…"]}),t.jsxs(st,{"aria-hidden":!0,children:[t.jsx(dt,{children:t.jsx(ct,{})}),t.jsx(lt,{children:"1/1"})]})]})]}),f==="success"&&t.jsx(J,{"data-outcome":"success",children:t.jsxs(pt,{role:"status","aria-live":"polite",children:[t.jsx(ve,{}),t.jsxs(ht,{children:[t.jsx(ut,{src:K,alt:"",width:60,height:60}),t.jsxs(gt,{children:[t.jsx("strong",{children:o("getCredits.successTitle")})," ",o("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(xt,{children:t.jsxs(ft,{children:[t.jsx(mt,{src:de,alt:"",width:93,height:93}),t.jsxs(bt,{children:[t.jsx(ie,{}),t.jsxs("span",{children:[t.jsx(wt,{children:o("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(yt,{children:o("getCredits.creditsAdded")})]})]})]})}),t.jsxs(kt,{children:[t.jsx(C,{"data-variant":"outline",onClick:z,children:o("getCredits.buyMore",{currency:h.name})}),t.jsx(C,{onClick:()=>s("/items"),children:o("getCredits.startShopping")})]})]})}),f==="pending"&&t.jsx(J,{children:t.jsxs(Ct,{role:"status","aria-live":"polite","data-testid":"credits-pending",children:[t.jsxs($t,{children:[t.jsx(jt,{src:K,alt:"",width:32,height:32}),t.jsx(St,{children:o("getCredits.pendingTitle",{currency:h.name})})]}),t.jsx(Pt,{children:o("getCredits.pendingBody")}),t.jsxs(At,{children:[t.jsx(C,{"data-variant":"outline",onClick:()=>s("/items"),children:o("getCredits.goShopping")}),t.jsx(C,{"data-variant":"ruby",onClick:z,children:o("getCredits.gotIt")})]})]})}),f==="error"&&t.jsxs(vt,{role:"alert",children:[t.jsx(_t,{"data-tone":"error",children:o("getCredits.errorTitle")}),t.jsx(Rt,{children:ce}),t.jsx(Tt,{children:t.jsx(C,{onClick:z,children:o("getCredits.tryAgain")})})]})]})}function It({packs:s,loading:n,onSelect:x}){return n?t.jsx(Y,{"aria-busy":"true","aria-label":o("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(a=>t.jsxs(V,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsx(Ye,{}),t.jsx(Ve,{})]}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]},a))}):t.jsx(Y,{children:s.map((a,m)=>{const b=_e(a,s);return t.jsxs(V,{type:"button","data-testid":"pack","data-best":a.bestValue?"true":void 0,onClick:()=>x(a),"aria-label":b?o("getCredits.packAriaBonus",{amount:N(a.credits),usd:a.usd,bonus:b.bonus,baseline:b.baseline}):o("getCredits.packAria",{amount:N(a.credits),usd:a.usd}),children:[a.bestValue&&t.jsxs(De,{children:[t.jsx(ye,{name:"star-rounded"}),o("getCredits.packBadge")]}),t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsxs(He,{children:[t.jsx(ie,{}),t.jsx(Me,{children:t.jsx(ke,{credits:a.credits})})]}),t.jsx(Ne,{children:o("getCredits.packUnit",{currency:h.name})})]}),t.jsx(Qe,{children:t.jsx("img",{src:zt(a,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const w=$.currentTarget;w.dataset.artFallback||(w.dataset.artFallback="done",w.src=se(a,m))}})})]}),t.jsxs(Ke,{children:["$",a.usd.toFixed(2)]})]},a.id)})})}export{Qt as GetCredits,Qt as default};
|
|
855
|
-
//# sourceMappingURL=GetCredits-
|
|
855
|
+
//# sourceMappingURL=GetCredits-uWqqViY_.js.map
|