@dcl/shop 0.1.0 → 0.1.1-30909439604.commit-4721d83
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-BwdIaUnW.js → Activity-CiQm3fPZ.js} +7 -7
- package/_assets/{AnimatedBackground-DP8XKTVN.js → AnimatedBackground-BFRTkuDo.js} +1 -1
- package/_assets/{Assets-Degiynxt.js → Assets--cn5UbRN.js} +50 -50
- package/_assets/{Assets.styles-CmDKBB8r.js → Assets.styles-CkJWzjdk.js} +1 -1
- package/_assets/{Authorizations-CJeq3VNJ.js → Authorizations-Cqqxn9wD.js} +7 -7
- package/_assets/{Cart-DsUb4sI3.js → Cart-ByLo0Q5U.js} +12 -12
- package/_assets/{CircularProgress-CNroeQ3o.js → CircularProgress-Cv24wKWu.js} +5 -5
- package/_assets/Collection-DbZpN_eH.js +119 -0
- package/_assets/{CollectionCarousel-D36c6dts.js → CollectionCarousel-DKVvizGs.js} +7 -7
- package/_assets/{ConstantsUtil-Dfwpy1eP.js → ConstantsUtil-CNJ3pGKv.js} +1 -1
- package/_assets/{ContentClient-D6ofwSpu.js → ContentClient-BJFWm8Bs.js} +1 -1
- package/_assets/Creator-CtdwyJXl.js +306 -0
- package/_assets/{DeploymentBuilder-ku3det23.js → DeploymentBuilder-CXBC22K0.js} +1 -1
- package/_assets/{ErrorNotice-COIh7ro4.js → ErrorNotice-51eOicue.js} +1 -1
- package/_assets/{ExchangeController-DOL-_brz.js → ExchangeController--vn2md5b.js} +1 -1
- package/_assets/{GetCredits-BkjOQ5or.js → GetCredits-CnE9Mkj3.js} +10 -10
- package/_assets/{HelpersUtil-2hZP33Du.js → HelpersUtil-Dg90boC1.js} +1 -1
- package/_assets/ImportListings-BxeqcxAE.js +461 -0
- package/_assets/{ItemDetail-D57x9bXl.js → ItemDetail-CqkeMLxu.js} +251 -281
- package/_assets/LoadMore-BolkAKn7.js +7 -0
- package/_assets/ManaPricingBanner.styles-DKUacHFQ.js +74 -0
- package/_assets/{MenuList-d6ca0DH6.js → MenuList-D4kLbIwO.js} +2 -2
- package/_assets/MyAssets-v3gryjCk.js +381 -0
- package/_assets/{MyFavorites-DxYh88wB.js → MyFavorites-Bg2hc3VG.js} +2 -2
- package/_assets/{NetworkUtil-HlUKXKcF.js → NetworkUtil-Dh3JWXso.js} +1 -1
- package/_assets/{NotFound-DA15lCMu.js → NotFound-R9sTwMQk.js} +1 -1
- package/_assets/{NotificationsBell-C8r1c8mg.js → NotificationsBell-BoefPrvQ.js} +1 -1
- package/_assets/StoreSettings-GYoZCBBR.js +239 -0
- package/_assets/Success-CGQGJeM-.js +296 -0
- package/_assets/{SwapController-CRz8E17o.js → SwapController-BcfprLwB.js} +1 -1
- package/_assets/{Tooltip-D92WFEmr.js → Tooltip-CoMCVLgL.js} +1 -1
- package/_assets/{TradeService-DIWR3GwD.js → TradeService-Be5Jm26-.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BuQKbZaF.js → W3MFrameProviderSingleton-BLAdE798.js} +3 -3
- package/_assets/{WebCryptoP256-BFDAPngw.js → WebCryptoP256-B2g3GckQ.js} +1 -1
- package/_assets/{authorizations-BNs0emga.js → authorizations-FkFZVBeE.js} +1 -1
- package/_assets/{basic-C6XisVyZ.js → basic-DEelCa7C.js} +1 -1
- package/_assets/{biconomy-09nDKxxN.js → biconomy-BuAmKMqp.js} +1 -1
- package/_assets/{browseLayout.styles-CTl6D_zv.js → browseLayout.styles-6Bx0cPB_.js} +6 -6
- package/_assets/{browser-BGlawS--.js → browser-CMge1DAk.js} +1 -1
- package/_assets/{browser-ponyfill-Dm9rZGtt.js → browser-ponyfill-DdemUjDS.js} +1 -1
- package/_assets/{builder-C8hUH3RB.js → builder-Z4iUHEpn.js} +1 -1
- package/_assets/{buy-Cl7snZzi.js → buy-DiLzTHFT.js} +1 -1
- package/_assets/{buy-gasless-DVLP7U8S.js → buy-gasless-Cn4_YLUa.js} +1 -1
- package/_assets/{categories-BGGjSLd9.js → categories-Byz019bF.js} +8 -8
- package/_assets/{ccip-Dx_KcJBs.js → ccip-CCZIckpG.js} +1 -1
- package/_assets/{ccip-DLDLk2fK.js → ccip-DUqe0wPP.js} +1 -1
- package/_assets/{chains-DjVUcpdx.js → chains-DwiEm2Ny.js} +1 -1
- package/_assets/{clsx-BY1AO2V7.js → clsx-sy6nSRXN.js} +2 -2
- package/_assets/{common-BzdjGk0Y.js → common-ChK99Sbg.js} +1 -1
- package/_assets/confettiAnimation-BpyTLLuX.js +1 -0
- package/_assets/{controller-ZqrzYJ4o.js → controller-D2U901D4.js} +2 -2
- package/_assets/{core-CWR04nJr.js → core-BqndrHwC.js} +4 -4
- package/_assets/{createSvgIcon-BUIodiet.js → createSvgIcon-nAlfqqgf.js} +5 -5
- package/_assets/{custom-DMjRmtpL.js → custom-DJvYgxJy.js} +1 -1
- package/_assets/{data-capture-SoaOqGRY.js → data-capture-CLOU8jih.js} +1 -1
- package/_assets/{decimals-rMqzXjFU.js → decimals-C49MnWnC.js} +1 -1
- package/_assets/decimals-DenLQ0L2.js +1 -0
- package/_assets/{detectExtension-0JcORGBX.js → detectExtension-Bs6N_T7E.js} +1 -1
- package/_assets/{email-i8v6FMCW.js → email-BxF_EMmd.js} +1 -1
- package/_assets/{embedded-wallet-DBT_Ev8g.js → embedded-wallet-6IYwV5B_.js} +1 -1
- package/_assets/emotion-styled.browser.esm-9O-_UQ_M.js +1 -0
- package/_assets/{engine-Bn2HNIpq.js → engine-CDTFOGA6.js} +1 -1
- package/_assets/{errors-Ce5OngHE.js → errors-sJnX14Ki.js} +1 -1
- package/_assets/estimate-l1-fee-B4XbNvFY.js +1 -0
- package/_assets/eth_estimateGas-DaegCW9w.js +1 -0
- package/_assets/{eth_getStorageAt-DIGus6Ic.js → eth_getStorageAt-g-V8ByC9.js} +1 -1
- package/_assets/eth_getTransactionCount-ChnmCar0.js +1 -0
- package/_assets/{ethereum-7duKFA0R.js → ethereum-DdnrEX6r.js} +1 -1
- package/_assets/{ethers-CXBJm_wN.js → ethers-rFeF6PNV.js} +1 -1
- package/_assets/{execute-DO9Rpu0c.js → execute-D8YtDqpj.js} +2 -2
- package/_assets/{extractIPFS-CTs5XnuT.js → extractIPFS-DiQ3ktqZ.js} +1 -1
- package/_assets/{features-5tSUGHg0.js → features-B8MZg8q9.js} +1 -1
- package/_assets/{fetchTokenMetadata-CHnDbBcr.js → fetchTokenMetadata-Cn6UkNbd.js} +2 -2
- package/_assets/field.styles-o0yoMx97.js +70 -0
- package/_assets/{fortmatic-CCMQbesB.js → fortmatic-ZrVXe0if.js} +1 -1
- package/_assets/{get-bytecode-Bg8NviKV.js → get-bytecode-B5xpAv7a.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-DyEERgSx.js +1 -0
- package/_assets/{getBalance-BU5lPIM1.js → getBalance-pdi104jy.js} +2 -2
- package/_assets/{getInstalledModules-KP-LSI0j.js → getInstalledModules-vRyVzBkY.js} +1 -1
- package/_assets/{getNFT-Ctbterca.js → getNFT-ChdTpPL_.js} +2 -2
- package/_assets/getNFT-JwHQ_s5F.js +1 -0
- package/_assets/{getThemeProps-xrG7EYWl.js → getThemeProps-CFDZlxj4.js} +1 -1
- package/_assets/{grid.styles-B1mDfzvi.js → grid.styles-DVBPQuRz.js} +1 -1
- package/_assets/{hashTypedData-DaCcjWXS.js → hashTypedData-2Z2_gEL6.js} +1 -1
- package/_assets/{hashTypedData-BiojmScK.js → hashTypedData-DP9JOjjX.js} +1 -1
- package/_assets/{in-app-Sb-fFEpv.js → in-app-CRH3jQep.js} +1 -1
- package/_assets/{in-app-wallet-calls-BYLiaB1J.js → in-app-wallet-calls-Dp9TxCgN.js} +1 -1
- package/_assets/{index-BbxUYBIl.js → index--coIj_2Q.js} +2 -2
- package/_assets/{index-BV7d8LIf.js → index-5o0_4PJn.js} +1 -1
- package/_assets/{index-CcRW7qMf.js → index-6_pDklk8.js} +1 -1
- package/_assets/{index-BBM5Da88.js → index-72R1sLRe.js} +1 -1
- package/_assets/{index-CcrwUr4B.js → index-B1YUW9FQ.js} +2 -2
- package/_assets/index-B2O7rGJL.js +1 -0
- package/_assets/{index-BCG-_RTT.js → index-B8_IX_3e.js} +1 -1
- package/_assets/{index-Cw22meEP.js → index-BGPVOBHa.js} +1 -1
- package/_assets/{index-DQ2tXB-9.js → index-BHMMC_4O.js} +1 -1
- package/_assets/{index-DmGcqzuR.js → index-BLpG8mks.js} +1 -1
- package/_assets/{index-CD9t0mSF.js → index-BRGDK96N.js} +1 -1
- package/_assets/{index-BzC7P3rh.js → index-BUbZ4ieP.js} +1 -1
- package/_assets/{index-BdWG2PoE.js → index-BWXsvDqD.js} +1 -1
- package/_assets/{index-CKo0vnRV.js → index-BZWNTqaV.js} +1 -1
- package/_assets/{index-DjcstBXY.js → index-BaUli81x.js} +1 -1
- package/_assets/index-Bbgy14tN.js +1 -0
- package/_assets/index-BiIZh9R9.js +2820 -0
- package/_assets/{index-CE-Z89iI.js → index-BkP6Akod.js} +1 -1
- package/_assets/{index-8EYFemjW.js → index-BszwI7-F.js} +1 -1
- package/_assets/{index-CEP90DOS.js → index-BtLL7F-4.js} +1 -1
- package/_assets/{index-DC-Z7MbP.js → index-BtkxBg3h.js} +2 -2
- package/_assets/{index-DWFCwLfs.js → index-Bu5mtkuE.js} +1 -1
- package/_assets/{index-6HemuoHH.js → index-C-E_Jk-6.js} +1 -1
- package/_assets/{index-Bb2mLVTh.js → index-C4AfvPtb.js} +1 -1
- package/_assets/{index-CSqaG5Rs.js → index-CBrp3dUZ.js} +1 -1
- package/_assets/{index-DgMAf2q5.js → index-CCoJpS6M.js} +1 -1
- package/_assets/{index-DMKhInQc.js → index-CDCj0Qak.js} +2 -2
- package/_assets/{index-DvlgcdsJ.js → index-CJ03r2wd.js} +1 -1
- package/_assets/{index-hesFTmUX.js → index-CY1VUN_S.js} +1 -1
- package/_assets/{index-DgKHc2Pp.js → index-CYEynknO.js} +1 -1
- package/_assets/{index-OiKTI-o_.js → index-CZQ-Avg8.js} +1 -1
- package/_assets/{index-BNnLGudB.js → index-ClSZl7Vh.js} +1 -1
- package/_assets/{index-3x98-rKq.js → index-CsEaqK5K.js} +1 -1
- package/_assets/{index-DbkHKS7K.js → index-Csd0nRMS.js} +2 -2
- package/_assets/{index-BpA1I7hL.js → index-CwLvQ9MJ.js} +1 -1
- package/_assets/{index-cSAleFRI.js → index-CyyhNrl2.js} +1 -1
- package/_assets/{index-CSu0sG0T.js → index-D0JhTMR7.js} +1 -1
- package/_assets/{index-CrlwRjah.js → index-D29EUWHC.js} +1 -1
- package/_assets/{index-BsQQxLJN.js → index-D3OKsJLK.js} +1 -1
- package/_assets/{index-DLEx9ISf.js → index-D9Dv7ZRq.js} +1 -1
- package/_assets/{index-PJSp7ijP.js → index-DDqqXhJL.js} +3 -3
- package/_assets/{index-BQG7R5QF.js → index-DGuNIM9a.js} +1 -1
- package/_assets/{index-Cv-5v5Ze.js → index-DHFAjoyI.js} +1 -1
- package/_assets/{index-BgKl-ydS.js → index-DXe1QzPN.js} +1 -1
- package/_assets/{index-CcZyuO92.js → index-DaBMwl5V.js} +1 -1
- package/_assets/{index-C6rpfPMS.js → index-DbyPzhzJ.js} +1 -1
- package/_assets/{index-BIJ2qchS.js → index-Det24uTr.js} +3 -3
- package/_assets/{index-BEtbI0Zv.js → index-Dhe2yejG.js} +1 -1
- package/_assets/{index-B4EKT3oF.js → index-DitauyL5.js} +1 -1
- package/_assets/{index-DFzHpbP5.js → index-DkdxS38k.js} +1 -1
- package/_assets/{index-DyGnajSZ.js → index-DkmumT6q.js} +1 -1
- package/_assets/{index-CviVJpxw.js → index-DquJiMJI.js} +1 -1
- package/_assets/{index-Bor4cMvk.js → index-Duy_bLYT.js} +1 -1
- package/_assets/{index-qVmIz0zn.js → index-Dz7l4WRb.js} +1 -1
- package/_assets/{index-ZoIpzYhg.js → index-PfgUlDb3.js} +1 -1
- package/_assets/{index-RSxxMPji.js → index-Rjrwrr8k.js} +1 -1
- package/_assets/{index-BNEWEGXe.js → index-ThwwXj7K.js} +1 -1
- package/_assets/{index-DNaX9VGC.js → index-UOQDoXBN.js} +1 -1
- package/_assets/index-XMkvXJnG.js +2 -0
- package/_assets/{index-Cso0PIKg.js → index-efx_UGwj.js} +3 -3
- package/_assets/{index-D20v1ehb.js → index-hBIDXrfA.js} +1 -1
- package/_assets/{index-Fyrl3bgj.js → index-jDLQZQqn.js} +1 -1
- package/_assets/{index-DETprG7w.js → index-klYUwFTu.js} +1 -1
- package/_assets/index.es-CWcx_MPC.js +11 -0
- package/_assets/{index.es-4ugP_xPq.js → index.es-DGdQax5Y.js} +1 -1
- package/_assets/{index.es-DWjGiGDB.js → index.es-DWEmsLX5.js} +4 -4
- package/_assets/{index.es-BWoKVfSl.js → index.es-gS9A1DPX.js} +1 -1
- package/_assets/{linkAccount-D303ryxj.js → linkAccount-DktwtO-V.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DxATZPfq.js → localBatchGatewayRequest-DoA6w-sg.js} +1 -1
- package/_assets/{mana-convert-BAmJatVq.js → mana-convert-8bdglmK2.js} +1 -1
- package/_assets/{mana-rate-COZYJ-5D.js → mana-rate-pg062I50.js} +1 -1
- package/_assets/{native-BbO8hggJ.js → native-DUHK6GYV.js} +1 -1
- package/_assets/{networks-BgOd8fAQ.js → networks-CS3wn-YQ.js} +1 -1
- package/_assets/{onramp-C1zk7UMI.js → onramp-_fU1CUPx.js} +1 -1
- package/_assets/{openzeppelin-JqnI3fjU.js → openzeppelin-Byo7VjiL.js} +1 -1
- package/_assets/{ownerOf-B0AowHTZ.js → ownerOf-9FPRCliB.js} +1 -1
- package/_assets/parseNft-f2SijHni.js +2 -0
- package/_assets/{parseSignature-DDl2oW2S.js → parseSignature-7zbxP3S5.js} +3 -3
- package/_assets/{parseSignature-Zp5jbuFC.js → parseSignature-B4bdR_8K.js} +1 -1
- package/_assets/{passkeys-D630VzP0.js → passkeys--fWD2NEw.js} +1 -1
- package/_assets/{pay-with-exchange-DB12e4gP.js → pay-with-exchange-Dk9Xcd3H.js} +1 -1
- package/_assets/{prepare-contract-call-BreQKHF6.js → prepare-contract-call-CUP20AbD.js} +1 -1
- package/_assets/{qr-overlay-BFMFKV4B.js → qr-overlay-DkdnRl_0.js} +3 -3
- package/_assets/{react-vyZjIDcS.js → react-IQWs2nb4.js} +1 -1
- package/_assets/{receive-C0p5nZhH.js → receive-C29mXrSs.js} +1 -1
- package/_assets/{resolveImplementation-Cpqxrq_P.js → resolveImplementation-Brjkq9B3.js} +1 -1
- package/_assets/{rpc-BGoWvIYj.js → rpc-Oikc4qrs.js} +1 -1
- package/_assets/{secp256k1-CxwkeDtE.js → secp256k1-CUWzbXuP.js} +1 -1
- package/_assets/{secp256k1-JugqR1gN.js → secp256k1-WT42JaIN.js} +1 -1
- package/_assets/{secp256k1-DN4fbJll.js → secp256k1-v_OYVKpT.js} +1 -1
- package/_assets/{send-DQo6irxp.js → send-CSdyFqol.js} +1 -1
- package/_assets/{send-batch-transaction-BwQeKmX0.js → send-batch-transaction-BlExRlz8.js} +1 -1
- package/_assets/{send-eip712-transaction-Di3Pi2C5.js → send-eip712-transaction-DyfTHBv1.js} +2 -2
- package/_assets/send-gasless-transaction-Daukbk69.js +2 -0
- package/_assets/{send-transaction-CboskMcL.js → send-transaction-kmfCvyrI.js} +2 -2
- package/_assets/{sendMetaTransaction-DfeiXpP_.js → sendMetaTransaction-BA-2MGdZ.js} +1 -1
- package/_assets/{sendRawTransaction-BgAwN3aK.js → sendRawTransaction-CTjGjbSv.js} +3 -3
- package/_assets/{sentry-B35L1FdR.js → sentry-DvOx8Rfb.js} +1 -1
- package/_assets/{serializeTransaction-Cn_3vzYE.js → serializeTransaction-BmaoI9rx.js} +1 -1
- package/_assets/{session-proposal-B7rpIMJh.js → session-proposal-nGkLb8fO.js} +1 -1
- package/_assets/{session-request--BJtbaZK.js → session-request-QSI6Jos8.js} +2 -2
- package/_assets/{sha256-NdAeiB0X.js → sha256-Dx4Jqb1P.js} +1 -1
- package/_assets/{signing-DiwulEsw.js → signing-VekuwpLK.js} +3 -3
- package/_assets/{socials-054eJtzB.js → socials-BkZgS9yz.js} +1 -1
- package/_assets/{swaps-BPYOHTwx.js → swaps-CAZTnQ-D.js} +1 -1
- package/_assets/{thirdweb-bX_k_ayM.js → thirdweb-Xk7WShny.js} +3 -3
- package/_assets/{to-serializable-transaction-caU-fqUx.js → to-serializable-transaction-C5BoASVF.js} +2 -2
- package/_assets/{totalSupply-BVfGieGk.js → totalSupply-CLQexq9U.js} +1 -1
- package/_assets/{trade-encoding-CXbhpVj8.js → trade-encoding-DgV-A2zO.js} +1 -1
- package/_assets/{transaction-8aHmZ7ni.js → transaction-ToPxlTkC.js} +1 -1
- package/_assets/{transactionReceipt-BzQM-iWX.js → transactionReceipt-BHGI1PBX.js} +1 -1
- package/_assets/{transactions-UfEKiBWb.js → transactions-paKZZL-W.js} +1 -1
- package/_assets/useCreditPacks-CaE-vAPX.js +1 -0
- package/_assets/useInfiniteGrid-CeEt3Zid.js +1 -0
- package/_assets/useManaRate-D4_9UlI5.js +1 -0
- package/_assets/{useSecondarySales-BUPg_0HB.js → useSecondarySales-3tEx5YvY.js} +1 -1
- package/_assets/{useStore-j0moew7P.js → useStore-ByHpJuVH.js} +2 -2
- package/_assets/useTheme-xAwBEFWH.js +1 -0
- package/_assets/{utils-jd03xFBb.js → utils-BgbaLlfC.js} +1 -1
- package/_assets/{verifyHash-BlPjp8uI.js → verifyHash-uE8nq1-h.js} +1 -1
- package/_assets/{w3m-modal-CJSqLQbS.js → w3m-modal-BWkASM7Q.js} +1 -1
- package/_assets/{w3m-modal-B1fkdBpv.js → w3m-modal-CIhzAZkD.js} +1 -1
- package/_assets/{wait-for-tx-receipt-nJ13gHYr.js → wait-for-tx-receipt-Ban9Kz9f.js} +1 -1
- package/_assets/{wallets-BfXeGzQ3.js → wallets-COZ4xX__.js} +5 -5
- package/_assets/{web-connector-D6DeRRYN.js → web-connector-gi_cmfjU.js} +3 -3
- package/_assets/{writeContract-D1XhZg5B.js → writeContract-MVlwq6Xg.js} +1 -1
- package/_assets/{zora-sepolia-Bt1F-uU9.js → zora-sepolia-BOt0KLBF.js} +1 -1
- package/_assets/{zoraTestnet-YWrqaPWn.js → zoraTestnet-BcRH2RHD.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Collection-CP0tfCsZ.js +0 -119
- package/_assets/Creator-CWs_Cx5f.js +0 -306
- package/_assets/ImportListings-DryzCKJV.js +0 -447
- package/_assets/LoadMore-BsvftUzw.js +0 -7
- package/_assets/MyAssets-OTnYju0y.js +0 -258
- package/_assets/StoreSettings-2jXFUoeV.js +0 -253
- package/_assets/Success-2HbLWhw3.js +0 -276
- package/_assets/decimals-CTAJwKFW.js +0 -1
- package/_assets/emotion-styled.browser.esm-C5sYTDtN.js +0 -1
- package/_assets/estimate-l1-fee-BYqkQ2bZ.js +0 -1
- package/_assets/eth_estimateGas-BfIHMLbI.js +0 -1
- package/_assets/eth_getTransactionCount-CmmgCgZ1.js +0 -1
- package/_assets/get-ecosystem-wallet-info-43Mjiw6m.js +0 -1
- package/_assets/getNFT-bNpY4yta.js +0 -1
- package/_assets/import-DbH_aWZX.js +0 -1
- package/_assets/index-9H7pG6F1.js +0 -1
- package/_assets/index-B3FH4SmC.js +0 -1
- package/_assets/index-CVMO2zcQ.js +0 -2
- package/_assets/index-Cn-oc3fB.js +0 -2835
- package/_assets/parseNft-yDYimY68.js +0 -2
- package/_assets/send-gasless-transaction-CCblCzAN.js +0 -2
- package/_assets/useCreditPacks-Ceg0Oam0.js +0 -1
- package/_assets/useInfiniteGrid-YGnKZcnB.js +0 -1
- package/_assets/useManaRate-BhMxx3e3.js +0 -1
- package/_assets/useTheme-cGCeJmwR.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b7 as ot,bh as Re,b9 as te,ba as Xt,cw as Gr,aQ as Ur,ak as Oe,ax as pt,aR as de,aU as Lr,cx as Dr,ao as Cr,z as $r,y as Hr,x as Vr,az as Rr,cy as jr,cz as Fr,aD as zr,aF as Tr}from"./sendRawTransaction-BgAwN3aK.js";import{e as Nr}from"./hashTypedData-DaCcjWXS.js";import{ag as ae,af as z,aj as _r,B as I,a3 as un,a7 as qe,am as kr}from"./NetworkUtil-HlUKXKcF.js";import{g as Mr,r as Zr}from"./verifyHash-BlPjp8uI.js";import{d as qr,s as yt}from"./parseSignature-Zp5jbuFC.js";import{o as Kr,f as Yr,c as Xr}from"./custom-DMjRmtpL.js";async function Wr(e,t){var f;const{account:r=e.account,chainId:n,nonce:a}=t;if(!r)throw new ot({docsPath:"/docs/eip7702/prepareAuthorization"});const i=Re(r),s=(()=>{if(t.executor)return t.executor==="self"?t.executor:Re(t.executor)})(),o={address:t.contractAddress??t.address,chainId:n,nonce:a};return typeof o.chainId>"u"&&(o.chainId=((f=e.chain)==null?void 0:f.id)??await te(e,Xt,"getChainId")({})),typeof o.nonce>"u"&&(o.nonce=await te(e,Gr,"getTransactionCount")({address:i.address,blockTag:"pending"}),(s==="self"||s!=null&&s.address&&Ur(s.address,i.address))&&(o.nonce+=1)),o}const us=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],ds="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";function Dn(e,t={}){const{forHash:r}=t,{authorization:n,factory:a,factoryData:i}=e;return r&&(a==="0x7702"||a==="0x7702000000000000000000000000000000000000")?n?Oe([n.address,i??"0x"]):"0x7702000000000000000000000000000000000000":a?Oe([a,i??"0x"]):"0x"}const dn="0x22e325a297439656";function Cn(e,t={}){const{callGasLimit:r,callData:n,maxPriorityFeePerGas:a,maxFeePerGas:i,paymaster:s,paymasterData:o,paymasterPostOpGasLimit:f,paymasterSignature:c,paymasterVerificationGasLimit:y,sender:m,signature:u="0x",verificationGasLimit:l}=e,d=Oe([ae(z(l||0n),{size:16}),ae(z(r||0n),{size:16})]),w=Dn(e,t),P=Oe([ae(z(a||0n),{size:16}),ae(z(i||0n),{size:16})]),U=e.nonce??0n,$=s?Oe([s,ae(z(y||0n),{size:16}),ae(z(f||0n),{size:16}),o||"0x",...c?t.forHash?[dn]:[c,ae(z(_r(c)),{size:2}),dn]:[]]):"0x",v=e.preVerificationGas??0n;return{accountGasLimits:d,callData:n,initCode:w,gasFees:P,nonce:U,paymasterAndData:$,preVerificationGas:v,sender:m,signature:u}}const Jr={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};function Qr(e){const{chainId:t,entryPointAddress:r,userOperation:n}=e,a=Cn(n,{forHash:!0});return{types:Jr,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:r},message:a}}function ls(e){const{chainId:t,entryPointAddress:r,entryPointVersion:n}=e,a=e.userOperation,{authorization:i,callData:s="0x",callGasLimit:o,maxFeePerGas:f,maxPriorityFeePerGas:c,nonce:y,paymasterAndData:m="0x",preVerificationGas:u,sender:l,verificationGasLimit:d}=a;if(n==="0.8"||n==="0.9")return Nr(Qr({chainId:t,entryPointAddress:r,userOperation:a}));const w=(()=>{var P,U;if(n==="0.6"){const $=(P=a.initCode)==null?void 0:P.slice(0,42),v=(U=a.initCode)==null?void 0:U.slice(42),R=Dn({authorization:i,factory:$,factoryData:v},{forHash:!0});return pt([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[l,y,de(R),de(s),o,d,u,f,c,de(m)])}if(n==="0.7"){const $=Cn(a,{forHash:!0});return pt([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[$.sender,$.nonce,de($.initCode),de($.callData),$.accountGasLimits,$.preVerificationGas,$.gasFees,de($.paymasterAndData)])}throw new Error(`entryPointVersion "${n}" not supported.`)})();return de(pt([{type:"bytes32"},{type:"address"},{type:"uint256"}],[de(w),r,BigInt(t)]))}async function ps(e){const{extend:t,nonceKeyManager:r=qr({source:{get(){return Date.now()},set(){}}}),...n}=e;let a=!1;const i=await e.getAddress();return{...t,...n,address:i,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(s){const o=(s==null?void 0:s.key)??BigInt(await r.consume({address:i,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...s,key:o}):await Zr(e.client,{abi:Lr(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[i,o]})},async isDeployed(){return a?!0:(a=!!await te(e.client,Mr,"getCode")({address:i}),a)},...e.sign?{async sign(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.sign(s)]);return o&&f?yt({address:o,data:f,signature:c}):c}}:{},async signMessage(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.signMessage(s)]);return o&&f&&o!=="0x7702"?yt({address:o,data:f,signature:c}):c},async signTypedData(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.signTypedData(s)]);return o&&f&&o!=="0x7702"?yt({address:o,data:f,signature:c}):c},type:"smart"}}class Ot extends I{constructor({cause:t}){super("Smart Account is not deployed.",{cause:t,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(Ot,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class De extends I{constructor({cause:t,data:r,message:n}={}){var i;const a=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${a?`with reason: ${a}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r}}Object.defineProperty(De,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521});Object.defineProperty(De,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Bt extends I{constructor({cause:t}){super("Failed to send funds to beneficiary.",{cause:t,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(Bt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class Pt extends I{constructor({cause:t}){super("Gas value overflowed.",{cause:t,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(Pt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class St extends I{constructor({cause:t}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:t,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(St,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class At extends I{constructor({cause:t,factory:r,factoryData:n,initCode:a}){super("Failed to simulate deployment for Smart Account.",{cause:t,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)",`- Smart Account deployment execution reverted with an error
|
|
1
|
+
import{b7 as ot,bh as Re,b9 as te,ba as Xt,cw as Gr,aQ as Ur,ak as Oe,ax as pt,aR as de,aU as Lr,cx as Dr,ao as Cr,z as $r,y as Hr,x as Vr,az as Rr,cy as jr,cz as Fr,aD as zr,aF as Tr}from"./sendRawTransaction-CTjGjbSv.js";import{e as Nr}from"./hashTypedData-2Z2_gEL6.js";import{ag as ae,af as z,aj as _r,B as I,a3 as un,a7 as qe,am as kr}from"./NetworkUtil-Dh3JWXso.js";import{g as Mr,r as Zr}from"./verifyHash-uE8nq1-h.js";import{d as qr,s as yt}from"./parseSignature-B4bdR_8K.js";import{o as Kr,f as Yr,c as Xr}from"./custom-DJvYgxJy.js";async function Wr(e,t){var f;const{account:r=e.account,chainId:n,nonce:a}=t;if(!r)throw new ot({docsPath:"/docs/eip7702/prepareAuthorization"});const i=Re(r),s=(()=>{if(t.executor)return t.executor==="self"?t.executor:Re(t.executor)})(),o={address:t.contractAddress??t.address,chainId:n,nonce:a};return typeof o.chainId>"u"&&(o.chainId=((f=e.chain)==null?void 0:f.id)??await te(e,Xt,"getChainId")({})),typeof o.nonce>"u"&&(o.nonce=await te(e,Gr,"getTransactionCount")({address:i.address,blockTag:"pending"}),(s==="self"||s!=null&&s.address&&Ur(s.address,i.address))&&(o.nonce+=1)),o}const us=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],ds="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";function Dn(e,t={}){const{forHash:r}=t,{authorization:n,factory:a,factoryData:i}=e;return r&&(a==="0x7702"||a==="0x7702000000000000000000000000000000000000")?n?Oe([n.address,i??"0x"]):"0x7702000000000000000000000000000000000000":a?Oe([a,i??"0x"]):"0x"}const dn="0x22e325a297439656";function Cn(e,t={}){const{callGasLimit:r,callData:n,maxPriorityFeePerGas:a,maxFeePerGas:i,paymaster:s,paymasterData:o,paymasterPostOpGasLimit:f,paymasterSignature:c,paymasterVerificationGasLimit:y,sender:m,signature:u="0x",verificationGasLimit:l}=e,d=Oe([ae(z(l||0n),{size:16}),ae(z(r||0n),{size:16})]),w=Dn(e,t),P=Oe([ae(z(a||0n),{size:16}),ae(z(i||0n),{size:16})]),U=e.nonce??0n,$=s?Oe([s,ae(z(y||0n),{size:16}),ae(z(f||0n),{size:16}),o||"0x",...c?t.forHash?[dn]:[c,ae(z(_r(c)),{size:2}),dn]:[]]):"0x",v=e.preVerificationGas??0n;return{accountGasLimits:d,callData:n,initCode:w,gasFees:P,nonce:U,paymasterAndData:$,preVerificationGas:v,sender:m,signature:u}}const Jr={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};function Qr(e){const{chainId:t,entryPointAddress:r,userOperation:n}=e,a=Cn(n,{forHash:!0});return{types:Jr,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:r},message:a}}function ls(e){const{chainId:t,entryPointAddress:r,entryPointVersion:n}=e,a=e.userOperation,{authorization:i,callData:s="0x",callGasLimit:o,maxFeePerGas:f,maxPriorityFeePerGas:c,nonce:y,paymasterAndData:m="0x",preVerificationGas:u,sender:l,verificationGasLimit:d}=a;if(n==="0.8"||n==="0.9")return Nr(Qr({chainId:t,entryPointAddress:r,userOperation:a}));const w=(()=>{var P,U;if(n==="0.6"){const $=(P=a.initCode)==null?void 0:P.slice(0,42),v=(U=a.initCode)==null?void 0:U.slice(42),R=Dn({authorization:i,factory:$,factoryData:v},{forHash:!0});return pt([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[l,y,de(R),de(s),o,d,u,f,c,de(m)])}if(n==="0.7"){const $=Cn(a,{forHash:!0});return pt([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[$.sender,$.nonce,de($.initCode),de($.callData),$.accountGasLimits,$.preVerificationGas,$.gasFees,de($.paymasterAndData)])}throw new Error(`entryPointVersion "${n}" not supported.`)})();return de(pt([{type:"bytes32"},{type:"address"},{type:"uint256"}],[de(w),r,BigInt(t)]))}async function ps(e){const{extend:t,nonceKeyManager:r=qr({source:{get(){return Date.now()},set(){}}}),...n}=e;let a=!1;const i=await e.getAddress();return{...t,...n,address:i,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(s){const o=(s==null?void 0:s.key)??BigInt(await r.consume({address:i,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...s,key:o}):await Zr(e.client,{abi:Lr(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[i,o]})},async isDeployed(){return a?!0:(a=!!await te(e.client,Mr,"getCode")({address:i}),a)},...e.sign?{async sign(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.sign(s)]);return o&&f?yt({address:o,data:f,signature:c}):c}}:{},async signMessage(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.signMessage(s)]);return o&&f&&o!=="0x7702"?yt({address:o,data:f,signature:c}):c},async signTypedData(s){const[{factory:o,factoryData:f},c]=await Promise.all([this.getFactoryArgs(),e.signTypedData(s)]);return o&&f&&o!=="0x7702"?yt({address:o,data:f,signature:c}):c},type:"smart"}}class Ot extends I{constructor({cause:t}){super("Smart Account is not deployed.",{cause:t,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(Ot,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class De extends I{constructor({cause:t,data:r,message:n}={}){var i;const a=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${a?`with reason: ${a}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r}}Object.defineProperty(De,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521});Object.defineProperty(De,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Bt extends I{constructor({cause:t}){super("Failed to send funds to beneficiary.",{cause:t,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(Bt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class Pt extends I{constructor({cause:t}){super("Gas value overflowed.",{cause:t,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(Pt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class St extends I{constructor({cause:t}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:t,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(St,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class At extends I{constructor({cause:t,factory:r,factoryData:n,initCode:a}){super("Failed to simulate deployment for Smart Account.",{cause:t,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)",`- Smart Account deployment execution reverted with an error
|
|
2
2
|
`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,a&&`initCode: ${a}`].filter(Boolean),name:"InitCodeFailedError"})}}Object.defineProperty(At,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});class It extends I{constructor({cause:t,factory:r,factoryData:n,initCode:a}){super("Smart Account initialization implementation did not create an account.",{cause:t,metaMessages:["This could arise when:","- `factory`/`factoryData` or `initCode` properties are invalid",`- Smart Account initialization implementation is incorrect
|
|
3
3
|
`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,a&&`initCode: ${a}`].filter(Boolean),name:"InitCodeMustCreateSenderError"})}}Object.defineProperty(It,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});class Gt extends I{constructor({cause:t,factory:r,factoryData:n,initCode:a,sender:i}){super("Smart Account initialization implementation does not return the expected sender.",{cause:t,metaMessages:["This could arise when:",`Smart Account initialization implementation does not return a sender address
|
|
4
4
|
`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,a&&`initCode: ${a}`,i&&`sender: ${i}`].filter(Boolean),name:"InitCodeMustReturnSenderError"})}}Object.defineProperty(Gt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});class Ut extends I{constructor({cause:t}){super("Smart Account does not have sufficient funds to execute the User Operation.",{cause:t,metaMessages:["This could arise when:","- the Smart Account does not have sufficient funds to cover the required prefund, or","- a Paymaster was not provided"].filter(Boolean),name:"InsufficientPrefundError"})}}Object.defineProperty(Ut,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});class Lt extends I{constructor({cause:t}){super("Bundler attempted to call an invalid function on the EntryPoint.",{cause:t,name:"InternalCallOnlyError"})}}Object.defineProperty(Lt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});class Dt extends I{constructor({cause:t}){super("Bundler used an invalid aggregator for handling aggregated User Operations.",{cause:t,name:"InvalidAggregatorError"})}}Object.defineProperty(Dt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});class Ct extends I{constructor({cause:t,nonce:r}){super("Invalid Smart Account nonce used for User Operation.",{cause:t,metaMessages:[r&&`nonce: ${r}`].filter(Boolean),name:"InvalidAccountNonceError"})}}Object.defineProperty(Ct,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});class $t extends I{constructor({cause:t}){super("Bundler has not set a beneficiary address.",{cause:t,name:"InvalidBeneficiaryError"})}}Object.defineProperty($t,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});class Ke extends I{constructor({cause:t}){super("Invalid fields set on User Operation.",{cause:t,name:"InvalidFieldsError"})}}Object.defineProperty(Ke,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ht extends I{constructor({cause:t,paymasterAndData:r}){super("Paymaster properties provided are invalid.",{cause:t,metaMessages:["This could arise when:","- the `paymasterAndData` property is of an incorrect length\n",r&&`paymasterAndData: ${r}`].filter(Boolean),name:"InvalidPaymasterAndDataError"})}}Object.defineProperty(Ht,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});class we extends I{constructor({cause:t}){super("Paymaster deposit for the User Operation is too low.",{cause:t,metaMessages:["This could arise when:","- the Paymaster has deposited less than the expected amount via the `deposit` function"].filter(Boolean),name:"PaymasterDepositTooLowError"})}}Object.defineProperty(we,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32508});Object.defineProperty(we,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});class Vt extends I{constructor({cause:t}){super("The `validatePaymasterUserOp` function on the Paymaster reverted.",{cause:t,name:"PaymasterFunctionRevertedError"})}}Object.defineProperty(Vt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});class Rt extends I{constructor({cause:t}){super("The Paymaster contract has not been deployed.",{cause:t,name:"PaymasterNotDeployedError"})}}Object.defineProperty(Rt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});class Ye extends I{constructor({cause:t}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:t,name:"PaymasterRateLimitError"})}}Object.defineProperty(Ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32504});class Xe extends I{constructor({cause:t}){super("UserOperation rejected because paymaster (or signature aggregator) stake or unstake-delay is too low.",{cause:t,name:"PaymasterStakeTooLowError"})}}Object.defineProperty(Xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32505});class jt extends I{constructor({cause:t}){super("Paymaster `postOp` function reverted.",{cause:t,name:"PaymasterPostOpFunctionRevertedError"})}}Object.defineProperty(jt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});class Ft extends I{constructor({cause:t,factory:r,factoryData:n,initCode:a}){super("Smart Account has already been deployed.",{cause:t,metaMessages:["Remove the following properties and try again:",r&&"`factory`",n&&"`factoryData`",a&&"`initCode`"].filter(Boolean),name:"SenderAlreadyConstructedError"})}}Object.defineProperty(Ft,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});class We extends I{constructor({cause:t}){super("UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).",{cause:t,name:"SignatureCheckFailedError"})}}Object.defineProperty(We,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32507});class zt extends I{constructor({cause:t}){super("The `validateUserOp` function on the Smart Account reverted.",{cause:t,name:"SmartAccountFunctionRevertedError"})}}Object.defineProperty(zt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});class Je extends I{constructor({cause:t}){super("UserOperation rejected because account specified unsupported signature aggregator.",{cause:t,name:"UnsupportedSignatureAggregatorError"})}}Object.defineProperty(Je,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32506});class Tt extends I{constructor({cause:t}){super("User Operation expired.",{cause:t,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied"].filter(Boolean),name:"UserOperationExpiredError"})}}Object.defineProperty(Tt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});class Nt extends I{constructor({cause:t}){super("Paymaster for User Operation expired.",{cause:t,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied"].filter(Boolean),name:"UserOperationPaymasterExpiredError"})}}Object.defineProperty(Nt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});class _t extends I{constructor({cause:t}){super("Signature provided for the User Operation is invalid.",{cause:t,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account"].filter(Boolean),name:"UserOperationSignatureError"})}}Object.defineProperty(_t,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});class kt extends I{constructor({cause:t}){super("Signature provided for the User Operation is invalid.",{cause:t,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster"].filter(Boolean),name:"UserOperationPaymasterSignatureError"})}}Object.defineProperty(kt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});class Qe extends I{constructor({cause:t}){super("User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.",{cause:t,name:"UserOperationRejectedByEntryPointError"})}}Object.defineProperty(Qe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32500});class et extends I{constructor({cause:t}){super("User Operation rejected by Paymaster's `validatePaymasterUserOp`.",{cause:t,name:"UserOperationRejectedByPaymasterError"})}}Object.defineProperty(et,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32501});class tt extends I{constructor({cause:t}){super("User Operation rejected with op code validation error.",{cause:t,name:"UserOperationRejectedByOpCodeError"})}}Object.defineProperty(tt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32502});class nt extends I{constructor({cause:t}){super("UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).",{cause:t,name:"UserOperationOutOfTimeRangeError"})}}Object.defineProperty(nt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32503});class ea extends I{constructor({cause:t}){super(`An error occurred while executing user operation: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownBundlerError"})}}class Mt extends I{constructor({cause:t}){super("User Operation verification gas limit exceeded.",{cause:t,metaMessages:["This could arise when:","- the gas used for verification exceeded the `verificationGasLimit`"].filter(Boolean),name:"VerificationGasLimitExceededError"})}}Object.defineProperty(Mt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});class Zt extends I{constructor({cause:t}){super("User Operation verification gas limit is too low.",{cause:t,metaMessages:["This could arise when:","- the `verificationGasLimit` is too low to verify the User Operation"].filter(Boolean),name:"VerificationGasLimitTooLowError"})}}Object.defineProperty(Zt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/});class ta extends I{constructor(t,{callData:r,callGasLimit:n,docsPath:a,factory:i,factoryData:s,initCode:o,maxFeePerGas:f,maxPriorityFeePerGas:c,nonce:y,paymaster:m,paymasterAndData:u,paymasterData:l,paymasterPostOpGasLimit:d,paymasterVerificationGasLimit:w,preVerificationGas:P,sender:U,signature:$,verificationGasLimit:v}){const R=Dr({callData:r,callGasLimit:n,factory:i,factoryData:s,initCode:o,maxFeePerGas:typeof f<"u"&&`${un(f)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${un(c)} gwei`,nonce:y,paymaster:m,paymasterAndData:u,paymasterData:l,paymasterPostOpGasLimit:d,paymasterVerificationGasLimit:w,preVerificationGas:P,sender:U,signature:$,verificationGasLimit:v});super(t.shortMessage,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",R].filter(Boolean),name:"UserOperationExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class na extends I{constructor({hash:t}){super(`User Operation receipt with hash "${t}" could not be found. The User Operation may not have been processed yet.`,{name:"UserOperationReceiptNotFoundError"})}}class ra extends I{constructor({hash:t}){super(`User Operation with hash "${t}" could not be found.`,{name:"UserOperationNotFoundError"})}}class ln extends I{constructor({hash:t}){super(`Timed out while waiting for User Operation with hash "${t}" to be confirmed.`,{name:"WaitForUserOperationReceiptTimeoutError"})}}const aa=[De,Ke,we,Ye,Xe,We,Je,nt,Qe,et,tt];function ia(e,t){const r=(e.details||"").toLowerCase();if(Ot.message.test(r))return new Ot({cause:e});if(Bt.message.test(r))return new Bt({cause:e});if(Pt.message.test(r))return new Pt({cause:e});if(St.message.test(r))return new St({cause:e});if(At.message.test(r))return new At({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(It.message.test(r))return new It({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(Gt.message.test(r))return new Gt({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode,sender:t.sender});if(Ut.message.test(r))return new Ut({cause:e});if(Lt.message.test(r))return new Lt({cause:e});if(Ct.message.test(r))return new Ct({cause:e,nonce:t.nonce});if(Dt.message.test(r))return new Dt({cause:e});if($t.message.test(r))return new $t({cause:e});if(Ht.message.test(r))return new Ht({cause:e});if(we.message.test(r))return new we({cause:e});if(Vt.message.test(r))return new Vt({cause:e});if(Rt.message.test(r))return new Rt({cause:e});if(jt.message.test(r))return new jt({cause:e});if(zt.message.test(r))return new zt({cause:e});if(Ft.message.test(r))return new Ft({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(Tt.message.test(r))return new Tt({cause:e});if(Nt.message.test(r))return new Nt({cause:e});if(kt.message.test(r))return new kt({cause:e});if(_t.message.test(r))return new _t({cause:e});if(Mt.message.test(r))return new Mt({cause:e});if(Zt.message.test(r))return new Zt({cause:e});const n=e.walk(a=>aa.some(i=>i.code===a.code));if(n){if(n.code===De.code)return new De({cause:e,data:n.data,message:n.details});if(n.code===Ke.code)return new Ke({cause:e});if(n.code===we.code)return new we({cause:e});if(n.code===Ye.code)return new Ye({cause:e});if(n.code===Xe.code)return new Xe({cause:e});if(n.code===We.code)return new We({cause:e});if(n.code===Je.code)return new Je({cause:e});if(n.code===nt.code)return new nt({cause:e});if(n.code===Qe.code)return new Qe({cause:e});if(n.code===et.code)return new et({cause:e});if(n.code===tt.code)return new tt({cause:e})}return new ea({cause:e})}function $n(e,{calls:t,docsPath:r,...n}){const a=(()=>{const i=ia(e,n);if(t&&i instanceof De){const s=sa(i),o=t==null?void 0:t.filter(f=>f.abi);if(s&&o.length>0)return oa({calls:o,revertData:s})}return i})();return new ta(a,{docsPath:r,...n})}function sa(e){let t;return e.walk(r=>{var a,i,s,o;const n=r;if(typeof n.data=="string"||typeof((a=n.data)==null?void 0:a.revertData)=="string"||!(n instanceof I)&&typeof n.message=="string"){const f=(o=(s=((i=n.data)==null?void 0:i.revertData)||n.data||n.message).match)==null?void 0:o.call(s,/(0x[A-Za-z0-9]*)/);if(f)return t=f[1],!0}return!1}),t}function oa(e){const{calls:t,revertData:r}=e,{abi:n,functionName:a,args:i,to:s}=(()=>{const f=t==null?void 0:t.filter(y=>!!y.abi);if(f.length===1)return f[0];const c=f.filter(y=>{try{return!!Cr({abi:y.abi,data:r})}catch{return!1}});return c.length===1?c[0]:{abi:[],functionName:f.reduce((y,m)=>`${y?`${y} | `:""}${m.functionName}`,""),args:void 0,to:void 0}})(),o=r==="0x"?new $r({functionName:a}):new Hr({abi:n,data:r,functionName:a});return new Vr(o,{abi:n,args:i,contractAddress:s,functionName:a})}function fa(e){const t={};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),t}function ft(e){const t={};return typeof e.callData<"u"&&(t.callData=e.callData),typeof e.callGasLimit<"u"&&(t.callGasLimit=z(e.callGasLimit)),typeof e.factory<"u"&&(t.factory=e.factory),typeof e.factoryData<"u"&&(t.factoryData=e.factoryData),typeof e.initCode<"u"&&(t.initCode=e.initCode),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=z(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=z(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=z(e.nonce)),typeof e.paymaster<"u"&&(t.paymaster=e.paymaster),typeof e.paymasterAndData<"u"&&(t.paymasterAndData=e.paymasterAndData||"0x"),typeof e.paymasterData<"u"&&(t.paymasterData=e.paymasterData),typeof e.paymasterPostOpGasLimit<"u"&&(t.paymasterPostOpGasLimit=z(e.paymasterPostOpGasLimit)),typeof e.paymasterSignature<"u"&&(t.paymasterSignature=e.paymasterSignature),typeof e.paymasterVerificationGasLimit<"u"&&(t.paymasterVerificationGasLimit=z(e.paymasterVerificationGasLimit)),typeof e.preVerificationGas<"u"&&(t.preVerificationGas=z(e.preVerificationGas)),typeof e.sender<"u"&&(t.sender=e.sender),typeof e.signature<"u"&&(t.signature=e.signature),typeof e.verificationGasLimit<"u"&&(t.verificationGasLimit=z(e.verificationGasLimit)),typeof e.authorization<"u"&&(t.eip7702Auth=ca(e.authorization)),t}function ca(e){return{address:e.address,chainId:z(e.chainId),nonce:z(e.nonce),r:e.r?z(BigInt(e.r),{size:32}):ae("0x",{size:32}),s:e.s?z(BigInt(e.s),{size:32}):ae("0x",{size:32}),yParity:e.yParity?z(e.yParity,{size:1}):ae("0x",{size:32})}}async function ua(e,t){const{chainId:r,entryPointAddress:n,context:a,...i}=t,s=ft(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:f,...c}=await e.request({method:"pm_getPaymasterData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},n,z(r),a]});return{...c,...o&&{paymasterPostOpGasLimit:qe(o)},...f&&{paymasterVerificationGasLimit:qe(f)}}}async function da(e,t){const{chainId:r,entryPointAddress:n,context:a,...i}=t,s=ft(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:f,...c}=await e.request({method:"pm_getPaymasterStubData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},n,z(r),a]});return{...c,...o&&{paymasterPostOpGasLimit:qe(o)},...f&&{paymasterVerificationGasLimit:qe(f)}}}const la=["factory","fees","gas","paymaster","nonce","signature","authorization"];async function Wt(e,t){var Q,T;const r=t,{account:n=e.account,dataSuffix:a=typeof e.dataSuffix=="string"?e.dataSuffix:(Q=e.dataSuffix)==null?void 0:Q.value,parameters:i=la,stateOverride:s}=r;if(!n)throw new ot;const o=Re(n),f=e,c=r.paymaster??(f==null?void 0:f.paymaster),y=typeof c=="string"?c:void 0,{getPaymasterStubData:m,getPaymasterData:u}=(()=>{if(c===!0)return{getPaymasterStubData:g=>te(f,da,"getPaymasterStubData")(g),getPaymasterData:g=>te(f,ua,"getPaymasterData")(g)};if(typeof c=="object"){const{getPaymasterStubData:g,getPaymasterData:C}=c;return{getPaymasterStubData:C&&g?g:C,getPaymasterData:C&&g?C:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),l=r.paymasterContext?r.paymasterContext:f==null?void 0:f.paymasterContext;let d={...r,paymaster:y,sender:o.address};const[w,P,U,$,v]=await Promise.all([(async()=>r.calls?o.encodeCalls(r.calls.map(g=>{const C=g;return C.abi?{data:Rr(C),to:C.to,value:C.value}:C})):r.callData)(),(async()=>{if(!i.includes("factory"))return;if(r.initCode)return{initCode:r.initCode};if(r.factory&&r.factoryData)return{factory:r.factory,factoryData:r.factoryData};const{factory:g,factoryData:C}=await o.getFactoryArgs();return o.entryPoint.version==="0.6"?{initCode:g&&C?Oe([g,C]):void 0}:{factory:g,factoryData:C}})(),(async()=>{var g;if(i.includes("fees")){if(typeof r.maxFeePerGas=="bigint"&&typeof r.maxPriorityFeePerGas=="bigint")return d;if((g=f==null?void 0:f.userOperation)!=null&&g.estimateFeesPerGas){const C=await f.userOperation.estimateFeesPerGas({account:o,bundlerClient:f,userOperation:d});return{...d,...C}}try{const C=f.client??e,M=await te(C,jr,"estimateFeesPerGas")({chain:C.chain,type:"eip1559"});return{maxFeePerGas:typeof r.maxFeePerGas=="bigint"?r.maxFeePerGas:BigInt(2n*M.maxFeePerGas),maxPriorityFeePerGas:typeof r.maxPriorityFeePerGas=="bigint"?r.maxPriorityFeePerGas:BigInt(2n*M.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(i.includes("nonce"))return typeof r.nonce=="bigint"?r.nonce:o.getNonce()})(),(async()=>{if(i.includes("authorization")){if(typeof r.authorization=="object")return r.authorization;if(o.authorization&&!await o.isDeployed())return{...await Wr(o.client,o.authorization),r:"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000",s:"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",yParity:1}}})()]);typeof w<"u"&&(d.callData=a?Oe([w,a]):w),typeof P<"u"&&(d={...d,...P}),typeof U<"u"&&(d={...d,...U}),typeof $<"u"&&(d.nonce=$),typeof v<"u"&&(d.authorization=v),i.includes("signature")&&(typeof r.signature<"u"?d.signature=r.signature:d.signature=await o.getStubSignature(d)),o.entryPoint.version==="0.6"&&!d.initCode&&(d.initCode="0x");let R;async function k(){return R||(e.chain?e.chain.id:(R=await te(e,Xt,"getChainId")({}),R))}let ne=!1;if(i.includes("paymaster")&&m&&!y&&!r.paymasterAndData){const{isFinal:g=!1,sponsor:C,...M}=await m({chainId:await k(),entryPointAddress:o.entryPoint.address,context:l,...d});ne=g,d={...d,...M}}if(o.entryPoint.version==="0.6"&&!d.paymasterAndData&&(d.paymasterAndData="0x"),i.includes("gas")){if((T=o.userOperation)!=null&&T.estimateGas){const g=await o.userOperation.estimateGas(d);d={...d,...g}}if(typeof d.callGasLimit>"u"||typeof d.preVerificationGas>"u"||typeof d.verificationGasLimit>"u"||d.paymaster&&typeof d.paymasterPostOpGasLimit>"u"||d.paymaster&&typeof d.paymasterVerificationGasLimit>"u"){const g=await te(f,Hn,"estimateUserOperationGas")({account:o,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:s,...d.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...d});d={...d,callGasLimit:d.callGasLimit??g.callGasLimit,preVerificationGas:d.preVerificationGas??g.preVerificationGas,verificationGasLimit:d.verificationGasLimit??g.verificationGasLimit,paymasterPostOpGasLimit:d.paymasterPostOpGasLimit??g.paymasterPostOpGasLimit,paymasterVerificationGasLimit:d.paymasterVerificationGasLimit??g.paymasterVerificationGasLimit}}}if(i.includes("paymaster")&&u&&!y&&!r.paymasterAndData&&!ne){const g=await u({chainId:await k(),entryPointAddress:o.entryPoint.address,context:l,...d});d={...d,...g}}return delete d.calls,delete d.parameters,delete d.paymasterContext,typeof d.paymaster!="string"&&delete d.paymaster,d}async function Hn(e,t){var f;const{account:r=e.account,entryPointAddress:n,stateOverride:a}=t;if(!r&&!t.sender)throw new ot;const i=r?Re(r):void 0,s=Fr(a),o=i?await te(e,Wt,"prepareUserOperation")({...t,parameters:["authorization","factory","nonce","paymaster","signature","maxFeePerGas","maxPriorityFeePerGas"]}):t;try{const c=[ft(o),n??((f=i==null?void 0:i.entryPoint)==null?void 0:f.address)],y=await e.request({method:"eth_estimateUserOperationGas",params:s?[...c,s]:[...c]});return fa(y)}catch(c){const y=t.calls;throw $n(c,{...o,...y?{calls:y}:{}})}}function pa(e){return e.request({method:"eth_supportedEntryPoints"})}function ya(e){const t={...e};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.maxFeePerGas&&(t.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.nonce&&(t.nonce=BigInt(e.nonce)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),t}async function ma(e,{hash:t}){const r=await e.request({method:"eth_getUserOperationByHash",params:[t]},{dedupe:!0});if(!r)throw new ra({hash:t});const{blockHash:n,blockNumber:a,entryPoint:i,transactionHash:s,userOperation:o}=r;return{blockHash:n,blockNumber:BigInt(a),entryPoint:i,transactionHash:s,userOperation:ya(o)}}function ha(e){const t={...e};return e.actualGasCost&&(t.actualGasCost=BigInt(e.actualGasCost)),e.actualGasUsed&&(t.actualGasUsed=BigInt(e.actualGasUsed)),e.logs&&(t.logs=e.logs.map(r=>zr(r))),e.receipt&&(t.receipt=Tr(t.receipt)),t}async function Vn(e,{hash:t}){const r=await e.request({method:"eth_getUserOperationReceipt",params:[t]},{dedupe:!0});if(!r)throw new na({hash:t});return ha(r)}async function ba(e,t){var f,c;const{account:r=e.account,entryPointAddress:n}=t;if(!r&&!t.sender)throw new ot;const a=r?Re(r):void 0,i=a?await te(e,Wt,"prepareUserOperation")(t):t,s=t.signature||await((f=a==null?void 0:a.signUserOperation)==null?void 0:f.call(a,i)),o=ft({...i,signature:s});try{return await e.request({method:"eth_sendUserOperation",params:[o,n??((c=a==null?void 0:a.entryPoint)==null?void 0:c.address)]},{retryCount:0})}catch(y){const m=t.calls;throw $n(y,{...i,...m?{calls:m}:{},signature:s})}}function ga(e,t){const{hash:r,pollingInterval:n=e.pollingInterval,retryCount:a,timeout:i=12e4}=t;let s=0;const o=kr(["waitForUserOperationReceipt",e.uid,r]);return new Promise((f,c)=>{const y=Kr(o,{resolve:f,reject:c},m=>{const u=w=>{d(),w(),y()},l=i?setTimeout(()=>u(()=>m.reject(new ln({hash:r}))),i):void 0,d=Yr(async()=>{a&&s>=a&&(clearTimeout(l),u(()=>m.reject(new ln({hash:r}))));try{const w=await te(e,Vn,"getUserOperationReceipt")({hash:r});clearTimeout(l),u(()=>m.resolve(w))}catch(w){const P=w;P.name!=="UserOperationReceiptNotFoundError"&&(clearTimeout(l),u(()=>m.reject(P)))}s++},{emitOnBegin:!0,interval:n});return d})})}function wa(e){return{estimateUserOperationGas:t=>Hn(e,t),getChainId:()=>Xt(e),getSupportedEntryPoints:()=>pa(e),getUserOperation:t=>ma(e,t),getUserOperationReceipt:t=>Vn(e,t),prepareUserOperation:t=>Wt(e,t),sendUserOperation:t=>ba(e,t),waitForUserOperationReceipt:t=>ga(e,t)}}function ys(e){const{client:t,dataSuffix:r,key:n="bundler",name:a="Bundler Client",paymaster:i,paymasterContext:s,transport:o,userOperation:f}=e;return Object.assign(Xr({...e,chain:e.chain??(t==null?void 0:t.chain),key:n,name:a,transport:o,type:"bundlerClient"}),{client:t,dataSuffix:r??(t==null?void 0:t.dataSuffix),paymaster:i,paymasterContext:s,userOperation:f}).extend(wa)}const xa="0.1.1";function Ea(){return xa}class V extends Error{constructor(t,r={}){const n=(()=>{var f;if(r.cause instanceof V){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return(f=r.cause)!=null&&f.message?r.cause.message:r.details})(),a=r.cause instanceof V&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${a??""}`,o=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||a?["",n?`Details: ${n}`:void 0,a?`See: ${s}`:void 0]:[]].filter(f=>typeof f=="string").join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,C as o,
|
|
1
|
+
import{a as s,C as o,o as h,c as v}from"./index-BiIZh9R9.js";import{M,E as k,s as y}from"./sendMetaTransaction-BA-2MGdZ.js";import{c as _,C as i,M as E,Z as A,J as b,I as x}from"./ethers-rFeF6PNV.js";const w="".trim().toLowerCase(),d={enabled:w!=="0"&&w!=="false",relayerUrl:"https://transactions-api.decentraland.zone/v1"};function B(){return d.enabled}var T=(e=>(e.Allowance="allowance",e.Approval="approval",e.Minter="minter",e))(T||{});const l=["function allowance(address owner, address spender) view returns (uint256)","function approve(address spender, uint256 amount) returns (bool)"],p=["function isApprovedForAll(address owner, address operator) view returns (bool)","function setApprovalForAll(address operator, bool approved)"],u=["function globalMinters(address minter) view returns (bool)","function setMinters(address[] minters, bool[] values)"],f=E;function g(){return new b(v.rpcUrl)}const D={chainId:"0x13882",chainName:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology"],blockExplorerUrls:["https://amoy.polygonscan.com"]};async function L(e,n){if((await e.getNetwork()).chainId===n)return;const t=_(n);try{await e.send("wallet_switchEthereumChain",[{chainId:t}])}catch(r){if(r.code===4902&&n===80002)await e.send("wallet_addEthereumChain",[D]);else throw r}}async function z(e,n){const a=g();switch(e.kind){case"allowance":return(await new i(e.contractAddress,l,a).allowance(n,e.spenderAddress)).gt(0);case"approval":return new i(e.contractAddress,p,a).isApprovedForAll(n,e.spenderAddress);case"minter":{const t=new i(e.contractAddress,u,a);try{return await t.globalMinters(e.spenderAddress)}catch{return!1}}}}function N(e){return e.kind==="allowance"?s(o.MANAToken,e.chainId):{...s(o.ERC721CollectionV2,e.chainId),address:e.contractAddress}}function O(e,n){const a=new x(e.kind==="allowance"?l:e.kind==="approval"?p:u);switch(e.kind){case"allowance":return a.encodeFunctionData("approve",[e.spenderAddress,n?f:A]);case"approval":return a.encodeFunctionData("setApprovalForAll",[e.spenderAddress,n]);case"minter":return a.encodeFunctionData("setMinters",[[e.spenderAddress],[n]])}}const F=new Set(["eth_signTypedData_v4","eth_signTypedData","eth_sign","personal_sign","eth_requestAccounts","eth_accounts","eth_chainId"]);function R(e,n){return{send:(a,t=[])=>F.has(a)?e.send(a,t):n.send(a,t)}}async function S(e,n,a){const t=O(e,a),r=N(e),c=g(),m=R(n.provider,c),C=await y(m,c,t,r,{serverURL:d.relayerUrl});await c.waitForTransaction(C,1,12e4)}async function P(e){const{auth:n,signer:a,active:t}=e;if(d.enabled)try{await S(n,a,t);return}catch(r){if(r instanceof M&&r.code===k.USER_DENIED)throw r;console.warn("[authorizations] gasless meta-tx failed, falling back to a direct tx:",r)}switch(await L(a.provider,n.chainId),n.kind){case"allowance":{await(await new i(n.contractAddress,l,a).approve(n.spenderAddress,t?f:A)).wait();return}case"approval":{await(await new i(n.contractAddress,p,a).setApprovalForAll(n.spenderAddress,t)).wait();return}case"minter":{await(await new i(n.contractAddress,u,a).setMinters([n.spenderAddress],[t])).wait();return}}}async function W(e){const n=await e.signer.getAddress();await z(e.auth,n)||await P({auth:e.auth,signer:e.signer,active:!0})}function H(e,n){return h(e)&&!n}function J(e,n){return{kind:"allowance",contractAddress:s(o.MANAToken,e).address,spenderAddress:n,chainId:e}}function Z(e){const n=s(o.MANAToken,e),a=s(o.CreditsManager,e);return{id:"credits",group:"buying",kind:"allowance",contractAddress:n.address,spenderAddress:a.address,chainId:e}}function $(e){const n=s(o.MANAToken,e),a=s(o.OffChainMarketplaceV2,e);return{id:"mana-marketplace",group:"buying",kind:"allowance",contractAddress:n.address,spenderAddress:a.address,chainId:e}}function j(e,n){const a=s(o.OffChainMarketplaceV2,n);return{id:`selling:${e.toLowerCase()}`,group:"selling",kind:"approval",contractAddress:e,spenderAddress:a.address,chainId:n}}function q(e,n){const a=s(o.OffChainMarketplaceV2,n);return{id:`minting:${e.toLowerCase()}`,group:"minting",kind:"minter",contractAddress:e,spenderAddress:a.address,chainId:n}}export{T as A,Z as a,$ as b,j as c,q as d,L as e,z as f,d as g,W as h,B as i,J as j,R as m,H as n,g as r,P as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v,i as h,b as l,w as ve}from"./lit-element-B3y9oplH.js";import{n as c,o as d,r as u,a as Dt}from"./class-map-CxwNmq0D.js";import{e as k,r as R,g as y,j as m,O as U,l as w,E as N,R as W,n as xe,b as E,o as g,q as Ke,m as At,W as He,C as it,d as mt,T as nt,i as je,M as _t,t as It,c as Bt}from"./core-
|
|
1
|
+
import{a as v,i as h,b as l,w as ve}from"./lit-element-B3y9oplH.js";import{n as c,o as d,r as u,a as Dt}from"./class-map-CxwNmq0D.js";import{e as k,r as R,g as y,j as m,O as U,l as w,E as N,R as W,n as xe,b as E,o as g,q as Ke,m as At,W as He,C as it,d as mt,T as nt,i as je,M as _t,t as It,c as Bt}from"./core-BqndrHwC.js";import{c as p,U as Y}from"./index-D3OKsJLK.js";import{Q as Ut}from"./browser-CMge1DAk.js";import{e as ct,n as ut}from"./ref-BsAZ42-h.js";import"./index-BiIZh9R9.js";import"./react-IQWs2nb4.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./index-BtkxBg3h.js";import"./events-DQ172AOg.js";import"./index-BZWNTqaV.js";import"./index-CCoJpS6M.js";import"./index.es-DWEmsLX5.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-DGdQax5Y.js";import"./browser-ponyfill-DdemUjDS.js";import"./NetworkUtil-Dh3JWXso.js";import"./W3MFrameProviderSingleton-BLAdE798.js";import"./async-directive-BRxn_Py3.js";const Nt=v`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
background-color: var(--wui-color-gray-glass-002);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as w}from"./signing-
|
|
1
|
+
import{Z as w}from"./signing-VekuwpLK.js";import{g as f}from"./to-serializable-transaction-C5BoASVF.js";import{s as c,f as y,r as u,j as g,g as i,k as l}from"./prepare-contract-call-CUP20AbD.js";import"./utils-BgbaLlfC.js";import"./sentry-DvOx8Rfb.js";import"./react-IQWs2nb4.js";import"./index-BiIZh9R9.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./get-bytecode-B5xpAv7a.js";import"./transaction-ToPxlTkC.js";const d=0n;async function x({account:a,serializableTransaction:e,transaction:r,gasless:n}){const o=f({address:n.relayerForwarderAddress,chain:r.chain,client:r.client}),s=await u({contract:o,method:"function getNonce(address,uint256) view returns (uint256)",params:[a.address,d]}),p=Math.floor(Date.now()/1e3)+(n.deadlineSeconds??3600),t={batchId:d,batchNonce:s,data:e.data,deadline:p,from:a.address,to:e.to,token:w,tokenGasPrice:0n,txGas:e.gas};if(!t.to)throw new Error("Cannot send a transaction without a `to` address");if(!t.txGas)throw new Error("Cannot send a transaction without a `gas` value");if(!t.data)throw new Error("Cannot send a transaction without a `data` value");const m=g([{type:"address"},{type:"address"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[i(t.from),i(t.to),i(t.token),t.txGas,t.tokenGasPrice,t.batchId,t.batchNonce,l(t.data)]),h=await a.signMessage({message:m});return[t,h]}async function S(a){const[e,r]=await x(a),n=await fetch("https://api.biconomy.io/api/v2/meta-tx/native",{body:c({apiId:a.gasless.apiId,from:e.from,gasLimit:e.txGas,params:[e,r],to:e.to}),headers:{"Content-Type":"application/json;charset=utf-8","x-api-key":a.gasless.apiKey},method:"POST"});if(!n.ok)throw new Error(`Failed to send transaction: ${await n.text()}`);const o=await n.json(),s=o.txHash;if(y(s))return{chain:a.transaction.chain,client:a.transaction.client,transactionHash:s};throw new Error(`Failed to send transaction: ${c(o)}`)}export{x as prepareBiconomyTransaction,S as relayBiconomyTransaction};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./react-
|
|
1
|
+
import{j as u}from"./react-IQWs2nb4.js";import{t as m,s as r,aj as C,n as A,aI as w,e as g,p as v,B as y,w as S}from"./index-BiIZh9R9.js";const V="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/default-cover-7vUE644d.jpeg",M=2166136261,E=16777619,j=4294967295,I=.75,L=1,R="#ffffff",T=/[\p{L}\p{N}]/u;function k(n){let o=M>>>0;for(let t=0;t<n.length;t++)o^=n.charCodeAt(t),o=Math.imul(o,E)>>>0;return o>>>0}function B(n,o,t){const s=n>=1?n-Math.floor(n):n,f=Math.floor(s*6),c=s*6-f,i=t*(1-o),a=t*(1-o*c),l=t*(1-o*(1-c));switch(f%6){case 0:return{r:t,g:l,b:i};case 1:return{r:a,g:t,b:i};case 2:return{r:i,g:t,b:l};case 3:return{r:i,g:a,b:t};case 4:return{r:l,g:i,b:t};default:return{r:t,g:i,b:a}}}function x(n){return Math.max(0,Math.min(255,Math.round(n*255))).toString(16).padStart(2,"0")}function _({r:n,g:o,b:t}){return`#${x(n)}${x(o)}${x(t)}`}function U(n){if(!n)return"";let o="";for(let t=0;t<n.length;t++){const s=n[t];T.test(s)&&(o+=s)}return o}function W({name:n,hasClaimedName:o,ethAddress:t}){const s=U(n);return s?o||!t||t.length<=4?s:`${s}#${t.slice(-4)}`:""}function D(n){if(!n)return R;const t=k(n)/j;return _(B(t,I,L))}const{colors:h,radius:F}=m,N=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -7,15 +7,15 @@ import{j as u}from"./react-vyZjIDcS.js";import{t as m,s as r,ak as C,n as A,aJ a
|
|
|
7
7
|
padding: 12px 16px;
|
|
8
8
|
margin-bottom: 20px;
|
|
9
9
|
border: 1px solid ${h.line};
|
|
10
|
-
border-radius: ${
|
|
10
|
+
border-radius: ${F.card};
|
|
11
11
|
background: ${h.media};
|
|
12
|
-
`,
|
|
12
|
+
`,O=r.span`
|
|
13
13
|
display: inline-flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
gap: 6px;
|
|
16
16
|
font-weight: 600;
|
|
17
17
|
color: ${h.text};
|
|
18
|
-
`;function X({items:n,source:o}){const t=C(e=>e.add),s=C(e=>e.items.map(d=>d.id)),f=A(e=>{var d;return(d=e.session)==null?void 0:d.address}),c=n.filter(e=>e.priceCredits>0&&!w(e,f));if(c.length===0)return null;const i=new Set(s),a=c.filter(e=>!i.has(e.id)),l=c.reduce((e,d)=>e+d.priceCredits,0);function $(){a.forEach(e=>t(e,o)),S.success(g("addAll.added",{count:a.length}))}return u.jsxs(
|
|
18
|
+
`;function X({items:n,source:o}){const t=C(e=>e.add),s=C(e=>e.items.map(d=>d.id)),f=A(e=>{var d;return(d=e.session)==null?void 0:d.address}),c=n.filter(e=>e.priceCredits>0&&!w(e,f));if(c.length===0)return null;const i=new Set(s),a=c.filter(e=>!i.has(e.id)),l=c.reduce((e,d)=>e+d.priceCredits,0);function $(){a.forEach(e=>t(e,o)),S.success(g("addAll.added",{count:a.length}))}return u.jsxs(N,{children:[u.jsxs(O,{children:[g("addAll.forSale",{count:c.length})," · ",u.jsx(v,{size:16})," ",l.toLocaleString()]}),u.jsx(y,{variant:"purple",size:"sm",onClick:$,disabled:a.length===0,children:a.length===0?g("addAll.allInCart"):g("addAll.addAll",{count:a.length})})]})}const{colors:p}=m,Y=r.div`
|
|
19
19
|
max-width: 1721px;
|
|
20
20
|
margin: 0 auto;
|
|
21
21
|
`,q=r.nav`
|
|
@@ -45,7 +45,7 @@ import{j as u}from"./react-vyZjIDcS.js";import{t as m,s as r,ak as C,n as A,aJ a
|
|
|
45
45
|
`,Q=r.span`
|
|
46
46
|
color: ${p.muted};
|
|
47
47
|
font-weight: 600;
|
|
48
|
-
`,{colors:
|
|
48
|
+
`,{colors:z,media:b}=m,Z=r.div`
|
|
49
49
|
position: relative;
|
|
50
50
|
display: flex;
|
|
51
51
|
gap: 32px;
|
|
@@ -75,7 +75,7 @@ import{j as u}from"./react-vyZjIDcS.js";import{t as m,s as r,ak as C,n as A,aJ a
|
|
|
75
75
|
width: 100%;
|
|
76
76
|
max-height: 88vh;
|
|
77
77
|
border-radius: 16px 16px 0 0;
|
|
78
|
-
background: ${
|
|
78
|
+
background: ${z.white};
|
|
79
79
|
padding: 0 16px;
|
|
80
80
|
overflow-y: auto;
|
|
81
81
|
box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./react-
|
|
1
|
+
import{g as ie}from"./react-IQWs2nb4.js";function ue(r,o){for(var i=0;i<o.length;i++){const n=o[i];if(typeof n!="string"&&!Array.isArray(n)){for(const t in n)if(t!=="default"&&!(t in r)){const e=Object.getOwnPropertyDescriptor(n,t);e&&Object.defineProperty(r,t,e.get?e:{enumerable:!0,get:()=>n[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var z={},Q,At;function se(){return At||(At=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var $={},U={},Rt;function F(){if(Rt)return U;Rt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(n){return r(n)},U}var W={},Tt;function Ct(){return Tt||(Tt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}})(W)),W}var Z,It;function ae(){if(It)return Z;It=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n<i;n++)this.putBit((o>>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},Z=r,Z}var X,Nt;function ce(){if(Nt)return X;Nt=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,n,t){const e=o*this.size+i;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},X=r,X}var x={},Pt;function fe(){return Pt||(Pt=1,(function(r){const o=F().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),u=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let s=1;s<t-1;s++)a[s]=a[s-1]-u;return a.push(6),a.reverse()},r.getPositions=function(n){const t=[],e=r.getRowColCoords(n),u=e.length;for(let a=0;a<u;a++)for(let s=0;s<u;s++)a===0&&s===0||a===0&&s===u-1||a===u-1&&s===0||t.push([e[a],e[s]]);return t}})(x)),x}var tt={},Mt;function le(){if(Mt)return tt;Mt=1;const r=F().getSymbolSize,o=7;return tt.getPositions=function(n){const t=r(n);return[[0,0],[t-o,0],[0,t-o]]},tt}var et={},St;function de(){return St||(St=1,(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};r.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let u=0,a=0,s=0,c=null,d=null;for(let B=0;B<e;B++){a=s=0,c=d=null;for(let h=0;h<e;h++){let f=t.get(B,h);f===c?a++:(a>=5&&(u+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?s++:(s>=5&&(u+=o.N1+(s-5)),d=f,s=1)}a>=5&&(u+=o.N1+(a-5)),s>=5&&(u+=o.N1+(s-5))}return u},r.getPenaltyN2=function(t){const e=t.size;let u=0;for(let a=0;a<e-1;a++)for(let s=0;s<e-1;s++){const c=t.get(a,s)+t.get(a,s+1)+t.get(a+1,s)+t.get(a+1,s+1);(c===4||c===0)&&u++}return u*o.N2},r.getPenaltyN3=function(t){const e=t.size;let u=0,a=0,s=0;for(let c=0;c<e;c++){a=s=0;for(let d=0;d<e;d++)a=a<<1&2047|t.get(c,d),d>=10&&(a===1488||a===93)&&u++,s=s<<1&2047|t.get(d,c),d>=10&&(s===1488||s===93)&&u++}return u*o.N3},r.getPenaltyN4=function(t){let e=0;const u=t.data.length;for(let s=0;s<u;s++)e+=t.data[s];return Math.abs(Math.ceil(e*100/u/5)-10)*o.N4};function i(n,t,e){switch(n){case r.Patterns.PATTERN000:return(t+e)%2===0;case r.Patterns.PATTERN001:return t%2===0;case r.Patterns.PATTERN010:return e%3===0;case r.Patterns.PATTERN011:return(t+e)%3===0;case r.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case r.Patterns.PATTERN101:return t*e%2+t*e%3===0;case r.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case r.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}r.applyMask=function(t,e){const u=e.size;for(let a=0;a<u;a++)for(let s=0;s<u;s++)e.isReserved(s,a)||e.xor(s,a,i(t,s,a))},r.getBestMask=function(t,e){const u=Object.keys(r.Patterns).length;let a=0,s=1/0;for(let c=0;c<u;c++){e(c),r.applyMask(c,t);const d=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(c,t),d<s&&(s=d,a=c)}return a}})(et)),et}var J={},bt;function Zt(){if(bt)return J;bt=1;const r=Ct(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return J.getBlocksCount=function(t,e){switch(e){case r.L:return o[(t-1)*4+0];case r.M:return o[(t-1)*4+1];case r.Q:return o[(t-1)*4+2];case r.H:return o[(t-1)*4+3];default:return}},J.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[(t-1)*4+0];case r.M:return i[(t-1)*4+1];case r.Q:return i[(t-1)*4+2];case r.H:return i[(t-1)*4+3];default:return}},J}var nt={},K={},Lt;function ge(){if(Lt)return K;Lt=1;const r=new Uint8Array(512),o=new Uint8Array(256);return(function(){let n=1;for(let t=0;t<255;t++)r[t]=n,o[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)r[t]=r[t-255]})(),K.log=function(n){if(n<1)throw new Error("log("+n+")");return o[n]},K.exp=function(n){return r[n]},K.mul=function(n,t){return n===0||t===0?0:r[o[n]+o[t]]},K}var Dt;function he(){return Dt||(Dt=1,(function(r){const o=ge();r.mul=function(n,t){const e=new Uint8Array(n.length+t.length-1);for(let u=0;u<n.length;u++)for(let a=0;a<t.length;a++)e[u+a]^=o.mul(n[u],t[a]);return e},r.mod=function(n,t){let e=new Uint8Array(n);for(;e.length-t.length>=0;){const u=e[0];for(let s=0;s<t.length;s++)e[s]^=o.mul(t[s],u);let a=0;for(;a<e.length&&e[a]===0;)a++;e=e.slice(a)}return e},r.generateECPolynomial=function(n){let t=new Uint8Array([1]);for(let e=0;e<n;e++)t=r.mul(t,new Uint8Array([1,o.exp(e)]));return t}})(nt)),nt}var rt,vt;function me(){if(vt)return rt;vt=1;const r=he();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(n){this.degree=n,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const e=r.mod(t,this.genPoly),u=this.degree-e.length;if(u>0){const a=new Uint8Array(this.degree);return a.set(e,u),a}return e},rt=o,rt}var ot={},it={},ut={},qt;function Xt(){return qt||(qt=1,ut.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ut}var L={},Ut;function xt(){if(Ut)return L;Ut=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
|
|
2
2
|
]))+`;L.KANJI=new RegExp(i,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(n,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),e=new RegExp("^"+r+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(s){return t.test(s)},L.testNumeric=function(s){return e.test(s)},L.testAlphanumeric=function(s){return u.test(s)},L}var Ft;function _(){return Ft||(Ft=1,(function(r){const o=Xt(),i=xt();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,u){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!o.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?e.ccBits[0]:u<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return i.testNumeric(e)?r.NUMERIC:i.testAlphanumeric(e)?r.ALPHANUMERIC:i.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(e,u){if(r.isValid(e))return e;try{return n(e)}catch{return u}}})(it)),it}var _t;function we(){return _t||(_t=1,(function(r){const o=F(),i=Zt(),n=Ct(),t=_(),e=Xt(),u=7973,a=o.getBCHDigit(u);function s(h,f,N){for(let P=1;P<=40;P++)if(f<=r.getCapacity(P,N,h))return P}function c(h,f){return t.getCharCountIndicator(h,f)+4}function d(h,f){let N=0;return h.forEach(function(P){const S=c(P.mode,f);N+=S+P.getBitsLength()}),N}function B(h,f){for(let N=1;N<=40;N++)if(d(h,N)<=r.getCapacity(N,f,t.MIXED))return N}r.from=function(f,N){return e.isValid(f)?parseInt(f,10):N},r.getCapacity=function(f,N,P){if(!e.isValid(f))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=t.BYTE);const S=o.getSymbolTotalCodewords(f),R=i.getTotalCodewordsCount(f,N),M=(S-R)*8;if(P===t.MIXED)return M;const T=M-c(P,f);switch(P){case t.NUMERIC:return Math.floor(T/10*3);case t.ALPHANUMERIC:return Math.floor(T/11*2);case t.KANJI:return Math.floor(T/13);case t.BYTE:default:return Math.floor(T/8)}},r.getBestVersionForData=function(f,N){let P;const S=n.from(N,n.M);if(Array.isArray(f)){if(f.length>1)return B(f,S);if(f.length===0)return 1;P=f[0]}else P=f;return s(P.mode,P.getLength(),S)},r.getEncodedBits=function(f){if(!e.isValid(f)||f<7)throw new Error("Invalid QR Code version");let N=f<<12;for(;o.getBCHDigit(N)-a>=0;)N^=u<<o.getBCHDigit(N)-a;return f<<12|N}})(ot)),ot}var st={},kt;function ye(){if(kt)return st;kt=1;const r=F(),o=1335,i=21522,n=r.getBCHDigit(o);return st.getEncodedBits=function(e,u){const a=e.bit<<3|u;let s=a<<10;for(;r.getBCHDigit(s)-n>=0;)s^=o<<r.getBCHDigit(s)-n;return(a<<10|s)^i},st}var at={},ct,zt;function Ce(){if(zt)return ct;zt=1;const r=_();function o(i){this.mode=r.NUMERIC,this.data=i.toString()}return o.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let t,e,u;for(t=0;t+3<=this.data.length;t+=3)e=this.data.substr(t,3),u=parseInt(e,10),n.put(u,10);const a=this.data.length-t;a>0&&(e=this.data.substr(t),u=parseInt(e,10),n.put(u,a*3+1))},ct=o,ct}var ft,Vt;function Ee(){if(Vt)return ft;Vt=1;const r=_(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(n){this.mode=r.ALPHANUMERIC,this.data=n}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let u=o.indexOf(this.data[e])*45;u+=o.indexOf(this.data[e+1]),t.put(u,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},ft=i,ft}var lt,Kt;function Be(){return Kt||(Kt=1,lt=function(o){for(var i=[],n=o.length,t=0;t<n;t++){var e=o.charCodeAt(t);if(e>=55296&&e<=56319&&n>t+1){var u=o.charCodeAt(t+1);u>=56320&&u<=57343&&(e=(e-55296)*1024+u-56320+65536,t+=1)}if(e<128){i.push(e);continue}if(e<2048){i.push(e>>6|192),i.push(e&63|128);continue}if(e<55296||e>=57344&&e<65536){i.push(e>>12|224),i.push(e>>6&63|128),i.push(e&63|128);continue}if(e>=65536&&e<=1114111){i.push(e>>18|240),i.push(e>>12&63|128),i.push(e>>6&63|128),i.push(e&63|128);continue}i.push(239,191,189)}return new Uint8Array(i).buffer}),lt}var dt,Ht;function pe(){if(Ht)return dt;Ht=1;const r=Be(),o=_();function i(n){this.mode=o.BYTE,typeof n=="string"&&(n=r(n)),this.data=new Uint8Array(n)}return i.getBitsLength=function(t){return t*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){for(let t=0,e=this.data.length;t<e;t++)n.put(this.data[t],8)},dt=i,dt}var gt,Jt;function Ae(){if(Jt)return gt;Jt=1;const r=_(),o=F();function i(n){this.mode=r.KANJI,this.data=n}return i.getBitsLength=function(t){return t*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let e=o.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
3
3
|
Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}},gt=i,gt}var ht={exports:{}},Ot;function Re(){return Ot||(Ot=1,(function(r){var o={single_source_shortest_paths:function(i,n,t){var e={},u={};u[n]=0;var a=o.PriorityQueue.make();a.push(n,0);for(var s,c,d,B,h,f,N,P,S;!a.empty();){s=a.pop(),c=s.value,B=s.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(f=h[d],N=B+f,P=u[d],S=typeof u[d]>"u",(S||P>N)&&(u[d]=N,a.push(d,N),e[d]=c))}if(typeof t<"u"&&typeof u[t]>"u"){var R=["Could not find a path from ",n," to ",t,"."].join("");throw new Error(R)}return e},extract_shortest_path_from_predecessor_list:function(i,n){for(var t=[],e=n;e;)t.push(e),i[e],e=i[e];return t.reverse(),t},find_path:function(i,n,t){var e=o.single_source_shortest_paths(i,n,t);return o.extract_shortest_path_from_predecessor_list(e,t)},PriorityQueue:{make:function(i){var n=o.PriorityQueue,t={},e;i=i||{};for(e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t.queue=[],t.sorter=i.sorter||n.default_sorter,t},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var t={value:i,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(ht)),ht.exports}var jt;function Te(){return jt||(jt=1,(function(r){const o=_(),i=Ce(),n=Ee(),t=pe(),e=Ae(),u=xt(),a=F(),s=Re();function c(R){return unescape(encodeURIComponent(R)).length}function d(R,M,T){const p=[];let b;for(;(b=R.exec(T))!==null;)p.push({data:b[0],index:b.index,mode:M,length:b[0].length});return p}function B(R){const M=d(u.NUMERIC,o.NUMERIC,R),T=d(u.ALPHANUMERIC,o.ALPHANUMERIC,R);let p,b;return a.isKanjiModeEnabled()?(p=d(u.BYTE,o.BYTE,R),b=d(u.KANJI,o.KANJI,R)):(p=d(u.BYTE_KANJI,o.BYTE,R),b=[]),M.concat(T,p,b).sort(function(C,y){return C.index-y.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function h(R,M){switch(M){case o.NUMERIC:return i.getBitsLength(R);case o.ALPHANUMERIC:return n.getBitsLength(R);case o.KANJI:return e.getBitsLength(R);case o.BYTE:return t.getBitsLength(R)}}function f(R){return R.reduce(function(M,T){const p=M.length-1>=0?M[M.length-1]:null;return p&&p.mode===T.mode?(M[M.length-1].data+=T.data,M):(M.push(T),M)},[])}function N(R){const M=[];for(let T=0;T<R.length;T++){const p=R[T];switch(p.mode){case o.NUMERIC:M.push([p,{data:p.data,mode:o.ALPHANUMERIC,length:p.length},{data:p.data,mode:o.BYTE,length:p.length}]);break;case o.ALPHANUMERIC:M.push([p,{data:p.data,mode:o.BYTE,length:p.length}]);break;case o.KANJI:M.push([p,{data:p.data,mode:o.BYTE,length:c(p.data)}]);break;case o.BYTE:M.push([{data:p.data,mode:o.BYTE,length:c(p.data)}])}}return M}function P(R,M){const T={},p={start:{}};let b=["start"];for(let g=0;g<R.length;g++){const C=R[g],y=[];for(let l=0;l<C.length;l++){const A=C[l],m=""+g+l;y.push(m),T[m]={node:A,lastCount:0},p[m]={};for(let E=0;E<b.length;E++){const w=b[E];T[w]&&T[w].node.mode===A.mode?(p[w][m]=h(T[w].lastCount+A.length,A.mode)-h(T[w].lastCount,A.mode),T[w].lastCount+=A.length):(T[w]&&(T[w].lastCount=A.length),p[w][m]=h(A.length,A.mode)+4+o.getCharCountIndicator(A.mode,M))}}b=y}for(let g=0;g<b.length;g++)p[b[g]].end=0;return{map:p,table:T}}function S(R,M){let T;const p=o.getBestModeForData(R);if(T=o.from(M,p),T!==o.BYTE&&T.bit<p.bit)throw new Error('"'+R+'" cannot be encoded with mode '+o.toString(T)+`.
|
|
4
4
|
Suggested mode is: `+o.toString(p));switch(T===o.KANJI&&!a.isKanjiModeEnabled()&&(T=o.BYTE),T){case o.NUMERIC:return new i(R);case o.ALPHANUMERIC:return new n(R);case o.KANJI:return new e(R);case o.BYTE:return new t(R)}}r.fromArray=function(M){return M.reduce(function(T,p){return typeof p=="string"?T.push(S(p,null)):p.data&&T.push(S(p.data,p.mode)),T},[])},r.fromString=function(M,T){const p=B(M,a.isKanjiModeEnabled()),b=N(p),g=P(b,T),C=s.find_path(g.map,"start","end"),y=[];for(let l=1;l<C.length-1;l++)y.push(g.table[C[l]].node);return r.fromArray(f(y))},r.rawSplit=function(M){return r.fromArray(B(M,a.isKanjiModeEnabled()))}})(at)),at}var Yt;function Ie(){if(Yt)return $;Yt=1;const r=F(),o=Ct(),i=ae(),n=ce(),t=fe(),e=le(),u=de(),a=Zt(),s=me(),c=we(),d=ye(),B=_(),h=Te();function f(g,C){const y=g.size,l=e.getPositions(C);for(let A=0;A<l.length;A++){const m=l[A][0],E=l[A][1];for(let w=-1;w<=7;w++)if(!(m+w<=-1||y<=m+w))for(let I=-1;I<=7;I++)E+I<=-1||y<=E+I||(w>=0&&w<=6&&(I===0||I===6)||I>=0&&I<=6&&(w===0||w===6)||w>=2&&w<=4&&I>=2&&I<=4?g.set(m+w,E+I,!0,!0):g.set(m+w,E+I,!1,!0))}}function N(g){const C=g.size;for(let y=8;y<C-8;y++){const l=y%2===0;g.set(y,6,l,!0),g.set(6,y,l,!0)}}function P(g,C){const y=t.getPositions(C);for(let l=0;l<y.length;l++){const A=y[l][0],m=y[l][1];for(let E=-2;E<=2;E++)for(let w=-2;w<=2;w++)E===-2||E===2||w===-2||w===2||E===0&&w===0?g.set(A+E,m+w,!0,!0):g.set(A+E,m+w,!1,!0)}}function S(g,C){const y=g.size,l=c.getEncodedBits(C);let A,m,E;for(let w=0;w<18;w++)A=Math.floor(w/3),m=w%3+y-8-3,E=(l>>w&1)===1,g.set(A,m,E,!0),g.set(m,A,E,!0)}function R(g,C,y){const l=g.size,A=d.getEncodedBits(C,y);let m,E;for(m=0;m<15;m++)E=(A>>m&1)===1,m<6?g.set(m,8,E,!0):m<8?g.set(m+1,8,E,!0):g.set(l-15+m,8,E,!0),m<8?g.set(8,l-m-1,E,!0):m<9?g.set(8,15-m-1+1,E,!0):g.set(8,15-m-1,E,!0);g.set(l-8,8,1,!0)}function M(g,C){const y=g.size;let l=-1,A=y-1,m=7,E=0;for(let w=y-1;w>0;w-=2)for(w===6&&w--;;){for(let I=0;I<2;I++)if(!g.isReserved(A,w-I)){let q=!1;E<C.length&&(q=(C[E]>>>m&1)===1),g.set(A,w-I,q),m--,m===-1&&(E++,m=7)}if(A+=l,A<0||y<=A){A-=l,l=-l;break}}}function T(g,C,y){const l=new i;y.forEach(function(I){l.put(I.mode.bit,4),l.put(I.getLength(),B.getCharCountIndicator(I.mode,g)),I.write(l)});const A=r.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,C),E=(A-m)*8;for(l.getLengthInBits()+4<=E&&l.put(0,4);l.getLengthInBits()%8!==0;)l.putBit(0);const w=(E-l.getLengthInBits())/8;for(let I=0;I<w;I++)l.put(I%2?17:236,8);return p(l,g,C)}function p(g,C,y){const l=r.getSymbolTotalCodewords(C),A=a.getTotalCodewordsCount(C,y),m=l-A,E=a.getBlocksCount(C,y),w=l%E,I=E-w,q=Math.floor(l/E),V=Math.floor(m/E),ne=V+1,Et=q-V,re=new s(Et);let O=0;const H=new Array(E),Bt=new Array(E);let j=0;const oe=new Uint8Array(g.buffer);for(let k=0;k<E;k++){const G=k<I?V:ne;H[k]=oe.slice(O,O+G),Bt[k]=re.encode(H[k]),O+=G,j=Math.max(j,G)}const Y=new Uint8Array(l);let pt=0,D,v;for(D=0;D<j;D++)for(v=0;v<E;v++)D<H[v].length&&(Y[pt++]=H[v][D]);for(D=0;D<Et;D++)for(v=0;v<E;v++)Y[pt++]=Bt[v][D];return Y}function b(g,C,y,l){let A;if(Array.isArray(g))A=h.fromArray(g);else if(typeof g=="string"){let q=C;if(!q){const V=h.rawSplit(g);q=c.getBestVersionForData(V,y)}A=h.fromString(g,q||40)}else throw new Error("Invalid data");const m=c.getBestVersionForData(A,y);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=m;else if(C<m)throw new Error(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as _,g as z}from"./react-
|
|
1
|
+
import{c as _,g as z}from"./react-IQWs2nb4.js";var A={exports:{}},j;function X(){return j||(j=1,(function(H,d){var m=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof _<"u"&&_,v=(function(){function w(){this.fetch=!1,this.DOMException=m.DOMException}return w.prototype=m,new w})();(function(w){(function(h){var a=typeof w<"u"&&w||typeof self<"u"&&self||typeof _<"u"&&_||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function F(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var S=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],q=ArrayBuffer.isView||function(e){return e&&S.indexOf(Object.prototype.toString.call(e))>-1};function b(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function g(e){return typeof e!="string"&&(e=String(e)),e}function B(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=b(e),t=g(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[b(e)]},i.prototype.get=function(e){return e=b(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(b(e))},i.prototype.set=function(e,t){this.map[b(e)]=g(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),B(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),B(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),B(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function T(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function x(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function C(e){var t=new FileReader,r=x(t);return t.readAsArrayBuffer(e),r}function I(e){var t=new FileReader,r=x(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function M(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function D(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&F(e)?(this._bodyArrayBuffer=D(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||q(e))?this._bodyArrayBuffer=D(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=T(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(C);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function N(e){var t=e.toUpperCase();return L.indexOf(t)>-1?t:e}function c(e,t){if(!(this instanceof c))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof c){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=N(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||(function(){if("AbortController"in a){var o=new AbortController;return o.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}c.prototype.clone=function(){return new c(this,{body:this._bodyInit})};function k(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function G(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
|
|
2
2
|
`)===0?n.substr(1,n.length):n}).forEach(function(n){var s=n.split(":"),o=s.shift().trim();if(o){var E=s.join(":").trim();try{t.append(o,E)}catch(P){console.warn("Response "+P.message)}}}),t}R.call(c.prototype);function l(e,t){if(!(this instanceof l))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}R.call(l.prototype),l.prototype.clone=function(){return new l(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},l.error=function(){var e=new l(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var V=[301,302,303,307,308];l.redirect=function(e,t){if(V.indexOf(t)===-1)throw new RangeError("Invalid status code");return new l(null,{status:t,headers:{location:e}})},h.DOMException=a.DOMException;try{new h.DOMException}catch{h.DOMException=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},h.DOMException.prototype=Object.create(Error.prototype),h.DOMException.prototype.constructor=h.DOMException}function O(e,t){return new Promise(function(r,n){var s=new c(e,t);if(s.signal&&s.signal.aborted)return n(new h.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function E(){o.abort()}o.onload=function(){var f={statusText:o.statusText,headers:G(o.getAllResponseHeaders()||"")};s.url.indexOf("file://")===0&&(o.status<200||o.status>599)?f.status=200:f.status=o.status,f.url="responseURL"in o?o.responseURL:f.headers.get("X-Request-URL");var y="response"in o?o.response:o.responseText;setTimeout(function(){r(new l(y,f))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){n(new h.DOMException("Aborted","AbortError"))},0)};function P(f){try{return f===""&&a.location.href?a.location.href:f}catch{return f}}if(o.open(s.method,P(s.url),!0),s.credentials==="include"?o.withCredentials=!0:s.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(u.blob?o.responseType="blob":u.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof i||a.Headers&&t.headers instanceof a.Headers)){var U=[];Object.getOwnPropertyNames(t.headers).forEach(function(f){U.push(b(f)),o.setRequestHeader(f,g(t.headers[f]))}),s.headers.forEach(function(f,y){U.indexOf(y)===-1&&o.setRequestHeader(y,f)})}else s.headers.forEach(function(f,y){o.setRequestHeader(y,f)});s.signal&&(s.signal.addEventListener("abort",E),o.onreadystatechange=function(){o.readyState===4&&s.signal.removeEventListener("abort",E)}),o.send(typeof s._bodyInit>"u"?null:s._bodyInit)})}return O.polyfill=!0,a.fetch||(a.fetch=O,a.Headers=i,a.Request=c,a.Response=l),h.Headers=i,h.Request=c,h.Response=l,h.fetch=O,Object.defineProperty(h,"__esModule",{value:!0}),h})({})})(v),v.fetch.ponyfill=!0,delete v.fetch.polyfill;var p=m.fetch?m:v;d=p.fetch,d.default=p.fetch,d.fetch=p.fetch,d.Headers=p.Headers,d.Request=p.Request,d.Response=p.Response,H.exports=d})(A,A.exports)),A.exports}var $=X();const Z=z($);export{Z as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,d as y}from"./index-
|
|
1
|
+
import{c as b,d as y}from"./index-BiIZh9R9.js";import{d as g}from"./dcl-schemas-BICTSpB5.js";const c=()=>`${b.builderServerUrl}/v1`;function f(t){return Array.isArray(t)?t:"results"in t&&Array.isArray(t.results)?t.results:"data"in t&&Array.isArray(t.data)?t.data:[]}async function h(t,e){const r=await y(t,{method:"GET",identity:e,metadata:{}});if(!r.ok)throw new Error(`builder-server ${r.status}: ${await r.text()}`);const s=await r.json();return s.data??s}function _(t,e){const r=e-t;return r>0?r:0}function A(t){var e,r,s,n,i;return((r=(e=t.data)==null?void 0:e.wearable)==null?void 0:r.category)??((n=(s=t.data)==null?void 0:s.emote)==null?void 0:n.category)??((i=t.data)==null?void 0:i.category)??t.type??"wearable"}function p(t){return`${c()}/storage/contents/${t}`}function a(t,e){if(!t)return"";if(/^https?:\/\//.test(t))return t;const r=e==null?void 0:e[t];return r?p(r):/^(ba|Qm)/.test(t)?p(t):""}async function $(t,e){try{const r=await fetch(`${c()}/items/${t}/${e}/contents`);if(!r.ok)return{};const s=await r.json();return s.data??s}catch{return{}}}async function C(t,e,r){const s=a(t.thumbnail,t.contents)||a("thumbnail.png",t.contents);if(s)return s;if(e&&r){const n=await $(e,r);return a(t.thumbnail,n)||a("thumbnail.png",n)||a("image.png",n)}return""}async function v(t,e){const r=`${c()}/${t.toLowerCase()}/collections?is_published=true`,s=await h(r,e);return f(s).filter(n=>n.is_published&&!!n.contract_address).map(n=>({id:n.id,name:n.name,contractAddress:n.contract_address.toLowerCase(),isPublished:n.is_published,isApproved:n.is_approved,minters:(n.minters??[]).map(i=>i.toLowerCase())}))}async function w(t,e){const r=`${c()}/collections/${t.id}/items`,s=await h(r,e);return(await Promise.all(f(s).map(async i=>{const u=i.rarity??"common",l=Number(i.total_supply??0)||0;let o;try{o=g.Rarity.getMaxSupply(u)}catch{o=0}const d=(i.contract_address??t.contractAddress).toLowerCase(),m=i.blockchain_item_id??"";return{id:i.id,collectionId:t.id,collectionName:t.name,contractAddress:d,blockchainItemId:m,name:i.name,category:A(i),rarity:u,thumbnail:await C(i,d,m),type:i.type??"wearable",isPublished:i.is_published??t.isPublished,isApproved:i.is_approved??t.isApproved,totalSupply:l,maxSupply:o,remainingSupply:_(l,o),minters:t.minters}}))).filter(I)}function I(t){return t.isPublished&&t.isApproved&&t.blockchainItemId!==""&&t.blockchainItemId!=null&&t.remainingSupply>0}async function k(t,e){const r=await v(t,e);return(await Promise.all(r.map(async n=>{try{return await w(n,e)}catch{return[]}}))).flat()}export{k as a,v as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as S}from"./dcl-schemas-BICTSpB5.js";import{a as f,b as m,c as W,C as g}from"./index-
|
|
1
|
+
import{d as S}from"./dcl-schemas-BICTSpB5.js";import{a as f,b as m,c as W,C as g}from"./index-BiIZh9R9.js";import{g as C,e as x,r as v,m as E}from"./authorizations-FkFZVBeE.js";import{g as T,a as y,b as A,c as _}from"./trade-encoding-DgV-A2zO.js";import{M as U,E as D,s as M}from"./sendMetaTransaction-BA-2MGdZ.js";import{C as p,I as N,J as $,B as w}from"./ethers-rFeF6PNV.js";function G(a){const t=new Map;for(const e of R(a)){if(e.kind==="store"){const o=`store:${e.chainId}`,i=t.get(o);i&&i.kind==="store"?i.purchases.push(e):t.set(o,{kind:"store",chainId:e.chainId,purchases:[e]});continue}const s=e.trade.contract.toLowerCase(),c=`trade:${e.trade.chainId}:${s}`,n=t.get(c);n&&n.kind==="trade"?n.purchases.push(e):t.set(c,{kind:"trade",chainId:e.trade.chainId,marketplace:s,purchases:[e]})}return[...t.values()]}function R(a){return a.map(t=>"kind"in t?t:{kind:"trade",...t})}function J(a){return a.reduce((t,e)=>t.add(w.from(e.maxCreditedValue)),w.from(0)).toString()}async function O(a){const t=a.received[0],e=t.amount??"0";if(t.assetType!==Number(S.TradeAssetType.USD_PEGGED_MANA))return e;const s=f(m(a.contract),a.chainId),c=new $(W.rpcUrl),o=await new p(s.address,["function manaUsdAggregator() view returns (address)"],c).manaUsdAggregator(),i=new p(o,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],c),u=await i.decimals(),d=await i.latestRoundData(),r=w.from(d[1]);return w.from(e).mul(w.from(10).pow(u)).div(r).mul(102).div(100).toString()}async function H(a,t,e,s){const c=e.provider;await x(c,a);const n=await c.getNetwork();if(n.chainId!==a)throw new Error(`Wrong network: wallet is on chain ${n.chainId}, expected ${a}. Switch networks and try again.`);const o=f(g.CreditsManager,a),u=await new p(o.address,o.abi,e).useCredits(t,y(a));return s==null||s(u.hash),(await u.wait()).transactionHash}async function z(a,t,e){const s=f(m(a.contract),a.chainId),c=T(a,e),n=new N(s.abi).encodeFunctionData("cancelSignature",[[c]]),o=v(),i=E(t.provider,o),u=await M(i,o,n,s,{serverURL:C.relayerUrl});return await o.waitForTransaction(u,1,12e4),u}const F=["function transferFrom(address from, address to, uint256 tokenId)"];async function B(a){const{contractAddress:t,chainId:e,from:s,to:c,tokenId:n,signer:o}=a,i={...f(g.ERC721CollectionV2,e),address:t},u=new N(F).encodeFunctionData("transferFrom",[s,c,n]),d=v(),r=E(o.provider,d),l=await M(r,d,u,i,{serverURL:C.relayerUrl});return await d.waitForTransaction(l,1,12e4),l}async function tt(a){const{contractAddress:t,chainId:e,tokenId:s,to:c,signer:n}=a,o=(await n.getAddress()).toLowerCase();if(C.enabled)try{return await B({contractAddress:t,chainId:e,from:o,to:c,tokenId:s,signer:n})}catch(r){if(r instanceof U&&r.code===D.USER_DENIED)throw r;console.warn("[transferItem] gasless meta-tx failed, falling back to a direct tx:",r)}return await x(n.provider,e),(await(await new p(t,F,n).transferFrom(o,c,s,y(e))).wait()).transactionHash}async function at(a){const{trade:t,signer:e}=a,s=(await e.getAddress()).toLowerCase();if(C.enabled)try{return await z(t,e,s)}catch(d){if(d instanceof U&&d.code===D.USER_DENIED)throw d;console.warn("[cancelListing] gasless meta-tx failed, falling back to a direct tx:",d)}await x(e.provider,t.chainId);const c=f(m(t.contract),t.chainId),n=T(t,s);return(await(await new p(c.address,c.abi,e).cancelSignature([n],y(t.chainId))).wait()).transactionHash}async function et(a){const{trade:t,buyer:e,signer:s,credits:c,onBroadcast:n,onReverted:o}=a;if(c.length===0)throw new Error("No credits to spend");const i=f(m(t.contract),t.chainId),u=a.maxCreditedValue??await O(t),d=A(i.address,i.abi,[t],e,c,u);try{return await H(t.chainId,d,s,r=>n==null?void 0:n({txHash:r}))}catch(r){throw V(r)&&(o==null||o({txHash:j(r)})),r}}function V(a){var t;return((t=L(a))==null?void 0:t.status)===0}function j(a){var t;return((t=L(a))==null?void 0:t.transactionHash)??null}function L(a){return a==null?void 0:a.receipt}async function rt(a){const{buyer:t,signer:e,onSigned:s,onBroadcast:c,onSettled:n,onReverted:o}=a,i=R(a.purchases);if(i.length===0)throw new Error("No items to buy");const u=G(i),d=[];for(const r of u){const l=r.purchases.flatMap(h=>h.credits),b=J(r.purchases),P=r.kind==="store"?_(f(g.CollectionStore,r.chainId).address,f(g.CollectionStore,r.chainId).abi,r.purchases.map(h=>h.item),t,l,b):A(f(m(r.marketplace),r.chainId).address,f(m(r.marketplace),r.chainId).abi,r.purchases.map(h=>h.trade),t,l,b),I=l.map(h=>h.id);let k;try{k=await H(r.chainId,P,e,h=>{s==null||s(d.length+1,u.length),c==null||c({txHash:h,salts:I})})}catch(h){throw V(h)&&(o==null||o({salts:I})),h}d.push(k),n==null||n({txHash:k,salts:I})}return d}export{et as a,rt as b,at as c,G as g,H as s,tt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,b as v,C as y,c as F}from"./index-
|
|
1
|
+
import{a as g,b as v,C as y,c as F}from"./index-BiIZh9R9.js";import{g as E}from"./authorizations-FkFZVBeE.js";import{b as I}from"./trade-encoding-DgV-A2zO.js";import{M as U,E as j}from"./sendMetaTransaction-BA-2MGdZ.js";import{u as A,C as G,J as _,B as T,h as O}from"./ethers-rFeF6PNV.js";const{Interface:b,hexZeroPad:H}=A;class f extends Error{constructor(e,a="unknown"){super(e),this.reason=a,this.name="GaslessUnavailableError"}}class N extends Error{constructor(e,a){super("Purchase not yet confirmed"),this.txHash=e,this.name="SettlementPendingError",a&&"cause"in a&&(this.cause=a.cause)}}const J=[{name:"nonce",type:"uint256"},{name:"from",type:"address"},{name:"functionData",type:"bytes"}];function R(n){return H(O(n),32)}function $(n,e,a,c){return new b(n).encodeFunctionData("executeMetaTransaction",[e,a,c])}function k(){return new _(F.rpcUrl)}async function x(n,e,a,c,i){const s=g(y.CreditsManager,n),m=await new G(s.address,["function getNonce(address) view returns (uint256)"],k()).getNonce(e),r=a,u={name:s.name,version:s.version,verifyingContract:s.address,salt:R(n)},w={nonce:m.toString(),from:e,functionData:r};let p;try{p=await c._signTypedData(u,{MetaTransaction:J},w)}catch(o){const d=o,C=(d==null?void 0:d.message)??"signature failed";throw(d==null?void 0:d.code)===4001||(d==null?void 0:d.code)==="ACTION_REJECTED"||/denied|reject|cancel/i.test(C)?new U(C,j.USER_DENIED):new f(C,"contract-account")}i==null||i();const D=$(s.abi,e,r,p);let t;try{const o=await fetch(`${E.relayerUrl}/transactions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transactionData:{from:e,params:[s.address,D]}})});if(t=await o.json(),!o.ok&&(t==null?void 0:t.ok)!==!0&&!(t!=null&&t.txHash))throw new f((t==null?void 0:t.message)??`relayer ${o.status}`,"relayer-rejected")}catch(o){throw o instanceof f?o:new f((o==null?void 0:o.message)??"relayer unreachable","relayer-unreachable")}if((t==null?void 0:t.ok)===!1||!(t!=null&&t.txHash))throw new f((t==null?void 0:t.message)??"relayer rejected the transaction","relayer-rejected");return t.txHash}async function q(n,e){const a=k();let c;try{c=await a.waitForTransaction(n,1,(e==null?void 0:e.timeoutMs)??12e4)}catch(i){throw new N(n,{cause:i})}if(!c)throw new N(n);if(c.status===0)throw new Error("Purchase reverted")}async function z(n){if(!E.enabled)throw new f("gasless checkout disabled","disabled");const{chainId:e,buyer:a,signer:c,args:i}=n,s=g(y.CreditsManager,e),l=new b(s.abi).encodeFunctionData("useCredits",[i]);return x(e,a,l,c)}async function K(n){if(!E.enabled)throw new f("gasless checkout disabled","disabled");const{trade:e,buyer:a,signer:c,credits:i,maxCreditedValue:s}=n;if(i.length===0)throw new Error("No credits to spend");const l=g(v(e.contract),e.chainId),m=I(l.address,l.abi,[e],a,i,s),r=g(y.CreditsManager,e.chainId),u=new b(r.abi).encodeFunctionData("useCredits",[m]);return x(e.chainId,a,u,c)}async function Q(n){if(!E.enabled)throw new f("gasless checkout disabled","disabled");const{purchases:e,buyer:a,signer:c,onSigned:i,onBroadcast:s}=n;if(e.length===0)throw new Error("No items to buy");const l=new Map;for(const r of e){const u=`${r.trade.chainId}:${r.trade.contract.toLowerCase()}`,w=l.get(u);w?w.push(r):l.set(u,[r])}const m=[];for(const r of l.values()){const{chainId:u,contract:w}=r[0].trade,p=g(v(w),u),D=r.map(h=>h.trade),t=r.flatMap(h=>h.credits),o=r.reduce((h,S)=>h.add(T.from(S.maxCreditedValue)),T.from(0)).toString(),d=I(p.address,p.abi,D,a,t,o),C=g(y.CreditsManager,u),P=new b(C.abi).encodeFunctionData("useCredits",[d]),M=await x(u,a,P,c,i);s==null||s({txHash:M,salts:t.map(h=>h.id)}),m.push(M)}return m}export{f as G,N as S,K as a,Q as b,z as s,q as w};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as e,r as $}from"./react-
|
|
1
|
+
import{j as e,r as $}from"./react-IQWs2nb4.js";import{s as t,I as R,t as j,G,e as d}from"./index-BiIZh9R9.js";const M=t(R)`
|
|
2
2
|
transition: transform 0.15s ease;
|
|
3
3
|
|
|
4
4
|
&[data-up='true'] {
|
|
5
5
|
transform: rotate(180deg);
|
|
6
6
|
}
|
|
7
|
-
`;function A({up:p=!1,...x}){return e.jsx(
|
|
7
|
+
`;function A({up:p=!1,...x}){return e.jsx(M,{name:"chevron-down","data-up":p||void 0,...x})}const{colors:S,font:I}=j,D=t.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
gap: 2px;
|
|
@@ -44,7 +44,7 @@ import{j as e,r as $}from"./react-vyZjIDcS.js";import{s as t,I as R,t as j,J as
|
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
46
|
gap: 2px;
|
|
47
|
-
`,_=
|
|
47
|
+
`,_=G`
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: space-between;
|
|
@@ -85,16 +85,16 @@ import{j as e,r as $}from"./react-vyZjIDcS.js";import{s as t,I as R,t as j,J as
|
|
|
85
85
|
font-size: 14px;
|
|
86
86
|
line-height: 1.57;
|
|
87
87
|
color: ${S.text};
|
|
88
|
-
`,
|
|
88
|
+
`,Q=t.span`
|
|
89
89
|
display: flex;
|
|
90
90
|
align-items: center;
|
|
91
91
|
gap: 8px;
|
|
92
92
|
min-width: 0;
|
|
93
|
-
`,
|
|
93
|
+
`,q=t(R)`
|
|
94
94
|
width: 24px;
|
|
95
95
|
height: 24px;
|
|
96
96
|
color: ${S.gray0};
|
|
97
|
-
`,
|
|
97
|
+
`,J=t.span`
|
|
98
98
|
font-family: ${I.sans};
|
|
99
99
|
font-weight: 400;
|
|
100
100
|
font-size: 14px;
|
|
@@ -109,7 +109,7 @@ import{j as e,r as $}from"./react-vyZjIDcS.js";import{s as t,I as R,t as j,J as
|
|
|
109
109
|
color: #6a6a6a;
|
|
110
110
|
margin: 0 0 4px;
|
|
111
111
|
padding: 8px 16px 0;
|
|
112
|
-
`,X=[{key:"all",labelKey:"categories.shopAll"},{key:"wearable",labelKey:"categories.wearables",expandable:!0,subs:[{key:"Head",labelKey:"categories.head",icon:"cat-head"},{key:"Upper Body",labelKey:"categories.upperBody",icon:"cat-upper"},{key:"Handwear",labelKey:"categories.handwear",icon:"cat-handwear"},{key:"Lower Body",labelKey:"categories.lowerBody",icon:"cat-lower"},{key:"Feet",labelKey:"categories.feet",icon:"cat-feet"},{key:"Accessories",labelKey:"categories.accessories",icon:"cat-accessories"},{key:"Skins",labelKey:"categories.skins",icon:"cat-skins"}]},{key:"emote",labelKey:"categories.emotes",expandable:!0,subs:[{key:"Dance",labelKey:"categories.dance",icon:"emote-dance"},{key:"Stunt",labelKey:"categories.stunt",icon:"emote-stunt"},{key:"Greetings",labelKey:"categories.greetings",icon:"emote-greetings"},{key:"Fun",labelKey:"categories.fun",icon:"emote-fun"},{key:"Poses",labelKey:"categories.poses",icon:"emote-poses"},{key:"Reactions",labelKey:"categories.reactions",icon:"emote-reactions"},{key:"Horror",labelKey:"categories.horror",icon:"emote-horror"},{key:"Miscellaneous",labelKey:"categories.miscellaneous",icon:"emote-misc"}]},{key:"names",labelKey:"categories.names"}];function Be({category:p,subCategory:x,onCategory:b,onSub:y,title:g,flat:m=!1,collections:u=!1,onCollections:w,hideAll:f=!1,extraLabelKey:s="categories.collections"}){const[v,B]=$.useState(()=>p==="wearable"?"wearable":null);function E(o){o.subs?B(l=>{const c=l!==o.key;return c&&b(o.key),c?o.key:null}):(b(o.key),B(null))}return e.jsxs(D,{"data-flat":m||void 0,children:[g?e.jsx(V,{children:g}):null,X.filter(o=>!(f&&o.key==="all")).map(o=>{const l=v===o.key&&!!o.subs,c=!u&&o.key===p;return e.jsxs(H,{children:[e.jsxs(L,{type:"button","data-cat":!0,"data-expanded":l||void 0,"data-selected":c||void 0,onClick:()=>E(o),children:[e.jsx(O,{children:d(o.labelKey)}),o.expandable?e.jsx(A,{up:l,size:24,color:j.colors.text}):null]}),o.subs?e.jsx(N,{"data-open":l||void 0,children:e.jsx(U,{children:o.subs.map(i=>e.jsx(T,{type:"button","data-sub":!0,"data-active":x===i.key||void 0,onClick:()=>y(x===i.key?null:i.key),children:e.jsxs(
|
|
112
|
+
`,X=[{key:"all",labelKey:"categories.shopAll"},{key:"wearable",labelKey:"categories.wearables",expandable:!0,subs:[{key:"Head",labelKey:"categories.head",icon:"cat-head"},{key:"Upper Body",labelKey:"categories.upperBody",icon:"cat-upper"},{key:"Handwear",labelKey:"categories.handwear",icon:"cat-handwear"},{key:"Lower Body",labelKey:"categories.lowerBody",icon:"cat-lower"},{key:"Feet",labelKey:"categories.feet",icon:"cat-feet"},{key:"Accessories",labelKey:"categories.accessories",icon:"cat-accessories"},{key:"Skins",labelKey:"categories.skins",icon:"cat-skins"}]},{key:"emote",labelKey:"categories.emotes",expandable:!0,subs:[{key:"Dance",labelKey:"categories.dance",icon:"emote-dance"},{key:"Stunt",labelKey:"categories.stunt",icon:"emote-stunt"},{key:"Greetings",labelKey:"categories.greetings",icon:"emote-greetings"},{key:"Fun",labelKey:"categories.fun",icon:"emote-fun"},{key:"Poses",labelKey:"categories.poses",icon:"emote-poses"},{key:"Reactions",labelKey:"categories.reactions",icon:"emote-reactions"},{key:"Horror",labelKey:"categories.horror",icon:"emote-horror"},{key:"Miscellaneous",labelKey:"categories.miscellaneous",icon:"emote-misc"}]},{key:"names",labelKey:"categories.names"}];function Be({category:p,subCategory:x,onCategory:b,onSub:y,title:g,flat:m=!1,collections:u=!1,onCollections:w,hideAll:f=!1,extraLabelKey:s="categories.collections"}){const[v,B]=$.useState(()=>p==="wearable"?"wearable":null);function E(o){o.subs?B(l=>{const c=l!==o.key;return c&&b(o.key),c?o.key:null}):(b(o.key),B(null))}return e.jsxs(D,{"data-flat":m||void 0,children:[g?e.jsx(V,{children:g}):null,X.filter(o=>!(f&&o.key==="all")).map(o=>{const l=v===o.key&&!!o.subs,c=!u&&o.key===p;return e.jsxs(H,{children:[e.jsxs(L,{type:"button","data-cat":!0,"data-expanded":l||void 0,"data-selected":c||void 0,onClick:()=>E(o),children:[e.jsx(O,{children:d(o.labelKey)}),o.expandable?e.jsx(A,{up:l,size:24,color:j.colors.text}):null]}),o.subs?e.jsx(N,{"data-open":l||void 0,children:e.jsx(U,{children:o.subs.map(i=>e.jsx(T,{type:"button","data-sub":!0,"data-active":x===i.key||void 0,onClick:()=>y(x===i.key?null:i.key),children:e.jsxs(Q,{children:[e.jsx(q,{name:i.icon,"aria-hidden":!0}),e.jsx(J,{"data-sub-label":!0,children:d(i.labelKey)})]})},i.key))})}):null]},o.key)}),w?e.jsx(H,{children:e.jsx(L,{type:"button","data-cat":!0,"data-selected":u||void 0,onClick:w,children:e.jsx(O,{children:d(s)})})}):null]})}const{colors:k,radius:W}=j,Y=t.div`
|
|
113
113
|
position: relative;
|
|
114
114
|
display: inline-block;
|
|
115
115
|
`,Z=t.button`
|
|
@@ -424,4 +424,4 @@ import{j as e,r as $}from"./react-vyZjIDcS.js";import{s as t,I as R,t as j,J as
|
|
|
424
424
|
position: fixed;
|
|
425
425
|
inset: 0;
|
|
426
426
|
z-index: 34;
|
|
427
|
-
`,we=["common","uncommon","epic","rare","legendary","exotic","mythic","unique"],ke=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"price-asc",label:"filterBar.sortCheapest",server:"cheapest"},{key:"price-desc",label:"filterBar.sortMostExpensive",server:"most_expensive"},{key:"name",label:"filterBar.sortName",server:"name"}];function ve({panelKey:p,label:x,active:b,badge:y,panel:g,children:m}){const u=g.open===p;return e.jsxs(fe,{children:[e.jsxs(be,{type:"button","data-open":u||void 0,"data-active":b||void 0,onClick:()=>g.toggle(p),children:[x," ",y?e.jsx(ye,{children:y}):null," ",e.jsx(A,{up:u,size:24,color:j.colors.text2})]}),u?m:null]})}function ze({sort:p,onSort:x,sortOptions:b=ke,total:y,loading:g,query:m,onOpenFilters:u,chips:w,onClearChips:f,rarities:s,onToggleRarity:v,rarityOptions:B=we,anyActive:E,onClear:o,renderLeading:l,renderTrailing:c}){const[i,K]=$.useState(null),h={open:i,toggle:n=>K(C=>C===n?null:n),close:()=>K(null)},r=!!v||!!l||!!c;return e.jsxs(e.Fragment,{children:[i?e.jsx(me,{onClick:h.close,"aria-hidden":!0}):null,e.jsxs(se,{"data-testid":"browse-toolbar",children:[e.jsxs(le,{"data-testid":"browse-count",children:[g?"…":d("filterBar.count",{count:y}),m?` ${d("filterBar.forQuery",{query:m})}`:""]}),w&&w.length?e.jsxs(ce,{"data-testid":"filter-chips",children:[w.map(n=>e.jsxs(de,{type:"button",onClick:n.onRemove,"aria-label":d("filterBar.removeFilter",{filter:n.label}),children:[e.jsx("span",{children:n.label}),e.jsx(pe,{name:"close","aria-hidden":!0})]},n.key)),f?e.jsx(P,{type:"button",onClick:f,children:d("filterBar.clearAll")}):null]}):null,r?e.jsxs(ge,{children:[l==null?void 0:l(h),v?e.jsx(ve,{panelKey:"rarity",label:d("filterBar.rarity"),active:((s==null?void 0:s.length)??0)>0,badge:(s==null?void 0:s.length)||void 0,panel:h,children:e.jsx(ae,{"data-variant":"rarity",children:B.map(n=>e.jsxs(ie,{children:[e.jsx("input",{type:"checkbox",checked:(s==null?void 0:s.includes(n))??!1,onChange:()=>v(n)}),e.jsx("span",{children:n})]},n))})}):null,c==null?void 0:c(h),E?e.jsx(P,{type:"button",onClick:()=>{o==null||o(),h.close()},children:d("filterBar.clearAll")}):null]}):null,e.jsxs(xe,{children:[e.jsx(ne,{label:d("filterBar.sortBy"),ariaLabel:d("filterBar.sortBy"),value:p,options:b.map(n=>({value:n.key,label:d(n.label)})),onChange:x,align:"right",open:h.open==="sort",onOpenChange:n=>n?h.toggle("sort"):h.close()}),u?e.jsxs(ue,{type:"button",onClick:u,children:[d("filterBar.filters"),e.jsx(he,{name:"filter","aria-hidden":!0})]}):null]})]})]})}const Ce={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"],Dance:["dance"],Stunt:["stunt"],Greetings:["greetings"],Fun:["fun"],Poses:["poses"],Reactions:["reactions"],Horror:["horror"],Miscellaneous:["miscellaneous"]};export{
|
|
427
|
+
`,we=["common","uncommon","epic","rare","legendary","exotic","mythic","unique"],ke=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"price-asc",label:"filterBar.sortCheapest",server:"cheapest"},{key:"price-desc",label:"filterBar.sortMostExpensive",server:"most_expensive"},{key:"name",label:"filterBar.sortName",server:"name"}];function ve({panelKey:p,label:x,active:b,badge:y,panel:g,children:m}){const u=g.open===p;return e.jsxs(fe,{children:[e.jsxs(be,{type:"button","data-open":u||void 0,"data-active":b||void 0,onClick:()=>g.toggle(p),children:[x," ",y?e.jsx(ye,{children:y}):null," ",e.jsx(A,{up:u,size:24,color:j.colors.text2})]}),u?m:null]})}function ze({sort:p,onSort:x,sortOptions:b=ke,total:y,loading:g,query:m,onOpenFilters:u,chips:w,onClearChips:f,rarities:s,onToggleRarity:v,rarityOptions:B=we,anyActive:E,onClear:o,renderLeading:l,renderTrailing:c}){const[i,K]=$.useState(null),h={open:i,toggle:n=>K(C=>C===n?null:n),close:()=>K(null)},r=!!v||!!l||!!c;return e.jsxs(e.Fragment,{children:[i?e.jsx(me,{onClick:h.close,"aria-hidden":!0}):null,e.jsxs(se,{"data-testid":"browse-toolbar",children:[e.jsxs(le,{"data-testid":"browse-count",children:[g?"…":d("filterBar.count",{count:y}),m?` ${d("filterBar.forQuery",{query:m})}`:""]}),w&&w.length?e.jsxs(ce,{"data-testid":"filter-chips",children:[w.map(n=>e.jsxs(de,{type:"button",onClick:n.onRemove,"aria-label":d("filterBar.removeFilter",{filter:n.label}),children:[e.jsx("span",{children:n.label}),e.jsx(pe,{name:"close","aria-hidden":!0})]},n.key)),f?e.jsx(P,{type:"button",onClick:f,children:d("filterBar.clearAll")}):null]}):null,r?e.jsxs(ge,{children:[l==null?void 0:l(h),v?e.jsx(ve,{panelKey:"rarity",label:d("filterBar.rarity"),active:((s==null?void 0:s.length)??0)>0,badge:(s==null?void 0:s.length)||void 0,panel:h,children:e.jsx(ae,{"data-variant":"rarity",children:B.map(n=>e.jsxs(ie,{children:[e.jsx("input",{type:"checkbox",checked:(s==null?void 0:s.includes(n))??!1,onChange:()=>v(n)}),e.jsx("span",{children:n})]},n))})}):null,c==null?void 0:c(h),E?e.jsx(P,{type:"button",onClick:()=>{o==null||o(),h.close()},children:d("filterBar.clearAll")}):null]}):null,e.jsxs(xe,{children:[e.jsx(ne,{label:d("filterBar.sortBy"),ariaLabel:d("filterBar.sortBy"),value:p,options:b.map(n=>({value:n.key,label:d(n.label)})),onChange:x,align:"right",open:h.open==="sort",onOpenChange:n=>n?h.toggle("sort"):h.close()}),u?e.jsxs(ue,{type:"button",onClick:u,children:[d("filterBar.filters"),e.jsx(he,{name:"filter","aria-hidden":!0})]}):null]})]})]})}const Ce={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"],Dance:["dance"],Stunt:["stunt"],Greetings:["greetings"],Fun:["fun"],Poses:["poses"],Reactions:["reactions"],Horror:["horror"],Miscellaneous:["miscellaneous"]};export{Be as C,ze as F,Se as H,ae as P,we as R,ke as S,X as a,A as b,ve as c,Ke as d,Ce as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as k,a as b,c as L}from"./parseSignature-
|
|
1
|
+
import{l as k,a as b,c as L}from"./parseSignature-7zbxP3S5.js";import{s as y,b as O}from"./to-serializable-transaction-C5BoASVF.js";import{B as m,q as E,w as x,j as R}from"./prepare-contract-call-CUP20AbD.js";import{g as w,H as h}from"./rpc-Oikc4qrs.js";import{i as M}from"./get-bytecode-B5xpAv7a.js";import"./transactionReceipt-BHGI1PBX.js";import"./sha256-Dx4Jqb1P.js";import"./index-BiIZh9R9.js";import"./react-IQWs2nb4.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./hashTypedData-DP9JOjjX.js";import"./transaction-ToPxlTkC.js";import"./utils-BgbaLlfC.js";class q extends m{constructor({callbackSelector:s,cause:t,data:n,extraData:i,sender:f,urls:a}){var o;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(o=t.metaMessages)!=null&&o.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(p=>` ${w(p)}`)],` Sender: ${f}`,` Data: ${n}`,` Callback selector: ${s}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class S extends m{constructor({result:s,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(s)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends m{constructor({sender:s,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const K="0x556f1830",T={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function Q(c,{blockNumber:s,blockTag:t,data:n,to:i}){const{args:f}=O({data:n,abi:[T]}),[a,o,p,d,r]=f,{ccipRead:e}=c,u=e&&typeof(e==null?void 0:e.request)=="function"?e.request:C;try{if(!M(i,a))throw new $({sender:a,to:i});const l=o.includes(k)?await b({data:p,ccipRequest:u}):await u({data:p,sender:a,urls:o}),{data:g}=await L(c,{blockNumber:s,blockTag:t,data:x([d,R([{type:"bytes"},{type:"bytes"}],[l,r])]),to:i});return g}catch(l){throw new q({callbackSelector:d,cause:l,data:n,extraData:r,sender:a,urls:o})}}async function C({data:c,sender:s,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let f=0;f<t.length;f++){const a=t[f],o=a.includes("{data}")?"GET":"POST",p=o==="POST"?{data:c,sender:s}:void 0,d=o==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(a.replace("{sender}",s.toLowerCase()).replace("{data}",c),{body:JSON.stringify(p),headers:d,method:o});let e;if((i=r.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?e=(await r.json()).data:e=await r.text(),!r.ok){n=new h({body:p,details:e!=null&&e.error?y(e.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!E(e)){n=new S({result:e,url:a});continue}return e}catch(r){n=new h({body:p,details:r.message,url:a})}}throw n}export{C as ccipRequest,Q as offchainLookup,T as offchainLookupAbiItem,K as offchainLookupSignature};
|