@dcl/shop 1.12.2-34952267751.commit-238b526 → 1.12.2-34968681691.commit-d61728d
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-siWjYXXC.js → Activity-jrYWoNWZ.js} +4 -4
- package/_assets/{AnimatedBackground-BugetQOT.js → AnimatedBackground-2cw5u_BI.js} +2 -2
- package/_assets/{Assets-DlgKLJ-E.js → Assets-Cchkrb-r.js} +3 -3
- package/_assets/{Authorizations-BbD7n7VP.js → Authorizations-T3uJtCS4.js} +2 -2
- package/_assets/{Cart-C2JINVsV.js → Cart-CBOmt4gy.js} +2 -2
- package/_assets/{Collection--VRQWagp.js → Collection-LJIgB-hh.js} +2 -2
- package/_assets/{CollectionCarousel-DJ22bLsm.js → CollectionCarousel-DOHjFwS8.js} +3 -3
- package/_assets/{Confetti-upwjxWRl.js → Confetti-JgyDQdwe.js} +4 -4
- package/_assets/{ConstantsUtil-CVlcVbe3.js → ConstantsUtil-DmRxn1rN.js} +2 -2
- package/_assets/{ContentClient-DFKBUKq9.js → ContentClient-CD-EotOo.js} +2 -2
- package/_assets/{Creator-CnvTIUIR.js → Creator-C7kvawHs.js} +2 -2
- package/_assets/{DeploymentBuilder-B0_Tu7hd.js → DeploymentBuilder-DCCjtm_I.js} +2 -2
- package/_assets/{EmotePlaybackBar-r2Vm5Com.js → EmotePlaybackBar-BbLe7eRv.js} +5 -5
- package/_assets/{ErrorNotice-DdXfJJQ5.js → ErrorNotice-ClgCsoly.js} +2 -2
- package/_assets/{Event-Di_H3_8X.js → Event-DhYM6Kku.js} +2 -2
- package/_assets/{ExchangeController-CDFzZYyn.js → ExchangeController-dxIMhhH6.js} +2 -2
- package/_assets/{Faq-C6G9icRA.js → Faq-C-bTf4Y0.js} +2 -2
- package/_assets/{GetCredits-C3TmZRkA.js → GetCredits-D3Xq5hPG.js} +2 -2
- package/_assets/{Grow-eSBVpy87.js → Grow-BvUzv11K.js} +2 -2
- package/_assets/{HelpersUtil-DX5u_vH_.js → HelpersUtil-C5tFlPhe.js} +2 -2
- package/_assets/{ItemDetail-D-qm5dRj.js → ItemDetail-CK7EmJz5.js} +2 -2
- package/_assets/{LoadMore-D-sqkeqn.js → LoadMore-Dr8VkfDh.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-C7DuwIf7.js → ManaPricingBanner.styles-BoYJiExd.js} +2 -2
- package/_assets/{MyAssets-D-74TXj0.js → MyAssets-Bq5EfGXz.js} +100 -100
- package/_assets/{MyFavorites-BrahbeXJ.js → MyFavorites-DPchePEj.js} +2 -2
- package/_assets/{NetworkUtil-Clofb_T-.js → NetworkUtil-BKqUtqwI.js} +2 -2
- package/_assets/{NotFound-C2zk4xTg.js → NotFound-Dk8Z881t.js} +2 -2
- package/_assets/{NotificationsBell-Dbe2NDDi.js → NotificationsBell-B2ftwDIa.js} +2 -2
- package/_assets/{OutfitDetail-DNvTjhl5.js → OutfitDetail-Bi1HxcUD.js} +2 -2
- package/_assets/{OutfitPreview-CzJ7zFyn.js → OutfitPreview-BMWPKAju.js} +2 -2
- package/_assets/{OutfitStudio-BQmOHxV3.js → OutfitStudio-uadbCnWe.js} +2 -2
- package/_assets/{StoreSettings-DXOqr7lc.js → StoreSettings-uagN_SLs.js} +2 -2
- package/_assets/{Success-0aSNITFG.js → Success-BdTd6dvD.js} +2 -2
- package/_assets/{SwapController-B_2D4qoY.js → SwapController-907hDWHh.js} +2 -2
- package/_assets/{TradeService-7U6O3-yI.js → TradeService-D8u1ihWD.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-o4NRojJJ.js → W3MFrameProviderSingleton-BNVADE8q.js} +4 -4
- package/_assets/{WebCryptoP256-DcssHpK7.js → WebCryptoP256-BWknsl3S.js} +2 -2
- package/_assets/{authorizations-BpA7J6nv.js → authorizations-YF2LYI5X.js} +2 -2
- package/_assets/{basic-CU1kWM_B.js → basic-UNZdIk-L.js} +2 -2
- package/_assets/{biconomy-CG4oe_pD.js → biconomy-BZjucA9X.js} +2 -2
- package/_assets/{browseLayout.styles-4ap7kx9k.js → browseLayout.styles-BcdBGvBJ.js} +2 -2
- package/_assets/{browser-xz-gmjRJ.js → browser-ClZ-a39n.js} +2 -2
- package/_assets/{browser-CNhrcETW.js → browser-Dnf4Mz6g.js} +2 -2
- package/_assets/{browser-ponyfill-DnS23_qH.js → browser-ponyfill-B84avFIe.js} +2 -2
- package/_assets/{builder-Uh_QHIQ6.js → builder-BW_XFxl3.js} +2 -2
- package/_assets/{buy-B5M_2UT-.js → buy-DrunLbTj.js} +2 -2
- package/_assets/{buy-gasless-By4UCL5G.js → buy-gasless-CaWC_7zf.js} +2 -2
- package/_assets/{categories-s25qDcz8.js → categories-yaclHH8q.js} +2 -2
- package/_assets/{ccip-DvbgVSwB.js → ccip-B4or4G2y.js} +2 -2
- package/_assets/{ccip-CfmbFrZH.js → ccip-BVjwmdSL.js} +2 -2
- package/_assets/{chains-m-fvvDHS.js → chains-Jbsww7Kt.js} +2 -2
- package/_assets/collectionPage.styles-CCcFOdZW.js +41 -0
- package/_assets/{common-DxHICWNQ.js → common-BmZvsWU1.js} +2 -2
- package/_assets/{controller-DqPjxg9H.js → controller-CB4tnDkG.js} +3 -3
- package/_assets/{core-DoDkK-JQ.js → core-Ex9v02O-.js} +5 -5
- package/_assets/{createSvgIcon-AK7VRVN4.js → createSvgIcon-BkGTqzv8.js} +2 -2
- package/_assets/{crumbs.styles-BBOgiQ-V.js → crumbs.styles-CymYINH8.js} +2 -2
- package/_assets/{custom-BnrdIOOX.js → custom-CeorJzLL.js} +2 -2
- package/_assets/{data-capture-B2_dizO_.js → data-capture-R53qzCaY.js} +2 -2
- package/_assets/{dcl-schemas-DU0vGMAi.js → dcl-schemas-DG9Rrz5z.js} +2 -2
- package/_assets/{decimals-BGOT8ITj.js → decimals-DMTp1mRe.js} +2 -2
- package/_assets/{decimals-B3xpoTsT.js → decimals-DUQR67xd.js} +2 -2
- package/_assets/{detectExtension-Lc4xlnmZ.js → detectExtension-BoCHA82D.js} +2 -2
- package/_assets/{disposePreview-BnC_0-K_.js → disposePreview-HSnE8fg0.js} +2 -2
- package/_assets/{email-CHpYsXDV.js → email-C4Nes9lN.js} +2 -2
- package/_assets/{embedded-wallet-Bu8ad7yi.js → embedded-wallet-DmXBYftX.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-tLBNQtjX.js → emotion-styled.browser.esm-CrQ9Ohk0.js} +2 -2
- package/_assets/{engine-WQ_PFTkV.js → engine-Bhi-4jDu.js} +2 -2
- package/_assets/{errors-Bska53t6.js → errors-BNoZdkky.js} +2 -2
- package/_assets/{estimate-l1-fee-CpYC06aO.js → estimate-l1-fee-2Fq4t_6c.js} +2 -2
- package/_assets/{eth_estimateGas-BQ8foI_n.js → eth_estimateGas-CI0WJ02w.js} +2 -2
- package/_assets/{eth_getStorageAt-B6MCehWg.js → eth_getStorageAt-BhyM3UhZ.js} +2 -2
- package/_assets/{eth_getTransactionCount-gXfe8bkr.js → eth_getTransactionCount-CV8awliF.js} +2 -2
- package/_assets/{ethereum-Csbrq78G.js → ethereum-DPMEzS8d.js} +2 -2
- package/_assets/{ethers-DOxpBstR.js → ethers-CJMNYBDD.js} +2 -2
- package/_assets/{events-CVTjJMET.js → events-CAUsd5bh.js} +2 -2
- package/_assets/{execute-BNeM18Ox.js → execute-D6hIo909.js} +3 -3
- package/_assets/{extractIPFS-YpxmKw9M.js → extractIPFS-Kt4ZPiLk.js} +2 -2
- package/_assets/{features-nCqFC4Hp.js → features-BzrHTTh4.js} +2 -2
- package/_assets/{fetchTokenMetadata-Coko2qOP.js → fetchTokenMetadata-CImk_QM8.js} +3 -3
- package/_assets/{field.styles-C0hP5Nvw.js → field.styles-BEV0a4Z8.js} +2 -2
- package/_assets/{fortmatic-d2zOBJsV.js → fortmatic-qinwifaj.js} +2 -2
- package/_assets/{get-bytecode-DkyBhWG0.js → get-bytecode-DJSRuIfT.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-JLiYFqKn.js → get-ecosystem-wallet-info-BQ_zAKWh.js} +2 -2
- package/_assets/{getBalance-8WdMwmlE.js → getBalance-DtYGtInZ.js} +3 -3
- package/_assets/{getInstalledModules-Bn-WMWvZ.js → getInstalledModules-BhM5n_9F.js} +2 -2
- package/_assets/{getNFT-BygCA-zb.js → getNFT-CN3te82N.js} +2 -2
- package/_assets/{getNFT-D7H4s4bO.js → getNFT-D2EGL-DY.js} +3 -3
- package/_assets/{grid.styles-BJJSFZSz.js → grid.styles-DXUh2mDk.js} +2 -2
- package/_assets/{hashTypedData-CCQr4xhM.js → hashTypedData-MYLBBo9Y.js} +2 -2
- package/_assets/{hashTypedData-LyJcbtjj.js → hashTypedData-lRiN7lQR.js} +2 -2
- package/_assets/{in-app-B4RhGBCh.js → in-app-CrLt4WT4.js} +2 -2
- package/_assets/{in-app-wallet-calls-9KSXE9GH.js → in-app-wallet-calls-CRtE-4pM.js} +2 -2
- package/_assets/{index-P43ylXlL.js → index-0I7FBmLL.js} +2 -2
- package/_assets/{index-CrTPPk7j.js → index-465FFqd4.js} +2 -2
- package/_assets/{index-FeiBiOm6.js → index-8UuFrV0f.js} +2 -2
- package/_assets/{index-CxRbA6MI.js → index-B6ckJUxz.js} +2 -2
- package/_assets/{index-DzzXwSZ_.js → index-B9TY65-n.js} +3 -3
- package/_assets/{index-CapZaipt.js → index-BDDqHAZd.js} +4 -4
- package/_assets/{index-C2wWmtlM.js → index-BDFuFsIc.js} +2 -2
- package/_assets/{index-CiyGPGO9.js → index-BE-Pu0vI.js} +2 -2
- package/_assets/{index-2hLftpjl.js → index-BEJ7CMDD.js} +2 -2
- package/_assets/{index-DThURYeF.js → index-BLOPtDqh.js} +2 -2
- package/_assets/{index-C-I-VAtj.js → index-BRKmUfmp.js} +2 -2
- package/_assets/{index-Da4inYY3.js → index-BTZczyGj.js} +2 -2
- package/_assets/{index-CxKeAG-J.js → index-BTh8g2Rp.js} +2 -2
- package/_assets/{index-CvgtFUyg.js → index-BV-f1rcf.js} +2 -2
- package/_assets/{index-Cn5i7pxA.js → index-BdEiCc0V.js} +2 -2
- package/_assets/{index-qdxlhv6O.js → index-BekhhFBG.js} +2 -2
- package/_assets/{index-CoHZlbxe.js → index-BhgOwCHI.js} +2 -2
- package/_assets/{index-D4RODIqW.css → index-BkUcVOvQ.css} +1 -1
- package/_assets/{index-BIIfWRsm.js → index-Bn9pEQIy.js} +2 -2
- package/_assets/{index-DCuIjSa3.js → index-BvfVhPmP.js} +2 -2
- package/_assets/{index-DdRwH_39.js → index-BwlA1aaJ.js} +4 -4
- package/_assets/{index-BR_dJjYg.js → index-Bwsh7KKj.js} +2 -2
- package/_assets/{index-xqaY6JvQ.js → index-Byg5E0wJ.js} +2 -2
- package/_assets/{index-DAqJHTwr.js → index-BzyULz3d.js} +2 -2
- package/_assets/{index-C8kaVPrn.js → index-C13UuH-8.js} +2 -2
- package/_assets/{index-DUOPuDtZ.js → index-CBGaEx7k.js} +2 -2
- package/_assets/{index-Bxumz6fq.js → index-CBJL5Lgi.js} +2 -2
- package/_assets/{index-Dbnvtlu9.js → index-CCDB3UlI.js} +2 -2
- package/_assets/{index-Ct1LvV9T.js → index-CDHjsN4-.js} +2 -2
- package/_assets/{index-xAvWfXcL.js → index-CRa6nMtD.js} +2 -2
- package/_assets/{index-6WQDsbX1.js → index-CWsn0MVr.js} +2 -2
- package/_assets/{index-DXza9S1H.js → index-CZMMa7z5.js} +2 -2
- package/_assets/{index-CYQC6fE_.js → index-C_8x-HKs.js} +2 -2
- package/_assets/{index-B6UXzlO7.js → index-C_aTZTUN.js} +2 -2
- package/_assets/{index-DBH3OwKH.js → index-CbfVvQKQ.js} +2 -2
- package/_assets/{index-BAnXoBQa.js → index-CcSm9fX_.js} +2 -2
- package/_assets/{index-BOLPfj8p.js → index-CqdSjrau.js} +2 -2
- package/_assets/{index-ChCaLJWf.js → index-CrZGn3V8.js} +2 -2
- package/_assets/{index-b1B_uAjk.js → index-CzSz6bmu.js} +2 -2
- package/_assets/{index-BRihLNDO.js → index-D1YxMOZD.js} +2 -2
- package/_assets/{index-B13-c4P_.js → index-D6oUCB6a.js} +2 -2
- package/_assets/{index-BzrU_xTj.js → index-D7ySqt24.js} +2 -2
- package/_assets/{index-CAPkL9qq.js → index-D9jQnGun.js} +2 -2
- package/_assets/{index-CY3jvlYI.js → index-DBHPeOT5.js} +2 -2
- package/_assets/{index-CKwTnm7g.js → index-DCO5bROp.js} +2 -2
- package/_assets/{index-B0fhzNVc.js → index-DEbI6zJu.js} +3 -3
- package/_assets/{index-xtcL5SzR.js → index-DOek4sNO.js} +2 -2
- package/_assets/{index-HfXmqqOB.js → index-DPG2GUwd.js} +2 -2
- package/_assets/{index-BYcTSIVf.js → index-DR7YV2gO.js} +2 -2
- package/_assets/{index-B2jE74v0.js → index-DUhpcP7W.js} +2 -2
- package/_assets/{index-D7lw4vKg.js → index-D_thG_X0.js} +3 -3
- package/_assets/{index-Dt4Q6hxP.js → index-DdZdZH54.js} +2 -2
- package/_assets/{index-Bbdi2im4.js → index-DgCb5qsB.js} +2 -2
- package/_assets/{index-G4LsqNWU.js → index-DgTBuFZZ.js} +2 -2
- package/_assets/{index-ZubpwVm5.js → index-Dj-sWvd-.js} +2 -2
- package/_assets/{index-z3GWPvvT.js → index-DuAGtgEt.js} +2 -2
- package/_assets/{index-Df_2haqu.js → index-DyuVy1hh.js} +2 -2
- package/_assets/{index-CL1zwzqa.js → index-HaNiJJj7.js} +2 -2
- package/_assets/{index-CAwE9Yy4.js → index-KogMcMgM.js} +4 -4
- package/_assets/{index-CZyzFCL9.js → index-_VzfFaH7.js} +2 -2
- package/_assets/{index-KGKbIgYc.js → index-fVfrsq3-.js} +197 -197
- package/_assets/{index-UeOBzUmn.js → index-m-mW7tBT.js} +2 -2
- package/_assets/{index-B0P4rhnH.js → index-mJNRsai_.js} +2 -2
- package/_assets/{index-PoXBOo9s.js → index-o5Kr4nH4.js} +2 -2
- package/_assets/{index-CTXBNDaR.js → index-qxgomgzg.js} +3 -3
- package/_assets/{index-BuBMGMtY.js → index-rOgwHRBy.js} +2 -2
- package/_assets/{index-ovYwqG3U.js → index-uOBbMLH1.js} +2 -2
- package/_assets/{index-CUwG9Gow.js → index-yYoCyJm0.js} +2 -2
- package/_assets/{index.es-DPNqN1VR.js → index.es-BYbP7qKW.js} +2 -2
- package/_assets/{index.es-Cn1837qk.js → index.es-CBnWkDWE.js} +2 -2
- package/_assets/{index.es-CdrKIXAf.js → index.es-DbvmB8Hz.js} +5 -5
- package/_assets/{index.es-Hocc0M2s.js → index.es-Z1WflUVe.js} +2 -2
- package/_assets/{items-empty-Db7ykBge.js → items-empty-BW_AkfMw.js} +2 -2
- package/_assets/{jump-C3eF7452.js → jump-DpZ_H_aD.js} +2 -2
- package/_assets/{linkAccount-Dg1gRdCu.js → linkAccount-D-4XkPjZ.js} +2 -2
- package/_assets/{localBatchGatewayRequest-o2tz0Xkw.js → localBatchGatewayRequest-OsgCBNTu.js} +2 -2
- package/_assets/{native-CvGGXrJP.js → native-DKBEZ83U.js} +2 -2
- package/_assets/{networks-DpUYbi2j.js → networks-C2xwNyRf.js} +2 -2
- package/_assets/{onramp-DrkhTAlE.js → onramp-B6nWf10-.js} +2 -2
- package/_assets/{openzeppelin-CqDJzb_H.js → openzeppelin-Diuo_yCD.js} +2 -2
- package/_assets/{ownerOf-BtEo_nZi.js → ownerOf-BWkhY882.js} +2 -2
- package/_assets/{parseNft-5q27IIJ4.js → parseNft-u-4kmGsK.js} +3 -3
- package/_assets/{parseSignature-iObXbLbJ.js → parseSignature-CsT18GhO.js} +2 -2
- package/_assets/{parseSignature-BCGLPNhC.js → parseSignature-jN7oN0GI.js} +4 -4
- package/_assets/{passkeys-4vxYlgiO.js → passkeys-CTXuXCfx.js} +2 -2
- package/_assets/{pay-with-exchange-BRIaMBg2.js → pay-with-exchange-BJuv8V6R.js} +2 -2
- package/_assets/{prepare-contract-call-DzSUrXuE.js → prepare-contract-call-uRIzxupc.js} +2 -2
- package/_assets/{qr-overlay-K_inpcHR.js → qr-overlay--7W-iuad.js} +4 -4
- package/_assets/{react-CbiDtrwy.js → react-BT1DRxg0.js} +2 -2
- package/_assets/{receive-BsVhuoyI.js → receive-BwOH-nle.js} +2 -2
- package/_assets/{resolveImplementation-DpzhGxRX.js → resolveImplementation-1JkowYx7.js} +2 -2
- package/_assets/{resume-buy-BvCiqn2w.js → resume-buy-CWeRH5M6.js} +2 -2
- package/_assets/{rpc-C_QkhZkG.js → rpc-B4prFU2a.js} +2 -2
- package/_assets/{sales-empty-CbN8gNFb.js → sales-empty-NUQXvOkl.js} +2 -2
- package/_assets/{search-empty-v82Jfcsb.js → search-empty-Ozh9aYwC.js} +2 -2
- package/_assets/{secp256k1-B5JWxdoq.js → secp256k1-B_NYc5Il.js} +2 -2
- package/_assets/{secp256k1-DO1HKk_9.js → secp256k1-Cc_wcAuB.js} +2 -2
- package/_assets/{secp256k1-B8ClqkT8.js → secp256k1-VlK93Orv.js} +2 -2
- package/_assets/{send-CEpYMZe7.js → send-DVHwVtxL.js} +2 -2
- package/_assets/{send-batch-transaction-CJvetNA5.js → send-batch-transaction-_X5Yvjn5.js} +2 -2
- package/_assets/{send-eip712-transaction-BpCm1YSI.js → send-eip712-transaction-yWD_jIzZ.js} +3 -3
- package/_assets/{send-gasless-transaction-BQ5n3ZLO.js → send-gasless-transaction-BHT2RYSc.js} +3 -3
- package/_assets/{send-transaction-CQcs63ct.js → send-transaction-BaeXDarf.js} +3 -3
- package/_assets/{sendMetaTransaction-CbxM2dJ4.js → sendMetaTransaction-Bkp77jP5.js} +2 -2
- package/_assets/{sendRawTransaction-D-J01xpv.js → sendRawTransaction-CyJ8NDZj.js} +4 -4
- package/_assets/{sentry-pksVc8Y1.js → sentry-DAGaybiy.js} +3 -3
- package/_assets/{serializeTransaction-BNmuM5Vp.js → serializeTransaction-DXxxJc7P.js} +2 -2
- package/_assets/{session-proposal-xZsE3jVs.js → session-proposal-DLqTKK3p.js} +2 -2
- package/_assets/{session-request-DZrNMJCR.js → session-request-DWfXqC4U.js} +3 -3
- package/_assets/{sha256-DWDaWrQD.js → sha256-OlqvKl9o.js} +2 -2
- package/_assets/{sha3-DbomSxuI.js → sha3-BDxbouvg.js} +2 -2
- package/_assets/{signing-BwRlgyGP.js → signing-CGeazqai.js} +4 -4
- package/_assets/{skeleton.styles-CTlrCuJj.js → skeleton.styles-C8iLuc4D.js} +2 -2
- package/_assets/{socials-xQSQwdy_.js → socials-CgDFcyf2.js} +2 -2
- package/_assets/{styled-C37YZplh.js → styled-C4NeqzHW.js} +2 -2
- package/_assets/{swaps-JSJu9ZEk.js → swaps-Bu7ntZyj.js} +2 -2
- package/_assets/{thirdweb-0WodtONG.js → thirdweb-Pxlrk3RX.js} +4 -4
- package/_assets/{to-serializable-transaction-B9zCzvuC.js → to-serializable-transaction-H-VNrW1G.js} +3 -3
- package/_assets/{totalSupply-CQm-t9gk.js → totalSupply-Bc9h1F8V.js} +2 -2
- package/_assets/{transaction-dnqRlxqs.js → transaction-DBqXoeOX.js} +2 -2
- package/_assets/{transactionReceipt-zwt2ZXmW.js → transactionReceipt-SSeob30N.js} +2 -2
- package/_assets/{transactions-BOc83Sc_.js → transactions-CbZ7Ba42.js} +2 -2
- package/_assets/{useCreditPacks-C9QUVT1i.js → useCreditPacks-kxQZm5SR.js} +2 -2
- package/_assets/{useInfiniteGrid-Cgk7ZeHL.js → useInfiniteGrid-xjb6zl5n.js} +2 -2
- package/_assets/{useStore-D5kMn0mR.js → useStore-6NfPLZYM.js} +3 -3
- package/_assets/{useTheme-vTP9z_Gm.js → useTheme-D6_hJUHx.js} +2 -2
- package/_assets/{utils-DrNnWK05.js → utils-CDHiYwmg.js} +2 -2
- package/_assets/{verifyHash-DIESi3OJ.js → verifyHash-BstDgncb.js} +2 -2
- package/_assets/{w3m-modal-6MmYKXgB.js → w3m-modal-CZB-kKPl.js} +2 -2
- package/_assets/{w3m-modal-q9WU-JG5.js → w3m-modal-CgHAhbd7.js} +2 -2
- package/_assets/{wait-for-tx-receipt-rUn3vghV.js → wait-for-tx-receipt-C-5fT5xk.js} +2 -2
- package/_assets/{wallet-BYrWPu9Q.js → wallet-CE_PuHwW.js} +2 -2
- package/_assets/{wallets-uhB6Tvqm.js → wallets-DTbIig3q.js} +6 -6
- package/_assets/{web-connector-BOij74Y4.js → web-connector-CtRYaueX.js} +4 -4
- package/_assets/{writeContract-CfRoYwPI.js → writeContract-qguDostC.js} +2 -2
- package/_assets/{zora-sepolia-PqJWDgc_.js → zora-sepolia-CIDy4bI-.js} +2 -2
- package/_assets/{zoraTestnet-C9-KL1tb.js → zoraTestnet-DGLwJRHJ.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/collectionPage.styles-CPno7D9g.js +0 -41
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{f as ta,u as ra,r as ee,j as m,a as ec}from"./react-CbiDtrwy.js";import{a3 as tc,g as rc,f as It,k as ir,m as or,d as R,e as F,de as Jn,A as na,c as C,I as Me,dx as Fn,dy as Pt,z as ps,K as gs,dz as sa,ak as qt,E as Vn,n as ia,bC as oa,B as vt,v as $t,cG as ms,cF as nc,x as sc,y as ic,be as ys,O as oc,S as ar,R as cr,Q as bs,G as ac,P as cc,dA as uc,dB as lc}from"./index-KGKbIgYc.js";import{b as dc}from"./builder-Uh_QHIQ6.js";import{B as ws,d as zn}from"./dcl-schemas-DU0vGMAi.js";import{r as fc}from"./sha3-DbomSxuI.js";import{r as hc}from"./browser-xz-gmjRJ.js";import{p as pc}from"./sentry-pksVc8Y1.js";import{r as gc}from"./authorizations-BpA7J6nv.js";import{o as mc,O as Es}from"./buy-B5M_2UT-.js";import{C as aa,a as Rt,h as ca,r as yc,k as bc}from"./ethers-DOxpBstR.js";import{i as wc}from"./wallet-BYrWPu9Q.js";import{f as ua}from"./errors-Bska53t6.js";import{E as Ht}from"./ErrorNotice-DdXfJJQ5.js";import{L as Ec}from"./LoadMore-D-sqkeqn.js";import{u as Sc,R as ur,i as vc,j as $c,k as Rc,l as lr,m as dr,n as Ic,o as _c,p as xc,q as Ac,r as Tc,s as Ss,t as vs,v as $s,a as Cc,b as jc,c as Pc,D as Oc,d as kc,C as Bc,e as Lc,f as Nc,g as Mc,M as qc,h as Hc}from"./browseLayout.styles-4ap7kx9k.js";import{u as Uc}from"./useInfiniteGrid-Cgk7ZeHL.js";import{n as la,S as Rs}from"./categories-s25qDcz8.js";import{u as Dc,s as Fc}from"./sales-empty-CbN8gNFb.js";import{C as Vc,R as zc,B as Gc,T as Jc,A as Xc,a as Wc,b as Kc,D as Yc,M as Zc}from"./ManaPricingBanner.styles-C7DuwIf7.js";import{C as Qc}from"./field.styles-C0hP5Nvw.js";import{c as eu,i as tu}from"./items-empty-Db7ykBge.js";import{m as ru}from"./mana-matic-CEqvSwrJ.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CbxM2dJ4.js";import"./skeleton.styles-CTlrCuJj.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]="fb0f0d1f-c595-417e-ac71-7b8d1df291e2",e._sentryDebugIdIdentifier="sentry-dbid-fb0f0d1f-c595-417e-ac71-7b8d1df291e2")}catch{}})();var fr={},Ze={},Qe={},hr={},et={},Te={},tt={},lt={},Is;function da(){if(Is)return lt;Is=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.StructError=void 0;class e extends TypeError{constructor(n,i){let d;const{message:u,explanation:c,...a}=n,{path:o}=n,f=o.length===0?u:`At path: ${o.join(".")} -- ${u}`;super(c??f),c!=null&&(this.cause=f),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>d??(d=[n,...i()])}}return lt.StructError=e,lt}var be={},we={},_s;function Ft(){if(_s)return we;_s=1,Object.defineProperty(we,"__esModule",{value:!0}),we.run=we.toFailures=we.toFailure=we.shiftIterator=we.print=we.isPlainObject=we.isObject=void 0;function e(o){return t(o)&&typeof o[Symbol.iterator]=="function"}function t(o){return typeof o=="object"&&o!==null}we.isObject=t;function n(o){if(Object.prototype.toString.call(o)!=="[object Object]")return!1;const f=Object.getPrototypeOf(o);return f===null||f===Object.prototype}we.isPlainObject=n;function i(o){return typeof o=="symbol"?o.toString():typeof o=="string"?JSON.stringify(o):`${o}`}we.print=i;function d(o){const{done:f,value:r}=o.next();return f?void 0:r}we.shiftIterator=d;function u(o,f,r,s){if(o===!0)return;o===!1?o={}:typeof o=="string"&&(o={message:o});const{path:l,branch:h}=f,{type:w}=r,{refinement:$,message:U=`Expected a value of type \`${w}\`${$?` with refinement \`${$}\``:""}, but received: \`${i(s)}\``}=o;return{value:s,type:w,refinement:$,key:l[l.length-1],path:l,branch:h,...o,message:U}}we.toFailure=u;function*c(o,f,r,s){e(o)||(o=[o]);for(const l of o){const h=u(l,f,r,s);h&&(yield h)}}we.toFailures=c;function*a(o,f,r={}){const{path:s=[],branch:l=[o],coerce:h=!1,mask:w=!1}=r,$={path:s,branch:l};if(h&&(o=f.coercer(o,$),w&&f.type!=="type"&&t(f.schema)&&t(o)&&!Array.isArray(o)))for(const O in o)f.schema[O]===void 0&&delete o[O];let U="valid";for(const O of f.validator(o,$))O.explanation=r.message,U="not_valid",yield[O,void 0];for(let[O,J,K]of f.entries(o,$)){const _=a(J,K,{path:O===void 0?s:[...s,O],branch:O===void 0?l:[...l,J],coerce:h,mask:w,message:r.message});for(const E of _)E[0]?(U=E[0].refinement===null||E[0].refinement===void 0?"not_valid":"not_refined",yield[E[0],void 0]):h&&(J=E[1],O===void 0?o=J:o instanceof Map?o.set(O,J):o instanceof Set?o.add(J):t(o)&&(J!==void 0||O in o)&&(o[O]=J))}if(U!=="not_valid")for(const O of f.refiner(o,$))O.explanation=r.message,U="not_refined",yield[O,void 0];U==="valid"&&(yield[void 0,o])}return we.run=a,we}var xs;function _t(){if(xs)return be;xs=1,Object.defineProperty(be,"__esModule",{value:!0}),be.validate=be.is=be.mask=be.create=be.assert=be.ExactOptionalStruct=be.Struct=void 0;const e=da(),t=Ft();class n{constructor(s){const{type:l,schema:h,validator:w,refiner:$,coercer:U=J=>J,entries:O=function*(){}}=s;this.type=l,this.schema=h,this.entries=O,this.coercer=U,w?this.validator=(J,K)=>{const _=w(J,K);return(0,t.toFailures)(_,K,this,J)}:this.validator=()=>[],$?this.refiner=(J,K)=>{const _=$(J,K);return(0,t.toFailures)(_,K,this,J)}:this.refiner=()=>[]}assert(s,l){return u(s,this,l)}create(s,l){return c(s,this,l)}is(s){return o(s,this)}mask(s,l){return a(s,this,l)}validate(s,l={}){return f(s,this,l)}}be.Struct=n;const i="EXACT_OPTIONAL";class d extends n{constructor(s){super({...s,type:`exact optional ${s.type}`}),this.brand=i}static isExactOptional(s){return(0,t.isObject)(s)&&"brand"in s&&s.brand===i}}be.ExactOptionalStruct=d;function u(r,s,l){const h=f(r,s,{message:l});if(h[0])throw h[0]}be.assert=u;function c(r,s,l){const h=f(r,s,{coerce:!0,message:l});if(h[0])throw h[0];return h[1]}be.create=c;function a(r,s,l){const h=f(r,s,{coerce:!0,mask:!0,message:l});if(h[0])throw h[0];return h[1]}be.mask=a;function o(r,s){return!f(r,s)[0]}be.is=o;function f(r,s,l={}){const h=(0,t.run)(r,s,l),w=(0,t.shiftIterator)(h);return w[0]?[new e.StructError(w[0],function*(){for(const O of h)O[0]&&(yield O[0])}),void 0]:[void 0,w[1]]}return be.validate=f,be}var Fe={},Z={},he={},As;function fa(){if(As)return he;As=1,Object.defineProperty(he,"__esModule",{value:!0}),he.pick=he.partial=he.omit=he.lazy=he.dynamic=he.deprecated=he.define=he.assign=void 0;const e=_t(),t=Xn();function n(...r){var w;const s=((w=r[0])==null?void 0:w.type)==="type",l=r.map(({schema:$})=>$),h=Object.assign({},...l);return s?(0,t.type)(h):(0,t.object)(h)}he.assign=n;function i(r,s){return new e.Struct({type:r,schema:null,validator:s})}he.define=i;function d(r,s){return new e.Struct({...r,refiner:(l,h)=>l===void 0||r.refiner(l,h),validator(l,h){return l===void 0?!0:(s(l,h),r.validator(l,h))}})}he.deprecated=d;function u(r){return new e.Struct({type:"dynamic",schema:null,*entries(s,l){yield*r(s,l).entries(s,l)},validator(s,l){return r(s,l).validator(s,l)},coercer(s,l){return r(s,l).coercer(s,l)},refiner(s,l){return r(s,l).refiner(s,l)}})}he.dynamic=u;function c(r){let s;return new e.Struct({type:"lazy",schema:null,*entries(l,h){s??(s=r()),yield*s.entries(l,h)},validator(l,h){return s??(s=r()),s.validator(l,h)},coercer(l,h){return s??(s=r()),s.coercer(l,h)},refiner(l,h){return s??(s=r()),s.refiner(l,h)}})}he.lazy=c;function a(r,s){const{schema:l}=r,h={...l};for(const w of s)delete h[w];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}he.omit=a;function o(r){const s=r instanceof e.Struct,l=s?{...r.schema}:{...r};for(const h in l)l[h]=(0,t.optional)(l[h]);return s&&r.type==="type"?(0,t.type)(l):(0,t.object)(l)}he.partial=o;function f(r,s){const{schema:l}=r,h={};for(const w of s)h[w]=l[w];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}return he.pick=f,he}var Ts;function Xn(){if(Ts)return Z;Ts=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.unknown=Z.union=Z.type=Z.tuple=Z.string=Z.set=Z.regexp=Z.record=Z.exactOptional=Z.optional=Z.object=Z.number=Z.nullable=Z.never=Z.map=Z.literal=Z.intersection=Z.integer=Z.instance=Z.func=Z.enums=Z.date=Z.boolean=Z.bigint=Z.array=Z.any=void 0;const e=_t(),t=Ft(),n=fa();function i(){return(0,n.define)("any",()=>!0)}Z.any=i;function d(x){return new e.Struct({type:"array",schema:x,*entries(M){if(x&&Array.isArray(M))for(const[q,z]of M.entries())yield[q,z,x]},coercer(M){return Array.isArray(M)?M.slice():M},validator(M){return Array.isArray(M)||`Expected an array value, but received: ${(0,t.print)(M)}`}})}Z.array=d;function u(){return(0,n.define)("bigint",x=>typeof x=="bigint")}Z.bigint=u;function c(){return(0,n.define)("boolean",x=>typeof x=="boolean")}Z.boolean=c;function a(){return(0,n.define)("date",x=>x instanceof Date&&!isNaN(x.getTime())||`Expected a valid \`Date\` object, but received: ${(0,t.print)(x)}`)}Z.date=a;function o(x){const M={},q=x.map(z=>(0,t.print)(z)).join();for(const z of x)M[z]=z;return new e.Struct({type:"enums",schema:M,validator(z){return x.includes(z)||`Expected one of \`${q}\`, but received: ${(0,t.print)(z)}`}})}Z.enums=o;function f(){return(0,n.define)("func",x=>typeof x=="function"||`Expected a function, but received: ${(0,t.print)(x)}`)}Z.func=f;function r(x){return(0,n.define)("instance",M=>M instanceof x||`Expected a \`${x.name}\` instance, but received: ${(0,t.print)(M)}`)}Z.instance=r;function s(){return(0,n.define)("integer",x=>typeof x=="number"&&!isNaN(x)&&Number.isInteger(x)||`Expected an integer, but received: ${(0,t.print)(x)}`)}Z.integer=s;function l(x){return new e.Struct({type:"intersection",schema:null,*entries(M,q){for(const{entries:z}of x)yield*z(M,q)},*validator(M,q){for(const{validator:z}of x)yield*z(M,q)},*refiner(M,q){for(const{refiner:z}of x)yield*z(M,q)}})}Z.intersection=l;function h(x){const M=(0,t.print)(x),q=typeof x;return new e.Struct({type:"literal",schema:q==="string"||q==="number"||q==="boolean"?x:null,validator(z){return z===x||`Expected the literal \`${M}\`, but received: ${(0,t.print)(z)}`}})}Z.literal=h;function w(x,M){return new e.Struct({type:"map",schema:null,*entries(q){if(x&&M&&q instanceof Map)for(const[z,L]of q.entries())yield[z,z,x],yield[z,L,M]},coercer(q){return q instanceof Map?new Map(q):q},validator(q){return q instanceof Map||`Expected a \`Map\` object, but received: ${(0,t.print)(q)}`}})}Z.map=w;function $(){return(0,n.define)("never",()=>!1)}Z.never=$;function U(x){return new e.Struct({...x,validator:(M,q)=>M===null||x.validator(M,q),refiner:(M,q)=>M===null||x.refiner(M,q)})}Z.nullable=U;function O(){return(0,n.define)("number",x=>typeof x=="number"&&!isNaN(x)||`Expected a number, but received: ${(0,t.print)(x)}`)}Z.number=O;function J(x){const M=x?Object.keys(x):[],q=$();return new e.Struct({type:"object",schema:x??null,*entries(z){if(x&&(0,t.isObject)(z)){const L=new Set(Object.keys(z));for(const H of M){L.delete(H);const b=x[H];e.ExactOptionalStruct.isExactOptional(b)&&!Object.prototype.hasOwnProperty.call(z,H)||(yield[H,z[H],x[H]])}for(const H of L)yield[H,z[H],q]}},validator(z){return(0,t.isObject)(z)||`Expected an object, but received: ${(0,t.print)(z)}`},coercer(z){return(0,t.isObject)(z)?{...z}:z}})}Z.object=J;function K(x){return new e.Struct({...x,validator:(M,q)=>M===void 0||x.validator(M,q),refiner:(M,q)=>M===void 0||x.refiner(M,q)})}Z.optional=K;function _(x){return new e.ExactOptionalStruct(x)}Z.exactOptional=_;function E(x,M){return new e.Struct({type:"record",schema:null,*entries(q){if((0,t.isObject)(q))for(const z in q){const L=q[z];yield[z,z,x],yield[z,L,M]}},validator(q){return(0,t.isObject)(q)||`Expected an object, but received: ${(0,t.print)(q)}`}})}Z.record=E;function P(){return(0,n.define)("regexp",x=>x instanceof RegExp)}Z.regexp=P;function D(x){return new e.Struct({type:"set",schema:null,*entries(M){if(x&&M instanceof Set)for(const q of M)yield[q,q,x]},coercer(M){return M instanceof Set?new Set(M):M},validator(M){return M instanceof Set||`Expected a \`Set\` object, but received: ${(0,t.print)(M)}`}})}Z.set=D;function k(){return(0,n.define)("string",x=>typeof x=="string"||`Expected a string, but received: ${(0,t.print)(x)}`)}Z.string=k;function B(x){const M=$();return new e.Struct({type:"tuple",schema:null,*entries(q){if(Array.isArray(q)){const z=Math.max(x.length,q.length);for(let L=0;L<z;L++)yield[L,q[L],x[L]||M]}},validator(q){return Array.isArray(q)||`Expected an array, but received: ${(0,t.print)(q)}`}})}Z.tuple=B;function p(x){const M=Object.keys(x);return new e.Struct({type:"type",schema:x,*entries(q){if((0,t.isObject)(q))for(const z of M)yield[z,q[z],x[z]]},validator(q){return(0,t.isObject)(q)||`Expected an object, but received: ${(0,t.print)(q)}`},coercer(q){return(0,t.isObject)(q)?{...q}:q}})}Z.type=p;function S(x){const M=x.map(q=>q.type).join(" | ");return new e.Struct({type:"union",schema:null,coercer(q){for(const z of x){const[L,H]=z.validate(q,{coerce:!0});if(!L)return H}return q},validator(q,z){const L=[];for(const H of x){const[...b]=(0,t.run)(q,H,z),[g]=b;if(!(g!=null&&g[0]))return[];for(const[I]of b)I&&L.push(I)}return[`Expected the value to satisfy a union of \`${M}\`, but received: ${(0,t.print)(q)}`,...L]}})}Z.union=S;function Y(){return(0,n.define)("unknown",()=>!0)}return Z.unknown=Y,Z}var Cs;function nu(){if(Cs)return Fe;Cs=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.trimmed=Fe.defaulted=Fe.coerce=void 0;const e=_t(),t=Ft(),n=Xn();function i(c,a,o){return new e.Struct({...c,coercer:(f,r)=>(0,e.is)(f,a)?c.coercer(o(f,r),r):c.coercer(f,r)})}Fe.coerce=i;function d(c,a,o={}){return i(c,(0,n.unknown)(),f=>{const r=typeof a=="function"?a():a;if(f===void 0)return r;if(!o.strict&&(0,t.isPlainObject)(f)&&(0,t.isPlainObject)(r)){const s={...f};let l=!1;for(const h in r)s[h]===void 0&&(s[h]=r[h],l=!0);if(l)return s}return f})}Fe.defaulted=d;function u(c){return i(c,(0,n.string)(),a=>a.trim())}return Fe.trimmed=u,Fe}var Ee={},js;function su(){if(js)return Ee;js=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.refine=Ee.size=Ee.pattern=Ee.nonempty=Ee.min=Ee.max=Ee.empty=void 0;const e=_t(),t=Ft();function n(r){return f(r,"empty",s=>{const l=i(s);return l===0||`Expected an empty ${r.type} but received one with a size of \`${l}\``})}Ee.empty=n;function i(r){return r instanceof Map||r instanceof Set?r.size:r.length}function d(r,s,l={}){const{exclusive:h}=l;return f(r,"max",w=>h?w<s:w<=s||`Expected a ${r.type} less than ${h?"":"or equal to "}${s} but received \`${w}\``)}Ee.max=d;function u(r,s,l={}){const{exclusive:h}=l;return f(r,"min",w=>h?w>s:w>=s||`Expected a ${r.type} greater than ${h?"":"or equal to "}${s} but received \`${w}\``)}Ee.min=u;function c(r){return f(r,"nonempty",s=>i(s)>0||`Expected a nonempty ${r.type} but received an empty one`)}Ee.nonempty=c;function a(r,s){return f(r,"pattern",l=>s.test(l)||`Expected a ${r.type} matching \`/${s.source}/\` but received "${l}"`)}Ee.pattern=a;function o(r,s,l=s){const h=`Expected a ${r.type}`,w=s===l?`of \`${s}\``:`between \`${s}\` and \`${l}\``;return f(r,"size",$=>{if(typeof $=="number"||$ instanceof Date)return s<=$&&$<=l||`${h} ${w} but received \`${$}\``;if($ instanceof Map||$ instanceof Set){const{size:O}=$;return s<=O&&O<=l||`${h} with a size ${w} but received one with a size of \`${O}\``}const{length:U}=$;return s<=U&&U<=l||`${h} with a length ${w} but received one with a length of \`${U}\``})}Ee.size=o;function f(r,s,l){return new e.Struct({...r,*refiner(h,w){yield*r.refiner(h,w);const $=l(h,w),U=(0,t.toFailures)($,w,r,h);for(const O of U)yield{...O,refinement:s}}})}return Ee.refine=f,Ee}var Ps;function qe(){return Ps||(Ps=1,(function(e){var t=tt&&tt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=tt&&tt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(da(),e),n(_t(),e),n(nu(),e),n(su(),e),n(Xn(),e),n(fa(),e)})(tt)),tt}var _e={};class Wn extends Error{constructor(t,{cause:n}={}){super(t),this.name=Wn.name,n&&(this.cause=n),this.message=t}}const iu=Object.freeze(Object.defineProperty({__proto__:null,ErrorWithCause:Wn},Symbol.toStringTag,{value:"Module"})),ou=ta(iu),au=(e,t)=>{if(!e||!t||!(e instanceof Error)||!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof t)return i;i=Vt(i)}},Vt=e=>{if(!(!e||typeof e!="object"||!("cause"in e)))if(typeof e.cause=="function"){const t=e.cause();return t instanceof Error?t:void 0}else return e.cause instanceof Error?e.cause:void 0},ha=(e,t)=>{if(!(e instanceof Error))return"";const n=e.stack||"";if(t.has(e))return n+`
|
|
1
|
+
import{f as ea,u as ta,r as ee,j as m,a as Qa}from"./react-BT1DRxg0.js";import{a3 as ec,g as tc,f as Rt,k as ir,m as or,d as R,e as F,de as Jn,A as ra,c as C,I as Me,dx as Fn,dy as jt,z as ps,K as gs,dz as na,ak as qt,E as Vn,n as sa,bC as ia,B as vt,v as Nt,x as rc,y as nc,be as ms,O as sc,dA as ic,S as ar,R as cr,Q as ys,G as oc,P as ac,dB as cc,dC as uc}from"./index-fVfrsq3-.js";import{b as lc}from"./builder-BW_XFxl3.js";import{B as bs,d as zn}from"./dcl-schemas-DG9Rrz5z.js";import{r as dc}from"./sha3-BDxbouvg.js";import{r as fc}from"./browser-ClZ-a39n.js";import{p as hc}from"./sentry-DAGaybiy.js";import{r as pc}from"./authorizations-YF2LYI5X.js";import{o as gc,O as ws}from"./buy-DrunLbTj.js";import{C as oa,a as $t,h as aa,r as mc,k as yc}from"./ethers-CJMNYBDD.js";import{i as bc}from"./wallet-CE_PuHwW.js";import{f as ca}from"./errors-BNoZdkky.js";import{E as Ht}from"./ErrorNotice-ClgCsoly.js";import{L as wc}from"./LoadMore-Dr8VkfDh.js";import{u as Ec,R as ur,i as Sc,j as vc,k as $c,l as lr,m as dr,n as Rc,o as Ic,p as xc,q as _c,r as Ac,s as Es,t as Ss,v as vs,a as Tc,b as Cc,c as jc,D as Pc,d as Oc,C as kc,e as Bc,f as Lc,g as Nc,M as Mc,h as qc}from"./browseLayout.styles-BcdBGvBJ.js";import{u as Hc}from"./useInfiniteGrid-xjb6zl5n.js";import{n as ua,S as $s}from"./categories-yaclHH8q.js";import{u as Uc,s as Dc}from"./sales-empty-NUQXvOkl.js";import{C as Fc,R as Vc,B as zc,T as Gc,A as Jc,a as Xc,b as Wc,D as Kc,M as Yc}from"./ManaPricingBanner.styles-BoYJiExd.js";import{C as Zc}from"./field.styles-BEV0a4Z8.js";import{c as Qc,i as eu}from"./items-empty-BW_AkfMw.js";import{m as tu}from"./mana-matic-CEqvSwrJ.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Bkp77jP5.js";import"./skeleton.styles-C8iLuc4D.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]="101fef8f-44b6-4e91-9fa1-c6892cb9a7dd",e._sentryDebugIdIdentifier="sentry-dbid-101fef8f-44b6-4e91-9fa1-c6892cb9a7dd")}catch{}})();var fr={},Ze={},Qe={},hr={},et={},Te={},tt={},lt={},Rs;function la(){if(Rs)return lt;Rs=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.StructError=void 0;class e extends TypeError{constructor(n,i){let d;const{message:u,explanation:c,...a}=n,{path:o}=n,f=o.length===0?u:`At path: ${o.join(".")} -- ${u}`;super(c??f),c!=null&&(this.cause=f),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>d??(d=[n,...i()])}}return lt.StructError=e,lt}var be={},we={},Is;function Ft(){if(Is)return we;Is=1,Object.defineProperty(we,"__esModule",{value:!0}),we.run=we.toFailures=we.toFailure=we.shiftIterator=we.print=we.isPlainObject=we.isObject=void 0;function e(o){return t(o)&&typeof o[Symbol.iterator]=="function"}function t(o){return typeof o=="object"&&o!==null}we.isObject=t;function n(o){if(Object.prototype.toString.call(o)!=="[object Object]")return!1;const f=Object.getPrototypeOf(o);return f===null||f===Object.prototype}we.isPlainObject=n;function i(o){return typeof o=="symbol"?o.toString():typeof o=="string"?JSON.stringify(o):`${o}`}we.print=i;function d(o){const{done:f,value:r}=o.next();return f?void 0:r}we.shiftIterator=d;function u(o,f,r,s){if(o===!0)return;o===!1?o={}:typeof o=="string"&&(o={message:o});const{path:l,branch:h}=f,{type:w}=r,{refinement:$,message:U=`Expected a value of type \`${w}\`${$?` with refinement \`${$}\``:""}, but received: \`${i(s)}\``}=o;return{value:s,type:w,refinement:$,key:l[l.length-1],path:l,branch:h,...o,message:U}}we.toFailure=u;function*c(o,f,r,s){e(o)||(o=[o]);for(const l of o){const h=u(l,f,r,s);h&&(yield h)}}we.toFailures=c;function*a(o,f,r={}){const{path:s=[],branch:l=[o],coerce:h=!1,mask:w=!1}=r,$={path:s,branch:l};if(h&&(o=f.coercer(o,$),w&&f.type!=="type"&&t(f.schema)&&t(o)&&!Array.isArray(o)))for(const O in o)f.schema[O]===void 0&&delete o[O];let U="valid";for(const O of f.validator(o,$))O.explanation=r.message,U="not_valid",yield[O,void 0];for(let[O,J,K]of f.entries(o,$)){const x=a(J,K,{path:O===void 0?s:[...s,O],branch:O===void 0?l:[...l,J],coerce:h,mask:w,message:r.message});for(const E of x)E[0]?(U=E[0].refinement===null||E[0].refinement===void 0?"not_valid":"not_refined",yield[E[0],void 0]):h&&(J=E[1],O===void 0?o=J:o instanceof Map?o.set(O,J):o instanceof Set?o.add(J):t(o)&&(J!==void 0||O in o)&&(o[O]=J))}if(U!=="not_valid")for(const O of f.refiner(o,$))O.explanation=r.message,U="not_refined",yield[O,void 0];U==="valid"&&(yield[void 0,o])}return we.run=a,we}var xs;function It(){if(xs)return be;xs=1,Object.defineProperty(be,"__esModule",{value:!0}),be.validate=be.is=be.mask=be.create=be.assert=be.ExactOptionalStruct=be.Struct=void 0;const e=la(),t=Ft();class n{constructor(s){const{type:l,schema:h,validator:w,refiner:$,coercer:U=J=>J,entries:O=function*(){}}=s;this.type=l,this.schema=h,this.entries=O,this.coercer=U,w?this.validator=(J,K)=>{const x=w(J,K);return(0,t.toFailures)(x,K,this,J)}:this.validator=()=>[],$?this.refiner=(J,K)=>{const x=$(J,K);return(0,t.toFailures)(x,K,this,J)}:this.refiner=()=>[]}assert(s,l){return u(s,this,l)}create(s,l){return c(s,this,l)}is(s){return o(s,this)}mask(s,l){return a(s,this,l)}validate(s,l={}){return f(s,this,l)}}be.Struct=n;const i="EXACT_OPTIONAL";class d extends n{constructor(s){super({...s,type:`exact optional ${s.type}`}),this.brand=i}static isExactOptional(s){return(0,t.isObject)(s)&&"brand"in s&&s.brand===i}}be.ExactOptionalStruct=d;function u(r,s,l){const h=f(r,s,{message:l});if(h[0])throw h[0]}be.assert=u;function c(r,s,l){const h=f(r,s,{coerce:!0,message:l});if(h[0])throw h[0];return h[1]}be.create=c;function a(r,s,l){const h=f(r,s,{coerce:!0,mask:!0,message:l});if(h[0])throw h[0];return h[1]}be.mask=a;function o(r,s){return!f(r,s)[0]}be.is=o;function f(r,s,l={}){const h=(0,t.run)(r,s,l),w=(0,t.shiftIterator)(h);return w[0]?[new e.StructError(w[0],function*(){for(const O of h)O[0]&&(yield O[0])}),void 0]:[void 0,w[1]]}return be.validate=f,be}var Fe={},Z={},he={},_s;function da(){if(_s)return he;_s=1,Object.defineProperty(he,"__esModule",{value:!0}),he.pick=he.partial=he.omit=he.lazy=he.dynamic=he.deprecated=he.define=he.assign=void 0;const e=It(),t=Xn();function n(...r){var w;const s=((w=r[0])==null?void 0:w.type)==="type",l=r.map(({schema:$})=>$),h=Object.assign({},...l);return s?(0,t.type)(h):(0,t.object)(h)}he.assign=n;function i(r,s){return new e.Struct({type:r,schema:null,validator:s})}he.define=i;function d(r,s){return new e.Struct({...r,refiner:(l,h)=>l===void 0||r.refiner(l,h),validator(l,h){return l===void 0?!0:(s(l,h),r.validator(l,h))}})}he.deprecated=d;function u(r){return new e.Struct({type:"dynamic",schema:null,*entries(s,l){yield*r(s,l).entries(s,l)},validator(s,l){return r(s,l).validator(s,l)},coercer(s,l){return r(s,l).coercer(s,l)},refiner(s,l){return r(s,l).refiner(s,l)}})}he.dynamic=u;function c(r){let s;return new e.Struct({type:"lazy",schema:null,*entries(l,h){s??(s=r()),yield*s.entries(l,h)},validator(l,h){return s??(s=r()),s.validator(l,h)},coercer(l,h){return s??(s=r()),s.coercer(l,h)},refiner(l,h){return s??(s=r()),s.refiner(l,h)}})}he.lazy=c;function a(r,s){const{schema:l}=r,h={...l};for(const w of s)delete h[w];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}he.omit=a;function o(r){const s=r instanceof e.Struct,l=s?{...r.schema}:{...r};for(const h in l)l[h]=(0,t.optional)(l[h]);return s&&r.type==="type"?(0,t.type)(l):(0,t.object)(l)}he.partial=o;function f(r,s){const{schema:l}=r,h={};for(const w of s)h[w]=l[w];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}return he.pick=f,he}var As;function Xn(){if(As)return Z;As=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.unknown=Z.union=Z.type=Z.tuple=Z.string=Z.set=Z.regexp=Z.record=Z.exactOptional=Z.optional=Z.object=Z.number=Z.nullable=Z.never=Z.map=Z.literal=Z.intersection=Z.integer=Z.instance=Z.func=Z.enums=Z.date=Z.boolean=Z.bigint=Z.array=Z.any=void 0;const e=It(),t=Ft(),n=da();function i(){return(0,n.define)("any",()=>!0)}Z.any=i;function d(_){return new e.Struct({type:"array",schema:_,*entries(M){if(_&&Array.isArray(M))for(const[q,z]of M.entries())yield[q,z,_]},coercer(M){return Array.isArray(M)?M.slice():M},validator(M){return Array.isArray(M)||`Expected an array value, but received: ${(0,t.print)(M)}`}})}Z.array=d;function u(){return(0,n.define)("bigint",_=>typeof _=="bigint")}Z.bigint=u;function c(){return(0,n.define)("boolean",_=>typeof _=="boolean")}Z.boolean=c;function a(){return(0,n.define)("date",_=>_ instanceof Date&&!isNaN(_.getTime())||`Expected a valid \`Date\` object, but received: ${(0,t.print)(_)}`)}Z.date=a;function o(_){const M={},q=_.map(z=>(0,t.print)(z)).join();for(const z of _)M[z]=z;return new e.Struct({type:"enums",schema:M,validator(z){return _.includes(z)||`Expected one of \`${q}\`, but received: ${(0,t.print)(z)}`}})}Z.enums=o;function f(){return(0,n.define)("func",_=>typeof _=="function"||`Expected a function, but received: ${(0,t.print)(_)}`)}Z.func=f;function r(_){return(0,n.define)("instance",M=>M instanceof _||`Expected a \`${_.name}\` instance, but received: ${(0,t.print)(M)}`)}Z.instance=r;function s(){return(0,n.define)("integer",_=>typeof _=="number"&&!isNaN(_)&&Number.isInteger(_)||`Expected an integer, but received: ${(0,t.print)(_)}`)}Z.integer=s;function l(_){return new e.Struct({type:"intersection",schema:null,*entries(M,q){for(const{entries:z}of _)yield*z(M,q)},*validator(M,q){for(const{validator:z}of _)yield*z(M,q)},*refiner(M,q){for(const{refiner:z}of _)yield*z(M,q)}})}Z.intersection=l;function h(_){const M=(0,t.print)(_),q=typeof _;return new e.Struct({type:"literal",schema:q==="string"||q==="number"||q==="boolean"?_:null,validator(z){return z===_||`Expected the literal \`${M}\`, but received: ${(0,t.print)(z)}`}})}Z.literal=h;function w(_,M){return new e.Struct({type:"map",schema:null,*entries(q){if(_&&M&&q instanceof Map)for(const[z,L]of q.entries())yield[z,z,_],yield[z,L,M]},coercer(q){return q instanceof Map?new Map(q):q},validator(q){return q instanceof Map||`Expected a \`Map\` object, but received: ${(0,t.print)(q)}`}})}Z.map=w;function $(){return(0,n.define)("never",()=>!1)}Z.never=$;function U(_){return new e.Struct({..._,validator:(M,q)=>M===null||_.validator(M,q),refiner:(M,q)=>M===null||_.refiner(M,q)})}Z.nullable=U;function O(){return(0,n.define)("number",_=>typeof _=="number"&&!isNaN(_)||`Expected a number, but received: ${(0,t.print)(_)}`)}Z.number=O;function J(_){const M=_?Object.keys(_):[],q=$();return new e.Struct({type:"object",schema:_??null,*entries(z){if(_&&(0,t.isObject)(z)){const L=new Set(Object.keys(z));for(const H of M){L.delete(H);const b=_[H];e.ExactOptionalStruct.isExactOptional(b)&&!Object.prototype.hasOwnProperty.call(z,H)||(yield[H,z[H],_[H]])}for(const H of L)yield[H,z[H],q]}},validator(z){return(0,t.isObject)(z)||`Expected an object, but received: ${(0,t.print)(z)}`},coercer(z){return(0,t.isObject)(z)?{...z}:z}})}Z.object=J;function K(_){return new e.Struct({..._,validator:(M,q)=>M===void 0||_.validator(M,q),refiner:(M,q)=>M===void 0||_.refiner(M,q)})}Z.optional=K;function x(_){return new e.ExactOptionalStruct(_)}Z.exactOptional=x;function E(_,M){return new e.Struct({type:"record",schema:null,*entries(q){if((0,t.isObject)(q))for(const z in q){const L=q[z];yield[z,z,_],yield[z,L,M]}},validator(q){return(0,t.isObject)(q)||`Expected an object, but received: ${(0,t.print)(q)}`}})}Z.record=E;function P(){return(0,n.define)("regexp",_=>_ instanceof RegExp)}Z.regexp=P;function D(_){return new e.Struct({type:"set",schema:null,*entries(M){if(_&&M instanceof Set)for(const q of M)yield[q,q,_]},coercer(M){return M instanceof Set?new Set(M):M},validator(M){return M instanceof Set||`Expected a \`Set\` object, but received: ${(0,t.print)(M)}`}})}Z.set=D;function k(){return(0,n.define)("string",_=>typeof _=="string"||`Expected a string, but received: ${(0,t.print)(_)}`)}Z.string=k;function B(_){const M=$();return new e.Struct({type:"tuple",schema:null,*entries(q){if(Array.isArray(q)){const z=Math.max(_.length,q.length);for(let L=0;L<z;L++)yield[L,q[L],_[L]||M]}},validator(q){return Array.isArray(q)||`Expected an array, but received: ${(0,t.print)(q)}`}})}Z.tuple=B;function p(_){const M=Object.keys(_);return new e.Struct({type:"type",schema:_,*entries(q){if((0,t.isObject)(q))for(const z of M)yield[z,q[z],_[z]]},validator(q){return(0,t.isObject)(q)||`Expected an object, but received: ${(0,t.print)(q)}`},coercer(q){return(0,t.isObject)(q)?{...q}:q}})}Z.type=p;function S(_){const M=_.map(q=>q.type).join(" | ");return new e.Struct({type:"union",schema:null,coercer(q){for(const z of _){const[L,H]=z.validate(q,{coerce:!0});if(!L)return H}return q},validator(q,z){const L=[];for(const H of _){const[...b]=(0,t.run)(q,H,z),[g]=b;if(!(g!=null&&g[0]))return[];for(const[I]of b)I&&L.push(I)}return[`Expected the value to satisfy a union of \`${M}\`, but received: ${(0,t.print)(q)}`,...L]}})}Z.union=S;function Y(){return(0,n.define)("unknown",()=>!0)}return Z.unknown=Y,Z}var Ts;function ru(){if(Ts)return Fe;Ts=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.trimmed=Fe.defaulted=Fe.coerce=void 0;const e=It(),t=Ft(),n=Xn();function i(c,a,o){return new e.Struct({...c,coercer:(f,r)=>(0,e.is)(f,a)?c.coercer(o(f,r),r):c.coercer(f,r)})}Fe.coerce=i;function d(c,a,o={}){return i(c,(0,n.unknown)(),f=>{const r=typeof a=="function"?a():a;if(f===void 0)return r;if(!o.strict&&(0,t.isPlainObject)(f)&&(0,t.isPlainObject)(r)){const s={...f};let l=!1;for(const h in r)s[h]===void 0&&(s[h]=r[h],l=!0);if(l)return s}return f})}Fe.defaulted=d;function u(c){return i(c,(0,n.string)(),a=>a.trim())}return Fe.trimmed=u,Fe}var Ee={},Cs;function nu(){if(Cs)return Ee;Cs=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.refine=Ee.size=Ee.pattern=Ee.nonempty=Ee.min=Ee.max=Ee.empty=void 0;const e=It(),t=Ft();function n(r){return f(r,"empty",s=>{const l=i(s);return l===0||`Expected an empty ${r.type} but received one with a size of \`${l}\``})}Ee.empty=n;function i(r){return r instanceof Map||r instanceof Set?r.size:r.length}function d(r,s,l={}){const{exclusive:h}=l;return f(r,"max",w=>h?w<s:w<=s||`Expected a ${r.type} less than ${h?"":"or equal to "}${s} but received \`${w}\``)}Ee.max=d;function u(r,s,l={}){const{exclusive:h}=l;return f(r,"min",w=>h?w>s:w>=s||`Expected a ${r.type} greater than ${h?"":"or equal to "}${s} but received \`${w}\``)}Ee.min=u;function c(r){return f(r,"nonempty",s=>i(s)>0||`Expected a nonempty ${r.type} but received an empty one`)}Ee.nonempty=c;function a(r,s){return f(r,"pattern",l=>s.test(l)||`Expected a ${r.type} matching \`/${s.source}/\` but received "${l}"`)}Ee.pattern=a;function o(r,s,l=s){const h=`Expected a ${r.type}`,w=s===l?`of \`${s}\``:`between \`${s}\` and \`${l}\``;return f(r,"size",$=>{if(typeof $=="number"||$ instanceof Date)return s<=$&&$<=l||`${h} ${w} but received \`${$}\``;if($ instanceof Map||$ instanceof Set){const{size:O}=$;return s<=O&&O<=l||`${h} with a size ${w} but received one with a size of \`${O}\``}const{length:U}=$;return s<=U&&U<=l||`${h} with a length ${w} but received one with a length of \`${U}\``})}Ee.size=o;function f(r,s,l){return new e.Struct({...r,*refiner(h,w){yield*r.refiner(h,w);const $=l(h,w),U=(0,t.toFailures)($,w,r,h);for(const O of U)yield{...O,refinement:s}}})}return Ee.refine=f,Ee}var js;function qe(){return js||(js=1,(function(e){var t=tt&&tt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=tt&&tt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(la(),e),n(It(),e),n(ru(),e),n(nu(),e),n(Xn(),e),n(da(),e)})(tt)),tt}var xe={};class Wn extends Error{constructor(t,{cause:n}={}){super(t),this.name=Wn.name,n&&(this.cause=n),this.message=t}}const su=Object.freeze(Object.defineProperty({__proto__:null,ErrorWithCause:Wn},Symbol.toStringTag,{value:"Module"})),iu=ea(su),ou=(e,t)=>{if(!e||!t||!(e instanceof Error)||!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof t)return i;i=Vt(i)}},Vt=e=>{if(!(!e||typeof e!="object"||!("cause"in e)))if(typeof e.cause=="function"){const t=e.cause();return t instanceof Error?t:void 0}else return e.cause instanceof Error?e.cause:void 0},fa=(e,t)=>{if(!(e instanceof Error))return"";const n=e.stack||"";if(t.has(e))return n+`
|
|
2
2
|
causes have become circular...`;const i=Vt(e);return i?(t.add(e),n+`
|
|
3
|
-
caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Error))return"";const i=n?"":e.message||"";if(t.has(e))return i+": ...";const d=Vt(e);if(d){t.add(e);const u="cause"in e&&typeof e.cause=="function";return i+(u?"":": ")+pa(d,t,u)}else return i},uu=e=>pa(e,new Set),lu=Object.freeze(Object.defineProperty({__proto__:null,findCauseByReference:au,getErrorCause:Vt,messageWithCauses:uu,stackWithCauses:cu},Symbol.toStringTag,{value:"Module"})),du=ta(lu);var pr,Os;function fu(){if(Os)return pr;Os=1;const{ErrorWithCause:e}=ou,{findCauseByReference:t,getErrorCause:n,messageWithCauses:i,stackWithCauses:d}=du;return pr={ErrorWithCause:e,findCauseByReference:t,getErrorCause:n,stackWithCauses:d,messageWithCauses:i},pr}var gr={},ks;function Kn(){return ks||(ks=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(r){return Array.isArray(r)&&r.length>0}e.isNonEmptyArray=t;function n(r){return r==null}e.isNullOrUndefined=n;function i(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}e.isObject=i;const d=(r,s)=>Object.hasOwnProperty.call(r,s);e.hasProperty=d;function u(r){return Object.getOwnPropertyNames(r)}e.getKnownPropertyNames=u,(function(r){r[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function c(r){if(typeof r!="object"||r===null)return!1;try{let s=r;for(;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(r)===s}catch{return!1}}e.isPlainObject=c;function a(r){return r.charCodeAt(0)<=127}e.isASCII=a;function o(r){return r.split("").reduce((l,h)=>a(h)?l+1:l+2,0)+(r.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length}e.calculateStringSize=o;function f(r){return r.toString().length}e.calculateNumberSize=f})(gr)),gr}var Bs;function ga(){if(Bs)return _e;Bs=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.wrapError=_e.getErrorMessage=_e.isErrorWithStack=_e.isErrorWithMessage=_e.isErrorWithCode=void 0;const e=fu(),t=Kn();function n(o){return o instanceof Error||(0,t.isObject)(o)&&o.constructor.name==="Error"}function i(o){return typeof o=="object"&&o!==null&&"code"in o}_e.isErrorWithCode=i;function d(o){return typeof o=="object"&&o!==null&&"message"in o}_e.isErrorWithMessage=d;function u(o){return typeof o=="object"&&o!==null&&"stack"in o}_e.isErrorWithStack=u;function c(o){return d(o)&&typeof o.message=="string"?o.message:(0,t.isNullOrUndefined)(o)?"":String(o)}_e.getErrorMessage=c;function a(o,f){if(n(o)){let r;return Error.length===2?r=new Error(f,{cause:o}):r=new e.ErrorWithCause(f,{cause:o}),i(o)&&(r.code=o.code),r}return f.length>0?new Error(`${String(o)}: ${f}`):new Error(String(o))}return _e.wrapError=a,_e}var Ls;function Ke(){if(Ls)return Te;Ls=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.assertExhaustive=Te.assertStruct=Te.assert=Te.AssertionError=void 0;const e=qe(),t=ga();function n(f){var r,s;return typeof((s=(r=f==null?void 0:f.prototype)==null?void 0:r.constructor)==null?void 0:s.name)=="string"}function i(f){return(0,t.getErrorMessage)(f).replace(/\.$/u,"")}function d(f,r){return n(f)?new f({message:r}):f({message:r})}class u extends Error{constructor(r){super(r.message),this.code="ERR_ASSERTION"}}Te.AssertionError=u;function c(f,r="Assertion failed.",s=u){if(!f)throw r instanceof Error?r:d(s,r)}Te.assert=c;function a(f,r,s="Assertion failed",l=u){try{(0,e.assert)(f,r)}catch(h){throw d(l,`${s}: ${i(h)}.`)}}Te.assertStruct=a;function o(f){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Te.assertExhaustive=o,Te}var dt={},Ns;function ma(){if(Ns)return dt;Ns=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.base64=void 0;const e=qe(),t=Ke(),n=(i,d={})=>{const u=d.paddingRequired??!1,c=d.characterSet??"base64";let a;c==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(c==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let o;return u?o=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):o=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,e.pattern)(i,o)};return dt.base64=n,dt}var se={},mr={},Ms;function hu(){return Ms||(Ms=1,(function(e){/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0;function t(y){return y instanceof Uint8Array||ArrayBuffer.isView(y)&&y.constructor.name==="Uint8Array"}function n(y,...v){if(!t(y))throw new Error("Uint8Array expected");if(v.length>0&&!v.includes(y.length))throw new Error("Uint8Array expected of length "+v+", got length="+y.length)}function i(y,v){return Array.isArray(v)?v.length===0?!0:y?v.every(A=>typeof A=="string"):v.every(A=>Number.isSafeInteger(A)):!1}function d(y){if(typeof y!="function")throw new Error("function expected");return!0}function u(y,v){if(typeof v!="string")throw new Error(`${y}: string expected`);return!0}function c(y){if(!Number.isSafeInteger(y))throw new Error(`invalid integer: ${y}`)}function a(y){if(!Array.isArray(y))throw new Error("array expected")}function o(y,v){if(!i(!0,v))throw new Error(`${y}: array of strings expected`)}function f(y,v){if(!i(!1,v))throw new Error(`${y}: array of numbers expected`)}function r(...y){const v=W=>W,A=(W,oe)=>ne=>W(oe(ne)),X=y.map(W=>W.encode).reduceRight(A,v),V=y.map(W=>W.decode).reduce(A,v);return{encode:X,decode:V}}function s(y){const v=typeof y=="string"?y.split(""):y,A=v.length;o("alphabet",v);const X=new Map(v.map((V,W)=>[V,W]));return{encode:V=>(a(V),V.map(W=>{if(!Number.isSafeInteger(W)||W<0||W>=A)throw new Error(`alphabet.encode: digit index outside alphabet "${W}". Allowed: ${y}`);return v[W]})),decode:V=>(a(V),V.map(W=>{u("alphabet.decode",W);const oe=X.get(W);if(oe===void 0)throw new Error(`Unknown letter: "${W}". Allowed: ${y}`);return oe}))}}function l(y=""){return u("join",y),{encode:v=>(o("join.decode",v),v.join(y)),decode:v=>(u("join.decode",v),v.split(y))}}function h(y,v="="){return c(y),u("padding",v),{encode(A){for(o("padding.encode",A);A.length*y%8;)A.push(v);return A},decode(A){o("padding.decode",A);let X=A.length;if(X*y%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;X>0&&A[X-1]===v;X--)if((X-1)*y%8===0)throw new Error("padding: invalid, string has too much padding");return A.slice(0,X)}}}function w(y){return d(y),{encode:v=>v,decode:v=>y(v)}}function $(y,v,A){if(v<2)throw new Error(`convertRadix: invalid from=${v}, base cannot be less than 2`);if(A<2)throw new Error(`convertRadix: invalid to=${A}, base cannot be less than 2`);if(a(y),!y.length)return[];let X=0;const V=[],W=Array.from(y,ne=>{if(c(ne),ne<0||ne>=v)throw new Error(`invalid integer: ${ne}`);return ne}),oe=W.length;for(;;){let ne=0,G=!0;for(let ie=X;ie<oe;ie++){const ge=W[ie],ae=v*ne,le=ae+ge;if(!Number.isSafeInteger(le)||ae/v!==ne||le-ge!==ae)throw new Error("convertRadix: carry overflow");const me=le/A;ne=le%A;const fe=Math.floor(me);if(W[ie]=fe,!Number.isSafeInteger(fe)||fe*A+ne!==le)throw new Error("convertRadix: carry overflow");if(G)fe?G=!1:X=ie;else continue}if(V.push(ne),G)break}for(let ne=0;ne<y.length-1&&y[ne]===0;ne++)V.push(0);return V.reverse()}const U=(y,v)=>v===0?y:U(v,y%v),O=(y,v)=>y+(v-U(y,v)),J=(()=>{let y=[];for(let v=0;v<40;v++)y.push(2**v);return y})();function K(y,v,A,X){if(a(y),v<=0||v>32)throw new Error(`convertRadix2: wrong from=${v}`);if(A<=0||A>32)throw new Error(`convertRadix2: wrong to=${A}`);if(O(v,A)>32)throw new Error(`convertRadix2: carry overflow from=${v} to=${A} carryBits=${O(v,A)}`);let V=0,W=0;const oe=J[v],ne=J[A]-1,G=[];for(const ie of y){if(c(ie),ie>=oe)throw new Error(`convertRadix2: invalid data word=${ie} from=${v}`);if(V=V<<v|ie,W+v>32)throw new Error(`convertRadix2: carry overflow pos=${W} from=${v}`);for(W+=v;W>=A;W-=A)G.push((V>>W-A&ne)>>>0);const ge=J[W];if(ge===void 0)throw new Error("invalid carry");V&=ge-1}if(V=V<<A-W&ne,!X&&W>=v)throw new Error("Excess padding");if(!X&&V>0)throw new Error(`Non-zero padding: ${V}`);return X&&W>0&&G.push(V>>>0),G}function _(y){c(y);const v=2**8;return{encode:A=>{if(!t(A))throw new Error("radix.encode input should be Uint8Array");return $(Array.from(A),v,y)},decode:A=>(f("radix.decode",A),Uint8Array.from($(A,y,v)))}}function E(y,v=!1){if(c(y),y<=0||y>32)throw new Error("radix2: bits should be in (0..32]");if(O(8,y)>32||O(y,8)>32)throw new Error("radix2: carry overflow");return{encode:A=>{if(!t(A))throw new Error("radix2.encode input should be Uint8Array");return K(Array.from(A),8,y,!v)},decode:A=>(f("radix2.decode",A),Uint8Array.from(K(A,y,8,v)))}}function P(y){return d(y),function(...v){try{return y.apply(null,v)}catch{}}}function D(y,v){return c(y),d(v),{encode(A){if(!t(A))throw new Error("checksum.encode: input should be Uint8Array");const X=v(A).slice(0,y),V=new Uint8Array(A.length+y);return V.set(A),V.set(X,A.length),V},decode(A){if(!t(A))throw new Error("checksum.decode: input should be Uint8Array");const X=A.slice(0,-y),V=A.slice(-y),W=v(X).slice(0,y);for(let oe=0;oe<y;oe++)if(W[oe]!==V[oe])throw new Error("Invalid checksum");return X}}}e.utils={alphabet:s,chain:r,checksum:D,convertRadix:$,convertRadix2:K,radix:_,radix2:E,join:l,padding:h},e.base16=r(E(4),s("0123456789ABCDEF"),l("")),e.base32=r(E(5),s("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h(5),l("")),e.base32nopad=r(E(5),s("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),l("")),e.base32hex=r(E(5),s("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h(5),l("")),e.base32hexnopad=r(E(5),s("0123456789ABCDEFGHIJKLMNOPQRSTUV"),l("")),e.base32crockford=r(E(5),s("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),l(""),w(y=>y.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const k=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",B=(y,v)=>{u("base64",y);const A=v?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,X=v?"base64url":"base64";if(y.length>0&&!A.test(y))throw new Error("invalid base64");return Uint8Array.fromBase64(y,{alphabet:X,lastChunkHandling:"strict"})};e.base64=k?{encode(y){return n(y),y.toBase64()},decode(y){return B(y,!1)}}:r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h(6),l("")),e.base64nopad=r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),l("")),e.base64url=k?{encode(y){return n(y),y.toBase64({alphabet:"base64url"})},decode(y){return B(y,!0)}}:r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(6),l("")),e.base64urlnopad=r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),l(""));const p=y=>r(_(58),s(y),l(""));e.base58=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=p("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=p("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const S=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(y){let v="";for(let A=0;A<y.length;A+=8){const X=y.subarray(A,A+8);v+=e.base58.encode(X).padStart(S[X.length],"1")}return v},decode(y){let v=[];for(let A=0;A<y.length;A+=11){const X=y.slice(A,A+11),V=S.indexOf(X.length),W=e.base58.decode(X);for(let oe=0;oe<W.length-V;oe++)if(W[oe]!==0)throw new Error("base58xmr: wrong padding");v=v.concat(Array.from(W.slice(W.length-V)))}return Uint8Array.from(v)}};const Y=y=>r(D(4,v=>y(y(v))),e.base58);e.createBase58check=Y,e.base58check=e.createBase58check;const x=r(s("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),l("")),M=[996825010,642813549,513874426,1027748829,705979059];function q(y){const v=y>>25;let A=(y&33554431)<<5;for(let X=0;X<M.length;X++)(v>>X&1)===1&&(A^=M[X]);return A}function z(y,v,A=1){const X=y.length;let V=1;for(let W=0;W<X;W++){const oe=y.charCodeAt(W);if(oe<33||oe>126)throw new Error(`Invalid prefix (${y})`);V=q(V)^oe>>5}V=q(V);for(let W=0;W<X;W++)V=q(V)^y.charCodeAt(W)&31;for(let W of v)V=q(V)^W;for(let W=0;W<6;W++)V=q(V);return V^=A,x.encode(K([V%J[30]],30,5,!1))}function L(y){const v=y==="bech32"?1:734539939,A=E(5),X=A.decode,V=A.encode,W=P(X);function oe(ae,le,me=90){u("bech32.encode prefix",ae),t(le)&&(le=Array.from(le)),f("bech32.encode",le);const fe=ae.length;if(fe===0)throw new TypeError(`Invalid prefix length ${fe}`);const ye=fe+7+le.length;if(me!==!1&&ye>me)throw new TypeError(`Length ${ye} exceeds limit ${me}`);const Je=ae.toLowerCase(),Ye=z(Je,le,v);return`${Je}1${x.encode(le)}${Ye}`}function ne(ae,le=90){u("bech32.decode input",ae);const me=ae.length;if(me<8||le!==!1&&me>le)throw new TypeError(`invalid string length: ${me} (${ae}). Expected (8..${le})`);const fe=ae.toLowerCase();if(ae!==fe&&ae!==ae.toUpperCase())throw new Error("String must be lowercase or uppercase");const ye=fe.lastIndexOf("1");if(ye===0||ye===-1)throw new Error('Letter "1" must be present between prefix and data only');const Je=fe.slice(0,ye),Ye=fe.slice(ye+1);if(Ye.length<6)throw new Error("Data must be at least 6 characters long");const ot=x.decode(Ye).slice(0,-6),Ue=z(Je,ot,v);if(!Ye.endsWith(Ue))throw new Error(`Invalid checksum in ${ae}: expected "${Ue}"`);return{prefix:Je,words:ot}}const G=P(ne);function ie(ae){const{prefix:le,words:me}=ne(ae,!1);return{prefix:le,words:me,bytes:X(me)}}function ge(ae,le){return oe(ae,V(le))}return{encode:oe,decode:ne,encodeFromBytes:ge,decodeToBytes:ie,decodeUnsafe:G,fromWords:X,fromWordsUnsafe:W,toWords:V}}e.bech32=L("bech32"),e.bech32m=L("bech32m"),e.utf8={encode:y=>new TextDecoder().decode(y),decode:y=>new TextEncoder().encode(y)};const H=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b={encode(y){return n(y),y.toHex()},decode(y){return u("hex",y),Uint8Array.fromHex(y)}};e.hex=H?b:r(E(4),s("0123456789abcdef"),l(""),w(y=>{if(typeof y!="string"||y.length%2!==0)throw new TypeError(`hex.decode: expected string, got ${typeof y} with length ${y.length}`);return y.toLowerCase()}));const g={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",j=(y,v)=>{if(typeof y!="string"||!g.hasOwnProperty(y))throw new TypeError(I);if(!t(v))throw new TypeError("bytesToString() expects Uint8Array");return g[y].encode(v)};e.bytesToString=j,e.str=e.bytesToString;const N=(y,v)=>{if(!g.hasOwnProperty(y))throw new TypeError(I);if(typeof v!="string")throw new TypeError("stringToBytes() expects string");return g[y].decode(v)};e.stringToBytes=N,e.bytes=e.stringToBytes})(mr)),mr}var yr={},qs;function zt(){return qs||(qs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const t=qe(),n=fc(),i=Ke(),d=Yn();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-fA-F]{40}$/u);function u(w){return(0,t.is)(w,e.HexStruct)}e.isHexString=u;function c(w){return(0,t.is)(w,e.StrictHexStruct)}e.isStrictHexString=c;function a(w){(0,i.assert)(u(w),"Value must be a hexadecimal string.")}e.assertIsHexString=a;function o(w){(0,i.assert)(c(w),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function f(w){return(0,t.is)(w,e.HexAddressStruct)||s(w)}e.isValidHexAddress=f;function r(w){(0,i.assert)((0,t.is)(w,e.HexChecksumAddressStruct),"Invalid hex address.");const $=h(w.toLowerCase()),U=h((0,d.bytesToHex)((0,n.keccak_256)($)));return`0x${$.split("").map((O,J)=>{const K=U[J];return(0,i.assert)((0,t.is)(K,(0,t.string)()),"Hash shorter than address."),parseInt(K,16)>7?O.toUpperCase():O}).join("")}`}e.getChecksumAddress=r;function s(w){return(0,t.is)(w,e.HexChecksumAddressStruct)?r(w)===w:!1}e.isValidChecksumAddress=s;function l(w){return w.startsWith("0x")?w:w.startsWith("0X")?`0x${w.substring(2)}`:`0x${w}`}e.add0x=l;function h(w){return w.startsWith("0x")||w.startsWith("0X")?w.substring(2):w}e.remove0x=h})(yr)),yr}var Hs;function Yn(){if(Hs)return se;Hs=1,Object.defineProperty(se,"__esModule",{value:!0}),se.createDataView=se.concatBytes=se.valueToBytes=se.base64ToBytes=se.stringToBytes=se.numberToBytes=se.signedBigIntToBytes=se.bigIntToBytes=se.hexToBytes=se.bytesToBase64=se.bytesToString=se.bytesToNumber=se.bytesToSignedBigInt=se.bytesToBigInt=se.bytesToHex=se.assertIsBytes=se.isBytes=void 0;const e=hu(),t=Ke(),n=zt(),i=48,d=58,u=87;function c(){const p=[];return()=>{if(p.length===0)for(let S=0;S<256;S++)p.push(S.toString(16).padStart(2,"0"));return p}}const a=c();function o(p){return p instanceof Uint8Array}se.isBytes=o;function f(p){(0,t.assert)(o(p),"Value must be a Uint8Array.")}se.assertIsBytes=f;function r(p){if(f(p),p.length===0)return"0x";const S=a(),Y=new Array(p.length);for(let x=0;x<p.length;x++)Y[x]=S[p[x]];return(0,n.add0x)(Y.join(""))}se.bytesToHex=r;function s(p){f(p);const S=r(p);return BigInt(S)}se.bytesToBigInt=s;function l(p){f(p);let S=BigInt(0);for(const Y of p)S=(S<<BigInt(8))+BigInt(Y);return BigInt.asIntN(p.length*8,S)}se.bytesToSignedBigInt=l;function h(p){f(p);const S=s(p);return(0,t.assert)(S<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(S)}se.bytesToNumber=h;function w(p){return f(p),new TextDecoder().decode(p)}se.bytesToString=w;function $(p){return f(p),e.base64.encode(p)}se.bytesToBase64=$;function U(p){var M;if(((M=p==null?void 0:p.toLowerCase)==null?void 0:M.call(p))==="0x")return new Uint8Array;(0,n.assertIsHexString)(p);const S=(0,n.remove0x)(p).toLowerCase(),Y=S.length%2===0?S:`0${S}`,x=new Uint8Array(Y.length/2);for(let q=0;q<x.length;q++){const z=Y.charCodeAt(q*2),L=Y.charCodeAt(q*2+1),H=z-(z<d?i:u),b=L-(L<d?i:u);x[q]=H*16+b}return x}se.hexToBytes=U;function O(p){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(p>=BigInt(0),"Value must be a non-negative bigint.");const S=p.toString(16);return U(S)}se.bigIntToBytes=O;function J(p,S){(0,t.assert)(S>0);const Y=p>>BigInt(31);return!((~p&Y)+(p&~Y)>>BigInt(S*8+-1))}function K(p,S){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(typeof S=="number","Byte length must be a number."),(0,t.assert)(S>0,"Byte length must be greater than 0."),(0,t.assert)(J(p,S),"Byte length is too small to represent the given value.");let Y=p;const x=new Uint8Array(S);for(let M=0;M<x.length;M++)x[M]=Number(BigInt.asUintN(8,Y)),Y>>=BigInt(8);return x.reverse()}se.signedBigIntToBytes=K;function _(p){(0,t.assert)(typeof p=="number","Value must be a number."),(0,t.assert)(p>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `bigIntToBytes` instead.");const S=p.toString(16);return U(S)}se.numberToBytes=_;function E(p){return(0,t.assert)(typeof p=="string","Value must be a string."),new TextEncoder().encode(p)}se.stringToBytes=E;function P(p){return(0,t.assert)(typeof p=="string","Value must be a string."),e.base64.decode(p)}se.base64ToBytes=P;function D(p){if(typeof p=="bigint")return O(p);if(typeof p=="number")return _(p);if(typeof p=="string")return p.startsWith("0x")?U(p):E(p);if(o(p))return p;throw new TypeError(`Unsupported value type: "${typeof p}".`)}se.valueToBytes=D;function k(p){const S=new Array(p.length);let Y=0;for(let M=0;M<p.length;M++){const q=D(p[M]);S[M]=q,Y+=q.length}const x=new Uint8Array(Y);for(let M=0,q=0;M<S.length;M++)x.set(S[M],q),q+=S[M].length;return x}se.concatBytes=k;function B(p){if(typeof ws<"u"&&p instanceof ws){const S=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return new DataView(S)}return new DataView(p.buffer,p.byteOffset,p.byteLength)}return se.createDataView=B,se}var br={},Us;function pu(){return Us||(Us=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAssetId=e.isCaipAssetType=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAssetIdStruct=e.CaipAssetTypeStruct=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ASSET_ID_REGEX=e.CAIP_ASSET_TYPE_REGEX=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const t=qe();e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,e.CaipChainIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),e.CaipAssetTypeStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_TYPE_REGEX),e.CaipAssetIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_ID_REGEX),(function(l){l.Bip122="bip122",l.Eip155="eip155",l.Wallet="wallet"})(e.KnownCaipNamespace||(e.KnownCaipNamespace={}));function n(l){return(0,t.is)(l,e.CaipChainIdStruct)}e.isCaipChainId=n;function i(l){return(0,t.is)(l,e.CaipNamespaceStruct)}e.isCaipNamespace=i;function d(l){return(0,t.is)(l,e.CaipReferenceStruct)}e.isCaipReference=d;function u(l){return(0,t.is)(l,e.CaipAccountIdStruct)}e.isCaipAccountId=u;function c(l){return(0,t.is)(l,e.CaipAccountAddressStruct)}e.isCaipAccountAddress=c;function a(l){return(0,t.is)(l,e.CaipAssetTypeStruct)}e.isCaipAssetType=a;function o(l){return(0,t.is)(l,e.CaipAssetIdStruct)}e.isCaipAssetId=o;function f(l){const h=e.CAIP_CHAIN_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP chain ID.");return{namespace:h.groups.namespace,reference:h.groups.reference}}e.parseCaipChainId=f;function r(l){const h=e.CAIP_ACCOUNT_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP account ID.");return{address:h.groups.accountAddress,chainId:h.groups.chainId,chain:{namespace:h.groups.namespace,reference:h.groups.reference}}}e.parseCaipAccountId=r;function s(l,h){if(!i(l))throw new Error(`Invalid "namespace", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(h))throw new Error(`Invalid "reference", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${l}:${h}`}e.toCaipChainId=s})(br)),br}var ft={},Ds;function gu(){if(Ds)return ft;Ds=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.ChecksumStruct=void 0;const e=qe(),t=ma();return ft.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),ft}var Ce={},Fs;function mu(){if(Fs)return Ce;Fs=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createHex=Ce.createBytes=Ce.createBigInt=Ce.createNumber=void 0;const e=qe(),t=Ke(),n=Yn(),i=zt(),d=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),i.StrictHexStruct]),u=(0,e.coerce)((0,e.number)(),d,Number),c=(0,e.coerce)((0,e.bigint)(),d,BigInt);(0,e.union)([i.StrictHexStruct,(0,e.instance)(Uint8Array)]);const a=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([i.StrictHexStruct]),n.hexToBytes),o=(0,e.coerce)(i.StrictHexStruct,(0,e.instance)(Uint8Array),n.bytesToHex);function f(h){try{const w=(0,e.create)(h,u);return(0,t.assert)(Number.isFinite(w),`Expected a number-like value, got "${h}".`),w}catch(w){throw w instanceof e.StructError?new Error(`Expected a number-like value, got "${h}".`):w}}Ce.createNumber=f;function r(h){try{return(0,e.create)(h,c)}catch(w){throw w instanceof e.StructError?new Error(`Expected a number-like value, got "${String(w.value)}".`):w}}Ce.createBigInt=r;function s(h){if(typeof h=="string"&&h.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(h,a)}catch(w){throw w instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(w.value)}".`):w}}Ce.createBytes=s;function l(h){if(h instanceof Uint8Array&&h.length===0||typeof h=="string"&&h.toLowerCase()==="0x")return"0x";try{return(0,e.create)(h,o)}catch(w){throw w instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(w.value)}".`):w}}return Ce.createHex=l,Ce}var je={},Vs;function yu(){if(Vs)return je;Vs=1;var e=je&&je.__classPrivateFieldGet||function(c,a,o,f){if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?c!==a||!f:!a.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?f:o==="a"?f.call(c):f?f.value:a.get(c)},t=je&&je.__classPrivateFieldSet||function(c,a,o,f,r){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?c!==a||!r:!a.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?r.call(c,o):r?r.value=o:a.set(c,o),o},n,i;Object.defineProperty(je,"__esModule",{value:!0}),je.FrozenSet=je.FrozenMap=void 0;class d{get size(){return e(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return e(this,n,"f")[Symbol.iterator]()}constructor(a){n.set(this,void 0),t(this,n,new Map(a),"f"),Object.freeze(this)}entries(){return e(this,n,"f").entries()}forEach(a,o){return e(this,n,"f").forEach((f,r,s)=>a.call(o,f,r,this))}get(a){return e(this,n,"f").get(a)}has(a){return e(this,n,"f").has(a)}keys(){return e(this,n,"f").keys()}values(){return e(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,o])=>`${String(a)} => ${String(o)}`).join(", ")} `:""}}`}}je.FrozenMap=d;class u{get size(){return e(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return e(this,i,"f")[Symbol.iterator]()}constructor(a){i.set(this,void 0),t(this,i,new Set(a),"f"),Object.freeze(this)}entries(){return e(this,i,"f").entries()}forEach(a,o){return e(this,i,"f").forEach((f,r,s)=>a.call(o,f,r,this))}has(a){return e(this,i,"f").has(a)}keys(){return e(this,i,"f").keys()}values(){return e(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return je.FrozenSet=u,Object.freeze(d),Object.freeze(d.prototype),Object.freeze(u),Object.freeze(u.prototype),je}var wr={},zs;function bu(){return zs||(zs=1,Object.defineProperty(wr,"__esModule",{value:!0})),wr}var Er={},Gs;function wu(){return Gs||(Gs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const t=qe(),n=Ke(),i=Kn(),d=p=>(0,t.object)(p);e.object=d;function u({path:p,branch:S}){const Y=p[p.length-1];return(0,i.hasProperty)(S[S.length-2],Y)}function c(p){return new t.Struct({...p,type:`optional ${p.type}`,validator:(S,Y)=>!u(Y)||p.validator(S,Y),refiner:(S,Y)=>!u(Y)||p.refiner(S,Y)})}e.exactOptional=c;const a=()=>(0,t.define)("finite number",p=>(0,t.is)(p,(0,t.number)())&&Number.isFinite(p));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),a(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.coerce)(e.UnsafeJsonStruct,(0,t.any)(),p=>((0,n.assertStruct)(p,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(p,(S,Y)=>{if(!(S==="__proto__"||S==="constructor"))return Y}))));function o(p){try{return f(p),!0}catch{return!1}}e.isValidJson=o;function f(p){return(0,t.create)(p,e.JsonStruct)}e.getSafeJson=f;function r(p){(0,n.assertStruct)(p,e.JsonStruct,"Invalid JSON value");const S=JSON.stringify(p);return new TextEncoder().encode(S).byteLength}e.getJsonSize=r,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,t.integer)(),message:(0,t.string)(),data:c(e.JsonStruct),stack:c((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)});function s(p){return(0,t.is)(p,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=s;function l(p,S){(0,n.assertStruct)(p,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",S)}e.assertIsJsonRpcNotification=l;function h(p){return(0,t.is)(p,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function w(p,S){(0,n.assertStruct)(p,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",S)}e.assertIsJsonRpcRequest=w,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function $(p){return(0,t.is)(p,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=$;function U(p,S){(0,n.assertStruct)(p,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",S)}e.assertIsPendingJsonRpcResponse=U;function O(p){return(0,t.is)(p,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=O;function J(p,S){(0,n.assertStruct)(p,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",S)}e.assertIsJsonRpcResponse=J;function K(p){return(0,t.is)(p,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=K;function _(p,S){(0,n.assertStruct)(p,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",S)}e.assertIsJsonRpcSuccess=_;function E(p){return(0,t.is)(p,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=E;function P(p,S){(0,n.assertStruct)(p,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",S)}e.assertIsJsonRpcFailure=P;function D(p){return(0,t.is)(p,e.JsonRpcErrorStruct)}e.isJsonRpcError=D;function k(p,S){(0,n.assertStruct)(p,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",S)}e.assertIsJsonRpcError=k;function B(p){const{permitEmptyString:S,permitFractions:Y,permitNull:x}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...p};return q=>!!(typeof q=="number"&&(Y||Number.isInteger(q))||typeof q=="string"&&(S||q.length>0)||x&&q===null)}e.getJsonRpcIdValidator=B})(Er)),Er}var Sr={},Js;function Eu(){return Js||(Js=1,Object.defineProperty(Sr,"__esModule",{value:!0})),Sr}var Ve={},Xs;function Su(){if(Xs)return Ve;Xs=1;var e=Ve&&Ve.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createModuleLogger=Ve.createProjectLogger=void 0;const n=(0,e(hc()).default)("metamask");function i(u){return n.extend(u)}Ve.createProjectLogger=i;function d(u,c){return u.extend(c)}return Ve.createModuleLogger=d,Ve}var Pe={},Ws;function vu(){if(Ws)return Pe;Ws=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.hexToBigInt=Pe.hexToNumber=Pe.bigIntToHex=Pe.numberToHex=void 0;const e=Ke(),t=zt(),n=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(c.toString(16)));Pe.numberToHex=n;const i=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,t.add0x)(c.toString(16)));Pe.bigIntToHex=i;const d=c=>{(0,t.assertIsHexString)(c);const a=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};Pe.hexToNumber=d;const u=c=>((0,t.assertIsHexString)(c),BigInt((0,t.add0x)(c)));return Pe.hexToBigInt=u,Pe}var vr={},Ks;function $u(){return Ks||(Ks=1,Object.defineProperty(vr,"__esModule",{value:!0})),vr}var ht={},Ys;function Ru(){if(Ys)return ht;Ys=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.createDeferredPromise=void 0;function e({suppressUnhandledRejection:t=!1}={}){let n,i;const d=new Promise((u,c)=>{n=u,i=c});return t&&d.catch(u=>{}),{promise:d,resolve:n,reject:i}}return ht.createDeferredPromise=e,ht}var $r={},Zs;function Iu(){return Zs||(Zs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,n=(u,c)=>{if(!t(u))throw new Error(`"${c}" must be a non-negative integer. Received: "${u}".`)};function i(u,c){return n(u,"count"),u*c}e.inMilliseconds=i;function d(u){return n(u,"timestamp"),Date.now()-u}e.timeSince=d})($r)),$r}var Rr={},Qs;function _u(){return Qs||(Qs=1,Object.defineProperty(Rr,"__esModule",{value:!0})),Rr}var Ir={},Ot={exports:{}},_r,ei;function xt(){if(ei)return _r;ei=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,d=t-6;return _r={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},_r}var xr,ti;function Gt(){if(ti)return xr;ti=1;var e={};return xr=typeof pc=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},xr}var ri;function At(){return ri||(ri=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:d}=xt(),u=Gt();t=e.exports={};const c=t.re=[],a=t.safeRe=[],o=t.src=[],f=t.safeSrc=[],r=t.t={};let s=0;const l="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",d],[l,i]],w=U=>{for(const[O,J]of h)U=U.split(`${O}*`).join(`${O}{0,${J}}`).split(`${O}+`).join(`${O}{1,${J}}`);return U},$=(U,O,J)=>{const K=w(O),_=s++;u(U,_,O),r[U]=_,o[_]=O,f[_]=K,c[_]=new RegExp(O,J?"g":void 0),a[_]=new RegExp(K,J?"g":void 0)};$("NUMERICIDENTIFIER","0|[1-9]\\d*"),$("NUMERICIDENTIFIERLOOSE","\\d+"),$("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),$("MAINVERSION",`(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})`),$("MAINVERSIONLOOSE",`(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASEIDENTIFIER",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIER]})`),$("PRERELEASEIDENTIFIERLOOSE",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASE",`(?:-(${o[r.PRERELEASEIDENTIFIER]}(?:\\.${o[r.PRERELEASEIDENTIFIER]})*))`),$("PRERELEASELOOSE",`(?:-?(${o[r.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[r.PRERELEASEIDENTIFIERLOOSE]})*))`),$("BUILDIDENTIFIER",`${l}+`),$("BUILD",`(?:\\+(${o[r.BUILDIDENTIFIER]}(?:\\.${o[r.BUILDIDENTIFIER]})*))`),$("FULLPLAIN",`v?${o[r.MAINVERSION]}${o[r.PRERELEASE]}?${o[r.BUILD]}?`),$("FULL",`^${o[r.FULLPLAIN]}$`),$("LOOSEPLAIN",`[v=\\s]*${o[r.MAINVERSIONLOOSE]}${o[r.PRERELEASELOOSE]}?${o[r.BUILD]}?`),$("LOOSE",`^${o[r.LOOSEPLAIN]}$`),$("GTLT","((?:<|>)?=?)"),$("XRANGEIDENTIFIERLOOSE",`${o[r.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),$("XRANGEIDENTIFIER",`${o[r.NUMERICIDENTIFIER]}|x|X|\\*`),$("XRANGEPLAIN",`[v=\\s]*(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:${o[r.PRERELEASE]})?${o[r.BUILD]}?)?)?`),$("XRANGEPLAINLOOSE",`[v=\\s]*(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:${o[r.PRERELEASELOOSE]})?${o[r.BUILD]}?)?)?`),$("XRANGE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAIN]}$`),$("XRANGELOOSE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAINLOOSE]}$`),$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),$("COERCE",`${o[r.COERCEPLAIN]}(?:$|[^\\d])`),$("COERCEFULL",o[r.COERCEPLAIN]+`(?:${o[r.PRERELEASE]})?(?:${o[r.BUILD]})?(?:$|[^\\d])`),$("COERCERTL",o[r.COERCE],!0),$("COERCERTLFULL",o[r.COERCEFULL],!0),$("LONETILDE","(?:~>?)"),$("TILDETRIM",`(\\s*)${o[r.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",$("TILDE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAIN]}$`),$("TILDELOOSE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAINLOOSE]}$`),$("LONECARET","(?:\\^)"),$("CARETTRIM",`(\\s*)${o[r.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",$("CARET",`^${o[r.LONECARET]}${o[r.XRANGEPLAIN]}$`),$("CARETLOOSE",`^${o[r.LONECARET]}${o[r.XRANGEPLAINLOOSE]}$`),$("COMPARATORLOOSE",`^${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]})$|^$`),$("COMPARATOR",`^${o[r.GTLT]}\\s*(${o[r.FULLPLAIN]})$|^$`),$("COMPARATORTRIM",`(\\s*)${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]}|${o[r.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",$("HYPHENRANGE",`^\\s*(${o[r.XRANGEPLAIN]})\\s+-\\s+(${o[r.XRANGEPLAIN]})\\s*$`),$("HYPHENRANGELOOSE",`^\\s*(${o[r.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[r.XRANGEPLAINLOOSE]})\\s*$`),$("STAR","(<|>)?=?\\s*\\*"),$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ot,Ot.exports)),Ot.exports}var Ar,ni;function Zn(){if(ni)return Ar;ni=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ar=i=>i?typeof i!="object"?e:i:t,Ar}var Tr,si;function ya(){if(si)return Tr;si=1;const e=/^[0-9]+$/,t=(i,d)=>{if(typeof i=="number"&&typeof d=="number")return i===d?0:i<d?-1:1;const u=e.test(i),c=e.test(d);return u&&c&&(i=+i,d=+d),i===d?0:u&&!c?-1:c&&!u?1:i<d?-1:1};return Tr={compareIdentifiers:t,rcompareIdentifiers:(i,d)=>t(d,i)},Tr}var Cr,ii;function ve(){if(ii)return Cr;ii=1;const e=Gt(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=xt(),{safeRe:i,t:d}=At(),u=Zn(),{compareIdentifiers:c}=ya(),a=(f,r)=>{const s=r.split(".");if(s.length>f.length)return!1;for(let l=0;l<s.length;l++)if(c(f[l],s[l])!==0)return!1;return!0};class o{constructor(r,s){if(s=u(s),r instanceof o){if(r.loose===!!s.loose&&r.includePrerelease===!!s.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",r,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const l=r.trim().match(s.loose?i[d.LOOSE]:i[d.FULL]);if(!l)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const w=+h;if(w>=0&&w<n)return w}return h}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(e("SemVer.compare",this.version,this.options,r),!(r instanceof o)){if(typeof r=="string"&&r===this.version)return 0;r=new o(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof o||(r=new o(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof o||(r=new o(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let s=0;do{const l=this.prerelease[s],h=r.prerelease[s];if(e("prerelease compare",s,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++s)}compareBuild(r){r instanceof o||(r=new o(r,this.options));let s=0;do{const l=this.build[s],h=r.build[s];if(e("build compare",s,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++s)}inc(r,s,l){if(r.startsWith("pre")){if(!s&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(s){const h=`-${s}`.match(this.options.loose?i[d.PRERELEASELOOSE]:i[d.PRERELEASE]);if(!h||h[1]!==s)throw new Error(`invalid identifier: ${s}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,l),this.inc("pre",s,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,l),this.inc("pre",s,l);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let w=this.prerelease.length;for(;--w>=0;)typeof this.prerelease[w]=="number"&&(this.prerelease[w]++,w=-2);if(w===-1){if(s===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(s){let w=[s,h];if(l===!1&&(w=[s]),a(this.prerelease,s)){const $=this.prerelease[s.split(".").length];isNaN($)&&(this.prerelease=w)}else this.prerelease=w}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Cr=o,Cr}var jr,oi;function it(){if(oi)return jr;oi=1;const e=ve();return jr=(n,i,d=!1)=>{if(n instanceof e)return n;try{return new e(n,i)}catch(u){if(!d)return null;throw u}},jr}var Pr,ai;function xu(){if(ai)return Pr;ai=1;const e=it();return Pr=(n,i)=>{const d=e(n,i);return d?d.version:null},Pr}var Or,ci;function Au(){if(ci)return Or;ci=1;const e=it();return Or=(n,i)=>{const d=e(n.trim().replace(/^[=v]+/,""),i);return d?d.version:null},Or}var kr,ui;function Tu(){if(ui)return kr;ui=1;const e=ve();return kr=(n,i,d,u,c)=>{typeof d=="string"&&(c=u,u=d,d=void 0);try{return new e(n instanceof e?n.version:n,d).inc(i,u,c).version}catch{return null}},kr}var Br,li;function Cu(){if(li)return Br;li=1;const e=it();return Br=(n,i)=>{const d=e(n,null,!0),u=e(i,null,!0),c=d.compare(u);if(c===0)return null;const a=c>0,o=a?d:u,f=a?u:d,r=!!o.prerelease.length;if(!!f.prerelease.length&&!r){if(!f.patch&&!f.minor)return"major";if(f.compareMain(o)===0)return f.minor&&!f.patch?"minor":"patch"}const l=r?"pre":"";return d.major!==u.major?l+"major":d.minor!==u.minor?l+"minor":d.patch!==u.patch?l+"patch":"prerelease"},Br}var Lr,di;function ju(){if(di)return Lr;di=1;const e=ve();return Lr=(n,i)=>new e(n,i).major,Lr}var Nr,fi;function Pu(){if(fi)return Nr;fi=1;const e=ve();return Nr=(n,i)=>new e(n,i).minor,Nr}var Mr,hi;function Ou(){if(hi)return Mr;hi=1;const e=ve();return Mr=(n,i)=>new e(n,i).patch,Mr}var qr,pi;function ku(){if(pi)return qr;pi=1;const e=it();return qr=(n,i)=>{const d=e(n,i);return d&&d.prerelease.length?d.prerelease:null},qr}var Hr,gi;function Le(){if(gi)return Hr;gi=1;const e=ve();return Hr=(n,i,d)=>new e(n,d).compare(new e(i,d)),Hr}var Ur,mi;function Bu(){if(mi)return Ur;mi=1;const e=Le();return Ur=(n,i,d)=>e(i,n,d),Ur}var Dr,yi;function Lu(){if(yi)return Dr;yi=1;const e=Le();return Dr=(n,i)=>e(n,i,!0),Dr}var Fr,bi;function Qn(){if(bi)return Fr;bi=1;const e=ve();return Fr=(n,i,d)=>{const u=new e(n,d),c=new e(i,d);return u.compare(c)||u.compareBuild(c)},Fr}var Vr,wi;function Nu(){if(wi)return Vr;wi=1;const e=Qn();return Vr=(n,i)=>n.sort((d,u)=>e(d,u,i)),Vr}var zr,Ei;function Mu(){if(Ei)return zr;Ei=1;const e=Qn();return zr=(n,i)=>n.sort((d,u)=>e(u,d,i)),zr}var Gr,Si;function Jt(){if(Si)return Gr;Si=1;const e=Le();return Gr=(n,i,d)=>e(n,i,d)>0,Gr}var Jr,vi;function es(){if(vi)return Jr;vi=1;const e=Le();return Jr=(n,i,d)=>e(n,i,d)<0,Jr}var Xr,$i;function ba(){if($i)return Xr;$i=1;const e=Le();return Xr=(n,i,d)=>e(n,i,d)===0,Xr}var Wr,Ri;function wa(){if(Ri)return Wr;Ri=1;const e=Le();return Wr=(n,i,d)=>e(n,i,d)!==0,Wr}var Kr,Ii;function ts(){if(Ii)return Kr;Ii=1;const e=Le();return Kr=(n,i,d)=>e(n,i,d)>=0,Kr}var Yr,_i;function rs(){if(_i)return Yr;_i=1;const e=Le();return Yr=(n,i,d)=>e(n,i,d)<=0,Yr}var Zr,xi;function Ea(){if(xi)return Zr;xi=1;const e=ba(),t=wa(),n=Jt(),i=ts(),d=es(),u=rs();return Zr=(a,o,f,r)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a===f;case"!==":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a!==f;case"":case"=":case"==":return e(a,f,r);case"!=":return t(a,f,r);case">":return n(a,f,r);case">=":return i(a,f,r);case"<":return d(a,f,r);case"<=":return u(a,f,r);default:throw new TypeError(`Invalid operator: ${o}`)}},Zr}var Qr,Ai;function qu(){if(Ai)return Qr;Ai=1;const e=ve(),t=it(),{safeRe:n,t:i}=At();return Qr=(u,c)=>{if(u instanceof e)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;c=c||{};let a=null;if(!c.rtl)a=u.match(c.includePrerelease?n[i.COERCEFULL]:n[i.COERCE]);else{const h=c.includePrerelease?n[i.COERCERTLFULL]:n[i.COERCERTL];let w;for(;(w=h.exec(u))&&(!a||a.index+a[0].length!==u.length);)(!a||w.index+w[0].length!==a.index+a[0].length)&&(a=w),h.lastIndex=w.index+w[1].length+w[2].length;h.lastIndex=-1}if(a===null)return null;const o=a[2],f=a[3]||"0",r=a[4]||"0",s=c.includePrerelease&&a[5]?`-${a[5]}`:"",l=c.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${f}.${r}${s}${l}`,c)},Qr}var en,Ti;function Hu(){if(Ti)return en;Ti=1;const e=it(),t=xt(),n=ve(),i=(a,o,f)=>{if(!t.RELEASE_TYPES.includes(o))return null;const r=d(a,f);return r&&u(r,o)},d=(a,o)=>{const f=a instanceof n?a.version:a;return e(f,o)},u=(a,o)=>{if(c(o))return a.version;switch(a.prerelease=[],o){case"major":a.minor=0,a.patch=0;break;case"minor":a.patch=0;break}return a.format()},c=a=>a.startsWith("pre");return en=i,en}var tn,Ci;function Uu(){if(Ci)return tn;Ci=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const i=this.map.get(n);if(i!==void 0)return this.map.delete(n),this.map.set(n,i),i}delete(n){return this.map.delete(n)}set(n,i){if(!this.delete(n)&&i!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(n,i)}return this}}return tn=e,tn}var rn,ji;function Ne(){if(ji)return rn;ji=1;const e=/\s+/g;class t{constructor(H,b){if(b=d(b),H instanceof t)return H.loose===!!b.loose&&H.includePrerelease===!!b.includePrerelease?H:new t(H.raw,b);if(H instanceof u)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease,this.raw=H.trim().replace(e," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(I=>!O(I[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&J(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const b=this.set[H];for(let g=0;g<b.length;g++)g>0&&(this.formatted+=" "),this.formatted+=b[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){H=H.replace(U,"");const g=((this.options.includePrerelease&&w)|(this.options.loose&&$))+":"+H,I=i.get(g);if(I)return I;const j=this.options.loose,N=j?o[r.HYPHENRANGELOOSE]:o[r.HYPHENRANGE];H=H.replace(N,q(this.options.includePrerelease)),c("hyphen replace",H),H=H.replace(o[r.COMPARATORTRIM],s),c("comparator trim",H),H=H.replace(o[r.TILDETRIM],l),c("tilde trim",H),H=H.replace(o[r.CARETTRIM],h),c("caret trim",H);let y=H.split(" ").map(V=>_(V,this.options)).join(" ").split(/\s+/).map(V=>M(V,this.options));j&&(y=y.filter(V=>(c("loose invalid filter",V,this.options),!!V.match(o[r.COMPARATORLOOSE])))),c("range list",y);const v=new Map,A=y.map(V=>new u(V,this.options));for(const V of A){if(O(V))return[V];v.set(V.value,V)}v.size>1&&v.has("")&&v.delete("");const X=[...v.values()];return i.set(g,X),X}intersects(H,b){if(!(H instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>K(g,b)&&H.set.some(I=>K(I,b)&&g.every(j=>I.every(N=>j.intersects(N,b)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new a(H,this.options)}catch{return!1}for(let b=0;b<this.set.length;b++)if(z(this.set[b],H,this.options))return!0;return!1}}rn=t;const n=Uu(),i=new n,d=Zn(),u=Xt(),c=Gt(),a=ve(),{safeRe:o,src:f,t:r,comparatorTrimReplace:s,tildeTrimReplace:l,caretTrimReplace:h}=At(),{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:$}=xt(),U=new RegExp(f[r.BUILD],"g"),O=L=>L.value==="<0.0.0-0",J=L=>L.value==="",K=(L,H)=>{let b=!0;const g=L.slice();let I=g.pop();for(;b&&g.length;)b=g.every(j=>I.intersects(j,H)),I=g.pop();return b},_=(L,H)=>(L=L.replace(o[r.BUILD],""),c("comp",L,H),L=B(L,H),c("caret",L),L=D(L,H),c("tildes",L),L=S(L,H),c("xrange",L),L=x(L,H),c("stars",L),L),E=L=>!L||L.toLowerCase()==="x"||L==="*",P=(L,H,b)=>E(L)&&!E(H)||E(H)&&b&&!E(b),D=(L,H)=>L.trim().split(/\s+/).map(b=>k(b,H)).join(" "),k=(L,H)=>{const b=H.loose?o[r.TILDELOOSE]:o[r.TILDE],g=H.includePrerelease?"-0":"";return L.replace(b,(I,j,N,y,v)=>{c("tilde",L,I,j,N,y,v);let A;return E(j)?A="":E(N)?A=`>=${j}.0.0${g} <${+j+1}.0.0-0`:E(y)?A=`>=${j}.${N}.0${g} <${j}.${+N+1}.0-0`:v?(c("replaceTilde pr",v),A=`>=${j}.${N}.${y}-${v} <${j}.${+N+1}.0-0`):A=`>=${j}.${N}.${y} <${j}.${+N+1}.0-0`,c("tilde return",A),A})},B=(L,H)=>L.trim().split(/\s+/).map(b=>p(b,H)).join(" "),p=(L,H)=>{c("caret",L,H);const b=H.loose?o[r.CARETLOOSE]:o[r.CARET],g=H.includePrerelease?"-0":"";return L.replace(b,(I,j,N,y,v)=>{c("caret",L,I,j,N,y,v);let A;return E(j)?A="":E(N)?A=`>=${j}.0.0${g} <${+j+1}.0.0-0`:E(y)?j==="0"?A=`>=${j}.${N}.0${g} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.0${g} <${+j+1}.0.0-0`:v?(c("replaceCaret pr",v),j==="0"?N==="0"?A=`>=${j}.${N}.${y}-${v} <${j}.${N}.${+y+1}-0`:A=`>=${j}.${N}.${y}-${v} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.${y}-${v} <${+j+1}.0.0-0`):(c("no pr"),j==="0"?N==="0"?A=`>=${j}.${N}.${y} <${j}.${N}.${+y+1}-0`:A=`>=${j}.${N}.${y} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.${y} <${+j+1}.0.0-0`),c("caret return",A),A})},S=(L,H)=>(c("replaceXRanges",L,H),L.split(/\s+/).map(b=>Y(b,H)).join(" ")),Y=(L,H)=>{L=L.trim();const b=H.loose?o[r.XRANGELOOSE]:o[r.XRANGE];return L.replace(b,(g,I,j,N,y,v)=>{if(c("xRange",L,g,I,j,N,y,v),P(j,N,y))return L;const A=E(j),X=A||E(N),V=X||E(y),W=V;return I==="="&&W&&(I=""),v=H.includePrerelease?"-0":"",A?I===">"||I==="<"?g="<0.0.0-0":g="*":I&&W?(X&&(N=0),y=0,I===">"?(I=">=",X?(j=+j+1,N=0,y=0):(N=+N+1,y=0)):I==="<="&&(I="<",X?j=+j+1:N=+N+1),I==="<"&&(v="-0"),g=`${I+j}.${N}.${y}${v}`):X?g=`>=${j}.0.0${v} <${+j+1}.0.0-0`:V&&(g=`>=${j}.${N}.0${v} <${j}.${+N+1}.0-0`),c("xRange return",g),g})},x=(L,H)=>(c("replaceStars",L,H),L.trim().replace(o[r.STAR],"")),M=(L,H)=>(c("replaceGTE0",L,H),L.trim().replace(o[H.includePrerelease?r.GTE0PRE:r.GTE0],"")),q=L=>(H,b,g,I,j,N,y,v,A,X,V,W)=>(E(g)?b="":E(I)?b=`>=${g}.0.0${L?"-0":""}`:E(j)?b=`>=${g}.${I}.0${L?"-0":""}`:N?b=`>=${b}`:b=`>=${b}${L?"-0":""}`,E(A)?v="":E(X)?v=`<${+A+1}.0.0-0`:E(V)?v=`<${A}.${+X+1}.0-0`:W?v=`<=${A}.${X}.${V}-${W}`:L?v=`<${A}.${X}.${+V+1}-0`:v=`<=${v}`,`${b} ${v}`.trim()),z=(L,H,b)=>{for(let g=0;g<L.length;g++)if(!L[g].test(H))return!1;if(H.prerelease.length&&!b.includePrerelease){for(let g=0;g<L.length;g++)if(c(L[g].semver),L[g].semver!==u.ANY&&L[g].semver.prerelease.length>0){const I=L[g].semver;if(I.major===H.major&&I.minor===H.minor&&I.patch===H.patch)return!0}return!1}return!0};return rn}var nn,Pi;function Xt(){if(Pi)return nn;Pi=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,s){if(s=n(s),r instanceof t){if(r.loose===!!s.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),c("comparator",r,s),this.options=s,this.loose=!!s.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(r){const s=this.options.loose?i[d.COMPARATORLOOSE]:i[d.COMPARATOR],l=r.match(s);if(!l)throw new TypeError(`Invalid comparator: ${r}`);this.operator=l[1]!==void 0?l[1]:"",this.operator==="="&&(this.operator=""),l[2]?this.semver=new a(l[2],this.options.loose):this.semver=e}toString(){return this.value}test(r){if(c("Comparator.test",r,this.options.loose),this.semver===e||r===e)return!0;if(typeof r=="string")try{r=new a(r,this.options)}catch{return!1}return u(r,this.operator,this.semver,this.options)}intersects(r,s){if(!(r instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(r.value,s).test(this.value):r.operator===""?r.value===""?!0:new o(this.value,s).test(r.semver):(s=n(s),s.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!s.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||u(this.semver,"<",r.semver,s)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||u(this.semver,">",r.semver,s)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}}nn=t;const n=Zn(),{safeRe:i,t:d}=At(),u=Ea(),c=Gt(),a=ve(),o=Ne();return nn}var sn,Oi;function Wt(){if(Oi)return sn;Oi=1;const e=Ne();return sn=(n,i,d)=>{try{i=new e(i,d)}catch{return!1}return i.test(n)},sn}var on,ki;function Du(){if(ki)return on;ki=1;const e=Ne();return on=(n,i)=>new e(n,i).set.map(d=>d.map(u=>u.value).join(" ").trim().split(" ")),on}var an,Bi;function Fu(){if(Bi)return an;Bi=1;const e=ve(),t=Ne();return an=(i,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return i.forEach(f=>{o.test(f)&&(!c||a.compare(f)===-1)&&(c=f,a=new e(c,u))}),c},an}var cn,Li;function Vu(){if(Li)return cn;Li=1;const e=ve(),t=Ne();return cn=(i,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return i.forEach(f=>{o.test(f)&&(!c||a.compare(f)===1)&&(c=f,a=new e(c,u))}),c},cn}var un,Ni;function zu(){if(Ni)return un;Ni=1;const e=ve(),t=Ne(),n=Jt();return un=(d,u)=>{d=new t(d,u);let c=new e("0.0.0");if(d.test(c)||(c=new e("0.0.0-0"),d.test(c)))return c;c=null;for(let a=0;a<d.set.length;++a){const o=d.set[a];let f=null;o.forEach(r=>{const s=new e(r.semver.version);switch(r.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!f||n(s,f))&&(f=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${r.operator}`)}}),f&&(!c||n(c,f))&&(c=f)}return c&&d.test(c)?c:null},un}var ln,Mi;function Gu(){if(Mi)return ln;Mi=1;const e=Ne();return ln=(n,i)=>{try{return new e(n,i).range||"*"}catch{return null}},ln}var dn,qi;function ns(){if(qi)return dn;qi=1;const e=ve(),t=Xt(),{ANY:n}=t,i=Ne(),d=Wt(),u=Jt(),c=es(),a=rs(),o=ts();return dn=(r,s,l,h)=>{r=new e(r,h),s=new i(s,h);let w,$,U,O,J;switch(l){case">":w=u,$=a,U=c,O=">",J=">=";break;case"<":w=c,$=o,U=u,O="<",J="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(r,s,h))return!1;for(let K=0;K<s.set.length;++K){const _=s.set[K];let E=null,P=null;if(_.forEach(D=>{D.semver===n&&(D=new t(">=0.0.0")),E=E||D,P=P||D,w(D.semver,E.semver,h)?E=D:U(D.semver,P.semver,h)&&(P=D)}),E.operator===O||E.operator===J||(!P.operator||P.operator===O)&&$(r,P.semver))return!1;if(P.operator===J&&U(r,P.semver))return!1}return!0},dn}var fn,Hi;function Ju(){if(Hi)return fn;Hi=1;const e=ns();return fn=(n,i,d)=>e(n,i,">",d),fn}var hn,Ui;function Xu(){if(Ui)return hn;Ui=1;const e=ns();return hn=(n,i,d)=>e(n,i,"<",d),hn}var pn,Di;function Wu(){if(Di)return pn;Di=1;const e=Ne();return pn=(n,i,d)=>(n=new e(n,d),i=new e(i,d),n.intersects(i,d)),pn}var gn,Fi;function Ku(){if(Fi)return gn;Fi=1;const e=Wt(),t=Le();return gn=(n,i,d)=>{const u=[];let c=null,a=null;const o=n.sort((l,h)=>t(l,h,d));for(const l of o)e(l,i,d)?(a=l,c||(c=l)):(a&&u.push([c,a]),a=null,c=null);c&&u.push([c,null]);const f=[];for(const[l,h]of u)l===h?f.push(l):!h&&l===o[0]?f.push("*"):h?l===o[0]?f.push(`<=${h}`):f.push(`${l} - ${h}`):f.push(`>=${l}`);const r=f.join(" || "),s=typeof i.raw=="string"?i.raw:String(i);return r.length<s.length?r:i},gn}var mn,Vi;function Yu(){if(Vi)return mn;Vi=1;const e=Ne(),t=Xt(),{ANY:n}=t,i=Wt(),d=Le(),u=(s,l,h={})=>{if(s===l)return!0;s=new e(s,h),l=new e(l,h);let w=!1;e:for(const $ of s.set){for(const U of l.set){const O=o($,U,h);if(w=w||O!==null,O)continue e}if(w)return!1}return!0},c=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(s,l,h)=>{if(s===l)return!0;if(s.length===1&&s[0].semver===n){if(l.length===1&&l[0].semver===n)return!0;h.includePrerelease?s=c:s=a}if(l.length===1&&l[0].semver===n){if(h.includePrerelease)return!0;l=a}const w=new Set;let $,U;for(const k of s)k.operator===">"||k.operator===">="?$=f($,k,h):k.operator==="<"||k.operator==="<="?U=r(U,k,h):w.add(k.semver);if(w.size>1)return null;let O;if($&&U){if(O=d($.semver,U.semver,h),O>0)return null;if(O===0&&($.operator!==">="||U.operator!=="<="))return null}for(const k of w){if($&&!i(k,String($),h)||U&&!i(k,String(U),h))return null;for(const B of l)if(!i(k,String(B),h))return!1;return!0}let J,K,_,E,P=U&&!h.includePrerelease&&U.semver.prerelease.length?U.semver:!1,D=$&&!h.includePrerelease&&$.semver.prerelease.length?$.semver:!1;P&&P.prerelease.length===1&&U.operator==="<"&&P.prerelease[0]===0&&(P=!1);for(const k of l){if(E=E||k.operator===">"||k.operator===">=",_=_||k.operator==="<"||k.operator==="<=",$){if(D&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===D.major&&k.semver.minor===D.minor&&k.semver.patch===D.patch&&(D=!1),k.operator===">"||k.operator===">="){if(J=f($,k,h),J===k&&J!==$)return!1}else if($.operator===">="&&!k.test($.semver))return!1}if(U){if(P&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===P.major&&k.semver.minor===P.minor&&k.semver.patch===P.patch&&(P=!1),k.operator==="<"||k.operator==="<="){if(K=r(U,k,h),K===k&&K!==U)return!1}else if(U.operator==="<="&&!k.test(U.semver))return!1}if(!k.operator&&(U||$)&&O!==0)return!1}return!($&&_&&!U&&O!==0||U&&E&&!$&&O!==0||D||P)},f=(s,l,h)=>{if(!s)return l;const w=d(s.semver,l.semver,h);return w>0?s:w<0||l.operator===">"&&s.operator===">="?l:s},r=(s,l,h)=>{if(!s)return l;const w=d(s.semver,l.semver,h);return w<0?s:w>0||l.operator==="<"&&s.operator==="<="?l:s};return mn=u,mn}var yn,zi;function Zu(){if(zi)return yn;zi=1;const e=At(),t=xt(),n=ve(),i=ya(),d=it(),u=xu(),c=Au(),a=Tu(),o=Cu(),f=ju(),r=Pu(),s=Ou(),l=ku(),h=Le(),w=Bu(),$=Lu(),U=Qn(),O=Nu(),J=Mu(),K=Jt(),_=es(),E=ba(),P=wa(),D=ts(),k=rs(),B=Ea(),p=qu(),S=Hu(),Y=Xt(),x=Ne(),M=Wt(),q=Du(),z=Fu(),L=Vu(),H=zu(),b=Gu(),g=ns(),I=Ju(),j=Xu(),N=Wu(),y=Ku(),v=Yu();return yn={parse:d,valid:u,clean:c,inc:a,diff:o,major:f,minor:r,patch:s,prerelease:l,compare:h,rcompare:w,compareLoose:$,compareBuild:U,sort:O,rsort:J,gt:K,lt:_,eq:E,neq:P,gte:D,lte:k,cmp:B,coerce:p,truncate:S,Comparator:Y,Range:x,satisfies:M,toComparators:q,maxSatisfying:z,minSatisfying:L,minVersion:H,validRange:b,outside:g,gtr:I,ltr:j,intersects:N,simplifyRange:y,subset:v,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers},yn}var Gi;function Qu(){return Gi||(Gi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=qe(),n=Zu(),i=Ke();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",s=>(0,n.valid)(s)===null?`Expected SemVer version, got "${s}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",s=>(0,n.validRange)(s)===null?`Expected SemVer range, got "${s}"`:!0);function d(s){return(0,t.is)(s,e.VersionStruct)}e.isValidSemVerVersion=d;function u(s){return(0,t.is)(s,e.VersionRangeStruct)}e.isValidSemVerRange=u;function c(s){(0,i.assertStruct)(s,e.VersionStruct)}e.assertIsSemVerVersion=c;function a(s){(0,i.assertStruct)(s,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function o(s,l){return(0,n.gt)(s,l)}e.gtVersion=o;function f(s,l){return(0,n.gtr)(s,l)}e.gtRange=f;function r(s,l){return(0,n.satisfies)(s,l,{includePrerelease:!0})}e.satisfiesVersionRange=r})(Ir)),Ir}var Ji;function Ie(){return Ji||(Ji=1,(function(e){var t=et&&et.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=et&&et.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ke(),e),n(ma(),e),n(Yn(),e),n(pu(),e),n(gu(),e),n(mu(),e),n(yu(),e),n(bu(),e),n(ga(),e),n(zt(),e),n(wu(),e),n(Eu(),e),n(Su(),e),n(Kn(),e),n(vu(),e),n($u(),e),n(Ru(),e),n(Iu(),e),n(_u(),e),n(Qu(),e)})(et)),et}var bn={},Xi;function He(){return Xi||(Xi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const t=Ie(),n=u=>typeof u=="string"?u:u instanceof Error||(0,t.isObject)(u)&&(0,t.hasProperty)(u,"message")&&typeof u.message=="string"?u.message:"Unknown error.";e.getErrorMessage=n;const i=u=>{if(u instanceof Error)return u.stack};e.getErrorStack=i;class d extends Error{constructor(c,a){super(c),this.name="ParserError";const o=(0,e.getErrorStack)(a);o&&(this.stack=o)}}e.ParserError=d})(bn)),bn}var wn={},pt={},Wi;function el(){if(Wi)return pt;Wi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.iterate=void 0;const e=Ie(),t=function*(n,i=32){for(let d=0;d<n.length;d+=i){const u=a=>{(0,e.assert)(a>=0,"Cannot skip a negative number of bytes."),(0,e.assert)(a%i===0,"Length must be a multiple of the size."),d+=a},c=n.subarray(d);yield{skip:u,value:c}}return{skip:()=>{},value:new Uint8Array}};return pt.iterate=t,pt}var rt={},En={},nt={},ze={},Ki;function tl(){if(Ki)return ze;Ki=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.padEnd=ze.padStart=ze.set=void 0;const e=Ie(),t=32,n=(u,c,a)=>(0,e.concatBytes)([u.subarray(0,a),c,u.subarray(a+c.length)]);ze.set=n;const i=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([a,u])};ze.padStart=i;const d=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([u,a])};return ze.padEnd=d,ze}var Yi;function ct(){return Yi||(Yi=1,(function(e){var t=nt&&nt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=nt&&nt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(tl(),e)})(nt)),nt}var Zi;function rl(){return Zi||(Zi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.address=e.getAddress=void 0;const t=Ie(),n=He(),i=ct(),d=u=>{const c=(0,t.createBytes)(u);return(0,t.assert)(c.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${c.length} bytes.`)),(0,i.padStart)(c,20)};e.getAddress=d,e.address={isDynamic:!1,isType:u=>u==="address",getByteLength(){return 32},encode({buffer:u,value:c,packed:a}){const o=(0,e.getAddress)(c);if(a)return(0,t.concatBytes)([u,o]);const f=(0,i.padStart)(o);return(0,t.concatBytes)([u,f])},decode({value:u}){return(0,t.add0x)((0,t.bytesToHex)(u.slice(12,32)))}}})(En)),En}var Sn={},vn={},Qi;function ss(){return Qi||(Qi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const t=Ie(),n=He(),i=ct(),d=/^bytes([0-9]{1,2})$/u,u=c=>{var f;const a=(f=c.match(d))==null?void 0:f[1];(0,t.assert)(a,`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`);const o=Number(a);return(0,t.assert)(o>0&&o<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`)),o};e.getByteLength=u,e.fixedBytes={isDynamic:!1,isType(c){return d.test(c)},getByteLength(){return 32},encode({type:c,buffer:a,value:o,packed:f}){const r=(0,e.getByteLength)(c),s=(0,t.createBytes)(o);return(0,t.assert)(s.length<=r,new n.ParserError(`Expected a value of length ${r}, but received a value of length ${s.length}.`)),f?(0,t.concatBytes)([a,(0,i.padEnd)(s,r)]):(0,t.concatBytes)([a,(0,i.padEnd)(s)])},decode({type:c,value:a}){const o=(0,e.getByteLength)(c);return a.slice(0,o)}}})(vn)),vn}var $n={},eo;function Sa(){return eo||(eo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tuple=e.getTupleElements=void 0;const t=Ie(),n=He(),i=is(),d=/^\((.+)\)$/u,u=a=>d.test(a),c=a=>{(0,t.assert)(a.startsWith("(")&&a.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${a}".`));const o=[];let f="",r=0;for(let s=1;s<a.length-1;s++){const l=a[s];l===","&&r===0?(o.push(f.trim()),f=""):(f+=l,l==="("?r+=1:l===")"&&(r-=1))}return f.trim()&&o.push(f.trim()),o};e.getTupleElements=c,e.tuple={isDynamic(a){return(0,e.getTupleElements)(a).some(f=>{const r=(0,i.getParser)(f);return(0,i.isDynamicParser)(r,f)})},isType(a){return u(a)},getByteLength(a){return(0,i.isDynamicParser)(this,a)?32:(0,e.getTupleElements)(a).reduce((f,r)=>f+(0,i.getParser)(r).getByteLength(r),0)},encode({type:a,buffer:o,value:f,packed:r,tight:s}){const l=(0,e.getTupleElements)(a);return(0,i.pack)({types:l,values:f,byteArray:o,packed:r,tight:s})},decode({type:a,value:o,skip:f}){const r=(0,e.getTupleElements)(a),s=this.getByteLength(a)-32;return f(s),(0,i.unpack)(r,o)}}})($n)),$n}var to;function nl(){return to||(to=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const t=Ie(),n=He(),i=is(),d=ct(),u=ss(),c=Sa(),a=/^(?<type>.*)\[(?<length>\d*?)\]$/u,o=s=>a.test(s);e.isArrayType=o;const f=s=>{var h;const l=s.match(a);return(0,t.assert)((h=l==null?void 0:l.groups)==null?void 0:h.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${s}".`)),[l.groups.type,l.groups.length?parseInt(l.groups.length,10):void 0]};e.getArrayType=f;const r=(s,l)=>`(${new Array(l).fill(s).join(",")})`;e.getTupleType=r,e.array={isDynamic(s){const[l,h]=(0,e.getArrayType)(s);return h===void 0||(0,i.isDynamicParser)((0,i.getParser)(l),l)},isType(s){return(0,e.isArrayType)(s)},getByteLength(s){(0,t.assert)((0,e.isArrayType)(s),new n.ParserError(`Expected an array type, but received "${s}".`));const[l,h]=(0,e.getArrayType)(s);return!(0,i.isDynamicParser)(this,s)&&h!==void 0?c.tuple.getByteLength((0,e.getTupleType)(l,h)):32},encode({type:s,buffer:l,value:h,packed:w,tight:$}){const[U,O]=(0,e.getArrayType)(s);if((0,t.assert)(!w||!(0,e.isArrayType)(U),new n.ParserError("Cannot pack nested arrays.")),w&&(0,i.isDynamicParser)((0,i.getParser)(U),U))return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:l,packed:w,arrayPacked:!0,tight:$});if(O)return(0,t.assert)(O===h.length,new n.ParserError(`Array length does not match type length. Expected a length of ${O}, but received ${h.length}.`)),c.tuple.encode({type:(0,e.getTupleType)(U,O),buffer:l,value:h,packed:u.fixedBytes.isType(U)&&$,tight:$});if(w)return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:l,packed:u.fixedBytes.isType(U)&&$,arrayPacked:!0,tight:$});const J=(0,d.padStart)((0,t.numberToBytes)(h.length));return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:(0,t.concatBytes)([l,J]),packed:w,tight:$})},decode({type:s,value:l,...h}){const[w,$]=(0,e.getArrayType)(s);if($){const O=c.tuple.decode({type:(0,e.getTupleType)(w,$),value:l,...h});return(0,t.assert)(O.length===$,new n.ParserError(`Array length does not match type length. Expected a length of ${$}, but received ${O.length}.`)),O}const U=(0,t.bytesToNumber)(l.subarray(0,32));return(0,i.unpack)(new Array(U).fill(w),l.subarray(32))}}})(Sn)),Sn}var Rn={},In={},ro;function va(){return ro||(ro=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const t=Ie(),n=He(),i=ct(),d=/^u?int(?<length>[0-9]*)?$/u,u=f=>!f.startsWith("u");e.isSigned=u;const c=f=>{var l;if(f==="int"||f==="uint")return 256;const r=f.match(d);(0,t.assert)((l=r==null?void 0:r.groups)==null?void 0:l.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${f}".`));const s=parseInt(r.groups.length,10);return(0,t.assert)(s>=8&&s<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${f}".`)),(0,t.assert)(s%8===0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${f}".`)),s};e.getLength=c;const a=(f,r)=>{const s=(0,e.getLength)(r),l=BigInt(2)**BigInt(s-((0,e.isSigned)(r)?1:0))-BigInt(1);if((0,e.isSigned)(r)){(0,t.assert)(f>=-(l+BigInt(1))&&f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`));return}(0,t.assert)(f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`))};e.assertNumberLength=a;const o=f=>{try{return(0,t.createBigInt)(f)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${f}".`)}};e.getBigInt=o,e.number={isDynamic:!1,isType(f){return d.test(f)},getByteLength(){return 32},encode({type:f,buffer:r,value:s,packed:l}){const h=(0,e.getBigInt)(s);if((0,e.assertNumberLength)(h,f),(0,e.isSigned)(f)){if(l){const w=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,t.signedBigIntToBytes)(h,w)])}return(0,t.concatBytes)([r,(0,i.padStart)((0,t.signedBigIntToBytes)(h,32))])}if(l){const w=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,i.padStart)((0,t.bigIntToBytes)(h),w)])}return(0,t.concatBytes)([r,(0,i.padStart)((0,t.bigIntToBytes)(h))])},decode({type:f,value:r}){const s=r.subarray(0,32);if((0,e.isSigned)(f)){const h=(0,t.bytesToSignedBigInt)(s);return(0,e.assertNumberLength)(h,f),h}const l=(0,t.bytesToBigInt)(s);return(0,e.assertNumberLength)(l,f),l}}})(In)),In}var no;function sl(){return no||(no=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bool=e.getBooleanValue=void 0;const t=qe(),n=Ie(),i=He(),d=va(),u=(0,t.coerce)((0,t.boolean)(),(0,t.union)([(0,t.literal)("true"),(0,t.literal)("false")]),a=>a==="true"),c=a=>{try{return(0,t.create)(a,u)?BigInt(1):BigInt(0)}catch{throw new i.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${a}".`)}};e.getBooleanValue=c,e.bool={isDynamic:!1,isType:a=>a==="bool",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const s=(0,e.getBooleanValue)(o);return f?(0,n.concatBytes)([a,(0,n.bigIntToBytes)(s)]):d.number.encode({type:"uint256",buffer:a,value:s,packed:f,tight:r})},decode(a){return d.number.decode({...a,type:"uint256"})===BigInt(1)}}})(Rn)),Rn}var gt={},so;function $a(){if(so)return gt;so=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.bytes=void 0;const e=Ie(),t=ct();return gt.bytes={isDynamic:!0,isType:n=>n==="bytes",getByteLength(){return 32},encode({buffer:n,value:i,packed:d}){const u=(0,e.createBytes)(i);if(d)return(0,e.concatBytes)([n,u]);const c=Math.ceil(u.byteLength/32)*32;return(0,e.concatBytes)([n,(0,t.padStart)((0,e.numberToBytes)(u.byteLength)),(0,t.padEnd)(u,c)])},decode({value:n}){const i=n.subarray(0,32),d=(0,e.bytesToNumber)(i);return n.slice(32,32+d)}},gt}var _n={},io;function il(){return io||(io=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fn=e.getFunction=void 0;const t=qe(),n=Ie(),i=He(),d=ss(),u=(0,t.coerce)((0,t.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,t.union)([n.StrictHexStruct,(0,t.instance)(Uint8Array)]),a=>{const o=(0,n.createBytes)(a);return(0,n.assert)(o.length===24,new i.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${o.length} bytes.`)),{address:(0,n.bytesToHex)(o.subarray(0,20)),selector:(0,n.bytesToHex)(o.subarray(20,24))}}),c=a=>{const o=(0,t.create)(a,u);return(0,n.concatBytes)([(0,n.hexToBytes)(o.address),(0,n.hexToBytes)(o.selector)])};e.getFunction=c,e.fn={isDynamic:!1,isType:a=>a==="function",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const s=(0,e.getFunction)(o);return d.fixedBytes.encode({type:"bytes24",buffer:a,value:s,packed:f,tight:r})},decode({value:a}){return{address:(0,n.bytesToHex)(a.slice(0,20)),selector:(0,n.bytesToHex)(a.slice(20,24))}}}})(_n)),_n}var xn={},oo;function ol(){return oo||(oo=1,Object.defineProperty(xn,"__esModule",{value:!0})),xn}var mt={},ao;function al(){if(ao)return mt;ao=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.string=void 0;const e=Ie(),t=$a();return mt.string={isDynamic:!0,isType:n=>n==="string",getByteLength(){return 32},encode({buffer:n,value:i,packed:d,tight:u}){return t.bytes.encode({type:"bytes",buffer:n,value:(0,e.stringToBytes)(i),packed:d,tight:u})},decode(n){return(0,e.bytesToString)(t.bytes.decode(n))}},mt}var co;function cl(){return co||(co=1,(function(e){var t=rt&&rt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=rt&&rt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(rl(),e),n(nl(),e),n(sl(),e),n($a(),e),n(ss(),e),n(il(),e),n(va(),e),n(ol(),e),n(al(),e),n(Sa(),e)})(rt)),rt}var uo;function is(){return uo||(uo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=void 0;const t=Ie(),n=He(),i=el(),d=cl(),u=ct(),c=r=>{const s={address:d.address,array:d.array,bool:d.bool,bytes:d.bytes,fixedBytes:d.fixedBytes,function:d.fn,number:d.number,string:d.string,tuple:d.tuple},l=s[r];if(l)return l;const h=Object.values(s).find(w=>w.isType(r));if(h)return h;throw new n.ParserError(`The type "${r}" is not supported.`)};e.getParser=c;const a=(r,s)=>{const{isDynamic:l}=r;return typeof l=="function"?l(s):l};e.isDynamicParser=a;const o=({types:r,values:s,packed:l=!1,tight:h=!1,arrayPacked:w=!1,byteArray:$=new Uint8Array})=>{(0,t.assert)(r.length===s.length,new n.ParserError(`The number of types (${r.length}) does not match the number of values (${s.length}).`));const{staticBuffer:U,dynamicBuffer:O,pointers:J}=r.reduce(({staticBuffer:E,dynamicBuffer:P,pointers:D},k,B)=>{const p=(0,e.getParser)(k),S=s[B];if(l||w||!(0,e.isDynamicParser)(p,k))return{staticBuffer:p.encode({buffer:E,value:S,type:k,packed:l,tight:h}),dynamicBuffer:P,pointers:D};const Y=(0,t.concatBytes)([E,new Uint8Array(32)]),x=p.encode({buffer:P,value:S,type:k,packed:l,tight:h});return{staticBuffer:Y,dynamicBuffer:x,pointers:[...D,{position:E.length,pointer:P.length}]}},{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,t.assert)(!l&&!w||O.length===0,new n.ParserError("Invalid pack state."));const K=U.length,_=J.reduce((E,{pointer:P,position:D})=>{const k=(0,u.padStart)((0,t.numberToBytes)(K+P));return(0,u.set)(E,k,D)},U);return(0,t.concatBytes)([$,_,O])};e.pack=o;const f=(r,s)=>{const l=(0,i.iterate)(s);return r.map(h=>{const{value:{value:w,skip:$},done:U}=l.next();(0,t.assert)(!U,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${h}".`));const O=(0,e.getParser)(h);if((0,e.isDynamicParser)(O,h)){const K=(0,t.bytesToNumber)(w.subarray(0,32)),_=s.subarray(K);return O.decode({type:h,value:_,skip:$})}return O.decode({type:h,value:w,skip:$})})};e.unpack=f})(wn)),wn}var lo;function ul(){return lo||(lo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const t=Ie(),n=He(),i=is(),d=(f,r,s,l)=>{try{return(0,i.pack)({types:f,values:r,packed:s,tight:l})}catch(h){throw h instanceof n.ParserError?new n.ParserError(`Unable to encode value: ${h.message}`,h):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(h)}`,h)}};e.encode=d;const u=(f,r)=>(0,e.encode)([f],[r]);e.encodeSingle=u;const c=(f,r,s)=>(0,e.encode)(f,r,!0,s);e.encodePacked=c;const a=(f,r)=>{const s=(0,t.createBytes)(r);try{return(0,i.unpack)(f,s)}catch(l){throw l instanceof n.ParserError?new n.ParserError(`Unable to decode value: ${l.message}`,l):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(l)}`,l)}};e.decode=a;const o=(f,r)=>{const s=(0,e.decode)([f],r);return(0,t.assert)(s.length===1,new n.ParserError("Decoded value array has unexpected length.")),s[0]};e.decodeSingle=o})(hr)),hr}var st={},An={},fo;function ll(){return fo||(fo=1,Object.defineProperty(An,"__esModule",{value:!0})),An}var ho;function dl(){return ho||(ho=1,(function(e){var t=st&&st.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=st&&st.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(ll(),e)})(st)),st}var po;function Ra(){return po||(po=1,(function(e){var t=Qe&&Qe.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=Qe&&Qe.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(ul(),e),n(He(),e),n(dl(),e)})(Qe)),Qe}var Oe={},Tn={},ce={},go;function fl(){if(go)return ce;go=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ce,"__esModule",{value:!0}),ce.notImplemented=ce.bitMask=void 0,ce.isBytes=n,ce.abytes=i,ce.abool=d,ce.numberToHexUnpadded=u,ce.hexToNumber=c,ce.bytesToHex=f,ce.hexToBytes=l,ce.bytesToNumberBE=h,ce.bytesToNumberLE=w,ce.numberToBytesBE=$,ce.numberToBytesLE=U,ce.numberToVarBytesBE=O,ce.ensureBytes=J,ce.concatBytes=K,ce.equalBytes=_,ce.utf8ToBytes=E,ce.inRange=D,ce.aInRange=k,ce.bitLen=B,ce.bitGet=p,ce.bitSet=S,ce.createHmacDrbg=q,ce.validateObject=L,ce.memoized=b;const e=BigInt(0),t=BigInt(1);function n(g){return g instanceof Uint8Array||ArrayBuffer.isView(g)&&g.constructor.name==="Uint8Array"}function i(g){if(!n(g))throw new Error("Uint8Array expected")}function d(g,I){if(typeof I!="boolean")throw new Error(g+" boolean expected, got "+I)}function u(g){const I=g.toString(16);return I.length&1?"0"+I:I}function c(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);return g===""?e:BigInt("0x"+g)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",o=Array.from({length:256},(g,I)=>I.toString(16).padStart(2,"0"));function f(g){if(i(g),a)return g.toHex();let I="";for(let j=0;j<g.length;j++)I+=o[g[j]];return I}const r={_0:48,_9:57,A:65,F:70,a:97,f:102};function s(g){if(g>=r._0&&g<=r._9)return g-r._0;if(g>=r.A&&g<=r.F)return g-(r.A-10);if(g>=r.a&&g<=r.f)return g-(r.a-10)}function l(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);if(a)return Uint8Array.fromHex(g);const I=g.length,j=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const N=new Uint8Array(j);for(let y=0,v=0;y<j;y++,v+=2){const A=s(g.charCodeAt(v)),X=s(g.charCodeAt(v+1));if(A===void 0||X===void 0){const V=g[v]+g[v+1];throw new Error('hex string expected, got non-hex character "'+V+'" at index '+v)}N[y]=A*16+X}return N}function h(g){return c(f(g))}function w(g){return i(g),c(f(Uint8Array.from(g).reverse()))}function $(g,I){return l(g.toString(16).padStart(I*2,"0"))}function U(g,I){return $(g,I).reverse()}function O(g){return l(u(g))}function J(g,I,j){let N;if(typeof I=="string")try{N=l(I)}catch(v){throw new Error(g+" must be hex string or Uint8Array, cause: "+v)}else if(n(I))N=Uint8Array.from(I);else throw new Error(g+" must be hex string or Uint8Array");const y=N.length;if(typeof j=="number"&&y!==j)throw new Error(g+" of length "+j+" expected, got "+y);return N}function K(...g){let I=0;for(let N=0;N<g.length;N++){const y=g[N];i(y),I+=y.length}const j=new Uint8Array(I);for(let N=0,y=0;N<g.length;N++){const v=g[N];j.set(v,y),y+=v.length}return j}function _(g,I){if(g.length!==I.length)return!1;let j=0;for(let N=0;N<g.length;N++)j|=g[N]^I[N];return j===0}function E(g){if(typeof g!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(g))}const P=g=>typeof g=="bigint"&&e<=g;function D(g,I,j){return P(g)&&P(I)&&P(j)&&I<=g&&g<j}function k(g,I,j,N){if(!D(I,j,N))throw new Error("expected valid "+g+": "+j+" <= n < "+N+", got "+I)}function B(g){let I;for(I=0;g>e;g>>=t,I+=1);return I}function p(g,I){return g>>BigInt(I)&t}function S(g,I,j){return g|(j?t:e)<<BigInt(I)}const Y=g=>(t<<BigInt(g))-t;ce.bitMask=Y;const x=g=>new Uint8Array(g),M=g=>Uint8Array.from(g);function q(g,I,j){if(typeof g!="number"||g<2)throw new Error("hashLen must be a number");if(typeof I!="number"||I<2)throw new Error("qByteLen must be a number");if(typeof j!="function")throw new Error("hmacFn must be a function");let N=x(g),y=x(g),v=0;const A=()=>{N.fill(1),y.fill(0),v=0},X=(...ne)=>j(y,N,...ne),V=(ne=x(0))=>{y=X(M([0]),ne),N=X(),ne.length!==0&&(y=X(M([1]),ne),N=X())},W=()=>{if(v++>=1e3)throw new Error("drbg: tried 1000 values");let ne=0;const G=[];for(;ne<I;){N=X();const ie=N.slice();G.push(ie),ne+=N.length}return K(...G)};return(ne,G)=>{A(),V(ne);let ie;for(;!(ie=G(W()));)V();return A(),ie}}const z={bigint:g=>typeof g=="bigint",function:g=>typeof g=="function",boolean:g=>typeof g=="boolean",string:g=>typeof g=="string",stringOrUint8Array:g=>typeof g=="string"||n(g),isSafeInteger:g=>Number.isSafeInteger(g),array:g=>Array.isArray(g),field:(g,I)=>I.Fp.isValid(g),hash:g=>typeof g=="function"&&Number.isSafeInteger(g.outputLen)};function L(g,I,j={}){const N=(y,v,A)=>{const X=z[v];if(typeof X!="function")throw new Error("invalid validator function");const V=g[y];if(!(A&&V===void 0)&&!X(V,g))throw new Error("param "+String(y)+" is invalid. Expected "+v+", got "+V)};for(const[y,v]of Object.entries(I))N(y,v,!1);for(const[y,v]of Object.entries(j))N(y,v,!0);return g}const H=()=>{throw new Error("not implemented")};ce.notImplemented=H;function b(g){const I=new WeakMap;return(j,...N)=>{const y=I.get(j);if(y!==void 0)return y;const v=g(j,...N);return I.set(j,v),v}}return ce}var ke={},Cn={},yt={},mo;function hl(){return mo||(mo=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.crypto=void 0,yt.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),yt}var yo;function Ut(){return yo||(yo=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=i,e.abytes=d,e.ahash=u,e.aexists=c,e.aoutput=a,e.u8=o,e.u32=f,e.clean=r,e.createView=s,e.rotr=l,e.rotl=h,e.byteSwap=w,e.byteSwap32=$,e.bytesToHex=J,e.hexToBytes=E,e.asyncLoop=D,e.utf8ToBytes=k,e.bytesToUtf8=B,e.toBytes=p,e.kdfInputToBytes=S,e.concatBytes=Y,e.checkOpts=x,e.createHasher=q,e.createOptHasher=z,e.createXOFer=L,e.randomBytes=H;const t=hl();function n(b){return b instanceof Uint8Array||ArrayBuffer.isView(b)&&b.constructor.name==="Uint8Array"}function i(b){if(!Number.isSafeInteger(b)||b<0)throw new Error("positive integer expected, got "+b)}function d(b,...g){if(!n(b))throw new Error("Uint8Array expected");if(g.length>0&&!g.includes(b.length))throw new Error("Uint8Array expected of length "+g+", got length="+b.length)}function u(b){if(typeof b!="function"||typeof b.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");i(b.outputLen),i(b.blockLen)}function c(b,g=!0){if(b.destroyed)throw new Error("Hash instance has been destroyed");if(g&&b.finished)throw new Error("Hash#digest() has already been called")}function a(b,g){d(b);const I=g.outputLen;if(b.length<I)throw new Error("digestInto() expects output buffer of length at least "+I)}function o(b){return new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}function f(b){return new Uint32Array(b.buffer,b.byteOffset,Math.floor(b.byteLength/4))}function r(...b){for(let g=0;g<b.length;g++)b[g].fill(0)}function s(b){return new DataView(b.buffer,b.byteOffset,b.byteLength)}function l(b,g){return b<<32-g|b>>>g}function h(b,g){return b<<g|b>>>32-g>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function w(b){return b<<24&4278190080|b<<8&16711680|b>>>8&65280|b>>>24&255}e.swap8IfBE=e.isLE?b=>b:b=>w(b),e.byteSwapIfBE=e.swap8IfBE;function $(b){for(let g=0;g<b.length;g++)b[g]=w(b[g]);return b}e.swap32IfBE=e.isLE?b=>b:$;const U=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",O=Array.from({length:256},(b,g)=>g.toString(16).padStart(2,"0"));function J(b){if(d(b),U)return b.toHex();let g="";for(let I=0;I<b.length;I++)g+=O[b[I]];return g}const K={_0:48,_9:57,A:65,F:70,a:97,f:102};function _(b){if(b>=K._0&&b<=K._9)return b-K._0;if(b>=K.A&&b<=K.F)return b-(K.A-10);if(b>=K.a&&b<=K.f)return b-(K.a-10)}function E(b){if(typeof b!="string")throw new Error("hex string expected, got "+typeof b);if(U)return Uint8Array.fromHex(b);const g=b.length,I=g/2;if(g%2)throw new Error("hex string expected, got unpadded hex of length "+g);const j=new Uint8Array(I);for(let N=0,y=0;N<I;N++,y+=2){const v=_(b.charCodeAt(y)),A=_(b.charCodeAt(y+1));if(v===void 0||A===void 0){const X=b[y]+b[y+1];throw new Error('hex string expected, got non-hex character "'+X+'" at index '+y)}j[N]=v*16+A}return j}const P=async()=>{};e.nextTick=P;async function D(b,g,I){let j=Date.now();for(let N=0;N<b;N++){I(N);const y=Date.now()-j;y>=0&&y<g||(await(0,e.nextTick)(),j+=y)}}function k(b){if(typeof b!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(b))}function B(b){return new TextDecoder().decode(b)}function p(b){return typeof b=="string"&&(b=k(b)),d(b),b}function S(b){return typeof b=="string"&&(b=k(b)),d(b),b}function Y(...b){let g=0;for(let j=0;j<b.length;j++){const N=b[j];d(N),g+=N.length}const I=new Uint8Array(g);for(let j=0,N=0;j<b.length;j++){const y=b[j];I.set(y,N),N+=y.length}return I}function x(b,g){if(g!==void 0&&{}.toString.call(g)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(b,g)}class M{}e.Hash=M;function q(b){const g=j=>b().update(p(j)).digest(),I=b();return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=()=>b(),g}function z(b){const g=(j,N)=>b(N).update(p(j)).digest(),I=b({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=j=>b(j),g}function L(b){const g=(j,N)=>b(N).update(p(j)).digest(),I=b({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=j=>b(j),g}e.wrapConstructor=q,e.wrapConstructorWithOpts=z,e.wrapXOFConstructorWithOpts=L;function H(b=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(b));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(b));throw new Error("crypto.getRandomValues must be defined")}})(Cn)),Cn}var bo;function pl(){if(bo)return ke;bo=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.aoutput=ke.anumber=ke.aexists=ke.abytes=void 0;const e=Ut();return ke.abytes=e.abytes,ke.aexists=e.aexists,ke.anumber=e.anumber,ke.aoutput=e.aoutput,ke}var wo;function Ia(){return wo||(wo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.assertBytes=e.assertBool=e.utf8ToBytes=e.toHex=e.createView=e.concatBytes=e.bytesToHex=void 0,e.bytesToUtf8=u,e.hexToBytes=c,e.equalsBytes=a,e.wrapHash=o;const t=fl();Object.defineProperty(e,"assertBool",{enumerable:!0,get:function(){return t.abool}});const n=pl();Object.defineProperty(e,"assertBytes",{enumerable:!0,get:function(){return n.abytes}});const i=Ut();var d=Ut();Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return d.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return d.createView}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return d.utf8ToBytes}});function u(f){if(!(f instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof f}`);return new TextDecoder().decode(f)}function c(f){const r=f.startsWith("0x")?f.substring(2):f;return(0,i.hexToBytes)(r)}function a(f,r){if(f.length!==r.length)return!1;for(let s=0;s<f.length;s++)if(f[s]!==r[s])return!1;return!0}function o(f){return r=>((0,n.abytes)(r),f(r))}})(Tn)),Tn}var Eo;function Tt(){if(Eo)return Oe;Eo=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.compare=Oe.concat=Oe.toHex=Oe.toBytes=void 0;const e=Ia();function t(u){return u instanceof Uint8Array?u:typeof u=="string"?(0,e.hexToBytes)(u):new Uint8Array(u)}Oe.toBytes=t;function n(u){return typeof u=="string"?((0,e.hexToBytes)(u),u.replace(/^(0x)?/,"0x")):u instanceof Uint8Array?"0x"+(0,e.bytesToHex)(u):"0x"+(0,e.bytesToHex)(new Uint8Array(u))}Oe.toHex=n;function i(u){return(0,e.concatBytes)(...u.map(t))}Oe.concat=i;function d(u,c){const a=BigInt(n(u))-BigInt(n(c));return a>0?1:a<0?-1:0}return Oe.compare=d,Oe}var Se={},Ge={},Be={},de={},re={},So;function gl(){if(So)return re;So=1,Object.defineProperty(re,"__esModule",{value:!0}),re.toBig=re.shrSL=re.shrSH=re.rotrSL=re.rotrSH=re.rotrBL=re.rotrBH=re.rotr32L=re.rotr32H=re.rotlSL=re.rotlSH=re.rotlBL=re.rotlBH=re.add5L=re.add5H=re.add4L=re.add4H=re.add3L=re.add3H=void 0,re.add=O,re.fromBig=n,re.split=i;const e=BigInt(2**32-1),t=BigInt(32);function n(B,p=!1){return p?{h:Number(B&e),l:Number(B>>t&e)}:{h:Number(B>>t&e)|0,l:Number(B&e)|0}}function i(B,p=!1){const S=B.length;let Y=new Uint32Array(S),x=new Uint32Array(S);for(let M=0;M<S;M++){const{h:q,l:z}=n(B[M],p);[Y[M],x[M]]=[q,z]}return[Y,x]}const d=(B,p)=>BigInt(B>>>0)<<t|BigInt(p>>>0);re.toBig=d;const u=(B,p,S)=>B>>>S;re.shrSH=u;const c=(B,p,S)=>B<<32-S|p>>>S;re.shrSL=c;const a=(B,p,S)=>B>>>S|p<<32-S;re.rotrSH=a;const o=(B,p,S)=>B<<32-S|p>>>S;re.rotrSL=o;const f=(B,p,S)=>B<<64-S|p>>>S-32;re.rotrBH=f;const r=(B,p,S)=>B>>>S-32|p<<64-S;re.rotrBL=r;const s=(B,p)=>p;re.rotr32H=s;const l=(B,p)=>B;re.rotr32L=l;const h=(B,p,S)=>B<<S|p>>>32-S;re.rotlSH=h;const w=(B,p,S)=>p<<S|B>>>32-S;re.rotlSL=w;const $=(B,p,S)=>p<<S-32|B>>>64-S;re.rotlBH=$;const U=(B,p,S)=>B<<S-32|p>>>64-S;re.rotlBL=U;function O(B,p,S,Y){const x=(p>>>0)+(Y>>>0);return{h:B+S+(x/2**32|0)|0,l:x|0}}const J=(B,p,S)=>(B>>>0)+(p>>>0)+(S>>>0);re.add3L=J;const K=(B,p,S,Y)=>p+S+Y+(B/2**32|0)|0;re.add3H=K;const _=(B,p,S,Y)=>(B>>>0)+(p>>>0)+(S>>>0)+(Y>>>0);re.add4L=_;const E=(B,p,S,Y,x)=>p+S+Y+x+(B/2**32|0)|0;re.add4H=E;const P=(B,p,S,Y,x)=>(B>>>0)+(p>>>0)+(S>>>0)+(Y>>>0)+(x>>>0);re.add5L=P;const D=(B,p,S,Y,x,M)=>p+S+Y+x+M+(B/2**32|0)|0;re.add5H=D;const k={fromBig:n,split:i,toBig:d,shrSH:u,shrSL:c,rotrSH:a,rotrSL:o,rotrBH:f,rotrBL:r,rotr32H:s,rotr32L:l,rotlSH:h,rotlSL:w,rotlBH:$,rotlBL:U,add:O,add3L:J,add3H:K,add4L:_,add4H:E,add5H:D,add5L:P};return re.default=k,re}var vo;function ml(){if(vo)return de;vo=1,Object.defineProperty(de,"__esModule",{value:!0}),de.shake256=de.shake128=de.keccak_512=de.keccak_384=de.keccak_256=de.keccak_224=de.sha3_512=de.sha3_384=de.sha3_256=de.sha3_224=de.Keccak=void 0,de.keccakP=U;const e=gl(),t=Ut(),n=BigInt(0),i=BigInt(1),d=BigInt(2),u=BigInt(7),c=BigInt(256),a=BigInt(113),o=[],f=[],r=[];for(let _=0,E=i,P=1,D=0;_<24;_++){[P,D]=[D,(2*P+3*D)%5],o.push(2*(5*D+P)),f.push((_+1)*(_+2)/2%64);let k=n;for(let B=0;B<7;B++)E=(E<<i^(E>>u)*a)%c,E&d&&(k^=i<<(i<<BigInt(B))-i);r.push(k)}const s=(0,e.split)(r,!0),l=s[0],h=s[1],w=(_,E,P)=>P>32?(0,e.rotlBH)(_,E,P):(0,e.rotlSH)(_,E,P),$=(_,E,P)=>P>32?(0,e.rotlBL)(_,E,P):(0,e.rotlSL)(_,E,P);function U(_,E=24){const P=new Uint32Array(10);for(let D=24-E;D<24;D++){for(let p=0;p<10;p++)P[p]=_[p]^_[p+10]^_[p+20]^_[p+30]^_[p+40];for(let p=0;p<10;p+=2){const S=(p+8)%10,Y=(p+2)%10,x=P[Y],M=P[Y+1],q=w(x,M,1)^P[S],z=$(x,M,1)^P[S+1];for(let L=0;L<50;L+=10)_[p+L]^=q,_[p+L+1]^=z}let k=_[2],B=_[3];for(let p=0;p<24;p++){const S=f[p],Y=w(k,B,S),x=$(k,B,S),M=o[p];k=_[M],B=_[M+1],_[M]=Y,_[M+1]=x}for(let p=0;p<50;p+=10){for(let S=0;S<10;S++)P[S]=_[p+S];for(let S=0;S<10;S++)_[p+S]^=~P[(S+2)%10]&P[(S+4)%10]}_[0]^=l[D],_[1]^=h[D]}(0,t.clean)(P)}class O extends t.Hash{constructor(E,P,D,k=!1,B=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=E,this.suffix=P,this.outputLen=D,this.enableXOF=k,this.rounds=B,(0,t.anumber)(D),!(0<E&&E<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),U(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(E){(0,t.aexists)(this),E=(0,t.toBytes)(E),(0,t.abytes)(E);const{blockLen:P,state:D}=this,k=E.length;for(let B=0;B<k;){const p=Math.min(P-this.pos,k-B);for(let S=0;S<p;S++)D[this.pos++]^=E[B++];this.pos===P&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:E,suffix:P,pos:D,blockLen:k}=this;E[D]^=P,(P&128)!==0&&D===k-1&&this.keccak(),E[k-1]^=128,this.keccak()}writeInto(E){(0,t.aexists)(this,!1),(0,t.abytes)(E),this.finish();const P=this.state,{blockLen:D}=this;for(let k=0,B=E.length;k<B;){this.posOut>=D&&this.keccak();const p=Math.min(D-this.posOut,B-k);E.set(P.subarray(this.posOut,this.posOut+p),k),this.posOut+=p,k+=p}return E}xofInto(E){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(E)}xof(E){return(0,t.anumber)(E),this.xofInto(new Uint8Array(E))}digestInto(E){if((0,t.aoutput)(E,this),this.finished)throw new Error("digest() was already called");return this.writeInto(E),this.destroy(),E}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(E){const{blockLen:P,suffix:D,outputLen:k,rounds:B,enableXOF:p}=this;return E||(E=new O(P,D,k,p,B)),E.state32.set(this.state32),E.pos=this.pos,E.posOut=this.posOut,E.finished=this.finished,E.rounds=B,E.suffix=D,E.outputLen=k,E.enableXOF=p,E.destroyed=this.destroyed,E}}de.Keccak=O;const J=(_,E,P)=>(0,t.createHasher)(()=>new O(E,_,P));de.sha3_224=J(6,144,224/8),de.sha3_256=J(6,136,256/8),de.sha3_384=J(6,104,384/8),de.sha3_512=J(6,72,512/8),de.keccak_224=J(1,144,224/8),de.keccak_256=J(1,136,256/8),de.keccak_384=J(1,104,384/8),de.keccak_512=J(1,72,512/8);const K=(_,E,P)=>(0,t.createXOFer)((D={})=>new O(E,_,D.dkLen===void 0?P:D.dkLen,!0));return de.shake128=K(31,168,128/8),de.shake256=K(31,136,256/8),de}var $o;function yl(){if($o)return Be;$o=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.keccak512=Be.keccak384=Be.keccak256=Be.keccak224=void 0;const e=ml(),t=Ia();return Be.keccak224=(0,t.wrapHash)(e.keccak_224),Be.keccak256=(()=>{const n=(0,t.wrapHash)(e.keccak_256);return n.create=e.keccak_256.create,n})(),Be.keccak384=(0,t.wrapHash)(e.keccak_384),Be.keccak512=(0,t.wrapHash)(e.keccak_512),Be}var Ro;function _a(){if(Ro)return Ge;Ro=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.standardNodeHash=Ge.standardLeafHash=Ge.keccak256=void 0;const e=Ra(),t=yl(),n=Tt();function i(c){return(0,n.toHex)((0,t.keccak256)((0,n.toBytes)(c)))}Ge.keccak256=i;function d(c,a){return i(i((0,e.encode)(c,a)))}Ge.standardLeafHash=d;function u(c,a){return i((0,n.concat)([c,a].sort(n.compare)))}return Ge.standardNodeHash=u,Ge}var xe={},Io;function Kt(){if(Io)return xe;Io=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.invariant=xe.validateArgument=xe.InvalidArgumentError=xe.InvariantError=xe.throwError=void 0;function e(u){throw new Error(u)}xe.throwError=e;class t extends Error{constructor(c){super(c),this.name="InvariantError"}}xe.InvariantError=t;class n extends Error{constructor(c){super(c),this.name="InvalidArgumentError"}}xe.InvalidArgumentError=n;function i(u,c){if(!u)throw new n(c)}xe.validateArgument=i;function d(u,c){if(!u)throw new t(c)}return xe.invariant=d,xe}var _o;function os(){if(_o)return Se;_o=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.renderMerkleTree=Se.isValidMerkleTree=Se.processMultiProof=Se.getMultiProof=Se.processProof=Se.getProof=Se.makeMerkleTree=void 0;const e=Tt(),t=_a(),n=Kt(),i=_=>2*_+1,d=_=>2*_+2,u=_=>_>0?Math.floor((_-1)/2):(0,n.throwError)("Root has no parent"),c=_=>_>0?_-(-1)**(_%2):(0,n.throwError)("Root has no siblings"),a=(_,E)=>E>=0&&E<_.length,o=(_,E)=>a(_,i(E)),f=(_,E)=>a(_,E)&&!o(_,E),r=_=>(0,e.toBytes)(_).length===32,s=(_,E)=>void(f(_,E)||(0,n.throwError)("Index is not a leaf")),l=_=>void(r(_)||(0,n.throwError)("Merkle tree nodes must be Uint8Array of length 32"));function h(_,E=t.standardNodeHash){_.forEach(l),(0,n.validateArgument)(_.length!==0,"Expected non-zero number of leaves");const P=new Array(2*_.length-1);for(const[D,k]of _.entries())P[P.length-1-D]=(0,e.toHex)(k);for(let D=P.length-1-_.length;D>=0;D--)P[D]=E(P[i(D)],P[d(D)]);return P}Se.makeMerkleTree=h;function w(_,E){s(_,E);const P=[];for(;E>0;)P.push((0,e.toHex)(_[c(E)])),E=u(E);return P}Se.getProof=w;function $(_,E,P=t.standardNodeHash){return l(_),E.forEach(l),(0,e.toHex)(E.reduce(P,_))}Se.processProof=$;function U(_,E){E.forEach(B=>s(_,B)),E.sort((B,p)=>p-B),(0,n.validateArgument)(E.slice(1).every((B,p)=>B!==E[p]),"Cannot prove duplicated index");const P=Array.from(E),D=[],k=[];for(;P.length>0&&P[0]>0;){const B=P.shift(),p=c(B),S=u(B);p===P[0]?(k.push(!0),P.shift()):(k.push(!1),D.push((0,e.toHex)(_[p]))),P.push(S)}return E.length===0&&D.push((0,e.toHex)(_[0])),{leaves:E.map(B=>(0,e.toHex)(_[B])),proof:D,proofFlags:k}}Se.getMultiProof=U;function O(_,E=t.standardNodeHash){_.leaves.forEach(l),_.proof.forEach(l),(0,n.validateArgument)(_.proof.length>=_.proofFlags.filter(k=>!k).length,"Invalid multiproof format"),(0,n.validateArgument)(_.leaves.length+_.proof.length===_.proofFlags.length+1,"Provided leaves and multiproof are not compatible");const P=Array.from(_.leaves),D=Array.from(_.proof);for(const k of _.proofFlags){const B=P.shift(),p=k?P.shift():D.shift();(0,n.invariant)(B!==void 0&&p!==void 0),P.push(E(B,p))}return(0,n.invariant)(P.length+D.length===1),(0,e.toHex)(P.pop()??D.shift())}Se.processMultiProof=O;function J(_,E=t.standardNodeHash){for(const[P,D]of _.entries()){if(!r(D))return!1;const k=i(P),B=d(P);if(B>=_.length){if(k<_.length)return!1}else if((0,e.compare)(D,E(_[k],_[B])))return!1}return _.length>0}Se.isValidMerkleTree=J;function K(_){(0,n.validateArgument)(_.length!==0,"Expected non-zero number of nodes");const E=[[0,[]]],P=[];for(;E.length>0;){const[D,k]=E.pop();P.push(k.slice(0,-1).map(B=>[" ","│ "][B]).join("")+k.slice(-1).map(B=>["└─ ","├─ "][B]).join("")+D+") "+(0,e.toHex)(_[D])),d(D)<_.length&&(E.push([d(D),k.concat(0)]),E.push([i(D),k.concat(1)]))}return P.join(`
|
|
4
|
-
`)}return Se.renderMerkleTree=K,Se}var bt={},wt={},xo;function bl(){return xo||(xo=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.defaultOptions=void 0,wt.defaultOptions={sortLeaves:!0}),wt}var Ao;function xa(){if(Ao)return bt;Ao=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.MerkleTreeImpl=void 0;const e=Tt(),t=os(),n=bl(),i=Kt();class d{constructor(c,a,o,f){this.tree=c,this.values=a,this.leafHash=o,this.nodeHash=f,(0,i.validateArgument)(a.every(({value:r})=>typeof r!="number"),"Leaf values cannot be numbers"),this.hashLookup=Object.fromEntries(a.map(({treeIndex:r},s)=>[c[r],s]))}static prepare(c,a={},o,f){const r=a.sortLeaves??n.defaultOptions.sortLeaves,s=c.map((w,$)=>({value:w,valueIndex:$,hash:o(w)}));r&&s.sort((w,$)=>(0,e.compare)(w.hash,$.hash));const l=(0,t.makeMerkleTree)(s.map(w=>w.hash),f),h=c.map(w=>({value:w,treeIndex:0}));for(const[w,{valueIndex:$}]of s.entries())h[$].treeIndex=l.length-w-1;return[l,h]}get root(){return this.tree[0]}get length(){return this.values.length}at(c){var a;return(a=this.values.at(c))==null?void 0:a.value}render(){return(0,t.renderMerkleTree)(this.tree)}*entries(){for(const[c,{value:a}]of this.values.entries())yield[c,a]}validate(){this.values.forEach((c,a)=>this._validateValueAt(a)),(0,i.invariant)((0,t.isValidMerkleTree)(this.tree,this.nodeHash),"Merkle tree is invalid")}leafLookup(c){const a=this.hashLookup[this.leafHash(c)];return(0,i.validateArgument)(typeof a<"u","Leaf is not in tree"),a}getProof(c){const a=typeof c=="number"?c:this.leafLookup(c);this._validateValueAt(a);const{treeIndex:o}=this.values[a],f=(0,t.getProof)(this.tree,o);return(0,i.invariant)(this._verify(this.tree[o],f),"Unable to prove value"),f}getMultiProof(c){const a=c.map(r=>typeof r=="number"?r:this.leafLookup(r));for(const r of a)this._validateValueAt(r);const o=a.map(r=>this.values[r].treeIndex),f=(0,t.getMultiProof)(this.tree,o);return(0,i.invariant)(this._verifyMultiProof(f),"Unable to prove values"),{leaves:f.leaves.map(r=>this.values[this.hashLookup[r]].value),proof:f.proof,proofFlags:f.proofFlags}}verify(c,a){return this._verify(this._leafHash(c),a)}verifyMultiProof(c){return this._verifyMultiProof({leaves:c.leaves.map(a=>this._leafHash(a)),proof:c.proof,proofFlags:c.proofFlags})}_validateValueAt(c){const a=this.values[c];(0,i.validateArgument)(a!==void 0,"Index out of bounds"),(0,i.invariant)(this.tree[a.treeIndex]===this.leafHash(a.value),"Merkle tree does not contain the expected value")}_leafHash(c){if(typeof c=="number"){const a=this.values[c];(0,i.validateArgument)(a!==void 0,"Index out of bounds"),c=a.value}return this.leafHash(c)}_verify(c,a){return this.root===(0,t.processProof)(c,a,this.nodeHash)}_verifyMultiProof(c){return this.root===(0,t.processMultiProof)(c,this.nodeHash)}}return bt.MerkleTreeImpl=d,bt}var To;function wl(){if(To)return Ze;To=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.SimpleMerkleTree=Ze.formatLeaf=void 0;const e=Ra(),t=Tt(),n=os(),i=xa(),d=Kt();function u(a){return(0,t.toHex)((0,e.encode)(["bytes32"],[a]))}Ze.formatLeaf=u;class c extends i.MerkleTreeImpl{static of(o,f={}){const[r,s]=i.MerkleTreeImpl.prepare(o,f,u,f.nodeHash);return new c(r,s,u,f.nodeHash)}static load(o,f){(0,d.validateArgument)(o.format==="simple-v1",`Unknown format '${o.format}'`),(0,d.validateArgument)(f==null!=(o.hash=="custom"),f?"Data does not expect a custom node hashing function":"Data expects a custom node hashing function");const r=new c(o.tree,o.values,u,f);return r.validate(),r}static verify(o,f,r,s){return(0,t.toHex)(o)===(0,n.processProof)(u(f),r,s)}static verifyMultiProof(o,f,r){return(0,t.toHex)(o)===(0,n.processMultiProof)(f,r)}dump(){return{format:"simple-v1",tree:this.tree,values:this.values.map(({value:o,treeIndex:f})=>({value:(0,t.toHex)(o),treeIndex:f})),...this.nodeHash?{hash:"custom"}:{}}}}return Ze.SimpleMerkleTree=c,Ze}var Et={},Co;function El(){if(Co)return Et;Co=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.StandardMerkleTree=void 0;const e=Tt(),t=os(),n=xa(),i=_a(),d=Kt();class u extends n.MerkleTreeImpl{constructor(a,o,f){super(a,o,r=>(0,i.standardLeafHash)(f,r)),this.tree=a,this.values=o,this.leafEncoding=f}static of(a,o,f={}){const[r,s]=n.MerkleTreeImpl.prepare(a,f,l=>(0,i.standardLeafHash)(o,l));return new u(r,s,o)}static load(a){(0,d.validateArgument)(a.format==="standard-v1",`Unknown format '${a.format}'`),(0,d.validateArgument)(a.leafEncoding!==void 0,"Expected leaf encoding");const o=new u(a.tree,a.values,a.leafEncoding);return o.validate(),o}static verify(a,o,f,r){return(0,e.toHex)(a)===(0,t.processProof)((0,i.standardLeafHash)(o,f),r)}static verifyMultiProof(a,o,f){return(0,e.toHex)(a)===(0,t.processMultiProof)({leaves:f.leaves.map(r=>(0,i.standardLeafHash)(o,r)),proof:f.proof,proofFlags:f.proofFlags})}dump(){return{format:"standard-v1",leafEncoding:this.leafEncoding,tree:this.tree,values:this.values}}}return Et.StandardMerkleTree=u,Et}var jo;function Sl(){return jo||(jo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StandardMerkleTree=e.SimpleMerkleTree=void 0;var t=wl();Object.defineProperty(e,"SimpleMerkleTree",{enumerable:!0,get:function(){return t.SimpleMerkleTree}});var n=El();Object.defineProperty(e,"StandardMerkleTree",{enumerable:!0,get:function(){return n.StandardMerkleTree}})})(fr)),fr}var vl=Sl();const Aa=1,Ta=5,Ca=70,$l=720*60*60*1e3,ja=1e6,Po={couponManager:"0x3fd3056ee72a2a85e9392fab3a450e7736536081",collectionDiscountCoupon:"0xc914507fe297b2dddd1232ac3a8903f1c125e794"};function Pa(e){try{const t=ir(or.CouponManager,e),n=ir(or.CollectionDiscountCoupon,e);return{couponManager:{address:t.address,name:t.name,version:t.version,abi:t.abi},collectionDiscountCoupon:n.address}}catch{if(e!==zn.ChainId.MATIC_MAINNET)return null;const{abi:t}=ir(or.CouponManager,zn.ChainId.MATIC_AMOY);return{couponManager:{address:Po.couponManager,name:"CouponManager",version:"1.0.0",abi:t},collectionDiscountCoupon:Po.collectionDiscountCoupon}}}function as(e){return[...new Set(e.map(t=>t.toLowerCase()))]}function Rl(e){const t=as(e);if(t.length===0)throw new We("collections");return vl.StandardMerkleTree.of(t.map(n=>[n]),["address"]).root}function Oa(e,t){return bc.encode(["uint256","uint256","bytes32"],[Aa,e,t])}function Il(){return{Coupon:[{name:"checks",type:"Checks"},{name:"couponAddress",type:"address"},{name:"data",type:"bytes"}],Checks:Es.Checks,ExternalCheck:Es.ExternalCheck}}const Dt=e=>Math.floor(e/1e3);function _l(e,t){return{name:t.couponManager.name,version:t.couponManager.version,salt:Rt(ca(e),32),verifyingContract:t.couponManager.address}}function xl(e,t,n){return{checks:{uses:e.uses,expiration:Dt(e.expiration),effective:Dt(e.effective),salt:Rt(e.salt,32),contractSignatureIndex:e.contractSignatureIndex,signerSignatureIndex:e.signerSignatureIndex,allowedRoot:Rt(e.allowedRoot||"0x",32),externalChecks:[]},couponAddress:t,data:n}}class We extends Error{constructor(t){super(`Invalid sale: ${t}`),this.problem=t,this.name="SaleInputError"}}function ka(e,t=Date.now()){if(as(e.collections).length===0)throw new We("collections");if(!Number.isInteger(e.discountPct)||e.discountPct<Ta||e.discountPct>Ca)throw new We("pct");const n=e.startsAtMs??t;if(!(e.endsAtMs>t)||!(e.endsAtMs>n))throw new We("window");if(e.endsAtMs-Math.max(n,t)>$l)throw new We("duration");if(e.uses!==void 0&&(!Number.isInteger(e.uses)||e.uses<1))throw new We("uses")}const Al=["function contractSignatureIndex() view returns (uint256)","function signerSignatureIndex(address) view returns (uint256)"];async function Tl(e,t){const n=new aa(e,Al,gc()),[i,d]=await Promise.all([n.contractSignatureIndex(),n.signerSignatureIndex(t)]);return{contractSignatureIndex:i.toNumber(),signerSignatureIndex:d.toNumber()}}async function Cl(e,t={}){const n=t.now?t.now():Date.now();ka(e,n);const i=Pa(e.chainId);if(!i)throw new Error(`Coupons are not available on chain ${e.chainId}`);const d=(await e.signer.getAddress()).toLowerCase(),u=as(e.collections),c=await(t.readIndexes??Tl)(i.couponManager.address,d),a={uses:e.uses??ja,expiration:e.endsAtMs,effective:e.startsAtMs??n,salt:ca(yc(32)),contractSignatureIndex:c.contractSignatureIndex,signerSignatureIndex:c.signerSignatureIndex,allowedRoot:"0x",externalChecks:[]},o=e.discountPct*1e4,f=Oa(o,Rl(u)),r=await e.signer._signTypedData(_l(e.chainId,i),Il(),xl(a,i.collectionDiscountCoupon,f));return{signer:d,chainId:e.chainId,network:zn.Network.MATIC,checks:a,couponAddress:i.collectionDiscountCoupon,discountType:Aa,discount:o,collections:u,signature:r}}async function jl(e,t){const n=await rc(`${It.marketplaceServerUrl}/v1/coupons`,{method:"POST",identity:t,metadata:{signer:"dcl:marketplace",intent:"dcl:create-coupon"},headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await n.json().catch(()=>({}));if(!n.ok||!i.ok||!i.data)throw new Error(i.message??`postCoupon ${n.status}`);return i.data}async function Pl(e){var i;const t=await fetch(`${It.marketplaceServerUrl}/v1/coupons?signer=${e.toLowerCase()}`);if(!t.ok)throw(i=t.body)==null||i.cancel(),new Error(`fetchCreatorSales ${t.status}`);return(await t.json()).data??[]}function Ol(e){return e.checks.uses<ja}function kl(e,t=Date.now()){return e.status==="cancelled"||e.status==="revoked"||e.status==="exhausted"?e.status:e.checks.expiration<=t?"ended":e.checks.effective>t?"scheduled":"active"}async function Bl(e){const{sale:t,signer:n}=e;await tc(n.provider,t.chainId);const i=Pa(t.chainId);if(!i)throw new Error(`Coupons are not available on chain ${t.chainId}`);const d=new aa(i.couponManager.address,i.couponManager.abi,n),u={signature:t.signature,checks:{uses:t.checks.uses,expiration:Dt(t.checks.expiration),effective:Dt(t.checks.effective),salt:Rt(t.checks.salt,32),contractSignatureIndex:t.checks.contractSignatureIndex,signerSignatureIndex:t.checks.signerSignatureIndex,allowedRoot:Rt(t.checks.allowedRoot||"0x",32),allowedProof:[],externalChecks:[]},couponAddress:t.couponAddress,data:Oa(t.discount,t.root),callerData:"0x"};return(await(await d.cancelSignature([u],mc(t.chainId))).wait()).transactionHash}function Mt(e){return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e))}const jn=F.div`
|
|
3
|
+
caused by: `+fa(i,t)):n},au=e=>fa(e,new Set),ha=(e,t,n)=>{if(!(e instanceof Error))return"";const i=n?"":e.message||"";if(t.has(e))return i+": ...";const d=Vt(e);if(d){t.add(e);const u="cause"in e&&typeof e.cause=="function";return i+(u?"":": ")+ha(d,t,u)}else return i},cu=e=>ha(e,new Set),uu=Object.freeze(Object.defineProperty({__proto__:null,findCauseByReference:ou,getErrorCause:Vt,messageWithCauses:cu,stackWithCauses:au},Symbol.toStringTag,{value:"Module"})),lu=ea(uu);var pr,Ps;function du(){if(Ps)return pr;Ps=1;const{ErrorWithCause:e}=iu,{findCauseByReference:t,getErrorCause:n,messageWithCauses:i,stackWithCauses:d}=lu;return pr={ErrorWithCause:e,findCauseByReference:t,getErrorCause:n,stackWithCauses:d,messageWithCauses:i},pr}var gr={},Os;function Kn(){return Os||(Os=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(r){return Array.isArray(r)&&r.length>0}e.isNonEmptyArray=t;function n(r){return r==null}e.isNullOrUndefined=n;function i(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}e.isObject=i;const d=(r,s)=>Object.hasOwnProperty.call(r,s);e.hasProperty=d;function u(r){return Object.getOwnPropertyNames(r)}e.getKnownPropertyNames=u,(function(r){r[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function c(r){if(typeof r!="object"||r===null)return!1;try{let s=r;for(;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(r)===s}catch{return!1}}e.isPlainObject=c;function a(r){return r.charCodeAt(0)<=127}e.isASCII=a;function o(r){return r.split("").reduce((l,h)=>a(h)?l+1:l+2,0)+(r.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length}e.calculateStringSize=o;function f(r){return r.toString().length}e.calculateNumberSize=f})(gr)),gr}var ks;function pa(){if(ks)return xe;ks=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.wrapError=xe.getErrorMessage=xe.isErrorWithStack=xe.isErrorWithMessage=xe.isErrorWithCode=void 0;const e=du(),t=Kn();function n(o){return o instanceof Error||(0,t.isObject)(o)&&o.constructor.name==="Error"}function i(o){return typeof o=="object"&&o!==null&&"code"in o}xe.isErrorWithCode=i;function d(o){return typeof o=="object"&&o!==null&&"message"in o}xe.isErrorWithMessage=d;function u(o){return typeof o=="object"&&o!==null&&"stack"in o}xe.isErrorWithStack=u;function c(o){return d(o)&&typeof o.message=="string"?o.message:(0,t.isNullOrUndefined)(o)?"":String(o)}xe.getErrorMessage=c;function a(o,f){if(n(o)){let r;return Error.length===2?r=new Error(f,{cause:o}):r=new e.ErrorWithCause(f,{cause:o}),i(o)&&(r.code=o.code),r}return f.length>0?new Error(`${String(o)}: ${f}`):new Error(String(o))}return xe.wrapError=a,xe}var Bs;function Ke(){if(Bs)return Te;Bs=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.assertExhaustive=Te.assertStruct=Te.assert=Te.AssertionError=void 0;const e=qe(),t=pa();function n(f){var r,s;return typeof((s=(r=f==null?void 0:f.prototype)==null?void 0:r.constructor)==null?void 0:s.name)=="string"}function i(f){return(0,t.getErrorMessage)(f).replace(/\.$/u,"")}function d(f,r){return n(f)?new f({message:r}):f({message:r})}class u extends Error{constructor(r){super(r.message),this.code="ERR_ASSERTION"}}Te.AssertionError=u;function c(f,r="Assertion failed.",s=u){if(!f)throw r instanceof Error?r:d(s,r)}Te.assert=c;function a(f,r,s="Assertion failed",l=u){try{(0,e.assert)(f,r)}catch(h){throw d(l,`${s}: ${i(h)}.`)}}Te.assertStruct=a;function o(f){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Te.assertExhaustive=o,Te}var dt={},Ls;function ga(){if(Ls)return dt;Ls=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.base64=void 0;const e=qe(),t=Ke(),n=(i,d={})=>{const u=d.paddingRequired??!1,c=d.characterSet??"base64";let a;c==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(c==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let o;return u?o=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):o=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,e.pattern)(i,o)};return dt.base64=n,dt}var se={},mr={},Ns;function fu(){return Ns||(Ns=1,(function(e){/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0;function t(y){return y instanceof Uint8Array||ArrayBuffer.isView(y)&&y.constructor.name==="Uint8Array"}function n(y,...v){if(!t(y))throw new Error("Uint8Array expected");if(v.length>0&&!v.includes(y.length))throw new Error("Uint8Array expected of length "+v+", got length="+y.length)}function i(y,v){return Array.isArray(v)?v.length===0?!0:y?v.every(A=>typeof A=="string"):v.every(A=>Number.isSafeInteger(A)):!1}function d(y){if(typeof y!="function")throw new Error("function expected");return!0}function u(y,v){if(typeof v!="string")throw new Error(`${y}: string expected`);return!0}function c(y){if(!Number.isSafeInteger(y))throw new Error(`invalid integer: ${y}`)}function a(y){if(!Array.isArray(y))throw new Error("array expected")}function o(y,v){if(!i(!0,v))throw new Error(`${y}: array of strings expected`)}function f(y,v){if(!i(!1,v))throw new Error(`${y}: array of numbers expected`)}function r(...y){const v=W=>W,A=(W,oe)=>ne=>W(oe(ne)),X=y.map(W=>W.encode).reduceRight(A,v),V=y.map(W=>W.decode).reduce(A,v);return{encode:X,decode:V}}function s(y){const v=typeof y=="string"?y.split(""):y,A=v.length;o("alphabet",v);const X=new Map(v.map((V,W)=>[V,W]));return{encode:V=>(a(V),V.map(W=>{if(!Number.isSafeInteger(W)||W<0||W>=A)throw new Error(`alphabet.encode: digit index outside alphabet "${W}". Allowed: ${y}`);return v[W]})),decode:V=>(a(V),V.map(W=>{u("alphabet.decode",W);const oe=X.get(W);if(oe===void 0)throw new Error(`Unknown letter: "${W}". Allowed: ${y}`);return oe}))}}function l(y=""){return u("join",y),{encode:v=>(o("join.decode",v),v.join(y)),decode:v=>(u("join.decode",v),v.split(y))}}function h(y,v="="){return c(y),u("padding",v),{encode(A){for(o("padding.encode",A);A.length*y%8;)A.push(v);return A},decode(A){o("padding.decode",A);let X=A.length;if(X*y%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;X>0&&A[X-1]===v;X--)if((X-1)*y%8===0)throw new Error("padding: invalid, string has too much padding");return A.slice(0,X)}}}function w(y){return d(y),{encode:v=>v,decode:v=>y(v)}}function $(y,v,A){if(v<2)throw new Error(`convertRadix: invalid from=${v}, base cannot be less than 2`);if(A<2)throw new Error(`convertRadix: invalid to=${A}, base cannot be less than 2`);if(a(y),!y.length)return[];let X=0;const V=[],W=Array.from(y,ne=>{if(c(ne),ne<0||ne>=v)throw new Error(`invalid integer: ${ne}`);return ne}),oe=W.length;for(;;){let ne=0,G=!0;for(let ie=X;ie<oe;ie++){const ge=W[ie],ae=v*ne,le=ae+ge;if(!Number.isSafeInteger(le)||ae/v!==ne||le-ge!==ae)throw new Error("convertRadix: carry overflow");const me=le/A;ne=le%A;const fe=Math.floor(me);if(W[ie]=fe,!Number.isSafeInteger(fe)||fe*A+ne!==le)throw new Error("convertRadix: carry overflow");if(G)fe?G=!1:X=ie;else continue}if(V.push(ne),G)break}for(let ne=0;ne<y.length-1&&y[ne]===0;ne++)V.push(0);return V.reverse()}const U=(y,v)=>v===0?y:U(v,y%v),O=(y,v)=>y+(v-U(y,v)),J=(()=>{let y=[];for(let v=0;v<40;v++)y.push(2**v);return y})();function K(y,v,A,X){if(a(y),v<=0||v>32)throw new Error(`convertRadix2: wrong from=${v}`);if(A<=0||A>32)throw new Error(`convertRadix2: wrong to=${A}`);if(O(v,A)>32)throw new Error(`convertRadix2: carry overflow from=${v} to=${A} carryBits=${O(v,A)}`);let V=0,W=0;const oe=J[v],ne=J[A]-1,G=[];for(const ie of y){if(c(ie),ie>=oe)throw new Error(`convertRadix2: invalid data word=${ie} from=${v}`);if(V=V<<v|ie,W+v>32)throw new Error(`convertRadix2: carry overflow pos=${W} from=${v}`);for(W+=v;W>=A;W-=A)G.push((V>>W-A&ne)>>>0);const ge=J[W];if(ge===void 0)throw new Error("invalid carry");V&=ge-1}if(V=V<<A-W&ne,!X&&W>=v)throw new Error("Excess padding");if(!X&&V>0)throw new Error(`Non-zero padding: ${V}`);return X&&W>0&&G.push(V>>>0),G}function x(y){c(y);const v=2**8;return{encode:A=>{if(!t(A))throw new Error("radix.encode input should be Uint8Array");return $(Array.from(A),v,y)},decode:A=>(f("radix.decode",A),Uint8Array.from($(A,y,v)))}}function E(y,v=!1){if(c(y),y<=0||y>32)throw new Error("radix2: bits should be in (0..32]");if(O(8,y)>32||O(y,8)>32)throw new Error("radix2: carry overflow");return{encode:A=>{if(!t(A))throw new Error("radix2.encode input should be Uint8Array");return K(Array.from(A),8,y,!v)},decode:A=>(f("radix2.decode",A),Uint8Array.from(K(A,y,8,v)))}}function P(y){return d(y),function(...v){try{return y.apply(null,v)}catch{}}}function D(y,v){return c(y),d(v),{encode(A){if(!t(A))throw new Error("checksum.encode: input should be Uint8Array");const X=v(A).slice(0,y),V=new Uint8Array(A.length+y);return V.set(A),V.set(X,A.length),V},decode(A){if(!t(A))throw new Error("checksum.decode: input should be Uint8Array");const X=A.slice(0,-y),V=A.slice(-y),W=v(X).slice(0,y);for(let oe=0;oe<y;oe++)if(W[oe]!==V[oe])throw new Error("Invalid checksum");return X}}}e.utils={alphabet:s,chain:r,checksum:D,convertRadix:$,convertRadix2:K,radix:x,radix2:E,join:l,padding:h},e.base16=r(E(4),s("0123456789ABCDEF"),l("")),e.base32=r(E(5),s("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h(5),l("")),e.base32nopad=r(E(5),s("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),l("")),e.base32hex=r(E(5),s("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h(5),l("")),e.base32hexnopad=r(E(5),s("0123456789ABCDEFGHIJKLMNOPQRSTUV"),l("")),e.base32crockford=r(E(5),s("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),l(""),w(y=>y.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const k=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",B=(y,v)=>{u("base64",y);const A=v?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,X=v?"base64url":"base64";if(y.length>0&&!A.test(y))throw new Error("invalid base64");return Uint8Array.fromBase64(y,{alphabet:X,lastChunkHandling:"strict"})};e.base64=k?{encode(y){return n(y),y.toBase64()},decode(y){return B(y,!1)}}:r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h(6),l("")),e.base64nopad=r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),l("")),e.base64url=k?{encode(y){return n(y),y.toBase64({alphabet:"base64url"})},decode(y){return B(y,!0)}}:r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(6),l("")),e.base64urlnopad=r(E(6),s("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),l(""));const p=y=>r(x(58),s(y),l(""));e.base58=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=p("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=p("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const S=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(y){let v="";for(let A=0;A<y.length;A+=8){const X=y.subarray(A,A+8);v+=e.base58.encode(X).padStart(S[X.length],"1")}return v},decode(y){let v=[];for(let A=0;A<y.length;A+=11){const X=y.slice(A,A+11),V=S.indexOf(X.length),W=e.base58.decode(X);for(let oe=0;oe<W.length-V;oe++)if(W[oe]!==0)throw new Error("base58xmr: wrong padding");v=v.concat(Array.from(W.slice(W.length-V)))}return Uint8Array.from(v)}};const Y=y=>r(D(4,v=>y(y(v))),e.base58);e.createBase58check=Y,e.base58check=e.createBase58check;const _=r(s("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),l("")),M=[996825010,642813549,513874426,1027748829,705979059];function q(y){const v=y>>25;let A=(y&33554431)<<5;for(let X=0;X<M.length;X++)(v>>X&1)===1&&(A^=M[X]);return A}function z(y,v,A=1){const X=y.length;let V=1;for(let W=0;W<X;W++){const oe=y.charCodeAt(W);if(oe<33||oe>126)throw new Error(`Invalid prefix (${y})`);V=q(V)^oe>>5}V=q(V);for(let W=0;W<X;W++)V=q(V)^y.charCodeAt(W)&31;for(let W of v)V=q(V)^W;for(let W=0;W<6;W++)V=q(V);return V^=A,_.encode(K([V%J[30]],30,5,!1))}function L(y){const v=y==="bech32"?1:734539939,A=E(5),X=A.decode,V=A.encode,W=P(X);function oe(ae,le,me=90){u("bech32.encode prefix",ae),t(le)&&(le=Array.from(le)),f("bech32.encode",le);const fe=ae.length;if(fe===0)throw new TypeError(`Invalid prefix length ${fe}`);const ye=fe+7+le.length;if(me!==!1&&ye>me)throw new TypeError(`Length ${ye} exceeds limit ${me}`);const Je=ae.toLowerCase(),Ye=z(Je,le,v);return`${Je}1${_.encode(le)}${Ye}`}function ne(ae,le=90){u("bech32.decode input",ae);const me=ae.length;if(me<8||le!==!1&&me>le)throw new TypeError(`invalid string length: ${me} (${ae}). Expected (8..${le})`);const fe=ae.toLowerCase();if(ae!==fe&&ae!==ae.toUpperCase())throw new Error("String must be lowercase or uppercase");const ye=fe.lastIndexOf("1");if(ye===0||ye===-1)throw new Error('Letter "1" must be present between prefix and data only');const Je=fe.slice(0,ye),Ye=fe.slice(ye+1);if(Ye.length<6)throw new Error("Data must be at least 6 characters long");const ot=_.decode(Ye).slice(0,-6),Ue=z(Je,ot,v);if(!Ye.endsWith(Ue))throw new Error(`Invalid checksum in ${ae}: expected "${Ue}"`);return{prefix:Je,words:ot}}const G=P(ne);function ie(ae){const{prefix:le,words:me}=ne(ae,!1);return{prefix:le,words:me,bytes:X(me)}}function ge(ae,le){return oe(ae,V(le))}return{encode:oe,decode:ne,encodeFromBytes:ge,decodeToBytes:ie,decodeUnsafe:G,fromWords:X,fromWordsUnsafe:W,toWords:V}}e.bech32=L("bech32"),e.bech32m=L("bech32m"),e.utf8={encode:y=>new TextDecoder().decode(y),decode:y=>new TextEncoder().encode(y)};const H=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b={encode(y){return n(y),y.toHex()},decode(y){return u("hex",y),Uint8Array.fromHex(y)}};e.hex=H?b:r(E(4),s("0123456789abcdef"),l(""),w(y=>{if(typeof y!="string"||y.length%2!==0)throw new TypeError(`hex.decode: expected string, got ${typeof y} with length ${y.length}`);return y.toLowerCase()}));const g={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",j=(y,v)=>{if(typeof y!="string"||!g.hasOwnProperty(y))throw new TypeError(I);if(!t(v))throw new TypeError("bytesToString() expects Uint8Array");return g[y].encode(v)};e.bytesToString=j,e.str=e.bytesToString;const N=(y,v)=>{if(!g.hasOwnProperty(y))throw new TypeError(I);if(typeof v!="string")throw new TypeError("stringToBytes() expects string");return g[y].decode(v)};e.stringToBytes=N,e.bytes=e.stringToBytes})(mr)),mr}var yr={},Ms;function zt(){return Ms||(Ms=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const t=qe(),n=dc(),i=Ke(),d=Yn();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-fA-F]{40}$/u);function u(w){return(0,t.is)(w,e.HexStruct)}e.isHexString=u;function c(w){return(0,t.is)(w,e.StrictHexStruct)}e.isStrictHexString=c;function a(w){(0,i.assert)(u(w),"Value must be a hexadecimal string.")}e.assertIsHexString=a;function o(w){(0,i.assert)(c(w),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function f(w){return(0,t.is)(w,e.HexAddressStruct)||s(w)}e.isValidHexAddress=f;function r(w){(0,i.assert)((0,t.is)(w,e.HexChecksumAddressStruct),"Invalid hex address.");const $=h(w.toLowerCase()),U=h((0,d.bytesToHex)((0,n.keccak_256)($)));return`0x${$.split("").map((O,J)=>{const K=U[J];return(0,i.assert)((0,t.is)(K,(0,t.string)()),"Hash shorter than address."),parseInt(K,16)>7?O.toUpperCase():O}).join("")}`}e.getChecksumAddress=r;function s(w){return(0,t.is)(w,e.HexChecksumAddressStruct)?r(w)===w:!1}e.isValidChecksumAddress=s;function l(w){return w.startsWith("0x")?w:w.startsWith("0X")?`0x${w.substring(2)}`:`0x${w}`}e.add0x=l;function h(w){return w.startsWith("0x")||w.startsWith("0X")?w.substring(2):w}e.remove0x=h})(yr)),yr}var qs;function Yn(){if(qs)return se;qs=1,Object.defineProperty(se,"__esModule",{value:!0}),se.createDataView=se.concatBytes=se.valueToBytes=se.base64ToBytes=se.stringToBytes=se.numberToBytes=se.signedBigIntToBytes=se.bigIntToBytes=se.hexToBytes=se.bytesToBase64=se.bytesToString=se.bytesToNumber=se.bytesToSignedBigInt=se.bytesToBigInt=se.bytesToHex=se.assertIsBytes=se.isBytes=void 0;const e=fu(),t=Ke(),n=zt(),i=48,d=58,u=87;function c(){const p=[];return()=>{if(p.length===0)for(let S=0;S<256;S++)p.push(S.toString(16).padStart(2,"0"));return p}}const a=c();function o(p){return p instanceof Uint8Array}se.isBytes=o;function f(p){(0,t.assert)(o(p),"Value must be a Uint8Array.")}se.assertIsBytes=f;function r(p){if(f(p),p.length===0)return"0x";const S=a(),Y=new Array(p.length);for(let _=0;_<p.length;_++)Y[_]=S[p[_]];return(0,n.add0x)(Y.join(""))}se.bytesToHex=r;function s(p){f(p);const S=r(p);return BigInt(S)}se.bytesToBigInt=s;function l(p){f(p);let S=BigInt(0);for(const Y of p)S=(S<<BigInt(8))+BigInt(Y);return BigInt.asIntN(p.length*8,S)}se.bytesToSignedBigInt=l;function h(p){f(p);const S=s(p);return(0,t.assert)(S<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(S)}se.bytesToNumber=h;function w(p){return f(p),new TextDecoder().decode(p)}se.bytesToString=w;function $(p){return f(p),e.base64.encode(p)}se.bytesToBase64=$;function U(p){var M;if(((M=p==null?void 0:p.toLowerCase)==null?void 0:M.call(p))==="0x")return new Uint8Array;(0,n.assertIsHexString)(p);const S=(0,n.remove0x)(p).toLowerCase(),Y=S.length%2===0?S:`0${S}`,_=new Uint8Array(Y.length/2);for(let q=0;q<_.length;q++){const z=Y.charCodeAt(q*2),L=Y.charCodeAt(q*2+1),H=z-(z<d?i:u),b=L-(L<d?i:u);_[q]=H*16+b}return _}se.hexToBytes=U;function O(p){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(p>=BigInt(0),"Value must be a non-negative bigint.");const S=p.toString(16);return U(S)}se.bigIntToBytes=O;function J(p,S){(0,t.assert)(S>0);const Y=p>>BigInt(31);return!((~p&Y)+(p&~Y)>>BigInt(S*8+-1))}function K(p,S){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(typeof S=="number","Byte length must be a number."),(0,t.assert)(S>0,"Byte length must be greater than 0."),(0,t.assert)(J(p,S),"Byte length is too small to represent the given value.");let Y=p;const _=new Uint8Array(S);for(let M=0;M<_.length;M++)_[M]=Number(BigInt.asUintN(8,Y)),Y>>=BigInt(8);return _.reverse()}se.signedBigIntToBytes=K;function x(p){(0,t.assert)(typeof p=="number","Value must be a number."),(0,t.assert)(p>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `bigIntToBytes` instead.");const S=p.toString(16);return U(S)}se.numberToBytes=x;function E(p){return(0,t.assert)(typeof p=="string","Value must be a string."),new TextEncoder().encode(p)}se.stringToBytes=E;function P(p){return(0,t.assert)(typeof p=="string","Value must be a string."),e.base64.decode(p)}se.base64ToBytes=P;function D(p){if(typeof p=="bigint")return O(p);if(typeof p=="number")return x(p);if(typeof p=="string")return p.startsWith("0x")?U(p):E(p);if(o(p))return p;throw new TypeError(`Unsupported value type: "${typeof p}".`)}se.valueToBytes=D;function k(p){const S=new Array(p.length);let Y=0;for(let M=0;M<p.length;M++){const q=D(p[M]);S[M]=q,Y+=q.length}const _=new Uint8Array(Y);for(let M=0,q=0;M<S.length;M++)_.set(S[M],q),q+=S[M].length;return _}se.concatBytes=k;function B(p){if(typeof bs<"u"&&p instanceof bs){const S=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return new DataView(S)}return new DataView(p.buffer,p.byteOffset,p.byteLength)}return se.createDataView=B,se}var br={},Hs;function hu(){return Hs||(Hs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAssetId=e.isCaipAssetType=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAssetIdStruct=e.CaipAssetTypeStruct=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ASSET_ID_REGEX=e.CAIP_ASSET_TYPE_REGEX=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const t=qe();e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,e.CaipChainIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),e.CaipAssetTypeStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_TYPE_REGEX),e.CaipAssetIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_ID_REGEX),(function(l){l.Bip122="bip122",l.Eip155="eip155",l.Wallet="wallet"})(e.KnownCaipNamespace||(e.KnownCaipNamespace={}));function n(l){return(0,t.is)(l,e.CaipChainIdStruct)}e.isCaipChainId=n;function i(l){return(0,t.is)(l,e.CaipNamespaceStruct)}e.isCaipNamespace=i;function d(l){return(0,t.is)(l,e.CaipReferenceStruct)}e.isCaipReference=d;function u(l){return(0,t.is)(l,e.CaipAccountIdStruct)}e.isCaipAccountId=u;function c(l){return(0,t.is)(l,e.CaipAccountAddressStruct)}e.isCaipAccountAddress=c;function a(l){return(0,t.is)(l,e.CaipAssetTypeStruct)}e.isCaipAssetType=a;function o(l){return(0,t.is)(l,e.CaipAssetIdStruct)}e.isCaipAssetId=o;function f(l){const h=e.CAIP_CHAIN_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP chain ID.");return{namespace:h.groups.namespace,reference:h.groups.reference}}e.parseCaipChainId=f;function r(l){const h=e.CAIP_ACCOUNT_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP account ID.");return{address:h.groups.accountAddress,chainId:h.groups.chainId,chain:{namespace:h.groups.namespace,reference:h.groups.reference}}}e.parseCaipAccountId=r;function s(l,h){if(!i(l))throw new Error(`Invalid "namespace", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(h))throw new Error(`Invalid "reference", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${l}:${h}`}e.toCaipChainId=s})(br)),br}var ft={},Us;function pu(){if(Us)return ft;Us=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.ChecksumStruct=void 0;const e=qe(),t=ga();return ft.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),ft}var Ce={},Ds;function gu(){if(Ds)return Ce;Ds=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createHex=Ce.createBytes=Ce.createBigInt=Ce.createNumber=void 0;const e=qe(),t=Ke(),n=Yn(),i=zt(),d=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),i.StrictHexStruct]),u=(0,e.coerce)((0,e.number)(),d,Number),c=(0,e.coerce)((0,e.bigint)(),d,BigInt);(0,e.union)([i.StrictHexStruct,(0,e.instance)(Uint8Array)]);const a=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([i.StrictHexStruct]),n.hexToBytes),o=(0,e.coerce)(i.StrictHexStruct,(0,e.instance)(Uint8Array),n.bytesToHex);function f(h){try{const w=(0,e.create)(h,u);return(0,t.assert)(Number.isFinite(w),`Expected a number-like value, got "${h}".`),w}catch(w){throw w instanceof e.StructError?new Error(`Expected a number-like value, got "${h}".`):w}}Ce.createNumber=f;function r(h){try{return(0,e.create)(h,c)}catch(w){throw w instanceof e.StructError?new Error(`Expected a number-like value, got "${String(w.value)}".`):w}}Ce.createBigInt=r;function s(h){if(typeof h=="string"&&h.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(h,a)}catch(w){throw w instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(w.value)}".`):w}}Ce.createBytes=s;function l(h){if(h instanceof Uint8Array&&h.length===0||typeof h=="string"&&h.toLowerCase()==="0x")return"0x";try{return(0,e.create)(h,o)}catch(w){throw w instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(w.value)}".`):w}}return Ce.createHex=l,Ce}var je={},Fs;function mu(){if(Fs)return je;Fs=1;var e=je&&je.__classPrivateFieldGet||function(c,a,o,f){if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?c!==a||!f:!a.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?f:o==="a"?f.call(c):f?f.value:a.get(c)},t=je&&je.__classPrivateFieldSet||function(c,a,o,f,r){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?c!==a||!r:!a.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?r.call(c,o):r?r.value=o:a.set(c,o),o},n,i;Object.defineProperty(je,"__esModule",{value:!0}),je.FrozenSet=je.FrozenMap=void 0;class d{get size(){return e(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return e(this,n,"f")[Symbol.iterator]()}constructor(a){n.set(this,void 0),t(this,n,new Map(a),"f"),Object.freeze(this)}entries(){return e(this,n,"f").entries()}forEach(a,o){return e(this,n,"f").forEach((f,r,s)=>a.call(o,f,r,this))}get(a){return e(this,n,"f").get(a)}has(a){return e(this,n,"f").has(a)}keys(){return e(this,n,"f").keys()}values(){return e(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,o])=>`${String(a)} => ${String(o)}`).join(", ")} `:""}}`}}je.FrozenMap=d;class u{get size(){return e(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return e(this,i,"f")[Symbol.iterator]()}constructor(a){i.set(this,void 0),t(this,i,new Set(a),"f"),Object.freeze(this)}entries(){return e(this,i,"f").entries()}forEach(a,o){return e(this,i,"f").forEach((f,r,s)=>a.call(o,f,r,this))}has(a){return e(this,i,"f").has(a)}keys(){return e(this,i,"f").keys()}values(){return e(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return je.FrozenSet=u,Object.freeze(d),Object.freeze(d.prototype),Object.freeze(u),Object.freeze(u.prototype),je}var wr={},Vs;function yu(){return Vs||(Vs=1,Object.defineProperty(wr,"__esModule",{value:!0})),wr}var Er={},zs;function bu(){return zs||(zs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const t=qe(),n=Ke(),i=Kn(),d=p=>(0,t.object)(p);e.object=d;function u({path:p,branch:S}){const Y=p[p.length-1];return(0,i.hasProperty)(S[S.length-2],Y)}function c(p){return new t.Struct({...p,type:`optional ${p.type}`,validator:(S,Y)=>!u(Y)||p.validator(S,Y),refiner:(S,Y)=>!u(Y)||p.refiner(S,Y)})}e.exactOptional=c;const a=()=>(0,t.define)("finite number",p=>(0,t.is)(p,(0,t.number)())&&Number.isFinite(p));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),a(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.coerce)(e.UnsafeJsonStruct,(0,t.any)(),p=>((0,n.assertStruct)(p,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(p,(S,Y)=>{if(!(S==="__proto__"||S==="constructor"))return Y}))));function o(p){try{return f(p),!0}catch{return!1}}e.isValidJson=o;function f(p){return(0,t.create)(p,e.JsonStruct)}e.getSafeJson=f;function r(p){(0,n.assertStruct)(p,e.JsonStruct,"Invalid JSON value");const S=JSON.stringify(p);return new TextEncoder().encode(S).byteLength}e.getJsonSize=r,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,t.integer)(),message:(0,t.string)(),data:c(e.JsonStruct),stack:c((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)});function s(p){return(0,t.is)(p,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=s;function l(p,S){(0,n.assertStruct)(p,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",S)}e.assertIsJsonRpcNotification=l;function h(p){return(0,t.is)(p,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function w(p,S){(0,n.assertStruct)(p,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",S)}e.assertIsJsonRpcRequest=w,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function $(p){return(0,t.is)(p,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=$;function U(p,S){(0,n.assertStruct)(p,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",S)}e.assertIsPendingJsonRpcResponse=U;function O(p){return(0,t.is)(p,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=O;function J(p,S){(0,n.assertStruct)(p,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",S)}e.assertIsJsonRpcResponse=J;function K(p){return(0,t.is)(p,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=K;function x(p,S){(0,n.assertStruct)(p,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",S)}e.assertIsJsonRpcSuccess=x;function E(p){return(0,t.is)(p,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=E;function P(p,S){(0,n.assertStruct)(p,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",S)}e.assertIsJsonRpcFailure=P;function D(p){return(0,t.is)(p,e.JsonRpcErrorStruct)}e.isJsonRpcError=D;function k(p,S){(0,n.assertStruct)(p,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",S)}e.assertIsJsonRpcError=k;function B(p){const{permitEmptyString:S,permitFractions:Y,permitNull:_}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...p};return q=>!!(typeof q=="number"&&(Y||Number.isInteger(q))||typeof q=="string"&&(S||q.length>0)||_&&q===null)}e.getJsonRpcIdValidator=B})(Er)),Er}var Sr={},Gs;function wu(){return Gs||(Gs=1,Object.defineProperty(Sr,"__esModule",{value:!0})),Sr}var Ve={},Js;function Eu(){if(Js)return Ve;Js=1;var e=Ve&&Ve.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createModuleLogger=Ve.createProjectLogger=void 0;const n=(0,e(fc()).default)("metamask");function i(u){return n.extend(u)}Ve.createProjectLogger=i;function d(u,c){return u.extend(c)}return Ve.createModuleLogger=d,Ve}var Pe={},Xs;function Su(){if(Xs)return Pe;Xs=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.hexToBigInt=Pe.hexToNumber=Pe.bigIntToHex=Pe.numberToHex=void 0;const e=Ke(),t=zt(),n=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(c.toString(16)));Pe.numberToHex=n;const i=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,t.add0x)(c.toString(16)));Pe.bigIntToHex=i;const d=c=>{(0,t.assertIsHexString)(c);const a=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};Pe.hexToNumber=d;const u=c=>((0,t.assertIsHexString)(c),BigInt((0,t.add0x)(c)));return Pe.hexToBigInt=u,Pe}var vr={},Ws;function vu(){return Ws||(Ws=1,Object.defineProperty(vr,"__esModule",{value:!0})),vr}var ht={},Ks;function $u(){if(Ks)return ht;Ks=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.createDeferredPromise=void 0;function e({suppressUnhandledRejection:t=!1}={}){let n,i;const d=new Promise((u,c)=>{n=u,i=c});return t&&d.catch(u=>{}),{promise:d,resolve:n,reject:i}}return ht.createDeferredPromise=e,ht}var $r={},Ys;function Ru(){return Ys||(Ys=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,n=(u,c)=>{if(!t(u))throw new Error(`"${c}" must be a non-negative integer. Received: "${u}".`)};function i(u,c){return n(u,"count"),u*c}e.inMilliseconds=i;function d(u){return n(u,"timestamp"),Date.now()-u}e.timeSince=d})($r)),$r}var Rr={},Zs;function Iu(){return Zs||(Zs=1,Object.defineProperty(Rr,"__esModule",{value:!0})),Rr}var Ir={},Pt={exports:{}},xr,Qs;function xt(){if(Qs)return xr;Qs=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,d=t-6;return xr={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},xr}var _r,ei;function Gt(){if(ei)return _r;ei=1;var e={};return _r=typeof hc=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},_r}var ti;function _t(){return ti||(ti=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:d}=xt(),u=Gt();t=e.exports={};const c=t.re=[],a=t.safeRe=[],o=t.src=[],f=t.safeSrc=[],r=t.t={};let s=0;const l="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",d],[l,i]],w=U=>{for(const[O,J]of h)U=U.split(`${O}*`).join(`${O}{0,${J}}`).split(`${O}+`).join(`${O}{1,${J}}`);return U},$=(U,O,J)=>{const K=w(O),x=s++;u(U,x,O),r[U]=x,o[x]=O,f[x]=K,c[x]=new RegExp(O,J?"g":void 0),a[x]=new RegExp(K,J?"g":void 0)};$("NUMERICIDENTIFIER","0|[1-9]\\d*"),$("NUMERICIDENTIFIERLOOSE","\\d+"),$("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),$("MAINVERSION",`(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})`),$("MAINVERSIONLOOSE",`(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASEIDENTIFIER",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIER]})`),$("PRERELEASEIDENTIFIERLOOSE",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASE",`(?:-(${o[r.PRERELEASEIDENTIFIER]}(?:\\.${o[r.PRERELEASEIDENTIFIER]})*))`),$("PRERELEASELOOSE",`(?:-?(${o[r.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[r.PRERELEASEIDENTIFIERLOOSE]})*))`),$("BUILDIDENTIFIER",`${l}+`),$("BUILD",`(?:\\+(${o[r.BUILDIDENTIFIER]}(?:\\.${o[r.BUILDIDENTIFIER]})*))`),$("FULLPLAIN",`v?${o[r.MAINVERSION]}${o[r.PRERELEASE]}?${o[r.BUILD]}?`),$("FULL",`^${o[r.FULLPLAIN]}$`),$("LOOSEPLAIN",`[v=\\s]*${o[r.MAINVERSIONLOOSE]}${o[r.PRERELEASELOOSE]}?${o[r.BUILD]}?`),$("LOOSE",`^${o[r.LOOSEPLAIN]}$`),$("GTLT","((?:<|>)?=?)"),$("XRANGEIDENTIFIERLOOSE",`${o[r.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),$("XRANGEIDENTIFIER",`${o[r.NUMERICIDENTIFIER]}|x|X|\\*`),$("XRANGEPLAIN",`[v=\\s]*(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:${o[r.PRERELEASE]})?${o[r.BUILD]}?)?)?`),$("XRANGEPLAINLOOSE",`[v=\\s]*(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:${o[r.PRERELEASELOOSE]})?${o[r.BUILD]}?)?)?`),$("XRANGE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAIN]}$`),$("XRANGELOOSE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAINLOOSE]}$`),$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),$("COERCE",`${o[r.COERCEPLAIN]}(?:$|[^\\d])`),$("COERCEFULL",o[r.COERCEPLAIN]+`(?:${o[r.PRERELEASE]})?(?:${o[r.BUILD]})?(?:$|[^\\d])`),$("COERCERTL",o[r.COERCE],!0),$("COERCERTLFULL",o[r.COERCEFULL],!0),$("LONETILDE","(?:~>?)"),$("TILDETRIM",`(\\s*)${o[r.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",$("TILDE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAIN]}$`),$("TILDELOOSE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAINLOOSE]}$`),$("LONECARET","(?:\\^)"),$("CARETTRIM",`(\\s*)${o[r.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",$("CARET",`^${o[r.LONECARET]}${o[r.XRANGEPLAIN]}$`),$("CARETLOOSE",`^${o[r.LONECARET]}${o[r.XRANGEPLAINLOOSE]}$`),$("COMPARATORLOOSE",`^${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]})$|^$`),$("COMPARATOR",`^${o[r.GTLT]}\\s*(${o[r.FULLPLAIN]})$|^$`),$("COMPARATORTRIM",`(\\s*)${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]}|${o[r.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",$("HYPHENRANGE",`^\\s*(${o[r.XRANGEPLAIN]})\\s+-\\s+(${o[r.XRANGEPLAIN]})\\s*$`),$("HYPHENRANGELOOSE",`^\\s*(${o[r.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[r.XRANGEPLAINLOOSE]})\\s*$`),$("STAR","(<|>)?=?\\s*\\*"),$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Pt,Pt.exports)),Pt.exports}var Ar,ri;function Zn(){if(ri)return Ar;ri=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ar=i=>i?typeof i!="object"?e:i:t,Ar}var Tr,ni;function ma(){if(ni)return Tr;ni=1;const e=/^[0-9]+$/,t=(i,d)=>{if(typeof i=="number"&&typeof d=="number")return i===d?0:i<d?-1:1;const u=e.test(i),c=e.test(d);return u&&c&&(i=+i,d=+d),i===d?0:u&&!c?-1:c&&!u?1:i<d?-1:1};return Tr={compareIdentifiers:t,rcompareIdentifiers:(i,d)=>t(d,i)},Tr}var Cr,si;function ve(){if(si)return Cr;si=1;const e=Gt(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=xt(),{safeRe:i,t:d}=_t(),u=Zn(),{compareIdentifiers:c}=ma(),a=(f,r)=>{const s=r.split(".");if(s.length>f.length)return!1;for(let l=0;l<s.length;l++)if(c(f[l],s[l])!==0)return!1;return!0};class o{constructor(r,s){if(s=u(s),r instanceof o){if(r.loose===!!s.loose&&r.includePrerelease===!!s.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",r,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const l=r.trim().match(s.loose?i[d.LOOSE]:i[d.FULL]);if(!l)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const w=+h;if(w>=0&&w<n)return w}return h}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(e("SemVer.compare",this.version,this.options,r),!(r instanceof o)){if(typeof r=="string"&&r===this.version)return 0;r=new o(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof o||(r=new o(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof o||(r=new o(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let s=0;do{const l=this.prerelease[s],h=r.prerelease[s];if(e("prerelease compare",s,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++s)}compareBuild(r){r instanceof o||(r=new o(r,this.options));let s=0;do{const l=this.build[s],h=r.build[s];if(e("build compare",s,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++s)}inc(r,s,l){if(r.startsWith("pre")){if(!s&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(s){const h=`-${s}`.match(this.options.loose?i[d.PRERELEASELOOSE]:i[d.PRERELEASE]);if(!h||h[1]!==s)throw new Error(`invalid identifier: ${s}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,l),this.inc("pre",s,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,l),this.inc("pre",s,l);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let w=this.prerelease.length;for(;--w>=0;)typeof this.prerelease[w]=="number"&&(this.prerelease[w]++,w=-2);if(w===-1){if(s===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(s){let w=[s,h];if(l===!1&&(w=[s]),a(this.prerelease,s)){const $=this.prerelease[s.split(".").length];isNaN($)&&(this.prerelease=w)}else this.prerelease=w}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Cr=o,Cr}var jr,ii;function it(){if(ii)return jr;ii=1;const e=ve();return jr=(n,i,d=!1)=>{if(n instanceof e)return n;try{return new e(n,i)}catch(u){if(!d)return null;throw u}},jr}var Pr,oi;function xu(){if(oi)return Pr;oi=1;const e=it();return Pr=(n,i)=>{const d=e(n,i);return d?d.version:null},Pr}var Or,ai;function _u(){if(ai)return Or;ai=1;const e=it();return Or=(n,i)=>{const d=e(n.trim().replace(/^[=v]+/,""),i);return d?d.version:null},Or}var kr,ci;function Au(){if(ci)return kr;ci=1;const e=ve();return kr=(n,i,d,u,c)=>{typeof d=="string"&&(c=u,u=d,d=void 0);try{return new e(n instanceof e?n.version:n,d).inc(i,u,c).version}catch{return null}},kr}var Br,ui;function Tu(){if(ui)return Br;ui=1;const e=it();return Br=(n,i)=>{const d=e(n,null,!0),u=e(i,null,!0),c=d.compare(u);if(c===0)return null;const a=c>0,o=a?d:u,f=a?u:d,r=!!o.prerelease.length;if(!!f.prerelease.length&&!r){if(!f.patch&&!f.minor)return"major";if(f.compareMain(o)===0)return f.minor&&!f.patch?"minor":"patch"}const l=r?"pre":"";return d.major!==u.major?l+"major":d.minor!==u.minor?l+"minor":d.patch!==u.patch?l+"patch":"prerelease"},Br}var Lr,li;function Cu(){if(li)return Lr;li=1;const e=ve();return Lr=(n,i)=>new e(n,i).major,Lr}var Nr,di;function ju(){if(di)return Nr;di=1;const e=ve();return Nr=(n,i)=>new e(n,i).minor,Nr}var Mr,fi;function Pu(){if(fi)return Mr;fi=1;const e=ve();return Mr=(n,i)=>new e(n,i).patch,Mr}var qr,hi;function Ou(){if(hi)return qr;hi=1;const e=it();return qr=(n,i)=>{const d=e(n,i);return d&&d.prerelease.length?d.prerelease:null},qr}var Hr,pi;function Le(){if(pi)return Hr;pi=1;const e=ve();return Hr=(n,i,d)=>new e(n,d).compare(new e(i,d)),Hr}var Ur,gi;function ku(){if(gi)return Ur;gi=1;const e=Le();return Ur=(n,i,d)=>e(i,n,d),Ur}var Dr,mi;function Bu(){if(mi)return Dr;mi=1;const e=Le();return Dr=(n,i)=>e(n,i,!0),Dr}var Fr,yi;function Qn(){if(yi)return Fr;yi=1;const e=ve();return Fr=(n,i,d)=>{const u=new e(n,d),c=new e(i,d);return u.compare(c)||u.compareBuild(c)},Fr}var Vr,bi;function Lu(){if(bi)return Vr;bi=1;const e=Qn();return Vr=(n,i)=>n.sort((d,u)=>e(d,u,i)),Vr}var zr,wi;function Nu(){if(wi)return zr;wi=1;const e=Qn();return zr=(n,i)=>n.sort((d,u)=>e(u,d,i)),zr}var Gr,Ei;function Jt(){if(Ei)return Gr;Ei=1;const e=Le();return Gr=(n,i,d)=>e(n,i,d)>0,Gr}var Jr,Si;function es(){if(Si)return Jr;Si=1;const e=Le();return Jr=(n,i,d)=>e(n,i,d)<0,Jr}var Xr,vi;function ya(){if(vi)return Xr;vi=1;const e=Le();return Xr=(n,i,d)=>e(n,i,d)===0,Xr}var Wr,$i;function ba(){if($i)return Wr;$i=1;const e=Le();return Wr=(n,i,d)=>e(n,i,d)!==0,Wr}var Kr,Ri;function ts(){if(Ri)return Kr;Ri=1;const e=Le();return Kr=(n,i,d)=>e(n,i,d)>=0,Kr}var Yr,Ii;function rs(){if(Ii)return Yr;Ii=1;const e=Le();return Yr=(n,i,d)=>e(n,i,d)<=0,Yr}var Zr,xi;function wa(){if(xi)return Zr;xi=1;const e=ya(),t=ba(),n=Jt(),i=ts(),d=es(),u=rs();return Zr=(a,o,f,r)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a===f;case"!==":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a!==f;case"":case"=":case"==":return e(a,f,r);case"!=":return t(a,f,r);case">":return n(a,f,r);case">=":return i(a,f,r);case"<":return d(a,f,r);case"<=":return u(a,f,r);default:throw new TypeError(`Invalid operator: ${o}`)}},Zr}var Qr,_i;function Mu(){if(_i)return Qr;_i=1;const e=ve(),t=it(),{safeRe:n,t:i}=_t();return Qr=(u,c)=>{if(u instanceof e)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;c=c||{};let a=null;if(!c.rtl)a=u.match(c.includePrerelease?n[i.COERCEFULL]:n[i.COERCE]);else{const h=c.includePrerelease?n[i.COERCERTLFULL]:n[i.COERCERTL];let w;for(;(w=h.exec(u))&&(!a||a.index+a[0].length!==u.length);)(!a||w.index+w[0].length!==a.index+a[0].length)&&(a=w),h.lastIndex=w.index+w[1].length+w[2].length;h.lastIndex=-1}if(a===null)return null;const o=a[2],f=a[3]||"0",r=a[4]||"0",s=c.includePrerelease&&a[5]?`-${a[5]}`:"",l=c.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${f}.${r}${s}${l}`,c)},Qr}var en,Ai;function qu(){if(Ai)return en;Ai=1;const e=it(),t=xt(),n=ve(),i=(a,o,f)=>{if(!t.RELEASE_TYPES.includes(o))return null;const r=d(a,f);return r&&u(r,o)},d=(a,o)=>{const f=a instanceof n?a.version:a;return e(f,o)},u=(a,o)=>{if(c(o))return a.version;switch(a.prerelease=[],o){case"major":a.minor=0,a.patch=0;break;case"minor":a.patch=0;break}return a.format()},c=a=>a.startsWith("pre");return en=i,en}var tn,Ti;function Hu(){if(Ti)return tn;Ti=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const i=this.map.get(n);if(i!==void 0)return this.map.delete(n),this.map.set(n,i),i}delete(n){return this.map.delete(n)}set(n,i){if(!this.delete(n)&&i!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(n,i)}return this}}return tn=e,tn}var rn,Ci;function Ne(){if(Ci)return rn;Ci=1;const e=/\s+/g;class t{constructor(H,b){if(b=d(b),H instanceof t)return H.loose===!!b.loose&&H.includePrerelease===!!b.includePrerelease?H:new t(H.raw,b);if(H instanceof u)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease,this.raw=H.trim().replace(e," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(I=>!O(I[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&J(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const b=this.set[H];for(let g=0;g<b.length;g++)g>0&&(this.formatted+=" "),this.formatted+=b[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){H=H.replace(U,"");const g=((this.options.includePrerelease&&w)|(this.options.loose&&$))+":"+H,I=i.get(g);if(I)return I;const j=this.options.loose,N=j?o[r.HYPHENRANGELOOSE]:o[r.HYPHENRANGE];H=H.replace(N,q(this.options.includePrerelease)),c("hyphen replace",H),H=H.replace(o[r.COMPARATORTRIM],s),c("comparator trim",H),H=H.replace(o[r.TILDETRIM],l),c("tilde trim",H),H=H.replace(o[r.CARETTRIM],h),c("caret trim",H);let y=H.split(" ").map(V=>x(V,this.options)).join(" ").split(/\s+/).map(V=>M(V,this.options));j&&(y=y.filter(V=>(c("loose invalid filter",V,this.options),!!V.match(o[r.COMPARATORLOOSE])))),c("range list",y);const v=new Map,A=y.map(V=>new u(V,this.options));for(const V of A){if(O(V))return[V];v.set(V.value,V)}v.size>1&&v.has("")&&v.delete("");const X=[...v.values()];return i.set(g,X),X}intersects(H,b){if(!(H instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>K(g,b)&&H.set.some(I=>K(I,b)&&g.every(j=>I.every(N=>j.intersects(N,b)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new a(H,this.options)}catch{return!1}for(let b=0;b<this.set.length;b++)if(z(this.set[b],H,this.options))return!0;return!1}}rn=t;const n=Hu(),i=new n,d=Zn(),u=Xt(),c=Gt(),a=ve(),{safeRe:o,src:f,t:r,comparatorTrimReplace:s,tildeTrimReplace:l,caretTrimReplace:h}=_t(),{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:$}=xt(),U=new RegExp(f[r.BUILD],"g"),O=L=>L.value==="<0.0.0-0",J=L=>L.value==="",K=(L,H)=>{let b=!0;const g=L.slice();let I=g.pop();for(;b&&g.length;)b=g.every(j=>I.intersects(j,H)),I=g.pop();return b},x=(L,H)=>(L=L.replace(o[r.BUILD],""),c("comp",L,H),L=B(L,H),c("caret",L),L=D(L,H),c("tildes",L),L=S(L,H),c("xrange",L),L=_(L,H),c("stars",L),L),E=L=>!L||L.toLowerCase()==="x"||L==="*",P=(L,H,b)=>E(L)&&!E(H)||E(H)&&b&&!E(b),D=(L,H)=>L.trim().split(/\s+/).map(b=>k(b,H)).join(" "),k=(L,H)=>{const b=H.loose?o[r.TILDELOOSE]:o[r.TILDE],g=H.includePrerelease?"-0":"";return L.replace(b,(I,j,N,y,v)=>{c("tilde",L,I,j,N,y,v);let A;return E(j)?A="":E(N)?A=`>=${j}.0.0${g} <${+j+1}.0.0-0`:E(y)?A=`>=${j}.${N}.0${g} <${j}.${+N+1}.0-0`:v?(c("replaceTilde pr",v),A=`>=${j}.${N}.${y}-${v} <${j}.${+N+1}.0-0`):A=`>=${j}.${N}.${y} <${j}.${+N+1}.0-0`,c("tilde return",A),A})},B=(L,H)=>L.trim().split(/\s+/).map(b=>p(b,H)).join(" "),p=(L,H)=>{c("caret",L,H);const b=H.loose?o[r.CARETLOOSE]:o[r.CARET],g=H.includePrerelease?"-0":"";return L.replace(b,(I,j,N,y,v)=>{c("caret",L,I,j,N,y,v);let A;return E(j)?A="":E(N)?A=`>=${j}.0.0${g} <${+j+1}.0.0-0`:E(y)?j==="0"?A=`>=${j}.${N}.0${g} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.0${g} <${+j+1}.0.0-0`:v?(c("replaceCaret pr",v),j==="0"?N==="0"?A=`>=${j}.${N}.${y}-${v} <${j}.${N}.${+y+1}-0`:A=`>=${j}.${N}.${y}-${v} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.${y}-${v} <${+j+1}.0.0-0`):(c("no pr"),j==="0"?N==="0"?A=`>=${j}.${N}.${y} <${j}.${N}.${+y+1}-0`:A=`>=${j}.${N}.${y} <${j}.${+N+1}.0-0`:A=`>=${j}.${N}.${y} <${+j+1}.0.0-0`),c("caret return",A),A})},S=(L,H)=>(c("replaceXRanges",L,H),L.split(/\s+/).map(b=>Y(b,H)).join(" ")),Y=(L,H)=>{L=L.trim();const b=H.loose?o[r.XRANGELOOSE]:o[r.XRANGE];return L.replace(b,(g,I,j,N,y,v)=>{if(c("xRange",L,g,I,j,N,y,v),P(j,N,y))return L;const A=E(j),X=A||E(N),V=X||E(y),W=V;return I==="="&&W&&(I=""),v=H.includePrerelease?"-0":"",A?I===">"||I==="<"?g="<0.0.0-0":g="*":I&&W?(X&&(N=0),y=0,I===">"?(I=">=",X?(j=+j+1,N=0,y=0):(N=+N+1,y=0)):I==="<="&&(I="<",X?j=+j+1:N=+N+1),I==="<"&&(v="-0"),g=`${I+j}.${N}.${y}${v}`):X?g=`>=${j}.0.0${v} <${+j+1}.0.0-0`:V&&(g=`>=${j}.${N}.0${v} <${j}.${+N+1}.0-0`),c("xRange return",g),g})},_=(L,H)=>(c("replaceStars",L,H),L.trim().replace(o[r.STAR],"")),M=(L,H)=>(c("replaceGTE0",L,H),L.trim().replace(o[H.includePrerelease?r.GTE0PRE:r.GTE0],"")),q=L=>(H,b,g,I,j,N,y,v,A,X,V,W)=>(E(g)?b="":E(I)?b=`>=${g}.0.0${L?"-0":""}`:E(j)?b=`>=${g}.${I}.0${L?"-0":""}`:N?b=`>=${b}`:b=`>=${b}${L?"-0":""}`,E(A)?v="":E(X)?v=`<${+A+1}.0.0-0`:E(V)?v=`<${A}.${+X+1}.0-0`:W?v=`<=${A}.${X}.${V}-${W}`:L?v=`<${A}.${X}.${+V+1}-0`:v=`<=${v}`,`${b} ${v}`.trim()),z=(L,H,b)=>{for(let g=0;g<L.length;g++)if(!L[g].test(H))return!1;if(H.prerelease.length&&!b.includePrerelease){for(let g=0;g<L.length;g++)if(c(L[g].semver),L[g].semver!==u.ANY&&L[g].semver.prerelease.length>0){const I=L[g].semver;if(I.major===H.major&&I.minor===H.minor&&I.patch===H.patch)return!0}return!1}return!0};return rn}var nn,ji;function Xt(){if(ji)return nn;ji=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,s){if(s=n(s),r instanceof t){if(r.loose===!!s.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),c("comparator",r,s),this.options=s,this.loose=!!s.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(r){const s=this.options.loose?i[d.COMPARATORLOOSE]:i[d.COMPARATOR],l=r.match(s);if(!l)throw new TypeError(`Invalid comparator: ${r}`);this.operator=l[1]!==void 0?l[1]:"",this.operator==="="&&(this.operator=""),l[2]?this.semver=new a(l[2],this.options.loose):this.semver=e}toString(){return this.value}test(r){if(c("Comparator.test",r,this.options.loose),this.semver===e||r===e)return!0;if(typeof r=="string")try{r=new a(r,this.options)}catch{return!1}return u(r,this.operator,this.semver,this.options)}intersects(r,s){if(!(r instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(r.value,s).test(this.value):r.operator===""?r.value===""?!0:new o(this.value,s).test(r.semver):(s=n(s),s.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!s.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||u(this.semver,"<",r.semver,s)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||u(this.semver,">",r.semver,s)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}}nn=t;const n=Zn(),{safeRe:i,t:d}=_t(),u=wa(),c=Gt(),a=ve(),o=Ne();return nn}var sn,Pi;function Wt(){if(Pi)return sn;Pi=1;const e=Ne();return sn=(n,i,d)=>{try{i=new e(i,d)}catch{return!1}return i.test(n)},sn}var on,Oi;function Uu(){if(Oi)return on;Oi=1;const e=Ne();return on=(n,i)=>new e(n,i).set.map(d=>d.map(u=>u.value).join(" ").trim().split(" ")),on}var an,ki;function Du(){if(ki)return an;ki=1;const e=ve(),t=Ne();return an=(i,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return i.forEach(f=>{o.test(f)&&(!c||a.compare(f)===-1)&&(c=f,a=new e(c,u))}),c},an}var cn,Bi;function Fu(){if(Bi)return cn;Bi=1;const e=ve(),t=Ne();return cn=(i,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return i.forEach(f=>{o.test(f)&&(!c||a.compare(f)===1)&&(c=f,a=new e(c,u))}),c},cn}var un,Li;function Vu(){if(Li)return un;Li=1;const e=ve(),t=Ne(),n=Jt();return un=(d,u)=>{d=new t(d,u);let c=new e("0.0.0");if(d.test(c)||(c=new e("0.0.0-0"),d.test(c)))return c;c=null;for(let a=0;a<d.set.length;++a){const o=d.set[a];let f=null;o.forEach(r=>{const s=new e(r.semver.version);switch(r.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!f||n(s,f))&&(f=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${r.operator}`)}}),f&&(!c||n(c,f))&&(c=f)}return c&&d.test(c)?c:null},un}var ln,Ni;function zu(){if(Ni)return ln;Ni=1;const e=Ne();return ln=(n,i)=>{try{return new e(n,i).range||"*"}catch{return null}},ln}var dn,Mi;function ns(){if(Mi)return dn;Mi=1;const e=ve(),t=Xt(),{ANY:n}=t,i=Ne(),d=Wt(),u=Jt(),c=es(),a=rs(),o=ts();return dn=(r,s,l,h)=>{r=new e(r,h),s=new i(s,h);let w,$,U,O,J;switch(l){case">":w=u,$=a,U=c,O=">",J=">=";break;case"<":w=c,$=o,U=u,O="<",J="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(r,s,h))return!1;for(let K=0;K<s.set.length;++K){const x=s.set[K];let E=null,P=null;if(x.forEach(D=>{D.semver===n&&(D=new t(">=0.0.0")),E=E||D,P=P||D,w(D.semver,E.semver,h)?E=D:U(D.semver,P.semver,h)&&(P=D)}),E.operator===O||E.operator===J||(!P.operator||P.operator===O)&&$(r,P.semver))return!1;if(P.operator===J&&U(r,P.semver))return!1}return!0},dn}var fn,qi;function Gu(){if(qi)return fn;qi=1;const e=ns();return fn=(n,i,d)=>e(n,i,">",d),fn}var hn,Hi;function Ju(){if(Hi)return hn;Hi=1;const e=ns();return hn=(n,i,d)=>e(n,i,"<",d),hn}var pn,Ui;function Xu(){if(Ui)return pn;Ui=1;const e=Ne();return pn=(n,i,d)=>(n=new e(n,d),i=new e(i,d),n.intersects(i,d)),pn}var gn,Di;function Wu(){if(Di)return gn;Di=1;const e=Wt(),t=Le();return gn=(n,i,d)=>{const u=[];let c=null,a=null;const o=n.sort((l,h)=>t(l,h,d));for(const l of o)e(l,i,d)?(a=l,c||(c=l)):(a&&u.push([c,a]),a=null,c=null);c&&u.push([c,null]);const f=[];for(const[l,h]of u)l===h?f.push(l):!h&&l===o[0]?f.push("*"):h?l===o[0]?f.push(`<=${h}`):f.push(`${l} - ${h}`):f.push(`>=${l}`);const r=f.join(" || "),s=typeof i.raw=="string"?i.raw:String(i);return r.length<s.length?r:i},gn}var mn,Fi;function Ku(){if(Fi)return mn;Fi=1;const e=Ne(),t=Xt(),{ANY:n}=t,i=Wt(),d=Le(),u=(s,l,h={})=>{if(s===l)return!0;s=new e(s,h),l=new e(l,h);let w=!1;e:for(const $ of s.set){for(const U of l.set){const O=o($,U,h);if(w=w||O!==null,O)continue e}if(w)return!1}return!0},c=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(s,l,h)=>{if(s===l)return!0;if(s.length===1&&s[0].semver===n){if(l.length===1&&l[0].semver===n)return!0;h.includePrerelease?s=c:s=a}if(l.length===1&&l[0].semver===n){if(h.includePrerelease)return!0;l=a}const w=new Set;let $,U;for(const k of s)k.operator===">"||k.operator===">="?$=f($,k,h):k.operator==="<"||k.operator==="<="?U=r(U,k,h):w.add(k.semver);if(w.size>1)return null;let O;if($&&U){if(O=d($.semver,U.semver,h),O>0)return null;if(O===0&&($.operator!==">="||U.operator!=="<="))return null}for(const k of w){if($&&!i(k,String($),h)||U&&!i(k,String(U),h))return null;for(const B of l)if(!i(k,String(B),h))return!1;return!0}let J,K,x,E,P=U&&!h.includePrerelease&&U.semver.prerelease.length?U.semver:!1,D=$&&!h.includePrerelease&&$.semver.prerelease.length?$.semver:!1;P&&P.prerelease.length===1&&U.operator==="<"&&P.prerelease[0]===0&&(P=!1);for(const k of l){if(E=E||k.operator===">"||k.operator===">=",x=x||k.operator==="<"||k.operator==="<=",$){if(D&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===D.major&&k.semver.minor===D.minor&&k.semver.patch===D.patch&&(D=!1),k.operator===">"||k.operator===">="){if(J=f($,k,h),J===k&&J!==$)return!1}else if($.operator===">="&&!k.test($.semver))return!1}if(U){if(P&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===P.major&&k.semver.minor===P.minor&&k.semver.patch===P.patch&&(P=!1),k.operator==="<"||k.operator==="<="){if(K=r(U,k,h),K===k&&K!==U)return!1}else if(U.operator==="<="&&!k.test(U.semver))return!1}if(!k.operator&&(U||$)&&O!==0)return!1}return!($&&x&&!U&&O!==0||U&&E&&!$&&O!==0||D||P)},f=(s,l,h)=>{if(!s)return l;const w=d(s.semver,l.semver,h);return w>0?s:w<0||l.operator===">"&&s.operator===">="?l:s},r=(s,l,h)=>{if(!s)return l;const w=d(s.semver,l.semver,h);return w<0?s:w>0||l.operator==="<"&&s.operator==="<="?l:s};return mn=u,mn}var yn,Vi;function Yu(){if(Vi)return yn;Vi=1;const e=_t(),t=xt(),n=ve(),i=ma(),d=it(),u=xu(),c=_u(),a=Au(),o=Tu(),f=Cu(),r=ju(),s=Pu(),l=Ou(),h=Le(),w=ku(),$=Bu(),U=Qn(),O=Lu(),J=Nu(),K=Jt(),x=es(),E=ya(),P=ba(),D=ts(),k=rs(),B=wa(),p=Mu(),S=qu(),Y=Xt(),_=Ne(),M=Wt(),q=Uu(),z=Du(),L=Fu(),H=Vu(),b=zu(),g=ns(),I=Gu(),j=Ju(),N=Xu(),y=Wu(),v=Ku();return yn={parse:d,valid:u,clean:c,inc:a,diff:o,major:f,minor:r,patch:s,prerelease:l,compare:h,rcompare:w,compareLoose:$,compareBuild:U,sort:O,rsort:J,gt:K,lt:x,eq:E,neq:P,gte:D,lte:k,cmp:B,coerce:p,truncate:S,Comparator:Y,Range:_,satisfies:M,toComparators:q,maxSatisfying:z,minSatisfying:L,minVersion:H,validRange:b,outside:g,gtr:I,ltr:j,intersects:N,simplifyRange:y,subset:v,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers},yn}var zi;function Zu(){return zi||(zi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=qe(),n=Yu(),i=Ke();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",s=>(0,n.valid)(s)===null?`Expected SemVer version, got "${s}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",s=>(0,n.validRange)(s)===null?`Expected SemVer range, got "${s}"`:!0);function d(s){return(0,t.is)(s,e.VersionStruct)}e.isValidSemVerVersion=d;function u(s){return(0,t.is)(s,e.VersionRangeStruct)}e.isValidSemVerRange=u;function c(s){(0,i.assertStruct)(s,e.VersionStruct)}e.assertIsSemVerVersion=c;function a(s){(0,i.assertStruct)(s,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function o(s,l){return(0,n.gt)(s,l)}e.gtVersion=o;function f(s,l){return(0,n.gtr)(s,l)}e.gtRange=f;function r(s,l){return(0,n.satisfies)(s,l,{includePrerelease:!0})}e.satisfiesVersionRange=r})(Ir)),Ir}var Gi;function Ie(){return Gi||(Gi=1,(function(e){var t=et&&et.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=et&&et.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ke(),e),n(ga(),e),n(Yn(),e),n(hu(),e),n(pu(),e),n(gu(),e),n(mu(),e),n(yu(),e),n(pa(),e),n(zt(),e),n(bu(),e),n(wu(),e),n(Eu(),e),n(Kn(),e),n(Su(),e),n(vu(),e),n($u(),e),n(Ru(),e),n(Iu(),e),n(Zu(),e)})(et)),et}var bn={},Ji;function He(){return Ji||(Ji=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const t=Ie(),n=u=>typeof u=="string"?u:u instanceof Error||(0,t.isObject)(u)&&(0,t.hasProperty)(u,"message")&&typeof u.message=="string"?u.message:"Unknown error.";e.getErrorMessage=n;const i=u=>{if(u instanceof Error)return u.stack};e.getErrorStack=i;class d extends Error{constructor(c,a){super(c),this.name="ParserError";const o=(0,e.getErrorStack)(a);o&&(this.stack=o)}}e.ParserError=d})(bn)),bn}var wn={},pt={},Xi;function Qu(){if(Xi)return pt;Xi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.iterate=void 0;const e=Ie(),t=function*(n,i=32){for(let d=0;d<n.length;d+=i){const u=a=>{(0,e.assert)(a>=0,"Cannot skip a negative number of bytes."),(0,e.assert)(a%i===0,"Length must be a multiple of the size."),d+=a},c=n.subarray(d);yield{skip:u,value:c}}return{skip:()=>{},value:new Uint8Array}};return pt.iterate=t,pt}var rt={},En={},nt={},ze={},Wi;function el(){if(Wi)return ze;Wi=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.padEnd=ze.padStart=ze.set=void 0;const e=Ie(),t=32,n=(u,c,a)=>(0,e.concatBytes)([u.subarray(0,a),c,u.subarray(a+c.length)]);ze.set=n;const i=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([a,u])};ze.padStart=i;const d=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([u,a])};return ze.padEnd=d,ze}var Ki;function ct(){return Ki||(Ki=1,(function(e){var t=nt&&nt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=nt&&nt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(el(),e)})(nt)),nt}var Yi;function tl(){return Yi||(Yi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.address=e.getAddress=void 0;const t=Ie(),n=He(),i=ct(),d=u=>{const c=(0,t.createBytes)(u);return(0,t.assert)(c.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${c.length} bytes.`)),(0,i.padStart)(c,20)};e.getAddress=d,e.address={isDynamic:!1,isType:u=>u==="address",getByteLength(){return 32},encode({buffer:u,value:c,packed:a}){const o=(0,e.getAddress)(c);if(a)return(0,t.concatBytes)([u,o]);const f=(0,i.padStart)(o);return(0,t.concatBytes)([u,f])},decode({value:u}){return(0,t.add0x)((0,t.bytesToHex)(u.slice(12,32)))}}})(En)),En}var Sn={},vn={},Zi;function ss(){return Zi||(Zi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const t=Ie(),n=He(),i=ct(),d=/^bytes([0-9]{1,2})$/u,u=c=>{var f;const a=(f=c.match(d))==null?void 0:f[1];(0,t.assert)(a,`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`);const o=Number(a);return(0,t.assert)(o>0&&o<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`)),o};e.getByteLength=u,e.fixedBytes={isDynamic:!1,isType(c){return d.test(c)},getByteLength(){return 32},encode({type:c,buffer:a,value:o,packed:f}){const r=(0,e.getByteLength)(c),s=(0,t.createBytes)(o);return(0,t.assert)(s.length<=r,new n.ParserError(`Expected a value of length ${r}, but received a value of length ${s.length}.`)),f?(0,t.concatBytes)([a,(0,i.padEnd)(s,r)]):(0,t.concatBytes)([a,(0,i.padEnd)(s)])},decode({type:c,value:a}){const o=(0,e.getByteLength)(c);return a.slice(0,o)}}})(vn)),vn}var $n={},Qi;function Ea(){return Qi||(Qi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tuple=e.getTupleElements=void 0;const t=Ie(),n=He(),i=is(),d=/^\((.+)\)$/u,u=a=>d.test(a),c=a=>{(0,t.assert)(a.startsWith("(")&&a.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${a}".`));const o=[];let f="",r=0;for(let s=1;s<a.length-1;s++){const l=a[s];l===","&&r===0?(o.push(f.trim()),f=""):(f+=l,l==="("?r+=1:l===")"&&(r-=1))}return f.trim()&&o.push(f.trim()),o};e.getTupleElements=c,e.tuple={isDynamic(a){return(0,e.getTupleElements)(a).some(f=>{const r=(0,i.getParser)(f);return(0,i.isDynamicParser)(r,f)})},isType(a){return u(a)},getByteLength(a){return(0,i.isDynamicParser)(this,a)?32:(0,e.getTupleElements)(a).reduce((f,r)=>f+(0,i.getParser)(r).getByteLength(r),0)},encode({type:a,buffer:o,value:f,packed:r,tight:s}){const l=(0,e.getTupleElements)(a);return(0,i.pack)({types:l,values:f,byteArray:o,packed:r,tight:s})},decode({type:a,value:o,skip:f}){const r=(0,e.getTupleElements)(a),s=this.getByteLength(a)-32;return f(s),(0,i.unpack)(r,o)}}})($n)),$n}var eo;function rl(){return eo||(eo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const t=Ie(),n=He(),i=is(),d=ct(),u=ss(),c=Ea(),a=/^(?<type>.*)\[(?<length>\d*?)\]$/u,o=s=>a.test(s);e.isArrayType=o;const f=s=>{var h;const l=s.match(a);return(0,t.assert)((h=l==null?void 0:l.groups)==null?void 0:h.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${s}".`)),[l.groups.type,l.groups.length?parseInt(l.groups.length,10):void 0]};e.getArrayType=f;const r=(s,l)=>`(${new Array(l).fill(s).join(",")})`;e.getTupleType=r,e.array={isDynamic(s){const[l,h]=(0,e.getArrayType)(s);return h===void 0||(0,i.isDynamicParser)((0,i.getParser)(l),l)},isType(s){return(0,e.isArrayType)(s)},getByteLength(s){(0,t.assert)((0,e.isArrayType)(s),new n.ParserError(`Expected an array type, but received "${s}".`));const[l,h]=(0,e.getArrayType)(s);return!(0,i.isDynamicParser)(this,s)&&h!==void 0?c.tuple.getByteLength((0,e.getTupleType)(l,h)):32},encode({type:s,buffer:l,value:h,packed:w,tight:$}){const[U,O]=(0,e.getArrayType)(s);if((0,t.assert)(!w||!(0,e.isArrayType)(U),new n.ParserError("Cannot pack nested arrays.")),w&&(0,i.isDynamicParser)((0,i.getParser)(U),U))return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:l,packed:w,arrayPacked:!0,tight:$});if(O)return(0,t.assert)(O===h.length,new n.ParserError(`Array length does not match type length. Expected a length of ${O}, but received ${h.length}.`)),c.tuple.encode({type:(0,e.getTupleType)(U,O),buffer:l,value:h,packed:u.fixedBytes.isType(U)&&$,tight:$});if(w)return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:l,packed:u.fixedBytes.isType(U)&&$,arrayPacked:!0,tight:$});const J=(0,d.padStart)((0,t.numberToBytes)(h.length));return(0,i.pack)({types:new Array(h.length).fill(U),values:h,byteArray:(0,t.concatBytes)([l,J]),packed:w,tight:$})},decode({type:s,value:l,...h}){const[w,$]=(0,e.getArrayType)(s);if($){const O=c.tuple.decode({type:(0,e.getTupleType)(w,$),value:l,...h});return(0,t.assert)(O.length===$,new n.ParserError(`Array length does not match type length. Expected a length of ${$}, but received ${O.length}.`)),O}const U=(0,t.bytesToNumber)(l.subarray(0,32));return(0,i.unpack)(new Array(U).fill(w),l.subarray(32))}}})(Sn)),Sn}var Rn={},In={},to;function Sa(){return to||(to=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const t=Ie(),n=He(),i=ct(),d=/^u?int(?<length>[0-9]*)?$/u,u=f=>!f.startsWith("u");e.isSigned=u;const c=f=>{var l;if(f==="int"||f==="uint")return 256;const r=f.match(d);(0,t.assert)((l=r==null?void 0:r.groups)==null?void 0:l.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${f}".`));const s=parseInt(r.groups.length,10);return(0,t.assert)(s>=8&&s<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${f}".`)),(0,t.assert)(s%8===0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${f}".`)),s};e.getLength=c;const a=(f,r)=>{const s=(0,e.getLength)(r),l=BigInt(2)**BigInt(s-((0,e.isSigned)(r)?1:0))-BigInt(1);if((0,e.isSigned)(r)){(0,t.assert)(f>=-(l+BigInt(1))&&f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`));return}(0,t.assert)(f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`))};e.assertNumberLength=a;const o=f=>{try{return(0,t.createBigInt)(f)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${f}".`)}};e.getBigInt=o,e.number={isDynamic:!1,isType(f){return d.test(f)},getByteLength(){return 32},encode({type:f,buffer:r,value:s,packed:l}){const h=(0,e.getBigInt)(s);if((0,e.assertNumberLength)(h,f),(0,e.isSigned)(f)){if(l){const w=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,t.signedBigIntToBytes)(h,w)])}return(0,t.concatBytes)([r,(0,i.padStart)((0,t.signedBigIntToBytes)(h,32))])}if(l){const w=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,i.padStart)((0,t.bigIntToBytes)(h),w)])}return(0,t.concatBytes)([r,(0,i.padStart)((0,t.bigIntToBytes)(h))])},decode({type:f,value:r}){const s=r.subarray(0,32);if((0,e.isSigned)(f)){const h=(0,t.bytesToSignedBigInt)(s);return(0,e.assertNumberLength)(h,f),h}const l=(0,t.bytesToBigInt)(s);return(0,e.assertNumberLength)(l,f),l}}})(In)),In}var ro;function nl(){return ro||(ro=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bool=e.getBooleanValue=void 0;const t=qe(),n=Ie(),i=He(),d=Sa(),u=(0,t.coerce)((0,t.boolean)(),(0,t.union)([(0,t.literal)("true"),(0,t.literal)("false")]),a=>a==="true"),c=a=>{try{return(0,t.create)(a,u)?BigInt(1):BigInt(0)}catch{throw new i.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${a}".`)}};e.getBooleanValue=c,e.bool={isDynamic:!1,isType:a=>a==="bool",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const s=(0,e.getBooleanValue)(o);return f?(0,n.concatBytes)([a,(0,n.bigIntToBytes)(s)]):d.number.encode({type:"uint256",buffer:a,value:s,packed:f,tight:r})},decode(a){return d.number.decode({...a,type:"uint256"})===BigInt(1)}}})(Rn)),Rn}var gt={},no;function va(){if(no)return gt;no=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.bytes=void 0;const e=Ie(),t=ct();return gt.bytes={isDynamic:!0,isType:n=>n==="bytes",getByteLength(){return 32},encode({buffer:n,value:i,packed:d}){const u=(0,e.createBytes)(i);if(d)return(0,e.concatBytes)([n,u]);const c=Math.ceil(u.byteLength/32)*32;return(0,e.concatBytes)([n,(0,t.padStart)((0,e.numberToBytes)(u.byteLength)),(0,t.padEnd)(u,c)])},decode({value:n}){const i=n.subarray(0,32),d=(0,e.bytesToNumber)(i);return n.slice(32,32+d)}},gt}var xn={},so;function sl(){return so||(so=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fn=e.getFunction=void 0;const t=qe(),n=Ie(),i=He(),d=ss(),u=(0,t.coerce)((0,t.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,t.union)([n.StrictHexStruct,(0,t.instance)(Uint8Array)]),a=>{const o=(0,n.createBytes)(a);return(0,n.assert)(o.length===24,new i.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${o.length} bytes.`)),{address:(0,n.bytesToHex)(o.subarray(0,20)),selector:(0,n.bytesToHex)(o.subarray(20,24))}}),c=a=>{const o=(0,t.create)(a,u);return(0,n.concatBytes)([(0,n.hexToBytes)(o.address),(0,n.hexToBytes)(o.selector)])};e.getFunction=c,e.fn={isDynamic:!1,isType:a=>a==="function",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const s=(0,e.getFunction)(o);return d.fixedBytes.encode({type:"bytes24",buffer:a,value:s,packed:f,tight:r})},decode({value:a}){return{address:(0,n.bytesToHex)(a.slice(0,20)),selector:(0,n.bytesToHex)(a.slice(20,24))}}}})(xn)),xn}var _n={},io;function il(){return io||(io=1,Object.defineProperty(_n,"__esModule",{value:!0})),_n}var mt={},oo;function ol(){if(oo)return mt;oo=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.string=void 0;const e=Ie(),t=va();return mt.string={isDynamic:!0,isType:n=>n==="string",getByteLength(){return 32},encode({buffer:n,value:i,packed:d,tight:u}){return t.bytes.encode({type:"bytes",buffer:n,value:(0,e.stringToBytes)(i),packed:d,tight:u})},decode(n){return(0,e.bytesToString)(t.bytes.decode(n))}},mt}var ao;function al(){return ao||(ao=1,(function(e){var t=rt&&rt.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=rt&&rt.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(tl(),e),n(rl(),e),n(nl(),e),n(va(),e),n(ss(),e),n(sl(),e),n(Sa(),e),n(il(),e),n(ol(),e),n(Ea(),e)})(rt)),rt}var co;function is(){return co||(co=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=void 0;const t=Ie(),n=He(),i=Qu(),d=al(),u=ct(),c=r=>{const s={address:d.address,array:d.array,bool:d.bool,bytes:d.bytes,fixedBytes:d.fixedBytes,function:d.fn,number:d.number,string:d.string,tuple:d.tuple},l=s[r];if(l)return l;const h=Object.values(s).find(w=>w.isType(r));if(h)return h;throw new n.ParserError(`The type "${r}" is not supported.`)};e.getParser=c;const a=(r,s)=>{const{isDynamic:l}=r;return typeof l=="function"?l(s):l};e.isDynamicParser=a;const o=({types:r,values:s,packed:l=!1,tight:h=!1,arrayPacked:w=!1,byteArray:$=new Uint8Array})=>{(0,t.assert)(r.length===s.length,new n.ParserError(`The number of types (${r.length}) does not match the number of values (${s.length}).`));const{staticBuffer:U,dynamicBuffer:O,pointers:J}=r.reduce(({staticBuffer:E,dynamicBuffer:P,pointers:D},k,B)=>{const p=(0,e.getParser)(k),S=s[B];if(l||w||!(0,e.isDynamicParser)(p,k))return{staticBuffer:p.encode({buffer:E,value:S,type:k,packed:l,tight:h}),dynamicBuffer:P,pointers:D};const Y=(0,t.concatBytes)([E,new Uint8Array(32)]),_=p.encode({buffer:P,value:S,type:k,packed:l,tight:h});return{staticBuffer:Y,dynamicBuffer:_,pointers:[...D,{position:E.length,pointer:P.length}]}},{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,t.assert)(!l&&!w||O.length===0,new n.ParserError("Invalid pack state."));const K=U.length,x=J.reduce((E,{pointer:P,position:D})=>{const k=(0,u.padStart)((0,t.numberToBytes)(K+P));return(0,u.set)(E,k,D)},U);return(0,t.concatBytes)([$,x,O])};e.pack=o;const f=(r,s)=>{const l=(0,i.iterate)(s);return r.map(h=>{const{value:{value:w,skip:$},done:U}=l.next();(0,t.assert)(!U,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${h}".`));const O=(0,e.getParser)(h);if((0,e.isDynamicParser)(O,h)){const K=(0,t.bytesToNumber)(w.subarray(0,32)),x=s.subarray(K);return O.decode({type:h,value:x,skip:$})}return O.decode({type:h,value:w,skip:$})})};e.unpack=f})(wn)),wn}var uo;function cl(){return uo||(uo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const t=Ie(),n=He(),i=is(),d=(f,r,s,l)=>{try{return(0,i.pack)({types:f,values:r,packed:s,tight:l})}catch(h){throw h instanceof n.ParserError?new n.ParserError(`Unable to encode value: ${h.message}`,h):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(h)}`,h)}};e.encode=d;const u=(f,r)=>(0,e.encode)([f],[r]);e.encodeSingle=u;const c=(f,r,s)=>(0,e.encode)(f,r,!0,s);e.encodePacked=c;const a=(f,r)=>{const s=(0,t.createBytes)(r);try{return(0,i.unpack)(f,s)}catch(l){throw l instanceof n.ParserError?new n.ParserError(`Unable to decode value: ${l.message}`,l):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(l)}`,l)}};e.decode=a;const o=(f,r)=>{const s=(0,e.decode)([f],r);return(0,t.assert)(s.length===1,new n.ParserError("Decoded value array has unexpected length.")),s[0]};e.decodeSingle=o})(hr)),hr}var st={},An={},lo;function ul(){return lo||(lo=1,Object.defineProperty(An,"__esModule",{value:!0})),An}var fo;function ll(){return fo||(fo=1,(function(e){var t=st&&st.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=st&&st.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(ul(),e)})(st)),st}var ho;function $a(){return ho||(ho=1,(function(e){var t=Qe&&Qe.__createBinding||(Object.create?(function(i,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(i,c,a)}):(function(i,d,u,c){c===void 0&&(c=u),i[c]=d[u]})),n=Qe&&Qe.__exportStar||function(i,d){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(cl(),e),n(He(),e),n(ll(),e)})(Qe)),Qe}var Oe={},Tn={},ce={},po;function dl(){if(po)return ce;po=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ce,"__esModule",{value:!0}),ce.notImplemented=ce.bitMask=void 0,ce.isBytes=n,ce.abytes=i,ce.abool=d,ce.numberToHexUnpadded=u,ce.hexToNumber=c,ce.bytesToHex=f,ce.hexToBytes=l,ce.bytesToNumberBE=h,ce.bytesToNumberLE=w,ce.numberToBytesBE=$,ce.numberToBytesLE=U,ce.numberToVarBytesBE=O,ce.ensureBytes=J,ce.concatBytes=K,ce.equalBytes=x,ce.utf8ToBytes=E,ce.inRange=D,ce.aInRange=k,ce.bitLen=B,ce.bitGet=p,ce.bitSet=S,ce.createHmacDrbg=q,ce.validateObject=L,ce.memoized=b;const e=BigInt(0),t=BigInt(1);function n(g){return g instanceof Uint8Array||ArrayBuffer.isView(g)&&g.constructor.name==="Uint8Array"}function i(g){if(!n(g))throw new Error("Uint8Array expected")}function d(g,I){if(typeof I!="boolean")throw new Error(g+" boolean expected, got "+I)}function u(g){const I=g.toString(16);return I.length&1?"0"+I:I}function c(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);return g===""?e:BigInt("0x"+g)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",o=Array.from({length:256},(g,I)=>I.toString(16).padStart(2,"0"));function f(g){if(i(g),a)return g.toHex();let I="";for(let j=0;j<g.length;j++)I+=o[g[j]];return I}const r={_0:48,_9:57,A:65,F:70,a:97,f:102};function s(g){if(g>=r._0&&g<=r._9)return g-r._0;if(g>=r.A&&g<=r.F)return g-(r.A-10);if(g>=r.a&&g<=r.f)return g-(r.a-10)}function l(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);if(a)return Uint8Array.fromHex(g);const I=g.length,j=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const N=new Uint8Array(j);for(let y=0,v=0;y<j;y++,v+=2){const A=s(g.charCodeAt(v)),X=s(g.charCodeAt(v+1));if(A===void 0||X===void 0){const V=g[v]+g[v+1];throw new Error('hex string expected, got non-hex character "'+V+'" at index '+v)}N[y]=A*16+X}return N}function h(g){return c(f(g))}function w(g){return i(g),c(f(Uint8Array.from(g).reverse()))}function $(g,I){return l(g.toString(16).padStart(I*2,"0"))}function U(g,I){return $(g,I).reverse()}function O(g){return l(u(g))}function J(g,I,j){let N;if(typeof I=="string")try{N=l(I)}catch(v){throw new Error(g+" must be hex string or Uint8Array, cause: "+v)}else if(n(I))N=Uint8Array.from(I);else throw new Error(g+" must be hex string or Uint8Array");const y=N.length;if(typeof j=="number"&&y!==j)throw new Error(g+" of length "+j+" expected, got "+y);return N}function K(...g){let I=0;for(let N=0;N<g.length;N++){const y=g[N];i(y),I+=y.length}const j=new Uint8Array(I);for(let N=0,y=0;N<g.length;N++){const v=g[N];j.set(v,y),y+=v.length}return j}function x(g,I){if(g.length!==I.length)return!1;let j=0;for(let N=0;N<g.length;N++)j|=g[N]^I[N];return j===0}function E(g){if(typeof g!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(g))}const P=g=>typeof g=="bigint"&&e<=g;function D(g,I,j){return P(g)&&P(I)&&P(j)&&I<=g&&g<j}function k(g,I,j,N){if(!D(I,j,N))throw new Error("expected valid "+g+": "+j+" <= n < "+N+", got "+I)}function B(g){let I;for(I=0;g>e;g>>=t,I+=1);return I}function p(g,I){return g>>BigInt(I)&t}function S(g,I,j){return g|(j?t:e)<<BigInt(I)}const Y=g=>(t<<BigInt(g))-t;ce.bitMask=Y;const _=g=>new Uint8Array(g),M=g=>Uint8Array.from(g);function q(g,I,j){if(typeof g!="number"||g<2)throw new Error("hashLen must be a number");if(typeof I!="number"||I<2)throw new Error("qByteLen must be a number");if(typeof j!="function")throw new Error("hmacFn must be a function");let N=_(g),y=_(g),v=0;const A=()=>{N.fill(1),y.fill(0),v=0},X=(...ne)=>j(y,N,...ne),V=(ne=_(0))=>{y=X(M([0]),ne),N=X(),ne.length!==0&&(y=X(M([1]),ne),N=X())},W=()=>{if(v++>=1e3)throw new Error("drbg: tried 1000 values");let ne=0;const G=[];for(;ne<I;){N=X();const ie=N.slice();G.push(ie),ne+=N.length}return K(...G)};return(ne,G)=>{A(),V(ne);let ie;for(;!(ie=G(W()));)V();return A(),ie}}const z={bigint:g=>typeof g=="bigint",function:g=>typeof g=="function",boolean:g=>typeof g=="boolean",string:g=>typeof g=="string",stringOrUint8Array:g=>typeof g=="string"||n(g),isSafeInteger:g=>Number.isSafeInteger(g),array:g=>Array.isArray(g),field:(g,I)=>I.Fp.isValid(g),hash:g=>typeof g=="function"&&Number.isSafeInteger(g.outputLen)};function L(g,I,j={}){const N=(y,v,A)=>{const X=z[v];if(typeof X!="function")throw new Error("invalid validator function");const V=g[y];if(!(A&&V===void 0)&&!X(V,g))throw new Error("param "+String(y)+" is invalid. Expected "+v+", got "+V)};for(const[y,v]of Object.entries(I))N(y,v,!1);for(const[y,v]of Object.entries(j))N(y,v,!0);return g}const H=()=>{throw new Error("not implemented")};ce.notImplemented=H;function b(g){const I=new WeakMap;return(j,...N)=>{const y=I.get(j);if(y!==void 0)return y;const v=g(j,...N);return I.set(j,v),v}}return ce}var ke={},Cn={},yt={},go;function fl(){return go||(go=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.crypto=void 0,yt.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),yt}var mo;function Ut(){return mo||(mo=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=i,e.abytes=d,e.ahash=u,e.aexists=c,e.aoutput=a,e.u8=o,e.u32=f,e.clean=r,e.createView=s,e.rotr=l,e.rotl=h,e.byteSwap=w,e.byteSwap32=$,e.bytesToHex=J,e.hexToBytes=E,e.asyncLoop=D,e.utf8ToBytes=k,e.bytesToUtf8=B,e.toBytes=p,e.kdfInputToBytes=S,e.concatBytes=Y,e.checkOpts=_,e.createHasher=q,e.createOptHasher=z,e.createXOFer=L,e.randomBytes=H;const t=fl();function n(b){return b instanceof Uint8Array||ArrayBuffer.isView(b)&&b.constructor.name==="Uint8Array"}function i(b){if(!Number.isSafeInteger(b)||b<0)throw new Error("positive integer expected, got "+b)}function d(b,...g){if(!n(b))throw new Error("Uint8Array expected");if(g.length>0&&!g.includes(b.length))throw new Error("Uint8Array expected of length "+g+", got length="+b.length)}function u(b){if(typeof b!="function"||typeof b.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");i(b.outputLen),i(b.blockLen)}function c(b,g=!0){if(b.destroyed)throw new Error("Hash instance has been destroyed");if(g&&b.finished)throw new Error("Hash#digest() has already been called")}function a(b,g){d(b);const I=g.outputLen;if(b.length<I)throw new Error("digestInto() expects output buffer of length at least "+I)}function o(b){return new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}function f(b){return new Uint32Array(b.buffer,b.byteOffset,Math.floor(b.byteLength/4))}function r(...b){for(let g=0;g<b.length;g++)b[g].fill(0)}function s(b){return new DataView(b.buffer,b.byteOffset,b.byteLength)}function l(b,g){return b<<32-g|b>>>g}function h(b,g){return b<<g|b>>>32-g>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function w(b){return b<<24&4278190080|b<<8&16711680|b>>>8&65280|b>>>24&255}e.swap8IfBE=e.isLE?b=>b:b=>w(b),e.byteSwapIfBE=e.swap8IfBE;function $(b){for(let g=0;g<b.length;g++)b[g]=w(b[g]);return b}e.swap32IfBE=e.isLE?b=>b:$;const U=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",O=Array.from({length:256},(b,g)=>g.toString(16).padStart(2,"0"));function J(b){if(d(b),U)return b.toHex();let g="";for(let I=0;I<b.length;I++)g+=O[b[I]];return g}const K={_0:48,_9:57,A:65,F:70,a:97,f:102};function x(b){if(b>=K._0&&b<=K._9)return b-K._0;if(b>=K.A&&b<=K.F)return b-(K.A-10);if(b>=K.a&&b<=K.f)return b-(K.a-10)}function E(b){if(typeof b!="string")throw new Error("hex string expected, got "+typeof b);if(U)return Uint8Array.fromHex(b);const g=b.length,I=g/2;if(g%2)throw new Error("hex string expected, got unpadded hex of length "+g);const j=new Uint8Array(I);for(let N=0,y=0;N<I;N++,y+=2){const v=x(b.charCodeAt(y)),A=x(b.charCodeAt(y+1));if(v===void 0||A===void 0){const X=b[y]+b[y+1];throw new Error('hex string expected, got non-hex character "'+X+'" at index '+y)}j[N]=v*16+A}return j}const P=async()=>{};e.nextTick=P;async function D(b,g,I){let j=Date.now();for(let N=0;N<b;N++){I(N);const y=Date.now()-j;y>=0&&y<g||(await(0,e.nextTick)(),j+=y)}}function k(b){if(typeof b!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(b))}function B(b){return new TextDecoder().decode(b)}function p(b){return typeof b=="string"&&(b=k(b)),d(b),b}function S(b){return typeof b=="string"&&(b=k(b)),d(b),b}function Y(...b){let g=0;for(let j=0;j<b.length;j++){const N=b[j];d(N),g+=N.length}const I=new Uint8Array(g);for(let j=0,N=0;j<b.length;j++){const y=b[j];I.set(y,N),N+=y.length}return I}function _(b,g){if(g!==void 0&&{}.toString.call(g)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(b,g)}class M{}e.Hash=M;function q(b){const g=j=>b().update(p(j)).digest(),I=b();return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=()=>b(),g}function z(b){const g=(j,N)=>b(N).update(p(j)).digest(),I=b({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=j=>b(j),g}function L(b){const g=(j,N)=>b(N).update(p(j)).digest(),I=b({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=j=>b(j),g}e.wrapConstructor=q,e.wrapConstructorWithOpts=z,e.wrapXOFConstructorWithOpts=L;function H(b=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(b));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(b));throw new Error("crypto.getRandomValues must be defined")}})(Cn)),Cn}var yo;function hl(){if(yo)return ke;yo=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.aoutput=ke.anumber=ke.aexists=ke.abytes=void 0;const e=Ut();return ke.abytes=e.abytes,ke.aexists=e.aexists,ke.anumber=e.anumber,ke.aoutput=e.aoutput,ke}var bo;function Ra(){return bo||(bo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.assertBytes=e.assertBool=e.utf8ToBytes=e.toHex=e.createView=e.concatBytes=e.bytesToHex=void 0,e.bytesToUtf8=u,e.hexToBytes=c,e.equalsBytes=a,e.wrapHash=o;const t=dl();Object.defineProperty(e,"assertBool",{enumerable:!0,get:function(){return t.abool}});const n=hl();Object.defineProperty(e,"assertBytes",{enumerable:!0,get:function(){return n.abytes}});const i=Ut();var d=Ut();Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return d.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return d.createView}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return d.utf8ToBytes}});function u(f){if(!(f instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof f}`);return new TextDecoder().decode(f)}function c(f){const r=f.startsWith("0x")?f.substring(2):f;return(0,i.hexToBytes)(r)}function a(f,r){if(f.length!==r.length)return!1;for(let s=0;s<f.length;s++)if(f[s]!==r[s])return!1;return!0}function o(f){return r=>((0,n.abytes)(r),f(r))}})(Tn)),Tn}var wo;function At(){if(wo)return Oe;wo=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.compare=Oe.concat=Oe.toHex=Oe.toBytes=void 0;const e=Ra();function t(u){return u instanceof Uint8Array?u:typeof u=="string"?(0,e.hexToBytes)(u):new Uint8Array(u)}Oe.toBytes=t;function n(u){return typeof u=="string"?((0,e.hexToBytes)(u),u.replace(/^(0x)?/,"0x")):u instanceof Uint8Array?"0x"+(0,e.bytesToHex)(u):"0x"+(0,e.bytesToHex)(new Uint8Array(u))}Oe.toHex=n;function i(u){return(0,e.concatBytes)(...u.map(t))}Oe.concat=i;function d(u,c){const a=BigInt(n(u))-BigInt(n(c));return a>0?1:a<0?-1:0}return Oe.compare=d,Oe}var Se={},Ge={},Be={},de={},re={},Eo;function pl(){if(Eo)return re;Eo=1,Object.defineProperty(re,"__esModule",{value:!0}),re.toBig=re.shrSL=re.shrSH=re.rotrSL=re.rotrSH=re.rotrBL=re.rotrBH=re.rotr32L=re.rotr32H=re.rotlSL=re.rotlSH=re.rotlBL=re.rotlBH=re.add5L=re.add5H=re.add4L=re.add4H=re.add3L=re.add3H=void 0,re.add=O,re.fromBig=n,re.split=i;const e=BigInt(2**32-1),t=BigInt(32);function n(B,p=!1){return p?{h:Number(B&e),l:Number(B>>t&e)}:{h:Number(B>>t&e)|0,l:Number(B&e)|0}}function i(B,p=!1){const S=B.length;let Y=new Uint32Array(S),_=new Uint32Array(S);for(let M=0;M<S;M++){const{h:q,l:z}=n(B[M],p);[Y[M],_[M]]=[q,z]}return[Y,_]}const d=(B,p)=>BigInt(B>>>0)<<t|BigInt(p>>>0);re.toBig=d;const u=(B,p,S)=>B>>>S;re.shrSH=u;const c=(B,p,S)=>B<<32-S|p>>>S;re.shrSL=c;const a=(B,p,S)=>B>>>S|p<<32-S;re.rotrSH=a;const o=(B,p,S)=>B<<32-S|p>>>S;re.rotrSL=o;const f=(B,p,S)=>B<<64-S|p>>>S-32;re.rotrBH=f;const r=(B,p,S)=>B>>>S-32|p<<64-S;re.rotrBL=r;const s=(B,p)=>p;re.rotr32H=s;const l=(B,p)=>B;re.rotr32L=l;const h=(B,p,S)=>B<<S|p>>>32-S;re.rotlSH=h;const w=(B,p,S)=>p<<S|B>>>32-S;re.rotlSL=w;const $=(B,p,S)=>p<<S-32|B>>>64-S;re.rotlBH=$;const U=(B,p,S)=>B<<S-32|p>>>64-S;re.rotlBL=U;function O(B,p,S,Y){const _=(p>>>0)+(Y>>>0);return{h:B+S+(_/2**32|0)|0,l:_|0}}const J=(B,p,S)=>(B>>>0)+(p>>>0)+(S>>>0);re.add3L=J;const K=(B,p,S,Y)=>p+S+Y+(B/2**32|0)|0;re.add3H=K;const x=(B,p,S,Y)=>(B>>>0)+(p>>>0)+(S>>>0)+(Y>>>0);re.add4L=x;const E=(B,p,S,Y,_)=>p+S+Y+_+(B/2**32|0)|0;re.add4H=E;const P=(B,p,S,Y,_)=>(B>>>0)+(p>>>0)+(S>>>0)+(Y>>>0)+(_>>>0);re.add5L=P;const D=(B,p,S,Y,_,M)=>p+S+Y+_+M+(B/2**32|0)|0;re.add5H=D;const k={fromBig:n,split:i,toBig:d,shrSH:u,shrSL:c,rotrSH:a,rotrSL:o,rotrBH:f,rotrBL:r,rotr32H:s,rotr32L:l,rotlSH:h,rotlSL:w,rotlBH:$,rotlBL:U,add:O,add3L:J,add3H:K,add4L:x,add4H:E,add5H:D,add5L:P};return re.default=k,re}var So;function gl(){if(So)return de;So=1,Object.defineProperty(de,"__esModule",{value:!0}),de.shake256=de.shake128=de.keccak_512=de.keccak_384=de.keccak_256=de.keccak_224=de.sha3_512=de.sha3_384=de.sha3_256=de.sha3_224=de.Keccak=void 0,de.keccakP=U;const e=pl(),t=Ut(),n=BigInt(0),i=BigInt(1),d=BigInt(2),u=BigInt(7),c=BigInt(256),a=BigInt(113),o=[],f=[],r=[];for(let x=0,E=i,P=1,D=0;x<24;x++){[P,D]=[D,(2*P+3*D)%5],o.push(2*(5*D+P)),f.push((x+1)*(x+2)/2%64);let k=n;for(let B=0;B<7;B++)E=(E<<i^(E>>u)*a)%c,E&d&&(k^=i<<(i<<BigInt(B))-i);r.push(k)}const s=(0,e.split)(r,!0),l=s[0],h=s[1],w=(x,E,P)=>P>32?(0,e.rotlBH)(x,E,P):(0,e.rotlSH)(x,E,P),$=(x,E,P)=>P>32?(0,e.rotlBL)(x,E,P):(0,e.rotlSL)(x,E,P);function U(x,E=24){const P=new Uint32Array(10);for(let D=24-E;D<24;D++){for(let p=0;p<10;p++)P[p]=x[p]^x[p+10]^x[p+20]^x[p+30]^x[p+40];for(let p=0;p<10;p+=2){const S=(p+8)%10,Y=(p+2)%10,_=P[Y],M=P[Y+1],q=w(_,M,1)^P[S],z=$(_,M,1)^P[S+1];for(let L=0;L<50;L+=10)x[p+L]^=q,x[p+L+1]^=z}let k=x[2],B=x[3];for(let p=0;p<24;p++){const S=f[p],Y=w(k,B,S),_=$(k,B,S),M=o[p];k=x[M],B=x[M+1],x[M]=Y,x[M+1]=_}for(let p=0;p<50;p+=10){for(let S=0;S<10;S++)P[S]=x[p+S];for(let S=0;S<10;S++)x[p+S]^=~P[(S+2)%10]&P[(S+4)%10]}x[0]^=l[D],x[1]^=h[D]}(0,t.clean)(P)}class O extends t.Hash{constructor(E,P,D,k=!1,B=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=E,this.suffix=P,this.outputLen=D,this.enableXOF=k,this.rounds=B,(0,t.anumber)(D),!(0<E&&E<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),U(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(E){(0,t.aexists)(this),E=(0,t.toBytes)(E),(0,t.abytes)(E);const{blockLen:P,state:D}=this,k=E.length;for(let B=0;B<k;){const p=Math.min(P-this.pos,k-B);for(let S=0;S<p;S++)D[this.pos++]^=E[B++];this.pos===P&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:E,suffix:P,pos:D,blockLen:k}=this;E[D]^=P,(P&128)!==0&&D===k-1&&this.keccak(),E[k-1]^=128,this.keccak()}writeInto(E){(0,t.aexists)(this,!1),(0,t.abytes)(E),this.finish();const P=this.state,{blockLen:D}=this;for(let k=0,B=E.length;k<B;){this.posOut>=D&&this.keccak();const p=Math.min(D-this.posOut,B-k);E.set(P.subarray(this.posOut,this.posOut+p),k),this.posOut+=p,k+=p}return E}xofInto(E){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(E)}xof(E){return(0,t.anumber)(E),this.xofInto(new Uint8Array(E))}digestInto(E){if((0,t.aoutput)(E,this),this.finished)throw new Error("digest() was already called");return this.writeInto(E),this.destroy(),E}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(E){const{blockLen:P,suffix:D,outputLen:k,rounds:B,enableXOF:p}=this;return E||(E=new O(P,D,k,p,B)),E.state32.set(this.state32),E.pos=this.pos,E.posOut=this.posOut,E.finished=this.finished,E.rounds=B,E.suffix=D,E.outputLen=k,E.enableXOF=p,E.destroyed=this.destroyed,E}}de.Keccak=O;const J=(x,E,P)=>(0,t.createHasher)(()=>new O(E,x,P));de.sha3_224=J(6,144,224/8),de.sha3_256=J(6,136,256/8),de.sha3_384=J(6,104,384/8),de.sha3_512=J(6,72,512/8),de.keccak_224=J(1,144,224/8),de.keccak_256=J(1,136,256/8),de.keccak_384=J(1,104,384/8),de.keccak_512=J(1,72,512/8);const K=(x,E,P)=>(0,t.createXOFer)((D={})=>new O(E,x,D.dkLen===void 0?P:D.dkLen,!0));return de.shake128=K(31,168,128/8),de.shake256=K(31,136,256/8),de}var vo;function ml(){if(vo)return Be;vo=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.keccak512=Be.keccak384=Be.keccak256=Be.keccak224=void 0;const e=gl(),t=Ra();return Be.keccak224=(0,t.wrapHash)(e.keccak_224),Be.keccak256=(()=>{const n=(0,t.wrapHash)(e.keccak_256);return n.create=e.keccak_256.create,n})(),Be.keccak384=(0,t.wrapHash)(e.keccak_384),Be.keccak512=(0,t.wrapHash)(e.keccak_512),Be}var $o;function Ia(){if($o)return Ge;$o=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.standardNodeHash=Ge.standardLeafHash=Ge.keccak256=void 0;const e=$a(),t=ml(),n=At();function i(c){return(0,n.toHex)((0,t.keccak256)((0,n.toBytes)(c)))}Ge.keccak256=i;function d(c,a){return i(i((0,e.encode)(c,a)))}Ge.standardLeafHash=d;function u(c,a){return i((0,n.concat)([c,a].sort(n.compare)))}return Ge.standardNodeHash=u,Ge}var _e={},Ro;function Kt(){if(Ro)return _e;Ro=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.invariant=_e.validateArgument=_e.InvalidArgumentError=_e.InvariantError=_e.throwError=void 0;function e(u){throw new Error(u)}_e.throwError=e;class t extends Error{constructor(c){super(c),this.name="InvariantError"}}_e.InvariantError=t;class n extends Error{constructor(c){super(c),this.name="InvalidArgumentError"}}_e.InvalidArgumentError=n;function i(u,c){if(!u)throw new n(c)}_e.validateArgument=i;function d(u,c){if(!u)throw new t(c)}return _e.invariant=d,_e}var Io;function os(){if(Io)return Se;Io=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.renderMerkleTree=Se.isValidMerkleTree=Se.processMultiProof=Se.getMultiProof=Se.processProof=Se.getProof=Se.makeMerkleTree=void 0;const e=At(),t=Ia(),n=Kt(),i=x=>2*x+1,d=x=>2*x+2,u=x=>x>0?Math.floor((x-1)/2):(0,n.throwError)("Root has no parent"),c=x=>x>0?x-(-1)**(x%2):(0,n.throwError)("Root has no siblings"),a=(x,E)=>E>=0&&E<x.length,o=(x,E)=>a(x,i(E)),f=(x,E)=>a(x,E)&&!o(x,E),r=x=>(0,e.toBytes)(x).length===32,s=(x,E)=>void(f(x,E)||(0,n.throwError)("Index is not a leaf")),l=x=>void(r(x)||(0,n.throwError)("Merkle tree nodes must be Uint8Array of length 32"));function h(x,E=t.standardNodeHash){x.forEach(l),(0,n.validateArgument)(x.length!==0,"Expected non-zero number of leaves");const P=new Array(2*x.length-1);for(const[D,k]of x.entries())P[P.length-1-D]=(0,e.toHex)(k);for(let D=P.length-1-x.length;D>=0;D--)P[D]=E(P[i(D)],P[d(D)]);return P}Se.makeMerkleTree=h;function w(x,E){s(x,E);const P=[];for(;E>0;)P.push((0,e.toHex)(x[c(E)])),E=u(E);return P}Se.getProof=w;function $(x,E,P=t.standardNodeHash){return l(x),E.forEach(l),(0,e.toHex)(E.reduce(P,x))}Se.processProof=$;function U(x,E){E.forEach(B=>s(x,B)),E.sort((B,p)=>p-B),(0,n.validateArgument)(E.slice(1).every((B,p)=>B!==E[p]),"Cannot prove duplicated index");const P=Array.from(E),D=[],k=[];for(;P.length>0&&P[0]>0;){const B=P.shift(),p=c(B),S=u(B);p===P[0]?(k.push(!0),P.shift()):(k.push(!1),D.push((0,e.toHex)(x[p]))),P.push(S)}return E.length===0&&D.push((0,e.toHex)(x[0])),{leaves:E.map(B=>(0,e.toHex)(x[B])),proof:D,proofFlags:k}}Se.getMultiProof=U;function O(x,E=t.standardNodeHash){x.leaves.forEach(l),x.proof.forEach(l),(0,n.validateArgument)(x.proof.length>=x.proofFlags.filter(k=>!k).length,"Invalid multiproof format"),(0,n.validateArgument)(x.leaves.length+x.proof.length===x.proofFlags.length+1,"Provided leaves and multiproof are not compatible");const P=Array.from(x.leaves),D=Array.from(x.proof);for(const k of x.proofFlags){const B=P.shift(),p=k?P.shift():D.shift();(0,n.invariant)(B!==void 0&&p!==void 0),P.push(E(B,p))}return(0,n.invariant)(P.length+D.length===1),(0,e.toHex)(P.pop()??D.shift())}Se.processMultiProof=O;function J(x,E=t.standardNodeHash){for(const[P,D]of x.entries()){if(!r(D))return!1;const k=i(P),B=d(P);if(B>=x.length){if(k<x.length)return!1}else if((0,e.compare)(D,E(x[k],x[B])))return!1}return x.length>0}Se.isValidMerkleTree=J;function K(x){(0,n.validateArgument)(x.length!==0,"Expected non-zero number of nodes");const E=[[0,[]]],P=[];for(;E.length>0;){const[D,k]=E.pop();P.push(k.slice(0,-1).map(B=>[" ","│ "][B]).join("")+k.slice(-1).map(B=>["└─ ","├─ "][B]).join("")+D+") "+(0,e.toHex)(x[D])),d(D)<x.length&&(E.push([d(D),k.concat(0)]),E.push([i(D),k.concat(1)]))}return P.join(`
|
|
4
|
+
`)}return Se.renderMerkleTree=K,Se}var bt={},wt={},xo;function yl(){return xo||(xo=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.defaultOptions=void 0,wt.defaultOptions={sortLeaves:!0}),wt}var _o;function xa(){if(_o)return bt;_o=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.MerkleTreeImpl=void 0;const e=At(),t=os(),n=yl(),i=Kt();class d{constructor(c,a,o,f){this.tree=c,this.values=a,this.leafHash=o,this.nodeHash=f,(0,i.validateArgument)(a.every(({value:r})=>typeof r!="number"),"Leaf values cannot be numbers"),this.hashLookup=Object.fromEntries(a.map(({treeIndex:r},s)=>[c[r],s]))}static prepare(c,a={},o,f){const r=a.sortLeaves??n.defaultOptions.sortLeaves,s=c.map((w,$)=>({value:w,valueIndex:$,hash:o(w)}));r&&s.sort((w,$)=>(0,e.compare)(w.hash,$.hash));const l=(0,t.makeMerkleTree)(s.map(w=>w.hash),f),h=c.map(w=>({value:w,treeIndex:0}));for(const[w,{valueIndex:$}]of s.entries())h[$].treeIndex=l.length-w-1;return[l,h]}get root(){return this.tree[0]}get length(){return this.values.length}at(c){var a;return(a=this.values.at(c))==null?void 0:a.value}render(){return(0,t.renderMerkleTree)(this.tree)}*entries(){for(const[c,{value:a}]of this.values.entries())yield[c,a]}validate(){this.values.forEach((c,a)=>this._validateValueAt(a)),(0,i.invariant)((0,t.isValidMerkleTree)(this.tree,this.nodeHash),"Merkle tree is invalid")}leafLookup(c){const a=this.hashLookup[this.leafHash(c)];return(0,i.validateArgument)(typeof a<"u","Leaf is not in tree"),a}getProof(c){const a=typeof c=="number"?c:this.leafLookup(c);this._validateValueAt(a);const{treeIndex:o}=this.values[a],f=(0,t.getProof)(this.tree,o);return(0,i.invariant)(this._verify(this.tree[o],f),"Unable to prove value"),f}getMultiProof(c){const a=c.map(r=>typeof r=="number"?r:this.leafLookup(r));for(const r of a)this._validateValueAt(r);const o=a.map(r=>this.values[r].treeIndex),f=(0,t.getMultiProof)(this.tree,o);return(0,i.invariant)(this._verifyMultiProof(f),"Unable to prove values"),{leaves:f.leaves.map(r=>this.values[this.hashLookup[r]].value),proof:f.proof,proofFlags:f.proofFlags}}verify(c,a){return this._verify(this._leafHash(c),a)}verifyMultiProof(c){return this._verifyMultiProof({leaves:c.leaves.map(a=>this._leafHash(a)),proof:c.proof,proofFlags:c.proofFlags})}_validateValueAt(c){const a=this.values[c];(0,i.validateArgument)(a!==void 0,"Index out of bounds"),(0,i.invariant)(this.tree[a.treeIndex]===this.leafHash(a.value),"Merkle tree does not contain the expected value")}_leafHash(c){if(typeof c=="number"){const a=this.values[c];(0,i.validateArgument)(a!==void 0,"Index out of bounds"),c=a.value}return this.leafHash(c)}_verify(c,a){return this.root===(0,t.processProof)(c,a,this.nodeHash)}_verifyMultiProof(c){return this.root===(0,t.processMultiProof)(c,this.nodeHash)}}return bt.MerkleTreeImpl=d,bt}var Ao;function bl(){if(Ao)return Ze;Ao=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.SimpleMerkleTree=Ze.formatLeaf=void 0;const e=$a(),t=At(),n=os(),i=xa(),d=Kt();function u(a){return(0,t.toHex)((0,e.encode)(["bytes32"],[a]))}Ze.formatLeaf=u;class c extends i.MerkleTreeImpl{static of(o,f={}){const[r,s]=i.MerkleTreeImpl.prepare(o,f,u,f.nodeHash);return new c(r,s,u,f.nodeHash)}static load(o,f){(0,d.validateArgument)(o.format==="simple-v1",`Unknown format '${o.format}'`),(0,d.validateArgument)(f==null!=(o.hash=="custom"),f?"Data does not expect a custom node hashing function":"Data expects a custom node hashing function");const r=new c(o.tree,o.values,u,f);return r.validate(),r}static verify(o,f,r,s){return(0,t.toHex)(o)===(0,n.processProof)(u(f),r,s)}static verifyMultiProof(o,f,r){return(0,t.toHex)(o)===(0,n.processMultiProof)(f,r)}dump(){return{format:"simple-v1",tree:this.tree,values:this.values.map(({value:o,treeIndex:f})=>({value:(0,t.toHex)(o),treeIndex:f})),...this.nodeHash?{hash:"custom"}:{}}}}return Ze.SimpleMerkleTree=c,Ze}var Et={},To;function wl(){if(To)return Et;To=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.StandardMerkleTree=void 0;const e=At(),t=os(),n=xa(),i=Ia(),d=Kt();class u extends n.MerkleTreeImpl{constructor(a,o,f){super(a,o,r=>(0,i.standardLeafHash)(f,r)),this.tree=a,this.values=o,this.leafEncoding=f}static of(a,o,f={}){const[r,s]=n.MerkleTreeImpl.prepare(a,f,l=>(0,i.standardLeafHash)(o,l));return new u(r,s,o)}static load(a){(0,d.validateArgument)(a.format==="standard-v1",`Unknown format '${a.format}'`),(0,d.validateArgument)(a.leafEncoding!==void 0,"Expected leaf encoding");const o=new u(a.tree,a.values,a.leafEncoding);return o.validate(),o}static verify(a,o,f,r){return(0,e.toHex)(a)===(0,t.processProof)((0,i.standardLeafHash)(o,f),r)}static verifyMultiProof(a,o,f){return(0,e.toHex)(a)===(0,t.processMultiProof)({leaves:f.leaves.map(r=>(0,i.standardLeafHash)(o,r)),proof:f.proof,proofFlags:f.proofFlags})}dump(){return{format:"standard-v1",leafEncoding:this.leafEncoding,tree:this.tree,values:this.values}}}return Et.StandardMerkleTree=u,Et}var Co;function El(){return Co||(Co=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StandardMerkleTree=e.SimpleMerkleTree=void 0;var t=bl();Object.defineProperty(e,"SimpleMerkleTree",{enumerable:!0,get:function(){return t.SimpleMerkleTree}});var n=wl();Object.defineProperty(e,"StandardMerkleTree",{enumerable:!0,get:function(){return n.StandardMerkleTree}})})(fr)),fr}var Sl=El();const _a=1,Aa=5,Ta=70,vl=720*60*60*1e3,Ca=1e6,jo={couponManager:"0x3fd3056ee72a2a85e9392fab3a450e7736536081",collectionDiscountCoupon:"0xc914507fe297b2dddd1232ac3a8903f1c125e794"};function ja(e){try{const t=ir(or.CouponManager,e),n=ir(or.CollectionDiscountCoupon,e);return{couponManager:{address:t.address,name:t.name,version:t.version,abi:t.abi},collectionDiscountCoupon:n.address}}catch{if(e!==zn.ChainId.MATIC_MAINNET)return null;const{abi:t}=ir(or.CouponManager,zn.ChainId.MATIC_AMOY);return{couponManager:{address:jo.couponManager,name:"CouponManager",version:"1.0.0",abi:t},collectionDiscountCoupon:jo.collectionDiscountCoupon}}}function as(e){return[...new Set(e.map(t=>t.toLowerCase()))]}function $l(e){const t=as(e);if(t.length===0)throw new We("collections");return Sl.StandardMerkleTree.of(t.map(n=>[n]),["address"]).root}function Pa(e,t){return yc.encode(["uint256","uint256","bytes32"],[_a,e,t])}function Rl(){return{Coupon:[{name:"checks",type:"Checks"},{name:"couponAddress",type:"address"},{name:"data",type:"bytes"}],Checks:ws.Checks,ExternalCheck:ws.ExternalCheck}}const Dt=e=>Math.floor(e/1e3);function Il(e,t){return{name:t.couponManager.name,version:t.couponManager.version,salt:$t(aa(e),32),verifyingContract:t.couponManager.address}}function xl(e,t,n){return{checks:{uses:e.uses,expiration:Dt(e.expiration),effective:Dt(e.effective),salt:$t(e.salt,32),contractSignatureIndex:e.contractSignatureIndex,signerSignatureIndex:e.signerSignatureIndex,allowedRoot:$t(e.allowedRoot||"0x",32),externalChecks:[]},couponAddress:t,data:n}}class We extends Error{constructor(t){super(`Invalid sale: ${t}`),this.problem=t,this.name="SaleInputError"}}function Oa(e,t=Date.now()){if(as(e.collections).length===0)throw new We("collections");if(!Number.isInteger(e.discountPct)||e.discountPct<Aa||e.discountPct>Ta)throw new We("pct");const n=e.startsAtMs??t;if(!(e.endsAtMs>t)||!(e.endsAtMs>n))throw new We("window");if(e.endsAtMs-Math.max(n,t)>vl)throw new We("duration");if(e.uses!==void 0&&(!Number.isInteger(e.uses)||e.uses<1))throw new We("uses")}const _l=["function contractSignatureIndex() view returns (uint256)","function signerSignatureIndex(address) view returns (uint256)"];async function Al(e,t){const n=new oa(e,_l,pc()),[i,d]=await Promise.all([n.contractSignatureIndex(),n.signerSignatureIndex(t)]);return{contractSignatureIndex:i.toNumber(),signerSignatureIndex:d.toNumber()}}async function Tl(e,t={}){const n=t.now?t.now():Date.now();Oa(e,n);const i=ja(e.chainId);if(!i)throw new Error(`Coupons are not available on chain ${e.chainId}`);const d=(await e.signer.getAddress()).toLowerCase(),u=as(e.collections),c=await(t.readIndexes??Al)(i.couponManager.address,d),a={uses:e.uses??Ca,expiration:e.endsAtMs,effective:e.startsAtMs??n,salt:aa(mc(32)),contractSignatureIndex:c.contractSignatureIndex,signerSignatureIndex:c.signerSignatureIndex,allowedRoot:"0x",externalChecks:[]},o=e.discountPct*1e4,f=Pa(o,$l(u)),r=await e.signer._signTypedData(Il(e.chainId,i),Rl(),xl(a,i.collectionDiscountCoupon,f));return{signer:d,chainId:e.chainId,network:zn.Network.MATIC,checks:a,couponAddress:i.collectionDiscountCoupon,discountType:_a,discount:o,collections:u,signature:r}}async function Cl(e,t){const n=await tc(`${Rt.marketplaceServerUrl}/v1/coupons`,{method:"POST",identity:t,metadata:{signer:"dcl:marketplace",intent:"dcl:create-coupon"},headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await n.json().catch(()=>({}));if(!n.ok||!i.ok||!i.data)throw new Error(i.message??`postCoupon ${n.status}`);return i.data}async function jl(e){var i;const t=await fetch(`${Rt.marketplaceServerUrl}/v1/coupons?signer=${e.toLowerCase()}`);if(!t.ok)throw(i=t.body)==null||i.cancel(),new Error(`fetchCreatorSales ${t.status}`);return(await t.json()).data??[]}function Pl(e){return e.checks.uses<Ca}function Ol(e,t=Date.now()){return e.status==="cancelled"||e.status==="revoked"||e.status==="exhausted"?e.status:e.checks.expiration<=t?"ended":e.checks.effective>t?"scheduled":"active"}async function kl(e){const{sale:t,signer:n}=e;await ec(n.provider,t.chainId);const i=ja(t.chainId);if(!i)throw new Error(`Coupons are not available on chain ${t.chainId}`);const d=new oa(i.couponManager.address,i.couponManager.abi,n),u={signature:t.signature,checks:{uses:t.checks.uses,expiration:Dt(t.checks.expiration),effective:Dt(t.checks.effective),salt:$t(t.checks.salt,32),contractSignatureIndex:t.checks.contractSignatureIndex,signerSignatureIndex:t.checks.signerSignatureIndex,allowedRoot:$t(t.checks.allowedRoot||"0x",32),allowedProof:[],externalChecks:[]},couponAddress:t.couponAddress,data:Pa(t.discount,t.root),callerData:"0x"};return(await(await d.cancelSignature([u],gc(t.chainId))).wait()).transactionHash}function Mt(e){return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e))}const jn=F.div`
|
|
5
5
|
position: fixed;
|
|
6
6
|
inset: 0;
|
|
7
7
|
z-index: ${R.z.overlay};
|
|
@@ -59,7 +59,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
59
59
|
outline: 2px solid ${R.colors.accent};
|
|
60
60
|
outline-offset: 2px;
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,Bl=F.p`
|
|
63
63
|
margin: 0;
|
|
64
64
|
font-family: ${R.font.sans};
|
|
65
65
|
font-size: 14px;
|
|
@@ -69,17 +69,17 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
71
|
gap: 8px;
|
|
72
|
-
`,
|
|
72
|
+
`,Ot=F.span`
|
|
73
73
|
font-family: ${R.font.sans};
|
|
74
74
|
font-size: 12px;
|
|
75
75
|
color: ${R.colors.muted};
|
|
76
|
-
`,
|
|
76
|
+
`,Ll=F.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
flex-direction: column;
|
|
79
79
|
gap: 8px;
|
|
80
80
|
max-height: 220px;
|
|
81
81
|
overflow-y: auto;
|
|
82
|
-
`,
|
|
82
|
+
`,Nl=F.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
gap: 12px;
|
|
@@ -95,19 +95,19 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
95
95
|
&[data-readonly] {
|
|
96
96
|
cursor: default;
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`,Ml=F.span`
|
|
99
99
|
flex: none;
|
|
100
100
|
width: 40px;
|
|
101
101
|
height: 40px;
|
|
102
102
|
border-radius: ${R.radius.btn};
|
|
103
103
|
overflow: hidden;
|
|
104
104
|
background: ${R.colors.media};
|
|
105
|
-
`,
|
|
105
|
+
`,ql=F.span`
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-direction: column;
|
|
108
108
|
gap: 2px;
|
|
109
109
|
min-width: 0;
|
|
110
|
-
`,
|
|
110
|
+
`,Hl=F.span`
|
|
111
111
|
font-family: ${R.font.sans};
|
|
112
112
|
font-weight: 600;
|
|
113
113
|
font-size: 14px;
|
|
@@ -115,7 +115,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
115
115
|
overflow: hidden;
|
|
116
116
|
text-overflow: ellipsis;
|
|
117
117
|
white-space: nowrap;
|
|
118
|
-
`,
|
|
118
|
+
`,Ul=F.span`
|
|
119
119
|
font-family: ${R.font.sans};
|
|
120
120
|
font-size: 12px;
|
|
121
121
|
color: ${R.colors.muted};
|
|
@@ -174,7 +174,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
174
174
|
outline: 2px solid ${R.colors.accent};
|
|
175
175
|
outline-offset: 2px;
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,Po=F.span`
|
|
178
178
|
display: inline-flex;
|
|
179
179
|
align-items: center;
|
|
180
180
|
gap: 4px;
|
|
@@ -223,7 +223,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
223
223
|
appearance: textfield;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
`,
|
|
226
|
+
`,Oo=F.input`
|
|
227
227
|
/* Chip height exactly: this field opens inside a row of chips, and two pixels of difference there
|
|
228
228
|
resized the whole modal. */
|
|
229
229
|
height: 40px;
|
|
@@ -245,7 +245,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
245
245
|
outline: none;
|
|
246
246
|
border-color: ${R.colors.magenta};
|
|
247
247
|
}
|
|
248
|
-
`,
|
|
248
|
+
`,Dl=F.div`
|
|
249
249
|
display: flex;
|
|
250
250
|
align-items: center;
|
|
251
251
|
gap: 8px;
|
|
@@ -262,12 +262,12 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
262
262
|
accent-color: ${R.colors.accent};
|
|
263
263
|
cursor: pointer;
|
|
264
264
|
}
|
|
265
|
-
`,
|
|
265
|
+
`,Fl=F.label`
|
|
266
266
|
display: inline-flex;
|
|
267
267
|
align-items: center;
|
|
268
268
|
gap: 8px;
|
|
269
269
|
cursor: pointer;
|
|
270
|
-
`,
|
|
270
|
+
`,Vl=F.p`
|
|
271
271
|
display: flex;
|
|
272
272
|
align-items: center;
|
|
273
273
|
margin: 0;
|
|
@@ -279,13 +279,13 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
279
279
|
font-size: 13px;
|
|
280
280
|
line-height: 1.5;
|
|
281
281
|
color: ${R.colors.text2};
|
|
282
|
-
`,
|
|
282
|
+
`,ko=F.p`
|
|
283
283
|
margin: 0;
|
|
284
284
|
font-family: ${R.font.sans};
|
|
285
285
|
font-size: 13px;
|
|
286
286
|
color: ${R.colors.muted};
|
|
287
287
|
text-align: center;
|
|
288
|
-
`,
|
|
288
|
+
`,zl=F.button`
|
|
289
289
|
width: 100%;
|
|
290
290
|
height: 48px;
|
|
291
291
|
border: 0;
|
|
@@ -312,14 +312,14 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
312
312
|
background: rgba(105, 31, 169, 0.2);
|
|
313
313
|
color: ${R.colors.white};
|
|
314
314
|
}
|
|
315
|
-
`,
|
|
315
|
+
`,Bo=F.div`
|
|
316
316
|
display: flex;
|
|
317
317
|
gap: 12px;
|
|
318
318
|
|
|
319
319
|
${R.media.maxWidth("mobile")} {
|
|
320
320
|
flex-direction: column;
|
|
321
321
|
}
|
|
322
|
-
`,
|
|
322
|
+
`,ka=`
|
|
323
323
|
flex: 1 1 0;
|
|
324
324
|
height: 48px;
|
|
325
325
|
border-radius: ${R.radius.modal};
|
|
@@ -333,13 +333,13 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
333
333
|
outline: 2px solid ${R.colors.accent};
|
|
334
334
|
outline-offset: 2px;
|
|
335
335
|
}
|
|
336
|
-
`,
|
|
337
|
-
${
|
|
336
|
+
`,Lo=F.button`
|
|
337
|
+
${ka}
|
|
338
338
|
border: 1px solid ${R.colors.accent};
|
|
339
339
|
background: ${R.colors.white};
|
|
340
340
|
color: ${R.colors.accent};
|
|
341
|
-
`,
|
|
342
|
-
${
|
|
341
|
+
`,No=F.button`
|
|
342
|
+
${ka}
|
|
343
343
|
border: 0;
|
|
344
344
|
background: ${R.colors.accent};
|
|
345
345
|
color: ${R.colors.white};
|
|
@@ -347,7 +347,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
347
347
|
&:hover {
|
|
348
348
|
background: ${R.colors.accentHover};
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,Gl=F.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
flex-direction: column;
|
|
353
353
|
align-items: center;
|
|
@@ -356,7 +356,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
356
356
|
border-radius: ${R.radius.modal};
|
|
357
357
|
background: rgba(193, 238, 207, 0.5);
|
|
358
358
|
text-align: center;
|
|
359
|
-
`,
|
|
359
|
+
`,Jl=F.div`
|
|
360
360
|
display: grid;
|
|
361
361
|
place-items: center;
|
|
362
362
|
width: 64px;
|
|
@@ -369,13 +369,13 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
369
369
|
width: 34px;
|
|
370
370
|
height: 34px;
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`,Xl=F.p`
|
|
373
373
|
margin: 0;
|
|
374
374
|
font-family: ${R.font.sans};
|
|
375
375
|
font-size: 20px;
|
|
376
376
|
line-height: 1.4;
|
|
377
377
|
color: ${R.colors.text};
|
|
378
|
-
`,
|
|
378
|
+
`,Wl=F.p`
|
|
379
379
|
margin: 0;
|
|
380
380
|
display: inline-flex;
|
|
381
381
|
align-items: center;
|
|
@@ -385,7 +385,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
385
385
|
font-family: ${R.font.sans};
|
|
386
386
|
font-size: 14px;
|
|
387
387
|
color: ${R.colors.text2};
|
|
388
|
-
`,
|
|
388
|
+
`,Kl=F.div`
|
|
389
389
|
display: inline-grid;
|
|
390
390
|
grid-template-columns: 1fr 0fr;
|
|
391
391
|
align-items: center;
|
|
@@ -398,7 +398,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
398
398
|
@media (prefers-reduced-motion: reduce) {
|
|
399
399
|
transition: none;
|
|
400
400
|
}
|
|
401
|
-
`,
|
|
401
|
+
`,Yl=F.div`
|
|
402
402
|
display: inline-grid;
|
|
403
403
|
grid-template-columns: 0fr;
|
|
404
404
|
transition: grid-template-columns 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
@@ -419,14 +419,14 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
419
419
|
&[data-off] {
|
|
420
420
|
pointer-events: none;
|
|
421
421
|
}
|
|
422
|
-
`,
|
|
422
|
+
`,Zl=F.div`
|
|
423
423
|
display: flex;
|
|
424
424
|
flex-direction: column;
|
|
425
425
|
gap: 8px;
|
|
426
426
|
padding: 12px;
|
|
427
427
|
border-radius: ${R.radius.btn};
|
|
428
428
|
background: ${R.colors.panel};
|
|
429
|
-
`,
|
|
429
|
+
`,Ql=F.span`
|
|
430
430
|
display: inline-flex;
|
|
431
431
|
align-items: center;
|
|
432
432
|
/* Hugs its label: it sits in the same 1fr column the dates fill, which would otherwise stretch it. */
|
|
@@ -458,30 +458,30 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
458
458
|
`,Mn=F.span`
|
|
459
459
|
color: ${R.colors.muted};
|
|
460
460
|
font-size: 13px;
|
|
461
|
-
`,
|
|
461
|
+
`,Mo=F.b`
|
|
462
462
|
font-weight: 700;
|
|
463
463
|
color: ${R.colors.text};
|
|
464
464
|
overflow: hidden;
|
|
465
465
|
text-overflow: ellipsis;
|
|
466
466
|
white-space: nowrap;
|
|
467
|
-
`,
|
|
467
|
+
`,qo=F(Jn)`
|
|
468
468
|
flex: none;
|
|
469
469
|
padding: 0;
|
|
470
470
|
background: none;
|
|
471
471
|
color: ${R.colors.muted};
|
|
472
472
|
font-size: 13px;
|
|
473
473
|
font-weight: 600;
|
|
474
|
-
`,
|
|
474
|
+
`,Ho=F.div`
|
|
475
475
|
display: flex;
|
|
476
476
|
flex-direction: column;
|
|
477
477
|
gap: 8px;
|
|
478
|
-
`,
|
|
478
|
+
`,Uo=F.h3`
|
|
479
479
|
margin: 0;
|
|
480
480
|
font-family: ${R.font.sans};
|
|
481
481
|
font-weight: 600;
|
|
482
482
|
font-size: 13px;
|
|
483
483
|
color: ${R.colors.text};
|
|
484
|
-
`,
|
|
484
|
+
`,Do=F.ul`
|
|
485
485
|
display: flex;
|
|
486
486
|
flex-direction: column;
|
|
487
487
|
gap: 8px;
|
|
@@ -491,7 +491,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
491
491
|
/* Long collections stay inside the modal instead of pushing the actions off-screen. */
|
|
492
492
|
max-height: 232px;
|
|
493
493
|
overflow-y: auto;
|
|
494
|
-
`,
|
|
494
|
+
`,Fo=F.li`
|
|
495
495
|
display: grid;
|
|
496
496
|
grid-template-columns: 40px minmax(0, 1fr) auto;
|
|
497
497
|
align-items: center;
|
|
@@ -505,27 +505,27 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
505
505
|
background: ${R.colors.panel};
|
|
506
506
|
border-color: ${R.colors.panel};
|
|
507
507
|
}
|
|
508
|
-
`,
|
|
508
|
+
`,Vo=F.img`
|
|
509
509
|
width: 40px;
|
|
510
510
|
height: 40px;
|
|
511
511
|
border-radius: ${R.radius.btn};
|
|
512
512
|
object-fit: cover;
|
|
513
513
|
background: ${R.colors.media};
|
|
514
|
-
`,
|
|
514
|
+
`,zo=F.span`
|
|
515
515
|
font-family: ${R.font.sans};
|
|
516
516
|
font-size: 14px;
|
|
517
517
|
color: ${R.colors.text};
|
|
518
518
|
overflow: hidden;
|
|
519
519
|
text-overflow: ellipsis;
|
|
520
520
|
white-space: nowrap;
|
|
521
|
-
`,
|
|
521
|
+
`,ed=F.span`
|
|
522
522
|
display: grid;
|
|
523
523
|
grid-template-columns: minmax(30px, auto) minmax(40px, auto);
|
|
524
524
|
align-items: center;
|
|
525
525
|
gap: 6px;
|
|
526
526
|
font-family: ${R.font.sans};
|
|
527
527
|
white-space: nowrap;
|
|
528
|
-
`,
|
|
528
|
+
`,td=F.span`
|
|
529
529
|
display: inline-flex;
|
|
530
530
|
align-items: center;
|
|
531
531
|
justify-content: flex-end;
|
|
@@ -534,7 +534,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
534
534
|
text-decoration: line-through;
|
|
535
535
|
font-weight: 600;
|
|
536
536
|
font-size: 15px;
|
|
537
|
-
`,
|
|
537
|
+
`,rd=F.span`
|
|
538
538
|
display: inline-flex;
|
|
539
539
|
align-items: center;
|
|
540
540
|
justify-content: flex-end;
|
|
@@ -546,14 +546,14 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
546
546
|
&[data-heat='${e}'] {
|
|
547
547
|
color: ${t};
|
|
548
548
|
}`).join("")}
|
|
549
|
-
`,
|
|
549
|
+
`,nd=F.span`
|
|
550
550
|
font-family: ${R.font.sans};
|
|
551
551
|
font-size: 12px;
|
|
552
552
|
text-transform: uppercase;
|
|
553
553
|
letter-spacing: 0.04em;
|
|
554
554
|
color: ${R.colors.muted};
|
|
555
555
|
white-space: nowrap;
|
|
556
|
-
`,
|
|
556
|
+
`,sd=F.p`
|
|
557
557
|
margin: 0;
|
|
558
558
|
padding: 12px;
|
|
559
559
|
border-radius: ${R.radius.btn};
|
|
@@ -566,18 +566,18 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
566
566
|
b {
|
|
567
567
|
font-weight: 700;
|
|
568
568
|
}
|
|
569
|
-
`;function Jo(e,t){return Math.max(1,Math.ceil(e*(100-(Number.isFinite(t)?t:0))/100))}const od=[10,20,30,50],Xo=[{key:"24h",hours:24},{key:"48h",hours:48},{key:"72h",hours:72},{key:"7d",hours:168}],Bt=3600*1e3;function Lt(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function Wo(e){if(!e)return;const t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function Nt(e){switch(e){case"pct":return C("creatorSale.errorPct");case"duration":return C("creatorSale.errorDuration");case"collections":return C("creatorSale.errorCollections");case"uses":return C("creatorSale.errorUses");default:return C("creatorSale.errorWindow")}}function ad(e){return e%24===0&&e>=48?C("creatorSale.days",{count:e/24}):C("creatorSale.hours",{count:e})}function qn({id:e,open:t,chip:n,field:i}){return m.jsxs(Yl,{"data-open":t||void 0,"data-testid":e,children:[m.jsx(Gn,{"data-off":t||void 0,"aria-hidden":t||void 0,"data-testid":`${e}-chip`,children:n}),m.jsx(Gn,{"data-off":!t||void 0,"aria-hidden":!t||void 0,"data-testid":`${e}-field`,children:i})]})}function cd({session:e,collection:t,onCreated:n,onClose:i}){const d=na(),u=ra(),c=ee.useMemo(()=>[t.contractAddress],[t.contractAddress]),[a,o]=ee.useState("form"),[f,r]=ee.useState(20),[s,l]=ee.useState("15"),[h,w]=ee.useState("72h"),[$,U]=ee.useState(()=>Lt(Date.now()+168*Bt)),[O,J]=ee.useState("now"),[K,_]=ee.useState(()=>Lt(Date.now()+24*Bt)),[E,P]=ee.useState(!1),[D,k]=ee.useState("50"),[B,p]=ee.useState(!1),[S,Y]=ee.useState(!1),[x,M]=ee.useState(null),[q,z]=ee.useState(null),[L,H]=ee.useState(null),b=wc(e),g=f==="custom"?Number(s):f,I=ee.useMemo(()=>{const G=Date.now(),ie=O==="later"?Wo(K):void 0,ge=Xo.find(ye=>ye.key===h),ae=ge?(ie??G)+ge.hours*Bt:Wo($),le=E?Number(D):void 0,me={collections:c,discountPct:g,startsAtMs:ie,endsAtMs:ae??0,uses:le};let fe=null;try{ka(me,G)}catch(ye){fe=ye instanceof We?ye.problem:"window"}return{...me,problem:fe}},[c,g,h,$,O,K,E,D]),j=ee.useMemo(()=>{const G=t.examplePriceCredits??100;return{price:G,sale:Jo(G,g)}},[t,g]),N=ee.useMemo(()=>{const G=t.items.filter(ae=>ae.priceCredits!=null),ie=t.items.filter(ae=>ae.priceCredits==null),ge=G.reduce((ae,le)=>ae+le.remainingSupply,0);return{listed:G,unlisted:ie,supply:ge}},[t]);async function y(){if(p(!0),z(null),I.problem){z(Nt(I.problem));return}Y(!0);try{M(b?C("creatorSale.starting"):C("creatorSale.confirm"));const G=await Cl({signer:e.signer,chainId:It.chainId,collections:I.collections,discountPct:I.discountPct,startsAtMs:I.startsAtMs,endsAtMs:I.endsAtMs,uses:I.uses});M(C("creatorSale.finishing"));const ie=await jl(G,e.identity);M(null),H(ie);const ge=ie.status==="scheduled";qt("Shop Created Sale",{sale_id:ie.id,collections:ie.collections.length,discount_pct:I.discountPct,duration_h:Math.round((I.endsAtMs-(I.startsAtMs??Date.now()))/Bt),scheduled:ge,capped:I.uses!==void 0}),Vn.success(ge?C("creatorSale.toastScheduled"):C("creatorSale.toastLive")),n==null||n(ie),d.invalidateQueries({queryKey:["creator-sales"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]}),d.invalidateQueries({queryKey:["overview-listings"]}),d.invalidateQueries({queryKey:["collection-sale-state"]})}catch(G){G instanceof We?z(Nt(G.problem)):(ia(G,{flow:"creator_sale"}),qt("Shop Sale Failed",{error_code:oa(G)}),z(ua(G,C("creatorSale.errorGeneric")))),M(null)}finally{Y(!1)}}function v(){i(),u(`/items/creator/${e.address}`)}if(L){const G=L.status==="scheduled";return m.jsx(jn,{onClick:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-success",onClick:ie=>ie.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":G?C("creatorSale.successScheduledTitle"):C("creatorSale.successTitle"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:G?C("creatorSale.successScheduledTitle"):C("creatorSale.successTitle")}),m.jsx(Bn,{onClick:i,"aria-label":C("creatorSale.done"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsxs(Jl,{children:[m.jsx(Xl,{"aria-hidden":!0,children:m.jsx(Me,{name:"check",className:"ico"})}),m.jsx(Wl,{children:m.jsx("b",{children:C("creatorSale.successBody",{count:L.collections.length,pct:L.discount/1e4})})}),m.jsx(Kl,{children:G?C("creatorSale.successStarts",{date:Mt(L.checks.effective)}):m.jsxs(m.Fragment,{children:[C("creatorSale.successEnds")," ",m.jsx(Jn,{until:L.checks.expiration,testId:"creator-sale-countdown"})]})})]}),m.jsxs(Lo,{children:[m.jsx(No,{onClick:i,children:C("creatorSale.done")}),m.jsx(Mo,{onClick:v,children:C("creatorSale.viewStore")})]})]})})}const A=G=>m.jsx("b",{children:G}),X=I.uses!==void 0?Fn("creatorSale.reviewCap",{b:A,count:I.uses}):Fn("creatorSale.reviewNoCap",{b:A,count:N.supply});if(a==="review")return m.jsx(jn,{onClick:S?void 0:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-review",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":C("creatorSale.reviewTitle"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:C("creatorSale.reviewTitle")}),m.jsx(Bn,{onClick:i,disabled:S,"aria-label":C("creatorSale.cancel"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsxs(Ql,{children:[m.jsxs(Nn,{"data-testid":"creator-sale-review-discount",children:[m.jsx(Mn,{children:C("creatorSale.discount")}),m.jsx(ed,{"data-heat":Pt(g),"data-testid":"creator-sale-review-pct",children:C("creatorSale.offPct",{pct:g})})]}),m.jsxs(Nn,{"data-testid":"creator-sale-review-starts",children:[m.jsx(Mn,{children:C("creatorSale.reviewStarts")}),m.jsx(qo,{children:I.startsAtMs?Mt(I.startsAtMs):C("creatorSale.reviewStartsNow")}),I.startsAtMs?m.jsx(Ho,{until:I.startsAtMs}):null]}),m.jsxs(Nn,{"data-testid":"creator-sale-review-ends",children:[m.jsx(Mn,{children:C("creatorSale.reviewEnds")}),m.jsx(qo,{children:Mt(I.endsAtMs)}),m.jsx(Ho,{until:I.endsAtMs})]})]}),m.jsxs(Uo,{children:[m.jsx(Do,{children:C("creatorSale.reviewOnSale",{count:N.listed.length})}),m.jsx(Fo,{"data-testid":"creator-sale-review-items",children:N.listed.map(G=>m.jsxs(Vo,{"data-testid":"creator-sale-review-item",children:[m.jsx(zo,{src:G.thumbnail,alt:""}),m.jsx(Go,{"data-testid":"review-name",children:G.name}),m.jsxs(td,{children:[m.jsxs(rd,{"data-testid":"review-was",children:[m.jsx(ps,{size:12}),gs(G.priceCredits)]}),m.jsxs(nd,{"data-heat":Pt(g),"data-testid":"review-now",children:[m.jsx(ps,{size:14}),gs(Jo(G.priceCredits,g))]})]})]},G.key))})]}),N.unlisted.length>0?m.jsxs(Uo,{children:[m.jsx(Do,{children:C("creatorSale.reviewUntouched",{count:N.unlisted.length})}),m.jsx(Fo,{"data-testid":"creator-sale-review-untouched",children:N.unlisted.map(G=>m.jsxs(Vo,{"data-muted":!0,children:[m.jsx(zo,{src:G.thumbnail,alt:""}),m.jsx(Go,{children:G.name}),m.jsx(sd,{children:C("creatorSale.reviewNotListed")})]},G.key))})]}):null,m.jsx(id,{children:X}),x?m.jsx(Bo,{children:x}):null,m.jsx(Ht,{message:q,testId:"creator-sale-error"}),m.jsxs(Lo,{children:[m.jsx(No,{onClick:()=>{z(null),M(null),o("form")},disabled:S,"data-testid":"creator-sale-back",children:C("creatorSale.back")}),m.jsx(Mo,{"data-testid":"creator-sale-submit",onClick:()=>void y(),disabled:S,children:S?x:O==="later"?C("creatorSale.submitScheduled"):C("creatorSale.submit")})]})]})});const V=B&&I.problem?Nt(I.problem):null,W=f==="custom",oe=h==="custom",ne=O==="later";return m.jsx(jn,{onClick:S?void 0:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-modal",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":C("creatorSale.title"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:C("creatorSale.title")}),m.jsx(Bn,{onClick:i,disabled:S,"aria-label":C("creatorSale.cancel"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsx(Ll,{children:C("creatorSale.subtitle")}),m.jsxs(St,{children:[m.jsx(kt,{children:C("creatorSale.collection")}),m.jsx(Nl,{"data-testid":"creator-sale-collections",children:m.jsxs(Ml,{"data-selected":!0,"data-readonly":!0,children:[m.jsx(ql,{children:m.jsx(sa,{contractAddress:t.contractAddress})}),m.jsxs(Hl,{children:[m.jsx(Ul,{children:t.name}),m.jsx(Dl,{children:C("creatorSale.collectionListed",{count:t.listedCount})})]})]})})]}),m.jsxs(St,{children:[m.jsx(kt,{children:C("creatorSale.discount")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.discount"),"data-testid":"creator-sale-discounts",children:[od.map(G=>m.jsx(at,{type:"button","data-heat":Pt(G),"data-selected":f===G||void 0,"aria-pressed":f===G,disabled:S,onClick:()=>{p(!0),r(G)},children:C("creatorSale.offPct",{pct:G})},G)),m.jsx(qn,{id:"creator-sale-custom-pct",open:W,chip:m.jsx(at,{type:"button",tabIndex:W?-1:void 0,disabled:S,onClick:()=>{p(!0),r("custom")},children:C("creatorSale.customPct")}),field:m.jsxs(Oo,{"data-heat":Pt(g),"aria-invalid":B&&I.problem==="pct"?!0:void 0,children:[m.jsx("input",{type:"number",min:Ta,max:Ca,step:"1",inputMode:"numeric",value:s,disabled:S,tabIndex:W?void 0:-1,"aria-label":C("creatorSale.pctLabel"),onChange:G=>{p(!0),l(G.target.value)}}),m.jsx("span",{"aria-hidden":!0,children:"%"})]})})]})]}),m.jsxs(St,{children:[m.jsx(kt,{children:C("creatorSale.duration")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.duration"),"data-testid":"creator-sale-durations",children:[Xo.map(G=>m.jsx(at,{type:"button","data-selected":h===G.key||void 0,"aria-pressed":h===G.key,disabled:S,onClick:()=>{p(!0),w(G.key)},children:ad(G.hours)},G.key)),m.jsx(qn,{id:"creator-sale-custom-end",open:oe,chip:m.jsx(at,{type:"button",tabIndex:oe?-1:void 0,disabled:S,onClick:()=>{p(!0),w("custom")},children:C("creatorSale.customEnd")}),field:m.jsx(ko,{type:"datetime-local",value:$,min:Lt(Date.now()),disabled:S,tabIndex:oe?void 0:-1,"aria-label":C("creatorSale.endLabel"),onChange:G=>{p(!0),U(G.target.value)}})})]})]}),m.jsxs(St,{children:[m.jsx(kt,{children:C("creatorSale.start")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.start"),children:[m.jsx(at,{type:"button","data-selected":O==="now"||void 0,"aria-pressed":O==="now",disabled:S,onClick:()=>J("now"),children:C("creatorSale.startNow")}),m.jsx(qn,{id:"creator-sale-custom-start",open:ne,chip:m.jsx(at,{type:"button",tabIndex:ne?-1:void 0,disabled:S,onClick:()=>J("later"),children:C("creatorSale.startLater")}),field:m.jsx(ko,{type:"datetime-local",value:K,min:Lt(Date.now()),disabled:S,tabIndex:ne?void 0:-1,"aria-label":C("creatorSale.startLabel"),onChange:G=>{p(!0),_(G.target.value)}})})]})]}),m.jsx(St,{children:m.jsxs(Fl,{children:[m.jsxs(Vl,{children:[m.jsx("input",{type:"checkbox",checked:E,disabled:S,"data-testid":"creator-sale-cap-toggle",onChange:G=>P(G.target.checked)}),m.jsx("span",{children:C("creatorSale.cap")})]}),m.jsx(Zl,{"data-open":E||void 0,"data-testid":"creator-sale-cap",children:m.jsx(Gn,{"data-off":!E||void 0,"aria-hidden":!E||void 0,children:m.jsx(Oo,{children:m.jsx("input",{type:"number",min:"1",step:"1",inputMode:"numeric",value:D,disabled:S,tabIndex:E?void 0:-1,"aria-label":C("creatorSale.capLabel"),onChange:G=>{p(!0),k(G.target.value)}})})})})]})}),m.jsx(zl,{"data-testid":"creator-sale-preview",children:j.sale<j.price?C("creatorSale.preview",{price:j.price,sale:j.sale}):C("creatorSale.previewNoChange",{price:j.price})}),x?m.jsx(Bo,{children:x}):null,m.jsx(Ht,{message:q??V,testId:"creator-sale-error"}),m.jsx(Gl,{"data-testid":"creator-sale-continue",onClick:()=>{p(!0),I.problem?z(Nt(I.problem)):(z(null),o("review"))},disabled:S||B&&!!I.problem,children:C("creatorSale.review")})]})})}const{colors:Ae,radius:La,font:Yt,media:ud}=R,ld=F.div`
|
|
569
|
+
`;function Go(e,t){return Math.max(1,Math.ceil(e*(100-(Number.isFinite(t)?t:0))/100))}const id=[10,20,30,50],Jo=[{key:"24h",hours:24},{key:"48h",hours:48},{key:"72h",hours:72},{key:"7d",hours:168}],kt=3600*1e3;function Bt(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function Xo(e){if(!e)return;const t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function Lt(e){switch(e){case"pct":return C("creatorSale.errorPct");case"duration":return C("creatorSale.errorDuration");case"collections":return C("creatorSale.errorCollections");case"uses":return C("creatorSale.errorUses");default:return C("creatorSale.errorWindow")}}function od(e){return e%24===0&&e>=48?C("creatorSale.days",{count:e/24}):C("creatorSale.hours",{count:e})}function qn({id:e,open:t,chip:n,field:i}){return m.jsxs(Kl,{"data-open":t||void 0,"data-testid":e,children:[m.jsx(Gn,{"data-off":t||void 0,"aria-hidden":t||void 0,"data-testid":`${e}-chip`,children:n}),m.jsx(Gn,{"data-off":!t||void 0,"aria-hidden":!t||void 0,"data-testid":`${e}-field`,children:i})]})}function ad({session:e,collection:t,onCreated:n,onClose:i}){const d=ra(),u=ta(),c=ee.useMemo(()=>[t.contractAddress],[t.contractAddress]),[a,o]=ee.useState("form"),[f,r]=ee.useState(20),[s,l]=ee.useState("15"),[h,w]=ee.useState("72h"),[$,U]=ee.useState(()=>Bt(Date.now()+168*kt)),[O,J]=ee.useState("now"),[K,x]=ee.useState(()=>Bt(Date.now()+24*kt)),[E,P]=ee.useState(!1),[D,k]=ee.useState("50"),[B,p]=ee.useState(!1),[S,Y]=ee.useState(!1),[_,M]=ee.useState(null),[q,z]=ee.useState(null),[L,H]=ee.useState(null),b=bc(e),g=f==="custom"?Number(s):f,I=ee.useMemo(()=>{const G=Date.now(),ie=O==="later"?Xo(K):void 0,ge=Jo.find(ye=>ye.key===h),ae=ge?(ie??G)+ge.hours*kt:Xo($),le=E?Number(D):void 0,me={collections:c,discountPct:g,startsAtMs:ie,endsAtMs:ae??0,uses:le};let fe=null;try{Oa(me,G)}catch(ye){fe=ye instanceof We?ye.problem:"window"}return{...me,problem:fe}},[c,g,h,$,O,K,E,D]),j=ee.useMemo(()=>{const G=t.examplePriceCredits??100;return{price:G,sale:Go(G,g)}},[t,g]),N=ee.useMemo(()=>{const G=t.items.filter(ae=>ae.priceCredits!=null),ie=t.items.filter(ae=>ae.priceCredits==null),ge=G.reduce((ae,le)=>ae+le.remainingSupply,0);return{listed:G,unlisted:ie,supply:ge}},[t]);async function y(){if(p(!0),z(null),I.problem){z(Lt(I.problem));return}Y(!0);try{M(b?C("creatorSale.starting"):C("creatorSale.confirm"));const G=await Tl({signer:e.signer,chainId:Rt.chainId,collections:I.collections,discountPct:I.discountPct,startsAtMs:I.startsAtMs,endsAtMs:I.endsAtMs,uses:I.uses});M(C("creatorSale.finishing"));const ie=await Cl(G,e.identity);M(null),H(ie);const ge=ie.status==="scheduled";qt("Shop Created Sale",{sale_id:ie.id,collections:ie.collections.length,discount_pct:I.discountPct,duration_h:Math.round((I.endsAtMs-(I.startsAtMs??Date.now()))/kt),scheduled:ge,capped:I.uses!==void 0}),Vn.success(ge?C("creatorSale.toastScheduled"):C("creatorSale.toastLive")),n==null||n(ie),d.invalidateQueries({queryKey:["creator-sales"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]}),d.invalidateQueries({queryKey:["overview-listings"]}),d.invalidateQueries({queryKey:["collection-sale-state"]})}catch(G){G instanceof We?z(Lt(G.problem)):(sa(G,{flow:"creator_sale"}),qt("Shop Sale Failed",{error_code:ia(G)}),z(ca(G,C("creatorSale.errorGeneric")))),M(null)}finally{Y(!1)}}function v(){i(),u(`/items/creator/${e.address}`)}if(L){const G=L.status==="scheduled";return m.jsx(jn,{onClick:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-success",onClick:ie=>ie.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":G?C("creatorSale.successScheduledTitle"):C("creatorSale.successTitle"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:G?C("creatorSale.successScheduledTitle"):C("creatorSale.successTitle")}),m.jsx(Bn,{onClick:i,"aria-label":C("creatorSale.done"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsxs(Gl,{children:[m.jsx(Jl,{"aria-hidden":!0,children:m.jsx(Me,{name:"check",className:"ico"})}),m.jsx(Xl,{children:m.jsx("b",{children:C("creatorSale.successBody",{count:L.collections.length,pct:L.discount/1e4})})}),m.jsx(Wl,{children:G?C("creatorSale.successStarts",{date:Mt(L.checks.effective)}):m.jsxs(m.Fragment,{children:[C("creatorSale.successEnds")," ",m.jsx(Jn,{until:L.checks.expiration,testId:"creator-sale-countdown"})]})})]}),m.jsxs(Bo,{children:[m.jsx(Lo,{onClick:i,children:C("creatorSale.done")}),m.jsx(No,{onClick:v,children:C("creatorSale.viewStore")})]})]})})}const A=G=>m.jsx("b",{children:G}),X=I.uses!==void 0?Fn("creatorSale.reviewCap",{b:A,count:I.uses}):Fn("creatorSale.reviewNoCap",{b:A,count:N.supply});if(a==="review")return m.jsx(jn,{onClick:S?void 0:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-review",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":C("creatorSale.reviewTitle"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:C("creatorSale.reviewTitle")}),m.jsx(Bn,{onClick:i,disabled:S,"aria-label":C("creatorSale.cancel"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsxs(Zl,{children:[m.jsxs(Nn,{"data-testid":"creator-sale-review-discount",children:[m.jsx(Mn,{children:C("creatorSale.discount")}),m.jsx(Ql,{"data-heat":jt(g),"data-testid":"creator-sale-review-pct",children:C("creatorSale.offPct",{pct:g})})]}),m.jsxs(Nn,{"data-testid":"creator-sale-review-starts",children:[m.jsx(Mn,{children:C("creatorSale.reviewStarts")}),m.jsx(Mo,{children:I.startsAtMs?Mt(I.startsAtMs):C("creatorSale.reviewStartsNow")}),I.startsAtMs?m.jsx(qo,{until:I.startsAtMs}):null]}),m.jsxs(Nn,{"data-testid":"creator-sale-review-ends",children:[m.jsx(Mn,{children:C("creatorSale.reviewEnds")}),m.jsx(Mo,{children:Mt(I.endsAtMs)}),m.jsx(qo,{until:I.endsAtMs})]})]}),m.jsxs(Ho,{children:[m.jsx(Uo,{children:C("creatorSale.reviewOnSale",{count:N.listed.length})}),m.jsx(Do,{"data-testid":"creator-sale-review-items",children:N.listed.map(G=>m.jsxs(Fo,{"data-testid":"creator-sale-review-item",children:[m.jsx(Vo,{src:G.thumbnail,alt:""}),m.jsx(zo,{"data-testid":"review-name",children:G.name}),m.jsxs(ed,{children:[m.jsxs(td,{"data-testid":"review-was",children:[m.jsx(ps,{size:12}),gs(G.priceCredits)]}),m.jsxs(rd,{"data-heat":jt(g),"data-testid":"review-now",children:[m.jsx(ps,{size:14}),gs(Go(G.priceCredits,g))]})]})]},G.key))})]}),N.unlisted.length>0?m.jsxs(Ho,{children:[m.jsx(Uo,{children:C("creatorSale.reviewUntouched",{count:N.unlisted.length})}),m.jsx(Do,{"data-testid":"creator-sale-review-untouched",children:N.unlisted.map(G=>m.jsxs(Fo,{"data-muted":!0,children:[m.jsx(Vo,{src:G.thumbnail,alt:""}),m.jsx(zo,{children:G.name}),m.jsx(nd,{children:C("creatorSale.reviewNotListed")})]},G.key))})]}):null,m.jsx(sd,{children:X}),_?m.jsx(ko,{children:_}):null,m.jsx(Ht,{message:q,testId:"creator-sale-error"}),m.jsxs(Bo,{children:[m.jsx(Lo,{onClick:()=>{z(null),M(null),o("form")},disabled:S,"data-testid":"creator-sale-back",children:C("creatorSale.back")}),m.jsx(No,{"data-testid":"creator-sale-submit",onClick:()=>void y(),disabled:S,children:S?_:O==="later"?C("creatorSale.submitScheduled"):C("creatorSale.submit")})]})]})});const V=B&&I.problem?Lt(I.problem):null,W=f==="custom",oe=h==="custom",ne=O==="later";return m.jsx(jn,{onClick:S?void 0:i,role:"presentation",children:m.jsxs(Pn,{"data-testid":"creator-sale-modal",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":C("creatorSale.title"),children:[m.jsxs(On,{children:[m.jsx(kn,{children:C("creatorSale.title")}),m.jsx(Bn,{onClick:i,disabled:S,"aria-label":C("creatorSale.cancel"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsx(Bl,{children:C("creatorSale.subtitle")}),m.jsxs(St,{children:[m.jsx(Ot,{children:C("creatorSale.collection")}),m.jsx(Ll,{"data-testid":"creator-sale-collections",children:m.jsxs(Nl,{"data-selected":!0,"data-readonly":!0,children:[m.jsx(Ml,{children:m.jsx(na,{contractAddress:t.contractAddress})}),m.jsxs(ql,{children:[m.jsx(Hl,{children:t.name}),m.jsx(Ul,{children:C("creatorSale.collectionListed",{count:t.listedCount})})]})]})})]}),m.jsxs(St,{children:[m.jsx(Ot,{children:C("creatorSale.discount")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.discount"),"data-testid":"creator-sale-discounts",children:[id.map(G=>m.jsx(at,{type:"button","data-heat":jt(G),"data-selected":f===G||void 0,"aria-pressed":f===G,disabled:S,onClick:()=>{p(!0),r(G)},children:C("creatorSale.offPct",{pct:G})},G)),m.jsx(qn,{id:"creator-sale-custom-pct",open:W,chip:m.jsx(at,{type:"button",tabIndex:W?-1:void 0,disabled:S,onClick:()=>{p(!0),r("custom")},children:C("creatorSale.customPct")}),field:m.jsxs(Po,{"data-heat":jt(g),"aria-invalid":B&&I.problem==="pct"?!0:void 0,children:[m.jsx("input",{type:"number",min:Aa,max:Ta,step:"1",inputMode:"numeric",value:s,disabled:S,tabIndex:W?void 0:-1,"aria-label":C("creatorSale.pctLabel"),onChange:G=>{p(!0),l(G.target.value)}}),m.jsx("span",{"aria-hidden":!0,children:"%"})]})})]})]}),m.jsxs(St,{children:[m.jsx(Ot,{children:C("creatorSale.duration")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.duration"),"data-testid":"creator-sale-durations",children:[Jo.map(G=>m.jsx(at,{type:"button","data-selected":h===G.key||void 0,"aria-pressed":h===G.key,disabled:S,onClick:()=>{p(!0),w(G.key)},children:od(G.hours)},G.key)),m.jsx(qn,{id:"creator-sale-custom-end",open:oe,chip:m.jsx(at,{type:"button",tabIndex:oe?-1:void 0,disabled:S,onClick:()=>{p(!0),w("custom")},children:C("creatorSale.customEnd")}),field:m.jsx(Oo,{type:"datetime-local",value:$,min:Bt(Date.now()),disabled:S,tabIndex:oe?void 0:-1,"aria-label":C("creatorSale.endLabel"),onChange:G=>{p(!0),U(G.target.value)}})})]})]}),m.jsxs(St,{children:[m.jsx(Ot,{children:C("creatorSale.start")}),m.jsxs(Ln,{role:"group","aria-label":C("creatorSale.start"),children:[m.jsx(at,{type:"button","data-selected":O==="now"||void 0,"aria-pressed":O==="now",disabled:S,onClick:()=>J("now"),children:C("creatorSale.startNow")}),m.jsx(qn,{id:"creator-sale-custom-start",open:ne,chip:m.jsx(at,{type:"button",tabIndex:ne?-1:void 0,disabled:S,onClick:()=>J("later"),children:C("creatorSale.startLater")}),field:m.jsx(Oo,{type:"datetime-local",value:K,min:Bt(Date.now()),disabled:S,tabIndex:ne?void 0:-1,"aria-label":C("creatorSale.startLabel"),onChange:G=>{p(!0),x(G.target.value)}})})]})]}),m.jsx(St,{children:m.jsxs(Dl,{children:[m.jsxs(Fl,{children:[m.jsx("input",{type:"checkbox",checked:E,disabled:S,"data-testid":"creator-sale-cap-toggle",onChange:G=>P(G.target.checked)}),m.jsx("span",{children:C("creatorSale.cap")})]}),m.jsx(Yl,{"data-open":E||void 0,"data-testid":"creator-sale-cap",children:m.jsx(Gn,{"data-off":!E||void 0,"aria-hidden":!E||void 0,children:m.jsx(Po,{children:m.jsx("input",{type:"number",min:"1",step:"1",inputMode:"numeric",value:D,disabled:S,tabIndex:E?void 0:-1,"aria-label":C("creatorSale.capLabel"),onChange:G=>{p(!0),k(G.target.value)}})})})})]})}),m.jsx(Vl,{"data-testid":"creator-sale-preview",children:j.sale<j.price?C("creatorSale.preview",{price:j.price,sale:j.sale}):C("creatorSale.previewNoChange",{price:j.price})}),_?m.jsx(ko,{children:_}):null,m.jsx(Ht,{message:q??V,testId:"creator-sale-error"}),m.jsx(zl,{"data-testid":"creator-sale-continue",onClick:()=>{p(!0),I.problem?z(Lt(I.problem)):(z(null),o("review"))},disabled:S||B&&!!I.problem,children:C("creatorSale.review")})]})})}const{colors:Ae,radius:Ba,font:Yt,media:cd}=R,ud=F.div`
|
|
570
570
|
display: flex;
|
|
571
571
|
flex-direction: column;
|
|
572
572
|
gap: 8px;
|
|
573
|
-
`,
|
|
573
|
+
`,ld=F.div`
|
|
574
574
|
display: grid;
|
|
575
575
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
576
576
|
align-items: center;
|
|
577
577
|
gap: 12px;
|
|
578
578
|
padding: 12px 14px;
|
|
579
579
|
border: 1px solid ${Ae.line};
|
|
580
|
-
border-radius: ${
|
|
580
|
+
border-radius: ${Ba.card};
|
|
581
581
|
background: ${Ae.white};
|
|
582
582
|
|
|
583
583
|
&[data-status='ended'],
|
|
@@ -587,14 +587,14 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
587
587
|
opacity: 0.7;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
${
|
|
590
|
+
${cd.maxWidth("mobile")} {
|
|
591
591
|
grid-template-columns: auto minmax(0, 1fr);
|
|
592
592
|
|
|
593
593
|
> :last-child {
|
|
594
594
|
grid-column: 1 / -1;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
`,
|
|
597
|
+
`,dd=F.span`
|
|
598
598
|
display: inline-flex;
|
|
599
599
|
align-items: center;
|
|
600
600
|
height: 26px;
|
|
@@ -606,26 +606,26 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
606
606
|
font-weight: 800;
|
|
607
607
|
font-size: 13px;
|
|
608
608
|
letter-spacing: 0.03em;
|
|
609
|
-
`,
|
|
609
|
+
`,fd=F.div`
|
|
610
610
|
display: flex;
|
|
611
611
|
flex-direction: column;
|
|
612
612
|
gap: 4px;
|
|
613
613
|
min-width: 0;
|
|
614
|
-
`,
|
|
614
|
+
`,hd=F.div`
|
|
615
615
|
display: flex;
|
|
616
616
|
flex-wrap: wrap;
|
|
617
617
|
align-items: center;
|
|
618
618
|
gap: 8px;
|
|
619
|
-
`,
|
|
619
|
+
`,pd=F.span`
|
|
620
620
|
font-family: ${Yt.sans};
|
|
621
621
|
font-weight: 600;
|
|
622
622
|
font-size: 14px;
|
|
623
623
|
color: ${Ae.text};
|
|
624
|
-
`,
|
|
624
|
+
`,gd=F.span`
|
|
625
625
|
display: inline-flex;
|
|
626
626
|
align-items: center;
|
|
627
627
|
padding: 2px 8px;
|
|
628
|
-
border-radius: ${
|
|
628
|
+
border-radius: ${Ba.pill};
|
|
629
629
|
font-family: ${Yt.sans};
|
|
630
630
|
font-weight: 700;
|
|
631
631
|
font-size: 11px;
|
|
@@ -641,7 +641,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
641
641
|
background: ${Ae.promptLilac};
|
|
642
642
|
color: ${Ae.accent};
|
|
643
643
|
}
|
|
644
|
-
`,
|
|
644
|
+
`,md=F.div`
|
|
645
645
|
display: flex;
|
|
646
646
|
flex-wrap: wrap;
|
|
647
647
|
align-items: center;
|
|
@@ -649,21 +649,21 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
649
649
|
font-family: ${Yt.sans};
|
|
650
650
|
font-size: 12px;
|
|
651
651
|
color: ${Ae.muted};
|
|
652
|
-
`,
|
|
652
|
+
`,yd=F.div`
|
|
653
653
|
display: flex;
|
|
654
654
|
align-items: center;
|
|
655
655
|
gap: 8px;
|
|
656
|
-
`;function
|
|
656
|
+
`;function bd(e){switch(e){case"active":return C("creatorSale.statusActive");case"scheduled":return C("creatorSale.statusScheduled");case"cancelled":return C("creatorSale.statusCancelled");case"exhausted":return C("creatorSale.statusExhausted");case"revoked":return C("creatorSale.statusRevoked");default:return C("creatorSale.statusEnded")}}function wd({sales:e,session:t}){const n=ra(),[i,d]=ee.useState(null),[u,c]=ee.useState(null),[a,o]=ee.useState([]);async function f(r){c(r.id);try{await kl({sale:r,signer:t.signer}),o(s=>[...s,r.id]),d(null),qt("Shop Ended Sale",{sale_id:r.id,discount_pct:r.discount/1e4}),Vn.success(C("creatorSale.endedToast")),n.invalidateQueries({queryKey:["creator-sales"]}),n.invalidateQueries({queryKey:["shop-items"]}),n.invalidateQueries({queryKey:["catalog-items"]})}catch(s){sa(s,{flow:"creator_sale_end"}),qt("Shop Sale Failed",{error_code:ia(s),step:"end"}),Vn.error(ca(s,C("creatorSale.endError")))}finally{c(null)}}return m.jsx(ud,{"data-testid":"creator-sales",children:e.map(r=>{var w;const s=a.includes(r.id)?"cancelled":Ol(r),l=s==="active"||s==="scheduled",h=r.discount/1e4;return m.jsxs(ld,{"data-status":s,"data-testid":"creator-sale",children:[m.jsxs(dd,{"aria-label":C("creatorSale.offPct",{pct:h}),children:["-",h,"%"]}),m.jsxs(fd,{children:[m.jsxs(hd,{children:[m.jsx(pd,{children:C("creatorSale.successBody",{count:r.collections.length,pct:h})}),m.jsx(gd,{"data-status":s,children:bd(s)})]}),m.jsxs(md,{children:[s==="active"?m.jsxs(m.Fragment,{children:[C("creatorSale.endsIn")," ",m.jsx(Jn,{until:r.checks.expiration})]}):s==="scheduled"?C("creatorSale.startsOn",{date:Mt(r.checks.effective)}):null,Pl(r)?m.jsx("span",{children:C("creatorSale.used",{used:((w=r.state)==null?void 0:w.uses)??0,total:r.checks.uses})}):null]})]}),l?i===r.id?m.jsxs(yd,{children:[m.jsx(vt,{variant:"red",size:"sm",disabled:u===r.id,onClick:()=>void f(r),"data-testid":"creator-sale-end-confirm",children:u===r.id?C("creatorSale.ending"):C("creatorSale.confirmEnd")}),m.jsx(vt,{variant:"ghost",size:"sm",disabled:u===r.id,onClick:()=>d(null),children:C("creatorSale.keepSale")})]}):m.jsx(vt,{variant:"outline",size:"sm",onClick:()=>d(r.id),"data-testid":"creator-sale-end",children:C("creatorSale.endSale")}):null]},r.id)})})}function Ed(e,t=!0){return Nt({queryKey:["creator-sales",e==null?void 0:e.toLowerCase()],queryFn:()=>jl(e),enabled:!!e&&t,staleTime:3e4,refetchInterval:6e4})}const{colors:pe,font:La,radius:cs,z:Sd}=R,vd=F.div`
|
|
657
657
|
position: fixed;
|
|
658
658
|
inset: 0;
|
|
659
|
-
z-index: ${
|
|
659
|
+
z-index: ${Sd.overlay};
|
|
660
660
|
display: flex;
|
|
661
661
|
align-items: center;
|
|
662
662
|
justify-content: center;
|
|
663
663
|
overflow-y: auto;
|
|
664
664
|
padding: 16px;
|
|
665
665
|
background: rgba(22, 21, 24, 0.55);
|
|
666
|
-
|
|
666
|
+
`,$d=F.div`
|
|
667
667
|
width: 560px;
|
|
668
668
|
max-width: 100%;
|
|
669
669
|
max-height: 100%;
|
|
@@ -675,26 +675,26 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
675
675
|
display: flex;
|
|
676
676
|
flex-direction: column;
|
|
677
677
|
gap: 24px;
|
|
678
|
-
font-family: ${
|
|
678
|
+
font-family: ${La.sans};
|
|
679
679
|
|
|
680
680
|
/* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
|
|
681
681
|
&:focus {
|
|
682
682
|
outline: none;
|
|
683
683
|
}
|
|
684
|
-
`,
|
|
684
|
+
`,Rd=F.div`
|
|
685
685
|
display: flex;
|
|
686
686
|
align-items: center;
|
|
687
687
|
justify-content: space-between;
|
|
688
688
|
gap: 8px;
|
|
689
689
|
padding-bottom: 16px;
|
|
690
690
|
border-bottom: 1px solid ${pe.gray4};
|
|
691
|
-
`,
|
|
691
|
+
`,Id=F.h2`
|
|
692
692
|
margin: 0;
|
|
693
693
|
font-weight: 600;
|
|
694
694
|
font-size: 20px;
|
|
695
695
|
line-height: 1.6;
|
|
696
696
|
color: ${pe.text};
|
|
697
|
-
`,
|
|
697
|
+
`,xd=F.button`
|
|
698
698
|
position: relative;
|
|
699
699
|
flex: none;
|
|
700
700
|
display: grid;
|
|
@@ -721,34 +721,34 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
721
721
|
outline: 2px solid ${pe.accent};
|
|
722
722
|
outline-offset: 2px;
|
|
723
723
|
}
|
|
724
|
-
`,
|
|
724
|
+
`,_d=F.div`
|
|
725
725
|
padding: 16px;
|
|
726
726
|
border-radius: ${cs.modal};
|
|
727
727
|
background: ${pe.infoGreen};
|
|
728
728
|
display: flex;
|
|
729
729
|
flex-direction: column;
|
|
730
730
|
gap: 12px;
|
|
731
|
-
`,
|
|
731
|
+
`,Ad=F.h3`
|
|
732
732
|
margin: 0;
|
|
733
733
|
font-weight: 600;
|
|
734
734
|
font-size: 20px;
|
|
735
735
|
line-height: 1.57;
|
|
736
736
|
color: ${pe.text};
|
|
737
|
-
`,
|
|
737
|
+
`,Td=F.p`
|
|
738
738
|
margin: 0;
|
|
739
739
|
font-weight: 500;
|
|
740
740
|
font-size: 14px;
|
|
741
741
|
line-height: 1.334;
|
|
742
742
|
color: ${pe.text2};
|
|
743
|
-
`,
|
|
743
|
+
`,Cd=F.div`
|
|
744
744
|
display: flex;
|
|
745
745
|
flex-direction: column;
|
|
746
746
|
gap: 8px;
|
|
747
|
-
`,
|
|
747
|
+
`,jd=F.div`
|
|
748
748
|
display: flex;
|
|
749
749
|
align-items: center;
|
|
750
750
|
gap: 12px;
|
|
751
|
-
`,
|
|
751
|
+
`,Na=`
|
|
752
752
|
flex: 1 1 0;
|
|
753
753
|
min-width: 0;
|
|
754
754
|
display: inline-flex;
|
|
@@ -758,7 +758,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
758
758
|
height: 46px;
|
|
759
759
|
padding: 0 12px;
|
|
760
760
|
border-radius: ${cs.card};
|
|
761
|
-
font-family: ${
|
|
761
|
+
font-family: ${La.sans};
|
|
762
762
|
font-weight: 600;
|
|
763
763
|
font-size: 13px;
|
|
764
764
|
line-height: 24px;
|
|
@@ -773,8 +773,8 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
773
773
|
outline: 2px solid ${pe.accent};
|
|
774
774
|
outline-offset: 2px;
|
|
775
775
|
}
|
|
776
|
-
`,
|
|
777
|
-
${
|
|
776
|
+
`,Pd=F.button`
|
|
777
|
+
${Na};
|
|
778
778
|
border: 0.5px solid ${pe.text};
|
|
779
779
|
background: ${pe.white};
|
|
780
780
|
color: ${pe.text2};
|
|
@@ -782,8 +782,8 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
782
782
|
&:hover {
|
|
783
783
|
background: ${pe.panel};
|
|
784
784
|
}
|
|
785
|
-
`,
|
|
786
|
-
${
|
|
785
|
+
`,Od=F.button`
|
|
786
|
+
${Na};
|
|
787
787
|
border: 0;
|
|
788
788
|
background: ${pe.accent};
|
|
789
789
|
color: ${pe.softWhite};
|
|
@@ -794,7 +794,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
794
794
|
&:active {
|
|
795
795
|
background: ${pe.accentActive};
|
|
796
796
|
}
|
|
797
|
-
`,
|
|
797
|
+
`,kd=F.label`
|
|
798
798
|
display: flex;
|
|
799
799
|
align-items: center;
|
|
800
800
|
justify-content: center;
|
|
@@ -802,7 +802,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
802
802
|
line-height: normal;
|
|
803
803
|
color: ${pe.text};
|
|
804
804
|
cursor: pointer;
|
|
805
|
-
`,
|
|
805
|
+
`,Bd=F.span`
|
|
806
806
|
flex: none;
|
|
807
807
|
display: grid;
|
|
808
808
|
place-items: center;
|
|
@@ -812,7 +812,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
812
812
|
& input {
|
|
813
813
|
--box: 13.714px;
|
|
814
814
|
}
|
|
815
|
-
`;function
|
|
815
|
+
`;function Ld({onClose:e,onConfirm:t}){const[n,i]=ee.useState(!1),d=ee.useRef(null),u=ee.useRef(n);return u.current=n,ee.useEffect(()=>{var a;(a=d.current)==null||a.focus();function c(o){o.key==="Escape"&&e(u.current)}return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e]),m.jsx(vd,{role:"presentation",onClick:()=>e(n),children:m.jsxs($d,{ref:d,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":C("newPricing.title"),"data-testid":"new-pricing-modal",onClick:c=>c.stopPropagation(),children:[m.jsxs(Rd,{children:[m.jsx(Id,{children:C("newPricing.title")}),m.jsx(xd,{onClick:()=>e(n),"aria-label":C("newPricing.close"),children:m.jsx(Me,{name:"close",className:"ico"})})]}),m.jsxs(_d,{children:[m.jsx(Ad,{children:C("newPricing.infoTitle")}),m.jsx(Td,{children:C("newPricing.infoBody")})]}),m.jsx(Fc,{align:"center"}),m.jsxs(Cd,{children:[m.jsxs(jd,{children:[m.jsx(Pd,{onClick:()=>e(n),"data-testid":"new-pricing-later",children:C("newPricing.later")}),m.jsx(Od,{onClick:()=>t(n),"data-testid":"new-pricing-confirm",children:C("newPricing.confirm")})]}),m.jsxs(kd,{children:[m.jsx(Bd,{children:m.jsx(Zc,{type:"checkbox",checked:n,onChange:c=>i(c.target.checked),"data-testid":"new-pricing-opt-out"})}),C("newPricing.optOut")]})]})]})})}const Ma="shop:dismissed-prompts",Wo="mana-pricing";function qa(){try{const e=localStorage.getItem(Ma);if(!e)return{};const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function Nd(e){try{localStorage.setItem(Ma,JSON.stringify(e))}catch{}}function Ha(e){return e?e.toLowerCase():null}function Md(e,t){const n=Ha(t);if(!n)return!1;const i=qa()[n];return Array.isArray(i)&&i.includes(e)}function qd(e,t){const n=Ha(t);if(!n)return;const i=qa(),d=Array.isArray(i[n])?i[n]:[];d.includes(e)||Nd({...i,[n]:[...d,e]})}function Hd({count:e,to:t="/import",onDismiss:n,className:i}){return m.jsxs(Vc,{className:i,"data-testid":"mana-pricing-banner",children:[m.jsxs(zc,{children:[m.jsx(Me,{name:"refresh",size:24}),m.jsxs(Gc,{children:[Fn("manaPricingBanner.lead",{count:e,mana:d=>m.jsxs(m.Fragment,{children:[m.jsx(Yc,{src:tu,alt:"","aria-hidden":!0})," ",d]})})," ",m.jsx(Jc,{children:C("manaPricingBanner.accent")})," ",C("manaPricingBanner.trail")]})]}),m.jsxs(Xc,{children:[m.jsx(Wc,{to:t,"data-testid":"mana-pricing-banner-cta",children:C("manaPricingBanner.cta")}),n?m.jsx(Kc,{type:"button",onClick:n,"aria-label":C("manaPricingBanner.dismiss"),"data-testid":"mana-pricing-banner-dismiss",children:m.jsx(Me,{name:"close",size:16})}):null]})]})}F.div`
|
|
816
816
|
display: flex;
|
|
817
817
|
flex-direction: column;
|
|
818
818
|
gap: 4px;
|
|
@@ -826,7 +826,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
826
826
|
letter-spacing: 0.46px;
|
|
827
827
|
text-transform: uppercase;
|
|
828
828
|
color: ${R.colors.muted};
|
|
829
|
-
`;F("button",
|
|
829
|
+
`;F("button",ua("selected"))`
|
|
830
830
|
display: flex;
|
|
831
831
|
align-items: center;
|
|
832
832
|
gap: 10px;
|
|
@@ -874,7 +874,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
874
874
|
flex-wrap: wrap;
|
|
875
875
|
gap: 8px;
|
|
876
876
|
padding: 4px;
|
|
877
|
-
`;F("button",
|
|
877
|
+
`;F("button",ua("selected"))`
|
|
878
878
|
display: inline-flex;
|
|
879
879
|
align-items: center;
|
|
880
880
|
gap: 4px;
|
|
@@ -895,7 +895,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
895
895
|
outline: 2px solid ${R.colors.accent};
|
|
896
896
|
outline-offset: 2px;
|
|
897
897
|
}
|
|
898
|
-
`;const
|
|
898
|
+
`;const Ud=F.div`
|
|
899
899
|
display: flex;
|
|
900
900
|
align-items: center;
|
|
901
901
|
gap: 8px;
|
|
@@ -909,12 +909,12 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
909
909
|
&:focus-within {
|
|
910
910
|
border-color: ${R.colors.softWhite};
|
|
911
911
|
}
|
|
912
|
-
`,
|
|
912
|
+
`,Dd=F(Me)`
|
|
913
913
|
width: 18px;
|
|
914
914
|
height: 18px;
|
|
915
915
|
flex: none;
|
|
916
916
|
color: ${R.colors.softWhite};
|
|
917
|
-
`,
|
|
917
|
+
`,Fd=F.input`
|
|
918
918
|
flex: 1;
|
|
919
919
|
min-width: 0;
|
|
920
920
|
border: 0;
|
|
@@ -930,7 +930,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
930
930
|
&:focus {
|
|
931
931
|
outline: 0;
|
|
932
932
|
}
|
|
933
|
-
`,
|
|
933
|
+
`,Vd=F.button`
|
|
934
934
|
display: grid;
|
|
935
935
|
place-items: center;
|
|
936
936
|
width: 24px;
|
|
@@ -949,7 +949,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
949
949
|
outline: 2px solid ${R.colors.softWhite};
|
|
950
950
|
outline-offset: 2px;
|
|
951
951
|
}
|
|
952
|
-
`,
|
|
952
|
+
`,zd=F(Me)`
|
|
953
953
|
width: 12px;
|
|
954
954
|
height: 12px;
|
|
955
955
|
`,Hn=F.div`
|
|
@@ -961,7 +961,7 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
961
961
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
962
962
|
gap: 12px;
|
|
963
963
|
}
|
|
964
|
-
`,
|
|
964
|
+
`,Gd=F.section`
|
|
965
965
|
max-width: 520px;
|
|
966
966
|
margin: 48px auto;
|
|
967
967
|
text-align: center;
|
|
@@ -969,31 +969,31 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
969
969
|
flex-direction: column;
|
|
970
970
|
gap: 16px;
|
|
971
971
|
align-items: center;
|
|
972
|
-
`,
|
|
972
|
+
`,Jd=F.h1`
|
|
973
973
|
margin: 0;
|
|
974
974
|
font-family: ${R.font.sans};
|
|
975
975
|
font-weight: 700;
|
|
976
976
|
font-size: 24px;
|
|
977
977
|
color: ${R.colors.softWhite};
|
|
978
|
-
`,
|
|
978
|
+
`,Xd=F.p`
|
|
979
979
|
margin: 0;
|
|
980
980
|
font-family: ${R.font.sans};
|
|
981
981
|
font-size: 15px;
|
|
982
982
|
color: ${R.colors.gray4};
|
|
983
|
-
`,
|
|
983
|
+
`,Wd=F(Hd)`
|
|
984
984
|
margin-bottom: 16px;
|
|
985
|
-
`,
|
|
985
|
+
`,Kd=F.section`
|
|
986
986
|
& + & {
|
|
987
987
|
margin-top: 24px;
|
|
988
988
|
padding-top: 24px;
|
|
989
989
|
border-top: 1px solid rgba(255, 255, 255, 0.25);
|
|
990
990
|
}
|
|
991
|
-
`,
|
|
991
|
+
`,Yd=F.div`
|
|
992
992
|
display: flex;
|
|
993
993
|
align-items: center;
|
|
994
994
|
gap: 12px;
|
|
995
995
|
margin-bottom: 16px;
|
|
996
|
-
`,
|
|
996
|
+
`,Zd=F(vt)`
|
|
997
997
|
&& {
|
|
998
998
|
background: ${R.gradients.buyBtn};
|
|
999
999
|
color: ${R.colors.white};
|
|
@@ -1013,21 +1013,21 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
1013
1013
|
background: ${R.gradients.buyBtn};
|
|
1014
1014
|
opacity: 0.55;
|
|
1015
1015
|
}
|
|
1016
|
-
`,
|
|
1016
|
+
`,Qd=F.span`
|
|
1017
1017
|
flex: none;
|
|
1018
1018
|
width: 40px;
|
|
1019
1019
|
height: 40px;
|
|
1020
1020
|
border-radius: ${R.radius.btn};
|
|
1021
1021
|
overflow: hidden;
|
|
1022
1022
|
background: ${R.colors.media};
|
|
1023
|
-
`,
|
|
1023
|
+
`,ef=F.div`
|
|
1024
1024
|
display: flex;
|
|
1025
1025
|
flex-direction: column;
|
|
1026
1026
|
gap: 2px;
|
|
1027
1027
|
/* Takes the slack so the CTA sits at the far edge, and lets a long name ellipse instead of pushing it. */
|
|
1028
1028
|
flex: 1;
|
|
1029
1029
|
min-width: 0;
|
|
1030
|
-
`,
|
|
1030
|
+
`,tf=F.h3`
|
|
1031
1031
|
margin: 0;
|
|
1032
1032
|
font-family: ${R.font.sans};
|
|
1033
1033
|
font-weight: 600;
|
|
@@ -1036,13 +1036,13 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
1036
1036
|
overflow: hidden;
|
|
1037
1037
|
text-overflow: ellipsis;
|
|
1038
1038
|
white-space: nowrap;
|
|
1039
|
-
`,
|
|
1039
|
+
`,rf=F.span`
|
|
1040
1040
|
font-family: ${R.font.sans};
|
|
1041
1041
|
font-size: 13px;
|
|
1042
1042
|
/* Gray 5 — what the toolbar's own item count uses on this field. Gray 3 sat at 2.2:1 against the
|
|
1043
1043
|
page gradient and Gray 4 only reaches 3.8:1; both belong on the darker card fill, not out here. */
|
|
1044
1044
|
color: ${R.colors.gray5};
|
|
1045
|
-
`,
|
|
1045
|
+
`,nf=F.section`
|
|
1046
1046
|
display: flex;
|
|
1047
1047
|
flex-direction: column;
|
|
1048
1048
|
gap: 8px;
|
|
@@ -1051,11 +1051,11 @@ caused by: `+ha(i,t)):n},cu=e=>ha(e,new Set),pa=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
1051
1051
|
padding: 12px 16px;
|
|
1052
1052
|
border-radius: ${R.radius.btn};
|
|
1053
1053
|
background: ${R.colors.promptLilac};
|
|
1054
|
-
`,
|
|
1054
|
+
`,sf=F.h2`
|
|
1055
1055
|
margin: 0;
|
|
1056
1056
|
font-family: ${R.font.sans};
|
|
1057
1057
|
font-weight: 600;
|
|
1058
1058
|
font-size: 16px;
|
|
1059
1059
|
color: ${R.colors.text};
|
|
1060
|
-
`,cf=48,Yo=[{key:"wearables",labelKey:"myAssets.sectionWearables",category:"wearable"},{key:"emotes",labelKey:"myAssets.sectionEmotes",category:"emote"},{key:"names",labelKey:"myAssets.sectionNames",category:"ens"},{key:"creations",labelKey:"myAssets.sectionCreations"}],uf=["all","credits","mana"],Un={all:"filter.priceAll",credits:"filter.priceCredits",mana:"filter.priceMana"},Dn=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"name",label:"filterBar.sortName",server:"name"},{key:"cheapest",label:"filterBar.sortCheapest",server:"cheapest"}];function Zo(e){return e==="wearables"||e==="emotes"}const Qo={wearables:"wearable",emotes:"emote",names:"names",creations:""},lf={wearable:"wearables",emote:"emotes",names:"names"};function df(e){return`${It.builderUrl}/names/${encodeURIComponent(e)}`}function ea(e,t){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:(t==null?void 0:t.priceCredits)??e.listingPrice??0,gender:null,isSmart:!1,tokenId:e.tokenId,issuedId:e.issuedId,tradeId:(t==null?void 0:t.tradeId)??e.tradeId}}function ff(e,t,n){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:n,contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:It.chainId,thumbnail:e.thumbnail,priceCredits:t,gender:null,isSmart:!1}}function Mf(){var fs,hs;sc({title:C("nav.myAssets"),noindex:!0});const{session:e,error:t,signIn:n,restore:i}=ic(),d=ra(),[u,c]=ec(),a=u.get("section"),o=Yo.some(T=>T.key===a)?a:"wearables",[f,r]=ee.useState("all"),[s,l]=ee.useState("all"),[h,w]=ee.useState([]),[$,U]=ee.useState(null);Sc(`${o}:${$??""}`);const[O,J]=ee.useState("newest"),[K,_]=ee.useState(""),[E,P]=ee.useState(""),[D,k]=ee.useState(!1),[B,p]=ee.useState(!0),[S,Y]=ee.useState(!0),[x,M]=ee.useState(!1),[q,z]=ee.useState(!1),[L,H]=ee.useState("idle");ee.useEffect(()=>{i()},[i]),ee.useEffect(()=>{const T=setTimeout(()=>P(K.trim()),300);return()=>clearTimeout(T)},[K]),ee.useEffect(()=>{if(!D)return;const T=te=>{te.key==="Escape"&&k(!1)};document.addEventListener("keydown",T);const Q=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",T),document.body.style.overflow=Q}},[D]);const b=e==null?void 0:e.address,g=Yo.find(T=>T.key===o),I=Zo(o),j=(Dn.find(T=>T.key===O)??Dn[0]).server,N=f==="on_sale"?C("filter.onSale"):f==="not_for_sale"?C("filter.notForSale"):"",y=s==="all"?"":C(Un[s]),v=ur.filter(T=>h.includes(T)).map(ys).join(", ");function A(T){c(Q=>{const te=new URLSearchParams(Q);return te.set("section",T),te},{replace:!0}),U(null),Zo(T)||w([]),T!=="creations"&&l("all"),k(!1)}function X(T){w(Q=>Q.includes(T)?Q.filter(te=>te!==T):[...Q,T])}function V(T){const Q=lf[T];Q&&A(Q)}const{items:W,total:oe,isLoading:ne,isPlaceholderData:G,error:ie,hasNextPage:ge,isFetchingNextPage:ae,isFetchNextPageError:le,fetchNextPage:me}=Uc(["my-assets",b,o,f,h,$,E,j],T=>ac(b,{category:g.category,first:cf,skip:T,search:E||void 0,rarities:I&&h.length?h:void 0,wearableCategories:o==="wearables"&&$?Rs[$]:void 0,emoteCategories:o==="emotes"&&$?Rs[$]:void 0,onlyOnSale:f==="on_sale"||void 0,sortBy:j}).then(Q=>({items:Q.assets,total:Q.total})),{enabled:!!b&&o!=="creations"}),fe=ee.useMemo(()=>o==="wearables"||o==="emotes"?[...new Set(W.map(T=>T.contractAddress))]:[],[W,o]),{data:ye}=$t({queryKey:["secondary-sale-state",fe],enabled:fe.length>0,queryFn:async()=>{const T=await Promise.all(fe.map(async te=>[te,await uc(te)])),Q={};for(const[te,ue]of T)for(const[$e,De]of Object.entries(ue))Q[`${te}-${$e}`]=De;return Q}}),Je=T=>ye==null?void 0:ye[`${T.contractAddress}-${T.tokenId}`],Ye=T=>!!Je(T)||T.isOnSale,ot=ee.useMemo(()=>f==="not_for_sale"?W.filter(T=>!Ye(T)):W,[W,f,ye]),{data:Ue,isLoading:Zt,isError:Da}=$t({queryKey:["publishable-items",b],queryFn:()=>dc(b,e.identity),enabled:!!e&&o==="creations",retry:!1}),Qt=ee.useMemo(()=>[...new Set((Ue??[]).map(T=>T.contractAddress))],[Ue]),{data:Re}=$t({queryKey:["collection-sale-state",b,Qt],enabled:Qt.length>0,queryFn:async()=>{const T=await Promise.all(Qt.map(async te=>[te,await lc(te)])),Q={};for(const[te,ue]of T)for(const[$e,De]of Object.entries(ue))Q[`${te}-${$e}`]=De;return Q}}),Xe=T=>Re==null?void 0:Re[`${T.contractAddress}-${T.blockchainItemId}`],Fa=ee.useMemo(()=>Object.values(Re??{}).some(T=>!!T.manaWei),[Re]),{data:er}=oc(Fa),tr=T=>T?!T.manaWei||!er?T.priceCredits:cc({manaWei:T.manaWei,priceCredits:T.priceCredits},er):0,rr=vd(),{data:nr}=Sd(b,rr&&o==="creations"),[Va,us]=ee.useState(!1),[za,Ga]=ee.useState(void 0),sr=ee.useMemo(()=>{const T=new Map;for(const Q of Ue??[]){const te=Re==null?void 0:Re[`${Q.contractAddress}-${Q.blockchainItemId}`],ue=!!(te!=null&&te.isOnSale)&&!te.manaWei,$e=Q.contractAddress.toLowerCase(),De=T.get($e)??{contractAddress:$e,name:Q.collectionName,listedCount:0,examplePriceCredits:null,items:[]};De.items.push({key:`${$e}-${Q.blockchainItemId}`,name:Q.name,thumbnail:Q.thumbnail,priceCredits:ue?te.priceCredits:null,remainingSupply:Q.remainingSupply}),ue&&(De.listedCount+=1,De.examplePriceCredits=Math.max(De.examplePriceCredits??0,te.priceCredits)),T.set($e,De)}return[...T.values()].filter(Q=>Q.listedCount>0)},[Ue,Re]),{count:Ja}=Dc(),Ct=Ja??0,jt=ee.useMemo(()=>{let T=Ue??[];if(f==="on_sale"?T=T.filter(te=>{var ue;return(ue=Xe(te))==null?void 0:ue.isOnSale}):f==="not_for_sale"&&(T=T.filter(te=>{var ue;return!((ue=Xe(te))!=null&&ue.isOnSale)})),s==="credits"?T=T.filter(te=>{var ue,$e;return!!((ue=Xe(te))!=null&&ue.isOnSale)&&!(($e=Xe(te))!=null&&$e.manaWei)}):s==="mana"&&(T=T.filter(te=>{var ue;return!!((ue=Xe(te))!=null&&ue.manaWei)})),E){const te=E.toLowerCase();T=T.filter(ue=>ue.name.toLowerCase().includes(te))}const Q=[...T];return O==="name"?Q.sort((te,ue)=>te.name.localeCompare(ue.name)):O==="cheapest"&&Q.sort((te,ue)=>tr(Xe(te))-tr(Xe(ue))),Q},[Ue,Re,f,s,E,O,er]),Xa=ee.useMemo(()=>{var Q;const T=new Map;for(const te of jt){const ue=te.contractAddress.toLowerCase(),$e=T.get(ue)??{contractAddress:ue,name:te.collectionName,listed:0,items:[]};$e.items.push(te),(Q=Re==null?void 0:Re[`${te.contractAddress}-${te.blockchainItemId}`])!=null&&Q.isOnSale&&($e.listed+=1),T.set(ue,$e)}return[...T.values()]},[jt,Re]),Wa=ee.useMemo(()=>new Set(sr.map(T=>T.contractAddress.toLowerCase())),[sr]),ls=sr.find(T=>T.contractAddress===za);ee.useEffect(()=>{L!=="idle"||Ct===0||Hd(Ko,b)||H("open")},[L,Ct,b]);function ds(T){T&&Ud(Ko,b),H("closed")}if(!e)return m.jsxs(Xd,{children:[m.jsx(Wd,{children:C("nav.myAssets")}),m.jsx(Kd,{children:C("myAssets.signInPrompt")}),m.jsx(vt,{variant:"white",onClick:()=>n(),children:C("storeSettings.signIn")}),m.jsx(Ht,{message:t})]});const Ka=o==="creations"?Zt:ne||G,Ya=o==="creations"?jt.length:f==="not_for_sale"?ot.length:oe,ut=[];if(f!=="all"&&ut.push({key:"status",label:f==="on_sale"?C("filter.onSale"):C("filter.notForSale"),onRemove:()=>r("all")}),o==="creations"&&s!=="all"&&ut.push({key:"price",label:C(Un[s]),onRemove:()=>l("all")}),I)for(const T of ur)h.includes(T)&&ut.push({key:`rarity-${T}`,label:ys(T),onRemove:()=>X(T)});if(I&&$){const T=(hs=(fs=vc.find(Q=>Q.key===Qo[o]))==null?void 0:fs.subs)==null?void 0:hs.find(Q=>Q.key===$);ut.push({key:"sub",label:T?C(T.labelKey):$,onRemove:()=>U(null)})}function Za(){r("all"),l("all"),w([]),U(null)}const Qa=m.jsxs($c,{children:[m.jsx(Rc,{title:C("myAssets.assetsHeading"),category:Qo[o],subCategory:$,onCategory:V,onSub:U,onCollections:()=>A("creations"),collections:o==="creations",extraLabelKey:"myAssets.sectionCreations",hideAll:!0}),I?m.jsxs(m.Fragment,{children:[m.jsx(lr,{}),m.jsx(dr,{title:C("assets.rarity"),open:x,onToggle:()=>M(T=>!T),summary:v,headerTestId:"sidebar-section-toggle",children:m.jsx(Ic,{"data-testid":"rarity-filter",children:ur.map(T=>{const Q=h.includes(T);return m.jsxs(_c,{type:"button",selected:Q,"aria-pressed":Q,onClick:()=>X(T),"data-testid":"rarity-filter-check",children:[m.jsx(xc,{color:R.rarities[T],children:Q?m.jsx(Ac,{name:"check","aria-hidden":!0}):null}),m.jsx(Tc,{selected:Q,children:T})]},T)})})})]}):null,m.jsx(lr,{}),m.jsx(dr,{title:C("filter.status"),open:B,onToggle:()=>p(T=>!T),summary:N,children:[["all",C("filter.statusAll")],["on_sale",C("filter.onSale")],["not_for_sale",C("filter.notForSale")]].map(([T,Q])=>m.jsxs(Ss,{children:[m.jsx(vs,{type:"radio",name:"myassets-status",checked:f===T,onChange:()=>r(T)}),m.jsx($s,{children:Q})]},T))}),o==="creations"?m.jsxs(m.Fragment,{children:[m.jsx(lr,{}),m.jsx(dr,{title:C("filter.salePrice"),open:S,onToggle:()=>Y(T=>!T),summary:y,children:uf.map(T=>m.jsxs(Ss,{children:[m.jsx(vs,{type:"radio",name:"myassets-price",checked:s===T,onChange:()=>l(T),"data-testid":`price-filter-${T}`}),m.jsx($s,{children:C(Un[T])})]},T))})]}):null]});return m.jsxs(Cc,{"data-testid":"my-assets",children:[D?m.jsx(jc,{onClick:()=>k(!1),"aria-hidden":!0}):null,m.jsxs(Pc,{"data-open":D||void 0,"data-testid":"my-assets-sidebar",children:[m.jsxs(Oc,{children:[m.jsx(kc,{children:C("assets.filters")}),m.jsx(Bc,{onClick:()=>k(!1),"aria-label":C("assets.closeFilters"),children:"✕"})]}),m.jsx(Lc,{children:Qa}),m.jsx(Nc,{children:m.jsx(Mc,{type:"button",onClick:()=>k(!1),children:C("assets.showItems")})})]}),m.jsxs(qc,{children:[Ct>0&&!q?m.jsx(Yd,{count:Ct,onDismiss:()=>z(!0)}):null,m.jsx(Hc,{sort:O,onSort:J,sortOptions:Dn,total:Ya,loading:Ka,query:E,onOpenFilters:()=>k(!0),chips:ut,onClearChips:Za,search:m.jsxs(Fd,{children:[m.jsx(Vd,{name:"search","aria-hidden":!0}),m.jsx(zd,{type:"search",value:K,placeholder:C("myAssets.searchPlaceholder"),"aria-label":C("myAssets.searchPlaceholder"),onChange:T=>_(T.target.value)}),K?m.jsx(Gd,{type:"button","aria-label":C("myAssets.clearSearch"),onClick:()=>_(""),children:m.jsx(Jd,{name:"close","aria-hidden":!0})}):null]})}),(o==="creations"?Da:ie)?m.jsx(Ht,{message:C("myAssets.ownedError"),testId:"my-assets-error"}):null,o==="creations"?m.jsxs(m.Fragment,{children:[rr&&e&&nr&&nr.length>0?m.jsxs(of,{"data-testid":"creator-sales-panel",children:[m.jsx(af,{children:C("creatorSale.salesTitle")}),m.jsx(Ed,{sales:nr,session:e})]}):null,Va&&e&&ls?m.jsx(cd,{session:e,collection:ls,onClose:()=>us(!1)}):null,Zt?m.jsx(Hn,{"data-testid":"grid",children:m.jsx(ar,{count:12})}):Xa.map(T=>m.jsxs(Zd,{"data-testid":"creation-group",children:[m.jsxs(Qd,{children:[m.jsx(tf,{children:m.jsx(sa,{contractAddress:T.contractAddress})}),m.jsxs(rf,{children:[m.jsx(nf,{"data-testid":"creation-group-name",children:T.name}),m.jsxs(sf,{"data-testid":"creation-group-count",children:[C("myAssets.itemsCount",{count:T.items.length}),T.listed>0?` · ${C("myAssets.groupOnSale",{count:T.listed})}`:""]})]}),rr&&e&&Wa.has(T.contractAddress)?m.jsx(ef,{variant:"purple",size:"sm","data-testid":"creation-group-sale",onClick:()=>{Ga(T.contractAddress),us(!0)},children:C("creatorSale.putOnSale")}):null]}),m.jsx(Hn,{"data-testid":"grid",children:T.items.map(Q=>{const te=Xe(Q);return m.jsx(cr,{item:ff(Q,tr(te),b??""),mode:"manage-link"},`${Q.contractAddress}-${Q.blockchainItemId}`)})})]},T.contractAddress)),!Zt&&jt.length===0?m.jsx(bs,{testId:"creations-empty",icon:eu,title:C("myAssets.emptyCreationsTitle"),body:C("myAssets.nothingToPublish")}):null]}):m.jsxs(m.Fragment,{children:[m.jsxs(Hn,{"data-testid":"grid",children:[ne||G?m.jsx(ar,{count:12}):ot.map(T=>o==="names"?m.jsx(cr,{item:{...ea(T),category:"ens"},mode:"manage-link",manageHref:df(T.name)},T.id):m.jsx(cr,{item:ea(T,Je(T)),mode:"manage-link"},T.id)),ae?m.jsx(ar,{count:6}):null]}),f!=="not_for_sale"?m.jsx(Ec,{hasNextPage:ge,isFetching:ae,isError:le,onLoadMore:()=>void me()}):null,!ne&&!G&&ot.length===0?m.jsx(bs,{testId:"owned-empty",icon:f==="on_sale"?Fc:tu,title:o==="names"?C("myAssets.emptyNamesTitle"):C("myAssets.emptyOwnedTitle"),body:o==="names"?C("myAssets.namesEmpty"):C("myAssets.ownedEmpty"),cta:o!=="names"?{label:C("myAssets.emptyBrowse"),to:"/items"}:void 0}):null]})]}),L==="open"?m.jsx(Md,{onClose:ds,onConfirm:T=>{ds(T),d("/import")}}):null]})}export{Mf as MyAssets};
|
|
1061
|
-
//# sourceMappingURL=MyAssets-
|
|
1060
|
+
`,of=48,Ko=[{key:"wearables",labelKey:"myAssets.sectionWearables",category:"wearable"},{key:"emotes",labelKey:"myAssets.sectionEmotes",category:"emote"},{key:"names",labelKey:"myAssets.sectionNames",category:"ens"},{key:"creations",labelKey:"myAssets.sectionCreations"}],af=["all","credits","mana"],Un={all:"filter.priceAll",credits:"filter.priceCredits",mana:"filter.priceMana"},Dn=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"name",label:"filterBar.sortName",server:"name"},{key:"cheapest",label:"filterBar.sortCheapest",server:"cheapest"}];function Yo(e){return e==="wearables"||e==="emotes"}const Zo={wearables:"wearable",emotes:"emote",names:"names",creations:""},cf={wearable:"wearables",emote:"emotes",names:"names"};function uf(e){return`${Rt.builderUrl}/names/${encodeURIComponent(e)}`}function Qo(e,t){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:(t==null?void 0:t.priceCredits)??e.listingPrice??0,gender:null,isSmart:!1,tokenId:e.tokenId,issuedId:e.issuedId,tradeId:(t==null?void 0:t.tradeId)??e.tradeId}}function lf(e,t,n){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:n,contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:Rt.chainId,thumbnail:e.thumbnail,priceCredits:t,gender:null,isSmart:!1}}function Lf(){var fs,hs;rc({title:C("nav.myAssets"),noindex:!0});const{session:e,error:t,signIn:n,restore:i}=nc(),d=ta(),[u,c]=Qa(),a=u.get("section"),o=Ko.some(T=>T.key===a)?a:"wearables",[f,r]=ee.useState("all"),[s,l]=ee.useState("all"),[h,w]=ee.useState([]),[$,U]=ee.useState(null);Ec(`${o}:${$??""}`);const[O,J]=ee.useState("newest"),[K,x]=ee.useState(""),[E,P]=ee.useState(""),[D,k]=ee.useState(!1),[B,p]=ee.useState(!0),[S,Y]=ee.useState(!0),[_,M]=ee.useState(!1),[q,z]=ee.useState(!1),[L,H]=ee.useState("idle");ee.useEffect(()=>{i()},[i]),ee.useEffect(()=>{const T=setTimeout(()=>P(K.trim()),300);return()=>clearTimeout(T)},[K]),ee.useEffect(()=>{if(!D)return;const T=te=>{te.key==="Escape"&&k(!1)};document.addEventListener("keydown",T);const Q=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",T),document.body.style.overflow=Q}},[D]);const b=e==null?void 0:e.address,g=Ko.find(T=>T.key===o),I=Yo(o),j=(Dn.find(T=>T.key===O)??Dn[0]).server,N=f==="on_sale"?C("filter.onSale"):f==="not_for_sale"?C("filter.notForSale"):"",y=s==="all"?"":C(Un[s]),v=ur.filter(T=>h.includes(T)).map(ms).join(", ");function A(T){c(Q=>{const te=new URLSearchParams(Q);return te.set("section",T),te},{replace:!0}),U(null),Yo(T)||w([]),T!=="creations"&&l("all"),k(!1)}function X(T){w(Q=>Q.includes(T)?Q.filter(te=>te!==T):[...Q,T])}function V(T){const Q=cf[T];Q&&A(Q)}const{items:W,total:oe,isLoading:ne,isPlaceholderData:G,error:ie,hasNextPage:ge,isFetchingNextPage:ae,isFetchNextPageError:le,fetchNextPage:me}=Hc(["my-assets",b,o,f,h,$,E,j],T=>oc(b,{category:g.category,first:of,skip:T,search:E||void 0,rarities:I&&h.length?h:void 0,wearableCategories:o==="wearables"&&$?$s[$]:void 0,emoteCategories:o==="emotes"&&$?$s[$]:void 0,onlyOnSale:f==="on_sale"||void 0,sortBy:j}).then(Q=>({items:Q.assets,total:Q.total})),{enabled:!!b&&o!=="creations"}),fe=ee.useMemo(()=>o==="wearables"||o==="emotes"?[...new Set(W.map(T=>T.contractAddress))]:[],[W,o]),{data:ye}=Nt({queryKey:["secondary-sale-state",fe],enabled:fe.length>0,queryFn:async()=>{const T=await Promise.all(fe.map(async te=>[te,await cc(te)])),Q={};for(const[te,ue]of T)for(const[$e,De]of Object.entries(ue))Q[`${te}-${$e}`]=De;return Q}}),Je=T=>ye==null?void 0:ye[`${T.contractAddress}-${T.tokenId}`],Ye=T=>!!Je(T)||T.isOnSale,ot=ee.useMemo(()=>f==="not_for_sale"?W.filter(T=>!Ye(T)):W,[W,f,ye]),{data:Ue,isLoading:Zt,isError:Ua}=Nt({queryKey:["publishable-items",b],queryFn:()=>lc(b,e.identity),enabled:!!e&&o==="creations",retry:!1}),Qt=ee.useMemo(()=>[...new Set((Ue??[]).map(T=>T.contractAddress))],[Ue]),{data:Re}=Nt({queryKey:["collection-sale-state",b,Qt],enabled:Qt.length>0,queryFn:async()=>{const T=await Promise.all(Qt.map(async te=>[te,await uc(te)])),Q={};for(const[te,ue]of T)for(const[$e,De]of Object.entries(ue))Q[`${te}-${$e}`]=De;return Q}}),Xe=T=>Re==null?void 0:Re[`${T.contractAddress}-${T.blockchainItemId}`],Da=ee.useMemo(()=>Object.values(Re??{}).some(T=>!!T.manaWei),[Re]),{data:er}=sc(Da),tr=T=>T?!T.manaWei||!er?T.priceCredits:ac({manaWei:T.manaWei,priceCredits:T.priceCredits},er):0,rr=ic(),{data:nr}=Ed(b,rr&&o==="creations"),[Fa,us]=ee.useState(!1),[Va,za]=ee.useState(void 0),sr=ee.useMemo(()=>{const T=new Map;for(const Q of Ue??[]){const te=Re==null?void 0:Re[`${Q.contractAddress}-${Q.blockchainItemId}`],ue=!!(te!=null&&te.isOnSale)&&!te.manaWei,$e=Q.contractAddress.toLowerCase(),De=T.get($e)??{contractAddress:$e,name:Q.collectionName,listedCount:0,examplePriceCredits:null,items:[]};De.items.push({key:`${$e}-${Q.blockchainItemId}`,name:Q.name,thumbnail:Q.thumbnail,priceCredits:ue?te.priceCredits:null,remainingSupply:Q.remainingSupply}),ue&&(De.listedCount+=1,De.examplePriceCredits=Math.max(De.examplePriceCredits??0,te.priceCredits)),T.set($e,De)}return[...T.values()].filter(Q=>Q.listedCount>0)},[Ue,Re]),{count:Ga}=Uc(),Tt=Ga??0,Ct=ee.useMemo(()=>{let T=Ue??[];if(f==="on_sale"?T=T.filter(te=>{var ue;return(ue=Xe(te))==null?void 0:ue.isOnSale}):f==="not_for_sale"&&(T=T.filter(te=>{var ue;return!((ue=Xe(te))!=null&&ue.isOnSale)})),s==="credits"?T=T.filter(te=>{var ue,$e;return!!((ue=Xe(te))!=null&&ue.isOnSale)&&!(($e=Xe(te))!=null&&$e.manaWei)}):s==="mana"&&(T=T.filter(te=>{var ue;return!!((ue=Xe(te))!=null&&ue.manaWei)})),E){const te=E.toLowerCase();T=T.filter(ue=>ue.name.toLowerCase().includes(te))}const Q=[...T];return O==="name"?Q.sort((te,ue)=>te.name.localeCompare(ue.name)):O==="cheapest"&&Q.sort((te,ue)=>tr(Xe(te))-tr(Xe(ue))),Q},[Ue,Re,f,s,E,O,er]),Ja=ee.useMemo(()=>{var Q;const T=new Map;for(const te of Ct){const ue=te.contractAddress.toLowerCase(),$e=T.get(ue)??{contractAddress:ue,name:te.collectionName,listed:0,items:[]};$e.items.push(te),(Q=Re==null?void 0:Re[`${te.contractAddress}-${te.blockchainItemId}`])!=null&&Q.isOnSale&&($e.listed+=1),T.set(ue,$e)}return[...T.values()]},[Ct,Re]),Xa=ee.useMemo(()=>new Set(sr.map(T=>T.contractAddress.toLowerCase())),[sr]),ls=sr.find(T=>T.contractAddress===Va);ee.useEffect(()=>{L!=="idle"||Tt===0||Md(Wo,b)||H("open")},[L,Tt,b]);function ds(T){T&&qd(Wo,b),H("closed")}if(!e)return m.jsxs(Gd,{children:[m.jsx(Jd,{children:C("nav.myAssets")}),m.jsx(Xd,{children:C("myAssets.signInPrompt")}),m.jsx(vt,{variant:"white",onClick:()=>n(),children:C("storeSettings.signIn")}),m.jsx(Ht,{message:t})]});const Wa=o==="creations"?Zt:ne||G,Ka=o==="creations"?Ct.length:f==="not_for_sale"?ot.length:oe,ut=[];if(f!=="all"&&ut.push({key:"status",label:f==="on_sale"?C("filter.onSale"):C("filter.notForSale"),onRemove:()=>r("all")}),o==="creations"&&s!=="all"&&ut.push({key:"price",label:C(Un[s]),onRemove:()=>l("all")}),I)for(const T of ur)h.includes(T)&&ut.push({key:`rarity-${T}`,label:ms(T),onRemove:()=>X(T)});if(I&&$){const T=(hs=(fs=Sc.find(Q=>Q.key===Zo[o]))==null?void 0:fs.subs)==null?void 0:hs.find(Q=>Q.key===$);ut.push({key:"sub",label:T?C(T.labelKey):$,onRemove:()=>U(null)})}function Ya(){r("all"),l("all"),w([]),U(null)}const Za=m.jsxs(vc,{children:[m.jsx($c,{title:C("myAssets.assetsHeading"),category:Zo[o],subCategory:$,onCategory:V,onSub:U,onCollections:()=>A("creations"),collections:o==="creations",extraLabelKey:"myAssets.sectionCreations",hideAll:!0}),I?m.jsxs(m.Fragment,{children:[m.jsx(lr,{}),m.jsx(dr,{title:C("assets.rarity"),open:_,onToggle:()=>M(T=>!T),summary:v,headerTestId:"sidebar-section-toggle",children:m.jsx(Rc,{"data-testid":"rarity-filter",children:ur.map(T=>{const Q=h.includes(T);return m.jsxs(Ic,{type:"button",selected:Q,"aria-pressed":Q,onClick:()=>X(T),"data-testid":"rarity-filter-check",children:[m.jsx(xc,{color:R.rarities[T],children:Q?m.jsx(_c,{name:"check","aria-hidden":!0}):null}),m.jsx(Ac,{selected:Q,children:T})]},T)})})})]}):null,m.jsx(lr,{}),m.jsx(dr,{title:C("filter.status"),open:B,onToggle:()=>p(T=>!T),summary:N,children:[["all",C("filter.statusAll")],["on_sale",C("filter.onSale")],["not_for_sale",C("filter.notForSale")]].map(([T,Q])=>m.jsxs(Es,{children:[m.jsx(Ss,{type:"radio",name:"myassets-status",checked:f===T,onChange:()=>r(T)}),m.jsx(vs,{children:Q})]},T))}),o==="creations"?m.jsxs(m.Fragment,{children:[m.jsx(lr,{}),m.jsx(dr,{title:C("filter.salePrice"),open:S,onToggle:()=>Y(T=>!T),summary:y,children:af.map(T=>m.jsxs(Es,{children:[m.jsx(Ss,{type:"radio",name:"myassets-price",checked:s===T,onChange:()=>l(T),"data-testid":`price-filter-${T}`}),m.jsx(vs,{children:C(Un[T])})]},T))})]}):null]});return m.jsxs(Tc,{"data-testid":"my-assets",children:[D?m.jsx(Cc,{onClick:()=>k(!1),"aria-hidden":!0}):null,m.jsxs(jc,{"data-open":D||void 0,"data-testid":"my-assets-sidebar",children:[m.jsxs(Pc,{children:[m.jsx(Oc,{children:C("assets.filters")}),m.jsx(kc,{onClick:()=>k(!1),"aria-label":C("assets.closeFilters"),children:"✕"})]}),m.jsx(Bc,{children:Za}),m.jsx(Lc,{children:m.jsx(Nc,{type:"button",onClick:()=>k(!1),children:C("assets.showItems")})})]}),m.jsxs(Mc,{children:[Tt>0&&!q?m.jsx(Wd,{count:Tt,onDismiss:()=>z(!0)}):null,m.jsx(qc,{sort:O,onSort:J,sortOptions:Dn,total:Ka,loading:Wa,query:E,onOpenFilters:()=>k(!0),chips:ut,onClearChips:Ya,search:m.jsxs(Ud,{children:[m.jsx(Dd,{name:"search","aria-hidden":!0}),m.jsx(Fd,{type:"search",value:K,placeholder:C("myAssets.searchPlaceholder"),"aria-label":C("myAssets.searchPlaceholder"),onChange:T=>x(T.target.value)}),K?m.jsx(Vd,{type:"button","aria-label":C("myAssets.clearSearch"),onClick:()=>x(""),children:m.jsx(zd,{name:"close","aria-hidden":!0})}):null]})}),(o==="creations"?Ua:ie)?m.jsx(Ht,{message:C("myAssets.ownedError"),testId:"my-assets-error"}):null,o==="creations"?m.jsxs(m.Fragment,{children:[rr&&e&&nr&&nr.length>0?m.jsxs(nf,{"data-testid":"creator-sales-panel",children:[m.jsx(sf,{children:C("creatorSale.salesTitle")}),m.jsx(wd,{sales:nr,session:e})]}):null,Fa&&e&&ls?m.jsx(ad,{session:e,collection:ls,onClose:()=>us(!1)}):null,Zt?m.jsx(Hn,{"data-testid":"grid",children:m.jsx(ar,{count:12})}):Ja.map(T=>m.jsxs(Kd,{"data-testid":"creation-group",children:[m.jsxs(Yd,{children:[m.jsx(Qd,{children:m.jsx(na,{contractAddress:T.contractAddress})}),m.jsxs(ef,{children:[m.jsx(tf,{"data-testid":"creation-group-name",children:T.name}),m.jsxs(rf,{"data-testid":"creation-group-count",children:[C("myAssets.itemsCount",{count:T.items.length}),T.listed>0?` · ${C("myAssets.groupOnSale",{count:T.listed})}`:""]})]}),rr&&e&&Xa.has(T.contractAddress)?m.jsx(Zd,{variant:"purple",size:"sm","data-testid":"creation-group-sale",onClick:()=>{za(T.contractAddress),us(!0)},children:C("creatorSale.putOnSale")}):null]}),m.jsx(Hn,{"data-testid":"grid",children:T.items.map(Q=>{const te=Xe(Q);return m.jsx(cr,{item:lf(Q,tr(te),b??""),mode:"manage-link"},`${Q.contractAddress}-${Q.blockchainItemId}`)})})]},T.contractAddress)),!Zt&&Ct.length===0?m.jsx(ys,{testId:"creations-empty",icon:Qc,title:C("myAssets.emptyCreationsTitle"),body:C("myAssets.nothingToPublish")}):null]}):m.jsxs(m.Fragment,{children:[m.jsxs(Hn,{"data-testid":"grid",children:[ne||G?m.jsx(ar,{count:12}):ot.map(T=>o==="names"?m.jsx(cr,{item:{...Qo(T),category:"ens"},mode:"manage-link",manageHref:uf(T.name)},T.id):m.jsx(cr,{item:Qo(T,Je(T)),mode:"manage-link"},T.id)),ae?m.jsx(ar,{count:6}):null]}),f!=="not_for_sale"?m.jsx(wc,{hasNextPage:ge,isFetching:ae,isError:le,onLoadMore:()=>void me()}):null,!ne&&!G&&ot.length===0?m.jsx(ys,{testId:"owned-empty",icon:f==="on_sale"?Dc:eu,title:o==="names"?C("myAssets.emptyNamesTitle"):C("myAssets.emptyOwnedTitle"),body:o==="names"?C("myAssets.namesEmpty"):C("myAssets.ownedEmpty"),cta:o!=="names"?{label:C("myAssets.emptyBrowse"),to:"/items"}:void 0}):null]})]}),L==="open"?m.jsx(Ld,{onClose:ds,onConfirm:T=>{ds(T),d("/import")}}):null]})}export{Lf as MyAssets};
|
|
1061
|
+
//# sourceMappingURL=MyAssets-Bq5EfGXz.js.map
|