@privy-io/react-auth 3.10.0 → 3.10.1
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/dist/cjs/{AccountNotFoundScreen-CCyWlTJg.js → AccountNotFoundScreen-DpWbazhN.js} +1 -1
- package/dist/cjs/{Address-Dqfr__Us.js → Address-B_I2EZZe.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-P0TvXw3I.js → AffirmativeConsentScreen-9ZT_Z3WZ.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-9DBD3cDT.js → AllowlistRejectionScreen-DkSBlXbO.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-YAI3Rdk5.js → AuthenticateWithWalletScreen-B8X_BqjA.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-UOemNgiP.js → AwaitingEvmToSolBridgingScreen-TqLrYeHi.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-CJehLUix.js → AwaitingExternalEthereumTransferScreen-Dy4mxIoc.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-D4jIGUIu.js → AwaitingPasswordlessCodeScreen-gcHc0S-p.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-3prjU9eU.js → AwaitingSolToEvmBridgingScreen-DtJ9-ogk.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-DhE8OSNF.js → BridgeNetworkSelectionView-dk0l0q-M.js} +1 -1
- package/dist/cjs/{Button-BXkfCTro.js → Button-BEaVAnh4.js} +1 -1
- package/dist/cjs/{CaptchaScreen-CJitGEVU.js → CaptchaScreen-C_mEgCfb.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-4KCVPXSq.js → CoinbaseOnrampStatusScreen-retAGRaW.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-BbfI9mx4.js → ConnectEmailForm-CfACIV6_.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-Cquqbd_0.js → ConnectLedgerScreen-B_lID1I6.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-_3c6hkf-.js → ConnectOnlyLandingScreen-ByTgLbTP.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-DVV-_bsT.js → ConnectOnlyStatusScreen-9JAufomE.js} +1 -1
- package/dist/cjs/{ConnectOrCreateScreen-1tSJt9Vh.js → ConnectOrCreateScreen-BF_OuFpX.js} +1 -1
- package/dist/cjs/{ConnectPhoneForm-DebBPzTl.js → ConnectPhoneForm-C0SpJtis.js} +1 -1
- package/dist/cjs/{ConnectWalletView-B5NqKXNc.js → ConnectWalletView-B7tEQCbZ.js} +1 -1
- package/dist/cjs/{ConnectionStatusScreen-gIwTfC-i.js → ConnectionStatusScreen-CLgTwzQu.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-Cs_HQNmA.js → CrossAppAuthScreen-M__fDCJH.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-KvzjPhN1.js → CustomLandingScreenView-D-7kPzjH.js} +1 -1
- package/dist/cjs/{DelegatedActionsConsentScreen-RTMmMNqK.js → DelegatedActionsConsentScreen-Co_Y95XG.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-BqL1cJwX.js → DelegatedActionsRevokeScreen-YAYK0-5r.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-DPqsA0eo.js → EmbeddedWalletConnectingScreen-ziUZeTLk.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-qq5vOQsX.js → EmbeddedWalletCreatedScreen-CG0y5Ke2.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-DdQfRwJI.js → EmbeddedWalletKeyExportScreen-DFqz986K.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-CZqtNy72.js → EmbeddedWalletOnAccountCreateScreen-B4WNBQna.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-D-BBWYtp.js → EmbeddedWalletPasswordUpdateScreen-Y2DUG4YB.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-CWovcQ2k.js → EmbeddedWalletPasswordUpdateSplashScreen-Dy8KboAq.js} +1 -1
- package/dist/cjs/{EnrollTotp-Cy02Mr_m.js → EnrollTotp-CasC3VFI.js} +1 -1
- package/dist/cjs/{ErrorScreen-CFGSlbsW.js → ErrorScreen-BrKj88o9.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-DKg6JjVp.js → FarcasterConnectStatusScreen-BLXWWJmD.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-DTQOhzO9.js → FarcasterSignerStatusScreen-Cr0xAGvg.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-CwMDKWEn.js → FundSolWalletWithExternalSolanaWallet-BdR31dg6.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-BGagZe1_.js → FundWalletMethodHeader-CxH_zVnz.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-FNlgv1bs.js → FundingEditAmountScreen-CP4EaEYh.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-Cbo8nBzj.js → FundingMethodSelectionScreen-BgZw0u6b.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-oNYiPE0R.js → InAppBrowserLoginNotPossible-Cg9HwW8w.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-8AY8j4Wj.js → InstallWalletScreen-DRTLmXtV.js} +1 -1
- package/dist/cjs/{LandingScreen-Cz-WmQAy.js → LandingScreen-Crcwq_g8.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-BAXPDdwj.js → LinkConflictScreen-C3dRaiQk.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-DvU88nAX.js → LinkEmailScreen-DgQb2Wg1.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-CgLhb8y2.js → LinkPasskeyScreen-52yLU_Q-.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-DLcdT331.js → LinkPhoneScreen-DQXhoFL4.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-C3sTxb4O.js → LoginFailedScreen-yCmKlIj1.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-uxjcgZsd.js → ManualTransferScreen-Dk4BMFPw.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-DGM9d9sl.js → MfaAuthEnrollmentFlowScreen-yFdG0eOh.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-Dy6rChMo.js → MfaAuthVerifyFlowScreen-BZJ1SkGe.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-BUc2dRI1.js → MfaEnrollmentFlowScreen-DSsoPwhQ.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-FQMp0vOd.js → MfaVerifyFlowScreen-CtOltjrq.js} +1 -1
- package/dist/cjs/{ModalHeader-DRaJvD2v.js → ModalHeader-n6Aqpos_.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-CeQb57ZI.js → MoonpayStatusScreen-IxyonJvb.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-2iZh0Hue.js → OAuthStatusScreen-D1DDf9yn.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-B8axkY8n.js → PasskeySelectSignupOrLogin-D4XaKl_E.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-DbbheHb2.js → PasskeyStatusScreen-CFQM6Nh7.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-DVyOnBFP.js → PasswordRecoveryScreen-DZhILc6f.js} +1 -1
- package/dist/cjs/{QrCode-C2QE_BbM.js → QrCode-D-MkB93C.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-CV1Ixabo.js → RecoveryOAuthStatusScreen-C47Vu6bz.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-DfYxuVKR.js → RecoveryPasswordCreateScreen-Cd7NUBpB.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-BSOAplv6.js → RecoverySelectionScreen-C62og2VL.js} +1 -1
- package/dist/cjs/{Screen-BZ-J4FwQ.js → Screen-J7z62u7O.js} +1 -1
- package/dist/cjs/{ScreenLayout-CfU_O3al.js → ScreenLayout-D6r13vU7.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-G8MGWul7.js → SetAutomaticRecoveryScreen-3unBTQcy.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-CXthXwRt.js → SetWalletPasswordForm-Bw9mi-NI.js} +1 -1
- package/dist/cjs/{SignRequestScreen-Q9I_D1su.js → SignRequestScreen-ZHkIJ3-6.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-Dz1By2jK.js → StandardSignAndSendTransactionScreen-A5KpXb14.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-BnHI0GwF.js → TelegramAuthScreen-qw6gcnZA.js} +1 -1
- package/dist/cjs/{TransactionDetails-Bg0E9A_6.js → TransactionDetails-6aFlRhNd.js} +1 -1
- package/dist/cjs/{TransactionErrorView-CX1_GPGO.js → TransactionErrorView-U-Fg5udU.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-tMc9GAKg.js → TransferFromWalletScreen-DnUQ6O_8.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-mTz1kP-n.js → TransferOrBridgeLoadingScreen-C3pf0mwq.js} +1 -1
- package/dist/cjs/{UpdateEmailScreen-Cy7ySLq9.js → UpdateEmailScreen-dPy98Sn_.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-iIsFR8Yy.js → UpdatePhoneScreen-CtNBijCK.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-CKPB8s3w.js → UserLimitReachedScreen-DwbMomyS.js} +1 -1
- package/dist/cjs/{WalletInfoCard-xuQPIB68.js → WalletInfoCard-DxO9lMen.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-B5Ou9Qat.js → WalletInterstitialScreen-CsZg29Za.js} +1 -1
- package/dist/cjs/{WalletLink-CzKk6PGd.js → WalletLink-J6Gw0D9R.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-D_YhHdN5.js → WalletOverflowButton-Tdaiid33.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-CcgGREUw.js → context-BPd2qxKv.js} +1 -1
- package/dist/cjs/{ethers-CWRVqVsu.js → ethers-CqH8abGL.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-JejAvbr5.js → get-is-unified-wallet-D6pn8A8g.js} +1 -1
- package/dist/cjs/{index-Cu3bv7vx.js → index-B4TzPiCM.js} +1 -1
- package/dist/cjs/{index-CWvayScJ.js → index-BsEjyknv.js} +1 -1
- package/dist/cjs/{index-iQcFLOcm.js → index-Dz7affvL.js} +4 -4
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-DkGmcQac.js → prepareFundingModalData-Do7d2fgq.js} +1 -1
- package/dist/cjs/{shared-C1pyT8u3.js → shared-CbD3Tm1u.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-BOgjAU1y.js → shouldProceedtoEmbeddedWalletCreationFlow-BjZ_f-Zv.js} +1 -1
- package/dist/cjs/{smart-wallets-C6CzRluM.js → smart-wallets-DFIScSPs.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{to-ui-error-B_KfP469.js → to-ui-error-B83yFdtm.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-create-wallet-without-fallback-BieSNO71.js → use-create-wallet-without-fallback-BSl4qcLv.js} +1 -1
- package/dist/cjs/{use-export-wallet-D1_Fnhnu.js → use-export-wallet-ABk4jSh5.js} +1 -1
- package/dist/cjs/{useActiveWallet-DTCrzsoG.js → useActiveWallet-B-Pd49hn.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-DoyKddna.js → useGetTokenPrice-Cm0Ldnuy.js} +1 -1
- package/dist/cjs/{useI18n-JB8u7I8Q.js → useI18n-5uCrUblH.js} +1 -1
- package/dist/cjs/{usePrivy-CyUYnFHC.js → usePrivy-CANb3vg4.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-BM36XRol.js → useSolanaRpcClient-BBCvBn6x.js} +1 -1
- package/dist/cjs/{useWallets-ggeQUC3m.js → useWallets-Bi_kf80t.js} +1 -1
- package/dist/cjs/{useWallets-Cwi9URDf.js → useWallets-CTdzIPwr.js} +1 -1
- package/dist/esm/{AccountNotFoundScreen-BzbvtCmu.mjs → AccountNotFoundScreen-S6aY2Bit.mjs} +1 -1
- package/dist/esm/{Address-BUmpXgsy.mjs → Address-BZeOq9QH.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-CrZKQjas.mjs → AffirmativeConsentScreen-Duhzxm_H.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-DhhfJ6ai.mjs → AllowlistRejectionScreen-BMPe-U6U.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-BN0s1mtv.mjs → AuthenticateWithWalletScreen-B0-JIF_P.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-C7mp2-Hy.mjs → AwaitingEvmToSolBridgingScreen-SpjPGAVg.mjs} +1 -1
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-EqM4Kcsu.mjs → AwaitingExternalEthereumTransferScreen-MaJkRZM2.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-NAVmxM9-.mjs → AwaitingPasswordlessCodeScreen-CpmHzcEh.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-dC9b-wlg.mjs → AwaitingSolToEvmBridgingScreen-B3HJI5qn.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-BXBCujiq.mjs → BridgeNetworkSelectionView-ITdiT09i.mjs} +1 -1
- package/dist/esm/{Button-BCV6mjvS.mjs → Button-CrJpeX0e.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-CTRyyYc9.mjs → CaptchaScreen-BEvV9l59.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-BNmvm8Bl.mjs → CoinbaseOnrampStatusScreen-CYKvPSTa.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-DtLW0rv7.mjs → ConnectEmailForm-CzIQouaK.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-BEhSz1FM.mjs → ConnectLedgerScreen-B84x_XJQ.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-ZnI9ReZJ.mjs → ConnectOnlyLandingScreen-DOUEqxQS.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-1oCuFsd6.mjs → ConnectOnlyStatusScreen-C2DOQ20l.mjs} +1 -1
- package/dist/esm/{ConnectOrCreateScreen-BOO4iaC6.mjs → ConnectOrCreateScreen-ls3v_wzh.mjs} +1 -1
- package/dist/esm/{ConnectPhoneForm-OQSgPQxP.mjs → ConnectPhoneForm-BeT3tDQM.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-Cmm9Ulis.mjs → ConnectWalletView-Ch6TwKX_.mjs} +1 -1
- package/dist/esm/{ConnectionStatusScreen-CZNBQeOQ.mjs → ConnectionStatusScreen-BFOC7TO_.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-Bno8NQSa.mjs → CrossAppAuthScreen-BbWHC41s.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-B_ZwsVad.mjs → CustomLandingScreenView-CKarTBuo.mjs} +1 -1
- package/dist/esm/{DelegatedActionsConsentScreen-B0AwZEKc.mjs → DelegatedActionsConsentScreen-h8zjYxdK.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-D0mAKxDs.mjs → DelegatedActionsRevokeScreen-C1RofLwl.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-9ADobSle.mjs → EmbeddedWalletConnectingScreen-DRLC8HnL.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-B7TnCst_.mjs → EmbeddedWalletCreatedScreen-BiqITDV_.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-Cmp2CUOa.mjs → EmbeddedWalletKeyExportScreen-lPloqMsw.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-vxaCVWy1.mjs → EmbeddedWalletOnAccountCreateScreen-DjXY44ON.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-C4dNnXVI.mjs → EmbeddedWalletPasswordUpdateScreen-CfZ6F7Xo.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-BPTp0nwT.mjs → EmbeddedWalletPasswordUpdateSplashScreen-1u-5wz14.mjs} +1 -1
- package/dist/esm/{EnrollTotp-CMtBCJbR.mjs → EnrollTotp-Ds_-ZGUd.mjs} +1 -1
- package/dist/esm/{ErrorScreen-Yi-Rhs0v.mjs → ErrorScreen-A7eS3gFZ.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-BfoDjDwg.mjs → FarcasterConnectStatusScreen-CoUFovnM.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-CsSFmDry.mjs → FarcasterSignerStatusScreen-DJMF_7OC.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BIk-6GIl.mjs → FundSolWalletWithExternalSolanaWallet-BCElohac.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-CS84Ots9.mjs → FundWalletMethodHeader-DBV2Rnau.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-CzbuYpdw.mjs → FundingEditAmountScreen-hLQBUAs6.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-DdZxdcVe.mjs → FundingMethodSelectionScreen-CQ6Kjv8P.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-COUNBN1W.mjs → InAppBrowserLoginNotPossible-B6aOQR90.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-BjprJkty.mjs → InstallWalletScreen-gwlyer4j.mjs} +1 -1
- package/dist/esm/{LandingScreen-Dp4m_c2X.mjs → LandingScreen-BkCClWy8.mjs} +1 -1
- package/dist/esm/{LinkConflictScreen-DMHPhlV7.mjs → LinkConflictScreen-C0K1Bw7W.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-D7VTyZrH.mjs → LinkEmailScreen-DDH1Ent-.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-B5LWH116.mjs → LinkPasskeyScreen-75b0FmMc.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-DdRe154C.mjs → LinkPhoneScreen-CZaTFcuX.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-CZnzwKpB.mjs → LoginFailedScreen-Csu_ek1s.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-Bn2qhDAI.mjs → ManualTransferScreen-Cn8sFLD_.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-CWMULcQb.mjs → MfaAuthEnrollmentFlowScreen-9HiNxKYV.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-B3Hw1YN-.mjs → MfaAuthVerifyFlowScreen-C9Pe8A-f.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-DcnqGJ3O.mjs → MfaEnrollmentFlowScreen-C-VfRmbP.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-BEt8Gfpb.mjs → MfaVerifyFlowScreen-BLzgEe8U.mjs} +1 -1
- package/dist/esm/{ModalHeader-BTru6YQw.mjs → ModalHeader-YP9pLMEP.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-lYMS5etL.mjs → MoonpayStatusScreen-tt17kvkR.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-DEtT_t2P.mjs → OAuthStatusScreen-DA8QEDgm.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-DgH-G2yO.mjs → PasskeySelectSignupOrLogin-BnOxpeKy.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-BOac_MoC.mjs → PasskeyStatusScreen-CqoYgdZ0.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-CT1bj8Gb.mjs → PasswordRecoveryScreen-BgFiWz_H.mjs} +1 -1
- package/dist/esm/{QrCode-Oxn5GT3C.mjs → QrCode-C0_lXRph.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-Ce6qiP-3.mjs → RecoveryOAuthStatusScreen-B698r-dZ.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen-jWT25C0X.mjs → RecoveryPasswordCreateScreen-U7uAGUdt.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-_u02vomS.mjs → RecoverySelectionScreen-CvZ8jmi2.mjs} +1 -1
- package/dist/esm/{Screen-_0H_rCdH.mjs → Screen-CpIMiJNF.mjs} +1 -1
- package/dist/esm/{ScreenLayout-CNho46nP.mjs → ScreenLayout-t3qtbQ3-.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-CUheSZ7h.mjs → SetAutomaticRecoveryScreen-BlqLhOJS.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-vaG_68V0.mjs → SetWalletPasswordForm-DMOSI5Cu.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-BNC2mYtk.mjs → SignRequestScreen-Bc6WEdOH.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-Ckxfv32q.mjs → StandardSignAndSendTransactionScreen-CNnIfg-v.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-xobB3RHK.mjs → TelegramAuthScreen-C_5cJWas.mjs} +1 -1
- package/dist/esm/{TransactionDetails-BdW2lq_B.mjs → TransactionDetails-Dpy5T9tM.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-RLIeHdul.mjs → TransactionErrorView-Dyy8JzAg.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-CLqyv8Ra.mjs → TransferFromWalletScreen-DsWLEs0t.mjs} +1 -1
- package/dist/esm/{TransferOrBridgeLoadingScreen-BY7Eot6x.mjs → TransferOrBridgeLoadingScreen-CKF3jFy2.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-BVzkFXeI.mjs → UpdateEmailScreen-DjS9mWl8.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-DZ_resri.mjs → UpdatePhoneScreen-0Wm7i3sR.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-CTmSitf0.mjs → UserLimitReachedScreen-C4J0L2bZ.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-COAfUoX0.mjs → WalletInfoCard-QxupP_e1.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-tDCVxTFi.mjs → WalletInterstitialScreen-ofT84gQY.mjs} +1 -1
- package/dist/esm/{WalletLink-Cj92ni3W.mjs → WalletLink-DFEVbh0m.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-BT_VMZP5.mjs → WalletOverflowButton-gDOg31Q5.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/{context-DRLoVlsO.mjs → context-BOoFAPna.mjs} +1 -1
- package/dist/esm/{ethers-Bl5aM5Gz.mjs → ethers-DnpKeAXc.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-gMDXpX6C.mjs → get-is-unified-wallet-Ca5aEojK.mjs} +1 -1
- package/dist/esm/{index-NL2cPmJD.mjs → index-CUao1WyN.mjs} +4 -4
- package/dist/esm/{index-DNmMGazz.mjs → index-DL7cst3F.mjs} +1 -1
- package/dist/esm/{index-D9w4UYos.mjs → index-Doo2h9wE.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-BVTcQcmw.mjs → prepareFundingModalData-CzDMa8gy.mjs} +1 -1
- package/dist/esm/{shared-D8TfUpfU.mjs → shared-C_3e8pDa.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BI33jNSF.mjs → shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs} +1 -1
- package/dist/esm/{smart-wallets-9eof3eVL.mjs → smart-wallets-DUDljgWK.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{to-ui-error-CYFXznYy.mjs → to-ui-error-BuXu0iWM.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-create-wallet-without-fallback-C0dI_RFZ.mjs → use-create-wallet-without-fallback-4kJuPNnl.mjs} +1 -1
- package/dist/esm/{use-export-wallet-B1YnjTpb.mjs → use-export-wallet-DLpQ6ZuE.mjs} +1 -1
- package/dist/esm/{useActiveWallet-BeOB3HTh.mjs → useActiveWallet-BdFIc7_K.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-CDPxMEO-.mjs → useGetTokenPrice-Cw9UgOp3.mjs} +1 -1
- package/dist/esm/{useI18n-99pFPsz3.mjs → useI18n-fcpgyVzo.mjs} +1 -1
- package/dist/esm/{usePrivy-BWtc2XF-.mjs → usePrivy-CeQ3C1KS.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-Brcjny8C.mjs → useSolanaRpcClient-DyBoxaVM.mjs} +1 -1
- package/dist/esm/{useWallets-kObl6ZLS.mjs → useWallets-3r4yfFNg.mjs} +1 -1
- package/dist/esm/{useWallets-D4IJeaog.mjs → useWallets-CZrLXHtS.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-Bmf8DxNP.mjs";import{L as d}from"./Link-DwjLfHwW.mjs";import{u as p,q as m}from"./context-
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-Bmf8DxNP.mjs";import{L as d}from"./Link-DwjLfHwW.mjs";import{u as p,q as m}from"./context-BOoFAPna.mjs";import{u,e as f,b as v,k as h}from"./internal-context-e-Eni5bG.mjs";import{a as y,u as g}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";import{S as x}from"./ScreenLayout-t3qtbQ3-.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-CUao1WyN.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./prepareFundingModalData-CzDMa8gy.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const C=({contactMethod:c,authFlow:p,appName:m="Privy",whatsAppEnabled:u=!1,onBack:f,onCodeSubmit:v,onResend:h,errorMessage:y,success:g=!1,resendCountdown:b=0,onInvalidInput:C,onClearError:S})=>{let[A,I]=n(w);a((()=>{y||I(w)}),[y]);let N=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void C?.("Code should be numeric");S?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,E-o),i=[...A.slice(0,o),...t,...A.slice(o+t.length)];I(i);let n=Math.min(Math.max(o+t.length,0),E-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(v?.(i.join("")))}};/*#__PURE__*/return e(x,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for a",u?" WhatsApp":""," message from ",m," and enter your code below."]}),icon:"email"===p?t:i,onBack:f,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),b?/*#__PURE__*/r(M,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(k,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(_,{children:[/*#__PURE__*/e("div",{children:A.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:A[o],onChange:N,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(S?.(),I([...A.slice(0,e),"",...A.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:s?"one-time-code":"off"},o)))}),/*#__PURE__*/e(j,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let E=6,w=Array(6).fill("");var S,A,I=((S=I||{})[S.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",S[S.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",S),N=((A=N||{})[A.EMAIL=0]="EMAIL",A[A.SMS=1]="SMS",A);const T={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:s}=y(),c=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:x,getAuthMeta:E,loginWithCode:w,updateWallets:S,createAnalyticsEvent:A}=u(),{authenticated:I,logout:N,user:T}=g(),{whatsAppEnabled:k}=p(),[_,j]=n(!1),[L,M]=n(null),[R,D]=n(null),[O,P]=n(0);s.current=()=>null;let W=E()?.email?0:1,U=0===W?E()?.email||"":E()?.phoneNumber||"",F=m-500;a((()=>{if(O){let e=setTimeout((()=>{P(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(I&&_&&T){if(c?.legal.requireUsersAcceptTerms&&!T.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),F);return()=>clearTimeout(e)}if(b(T,c.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),A({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),N()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),F);return()=>clearTimeout(e)}{S();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),m);return()=>clearTimeout(e)}}}),[I,_,T]),a((()=>{if(L&&0===R){let e=setTimeout((()=>{M(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,R]);/*#__PURE__*/return e(C,{contactMethod:U,authFlow:0===W?"email":"sms",appName:c?.name,whatsAppEnabled:k,onBack:()=>t(),onCodeSubmit:async e=>{try{await w(e),j(!0)}catch(e){if(e instanceof f&&e.privyErrorCode===v.INVALID_CREDENTIALS)M("Invalid or expired verification code"),D(0);else if(e instanceof f&&e.privyErrorCode===v.CANNOT_LINK_MORE_OF_TYPE)M(e.message);else{if(e instanceof f&&e.privyErrorCode===v.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof f&&e.privyErrorCode===v.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof f&&e.privyErrorCode===v.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof f&&e.privyErrorCode===v.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof f&&e.privyErrorCode===v.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:U,displayName:e.data?.data?.account?.displayName,linkMethod:0===W?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");M("Issue verifying code"),D(0)}}},onResend:async()=>{P(30),0===W?await d():await x()},errorMessage:L||void 0,success:_,resendCountdown:O,onInvalidInput:e=>{M(e),D(1)},onClearError:()=>{1===R&&(M(null),D(null))}})}};let k=/*#__PURE__*/c.div.withConfig({displayName:"PasswordlessCodeContainer",componentId:"sc-6187bfee-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;gap:16px;flex-grow:1;width:100%;"]),_=/*#__PURE__*/c.div.withConfig({displayName:"CodeInput",componentId:"sc-6187bfee-1"})(["display:flex;flex-direction:column;width:100%;gap:12px;> div:first-child{display:flex;justify-content:center;gap:0.5rem;width:100%;border-radius:var(--privy-border-radius-sm);> input{border:1px solid var(--privy-color-foreground-4);background:var(--privy-color-background);border-radius:var(--privy-border-radius-sm);padding:8px 10px;height:48px;width:40px;text-align:center;font-size:18px;font-weight:600;color:var(--privy-color-foreground);transition:all 0.2s ease;}> input:focus{border:1px solid var(--privy-color-foreground);box-shadow:0 0 0 1px var(--privy-color-foreground);}> input:invalid{border:1px solid var(--privy-color-error);}> input.success{border:1px solid var(--privy-color-border-success);background:var(--privy-color-success-bg);}> input.fail{border:1px solid var(--privy-color-border-error);background:var(--privy-color-error-bg);animation:shake 180ms;animation-iteration-count:2;}}@keyframes shake{0%{transform:translate(1px,0px);}33%{transform:translate(-1px,0px);}67%{transform:translate(-1px,0px);}100%{transform:translate(1px,0px);}}"]),j=/*#__PURE__*/c.div.withConfig({displayName:"InputHelp",componentId:"sc-6187bfee-2"})(["line-height:20px;min-height:20px;font-size:14px;font-weight:400;color:",";display:flex;justify-content:center;width:100%;text-align:center;"],(e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent")),L=/*#__PURE__*/c.div.withConfig({displayName:"HelpTextContainer",componentId:"sc-6187bfee-3"})(["display:flex;gap:8px;align-items:center;justify-content:center;width:100%;color:var(--privy-color-foreground-2);"]),M=/*#__PURE__*/c.div.withConfig({displayName:"Badge",componentId:"sc-6187bfee-4"})(["display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-sm);padding:2px 8px;gap:4px;background:var(--privy-color-background-2);color:var(--privy-color-foreground-2);"]),R=/*#__PURE__*/c.span.withConfig({displayName:"BoldWrappingSpan",componentId:"sc-6187bfee-5"})(["font-weight:500;word-break:break-all;color:var(--privy-color-foreground);"]);export{T as AwaitingPasswordlessCodeScreen,C as AwaitingPasswordlessCodeScreenView,T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-Bmf8DxNP.mjs";import{B as p}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-Bmf8DxNP.mjs";import{B as p}from"./ModalHeader-YP9pLMEP.mjs";import{C as f}from"./ScreenHeader-Biz1wq02.mjs";import{t as h}from"./FundWalletMethodHeader-DBV2Rnau.mjs";import{N as g}from"./index-CJMgUOnw.mjs";import{u as v,t as w}from"./context-BOoFAPna.mjs";import{u as I,a as C,b as T}from"./internal-context-e-Eni5bG.mjs";import{Q as y,a6 as S}from"./useActiveWallet-BdFIc7_K.mjs";import{a as j}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as k}from"./reservoir-kvLjIrEo.mjs";import{c as x,S as W}from"./usePrivy-CeQ3C1KS.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-CKF3jFy2.mjs";import{t as L}from"./prepareFundingModalData-CzDMa8gy.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-CG0lSY5Z.mjs";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Address-BZeOq9QH.mjs";import"lucide-react";import"./Button-CrJpeX0e.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const D={component:function(){let D=v(),{closePrivyModal:B,createAnalyticsEvent:M,connectors:P}=I(),{navigate:$,setModalData:H,data:q}=j(),O=v(),_=o(!1),Q=x(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!q?.funding||"ethereum"!==q.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=q.funding,se=q.funding.address,de=q.funding.erc20Address,le=q.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new C("Unable to find source wallet connector");return new l({wallet:n.wallet,account:r})}({connectors:P,connectedWalletAddress:re?.address||""})),[re,P]),me=i((()=>{let e=Q(W);if(!e)throw new C("Unable to load solana plugin");let t=D.solanaRpcs["solana:mainnet"];if(!t)throw new C("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=y(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||_.current)return;let e=Q(W);if(!e)return void J(new C("Unable to solana plugin"));_.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):d(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:O.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!n)return void J(new C(`Unable to fetch quotes for bridging. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))):void J(new C(`Wallet ${S(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,T.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new C("Transaction was rejected by the user",void 0,T.TRANSACTION_FAILURE));J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))}else J(new C(`Unable to select bridge option from quotes. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),k({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),M({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(H({funding:q?.funding,solanaFundingData:q?.solanaFundingData,sendTransaction:q?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),$("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${le} to your ${O.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
2
2
|
/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{D as AwaitingSolToEvmBridgingScreen,D as default};
|
package/dist/esm/{BridgeNetworkSelectionView-BXBCujiq.mjs → BridgeNetworkSelectionView-ITdiT09i.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as o,formatWalletAddress as a}from"@privy-io/js-sdk-core";import{a as n}from"./getPublicClient-A9RSftUZ.mjs";import{g as i}from"./getErc20Balance-CaKjNAs9.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{a as l}from"./Button-
|
|
1
|
+
import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as o,formatWalletAddress as a}from"@privy-io/js-sdk-core";import{a as n}from"./getPublicClient-A9RSftUZ.mjs";import{g as i}from"./getErc20Balance-CaKjNAs9.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{a as l}from"./Button-CrJpeX0e.mjs";import{b as d,R as p}from"./Layouts-Bmf8DxNP.mjs";import{B as h}from"./ModalHeader-YP9pLMEP.mjs";import{t as f}from"./FundWalletMethodHeader-DBV2Rnau.mjs";import{R as g}from"./Row-CG0lSY5Z.mjs";import{E as u}from"./ErrorMessage-Cx8GKGhL.mjs";import{V as b,L as y}from"./Value-B4M62ove.mjs";import{S as v}from"./Subtitle-DkvfP2Ev.mjs";import{T as C}from"./Title-D0pfZff-.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as j}from"styled-components";import{g as N}from"./getChainName-DjpPdUSc.mjs";import{C as I}from"./Chip-Bsgj4Yc-.mjs";import{N as k}from"./NetworkIcon-B48ilzF8.mjs";import{B as x,a as B}from"./shared-CtYf3O54.mjs";import{Menu as T,MenuButton as S,MenuItems as A,MenuItem as $}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-DnpKeAXc.mjs";import{F as P,a as W,b as L,c as R,d as H}from"./styles-DY17fuAX.mjs";const Q=({chains:a,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(a.map((async a=>{let l=e({chain:a,transport:r(n(a,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),p=null,h=o[a.id];if(m&&h){let{balance:e}=await i({address:s,chain:a,rpcConfig:c,appId:t,erc20Address:h});p=e}return{balance:d,erc20Balance:p,erc20Address:h,chain:a}}))),U=({balance:e,className:r,chain:o})=>/*#__PURE__*/t(x,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:o})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(z,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:N(r)})]}),/*#__PURE__*/s(I,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let z=/*#__PURE__*/j.div.withConfig({displayName:"Container",componentId:"sc-63f80cee-0"})(["display:flex;align-items:center;"]),D=/*#__PURE__*/j.div.withConfig({displayName:"IconContainer",componentId:"sc-63f80cee-1"})(["height:0.75rem;width:0.75rem;margin-right:0.2rem;"]),O=/*#__PURE__*/j(k).withConfig({displayName:"StyledNetworkIcon",componentId:"sc-63f80cee-2"})(["height:1.25rem;width:1.25rem;display:inline-block;margin-right:0.5rem;border-radius:4px;"]);const Y=({options:e,onSelect:r,selected:o,className:a})=>/*#__PURE__*/s(T,{as:q,children:[/*#__PURE__*/s(S,{as:X,children:[/*#__PURE__*/t(V,{balance:o.balance,chain:o.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(A,{as:G,className:a,children:e.map(((e,o)=>/*#__PURE__*/t($,{as:J,onClick:()=>r(o),children:/*#__PURE__*/t(V,{balance:e.balance,chain:e.chain})},o)))})]});let q=/*#__PURE__*/j.div.withConfig({displayName:"Wrapper",componentId:"sc-31c00f79-0"})(["width:100%;position:relative;"]),G=/*#__PURE__*/j.div.withConfig({displayName:"Popover",componentId:"sc-31c00f79-1"})(["width:100%;margin-top:0.5rem;position:absolute;background-color:var(--privy-color-background);border-radius:var(--privy-border-radius-md);overflow-x:hidden;overflow-y:auto;box-shadow:0px 1px 2px 0px rgba(16,24,40,0.05);max-height:11.75rem;&&{border:solid 1px var(--privy-color-foreground-4);}z-index:1;"]),J=/*#__PURE__*/j.button.withConfig({displayName:"Button",componentId:"sc-31c00f79-2"})(["width:100%;display:flex;justify-content:space-between;&&{padding:1rem;}:not(:last-child){border-bottom:solid 1px var(--privy-color-foreground-4);}:hover{background:var(--privy-color-background-2);}"]),K=/*#__PURE__*/j(E).withConfig({displayName:"StyledChevronIcon",componentId:"sc-31c00f79-3"})(["height:1rem;margin-left:0.5rem;"]),X=/*#__PURE__*/j.button.withConfig({displayName:"StyledMenuButton",componentId:"sc-31c00f79-4"})([""," span{margin-left:auto;}","{transition:rotate 100ms ease-in;}&[aria-expanded='true']{","{rotate:-180deg;}}"],B,K,K);const Z=({displayName:e,errorMessage:r,configuredFundingChain:o,formattedBalance:n,fundingAmount:i,fundingCurrency:b,fundingAmountInUsd:w,options:j,selectedOption:I,isPreparing:k,isSubmitting:x,addressToFund:B,fundingWalletAddress:T,onSubmit:S,onSelect:A,onAmountChange:$,erc20ContractInfo:E})=>{let Q=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(d,{}),/*#__PURE__*/t(C,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof o?o.name:N(o)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(W,{onClick:()=>Q.current?.focus(),children:[/*#__PURE__*/t(L,{ref:Q,value:i,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",o=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(o))return void $("0");$(o.toString()+e)}}}),/*#__PURE__*/t(R,{children:b})]}),w&&/*#__PURE__*/t(H,{children:w})]}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:a(T)})]}),/*#__PURE__*/t(Y,{selected:{chain:I.chain,balance:I.isErc20Quote?F({amount:I.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(I.balance,I.chain.nativeCurrency.symbol,3,!0)},options:j.map((({chain:e,balance:r,isErc20Quote:o,erc20Balance:a})=>({chain:e,balance:o?F({amount:a??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:A}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:a(B)})]}),/*#__PURE__*/t(U,{chain:o,balance:n}),/*#__PURE__*/t(u,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:x||k,disabled:k||x,onClick:S,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(h,{})]})};export{Z as B,Q as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{G as d}from"./useActiveWallet-
|
|
1
|
+
import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{G as d}from"./useActiveWallet-BdFIc7_K.mjs";const c=({variant:o="primary",size:e="lg",children:a,success:l,...d})=>{switch(o){case"secondary":/*#__PURE__*/return r(b,{size:e,...d,children:a});case"error":/*#__PURE__*/return r(b,{$warn:!0,size:e,...d,children:a});case"muted":/*#__PURE__*/return r(p,{size:e,...d,children:a});default:/*#__PURE__*/return r(n,{size:e,success:l,...d,children:a})}},i=/*#__PURE__*/a.button.withConfig({displayName:"BaseButton",componentId:"sc-e537b447-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:auto;cursor:pointer;border-radius:",";font-size:14px;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{height:",";padding:0 ",";}"],(({$size:r})=>"sm"===r?"6px":"var(--privy-border-radius-sm)"),(({$size:r})=>"sm"===r?"28px":"48px"),(({$size:r})=>"sm"===r?"10px":"16px")),n=({children:a,loading:l,disabled:c,success:i,size:n="lg",loadingText:t="Loading...",as:s,onClick:b,...p})=>{let u="a"===s,y=!(!l&&!c);/*#__PURE__*/return r(v,{as:s,disabled:u?void 0:y,"aria-disabled":u?y:void 0,$success:i,$size:n,onClick:r=>{u&&y?r.preventDefault():b?.(r)},...p,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),t?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:t}):null]}):a})},t=({children:o,loading:e,disabled:a,...l})=>/*#__PURE__*/r(s,{disabled:a,...l,children:e?/*#__PURE__*/r(d,{color:"var(--privy-color-foreground-accent)"}):o});let s=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e537b447-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;color:var(--privy-color-foreground-disabled);background-color:var(--privy-color-accent-dark);}"]),v=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e537b447-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const b=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(u,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})},p=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(y,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})};let u=/*#__PURE__*/a(i).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e537b447-3"})(["&&{border-width:1px;border-style:solid;border-color:",";background-color:var(--privy-color-background);color:",";transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:",";background-color:",";color:",";}&:active{border-color:",";background-color:",";color:",";}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive-hover)"),(r=>r.$warn?"var(--privy-color-error-light)":"var(--privy-color-info-bg-hover)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive)"),(r=>r.$warn?"var(--privy-color-error-bg-hover)":"var(--privy-color-info-bg)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"]))),y=/*#__PURE__*/a(i).withConfig({displayName:"StyledMutedButton",componentId:"sc-e537b447-4"})(["&&{border-width:1px;border-style:solid;border-color:var(--privy-color-border-default);background-color:transparent;color:var(--privy-color-text-muted);transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg-hover);color:var(--privy-color-foreground-2);}&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg);color:var(--privy-color-foreground-2);}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const g=({children:e,onClick:a,disabled:l,isSubmitting:c,...i})=>/*#__PURE__*/o(f,{$isSubmitting:c,onClick:a,disabled:l,...i,children:[/*#__PURE__*/r("span",{children:e}),
|
|
2
2
|
/*#__PURE__*/r("span",{children:/*#__PURE__*/r(d,{})})]});let f=/*#__PURE__*/a.button.withConfig({displayName:"StyledEmbeddedButton",componentId:"sc-e537b447-7"})(["&&{color:var(--privy-color-accent);font-size:16px;font-style:normal;font-weight:500;line-height:24px;cursor:pointer;border-radius:0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px;border:none;transition:color 200ms ease;@media (min-width:441px){font-size:14px;}:hover{color:var(--privy-color-accent-dark);}&& > :first-child{opacity:",";}&& > :last-child{position:absolute;display:flex;top:50%;left:50%;transform:translate3d(-50%,-50%,0);opacity:",";}:disabled,:hover:disabled{color:var(--privy-color-foreground-disabled);cursor:not-allowed;}}"],(r=>r.$isSubmitting?0:1),(r=>r.$isSubmitting?1:0));export{c as B,g as E,n as P,b as S,t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-CUao1WyN.mjs";import{a as m}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as u}from"./ScreenLayout-t3qtbQ3-.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./context-BOoFAPna.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const p=({status:o,title:a,description:s,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:a,subtitle:s,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=a(!0);s((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,k]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),A=r?.captchaModalData,M=async e=>{try{await(A?.callback(e)),A?.onSuccessNavigateTo&&i(A?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(A?.onErrorNavigateTo||"ErrorScreen",!1)}};s((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||A?.userIntentRequired||M(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),s((()=>{if(!C)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),A?.userIntentRequired||setTimeout((()=>{I(!0),M(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:A?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),M(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),y(),h();let e=await g();!e||A?.userIntentRequired||M(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
|
package/dist/esm/{CoinbaseOnrampStatusScreen-BNmvm8Bl.mjs → CoinbaseOnrampStatusScreen-CYKvPSTa.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{P as l}from"./Button-
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{P as l}from"./Button-CrJpeX0e.mjs";import{a as d}from"./Layouts-Bmf8DxNP.mjs";import{L as p,a7 as u}from"./useActiveWallet-BdFIc7_K.mjs";import{M as f,B as g}from"./ModalHeader-YP9pLMEP.mjs";import{u as h}from"./internal-context-e-Eni5bG.mjs";import{a as v}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{G as b}from"./index-CUao1WyN.mjs";import"zustand";import"./context-BOoFAPna.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:l,createAnalyticsEvent:d,client:p}=h(),[u,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:I,popup:k}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===u||"pending-after-flow"===u){let e=setInterval((async()=>{if(I)try{let{status:e}=await p.getCoinbaseOnRampStatus({partnerUserId:I});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");k?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),d({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[I,k,u]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(f,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:u,onClickCta:l}),/*#__PURE__*/t(g,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(k,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(d,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(I,{children:a})]})]}),s&&/*#__PURE__*/t(l,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(p,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},I=/*#__PURE__*/m.p.withConfig({displayName:"StatusBody",componentId:"sc-e4350fdc-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),k=/*#__PURE__*/m.div.withConfig({displayName:"ConnectContainer",componentId:"sc-e4350fdc-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{w as CoinbaseOnrampStatusScreen,w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-
|
|
1
|
+
import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-BOoFAPna.mjs";import{u as c,c as m,b as d}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./index-CUao1WyN.mjs";import{u,a as h}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-BdFIc7_K.mjs";import{E as S,P as E}from"./Button-CrJpeX0e.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";import{I as v,a as k}from"./EmailInputForm-B4hjCxRU.mjs";import{E as C}from"./ErrorMessage-Cx8GKGhL.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[A,I]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:T}=c(),{navigate:M,setModalData:D,currentScreen:N,data:U}=h(),{enabled:W,token:F}=p(),[R,V]=o(!1),{accountType:$}=g(),_=s();n((()=>{!y&&_.disablePlusEmails&&U?.inlineError?.error instanceof m&&U?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let q=f(y),z=A||!q,B=()=>{var e;D({login:U?.login,inlineError:void 0}),!W||F||L?(e=F,I(!0),T({email:y,captchaToken:e,disableSignup:U?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{D({errorModalData:{error:e,previousScreen:N||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{I(!1)}))):(D({captchaModalData:{callback:e=>T({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/r(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/r(P,{children:/*#__PURE__*/r(i,{})}),/*#__PURE__*/r("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>V(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&B()},value:y,autoComplete:"email"}),"email"!==$||R?t.stacked?/*#__PURE__*/r("span",{}):/*#__PURE__*/r(S,{isSubmitting:A,onClick:B,disabled:z,children:"Submit"}):/*#__PURE__*/r(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/r(E,{loadingText:null,loading:A,disabled:z,onClick:B,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=/*#__PURE__*/l(y).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-30d3bab7-0"})(["display:inline-flex;"]);export{j as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as n}from"./ScreenLayout-t3qtbQ3-.mjs";import{F as m}from"./index-CUao1WyN.mjs";import"viem";import"react";import"./context-BOoFAPna.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./Button-CrJpeX0e.mjs";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-54536274-0"})(["display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--screen-space);"]),d=/*#__PURE__*/o.span.withConfig({displayName:"SubtitleText",componentId:"sc-54536274-1"})(["white-space:pre-wrap;"]);export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,s as ConnectLedgerScreenView,c as default};
|
package/dist/esm/{ConnectOnlyLandingScreen-ZnI9ReZJ.mjs → ConnectOnlyLandingScreen-DOUEqxQS.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-BOoFAPna.mjs";import{u as r,c as n,b as a}from"./internal-context-e-Eni5bG.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{i as c}from"./ConnectWalletView-Ch6TwKX_.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./Button-CrJpeX0e.mjs";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./QrCode-C0_lXRph.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-fcpgyVzo.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CpIMiJNF.mjs";import"./index-CJMgUOnw.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=i(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
package/dist/esm/{ConnectOnlyStatusScreen-1oCuFsd6.mjs → ConnectOnlyStatusScreen-C2DOQ20l.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-CzDMa8gy.mjs";import{q as i}from"./context-BOoFAPna.mjs";import{Q as a}from"./useActiveWallet-BdFIc7_K.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as c}from"./ScreenLayout-t3qtbQ3-.mjs";import{B as m}from"./index-CUao1WyN.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-BFOC7TO_.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"ofetch";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DwjLfHwW.mjs";import"./useI18n-fcpgyVzo.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,R="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(v,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let T=j?.connector?.connectorType||"injected",B=j?.connector?.walletClientType||"unknown",W=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===W?W.toLowerCase():W;n=S?`Successfully connected with ${E}`:h?h.message:R?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:R?_="Switch your wallet to the requested network.":"metamask"===B&&r?_="Click to continue to open and connect MetaMask.":"metamask"===B?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:W,walletLogo:M,success:S,errorMessage:h,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-BOoFAPna.mjs";import{C as r,L as i}from"./CustomLandingScreenView-CKarTBuo.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-Ca5aEojK.mjs";import"./useWallets-3r4yfFNg.mjs";import"./index-CUao1WyN.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-Ch6TwKX_.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./Button-CrJpeX0e.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./QrCode-C0_lXRph.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-fcpgyVzo.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CpIMiJNF.mjs";import"./index-CJMgUOnw.mjs";import"lucide-react";import"./ConnectEmailForm-CzIQouaK.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-BeT3tDQM.mjs";import"./twitter-6jomarO4.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-gDOg31Q5.mjs";import"./ScreenLayout-t3qtbQ3-.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-
|
|
1
|
+
import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-BOoFAPna.mjs";import{F as m}from"./useActiveWallet-BdFIc7_K.mjs";import{E as v,P as x}from"./Button-CrJpeX0e.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";const f=({value:n,onChange:r})=>/*#__PURE__*/o("select",{value:n,onChange:r,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/r(((r,a)=>{let d=g(),[w,k]=t(!1),{accountType:N}=m(),[P,S]=t(""),[$,j]=t(d?.intl.defaultCountry??"US"),I=l(P,$),V=c($),z=p($),L=u($),q=!I,[B,E]=t(!1),D=L.length,F=o=>{let e=o.target.value;j(e),S(""),r.onChange&&r.onChange({rawPhoneNumber:P,qualifiedPhoneNumber:s(P,e),countryCode:e,isValid:l(P,$)})},R=(o,e)=>{try{let n=o.replace(/\D/g,"")===P.replace(/\D/g,"")?o:V.input(o);S(n),r.onChange&&r.onChange({rawPhoneNumber:n,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},T=()=>{E(!0);let o=s(P,$);r.onSubmit({rawPhoneNumber:P,qualifiedPhoneNumber:o,countryCode:$,isValid:l(P,$)}).finally((()=>E(!1)))};return i((()=>{if(r.defaultValue){let o=h(r.defaultValue);V.reset(),F({target:{value:o.countryCode}}),R(o.phone,o.countryCode)}}),[r.defaultValue]),/*#__PURE__*/e(n,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:D,$stacked:r.stacked,children:[/*#__PURE__*/o(f,{value:$,onChange:F}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:z,onFocus:()=>k(!0),onChange:o=>{R(o.target.value,$)},onKeyUp:o=>{"Enter"===o.key&&T()},value:P,autoComplete:"tel"}),"phone"!==N||w||r.hideRecent?r.stacked||r.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(v,{isSubmitting:B,onClick:T,disabled:q,children:"Submit"}):/*#__PURE__*/o(b,{color:"gray",children:"Recent"})]})}),r.stacked&&!r.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:B,loadingText:null,onClick:T,disabled:q,children:"Submit"}):null]})}));let y=/*#__PURE__*/a.div.withConfig({displayName:"InputContainer",componentId:"sc-545daacd-0"})(["width:100%;"]),C=/*#__PURE__*/a.label.withConfig({displayName:"PhoneNumberInput",componentId:"sc-545daacd-1"})(["--country-code-dropdown-width:calc(54px + calc(12 * ","px));--phone-input-extra-padding-left:calc(12px + calc(3 * ","px));display:block;position:relative;width:100%;@media (min-width:441px){--country-code-dropdown-width:calc(52px + calc(10 * ","px));}&& > select{font-size:16px;height:24px;position:absolute;margin:13px calc(var(--country-code-dropdown-width) / 4);line-height:24px;width:var(--country-code-dropdown-width);background-color:var(--privy-color-background);background-size:auto;background-position-x:right;cursor:pointer;@media (min-width:441px){font-size:14px;width:var(--country-code-dropdown-width);}:focus{outline:none;box-shadow:none;}}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:calc(100% - var(--country-code-dropdown-width));padding:12px 88px 12px calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));padding-right:",";flex-grow:1;background:var(--privy-color-background);border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);width:100%;:focus{outline:none;border-color:var(--privy-color-accent);}:autofill,:-webkit-autofill{background:var(--privy-color-background);}@media (min-width:441px){font-size:14px;padding-right:78px;}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;border-color:var(--privy-color-accent);}}&& > input::placeholder{color:var(--privy-color-foreground-3);}"],(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$stacked?"16px":"88px"));export{w as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as i}from"@heroicons/react/24/outline";import{useVirtualizer as l}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{B as m}from"./Button-BCV6mjvS.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as u}from"./copy-Bx2Jwc5_.mjs";import{L as g}from"./Link-DwjLfHwW.mjs";import{T as w}from"./ModalHeader-BTru6YQw.mjs";import{Q as f}from"./QrCode-Oxn5GT3C.mjs";import{E as y}from"./EmailInputForm-B4hjCxRU.mjs";import{u as v,q as b}from"./context-DRLoVlsO.mjs";import{u as C}from"./useI18n-99pFPsz3.mjs";import{M as x,q as W,d as k,e as T,K as _,V as z,w as S,S as L}from"./useActiveWallet-BeOB3HTh.mjs";import{u as I,P as N,b as A}from"./internal-context-e-Eni5bG.mjs";import{W as B}from"./WalletCards-DH1rqayz.mjs";import{W as E,h as j}from"./prepareFundingModalData-BVTcQcmw.mjs";import{S as O}from"./Screen-_0H_rCdH.mjs";let q=/*#__PURE__*/h.button.withConfig({displayName:"CopyTextButton",componentId:"sc-4b0620dc-0"})(["display:flex;align-items:center;gap:0.5rem;&:hover{text-decoration:underline;}svg{width:0.875rem;height:0.875rem;}"]),U=/*#__PURE__*/h.span.withConfig({displayName:"CopiedText",componentId:"sc-4b0620dc-1"})(["display:flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:var(--privy-color-foreground-2);"]),F=/*#__PURE__*/h(p).withConfig({displayName:"GreenCheck",componentId:"sc-4b0620dc-2"})(["color:var(--privy-color-success);"]),M=/*#__PURE__*/h(u).withConfig({displayName:"StyledCopy",componentId:"sc-4b0620dc-3"})(["color:var(--privy-color-foreground-3);opactiy:0.5;"]);function $({children:t,iconOnly:i,value:l,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(q,{...r,onClick:()=>{navigator.clipboard.writeText(l||t).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(U,{children:[/*#__PURE__*/n(F,{})," ",!i&&"Copied"]}):!o&&/*#__PURE__*/n(M,{})]})}const D={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:x,md:x}}};class P{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=P.normalize(e);return this.normalizedAllowList.some((e=>t===P.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,i=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=P.normalize(e.walletClientType);i({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"]})}));let l=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||l||n.mobile.native||n.mobile.universal||W[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||W[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=P.normalize(n.slug),r=D[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t}),t.some((e=>e.includes("solana:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t})})),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:E,url:void 0,chains:["eip155"]}),this.includeWalletConnectQrSolana&&a&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:E,url:void 0,chains:["solana"]});let o=Array.from(t.values());o.forEach((e=>{let n=D[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(P.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{let t=P.normalize(e.id),i=P.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=r.has(t),a=r.has(i);return l&&a?r.get(t)-r.get(i):l?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var Q=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),H=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const R=/*#__PURE__*/h.div.withConfig({displayName:"Header",componentId:"sc-9b65f2b6-0"})(["display:flex;justify-content:space-between;align-items:center;"]),V=/*#__PURE__*/h.button.withConfig({displayName:"CloseButton",componentId:"sc-9b65f2b6-1"})(["padding:0.25rem;height:30px;width:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-full);background:var(--privy-color-background-2);"]),G=/*#__PURE__*/h.div.withConfig({displayName:"WalletIconWithActiveIndicator",componentId:"sc-9b65f2b6-2"})(["position:relative;display:inline-flex;align-items:center;&::after{content:' ';border-radius:var(--privy-border-radius-full);height:6px;width:6px;background-color:var(--privy-color-icon-success);position:absolute;right:-3px;top:-3px;}"]),Y=/*#__PURE__*/h.img.withConfig({displayName:"WalletIcon",componentId:"sc-9b65f2b6-3"})(["width:32px;height:32px;border-radius:0.25rem;object-fit:contain;"]),K=/*#__PURE__*/h.span.withConfig({displayName:"Chip",componentId:"sc-9b65f2b6-4"})(["display:flex;gap:0.25rem;align-items:center;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);background-color:var(--privy-color-background-2);svg{width:100%;max-width:1rem;max-height:1rem;stroke-width:2;}"]),J=/*#__PURE__*/h.div.withConfig({displayName:"ScrollContainer",componentId:"sc-9b65f2b6-5"})(["display:flex;flex-direction:column;gap:0.5rem;max-height:24rem;overflow-y:scroll;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));function X({enabled:e=!0,walletList:n,walletChainType:t}){let i=v(),{connectors:l}=I(),{listings:r,loading:c}=k(e),s=t??i.appearance.walletChainType,d=n??i.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:p}=o((()=>h.getWallets(l,r)),[h,l,r]),[u,g]=a(""),w=o((()=>u?m.filter((e=>e.label.toLowerCase().includes(u.toLowerCase()))):m),[u,m]),[f,y]=a();return{selected:f,setSelected:y,search:u,setSearch:g,loadingListings:c,wallets:w,walletCount:p}}let Z=e=>!e||"string"!=typeof e&&(e instanceof S||e instanceof L);const ee=({index:i,style:l,data:a,recent:o})=>{let r=a.wallets[i],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...l,boxSizing:"border-box"};return r?/*#__PURE__*/e(le,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(G,{children:"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(K,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(H,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(H,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:u,preSelectedWalletId:x,hideHeader:k,...E})=>{let q=v(),{t:U}=C(),{connectors:F}=I(),M=E.walletChainType||q.appearance.walletChainType,$=E.walletList||q.appearance?.walletList,{onBack:R,onClose:V,app:G}=E,{selected:K,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:pe,wallets:ue,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:i,walletList:l,walletChainType:c,app:s}){let h=v(),{connectors:m}=I(),{t:p}=C(),{wallets:u,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:T(l??[]),walletList:l,walletChainType:c}),[W,k]=a(),[z,S]=a(),[L,A]=a(),[B,E]=a(),j=!y&&!L&&!B,O=j&&(g>6||w.length>0),q=m.find((e=>"wallet_connect_v2"===e.connectorType)),U=r((async(n,t)=>{if(n){if(B?.connector===n&&"loading"===W)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(k("loading"),"string"==typeof n)return E({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");E({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return k("error"),S(void 0),void i?.(new N("Unable to connect wallet"));k("success"),S(void 0),_({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");k("error"),S(n?.privyErrorCode),i?.(n instanceof Error?n:new N(n?.message||"Unable to connect wallet"))}}}),[h.id,e,B,W]),F=r((()=>L?(k(void 0),S(void 0),E(void 0),void A(void 0)):B?(k(void 0),S(void 0),void E(void 0)):y?(k(void 0),S(void 0),E(void 0),void x(void 0)):"error"===W||"loading"===W?(k(void 0),S(void 0),void E(void 0)):void n?.()),[L,B,y,W,n]),M=o((()=>B?.connector===q&&L&&d&&B?.name?p("connectWallet.goToWallet",{walletName:B.name}):B?.connector===q&&L&&B?.name?p("connectWallet.scanToConnect",{walletName:B.name}):L&&B?.name?p(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:B.name}):"string"==typeof B?.connector?p("connectWallet.openOrInstall",{walletName:B.name}):y&&!B?p("connectWallet.selectNetwork"):B?null:p("connectWallet.selectYourWallet")),[B,L,y,q,p]);return{selected:y,setSelected:x,qrUrl:L,setQrUrl:A,connecting:B,uiState:W,errorCode:z,search:w,setSearch:f,wallets:u,walletCount:g,wc:q,isInitialConnectView:j,showSearchBar:O,title:M,handleConnect:U,handleBack:F,onClose:t,onConnect:e,app:s}}({...E,walletList:$,walletChainType:M}),We=F.find((e=>"wallet_connect_v2"===e.connectorType)),ke=F.find((e=>"walletconnect_solana"===e.walletBranding.id)),Te=c(null),_e=l({count:ue.length,getScrollElement:()=>Te.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==M&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==M&&e.chains?.some((e=>e.startsWith("solana"))),i=()=>{let n=e.id;return W[n]||W[`${n}_wallet`]},l=n=>{let t=P.normalize(e.id);return F.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof S||"solana"===e.chainType&&e instanceof L)))},a=async()=>{if(!We||!e.listing)return!1;let n=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;return We.setWalletEntry(n,de),await We.resetConnection(e.id),await we(We,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!ke&&!!e.listing&&(await ke.disconnect(),ke.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(ke,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=i();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!u,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=l("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&i()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=l("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(We&&"wallet_connect_v2"===e.connector?.connectorType)if(await We.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;We.setWalletEntry(n,de)}else We.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return ke&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ke.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ke.wallet.setWalletEntry(e.listing,de):ke.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[We,ke,we,J,de,M,u,F]);return s((()=>{if(!x)return;let e=ue.find((({id:e})=>e===x));e&&ze(e).catch(console.error)}),[x]),/*#__PURE__*/e(O,{className:h,children:[/*#__PURE__*/n(O.Header,{icon:k&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:B,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:k&&ve?void 0:he&&!ne?U("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?U("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:k&&ve?void 0:he&&!ne&&"string"==typeof he.connector?U("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?pe===A.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:U("connectWallet.tryConnectingAgain"):U("connectionStatus.connectOneWallet"):ve?p??(G?U("connectWallet.connectToAccount",{appName:G.name}):null):null,showBack:!!R||!ve,showClose:!0,onBack:R||fe,onClose:V}),/*#__PURE__*/e(O.Body,{ref:Te,$colorScheme:q.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(z,{children:/*#__PURE__*/n(i,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:U("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:U("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:U("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:j}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(g,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(ie,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(le,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(Y,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),K?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>ze({...K,chains:K.chains.filter((e=>e.startsWith("eip155")))}),children:[K.icon&&("string"==typeof K.icon?/*#__PURE__*/n(Y,{src:K.icon}):/*#__PURE__*/n(K.icon,{})),/*#__PURE__*/n(re,{children:K.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),K?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>ze({...K,chains:K.chains.filter((e=>e.startsWith("solana")))}),children:[K.icon&&("string"==typeof K.icon?/*#__PURE__*/n(Y,{src:K.icon}):/*#__PURE__*/n(K.icon,{})),/*#__PURE__*/n(re,{children:K.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(H,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:U("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(ue.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${_e.getTotalSize()}px`,width:"100%",position:"relative"},children:_e.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:ue,walletChainType:M,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(O.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(O.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:U("connectWallet.retry")})}),!!(G&&G.legal.privacyPolicyUrl&&G.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(w,{app:G,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(O.Watermark,{})]})]})};let te=/*#__PURE__*/h.div.withConfig({displayName:"StickySearchContainer",componentId:"sc-5a8fc7d8-0"})(["position:sticky;margin-top:-3px;padding-top:3px;top:-3px;z-index:1;background:var(--privy-color-background);padding-bottom:calc(var(--screen-space) / 2);"]),ie=/*#__PURE__*/h.div.withConfig({displayName:"WalletListContainer",componentId:"sc-5a8fc7d8-1"})(["display:flex;flex-direction:column;gap:","px;"],5),le=/*#__PURE__*/h.button.withConfig({displayName:"Button",componentId:"sc-5a8fc7d8-2"})(["&&{gap:0.5rem;align-items:center;display:flex;position:relative;text-align:left;font-weight:500;transition:background 200ms ease-in;width:calc(100% - 4px);border-radius:var(--privy-border-radius-md);padding:0.75em;border:1px solid var(--privy-color-foreground-4);justify-content:space-between;}&:hover{background:var(--privy-color-background-2);}"]),ae=/*#__PURE__*/h.span.withConfig({displayName:"ButtonBadge",componentId:"sc-5a8fc7d8-3"})(["display:flex;align-items:center;justify-content:end;position:relative;& > svg{border-radius:var(--privy-border-radius-full);stroke-width:2.5;width:100%;max-height:1rem;max-width:1rem;flex-shrink:0;}& > svg:not(:last-child){border-radius:var(--privy-border-radius-full);margin-right:-0.375rem;}"]),oe=/*#__PURE__*/h.div.withConfig({displayName:"EmptyContainer",componentId:"sc-5a8fc7d8-4"})(["height:60px;display:flex;align-items:center;justify-content:center;text-align:center;"]),re=/*#__PURE__*/h.span.withConfig({displayName:"WalletName",componentId:"sc-5a8fc7d8-5"})(["text-overflow:ellipsis;white-space:nowrap;color:var(--privy-color-foreground);font-weight:400;flex:1;"]),ce=/*#__PURE__*/h($).withConfig({displayName:"StyledCopyableText",componentId:"sc-5a8fc7d8-6"})(["&&{margin:0.5rem auto 0 auto;}"]),se=/*#__PURE__*/h.div.withConfig({displayName:"BinanceDownloadMessage",componentId:"sc-5a8fc7d8-7"})(["text-align:center;margin-top:1rem;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground-3);"]);export{$ as C,R as H,J as S,Y as W,K as a,V as b,P as c,ee as d,ne as i,X as u};
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as i}from"@heroicons/react/24/outline";import{useVirtualizer as l}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{B as m}from"./Button-CrJpeX0e.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as u}from"./copy-Bx2Jwc5_.mjs";import{L as g}from"./Link-DwjLfHwW.mjs";import{T as w}from"./ModalHeader-YP9pLMEP.mjs";import{Q as f}from"./QrCode-C0_lXRph.mjs";import{E as y}from"./EmailInputForm-B4hjCxRU.mjs";import{u as v,q as b}from"./context-BOoFAPna.mjs";import{u as C}from"./useI18n-fcpgyVzo.mjs";import{M as x,q as W,d as k,e as T,K as _,V as z,w as S,S as L}from"./useActiveWallet-BdFIc7_K.mjs";import{u as I,P as N,b as A}from"./internal-context-e-Eni5bG.mjs";import{W as B}from"./WalletCards-DH1rqayz.mjs";import{W as E,h as j}from"./prepareFundingModalData-CzDMa8gy.mjs";import{S as O}from"./Screen-CpIMiJNF.mjs";let q=/*#__PURE__*/h.button.withConfig({displayName:"CopyTextButton",componentId:"sc-4b0620dc-0"})(["display:flex;align-items:center;gap:0.5rem;&:hover{text-decoration:underline;}svg{width:0.875rem;height:0.875rem;}"]),U=/*#__PURE__*/h.span.withConfig({displayName:"CopiedText",componentId:"sc-4b0620dc-1"})(["display:flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:var(--privy-color-foreground-2);"]),F=/*#__PURE__*/h(p).withConfig({displayName:"GreenCheck",componentId:"sc-4b0620dc-2"})(["color:var(--privy-color-success);"]),M=/*#__PURE__*/h(u).withConfig({displayName:"StyledCopy",componentId:"sc-4b0620dc-3"})(["color:var(--privy-color-foreground-3);opactiy:0.5;"]);function $({children:t,iconOnly:i,value:l,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(q,{...r,onClick:()=>{navigator.clipboard.writeText(l||t).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(U,{children:[/*#__PURE__*/n(F,{})," ",!i&&"Copied"]}):!o&&/*#__PURE__*/n(M,{})]})}const D={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:x,md:x}}};class P{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=P.normalize(e);return this.normalizedAllowList.some((e=>t===P.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,i=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=P.normalize(e.walletClientType);i({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"]})}));let l=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||l||n.mobile.native||n.mobile.universal||W[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||W[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=P.normalize(n.slug),r=D[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t}),t.some((e=>e.includes("solana:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t})})),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:E,url:void 0,chains:["eip155"]}),this.includeWalletConnectQrSolana&&a&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:E,url:void 0,chains:["solana"]});let o=Array.from(t.values());o.forEach((e=>{let n=D[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(P.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{let t=P.normalize(e.id),i=P.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=r.has(t),a=r.has(i);return l&&a?r.get(t)-r.get(i):l?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var Q=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),H=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const R=/*#__PURE__*/h.div.withConfig({displayName:"Header",componentId:"sc-9b65f2b6-0"})(["display:flex;justify-content:space-between;align-items:center;"]),V=/*#__PURE__*/h.button.withConfig({displayName:"CloseButton",componentId:"sc-9b65f2b6-1"})(["padding:0.25rem;height:30px;width:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-full);background:var(--privy-color-background-2);"]),G=/*#__PURE__*/h.div.withConfig({displayName:"WalletIconWithActiveIndicator",componentId:"sc-9b65f2b6-2"})(["position:relative;display:inline-flex;align-items:center;&::after{content:' ';border-radius:var(--privy-border-radius-full);height:6px;width:6px;background-color:var(--privy-color-icon-success);position:absolute;right:-3px;top:-3px;}"]),Y=/*#__PURE__*/h.img.withConfig({displayName:"WalletIcon",componentId:"sc-9b65f2b6-3"})(["width:32px;height:32px;border-radius:0.25rem;object-fit:contain;"]),K=/*#__PURE__*/h.span.withConfig({displayName:"Chip",componentId:"sc-9b65f2b6-4"})(["display:flex;gap:0.25rem;align-items:center;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);background-color:var(--privy-color-background-2);svg{width:100%;max-width:1rem;max-height:1rem;stroke-width:2;}"]),J=/*#__PURE__*/h.div.withConfig({displayName:"ScrollContainer",componentId:"sc-9b65f2b6-5"})(["display:flex;flex-direction:column;gap:0.5rem;max-height:24rem;overflow-y:scroll;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));function X({enabled:e=!0,walletList:n,walletChainType:t}){let i=v(),{connectors:l}=I(),{listings:r,loading:c}=k(e),s=t??i.appearance.walletChainType,d=n??i.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:p}=o((()=>h.getWallets(l,r)),[h,l,r]),[u,g]=a(""),w=o((()=>u?m.filter((e=>e.label.toLowerCase().includes(u.toLowerCase()))):m),[u,m]),[f,y]=a();return{selected:f,setSelected:y,search:u,setSearch:g,loadingListings:c,wallets:w,walletCount:p}}let Z=e=>!e||"string"!=typeof e&&(e instanceof S||e instanceof L);const ee=({index:i,style:l,data:a,recent:o})=>{let r=a.wallets[i],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...l,boxSizing:"border-box"};return r?/*#__PURE__*/e(le,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(G,{children:"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(K,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(H,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(H,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:u,preSelectedWalletId:x,hideHeader:k,...E})=>{let q=v(),{t:U}=C(),{connectors:F}=I(),M=E.walletChainType||q.appearance.walletChainType,$=E.walletList||q.appearance?.walletList,{onBack:R,onClose:V,app:G}=E,{selected:K,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:pe,wallets:ue,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:i,walletList:l,walletChainType:c,app:s}){let h=v(),{connectors:m}=I(),{t:p}=C(),{wallets:u,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:T(l??[]),walletList:l,walletChainType:c}),[W,k]=a(),[z,S]=a(),[L,A]=a(),[B,E]=a(),j=!y&&!L&&!B,O=j&&(g>6||w.length>0),q=m.find((e=>"wallet_connect_v2"===e.connectorType)),U=r((async(n,t)=>{if(n){if(B?.connector===n&&"loading"===W)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(k("loading"),"string"==typeof n)return E({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");E({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return k("error"),S(void 0),void i?.(new N("Unable to connect wallet"));k("success"),S(void 0),_({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");k("error"),S(n?.privyErrorCode),i?.(n instanceof Error?n:new N(n?.message||"Unable to connect wallet"))}}}),[h.id,e,B,W]),F=r((()=>L?(k(void 0),S(void 0),E(void 0),void A(void 0)):B?(k(void 0),S(void 0),void E(void 0)):y?(k(void 0),S(void 0),E(void 0),void x(void 0)):"error"===W||"loading"===W?(k(void 0),S(void 0),void E(void 0)):void n?.()),[L,B,y,W,n]),M=o((()=>B?.connector===q&&L&&d&&B?.name?p("connectWallet.goToWallet",{walletName:B.name}):B?.connector===q&&L&&B?.name?p("connectWallet.scanToConnect",{walletName:B.name}):L&&B?.name?p(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:B.name}):"string"==typeof B?.connector?p("connectWallet.openOrInstall",{walletName:B.name}):y&&!B?p("connectWallet.selectNetwork"):B?null:p("connectWallet.selectYourWallet")),[B,L,y,q,p]);return{selected:y,setSelected:x,qrUrl:L,setQrUrl:A,connecting:B,uiState:W,errorCode:z,search:w,setSearch:f,wallets:u,walletCount:g,wc:q,isInitialConnectView:j,showSearchBar:O,title:M,handleConnect:U,handleBack:F,onClose:t,onConnect:e,app:s}}({...E,walletList:$,walletChainType:M}),We=F.find((e=>"wallet_connect_v2"===e.connectorType)),ke=F.find((e=>"walletconnect_solana"===e.walletBranding.id)),Te=c(null),_e=l({count:ue.length,getScrollElement:()=>Te.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==M&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==M&&e.chains?.some((e=>e.startsWith("solana"))),i=()=>{let n=e.id;return W[n]||W[`${n}_wallet`]},l=n=>{let t=P.normalize(e.id);return F.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof S||"solana"===e.chainType&&e instanceof L)))},a=async()=>{if(!We||!e.listing)return!1;let n=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;return We.setWalletEntry(n,de),await We.resetConnection(e.id),await we(We,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!ke&&!!e.listing&&(await ke.disconnect(),ke.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(ke,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=i();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!u,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=l("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&i()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=l("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(We&&"wallet_connect_v2"===e.connector?.connectorType)if(await We.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;We.setWalletEntry(n,de)}else We.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return ke&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ke.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ke.wallet.setWalletEntry(e.listing,de):ke.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[We,ke,we,J,de,M,u,F]);return s((()=>{if(!x)return;let e=ue.find((({id:e})=>e===x));e&&ze(e).catch(console.error)}),[x]),/*#__PURE__*/e(O,{className:h,children:[/*#__PURE__*/n(O.Header,{icon:k&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:B,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:k&&ve?void 0:he&&!ne?U("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?U("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:k&&ve?void 0:he&&!ne&&"string"==typeof he.connector?U("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?pe===A.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:U("connectWallet.tryConnectingAgain"):U("connectionStatus.connectOneWallet"):ve?p??(G?U("connectWallet.connectToAccount",{appName:G.name}):null):null,showBack:!!R||!ve,showClose:!0,onBack:R||fe,onClose:V}),/*#__PURE__*/e(O.Body,{ref:Te,$colorScheme:q.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(z,{children:/*#__PURE__*/n(i,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:U("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:U("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:U("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:j}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(g,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(ie,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(le,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(Y,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),K?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>ze({...K,chains:K.chains.filter((e=>e.startsWith("eip155")))}),children:[K.icon&&("string"==typeof K.icon?/*#__PURE__*/n(Y,{src:K.icon}):/*#__PURE__*/n(K.icon,{})),/*#__PURE__*/n(re,{children:K.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),K?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>ze({...K,chains:K.chains.filter((e=>e.startsWith("solana")))}),children:[K.icon&&("string"==typeof K.icon?/*#__PURE__*/n(Y,{src:K.icon}):/*#__PURE__*/n(K.icon,{})),/*#__PURE__*/n(re,{children:K.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(H,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:U("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(ue.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${_e.getTotalSize()}px`,width:"100%",position:"relative"},children:_e.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:ue,walletChainType:M,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(O.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(O.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:U("connectWallet.retry")})}),!!(G&&G.legal.privacyPolicyUrl&&G.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(w,{app:G,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(O.Watermark,{})]})]})};let te=/*#__PURE__*/h.div.withConfig({displayName:"StickySearchContainer",componentId:"sc-5a8fc7d8-0"})(["position:sticky;margin-top:-3px;padding-top:3px;top:-3px;z-index:1;background:var(--privy-color-background);padding-bottom:calc(var(--screen-space) / 2);"]),ie=/*#__PURE__*/h.div.withConfig({displayName:"WalletListContainer",componentId:"sc-5a8fc7d8-1"})(["display:flex;flex-direction:column;gap:","px;"],5),le=/*#__PURE__*/h.button.withConfig({displayName:"Button",componentId:"sc-5a8fc7d8-2"})(["&&{gap:0.5rem;align-items:center;display:flex;position:relative;text-align:left;font-weight:500;transition:background 200ms ease-in;width:calc(100% - 4px);border-radius:var(--privy-border-radius-md);padding:0.75em;border:1px solid var(--privy-color-foreground-4);justify-content:space-between;}&:hover{background:var(--privy-color-background-2);}"]),ae=/*#__PURE__*/h.span.withConfig({displayName:"ButtonBadge",componentId:"sc-5a8fc7d8-3"})(["display:flex;align-items:center;justify-content:end;position:relative;& > svg{border-radius:var(--privy-border-radius-full);stroke-width:2.5;width:100%;max-height:1rem;max-width:1rem;flex-shrink:0;}& > svg:not(:last-child){border-radius:var(--privy-border-radius-full);margin-right:-0.375rem;}"]),oe=/*#__PURE__*/h.div.withConfig({displayName:"EmptyContainer",componentId:"sc-5a8fc7d8-4"})(["height:60px;display:flex;align-items:center;justify-content:center;text-align:center;"]),re=/*#__PURE__*/h.span.withConfig({displayName:"WalletName",componentId:"sc-5a8fc7d8-5"})(["text-overflow:ellipsis;white-space:nowrap;color:var(--privy-color-foreground);font-weight:400;flex:1;"]),ce=/*#__PURE__*/h($).withConfig({displayName:"StyledCopyableText",componentId:"sc-5a8fc7d8-6"})(["&&{margin:0.5rem auto 0 auto;}"]),se=/*#__PURE__*/h.div.withConfig({displayName:"BinanceDownloadMessage",componentId:"sc-5a8fc7d8-7"})(["text-align:center;margin-top:1rem;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground-3);"]);export{$ as C,R as H,J as S,Y as W,K as a,V as b,P as c,ee as d,ne as i,X as u};
|