@privy-io/react-auth 3.9.0 → 3.9.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.
Files changed (251) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-C0im9fAJ.js → AccountNotFoundScreen-BjG_YLcK.js} +1 -1
  2. package/dist/cjs/{Address-Doz93lgh.js → Address-5znFAhQw.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-OgvUs4oT.js → AffirmativeConsentScreen-BiwTOLaX.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-CBfQZVO7.js → AllowlistRejectionScreen-DOZr-QmF.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-B4aHQC44.js → AuthenticateWithWalletScreen-BO4ml_zL.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-Cz2E1cWa.js → AwaitingEvmToSolBridgingScreen-DCvvtPfy.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-Ca1z7D4v.js → AwaitingExternalEthereumTransferScreen-DXSQjzHX.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-DDws79F8.js → AwaitingPasswordlessCodeScreen-COP_Jshz.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DlTJafw4.js → AwaitingSolToEvmBridgingScreen-tGqHxf1K.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-Cg3JjiFh.js → BridgeNetworkSelectionView-DgFjMLY3.js} +1 -1
  11. package/dist/cjs/{Button-DpuRzAgk.js → Button-Bm_Ft0Dw.js} +1 -1
  12. package/dist/cjs/{CaptchaScreen-DrvkYUK-.js → CaptchaScreen-BvyOQUvH.js} +1 -1
  13. package/dist/cjs/{CoinbaseOnrampStatusScreen-Cfbivt0s.js → CoinbaseOnrampStatusScreen-9G_2yIQ-.js} +1 -1
  14. package/dist/cjs/{ConnectEmailForm-DeN1Pg_E.js → ConnectEmailForm-D0Xd9Tnw.js} +1 -1
  15. package/dist/cjs/{ConnectLedgerScreen-F3-JADjW.js → ConnectLedgerScreen-COTQ1lqK.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyLandingScreen-DQ9hxL8H.js → ConnectOnlyLandingScreen-DErN9BXL.js} +1 -1
  17. package/dist/cjs/{ConnectOnlyStatusScreen-YPhacltK.js → ConnectOnlyStatusScreen-DKhKRV2M.js} +1 -1
  18. package/dist/cjs/ConnectOrCreateScreen-54nvcrr7.js +1 -0
  19. package/dist/cjs/{ConnectPhoneForm-CIaHyHT9.js → ConnectPhoneForm-WT8rso3i.js} +1 -1
  20. package/dist/cjs/ConnectWalletView-DsOX-lHz.js +1 -0
  21. package/dist/cjs/{ConnectionStatusScreen-Dg1LMsi6.js → ConnectionStatusScreen-C1nqbW_A.js} +1 -1
  22. package/dist/cjs/CrossAppAuthScreen-weeiAu3O.js +1 -0
  23. package/dist/cjs/CustomLandingScreenView-DQLDU2GD.js +2 -0
  24. package/dist/cjs/{DelegatedActionsConsentScreen-CP9xV4-_.js → DelegatedActionsConsentScreen-C_-0aHwH.js} +1 -1
  25. package/dist/cjs/{DelegatedActionsRevokeScreen-QrgQlVmp.js → DelegatedActionsRevokeScreen-SZkD3b1o.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletConnectingScreen-Ccb4geKv.js → EmbeddedWalletConnectingScreen-VdpmfKNX.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-DTRBR5WW.js → EmbeddedWalletCreatedScreen-CfEf4KkH.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-B1Ezr57N.js → EmbeddedWalletKeyExportScreen-D0NE_HvJ.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-0v1ZwZgX.js → EmbeddedWalletOnAccountCreateScreen-CrJFTRI0.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-DJr1d2fN.js → EmbeddedWalletPasswordUpdateScreen-CjVK53bu.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Slns6kTr.js → EmbeddedWalletPasswordUpdateSplashScreen-CVldlThA.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-zJR3l-q0.js → EnrollTotp-BVeDTQ5J.js} +1 -1
  33. package/dist/cjs/{ErrorScreen-DAUNTckD.js → ErrorScreen-BSjRGrRR.js} +1 -1
  34. package/dist/cjs/{FarcasterConnectStatusScreen-C3PPAnT1.js → FarcasterConnectStatusScreen-B7Ab3ddi.js} +1 -1
  35. package/dist/cjs/{FarcasterSignerStatusScreen-BMd0iB8M.js → FarcasterSignerStatusScreen-Bf--BYd8.js} +1 -1
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-u8DS0vOP.js → FundSolWalletWithExternalSolanaWallet-DcRxhkRg.js} +2 -2
  37. package/dist/cjs/{FundWalletMethodHeader-DFV8N4os.js → FundWalletMethodHeader-BKgYjMau.js} +1 -1
  38. package/dist/cjs/{FundingEditAmountScreen-DXA8k8zQ.js → FundingEditAmountScreen-Bs3_avzr.js} +1 -1
  39. package/dist/cjs/{FundingMethodSelectionScreen-tlU_tfXm.js → FundingMethodSelectionScreen-C_cbW1TC.js} +1 -1
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-BB_zYdr4.js → InAppBrowserLoginNotPossible-CySpQd3Y.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-sNsX0qIj.js → InstallWalletScreen-rFpE2-7H.js} +1 -1
  42. package/dist/cjs/LandingScreen-BmZWpgb3.js +1 -0
  43. package/dist/cjs/{LinkConflictScreen-CwA2g0DP.js → LinkConflictScreen-DSIPReKB.js} +1 -1
  44. package/dist/cjs/{LinkEmailScreen-DExuIdVG.js → LinkEmailScreen-Dc8QC15P.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-DXLAama3.js → LinkPasskeyScreen-CUMuhJ2Q.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-BGKi4PVT.js → LinkPhoneScreen-bozyY6A1.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-BMAuqJva.js → LoginFailedScreen-C4gl1Ezs.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-Dg8uGXZw.js → ManualTransferScreen-BTj8KQgY.js} +1 -1
  49. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-BZ1svjjW.js → MfaAuthEnrollmentFlowScreen-cmFsgDp4.js} +1 -1
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-CJhMSZ1r.js → MfaAuthVerifyFlowScreen-DEC3hYOD.js} +1 -1
  51. package/dist/cjs/{MfaEnrollmentFlowScreen-DvxX-vrH.js → MfaEnrollmentFlowScreen-3lOG0uKv.js} +1 -1
  52. package/dist/cjs/{MfaVerifyFlowScreen-BWPqGNNj.js → MfaVerifyFlowScreen-aRH0rn8s.js} +1 -1
  53. package/dist/cjs/{ModalHeader-4MV7Tgk7.js → ModalHeader-DB7Tbjwz.js} +1 -1
  54. package/dist/cjs/{MoonpayStatusScreen-Cd_71Pyq.js → MoonpayStatusScreen-DANoQOd5.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-ZTRfDJXT.js → OAuthStatusScreen-DsGkPiMe.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-CQZM_RDH.js → PasskeySelectSignupOrLogin-D9Wfb44J.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-BM1Mvl9i.js → PasskeyStatusScreen-DAxg2zUJ.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-CvVt6RGf.js → PasswordRecoveryScreen-CJfW4kpk.js} +1 -1
  59. package/dist/cjs/{QrCode-DvJPyneT.js → QrCode-DsQD8cG6.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-Cg2ntkgK.js → RecoveryOAuthStatusScreen-_R1gExdU.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-dGZOvD2x.js → RecoveryPasswordCreateScreen-Cb-gcVc8.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-DBAg2tyX.js → RecoverySelectionScreen-CZOXXRGl.js} +1 -1
  63. package/dist/cjs/{Screen-CJM19YNL.js → Screen-D9Tvi297.js} +1 -1
  64. package/dist/cjs/{ScreenLayout-Bbhw-EIr.js → ScreenLayout-BeH-Q6N2.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-C65Py491.js → SetAutomaticRecoveryScreen-BSDQb_dJ.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-Bx4bpcUs.js → SetWalletPasswordForm-C3YB2v_1.js} +1 -1
  67. package/dist/cjs/{SignRequestScreen-Dy8xnXXp.js → SignRequestScreen-DW3SnJi5.js} +1 -1
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-x1O5yfj4.js → StandardSignAndSendTransactionScreen-Cima1YEn.js} +1 -1
  69. package/dist/cjs/{TelegramAuthScreen-DaxoKw-V.js → TelegramAuthScreen-pfwAx0uQ.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-DvBQbDgX.js → TransactionDetails-KB5Wyu1l.js} +1 -1
  71. package/dist/cjs/{TransactionErrorView-BdTYgWfc.js → TransactionErrorView-SaY08uTA.js} +1 -1
  72. package/dist/cjs/TransferFromWalletScreen-DVzjB3Gc.js +1 -0
  73. package/dist/cjs/TransferOrBridgeLoadingScreen-B3zo8l43.js +1 -0
  74. package/dist/cjs/{UpdateEmailScreen-BtndcDiP.js → UpdateEmailScreen-CwWKZeJR.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-BQb3cbdX.js → UpdatePhoneScreen-B84E2DOe.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-Ctgox4aT.js → UserLimitReachedScreen-CQMqK5QW.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-DQtI0K25.js → WalletInfoCard-DKVdH9iF.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-HfTntL7I.js → WalletInterstitialScreen-0cBKaDQ1.js} +1 -1
  79. package/dist/cjs/{WalletLink-CbnPrVEH.js → WalletLink-GY0_Tmtg.js} +1 -1
  80. package/dist/cjs/WalletOverflowButton-iCeXR9aA.js +1 -0
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/context-DFq1obBO.js +1 -0
  83. package/dist/cjs/{ethers-BwK3McWK.js → ethers-DZGJ4Y5i.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-CHHPpmxX.js → get-is-unified-wallet-D4ouXJpi.js} +1 -1
  86. package/dist/cjs/{index-D7QitaMz.js → index-BQai4Vqd.js} +1 -1
  87. package/dist/cjs/{index-DiPPDo6V.js → index-CKB4VKFb.js} +1 -1
  88. package/dist/cjs/{index-4-C2N_7K.js → index-NJrQkxJ7.js} +3 -3
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{prepareFundingModalData-Bap-QRCV.js → prepareFundingModalData-Cnd6rhhJ.js} +1 -1
  92. package/dist/cjs/{shared-BjdszO5f.js → shared-CCAyvw5i.js} +1 -1
  93. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-CuHR6wvs.js → shouldProceedtoEmbeddedWalletCreationFlow-DZvEYqlO.js} +1 -1
  94. package/dist/cjs/{smart-wallets-Cb8qgePj.js → smart-wallets-CV78p-ta.js} +1 -1
  95. package/dist/cjs/smart-wallets.js +1 -1
  96. package/dist/cjs/solana.js +1 -1
  97. package/dist/cjs/{to-ui-error-C_N9DMza.js → to-ui-error-ER-8XlJF.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-create-wallet-without-fallback-y9YpooGA.js → use-create-wallet-without-fallback-q0_yd_V9.js} +1 -1
  100. package/dist/cjs/{use-export-wallet-CmWKVG5J.js → use-export-wallet-DKaavHqM.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-B5cSS56I.js → useActiveWallet-BOX8xCn9.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-CdW08dO7.js → useGetTokenPrice-BHq-guWz.js} +1 -1
  103. package/dist/cjs/{useI18n-D21RT6EH.js → useI18n-CY6Et_lH.js} +1 -1
  104. package/dist/cjs/{usePrivy-DobNyfbl.js → usePrivy-CcfSRv1R.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-ZoxUaxNS.js → useSolanaRpcClient-TQdbjNyx.js} +1 -1
  106. package/dist/cjs/{useWallets-DPdw6ah8.js → useWallets-BLFNjTwC.js} +1 -1
  107. package/dist/cjs/{useWallets-Z7ZZY1fI.js → useWallets-oPpMUdRR.js} +1 -1
  108. package/dist/dts/{events-context-D8iPaW-H.d.ts → events-context-BYT6PpDG.d.mts} +1 -1
  109. package/dist/dts/{events-context-D8iPaW-H.d.mts → events-context-BYT6PpDG.d.ts} +1 -1
  110. package/dist/dts/extended-chains.d.mts +1 -1
  111. package/dist/dts/extended-chains.d.ts +1 -1
  112. package/dist/dts/farcaster.d.mts +1 -1
  113. package/dist/dts/farcaster.d.ts +1 -1
  114. package/dist/dts/index.d.mts +26 -4
  115. package/dist/dts/index.d.ts +26 -4
  116. package/dist/dts/internal.d.mts +1 -1
  117. package/dist/dts/internal.d.ts +1 -1
  118. package/dist/dts/smart-wallets.d.mts +1 -1
  119. package/dist/dts/smart-wallets.d.ts +1 -1
  120. package/dist/dts/solana.d.mts +3 -3
  121. package/dist/dts/solana.d.ts +3 -3
  122. package/dist/dts/{types-diVZpIb-.d.mts → types-D7U23FgR.d.mts} +2 -0
  123. package/dist/dts/{types-diVZpIb-.d.ts → types-D7U23FgR.d.ts} +2 -0
  124. package/dist/dts/ui.d.mts +1 -1
  125. package/dist/dts/ui.d.ts +1 -1
  126. package/dist/esm/{AccountNotFoundScreen-CvMiU7Tz.mjs → AccountNotFoundScreen-Bk2ZDlxR.mjs} +1 -1
  127. package/dist/esm/{Address-CDOE2oK9.mjs → Address-BsvZLUXE.mjs} +1 -1
  128. package/dist/esm/{AffirmativeConsentScreen-Cia_UEaD.mjs → AffirmativeConsentScreen-CMcGT-7c.mjs} +1 -1
  129. package/dist/esm/{AllowlistRejectionScreen-DMqAO2Y-.mjs → AllowlistRejectionScreen-CgdkdFzy.mjs} +1 -1
  130. package/dist/esm/{AuthenticateWithWalletScreen-DvzZViMZ.mjs → AuthenticateWithWalletScreen-fhyjSxI8.mjs} +1 -1
  131. package/dist/esm/{AwaitingEvmToSolBridgingScreen-BSG_hKyl.mjs → AwaitingEvmToSolBridgingScreen-DbNP1yPY.mjs} +1 -1
  132. package/dist/esm/{AwaitingExternalEthereumTransferScreen-BcZRmV50.mjs → AwaitingExternalEthereumTransferScreen-COnzLcDW.mjs} +1 -1
  133. package/dist/esm/{AwaitingPasswordlessCodeScreen-Dd7TblcM.mjs → AwaitingPasswordlessCodeScreen-D9BoqETu.mjs} +1 -1
  134. package/dist/esm/{AwaitingSolToEvmBridgingScreen-BD1wkQFf.mjs → AwaitingSolToEvmBridgingScreen-JY-d6qlj.mjs} +1 -1
  135. package/dist/esm/{BridgeNetworkSelectionView-DSCjcHJX.mjs → BridgeNetworkSelectionView-Dn5uqa3q.mjs} +1 -1
  136. package/dist/esm/{Button-DJY5dut3.mjs → Button-B8mqatRx.mjs} +1 -1
  137. package/dist/esm/{CaptchaScreen-CapFNnoZ.mjs → CaptchaScreen-D3uGo3qJ.mjs} +1 -1
  138. package/dist/esm/{CoinbaseOnrampStatusScreen-DbQEEYPn.mjs → CoinbaseOnrampStatusScreen-Ce2Z_vJB.mjs} +1 -1
  139. package/dist/esm/{ConnectEmailForm-Cs3r5aBq.mjs → ConnectEmailForm--PZXgvw4.mjs} +1 -1
  140. package/dist/esm/{ConnectLedgerScreen-EYZ2eRpE.mjs → ConnectLedgerScreen-CRDZ_shP.mjs} +1 -1
  141. package/dist/esm/{ConnectOnlyLandingScreen-BM747X2V.mjs → ConnectOnlyLandingScreen-NSgaj_D4.mjs} +1 -1
  142. package/dist/esm/{ConnectOnlyStatusScreen-CW3W1N8z.mjs → ConnectOnlyStatusScreen-DAGVWgFv.mjs} +1 -1
  143. package/dist/esm/ConnectOrCreateScreen-CuVcGxrh.mjs +1 -0
  144. package/dist/esm/{ConnectPhoneForm-Ft9zAuQd.mjs → ConnectPhoneForm-DoYmHBv3.mjs} +1 -1
  145. package/dist/esm/ConnectWalletView-eQbJO3Pg.mjs +1 -0
  146. package/dist/esm/{ConnectionStatusScreen-nzx3dVCV.mjs → ConnectionStatusScreen-DVtobAVi.mjs} +1 -1
  147. package/dist/esm/CrossAppAuthScreen-B0633bnY.mjs +1 -0
  148. package/dist/esm/CustomLandingScreenView-DNbO8W7v.mjs +2 -0
  149. package/dist/esm/{DelegatedActionsConsentScreen-C35m_lng.mjs → DelegatedActionsConsentScreen-Cm3QtgBC.mjs} +1 -1
  150. package/dist/esm/{DelegatedActionsRevokeScreen-h4GhIT-2.mjs → DelegatedActionsRevokeScreen-C2WBGR2c.mjs} +1 -1
  151. package/dist/esm/{EmbeddedWalletConnectingScreen-CrgNS1_v.mjs → EmbeddedWalletConnectingScreen-CpKPkmKa.mjs} +1 -1
  152. package/dist/esm/{EmbeddedWalletCreatedScreen-BhSPSO8A.mjs → EmbeddedWalletCreatedScreen-CMyRcNaG.mjs} +1 -1
  153. package/dist/esm/{EmbeddedWalletKeyExportScreen-BlAL_BUV.mjs → EmbeddedWalletKeyExportScreen-nkSO3O1P.mjs} +1 -1
  154. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-Xz2dhW-I.mjs → EmbeddedWalletOnAccountCreateScreen-rwdmo9iN.mjs} +1 -1
  155. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-DQbd-pAr.mjs → EmbeddedWalletPasswordUpdateScreen-Tcp68U7U.mjs} +1 -1
  156. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-9VnFkswr.mjs → EmbeddedWalletPasswordUpdateSplashScreen-5PH-3FQ3.mjs} +1 -1
  157. package/dist/esm/{EnrollTotp-twiE9SrW.mjs → EnrollTotp-ULLNt8tl.mjs} +1 -1
  158. package/dist/esm/{ErrorScreen-CTI5XNc0.mjs → ErrorScreen-BdxNEgU1.mjs} +1 -1
  159. package/dist/esm/{FarcasterConnectStatusScreen-26MCKeUz.mjs → FarcasterConnectStatusScreen-CruCPzPD.mjs} +1 -1
  160. package/dist/esm/{FarcasterSignerStatusScreen-YwCO1kz9.mjs → FarcasterSignerStatusScreen-DBAyc7bd.mjs} +1 -1
  161. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-B3w3-z6B.mjs → FundSolWalletWithExternalSolanaWallet-Fxpj9pEN.mjs} +1 -1
  162. package/dist/esm/{FundWalletMethodHeader-CN-93vVj.mjs → FundWalletMethodHeader-I8a6Y30s.mjs} +1 -1
  163. package/dist/esm/{FundingEditAmountScreen-Cz6ZAJlk.mjs → FundingEditAmountScreen-yKYKiyG9.mjs} +1 -1
  164. package/dist/esm/{FundingMethodSelectionScreen-B85fzSsC.mjs → FundingMethodSelectionScreen-Dr-QG6BQ.mjs} +1 -1
  165. package/dist/esm/{InAppBrowserLoginNotPossible-CPsaFweG.mjs → InAppBrowserLoginNotPossible-BYO_nlWy.mjs} +1 -1
  166. package/dist/esm/{InstallWalletScreen-D5mGXNHF.mjs → InstallWalletScreen-Cma1GXX4.mjs} +1 -1
  167. package/dist/esm/LandingScreen-DCR5C-gA.mjs +1 -0
  168. package/dist/esm/{LinkConflictScreen-D8y5of24.mjs → LinkConflictScreen-C8kM_4ZL.mjs} +1 -1
  169. package/dist/esm/{LinkEmailScreen-C9lKAk-L.mjs → LinkEmailScreen-DsrprT7p.mjs} +1 -1
  170. package/dist/esm/{LinkPasskeyScreen-C33kWVrX.mjs → LinkPasskeyScreen-yKY5ebtx.mjs} +1 -1
  171. package/dist/esm/{LinkPhoneScreen-Bi98Ngac.mjs → LinkPhoneScreen-BklMbJs1.mjs} +1 -1
  172. package/dist/esm/{LoginFailedScreen-BX7s2pm7.mjs → LoginFailedScreen-CVGjcD9g.mjs} +1 -1
  173. package/dist/esm/ManualTransferScreen-C6MTkQcg.mjs +1 -0
  174. package/dist/esm/{MfaAuthEnrollmentFlowScreen-BBOfIRfA.mjs → MfaAuthEnrollmentFlowScreen-BrEYUoOi.mjs} +1 -1
  175. package/dist/esm/{MfaAuthVerifyFlowScreen-CwZbfXVc.mjs → MfaAuthVerifyFlowScreen-D_LbAt1N.mjs} +1 -1
  176. package/dist/esm/{MfaEnrollmentFlowScreen-Dq5X_CVZ.mjs → MfaEnrollmentFlowScreen-BseHvqlH.mjs} +1 -1
  177. package/dist/esm/{MfaVerifyFlowScreen-DGylIeVO.mjs → MfaVerifyFlowScreen-DB8BFfTJ.mjs} +1 -1
  178. package/dist/esm/{ModalHeader-DHXUvTf4.mjs → ModalHeader-BLGC-7ev.mjs} +1 -1
  179. package/dist/esm/{MoonpayStatusScreen-Boj9S0LW.mjs → MoonpayStatusScreen-D-Qnyxst.mjs} +1 -1
  180. package/dist/esm/{OAuthStatusScreen-DLvm8CkQ.mjs → OAuthStatusScreen-pEjYhAdx.mjs} +1 -1
  181. package/dist/esm/{PasskeySelectSignupOrLogin-62N4Cj_4.mjs → PasskeySelectSignupOrLogin-CmmjfwZM.mjs} +1 -1
  182. package/dist/esm/{PasskeyStatusScreen-DE8Ez-Rl.mjs → PasskeyStatusScreen-AiT-3Rq0.mjs} +1 -1
  183. package/dist/esm/{PasswordRecoveryScreen-CxXsaYPM.mjs → PasswordRecoveryScreen-BW7BBSLI.mjs} +1 -1
  184. package/dist/esm/{QrCode-CbRLsYtm.mjs → QrCode-DR5LogOp.mjs} +1 -1
  185. package/dist/esm/{RecoveryOAuthStatusScreen-9ETDOsJ0.mjs → RecoveryOAuthStatusScreen-BGxGq84t.mjs} +1 -1
  186. package/dist/esm/{RecoveryPasswordCreateScreen-CZizgkaK.mjs → RecoveryPasswordCreateScreen-Brv0MUPN.mjs} +1 -1
  187. package/dist/esm/{RecoverySelectionScreen-CDzuMgIx.mjs → RecoverySelectionScreen-CluXGpRG.mjs} +1 -1
  188. package/dist/esm/{Screen-CKaxnxac.mjs → Screen-BTyXgDrd.mjs} +1 -1
  189. package/dist/esm/{ScreenLayout-BQ6FV6yc.mjs → ScreenLayout-CddsD3Of.mjs} +1 -1
  190. package/dist/esm/{SetAutomaticRecoveryScreen-D5x6hDUL.mjs → SetAutomaticRecoveryScreen-nXcm7pIi.mjs} +1 -1
  191. package/dist/esm/{SetWalletPasswordForm-DelBzpVM.mjs → SetWalletPasswordForm-DvgKP4Ez.mjs} +1 -1
  192. package/dist/esm/{SignRequestScreen-BA5JF3Hr.mjs → SignRequestScreen-Cp5zIIZ3.mjs} +1 -1
  193. package/dist/esm/{StandardSignAndSendTransactionScreen-CiJd6Wf9.mjs → StandardSignAndSendTransactionScreen-bbPFP1pO.mjs} +1 -1
  194. package/dist/esm/{TelegramAuthScreen-zZOkgtJy.mjs → TelegramAuthScreen-DorSPB8G.mjs} +1 -1
  195. package/dist/esm/{TransactionDetails-B2vXU-k4.mjs → TransactionDetails-Bb1NEpUH.mjs} +1 -1
  196. package/dist/esm/{TransactionErrorView-DOcJFQEX.mjs → TransactionErrorView-CfyBAYzV.mjs} +2 -2
  197. package/dist/esm/TransferFromWalletScreen-BeSvua3b.mjs +1 -0
  198. package/dist/esm/{TransferOrBridgeLoadingScreen-B-uvt7Fj.mjs → TransferOrBridgeLoadingScreen-D5Y_FQAB.mjs} +1 -1
  199. package/dist/esm/{UpdateEmailScreen-B1-pVdEN.mjs → UpdateEmailScreen-BolXWblK.mjs} +1 -1
  200. package/dist/esm/{UpdatePhoneScreen-CwYS0KNr.mjs → UpdatePhoneScreen-G2aRPp1w.mjs} +1 -1
  201. package/dist/esm/{UserLimitReachedScreen-C9lTsh_J.mjs → UserLimitReachedScreen-BUXcfdpd.mjs} +1 -1
  202. package/dist/esm/{WalletInfoCard-C8BrD5jy.mjs → WalletInfoCard-YE5P6CSV.mjs} +1 -1
  203. package/dist/esm/{WalletInterstitialScreen-d520uEnZ.mjs → WalletInterstitialScreen-6lMKxpAk.mjs} +1 -1
  204. package/dist/esm/{WalletLink-WAY9-CI0.mjs → WalletLink-C9CSqqVy.mjs} +1 -1
  205. package/dist/esm/WalletOverflowButton-DV9Pe-aq.mjs +1 -0
  206. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  207. package/dist/esm/context-Bycd1SKV.mjs +1 -0
  208. package/dist/esm/{ethers-g3QzXj2h.mjs → ethers-C3Y94dat.mjs} +1 -1
  209. package/dist/esm/extended-chains.mjs +1 -1
  210. package/dist/esm/{get-is-unified-wallet-_KIJnP68.mjs → get-is-unified-wallet-DvKS5IUO.mjs} +1 -1
  211. package/dist/esm/{index-BGEWwttv.mjs → index-C9_VQk69.mjs} +1 -1
  212. package/dist/esm/{index-Dr4t3oWO.mjs → index-CCyaupaz.mjs} +3 -3
  213. package/dist/esm/{index-CiEOopPN.mjs → index-DeGXWdV3.mjs} +1 -1
  214. package/dist/esm/index.mjs +1 -1
  215. package/dist/esm/internal.mjs +1 -1
  216. package/dist/esm/{prepareFundingModalData-BYy0MVol.mjs → prepareFundingModalData-CIgFwA7s.mjs} +1 -1
  217. package/dist/esm/{shared-CRNjAkzC.mjs → shared-rucIJmk0.mjs} +1 -1
  218. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-iMnL58wW.mjs → shouldProceedtoEmbeddedWalletCreationFlow-Djgu4xiS.mjs} +1 -1
  219. package/dist/esm/{smart-wallets-BMn13jfV.mjs → smart-wallets-B-nGTJog.mjs} +1 -1
  220. package/dist/esm/smart-wallets.mjs +1 -1
  221. package/dist/esm/solana.mjs +1 -1
  222. package/dist/esm/{to-ui-error-CnxcoZ1S.mjs → to-ui-error-3mK4-1VA.mjs} +1 -1
  223. package/dist/esm/ui.mjs +1 -1
  224. package/dist/esm/{use-create-wallet-without-fallback-5er4aqoE.mjs → use-create-wallet-without-fallback-cSYr4rn8.mjs} +1 -1
  225. package/dist/esm/{use-export-wallet-WZT8QqOJ.mjs → use-export-wallet-ntS-M0Jk.mjs} +1 -1
  226. package/dist/esm/{useActiveWallet-SiVSXkvG.mjs → useActiveWallet-Bsy5GTCV.mjs} +1 -1
  227. package/dist/esm/{useGetTokenPrice-CfQvz_Mo.mjs → useGetTokenPrice-0Bn0Y88A.mjs} +1 -1
  228. package/dist/esm/{useI18n-O3hskpuB.mjs → useI18n-BtdAZuQ8.mjs} +1 -1
  229. package/dist/esm/{usePrivy-Bh4N2Hpm.mjs → usePrivy-BaiIHGte.mjs} +1 -1
  230. package/dist/esm/{useSolanaRpcClient-DaxiCEwc.mjs → useSolanaRpcClient-DW9Xaoo_.mjs} +1 -1
  231. package/dist/esm/{useWallets-gElyEQoU.mjs → useWallets-D0lpBS44.mjs} +1 -1
  232. package/dist/esm/{useWallets-DCp1uab-.mjs → useWallets-NhjmJtNE.mjs} +1 -1
  233. package/package.json +4 -4
  234. package/dist/cjs/ConnectOrCreateScreen-DmitWRwr.js +0 -1
  235. package/dist/cjs/ConnectWalletView-B33uROyL.js +0 -1
  236. package/dist/cjs/CrossAppAuthScreen-B6h5ejCd.js +0 -1
  237. package/dist/cjs/CustomLandingScreenView-ClPdt2GY.js +0 -2
  238. package/dist/cjs/LandingScreen-BE8xOJTr.js +0 -1
  239. package/dist/cjs/TransferFromWalletScreen-CGRGSTHN.js +0 -1
  240. package/dist/cjs/TransferOrBridgeLoadingScreen-C4UYLYIL.js +0 -1
  241. package/dist/cjs/WalletButtonList-C6cavPqd.js +0 -1
  242. package/dist/cjs/context-Dn8Hzo8O.js +0 -1
  243. package/dist/esm/ConnectOrCreateScreen-BREVA7pu.mjs +0 -1
  244. package/dist/esm/ConnectWalletView-DFfXN_9_.mjs +0 -1
  245. package/dist/esm/CrossAppAuthScreen-DAQweVCP.mjs +0 -1
  246. package/dist/esm/CustomLandingScreenView-BkNtLof4.mjs +0 -2
  247. package/dist/esm/LandingScreen-BqSnrgDb.mjs +0 -1
  248. package/dist/esm/ManualTransferScreen-BBMujAte.mjs +0 -1
  249. package/dist/esm/TransferFromWalletScreen-C5QQN9h6.mjs +0 -1
  250. package/dist/esm/WalletButtonList-DZp-38Ac.mjs +0 -1
  251. package/dist/esm/context-Dee1TPOi.mjs +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-CIaHyHT9.js"),n=require("./context-Dn8Hzo8O.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-CHHPpmxX.js"),a=require("./ScreenLayout-Bbhw-EIr.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("./Button-DpuRzAgk.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("tinycolor2"),require("ofetch"),require("./Screen-CJM19YNL.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var c=/*#__PURE__*/s(r);const l=({title:r="Connect your phone",subtitle:n="Add your number to your account",onSubmit:o,isSubmitting:u=!1})=>{let[s,l]=t.useState(null),d=async()=>{s?.qualifiedPhoneNumber&&await o(s)};/*#__PURE__*/return e.jsx(a.ScreenLayout,{title:r,subtitle:n,icon:c.default,primaryCta:{label:u?"Submitting":"Submit",onClick:d,disabled:!s?.isValid||u},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:d,noIncludeSubmitButton:!0,hideRecent:!0})})},d={component:()=>{let{currentScreen:r,data:i,navigate:a,setModalData:s}=u.usePrivyModal(),c=n.useAppConfig(),{initLoginWithSms:d}=o.usePrivyInternal(),[q,m]=t.useState(!1);/*#__PURE__*/return e.jsx(l,{subtitle:`Add your number to your ${c?.name} account`,onSubmit:async e=>{m(!0);try{await d({phoneNumber:e.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(e){s({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{m(!1)}},isSubmitting:q})}};exports.LinkPhoneScreen=d,exports.LinkPhoneScreenView=l,exports.default=d;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-WT8rso3i.js"),n=require("./context-DFq1obBO.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-D4ouXJpi.js"),a=require("./ScreenLayout-BeH-Q6N2.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("./Button-Bm_Ft0Dw.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("tinycolor2"),require("ofetch"),require("./Screen-D9Tvi297.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var c=/*#__PURE__*/s(r);const l=({title:r="Connect your phone",subtitle:n="Add your number to your account",onSubmit:o,isSubmitting:u=!1})=>{let[s,l]=t.useState(null),d=async()=>{s?.qualifiedPhoneNumber&&await o(s)};/*#__PURE__*/return e.jsx(a.ScreenLayout,{title:r,subtitle:n,icon:c.default,primaryCta:{label:u?"Submitting":"Submit",onClick:d,disabled:!s?.isValid||u},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:d,noIncludeSubmitButton:!0,hideRecent:!0})})},d={component:()=>{let{currentScreen:r,data:i,navigate:a,setModalData:s}=u.usePrivyModal(),c=n.useAppConfig(),{initLoginWithSms:d}=o.usePrivyInternal(),[q,m]=t.useState(!1);/*#__PURE__*/return e.jsx(l,{subtitle:`Add your number to your ${c?.name} account`,onSubmit:async e=>{m(!0);try{await d({phoneNumber:e.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(e){s({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{m(!1)}},isSubmitting:q})}};exports.LinkPhoneScreen=d,exports.LinkPhoneScreenView=l,exports.default=d;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./internal-context-NWsAL807.js"),t=require("./get-is-unified-wallet-CHHPpmxX.js"),n=require("./ScreenLayout-Bbhw-EIr.js");require("ofetch"),require("react"),require("viem"),require("./context-Dn8Hzo8O.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./Button-DpuRzAgk.js"),require("styled-components"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("./Screen-CJM19YNL.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const a=({title:i="Could not connect with wallet",subtitle:t="Please check that Phantom multichain is enabled and try again.",primaryCtaText:a="Try again",secondaryCtaText:o="Cancel",onTryAgain:c,onCancel:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:i,subtitle:t,icon:r.XCircle,iconVariant:"error",primaryCta:{label:a,onClick:c},secondaryCta:{label:o,onClick:u},watermark:!0}),o={component:()=>{let{closePrivyModal:r}=i.usePrivyInternal(),{navigate:n}=t.usePrivyModal();/*#__PURE__*/return e.jsx(a,{onTryAgain:()=>{n("LandingScreen")},onCancel:async()=>{await r()}})}};exports.LoginFailedScreen=o,exports.LoginFailedScreenView=a,exports.default=o;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./internal-context-NWsAL807.js"),t=require("./get-is-unified-wallet-D4ouXJpi.js"),n=require("./ScreenLayout-BeH-Q6N2.js");require("ofetch"),require("react"),require("viem"),require("./context-DFq1obBO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./Button-Bm_Ft0Dw.js"),require("styled-components"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("./Screen-D9Tvi297.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const a=({title:i="Could not connect with wallet",subtitle:t="Please check that Phantom multichain is enabled and try again.",primaryCtaText:a="Try again",secondaryCtaText:o="Cancel",onTryAgain:c,onCancel:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:i,subtitle:t,icon:r.XCircle,iconVariant:"error",primaryCta:{label:a,onClick:c},secondaryCta:{label:o,onClick:u},watermark:!0}),o={component:()=>{let{closePrivyModal:r}=i.usePrivyInternal(),{navigate:n}=t.usePrivyModal();/*#__PURE__*/return e.jsx(a,{onTryAgain:()=>{n("LandingScreen")},onCancel:async()=>{await r()}})}};exports.LoginFailedScreen=o,exports.LoginFailedScreenView=a,exports.default=o;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("viem"),n=require("@privy-io/js-sdk-core"),s=require("./Button-DpuRzAgk.js"),a=require("./Layouts-dRL0OSpp.js"),t=require("./ModalHeader-4MV7Tgk7.js"),o=require("./QrCode-DvJPyneT.js"),u=require("./FundWalletMethodHeader-DFV8N4os.js"),c=require("./InfoBanner-CTx1eRnV.js"),d=require("./Subtitle-Dtmrw8l5.js"),l=require("./Title-C-tHJvrb.js"),m=require("./WalletInfoCard-DQtI0K25.js"),q=require("./context-Dn8Hzo8O.js"),p=require("./useActiveWallet-B5cSS56I.js"),h=require("./internal-context-NWsAL807.js"),f=require("./get-is-unified-wallet-CHHPpmxX.js"),j=require("./useWalletBalance-BVb8F3RO.js"),g=require("./useWallets-DPdw6ah8.js"),v=require("./analytics-C6C_4JmG.js"),C=require("./index-4-C2N_7K.js"),y=require("./getChainName-C4rO8-3n.js"),A=require("./getUsdcMintAddress-REYZSOb9.js"),S=require("./transaction-DjF5X-by.js"),I=require("./getErc20Balance-DknCauCO.js");require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("qrcode"),require("@heroicons/react/24/outline/InformationCircleIcon"),require("lucide-react"),require("./ErrorMessage-f0cRWc29.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Address-Doz93lgh.js"),require("./shared-BPGwTh8c.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js");const T={component:()=>{let{wallets:T}=g.useWallets(),{connectors:b}=h.usePrivyInternal(),x=b.filter(p.isSolanaWalletConnector).flatMap((e=>e.wallets)),{data:E,setModalData:F,navigate:w,lastScreen:B}=f.usePrivyModal(),{rpcConfig:U,appId:k,createAnalyticsEvent:D,closePrivyModal:W}=h.usePrivyInternal(),L=q.useAppConfig(),[P,N]=r.useState(void 0),[$,O]=r.useState(!1),_=E?.funding,{reloadBalance:R}=j.useWalletBalance({rpcConfig:U,appId:k,address:"ethereum"===_.chainType?_.address:void 0,chain:"ethereum"===_.chainType?_.chain:void 0}),Q="solana"===_.chainType,z=Q?_.isUSDC?"USDC":"SOL":_.erc20Address?_.erc20ContractInfo?.symbol:_.chain.nativeCurrency.symbol,H=Q?x.find((({address:e})=>e===_.address)):T.find((({address:e})=>p.formatWalletAddress(e)===p.formatWalletAddress(_.address)));if(!_)return F({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:B||"FundingMethodSelectionScreen"},funding:E?.funding,solanaFundingData:E?.solanaFundingData,sendTransaction:E?.sendTransaction}),w("ErrorScreen"),/*#__PURE__*/e.jsx(e.Fragment,{});r.useEffect((()=>{let e=Q?async function(){if("solana"!==_.chainType)return;let e=L.solanaRpcs[_.chain];e?(_.isUSDC?async function({rpc:e,address:r,mintAddress:i}){let n=await e.getTokenAccountsByOwner(r,{mint:i},{encoding:"jsonParsed",commitment:"confirmed"}).send(),s=n.value[0]?.account;return s?BigInt(s.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:_.address,mintAddress:A.getUsdcMintAddress(_.chain)}):C.fetchWalletBalance({rpc:e.rpc,address:_.address})).then((e=>{let r=BigInt(e);P&&r>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"solana",address:H?.address,value:_.isUSDC?i.formatUnits(r-P,6):i.formatUnits(r-P,9),token:_.isUSDC?"USDC":"SOL"}})),N(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===_.chainType&&(async()=>{if(!_.erc20Address)return await R()??BigInt(0);{let{balance:e}=await I.getErc20Balance({chain:_.chain,address:_.address,erc20Address:_.erc20Address,rpcConfig:U,appId:k});return e}})().then((e=>{P&&e>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"ethereum",address:H?.address,chainId:_.chain.id,value:i.formatUnits(e-P,_.erc20ContractInfo?.decimals??18),token:_.erc20ContractInfo?.symbol??_.erc20Address??"ETH"}})),N(e)})).catch((()=>N(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[P]);let Y=r.useMemo((()=>null==P?"":_.isUSDC?n.formatTokenAmount({amount:P,decimals:6}):Q?S.getNativeCurrencyFromLamports(P,3,!0,!0):null!=_.erc20ContractInfo?.decimals?n.formatTokenAmount({amount:P,decimals:_.erc20ContractInfo.decimals}):n.formatWeiAmount({wei:P})),[P,Q,_]),V="ethereum"===_.chainType?_.chain.name:y.getChainName(_.chain),X=r.useMemo((()=>""===_.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(l.Title,{children:_.uiConfig?.receiveFundsTitle??`Receive ${_.amount} ${z??""}`.trim()})),[_.uiConfig?.receiveFundsTitle,_.amount,z]),G=r.useMemo((()=>""===_.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e.jsx(d.Subtitle,{children:_.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${V}.`})),[_.uiConfig?.receiveFundsSubtitle,V]),J="solana"===_.chainType&&_.isUSDC&&A.getUsdcMintAddress(_.chain)?`?spl-token=${A.getUsdcMintAddress(_.chain)}`:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.t,{}),X,G,/*#__PURE__*/e.jsxs(a.FlexContainer,{style:{gap:"1rem",margin:X||G?"1rem 0":"0"},children:[/*#__PURE__*/e.jsx(o.QrCode,{url:`${_.chainType}:${_.address}${J}`,size:200,squareLogoElement:M}),/*#__PURE__*/e.jsxs(c.InfoBanner,{theme:L.appearance.palette.colorScheme,children:["Make sure to send funds on ",V,"."]}),/*#__PURE__*/e.jsx(m.WalletInfoCard,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${Y} ${z}`,address:_.address}),$&&/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let M=({...r})=>/*#__PURE__*/e.jsx(C.Blobby,{color:"black",...r});exports.ManualTransferScreen=T,exports.default=T;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("viem"),n=require("@privy-io/js-sdk-core"),s=require("./Button-Bm_Ft0Dw.js"),a=require("./Layouts-dRL0OSpp.js"),t=require("./ModalHeader-DB7Tbjwz.js"),o=require("./QrCode-DsQD8cG6.js"),u=require("./FundWalletMethodHeader-BKgYjMau.js"),c=require("./InfoBanner-CTx1eRnV.js"),d=require("./Subtitle-Dtmrw8l5.js"),l=require("./Title-C-tHJvrb.js"),m=require("./WalletInfoCard-DKVdH9iF.js"),q=require("./context-DFq1obBO.js"),p=require("./useActiveWallet-BOX8xCn9.js"),h=require("./internal-context-NWsAL807.js"),f=require("./get-is-unified-wallet-D4ouXJpi.js"),j=require("./useWalletBalance-BVb8F3RO.js"),g=require("./useWallets-BLFNjTwC.js"),v=require("./analytics-C6C_4JmG.js"),C=require("./index-NJrQkxJ7.js"),y=require("./getChainName-C4rO8-3n.js"),A=require("./getUsdcMintAddress-REYZSOb9.js"),S=require("./transaction-DjF5X-by.js"),I=require("./getErc20Balance-DknCauCO.js");require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("qrcode"),require("@heroicons/react/24/outline/InformationCircleIcon"),require("lucide-react"),require("./ErrorMessage-f0cRWc29.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Address-5znFAhQw.js"),require("./shared-BPGwTh8c.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js");const T={component:()=>{let{wallets:T}=g.useWallets(),{connectors:b}=h.usePrivyInternal(),x=b.filter(p.isSolanaWalletConnector).flatMap((e=>e.wallets)),{data:E,setModalData:F,navigate:k,lastScreen:w}=f.usePrivyModal(),{rpcConfig:B,appId:U,createAnalyticsEvent:D,closePrivyModal:W}=h.usePrivyInternal(),L=q.useAppConfig(),[P,N]=r.useState(void 0),[$,O]=r.useState(!1),_=E?.funding,{reloadBalance:R}=j.useWalletBalance({rpcConfig:B,appId:U,address:"ethereum"===_.chainType?_.address:void 0,chain:"ethereum"===_.chainType?_.chain:void 0}),Q="solana"===_.chainType,z=Q?_.isUSDC?"USDC":"SOL":_.erc20Address?_.erc20ContractInfo?.symbol:_.chain.nativeCurrency.symbol,H=Q?x.find((({address:e})=>e===_.address)):T.find((({address:e})=>p.formatWalletAddress(e)===p.formatWalletAddress(_.address)));if(!_)return F({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:w||"FundingMethodSelectionScreen"},funding:E?.funding,solanaFundingData:E?.solanaFundingData,sendTransaction:E?.sendTransaction}),k("ErrorScreen"),/*#__PURE__*/e.jsx(e.Fragment,{});r.useEffect((()=>{let e=Q?async function(){if("solana"!==_.chainType)return;let e=L.solanaRpcs[_.chain];e?(_.isUSDC?async function({rpc:e,address:r,mintAddress:i}){let n=await e.getTokenAccountsByOwner(r,{mint:i},{encoding:"jsonParsed",commitment:"confirmed"}).send(),s=n.value[0]?.account;return s?BigInt(s.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:_.address,mintAddress:A.getUsdcMintAddress(_.chain)}):C.fetchWalletBalance({rpc:e.rpc,address:_.address})).then((e=>{let r=BigInt(e);P&&r>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"solana",address:H?.address,value:_.isUSDC?i.formatUnits(r-P,6):i.formatUnits(r-P,9),token:_.isUSDC?"USDC":"SOL"}})),N(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===_.chainType&&(async()=>{if(!_.erc20Address)return await R()??BigInt(0);{let{balance:e}=await I.getErc20Balance({chain:_.chain,address:_.address,erc20Address:_.erc20Address,rpcConfig:B,appId:U});return e}})().then((e=>{P&&e>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"ethereum",address:H?.address,chainId:_.chain.id,value:i.formatUnits(e-P,_.erc20ContractInfo?.decimals??18),token:_.erc20ContractInfo?.symbol??_.erc20Address??"ETH"}})),N(e)})).catch((()=>N(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[P]);let Y=r.useMemo((()=>null==P?"":_.isUSDC?n.formatTokenAmount({amount:P,decimals:6}):Q?S.getNativeCurrencyFromLamports(P,3,!0,!0):null!=_.erc20ContractInfo?.decimals?n.formatTokenAmount({amount:P,decimals:_.erc20ContractInfo.decimals}):n.formatWeiAmount({wei:P})),[P,Q,_]),V="ethereum"===_.chainType?_.chain.name:y.getChainName(_.chain),X=r.useMemo((()=>""===_.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(l.Title,{children:_.uiConfig?.receiveFundsTitle??`Receive ${_.amount} ${z??""}`.trim()})),[_.uiConfig?.receiveFundsTitle,_.amount,z]),G=r.useMemo((()=>""===_.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e.jsx(d.Subtitle,{children:_.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${V}.`})),[_.uiConfig?.receiveFundsSubtitle,V]),J="solana"===_.chainType&&_.isUSDC&&A.getUsdcMintAddress(_.chain)?`?spl-token=${A.getUsdcMintAddress(_.chain)}`:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.t,{}),X,G,/*#__PURE__*/e.jsxs(a.FlexContainer,{style:{gap:"1rem",margin:X||G?"1rem 0":"0"},children:[/*#__PURE__*/e.jsx(o.QrCode,{url:`${_.chainType}:${_.address}${J}`,size:200,squareLogoElement:M}),/*#__PURE__*/e.jsxs(c.InfoBanner,{theme:L.appearance.palette.colorScheme,children:["Make sure to send funds on ",V,"."]}),/*#__PURE__*/e.jsx(m.WalletInfoCard,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${Y} ${z}`,address:_.address}),$&&/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let M=({...r})=>/*#__PURE__*/e.jsx(C.Blobby,{color:"black",...r});exports.ManualTransferScreen=T,exports.default=T;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/ShieldCheckIcon"),o=require("react"),t=require("./Button-DpuRzAgk.js"),n=require("./useActiveWallet-B5cSS56I.js"),s=require("./ModalHeader-4MV7Tgk7.js"),a=require("./context-Dn8Hzo8O.js"),u=require("./get-is-unified-wallet-CHHPpmxX.js"),l=require("./EnrollTotp-zJR3l-q0.js"),c=require("./PinInput-DSI6rjOn.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("@privy-io/js-sdk-core"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./ErrorScreen-DAUNTckD.js"),require("lucide-react"),require("./index-4-C2N_7K.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./reservoir-CQGyEBb7.js"),require("./ScreenLayout-Bbhw-EIr.js"),require("./Screen-CJM19YNL.js"),require("./index-CRFXS9pP.js"),require("./LinkPasskeyScreen-DXLAama3.js"),require("./TodoList-Cm_a93ef.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-DvJPyneT.js"),require("qrcode");var h=/*#__PURE__*/d(r),j=/*#__PURE__*/d(i);const q={component:()=>{let{user:r,ready:i}=u.usePrivyContext(),{data:d,onUserCloseViaDialogOrKeybindRef:q}=u.usePrivyModal(),m=a.useAppConfig(),[y,p]=o.useState(null),[f,v]=o.useState(null),[x,g]=o.useState(null),[M,k]=o.useState(!1),[C,S]=o.useState(!1),[w,b]=o.useState(),I=async()=>{w?F(w):r?await P({user:r}):F(Error("Must be logged in to manage MFA")),setTimeout((()=>{p(null),v(null)}),500)};if(q.current=I,!d?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:F,onSuccess:P,onBack:T,mfaMethods:E,verify:A,generateTotpSecret:R,enrollTotp:B,unenrollTotp:L,enrollPasskey:W}=d.mfaEnroll,H=r?.mfaMethods.includes("sms"),U=r?.mfaMethods.includes("totp"),D=r?.mfaMethods.includes("passkey"),O=!!r?.phone,$=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function K(){p(null),v(null),b(void 0)}async function Q(e=$){try{b(void 0),S(!0);let r=await W(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),k(!1)}}if(!i||!r||!m)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.AppLogoContainer,{children:/*#__PURE__*/e.jsx(l.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(c.Container,{children:/*#__PURE__*/e.jsx(n.Loader,{})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("sms"===y)return null;if("totp"===y)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:["MFA adds an extra layer of security to your ",m?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await L();return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("passkey"===y){let r=d.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(c.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await W([]);return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}return 0!==E.length||H||U||D?"sms"===f?null:"totp"===f&&x?/*#__PURE__*/e.jsx(l.EnrollTotp,{onClose:I,onReset:K,submitEnrollmentWithTotp:e=>async function(e){try{b(void 0),S(!0);let r=await B(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),p(null)}}(e.mfaCode),error:w,totpInfo:{...x,appName:m?.name||"Privy"}}):"passkey"===f?/*#__PURE__*/e.jsx(l.EnrollPasskey,{onReset:K,onClose:I,submitEnrollmentWithPasskey:Q}):/*#__PURE__*/e.jsx(l.EnrollLandingScreen,{showIntro:!0,userMfaMethods:r.mfaMethods,appMfaMethods:m.mfa.methods,userHasAuthSms:O,backFn:T,handleSelectMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}return"totp"===e?(v(e),g(null),void R().then((({totpSecret:e,totpAuthUrl:r})=>{g({authUrl:r,secret:e})})).catch((()=>{g(null),K()}))):"passkey"===e&&1===$.length?await Q():void v(e)},isTotpLoading:"totp"===f&&!x,isPasskeyLoading:M,error:w,onClose:I,setRemovingMfaMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}p(e)}}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(j.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:[m?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:I,children:"Close"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}};exports.MfaAuthEnrollmentFlowScreen=q,exports.default=q;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/ShieldCheckIcon"),o=require("react"),t=require("./Button-Bm_Ft0Dw.js"),n=require("./useActiveWallet-BOX8xCn9.js"),s=require("./ModalHeader-DB7Tbjwz.js"),a=require("./context-DFq1obBO.js"),u=require("./get-is-unified-wallet-D4ouXJpi.js"),l=require("./EnrollTotp-BVeDTQ5J.js"),c=require("./PinInput-DSI6rjOn.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("@privy-io/js-sdk-core"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./ErrorScreen-BSjRGrRR.js"),require("lucide-react"),require("./index-NJrQkxJ7.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./reservoir-CQGyEBb7.js"),require("./ScreenLayout-BeH-Q6N2.js"),require("./Screen-D9Tvi297.js"),require("./index-CRFXS9pP.js"),require("./LinkPasskeyScreen-CUMuhJ2Q.js"),require("./TodoList-Cm_a93ef.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-DsQD8cG6.js"),require("qrcode");var h=/*#__PURE__*/d(r),j=/*#__PURE__*/d(i);const q={component:()=>{let{user:r,ready:i}=u.usePrivyContext(),{data:d,onUserCloseViaDialogOrKeybindRef:q}=u.usePrivyModal(),m=a.useAppConfig(),[y,p]=o.useState(null),[f,v]=o.useState(null),[x,g]=o.useState(null),[M,k]=o.useState(!1),[C,S]=o.useState(!1),[w,b]=o.useState(),I=async()=>{w?F(w):r?await P({user:r}):F(Error("Must be logged in to manage MFA")),setTimeout((()=>{p(null),v(null)}),500)};if(q.current=I,!d?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:F,onSuccess:P,onBack:T,mfaMethods:E,verify:A,generateTotpSecret:R,enrollTotp:B,unenrollTotp:L,enrollPasskey:W}=d.mfaEnroll,H=r?.mfaMethods.includes("sms"),U=r?.mfaMethods.includes("totp"),D=r?.mfaMethods.includes("passkey"),O=!!r?.phone,$=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function K(){p(null),v(null),b(void 0)}async function Q(e=$){try{b(void 0),S(!0);let r=await W(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),k(!1)}}if(!i||!r||!m)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.AppLogoContainer,{children:/*#__PURE__*/e.jsx(l.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(c.Container,{children:/*#__PURE__*/e.jsx(n.Loader,{})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("sms"===y)return null;if("totp"===y)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:["MFA adds an extra layer of security to your ",m?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await L();return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("passkey"===y){let r=d.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(c.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await W([]);return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}return 0!==E.length||H||U||D?"sms"===f?null:"totp"===f&&x?/*#__PURE__*/e.jsx(l.EnrollTotp,{onClose:I,onReset:K,submitEnrollmentWithTotp:e=>async function(e){try{b(void 0),S(!0);let r=await B(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),p(null)}}(e.mfaCode),error:w,totpInfo:{...x,appName:m?.name||"Privy"}}):"passkey"===f?/*#__PURE__*/e.jsx(l.EnrollPasskey,{onReset:K,onClose:I,submitEnrollmentWithPasskey:Q}):/*#__PURE__*/e.jsx(l.EnrollLandingScreen,{showIntro:!0,userMfaMethods:r.mfaMethods,appMfaMethods:m.mfa.methods,userHasAuthSms:O,backFn:T,handleSelectMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}return"totp"===e?(v(e),g(null),void R().then((({totpSecret:e,totpAuthUrl:r})=>{g({authUrl:r,secret:e})})).catch((()=>{g(null),K()}))):"passkey"===e&&1===$.length?await Q():void v(e)},isTotpLoading:"totp"===f&&!x,isPasskeyLoading:M,error:w,onClose:I,setRemovingMfaMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}p(e)}}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(j.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:[m?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:I,children:"Close"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}};exports.MfaAuthEnrollmentFlowScreen=q,exports.default=q;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-CHHPpmxX.js"),t=require("./to-ui-error-C_N9DMza.js");require("viem"),require("./context-Dn8Hzo8O.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-4MV7Tgk7.js"),require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-Bbhw-EIr.js"),require("./Button-DpuRzAgk.js"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("./Screen-CJM19YNL.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-CdW08dO7.js"),require("./useGetSolPrice-C986iVoO.js"),require("./index-4-C2N_7K.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./TransactionDetails-DvBQbDgX.js"),require("./WalletLink-CbnPrVEH.js"),require("./ethers-BwK3McWK.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const o={component:()=>{let{user:o}=i.usePrivyContext(),{data:s}=i.usePrivyModal(),[u,n]=r.useState(o?.mfaMethods[0]),[a,c]=r.useState(!1),[l,q]=r.useState(),[d,h]=r.useState();if(r.useEffect((()=>{n(o?.mfaMethods[0])}),[o?.mfaMethods]),!s?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:f,onSuccess:j,generateOptions:y,verifyTotpCode:v,verifyPasskey:m,verifySmsCode:p,sendSmsCode:k}=s.mfaVerify,S=async e=>{if("passkey"!==e)try{n(e),"sms"===e&&(n(e),await k()),"totp"===e&&n(e)}catch(e){console.error(e)}else try{n(e);let r=await y();if(!r)throw Error("something went wrong");q(r),await m(r),c(!0),h(void 0),j()}catch(e){h(t.toUIError(e))}},g=async e=>{h(void 0);try{if(!e||!u)return;if("passkey"===u){if(!l)throw Error("Missing passkey challenge");await m(l)}else"sms"===u?await p(e):"totp"===u&&await v(e);h(void 0),c(!0),j()}catch(e){throw t.toUIError(e).error}},w=()=>{d||!a?f(d?.error??Error("Canceled MFA verification.")):j()},M=r.useRef(!1);return r.useEffect((()=>{!M.current&&u&&(M.current=!0,S(u).finally((()=>{M.current=!1})))}),[open]),o?"passkey"===u?/*#__PURE__*/e.jsx(t.VerifyWithPasskey,{account:o.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:a,hasBlockingError:d?.isBlocking??!1,error:d?.error,onClose:w,onBack:()=>{n(void 0),h(void 0)},handleSubmit:()=>g(l).catch(h)}):"sms"===u||"totp"===u?/*#__PURE__*/e.jsx(t.VerifyWithSmsOrTotpCode,{selectedMethod:u,submitSuccess:a,hasBlockingError:d?.isBlocking??!1,handleSubmitCode:g,onClose:w,onBack:o.mfaMethods.length>1?()=>n(void 0):void 0}):/*#__PURE__*/e.jsx(t.VerifyMethodSelectionScreen,{user:o,onSelect:S,handleClose:w}):null}};exports.MfaAuthVerifyFlowScreen=o,exports.default=o;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-D4ouXJpi.js"),t=require("./to-ui-error-ER-8XlJF.js");require("viem"),require("./context-DFq1obBO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-DB7Tbjwz.js"),require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-BeH-Q6N2.js"),require("./Button-Bm_Ft0Dw.js"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("./Screen-D9Tvi297.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-BHq-guWz.js"),require("./useGetSolPrice-C986iVoO.js"),require("./index-NJrQkxJ7.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./TransactionDetails-KB5Wyu1l.js"),require("./WalletLink-GY0_Tmtg.js"),require("./ethers-DZGJ4Y5i.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const o={component:()=>{let{user:o}=i.usePrivyContext(),{data:s}=i.usePrivyModal(),[u,n]=r.useState(o?.mfaMethods[0]),[a,c]=r.useState(!1),[l,q]=r.useState(),[d,h]=r.useState();if(r.useEffect((()=>{n(o?.mfaMethods[0])}),[o?.mfaMethods]),!s?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:f,onSuccess:j,generateOptions:y,verifyTotpCode:v,verifyPasskey:m,verifySmsCode:p,sendSmsCode:k}=s.mfaVerify,S=async e=>{if("passkey"!==e)try{n(e),"sms"===e&&(n(e),await k()),"totp"===e&&n(e)}catch(e){console.error(e)}else try{n(e);let r=await y();if(!r)throw Error("something went wrong");q(r),await m(r),c(!0),h(void 0),j()}catch(e){h(t.toUIError(e))}},g=async e=>{h(void 0);try{if(!e||!u)return;if("passkey"===u){if(!l)throw Error("Missing passkey challenge");await m(l)}else"sms"===u?await p(e):"totp"===u&&await v(e);h(void 0),c(!0),j()}catch(e){throw t.toUIError(e).error}},w=()=>{d||!a?f(d?.error??Error("Canceled MFA verification.")):j()},M=r.useRef(!1);return r.useEffect((()=>{!M.current&&u&&(M.current=!0,S(u).finally((()=>{M.current=!1})))}),[open]),o?"passkey"===u?/*#__PURE__*/e.jsx(t.VerifyWithPasskey,{account:o.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:a,hasBlockingError:d?.isBlocking??!1,error:d?.error,onClose:w,onBack:()=>{n(void 0),h(void 0)},handleSubmit:()=>g(l).catch(h)}):"sms"===u||"totp"===u?/*#__PURE__*/e.jsx(t.VerifyWithSmsOrTotpCode,{selectedMethod:u,submitSuccess:a,hasBlockingError:d?.isBlocking??!1,handleSubmitCode:g,onClose:w,onBack:o.mfaMethods.length>1?()=>n(void 0):void 0}):/*#__PURE__*/e.jsx(t.VerifyMethodSelectionScreen,{user:o,onSelect:S,handleClose:w}):null}};exports.MfaAuthVerifyFlowScreen=o,exports.default=o;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),o=require("@heroicons/react/24/outline/ShieldCheckIcon"),n=require("@heroicons/react/24/solid/CheckBadgeIcon"),t=require("@heroicons/react/24/solid/IdentificationIcon"),i=require("react"),s=require("./Button-DpuRzAgk.js"),l=require("./useActiveWallet-B5cSS56I.js"),a=require("./ModalHeader-4MV7Tgk7.js"),c=require("./context-Dn8Hzo8O.js"),u=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-CHHPpmxX.js"),h=require("./index-4-C2N_7K.js"),m=require("./EnrollTotp-zJR3l-q0.js"),j=require("@heroicons/react/24/outline/CheckCircleIcon"),x=require("@heroicons/react/24/outline/PhoneIcon"),y=require("@privy-io/js-sdk-core"),f=require("./ConnectPhoneForm-CIaHyHT9.js"),p=require("./PinInput-DSI6rjOn.js"),q=require("./ErrorScreen-DAUNTckD.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./LinkPasskeyScreen-DXLAama3.js"),require("lucide-react"),require("./TodoList-Cm_a93ef.js"),require("./ScreenLayout-Bbhw-EIr.js"),require("./Screen-CJM19YNL.js"),require("./index-CRFXS9pP.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-DvJPyneT.js"),require("qrcode"),require("./reservoir-CQGyEBb7.js");var C=/*#__PURE__*/v(r),M=/*#__PURE__*/v(o),S=/*#__PURE__*/v(n),g=/*#__PURE__*/v(t),w=/*#__PURE__*/v(j),k=/*#__PURE__*/v(x);const b=({appName:r,onComplete:o,onReset:n,onClose:t})=>{let[l,u]=i.useState(""),[m,j]=i.useState(!1),[x,v]=i.useState(null),[C,M]=i.useState("enroll"),{initEnrollmentWithSms:S,submitEnrollmentWithSms:g}=h.useMfaEnrollment(),{data:b}=d.usePrivyModal(),I=c.useAppConfig();function F(){b?.mfaEnrollmentFlow?.onSuccess(),o()}return x?/*#__PURE__*/e.jsx(q.ErrorScreenView,{allowlistConfig:I.allowlistConfig,error:x,onBack:()=>v(null),onRetry:()=>v(null)}):"enroll"===C?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:n,onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Set up SMS verification"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["We'll text a verification code to this mobile device whenever you use your ",r," ","wallet."]}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(f.ConnectPhoneNumberForm,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await S({phoneNumber:e}),u(e),M("verify")}catch(e){v(e)}},hideRecent:!0}),/*#__PURE__*/e.jsxs(p.TermsText,{children:["By providing your mobile number, you agree to receive text messages from ",I?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):m?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:F},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(w.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"SMS verification added"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",r," wallet."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:F,children:"Done"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:function(){"verify"===C?M("enroll"):n()},onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Enter enrollment code"}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(p.NumericPinInput,{onChange:async function(e){try{if(!e)return;await g({phoneNumber:l,mfaCode:e}),j(!0)}catch(e){if(h.errorIndicatesMfaRateLimit(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(h.errorIndicatesMfaVerificationFailed(e))throw Error("The code you entered is not valid");if(h.errorIndicatesMfaTimeout(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw h.errorIndicatesMfaCanceled(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e.jsx("strong",{children:y.lastFourDigits(l)})]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})},I={component:()=>{let{user:r,enrollInMfa:o,ready:n}=d.usePrivyContext(),[t,j]=i.useState(null),{unenrollWithSms:x,unenrollWithTotp:y,unenrollWithPasskey:f,submitEnrollmentWithTotp:q,initEnrollmentWithPasskey:v,submitEnrollmentWithPasskey:w,initEnrollmentWithTotp:k}=h.useMfaEnrollment(),{data:I,onUserCloseViaDialogOrKeybindRef:F}=d.usePrivyModal(),E=c.useAppConfig(),{closePrivyModal:P}=u.usePrivyInternal(),{promptMfa:T}=h.useMfa(),[B,W]=i.useState(!1),[L,R]=i.useState(null),[A,H]=i.useState(null),N=()=>{P({shouldCallAuthOnSuccess:!0}),o(!1),setTimeout((()=>{j(null),R(null)}),500)},[U,D]=i.useState(!1),[O,V]=i.useState();F.current=N;let Y=r?.mfaMethods.includes("sms"),$=!!r?.phone,K=r?.mfaMethods.includes("totp"),Q=r?.mfaMethods.includes("passkey"),X=Y||K||Q,z=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function J(){j(null),R(null)}async function G(e=z){D(!0);try{return await v(),await w({credentialIds:e},{removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{D(!1)}}if(i.useEffect((()=>{X&&W(!0)}),[X]),!n||!r||!E/*#__PURE__*/)return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.AppLogoContainer,{children:/*#__PURE__*/e.jsx(m.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(p.Container,{children:/*#__PURE__*/e.jsx(l.Loader,{})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("sms"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove SMS verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await x()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("totp"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await y()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("passkey"===t){let r=I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await f({removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})}if(0===I.mfaEnrollmentFlow.mfaMethods.length&&!X)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:[E?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:N,children:"Close"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});let Z=!X&&!B;return Z?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Transaction Protection"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/e.jsxs(p.List,{children:[/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(S.default,{})}),"Enable 2-Step verification for your ",E?.name," wallet."]}),/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(g.default,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/e.jsxs(p.BottomSection,{children:[/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W(!0),children:"Continue"}),/*#__PURE__*/e.jsx(s.SecondaryButton,{onClick:N,children:"Not now"})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):"sms"===L?/*#__PURE__*/e.jsx(b,{appName:E?.name||"Privy",onComplete:N,onReset:J,onClose:N}):"totp"===L&&A?/*#__PURE__*/e.jsx(m.EnrollTotp,{onClose:N,onReset:J,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return V(void 0),await q({mfaCode:e}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{j(null)}}(e),totpInfo:{...A,appName:E?.name||"Privy"}}):"passkey"===L?/*#__PURE__*/e.jsx(m.EnrollPasskey,{onReset:J,onClose:N,submitEnrollmentWithPasskey:G}):/*#__PURE__*/e.jsx(m.EnrollLandingScreen,{showIntro:Z,userMfaMethods:r.mfaMethods,appMfaMethods:E.mfa.methods,userHasAuthSms:$,backFn:function(){W(!1)},handleSelectMethod:async function(e){try{await T()}catch(e){return void V(e)}return"totp"===e?(R(e),H(null),void k().then((e=>{H(e)})).catch((()=>{H(null),J()}))):"passkey"===e&&1===z.length?await G():void R(e)},isTotpLoading:"totp"===L&&!A,isPasskeyLoading:U,error:O,onClose:N,setRemovingMfaMethod:async e=>{try{await T()}catch(e){return void V(e)}j(e)}})}};exports.MfaEnrollmentFlowScreen=I,exports.default=I;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),o=require("@heroicons/react/24/outline/ShieldCheckIcon"),n=require("@heroicons/react/24/solid/CheckBadgeIcon"),t=require("@heroicons/react/24/solid/IdentificationIcon"),i=require("react"),s=require("./Button-Bm_Ft0Dw.js"),l=require("./useActiveWallet-BOX8xCn9.js"),a=require("./ModalHeader-DB7Tbjwz.js"),c=require("./context-DFq1obBO.js"),u=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-D4ouXJpi.js"),h=require("./index-NJrQkxJ7.js"),m=require("./EnrollTotp-BVeDTQ5J.js"),j=require("@heroicons/react/24/outline/CheckCircleIcon"),x=require("@heroicons/react/24/outline/PhoneIcon"),y=require("@privy-io/js-sdk-core"),f=require("./ConnectPhoneForm-WT8rso3i.js"),p=require("./PinInput-DSI6rjOn.js"),q=require("./ErrorScreen-BSjRGrRR.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./LinkPasskeyScreen-CUMuhJ2Q.js"),require("lucide-react"),require("./TodoList-Cm_a93ef.js"),require("./ScreenLayout-BeH-Q6N2.js"),require("./Screen-D9Tvi297.js"),require("./index-CRFXS9pP.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-DsQD8cG6.js"),require("qrcode"),require("./reservoir-CQGyEBb7.js");var C=/*#__PURE__*/v(r),M=/*#__PURE__*/v(o),S=/*#__PURE__*/v(n),g=/*#__PURE__*/v(t),w=/*#__PURE__*/v(j),k=/*#__PURE__*/v(x);const b=({appName:r,onComplete:o,onReset:n,onClose:t})=>{let[l,u]=i.useState(""),[m,j]=i.useState(!1),[x,v]=i.useState(null),[C,M]=i.useState("enroll"),{initEnrollmentWithSms:S,submitEnrollmentWithSms:g}=h.useMfaEnrollment(),{data:b}=d.usePrivyModal(),I=c.useAppConfig();function F(){b?.mfaEnrollmentFlow?.onSuccess(),o()}return x?/*#__PURE__*/e.jsx(q.ErrorScreenView,{allowlistConfig:I.allowlistConfig,error:x,onBack:()=>v(null),onRetry:()=>v(null)}):"enroll"===C?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:n,onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Set up SMS verification"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["We'll text a verification code to this mobile device whenever you use your ",r," ","wallet."]}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(f.ConnectPhoneNumberForm,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await S({phoneNumber:e}),u(e),M("verify")}catch(e){v(e)}},hideRecent:!0}),/*#__PURE__*/e.jsxs(p.TermsText,{children:["By providing your mobile number, you agree to receive text messages from ",I?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):m?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:F},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(w.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"SMS verification added"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",r," wallet."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:F,children:"Done"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:function(){"verify"===C?M("enroll"):n()},onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Enter enrollment code"}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(p.NumericPinInput,{onChange:async function(e){try{if(!e)return;await g({phoneNumber:l,mfaCode:e}),j(!0)}catch(e){if(h.errorIndicatesMfaRateLimit(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(h.errorIndicatesMfaVerificationFailed(e))throw Error("The code you entered is not valid");if(h.errorIndicatesMfaTimeout(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw h.errorIndicatesMfaCanceled(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e.jsx("strong",{children:y.lastFourDigits(l)})]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})},I={component:()=>{let{user:r,enrollInMfa:o,ready:n}=d.usePrivyContext(),[t,j]=i.useState(null),{unenrollWithSms:x,unenrollWithTotp:y,unenrollWithPasskey:f,submitEnrollmentWithTotp:q,initEnrollmentWithPasskey:v,submitEnrollmentWithPasskey:w,initEnrollmentWithTotp:k}=h.useMfaEnrollment(),{data:I,onUserCloseViaDialogOrKeybindRef:F}=d.usePrivyModal(),E=c.useAppConfig(),{closePrivyModal:P}=u.usePrivyInternal(),{promptMfa:T}=h.useMfa(),[B,W]=i.useState(!1),[L,R]=i.useState(null),[A,H]=i.useState(null),N=()=>{P({shouldCallAuthOnSuccess:!0}),o(!1),setTimeout((()=>{j(null),R(null)}),500)},[U,D]=i.useState(!1),[O,V]=i.useState();F.current=N;let Y=r?.mfaMethods.includes("sms"),$=!!r?.phone,K=r?.mfaMethods.includes("totp"),Q=r?.mfaMethods.includes("passkey"),X=Y||K||Q,z=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function J(){j(null),R(null)}async function G(e=z){D(!0);try{return await v(),await w({credentialIds:e},{removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{D(!1)}}if(i.useEffect((()=>{X&&W(!0)}),[X]),!n||!r||!E/*#__PURE__*/)return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.AppLogoContainer,{children:/*#__PURE__*/e.jsx(m.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(p.Container,{children:/*#__PURE__*/e.jsx(l.Loader,{})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("sms"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove SMS verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await x()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("totp"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await y()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("passkey"===t){let r=I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await f({removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})}if(0===I.mfaEnrollmentFlow.mfaMethods.length&&!X)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:[E?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:N,children:"Close"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});let Z=!X&&!B;return Z?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Transaction Protection"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/e.jsxs(p.List,{children:[/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(S.default,{})}),"Enable 2-Step verification for your ",E?.name," wallet."]}),/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(g.default,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/e.jsxs(p.BottomSection,{children:[/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W(!0),children:"Continue"}),/*#__PURE__*/e.jsx(s.SecondaryButton,{onClick:N,children:"Not now"})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):"sms"===L?/*#__PURE__*/e.jsx(b,{appName:E?.name||"Privy",onComplete:N,onReset:J,onClose:N}):"totp"===L&&A?/*#__PURE__*/e.jsx(m.EnrollTotp,{onClose:N,onReset:J,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return V(void 0),await q({mfaCode:e}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{j(null)}}(e),totpInfo:{...A,appName:E?.name||"Privy"}}):"passkey"===L?/*#__PURE__*/e.jsx(m.EnrollPasskey,{onReset:J,onClose:N,submitEnrollmentWithPasskey:G}):/*#__PURE__*/e.jsx(m.EnrollLandingScreen,{showIntro:Z,userMfaMethods:r.mfaMethods,appMfaMethods:E.mfa.methods,userHasAuthSms:$,backFn:function(){W(!1)},handleSelectMethod:async function(e){try{await T()}catch(e){return void V(e)}return"totp"===e?(R(e),H(null),void k().then((e=>{H(e)})).catch((()=>{H(null),J()}))):"passkey"===e&&1===z.length?await G():void R(e)},isTotpLoading:"totp"===L&&!A,isPasskeyLoading:U,error:O,onClose:N,setRemovingMfaMethod:async e=>{try{await T()}catch(e){return void V(e)}j(e)}})}};exports.MfaEnrollmentFlowScreen=I,exports.default=I;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-CHHPpmxX.js"),t=require("./index-4-C2N_7K.js"),o=require("./to-ui-error-C_N9DMza.js");require("viem"),require("./context-Dn8Hzo8O.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-Bbhw-EIr.js"),require("./Button-DpuRzAgk.js"),require("./Screen-CJM19YNL.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-CdW08dO7.js"),require("./useGetSolPrice-C986iVoO.js"),require("./TransactionDetails-DvBQbDgX.js"),require("./WalletLink-CbnPrVEH.js"),require("./ethers-BwK3McWK.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const u=({onClose:u})=>{let{user:s}=i.usePrivyContext(),[n,c]=r.useState(s?.mfaMethods[0]??null),{init:a,cancel:l,submit:q}=t.useMfa(),[d,h]=r.useState(!1),[j,f]=r.useState(null),[v,y]=r.useState();r.useEffect((()=>{c(s?.mfaMethods[0]??null)}),[s?.mfaMethods]);let m=r.useRef(!1);async function p(e){y(void 0);try{if(!e||!n)return;await q(n,e),h(!0),y(void 0),u()}catch(e){throw o.toUIError(e).error}}async function k(e){if("passkey"!==e)try{c(e),await a(e)}catch(e){console.error(e)}else try{c(e);let r=await a(e);if(!r)throw Error("something went wrong");f(r),await q(e,r),h(!0),y(void 0),u()}catch(e){y(o.toUIError(e))}}r.useEffect((()=>{!m.current&&n&&(m.current=!0,k(n).finally((()=>{m.current=!1})))}),[]);let S=()=>{c(null),y(void 0),l(),u()};return s?"passkey"===n?/*#__PURE__*/e.jsx(o.VerifyWithPasskey,{account:s.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:d,hasBlockingError:v?.isBlocking??!1,error:v?.error,onClose:S,onBack:()=>{c(null),y(void 0)},handleSubmit:()=>p(j).catch(y)}):n?/*#__PURE__*/e.jsx(o.VerifyWithSmsOrTotpCode,{submitSuccess:d,hasBlockingError:v?.isBlocking??!1,handleSubmitCode:p,selectedMethod:n,onClose:S,onBack:s.mfaMethods.length>1?()=>c(null):void 0}):/*#__PURE__*/e.jsx(o.VerifyMethodSelectionScreen,{user:s,onSelect:k,handleClose:S}):null};exports.MfaVerifyFlowScreen=u,exports.default=u;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-D4ouXJpi.js"),t=require("./index-NJrQkxJ7.js"),o=require("./to-ui-error-ER-8XlJF.js");require("viem"),require("./context-DFq1obBO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-BeH-Q6N2.js"),require("./Button-Bm_Ft0Dw.js"),require("./Screen-D9Tvi297.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-BHq-guWz.js"),require("./useGetSolPrice-C986iVoO.js"),require("./TransactionDetails-KB5Wyu1l.js"),require("./WalletLink-GY0_Tmtg.js"),require("./ethers-DZGJ4Y5i.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const u=({onClose:u})=>{let{user:s}=i.usePrivyContext(),[n,c]=r.useState(s?.mfaMethods[0]??null),{init:a,cancel:l,submit:q}=t.useMfa(),[d,h]=r.useState(!1),[j,f]=r.useState(null),[v,y]=r.useState();r.useEffect((()=>{c(s?.mfaMethods[0]??null)}),[s?.mfaMethods]);let m=r.useRef(!1);async function p(e){y(void 0);try{if(!e||!n)return;await q(n,e),h(!0),y(void 0),u()}catch(e){throw o.toUIError(e).error}}async function k(e){if("passkey"!==e)try{c(e),await a(e)}catch(e){console.error(e)}else try{c(e);let r=await a(e);if(!r)throw Error("something went wrong");f(r),await q(e,r),h(!0),y(void 0),u()}catch(e){y(o.toUIError(e))}}r.useEffect((()=>{!m.current&&n&&(m.current=!0,k(n).finally((()=>{m.current=!1})))}),[]);let S=()=>{c(null),y(void 0),l(),u()};return s?"passkey"===n?/*#__PURE__*/e.jsx(o.VerifyWithPasskey,{account:s.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:d,hasBlockingError:v?.isBlocking??!1,error:v?.error,onClose:S,onBack:()=>{c(null),y(void 0)},handleSubmit:()=>p(j).catch(y)}):n?/*#__PURE__*/e.jsx(o.VerifyWithSmsOrTotpCode,{submitSuccess:d,hasBlockingError:v?.isBlocking??!1,handleSubmitCode:p,selectedMethod:n,onClose:S,onBack:s.mfaMethods.length>1?()=>c(null):void 0}):/*#__PURE__*/e.jsx(o.VerifyMethodSelectionScreen,{user:s,onSelect:k,handleClose:S}):null};exports.MfaVerifyFlowScreen=u,exports.default=u;
@@ -1,3 +1,3 @@
1
- "use strict";var e=require("react/jsx-runtime"),c=require("styled-components"),o=require("./context-Dn8Hzo8O.js"),a=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),l=require("./internal-context-NWsAL807.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=/*#__PURE__*/t(a),d=/*#__PURE__*/t(r),s=/*#__PURE__*/t(i);function h(c){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/e.jsx("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=/*#__PURE__*/c.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);let v=/*#__PURE__*/c.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const f=/*#__PURE__*/c.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),x=({backFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{onClick:c,children:/*#__PURE__*/e.jsx(n.default,{height:"16px",width:"16px",strokeWidth:2})})}),g=({infoFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(m,{"aria-label":"info",onClick:c,children:/*#__PURE__*/e.jsx(d.default,{height:"22px",width:"22px",strokeWidth:2})})}),y=c=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/e.jsx(s.default,{height:"16px",width:"16px",strokeWidth:2})})});let u=/*#__PURE__*/c.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),m=/*#__PURE__*/c.styled(u).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),j=/*#__PURE__*/c.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/c.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),w=/*#__PURE__*/c.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),C=/*#__PURE__*/c.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);exports.BlobbyFooter=({className:c})=>{let{appearance:a}=o.useAppConfig();/*#__PURE__*/return e.jsx(f,{className:c,children:a.footerLogo??/*#__PURE__*/e.jsx(v,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/e.jsx(h,{color:"currentColor",height:13,width:150})})})},exports.ModalFooter=f,exports.ModalHeader=({backFn:c,infoFn:a,onClose:r,title:i,closeable:t=!0,className:n})=>{let{closePrivyModal:d}=l.usePrivyInternal(),s=o.useAppConfig();/*#__PURE__*/return e.jsxs(j,{className:n,children:[/*#__PURE__*/e.jsxs(b,{children:[c&&/*#__PURE__*/e.jsx(x,{backFn:c}),/*#__PURE__*/e.jsx("div",{style:{height:24}}),a&&/*#__PURE__*/e.jsx(g,{infoFn:a})]}),i&&/*#__PURE__*/e.jsx(C,{id:"privy-dialog-title",children:i}),/*#__PURE__*/e.jsx(w,{children:!s.render.standalone&&t&&/*#__PURE__*/e.jsx(y,{onClose:r||(()=>d())})})]})},exports.TermsAndConditions=function({app:{legal:{privacyPolicyUrl:c,termsAndConditionsUrl:o,requireUsersAcceptTerms:a}},alwaysShowImplicitConsent:r}){let i=!(!c||!o);return a&&!r||!o&&!c?
1
+ "use strict";var e=require("react/jsx-runtime"),c=require("styled-components"),o=require("./context-DFq1obBO.js"),a=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),l=require("./internal-context-NWsAL807.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=/*#__PURE__*/t(a),d=/*#__PURE__*/t(r),s=/*#__PURE__*/t(i);function h(c){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/e.jsx("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=/*#__PURE__*/c.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);let v=/*#__PURE__*/c.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const f=/*#__PURE__*/c.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),x=({backFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{onClick:c,children:/*#__PURE__*/e.jsx(n.default,{height:"16px",width:"16px",strokeWidth:2})})}),g=({infoFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(m,{"aria-label":"info",onClick:c,children:/*#__PURE__*/e.jsx(d.default,{height:"22px",width:"22px",strokeWidth:2})})}),y=c=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/e.jsx(s.default,{height:"16px",width:"16px",strokeWidth:2})})});let u=/*#__PURE__*/c.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),m=/*#__PURE__*/c.styled(u).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),j=/*#__PURE__*/c.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/c.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),w=/*#__PURE__*/c.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),C=/*#__PURE__*/c.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);exports.BlobbyFooter=({className:c})=>{let{appearance:a}=o.useAppConfig();/*#__PURE__*/return e.jsx(f,{className:c,children:a.footerLogo??/*#__PURE__*/e.jsx(v,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/e.jsx(h,{color:"currentColor",height:13,width:150})})})},exports.ModalFooter=f,exports.ModalHeader=({backFn:c,infoFn:a,onClose:r,title:i,closeable:t=!0,className:n})=>{let{closePrivyModal:d}=l.usePrivyInternal(),s=o.useAppConfig();/*#__PURE__*/return e.jsxs(j,{className:n,children:[/*#__PURE__*/e.jsxs(b,{children:[c&&/*#__PURE__*/e.jsx(x,{backFn:c}),/*#__PURE__*/e.jsx("div",{style:{height:24}}),a&&/*#__PURE__*/e.jsx(g,{infoFn:a})]}),i&&/*#__PURE__*/e.jsx(C,{id:"privy-dialog-title",children:i}),/*#__PURE__*/e.jsx(w,{children:!s.render.standalone&&t&&/*#__PURE__*/e.jsx(y,{onClose:r||(()=>d())})})]})},exports.TermsAndConditions=function({app:{legal:{privacyPolicyUrl:c,termsAndConditionsUrl:o,requireUsersAcceptTerms:a}},alwaysShowImplicitConsent:r}){let i=!(!c||!o);return a&&!r||!o&&!c?
2
2
  /*#__PURE__*/e.jsx(p,{}):
3
3
  /*#__PURE__*/ /*#__PURE__*/e.jsxs(p,{children:["By logging in I agree to the"," ",o&&/*#__PURE__*/e.jsx("a",{href:o,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",c&&/*#__PURE__*/e.jsx("a",{href:c,target:"_blank",children:"Privacy Policy"})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),t=require("@heroicons/react/24/solid/CheckCircleIcon"),i=require("react"),o=require("styled-components"),n=require("./Button-DpuRzAgk.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-B5cSS56I.js"),l=require("./ModalHeader-4MV7Tgk7.js"),u=require("./context-Dn8Hzo8O.js"),c=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-CHHPpmxX.js"),h=require("./index-DiPPDo6V.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("./analytics-C6C_4JmG.js");var m=/*#__PURE__*/g(r),p=/*#__PURE__*/g(t);const y=({size:r=61,...t})=>/*#__PURE__*/e.jsx("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const f={component:()=>{let{data:r,setModalData:t,navigateBack:i}=d.usePrivyModal(),o=u.useAppConfig(),{closePrivyModal:n}=c.usePrivyInternal(),{externalTransactionId:a}=r?.moonpayStatus,s=h.usePollMoonpayTransactionStatus(a||null,o.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{title:"Fund account",backFn:()=>{let e={...r?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),t({funding:e,solanaFundingData:r?.solanaFundingData}),i()}}),/*#__PURE__*/e.jsx(C,{status:s,onClickCta:n}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};let C=({status:r,onClickCta:t})=>{let{title:o,body:s,cta:l}=i.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(j,{children:[/*#__PURE__*/e.jsx(v,{status:r}),/*#__PURE__*/e.jsxs(a.FixedGappedContainer,{children:[/*#__PURE__*/e.jsx("h3",{children:o}),/*#__PURE__*/e.jsx(x,{children:s})]})]}),l&&/*#__PURE__*/e.jsx(n.PrimaryButton,{onClick:t,children:l})]})},v=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(s.Loader,{color:r,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(s.LoaderFaint,{color:r}),/*#__PURE__*/e.jsx(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let t=(r=>{switch(r){case"completed":return p.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(m.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),i=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(r);/*#__PURE__*/return e.jsx("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&/*#__PURE__*/e.jsx(t,{width:"4rem",height:"4rem",color:i})})},x=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);exports.MoonpayStatusScreen=f,exports.default=f;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),t=require("@heroicons/react/24/solid/CheckCircleIcon"),i=require("react"),o=require("styled-components"),n=require("./Button-Bm_Ft0Dw.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-BOX8xCn9.js"),l=require("./ModalHeader-DB7Tbjwz.js"),u=require("./context-DFq1obBO.js"),c=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-D4ouXJpi.js"),h=require("./index-CKB4VKFb.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("./analytics-C6C_4JmG.js");var m=/*#__PURE__*/g(r),p=/*#__PURE__*/g(t);const y=({size:r=61,...t})=>/*#__PURE__*/e.jsx("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const f={component:()=>{let{data:r,setModalData:t,navigateBack:i}=d.usePrivyModal(),o=u.useAppConfig(),{closePrivyModal:n}=c.usePrivyInternal(),{externalTransactionId:a}=r?.moonpayStatus,s=h.usePollMoonpayTransactionStatus(a||null,o.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{title:"Fund account",backFn:()=>{let e={...r?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),t({funding:e,solanaFundingData:r?.solanaFundingData}),i()}}),/*#__PURE__*/e.jsx(C,{status:s,onClickCta:n}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};let C=({status:r,onClickCta:t})=>{let{title:o,body:s,cta:l}=i.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(j,{children:[/*#__PURE__*/e.jsx(v,{status:r}),/*#__PURE__*/e.jsxs(a.FixedGappedContainer,{children:[/*#__PURE__*/e.jsx("h3",{children:o}),/*#__PURE__*/e.jsx(x,{children:s})]})]}),l&&/*#__PURE__*/e.jsx(n.PrimaryButton,{onClick:t,children:l})]})},v=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(s.Loader,{color:r,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(s.LoaderFaint,{color:r}),/*#__PURE__*/e.jsx(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let t=(r=>{switch(r){case"completed":return p.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(m.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),i=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(r);/*#__PURE__*/return e.jsx("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&/*#__PURE__*/e.jsx(t,{width:"4rem",height:"4rem",color:i})})},x=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);exports.MoonpayStatusScreen=f,exports.default=f;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./get-is-unified-wallet-CHHPpmxX.js"),o=require("./twitter-BVVRWkcG.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-Dn8Hzo8O.js"),s=require("./internal-context-NWsAL807.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-CuHR6wvs.js"),d=require("./ScreenLayout-Bbhw-EIr.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-4-C2N_7K.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./Button-DpuRzAgk.js"),require("styled-components"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("./Screen-CJM19YNL.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/m(r),p=/*#__PURE__*/m(i);const y=({style:r})=>/*#__PURE__*/e.jsx(p.default,{style:{color:"var(--privy-color-error)",...r}});let E={google:{name:"Google",component:o.Google},discord:{name:"Discord",component:o.Discord},github:{name:"Github",component:o.Github},linkedin:{name:"LinkedIn",component:o.LinkedIn},twitter:{name:"Twitter",component:o.Twitter},spotify:{name:"Spotify",component:o.Spotify},instagram:{name:"Instagram",component:o.Instagram},tiktok:{name:"Tiktok",component:o.Tiktok},line:{name:"LINE",component:n.Line},twitch:{name:"Twitch",component:n.Twitch},apple:{name:"Apple",component:o.Apple}},h=({iconUrl:e,...r})=>v.default.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},v.default.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},v.default.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const S=(e,r)=>{if(e in E)return E[e];if(t.isCustomOAuthProvider(e)&&r){let t=r.find((r=>r.provider===e));if(t)return{name:t.provider_display_name,component:e=>v.default.createElement(h,{...e,iconUrl:t.provider_icon_url})}}return{name:"Unknown",component:y}};const C=({providerName:r,ProviderLogo:t,success:o,errorMessage:i,onRetry:n})=>{let a=o?`Successfully connected with ${r}`:i?i.message:`Verifying connection to ${r}`;/*#__PURE__*/return e.jsx(d.ScreenLayout,{title:a,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&n?{label:"Retry",onClick:n}:void 0,watermark:!0})},g={component:()=>{let{authenticated:o,logout:i,ready:n,user:d}=t.usePrivyContext(),{setModalData:m,navigate:v,resetNavigation:p}=t.usePrivyModal(),y=a.useAppConfig(),{getAuthMeta:E,initLoginWithOAuth:h,loginWithOAuth:g,updateWallets:q,setReadyToTrue:f,closePrivyModal:A,createAnalyticsEvent:T}=s.usePrivyInternal(),[_,w]=r.useState(!1),[P,U]=r.useState(void 0),j=E()?.provider||"google",{name:O,component:R}=S(j,y.customOAuthProviders);return r.useEffect((()=>{g(j).then((()=>{w(!0),f(!0)})).catch((e=>{if(f(!1),e?.privyErrorCode===s.PrivyErrorCode.ALLOWLIST_REJECTED)return U(void 0),p(),void v("AllowlistRejectionScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_LIMIT_REACHED)return console.error(new s.PrivyUserLimitReachedError(e).toString()),U(void 0),p(),void v("UserLimitReachedScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_DOES_NOT_EXIST)return U(void 0),p(),void v("AccountNotFoundScreen");if(e?.privyErrorCode===s.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return U(void 0),p(),m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:E()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");let{retryable:r,detail:t}=function(e,r,t){let o={detail:"",retryable:!1},i=c.e(r);if(e?.privyErrorCode===s.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===s.PrivyErrorCode.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===s.PrivyErrorCode.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=S(r,t).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===s.PrivyErrorCode.OAUTH_ACCOUNT_SUSPENDED){let e=S(r,t).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===s.PrivyErrorCode.OAUTH_UNEXPECTED&&r.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}(e,j,y.customOAuthProviders);U({retryable:r,detail:t,message:"Authentication failed"})})).finally((()=>{l.stripUrlOAuthParamsAndRemoveStateCode()}))}),[O,j]),r.useEffect((()=>{if(n&&o&&_&&d){if(y?.legal.requireUsersAcceptTerms&&!d.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}if(u.shouldProceedtoEmbeddedWalletCreationFlow(d,y.embeddedWallets)){let e=setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:j,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}{let e=setTimeout((()=>A({shouldCallAuthOnSuccess:!0,isSuccess:!0})),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return q(),()=>clearTimeout(e)}}}),[n,o,_,d]),/*#__PURE__*/e.jsx(C,{providerName:O,ProviderLogo:R,success:_,errorMessage:P,onRetry:P?.retryable?()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),h(j),U(void 0)}:void 0})},isShownBeforeReady:!0};exports.OAuthStatusScreen=g,exports.OAuthStatusScreenView=C,exports.default=g;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./get-is-unified-wallet-D4ouXJpi.js"),o=require("./twitter-BVVRWkcG.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-DFq1obBO.js"),s=require("./internal-context-NWsAL807.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-DZvEYqlO.js"),d=require("./ScreenLayout-BeH-Q6N2.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-NJrQkxJ7.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./Button-Bm_Ft0Dw.js"),require("styled-components"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("./Screen-D9Tvi297.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/m(r),p=/*#__PURE__*/m(i);const y=({style:r})=>/*#__PURE__*/e.jsx(p.default,{style:{color:"var(--privy-color-error)",...r}});let E={google:{name:"Google",component:o.Google},discord:{name:"Discord",component:o.Discord},github:{name:"Github",component:o.Github},linkedin:{name:"LinkedIn",component:o.LinkedIn},twitter:{name:"Twitter",component:o.Twitter},spotify:{name:"Spotify",component:o.Spotify},instagram:{name:"Instagram",component:o.Instagram},tiktok:{name:"Tiktok",component:o.Tiktok},line:{name:"LINE",component:n.Line},twitch:{name:"Twitch",component:n.Twitch},apple:{name:"Apple",component:o.Apple}},h=({iconUrl:e,...r})=>v.default.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},v.default.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},v.default.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const S=(e,r)=>{if(e in E)return E[e];if(t.isCustomOAuthProvider(e)&&r){let t=r.find((r=>r.provider===e));if(t)return{name:t.provider_display_name,component:e=>v.default.createElement(h,{...e,iconUrl:t.provider_icon_url})}}return{name:"Unknown",component:y}};const C=({providerName:r,ProviderLogo:t,success:o,errorMessage:i,onRetry:n})=>{let a=o?`Successfully connected with ${r}`:i?i.message:`Verifying connection to ${r}`;/*#__PURE__*/return e.jsx(d.ScreenLayout,{title:a,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&n?{label:"Retry",onClick:n}:void 0,watermark:!0})},g={component:()=>{let{authenticated:o,logout:i,ready:n,user:d}=t.usePrivyContext(),{setModalData:m,navigate:v,resetNavigation:p}=t.usePrivyModal(),y=a.useAppConfig(),{getAuthMeta:E,initLoginWithOAuth:h,loginWithOAuth:g,updateWallets:q,setReadyToTrue:f,closePrivyModal:A,createAnalyticsEvent:T}=s.usePrivyInternal(),[_,w]=r.useState(!1),[P,U]=r.useState(void 0),j=E()?.provider||"google",{name:O,component:R}=S(j,y.customOAuthProviders);return r.useEffect((()=>{g(j).then((()=>{w(!0),f(!0)})).catch((e=>{if(f(!1),e?.privyErrorCode===s.PrivyErrorCode.ALLOWLIST_REJECTED)return U(void 0),p(),void v("AllowlistRejectionScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_LIMIT_REACHED)return console.error(new s.PrivyUserLimitReachedError(e).toString()),U(void 0),p(),void v("UserLimitReachedScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_DOES_NOT_EXIST)return U(void 0),p(),void v("AccountNotFoundScreen");if(e?.privyErrorCode===s.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return U(void 0),p(),m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:E()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");let{retryable:r,detail:t}=function(e,r,t){let o={detail:"",retryable:!1},i=c.e(r);if(e?.privyErrorCode===s.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===s.PrivyErrorCode.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===s.PrivyErrorCode.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=S(r,t).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===s.PrivyErrorCode.OAUTH_ACCOUNT_SUSPENDED){let e=S(r,t).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===s.PrivyErrorCode.OAUTH_UNEXPECTED&&r.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}(e,j,y.customOAuthProviders);U({retryable:r,detail:t,message:"Authentication failed"})})).finally((()=>{l.stripUrlOAuthParamsAndRemoveStateCode()}))}),[O,j]),r.useEffect((()=>{if(n&&o&&_&&d){if(y?.legal.requireUsersAcceptTerms&&!d.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}if(u.shouldProceedtoEmbeddedWalletCreationFlow(d,y.embeddedWallets)){let e=setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:j,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}{let e=setTimeout((()=>A({shouldCallAuthOnSuccess:!0,isSuccess:!0})),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return q(),()=>clearTimeout(e)}}}),[n,o,_,d]),/*#__PURE__*/e.jsx(C,{providerName:O,ProviderLogo:R,success:_,errorMessage:P,onRetry:P?.retryable?()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),h(j),U(void 0)}:void 0})},isShownBeforeReady:!0};exports.OAuthStatusScreen=g,exports.OAuthStatusScreenView=C,exports.default=g;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./index-4-C2N_7K.js"),t=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-CHHPpmxX.js"),s=require("./ScreenLayout-Bbhw-EIr.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("./context-Dn8Hzo8O.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-DpuRzAgk.js"),require("./Screen-CJM19YNL.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const u=({title:i="Log in or create a new account?",subtitle:t="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:a,onLogin:u})=>/*#__PURE__*/e.jsx(s.ScreenLayout,{title:i,subtitle:t,icon:r.FingerprintIcon,primaryCta:{label:"Create new account",onClick:a},secondaryCta:{label:"Log in with a passkey",onClick:u},watermark:!0}),n={component:()=>{let{enabled:r,token:s}=i.useCaptcha(),{navigate:n,setModalData:o}=a.usePrivyModal(),{initSignupWithPasskey:c,initLoginWithPasskey:l}=t.usePrivyInternal();/*#__PURE__*/return e.jsx(u,{onSignup:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:e=>c({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>l({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await l({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};exports.PasskeySelectSignupOrLogin=n,exports.PasskeySelectSignupOrLoginView=u,exports.default=n;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./index-NJrQkxJ7.js"),t=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-D4ouXJpi.js"),s=require("./ScreenLayout-BeH-Q6N2.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("./context-DFq1obBO.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-Bm_Ft0Dw.js"),require("./Screen-D9Tvi297.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const u=({title:i="Log in or create a new account?",subtitle:t="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:a,onLogin:u})=>/*#__PURE__*/e.jsx(s.ScreenLayout,{title:i,subtitle:t,icon:r.FingerprintIcon,primaryCta:{label:"Create new account",onClick:a},secondaryCta:{label:"Log in with a passkey",onClick:u},watermark:!0}),n={component:()=>{let{enabled:r,token:s}=i.useCaptcha(),{navigate:n,setModalData:o}=a.usePrivyModal(),{initSignupWithPasskey:c,initLoginWithPasskey:l}=t.usePrivyInternal();/*#__PURE__*/return e.jsx(u,{onSignup:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:e=>c({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>l({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await l({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};exports.PasskeySelectSignupOrLogin=n,exports.PasskeySelectSignupOrLoginView=u,exports.default=n;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),s=require("styled-components"),i=require("./context-Dn8Hzo8O.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-CHHPpmxX.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-CuHR6wvs.js"),n=require("./ScreenLayout-Bbhw-EIr.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-4-C2N_7K.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-DpuRzAgk.js"),require("./Screen-CJM19YNL.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const c=({status:t,passkeySignupFlow:s=!1,error:i,onRetry:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e.jsx(d,{children:(()=>{switch(t){case"loading":return s?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(i instanceof o.PrivyError){if(i.privyErrorCode===o.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===o.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r.FingerprintIcon,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&u?{label:"Retry",onClick:u}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),l={component:()=>{let{data:r,setModalData:s,navigate:n}=u.usePrivyModal(),l=i.useAppConfig(),{loginWithPasskey:d,signupWithPasskey:p,closePrivyModal:y,createAnalyticsEvent:q}=o.usePrivyInternal(),{user:h,logout:f}=u.usePrivyContext(),{passkeySignupFlow:v}=r?.passkeyAuthModalData??{},g=i.DEFAULT_SUCCESS_SCREEN_DURATION_MS-500,[m,S]=t.useState("loading"),[w,j]=t.useState(null),C=t.useRef([]),k=e=>{C.current=[e,...C.current]};t.useEffect((()=>()=>{C.current.forEach((e=>clearTimeout(e))),C.current=[]}),[]);let E=async()=>{S("loading");try{v?await p():await d(),S("success")}catch(e){j(e),S("error")}};return t.useEffect((()=>{if("success"===m&&h){if(l?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms)return void k(setTimeout((()=>{n("AffirmativeConsentScreen")}),g));if(!a.shouldProceedtoEmbeddedWalletCreationFlow(h,l?.embeddedWallets))return void k(setTimeout((()=>{y({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS));k(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),q({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),f()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")}),g))}}),[h,m]),t.useEffect((()=>{E()}),[]),/*#__PURE__*/e.jsx(c,{status:m,passkeySignupFlow:v,error:w,onRetry:E})}};let d=/*#__PURE__*/s.styled.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);exports.PasskeyStatusScreen=l,exports.PasskeyStatusScreenView=c,exports.default=l;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),s=require("styled-components"),i=require("./context-DFq1obBO.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-D4ouXJpi.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-DZvEYqlO.js"),n=require("./ScreenLayout-BeH-Q6N2.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-NJrQkxJ7.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-Bm_Ft0Dw.js"),require("./Screen-D9Tvi297.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const c=({status:t,passkeySignupFlow:s=!1,error:i,onRetry:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e.jsx(d,{children:(()=>{switch(t){case"loading":return s?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(i instanceof o.PrivyError){if(i.privyErrorCode===o.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===o.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r.FingerprintIcon,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&u?{label:"Retry",onClick:u}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),l={component:()=>{let{data:r,setModalData:s,navigate:n}=u.usePrivyModal(),l=i.useAppConfig(),{loginWithPasskey:d,signupWithPasskey:p,closePrivyModal:y,createAnalyticsEvent:q}=o.usePrivyInternal(),{user:h,logout:f}=u.usePrivyContext(),{passkeySignupFlow:v}=r?.passkeyAuthModalData??{},g=i.DEFAULT_SUCCESS_SCREEN_DURATION_MS-500,[m,S]=t.useState("loading"),[w,j]=t.useState(null),C=t.useRef([]),k=e=>{C.current=[e,...C.current]};t.useEffect((()=>()=>{C.current.forEach((e=>clearTimeout(e))),C.current=[]}),[]);let E=async()=>{S("loading");try{v?await p():await d(),S("success")}catch(e){j(e),S("error")}};return t.useEffect((()=>{if("success"===m&&h){if(l?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms)return void k(setTimeout((()=>{n("AffirmativeConsentScreen")}),g));if(!a.shouldProceedtoEmbeddedWalletCreationFlow(h,l?.embeddedWallets))return void k(setTimeout((()=>{y({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS));k(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),q({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),f()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")}),g))}}),[h,m]),t.useEffect((()=>{E()}),[]),/*#__PURE__*/e.jsx(c,{status:m,passkeySignupFlow:v,error:w,onRetry:E})}};let d=/*#__PURE__*/s.styled.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);exports.PasskeyStatusScreen=l,exports.PasskeyStatusScreenView=c,exports.default=l;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ShieldCheckIcon"),i=require("react"),t=require("styled-components"),s=require("./get-is-unified-wallet-CHHPpmxX.js"),o=require("./Button-DpuRzAgk.js"),n=require("./Layouts-dRL0OSpp.js"),a=require("./shared-BjdszO5f.js"),c=require("./index-4-C2N_7K.js"),l=require("./internal-context-NWsAL807.js"),u=require("./Screen-CJM19YNL.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-Dn8Hzo8O.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-DPdw6ah8.js"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-4MV7Tgk7.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var h=/*#__PURE__*/d(r);const y={component:()=>{let[r,t]=i.useState(!0),{authenticated:o,user:d}=s.usePrivyContext(),{walletProxy:y,closePrivyModal:j,createAnalyticsEvent:m,client:x}=l.usePrivyInternal(),{navigate:w,data:f,onUserCloseViaDialogOrKeybindRef:g}=s.usePrivyModal(),[I,b]=i.useState(void 0),[C,S]=i.useState(""),[P,A]=i.useState(!1),{entropyId:k,entropyIdVerifier:E,onCompleteNavigateTo:W,onSuccess:M,onFailure:N}=f.recoverWallet,R=(e="User exited before their wallet could be recovered")=>{j({shouldCallAuthOnSuccess:!1}),N("string"==typeof e?new l.PrivyEmbeddedWalletError(e):e)};g.current=R,i.useEffect((()=>{if(!o)return R("User must be authenticated and have a Privy wallet before it can be recovered")}),[o]);/*#__PURE__*/return e.jsxs(u.Screen,{children:[/*#__PURE__*/e.jsx(u.Screen.Header,{icon:h.default,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:R}),/*#__PURE__*/e.jsx(u.Screen.Body,{children:/*#__PURE__*/e.jsx(p,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(a.PasswordContainer,{children:[/*#__PURE__*/e.jsx(a.PasswordInput,{type:r?"password":"text",onChange:e=>(e=>{e&&b(e)})(e.target.value),disabled:P,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(a.InputRightIcons,{style:{right:"0.75rem"},children:r?/*#__PURE__*/e.jsx(a.HiddenIcon,{onClick:()=>t(!1)}):/*#__PURE__*/e.jsx(a.ShownIcon,{onClick:()=>t(!0)})})]}),!!C&&/*#__PURE__*/e.jsx(v,{children:C})]})})}),/*#__PURE__*/e.jsxs(u.Screen.Footer,{children:[/*#__PURE__*/e.jsx(u.Screen.HelpText,{children:/*#__PURE__*/e.jsxs(n.StyledCalloutSection,{children:[/*#__PURE__*/e.jsx("h4",{children:"Why is this necessary?"}),/*#__PURE__*/e.jsx("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/e.jsx(u.Screen.Actions,{children:/*#__PURE__*/e.jsx(q,{loading:P||!y,disabled:!I,onClick:async()=>{A(!0);let e=await x.getAccessToken(),r=s.getPrivyWalletWithAddress(d,k);if(!e||!r||null===I)return R("User must be authenticated and have a Privy wallet before it can be recovered");try{m({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(y?.recover({accessToken:e,entropyId:k,entropyIdVerifier:E,recoveryPassword:I})),S(""),W?w(W):j({shouldCallAuthOnSuccess:!1}),M?.(r),m({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){c.errorIndicatesInvalidRecoveryPassword(e)?S("Invalid recovery password, please try again."):S("An error has occurred, please try again.")}finally{A(!1)}},$hideAnimations:!k&&P,children:"Recover your account"})}),/*#__PURE__*/e.jsx(u.Screen.Watermark,{})]})]})}};let p=/*#__PURE__*/t.styled.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),v=/*#__PURE__*/t.styled.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),q=/*#__PURE__*/t.styled(o.PrimaryButton).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/t.css(["&&{transition:none;}"])));exports.PasswordRecoveryScreen=y,exports.default=y;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ShieldCheckIcon"),i=require("react"),t=require("styled-components"),s=require("./get-is-unified-wallet-D4ouXJpi.js"),o=require("./Button-Bm_Ft0Dw.js"),n=require("./Layouts-dRL0OSpp.js"),a=require("./shared-CCAyvw5i.js"),c=require("./index-NJrQkxJ7.js"),l=require("./internal-context-NWsAL807.js"),u=require("./Screen-D9Tvi297.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-DFq1obBO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-BLFNjTwC.js"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-DB7Tbjwz.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var h=/*#__PURE__*/d(r);const y={component:()=>{let[r,t]=i.useState(!0),{authenticated:o,user:d}=s.usePrivyContext(),{walletProxy:y,closePrivyModal:j,createAnalyticsEvent:m,client:x}=l.usePrivyInternal(),{navigate:w,data:f,onUserCloseViaDialogOrKeybindRef:g}=s.usePrivyModal(),[I,b]=i.useState(void 0),[C,S]=i.useState(""),[P,A]=i.useState(!1),{entropyId:k,entropyIdVerifier:E,onCompleteNavigateTo:W,onSuccess:M,onFailure:N}=f.recoverWallet,R=(e="User exited before their wallet could be recovered")=>{j({shouldCallAuthOnSuccess:!1}),N("string"==typeof e?new l.PrivyEmbeddedWalletError(e):e)};g.current=R,i.useEffect((()=>{if(!o)return R("User must be authenticated and have a Privy wallet before it can be recovered")}),[o]);/*#__PURE__*/return e.jsxs(u.Screen,{children:[/*#__PURE__*/e.jsx(u.Screen.Header,{icon:h.default,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:R}),/*#__PURE__*/e.jsx(u.Screen.Body,{children:/*#__PURE__*/e.jsx(p,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(a.PasswordContainer,{children:[/*#__PURE__*/e.jsx(a.PasswordInput,{type:r?"password":"text",onChange:e=>(e=>{e&&b(e)})(e.target.value),disabled:P,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(a.InputRightIcons,{style:{right:"0.75rem"},children:r?/*#__PURE__*/e.jsx(a.HiddenIcon,{onClick:()=>t(!1)}):/*#__PURE__*/e.jsx(a.ShownIcon,{onClick:()=>t(!0)})})]}),!!C&&/*#__PURE__*/e.jsx(v,{children:C})]})})}),/*#__PURE__*/e.jsxs(u.Screen.Footer,{children:[/*#__PURE__*/e.jsx(u.Screen.HelpText,{children:/*#__PURE__*/e.jsxs(n.StyledCalloutSection,{children:[/*#__PURE__*/e.jsx("h4",{children:"Why is this necessary?"}),/*#__PURE__*/e.jsx("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/e.jsx(u.Screen.Actions,{children:/*#__PURE__*/e.jsx(q,{loading:P||!y,disabled:!I,onClick:async()=>{A(!0);let e=await x.getAccessToken(),r=s.getPrivyWalletWithAddress(d,k);if(!e||!r||null===I)return R("User must be authenticated and have a Privy wallet before it can be recovered");try{m({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(y?.recover({accessToken:e,entropyId:k,entropyIdVerifier:E,recoveryPassword:I})),S(""),W?w(W):j({shouldCallAuthOnSuccess:!1}),M?.(r),m({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){c.errorIndicatesInvalidRecoveryPassword(e)?S("Invalid recovery password, please try again."):S("An error has occurred, please try again.")}finally{A(!1)}},$hideAnimations:!k&&P,children:"Recover your account"})}),/*#__PURE__*/e.jsx(u.Screen.Watermark,{})]})]})}};let p=/*#__PURE__*/t.styled.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),v=/*#__PURE__*/t.styled.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),q=/*#__PURE__*/t.styled(o.PrimaryButton).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/t.css(["&&{transition:none;}"])));exports.PasswordRecoveryScreen=y,exports.default=y;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-Dn8Hzo8O.js"),i=require("./useActiveWallet-B5cSS56I.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},d=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-DFq1obBO.js"),i=require("./useActiveWallet-BOX8xCn9.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},d=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
2
2
  /*#__PURE__*/e.jsx(e.Fragment,{children:[0,1,2].map((n=>/*#__PURE__*/e.jsx("circle",{r:o*(7-2*n)/2,cx:r+7*o/2,cy:t+7*o/2,fill:n%2!=0?l:i},`finder-${r}-${t}-${n}`)))}),x=({cellSize:r,matrixSize:t,bgColor:o,fgColor:l})=>/*#__PURE__*/e.jsx(e.Fragment,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([t,i])=>/*#__PURE__*/e.jsx(d,{x:t,y:i,cellSize:r,bgColor:o,fgColor:l},`finder-${t}-${i}`)))}),h=({matrix:r,cellSize:t,color:o})=>/*#__PURE__*/e.jsx(e.Fragment,{children:r.map(((r,l)=>r.map(((r,i)=>r?/*#__PURE__*/e.jsx("rect",{height:t-.4,width:t-.4,x:l*t+.1*t,y:i*t+.1*t,rx:.5*t,ry:.5*t,fill:o},`cell-${l}-${i}`):/*#__PURE__*/e.jsx(a.default.Fragment,{},`circle-${l}-${i}`)))))}),u=({cellSize:r,matrixSize:t,element:o,sizePercentage:l,bgColor:i})=>{if(!o)/*#__PURE__*/return e.jsx(e.Fragment,{});let n=t*(l||.14),c=Math.floor(t/2-n/2),a=Math.floor(t/2+n/2);(a-c)%2!=t%2&&(a+=1);let s=(a-c)*r,g=s-.2*s,d=c*r;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("rect",{x:c*r,y:c*r,width:s,height:s,fill:i}),/*#__PURE__*/e.jsx(o,{x:d+.1*s,y:d+.1*s,height:g,width:g})]})},m=r=>{let t=r.outputSize,o=((e,r)=>{let t=c.default.create(e,{errorCorrectionLevel:r}).modules,o=i.convert1dTo2dArray(Array.from(t.data),t.size);return o=g(o,0,0,7,7),o=g(o,o.length-7,0,7,7),g(o,0,o.length-7,7,7)})(r.url,r.errorCorrectionLevel),l=t/o.length,n=i.clamp(2*l,{min:.025*t,max:.036*t});/*#__PURE__*/return e.jsxs("svg",{height:r.outputSize,width:r.outputSize,viewBox:`0 0 ${r.outputSize} ${r.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e.jsx(h,{matrix:o,cellSize:l,color:r.fgColor}),/*#__PURE__*/e.jsx(x,{cellSize:l,matrixSize:o.length,fgColor:r.fgColor,bgColor:r.bgColor}),/*#__PURE__*/e.jsx(u,{cellSize:l,element:r.logo?.element,bgColor:r.bgColor,matrixSize:o.length})]})},f=/*#__PURE__*/o.styled.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],(e=>`${e.$size}px`),(e=>`${e.$size}px`),(e=>e.$bgColor),(e=>e.$borderColor));exports.QrCode=r=>{let{appearance:t}=l.useAppConfig(),o=r.bgColor||"#FFFFFF",i=r.fgColor||"#000000",n=r.size||160,c="dark"===t.palette.colorScheme?o:i;/*#__PURE__*/return e.jsx(f,{$size:n,$bgColor:o,$fgColor:i,$borderColor:c,children:/*#__PURE__*/e.jsx(m,{url:r.url,logo:{element:r.squareLogoElement??s},outputSize:n,bgColor:o,fgColor:i,errorCorrectionLevel:r.errorCorrectionLevel||"Q"})})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./Button-DpuRzAgk.js"),o=require("./ModalHeader-4MV7Tgk7.js"),a=require("./ScreenHeader-CyURV6Ti.js"),i=require("./context-Dn8Hzo8O.js"),l=require("./index-4-C2N_7K.js"),n=require("./internal-context-NWsAL807.js"),c=require("./get-is-unified-wallet-CHHPpmxX.js"),s=require("./paths-DizMb-lU.js"),d=require("./useWallets-DPdw6ah8.js"),u=require("./events-context-Di6--rDg.js"),v=require("./use-create-wallet-without-fallback-y9YpooGA.js"),y=require("./styles-Ca_DS00a.js");async function h({url:e,popup:r,provider:t}){return r.location=e,new Promise(((e,t)=>{function o(){r?.close(),window.removeEventListener("message",a)}function a(r){r.data&&("PRIVY_OAUTH_RESPONSE"===r.data.type&&r.data.stateCode&&r.data.authorizationCode&&(e(r.data),o()),"https://cdn.apple-cloudkit.com"===r.origin&&r.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:r.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===r.data.type&&(t(r.data.error),o()))}window.addEventListener("message",a)}))}async function p({api:e,provider:r,stateCode:t,codeVerifier:o,authorizationCode:a}){if(!a||!t)throw new n.PrivyClientError("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new n.PrivyClientError("User denied confirmation during OAuth flow");try{return(await e.post(s.recoveryOAuthAuthenticatePath,{authorization_code:a,state_code:t,code_verifier:o,provider:r})).access_token}catch(e){let r=n.formatApiError(e);if(r.privyErrorCode)throw new n.PrivyClientError(r.message||"Invalid code during OAuth flow.",void 0,r.privyErrorCode);if("User denied confirmation during OAuth flow"===r.message)throw new n.PrivyClientError("Invalid code during oauth flow.",void 0,n.PrivyErrorCode.OAUTH_USER_DENIED);throw new n.PrivyClientError("Invalid code during OAuth flow.",void 0,n.PrivyErrorCode.UNKNOWN_AUTH_ERROR)}}async function w({api:e,provider:r}){let t=l.createCodeVerifier(),o=l.createStateCode(),a=await l.deriveCodeChallengeFromCodeVerifier(t);try{return"icloud"===r?{url:(await e.post(s.recoveryOAuthInitICloudPath,{client_type:"web"})).url}:{url:(await e.post(s.recoveryOAuthInitPath,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:t,stateCode:o,provider:r}}catch(e){throw n.formatApiError(e)}}require("styled-components"),require("./useActiveWallet-B5cSS56I.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Bap-QRCV.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./usePrivy-DobNyfbl.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");let E={"google-drive":{name:"Google Drive",component:y.GoogleDrive},icloud:{name:"iCloud",component:y.AppleICloud}};const m={component:()=>{let{logout:s}=c.usePrivyContext(),{navigate:m,setModalData:C,data:f}=c.usePrivyModal(),{closePrivyModal:A,createAnalyticsEvent:_}=n.usePrivyInternal(),{execute:g}=(()=>{let{client:e,walletProxy:r,refreshSessionAndUser:t}=n.usePrivyInternal(),{data:o}=c.usePrivyModal(),{user:a}=c.usePrivyContext(),i=u.useEmitPrivyEvent(),{create:l}=v.useCreateWalletWithoutFallback();return{execute:async({provider:s,action:u,popup:v,shouldCreateEth:y,shouldCreateSol:E})=>{let m,C;if(!e)throw new n.PrivyClientError("Missing client");function f(r){if(!r&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}switch(s){case"google-drive":{let r,t,{url:o,codeVerifier:a,stateCode:i}=await w({api:e.api,provider:s});f(o);try{let a=await h({url:o,popup:v,provider:s});if(r=a.stateCode,t=a.authorizationCode,r!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:r??""}}),new n.PrivyClientError("Unexpected auth flow. This may be a phishing attempt.",void 0,n.PrivyErrorCode.OAUTH_UNEXPECTED)}catch(r){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:r.toString(),provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}[m,C]=await Promise.all([e.getAccessToken(),p({api:e.api,provider:s,codeVerifier:a,stateCode:r,authorizationCode:t})]);break}case"icloud":{let{url:r}=await w({api:e.api,provider:s});f(r);let{ckWebAuthToken:t}=await h({url:r,popup:v,provider:s});C=t,m=await e.getAccessToken()}}if(!r)throw new n.PrivyClientError("Cannot connect to wallet proxy");if(!m)throw new n.PrivyClientError("Unable to authorize user");switch(u){case"recover":{let t=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!t||!a)throw new n.PrivyClientError("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:t,recoveryMethod:s}}),await r.recover({accessToken:m,entropyId:t,entropyIdVerifier:a,recoveryAccessToken:C}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:t,recoveryMethod:s}});break}case"create-wallet":{let r;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),y&&E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a}),r=await l({chainType:"solana",walletIndex:0,latestUser:r.user});else if(E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"solana",walletIndex:0,latestUser:a});else{if(!y)throw Error("Invalid args to create wallet");r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!r)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:r.account.address}}),i("createWallet","onSuccess",{wallet:r.account});break}case"set-recovery":{let o=c.getPrivyPrimaryWallet(a);if(!o)throw i("setWalletRecovery","onError",n.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:l,entropyIdVerifier:u}=d.getEntropyDetailsForUser(a);await r.setRecovery({accessToken:m,entropyId:l,entropyIdVerifier:u,recoveryMethod:s,recoveryAccessToken:C});let v=c.getPrivyPrimaryWallet(await t());if(!v)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:v});break}default:throw new n.PrivyClientError("Unsupported recovery action")}}}})(),[P,q]=r.useState(!1),{provider:b,action:R,isInAccountCreateFlow:S,shouldCreateEth:x,shouldCreateSol:O}=f?.recoveryOAuthStatus,[j,k]=r.useState(void 0),[T,I]=r.useState("create-wallet"===R);if("user-passcode"===b)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let N=E[b].name,U=E[b].component,M=f?.recoverWallet?.onCompleteNavigateTo,W=new l.RunEffectOnce((async(e="create-wallet")=>(I(!0),new Promise(((r,t)=>{setTimeout((async()=>{try{let t=window.open();await g({provider:b,action:e,popup:t,shouldCreateEth:x,shouldCreateSol:O}),q(!0),r()}catch(r){k({message:`${"recover"===e?"Recovery":"Back up"} with ${N} unsuccessful`,detail:"recover"===R?`Please verify that you are selecting the ${N} account associated with your backup.`:"",retryable:!0}),t()}}),0)})))));r.useEffect((()=>{"recover"!==R&&W.execute(S?"create-wallet":"set-recovery")}),[]),r.useEffect((()=>{if(!P)return;let e=setTimeout((()=>{S?(C({createWallet:{onSuccess:()=>{},onFailure:e=>{_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),s()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),m("EmbeddedWalletCreatedScreen")):A({shouldCallAuthOnSuccess:!1})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}),[P]);let D=r.useCallback((async()=>{await W.execute("recover"),M?m(M):q(!0)}),[]),F="google-drive"===b?"Google Drive":"Apple iCloud",V=P&&`Successfully ${"recover"===R?"recovered":"backed up"} with ${F}.`||j&&j.message||`${"recover"===R?"Recovering":"Backing up"} with ${F}...`,H=j?j.detail:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o.ModalHeader,{}),T?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:V,icon:/*#__PURE__*/e.jsx(U,{style:{width:"38px",height:"38px"}}),description:H}),j&&j?.retryable?/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),k(void 0),"create-wallet"===R?W.execute("create-wallet"):D()},disabled:!P&&!j?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:"Confirm it's really you",icon:/*#__PURE__*/e.jsx(U,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${F} where your account is backed up.`}),/*#__PURE__*/e.jsxs(t.PrimaryButton,{onClick:D,children:["Confirm with ",F]})]}),/*#__PURE__*/e.jsx(o.BlobbyFooter,{})]})}};exports.RecoveryOAuthScreen=m,exports.default=m;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./Button-Bm_Ft0Dw.js"),o=require("./ModalHeader-DB7Tbjwz.js"),a=require("./ScreenHeader-CyURV6Ti.js"),i=require("./context-DFq1obBO.js"),l=require("./index-NJrQkxJ7.js"),n=require("./internal-context-NWsAL807.js"),c=require("./get-is-unified-wallet-D4ouXJpi.js"),s=require("./paths-DizMb-lU.js"),d=require("./useWallets-BLFNjTwC.js"),u=require("./events-context-Di6--rDg.js"),v=require("./use-create-wallet-without-fallback-q0_yd_V9.js"),y=require("./styles-Ca_DS00a.js");async function h({url:e,popup:r,provider:t}){return r.location=e,new Promise(((e,t)=>{function o(){r?.close(),window.removeEventListener("message",a)}function a(r){r.data&&("PRIVY_OAUTH_RESPONSE"===r.data.type&&r.data.stateCode&&r.data.authorizationCode&&(e(r.data),o()),"https://cdn.apple-cloudkit.com"===r.origin&&r.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:r.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===r.data.type&&(t(r.data.error),o()))}window.addEventListener("message",a)}))}async function p({api:e,provider:r,stateCode:t,codeVerifier:o,authorizationCode:a}){if(!a||!t)throw new n.PrivyClientError("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new n.PrivyClientError("User denied confirmation during OAuth flow");try{return(await e.post(s.recoveryOAuthAuthenticatePath,{authorization_code:a,state_code:t,code_verifier:o,provider:r})).access_token}catch(e){let r=n.formatApiError(e);if(r.privyErrorCode)throw new n.PrivyClientError(r.message||"Invalid code during OAuth flow.",void 0,r.privyErrorCode);if("User denied confirmation during OAuth flow"===r.message)throw new n.PrivyClientError("Invalid code during oauth flow.",void 0,n.PrivyErrorCode.OAUTH_USER_DENIED);throw new n.PrivyClientError("Invalid code during OAuth flow.",void 0,n.PrivyErrorCode.UNKNOWN_AUTH_ERROR)}}async function w({api:e,provider:r}){let t=l.createCodeVerifier(),o=l.createStateCode(),a=await l.deriveCodeChallengeFromCodeVerifier(t);try{return"icloud"===r?{url:(await e.post(s.recoveryOAuthInitICloudPath,{client_type:"web"})).url}:{url:(await e.post(s.recoveryOAuthInitPath,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:t,stateCode:o,provider:r}}catch(e){throw n.formatApiError(e)}}require("styled-components"),require("./useActiveWallet-BOX8xCn9.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Cnd6rhhJ.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./usePrivy-CcfSRv1R.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");let E={"google-drive":{name:"Google Drive",component:y.GoogleDrive},icloud:{name:"iCloud",component:y.AppleICloud}};const m={component:()=>{let{logout:s}=c.usePrivyContext(),{navigate:m,setModalData:C,data:f}=c.usePrivyModal(),{closePrivyModal:A,createAnalyticsEvent:_}=n.usePrivyInternal(),{execute:g}=(()=>{let{client:e,walletProxy:r,refreshSessionAndUser:t}=n.usePrivyInternal(),{data:o}=c.usePrivyModal(),{user:a}=c.usePrivyContext(),i=u.useEmitPrivyEvent(),{create:l}=v.useCreateWalletWithoutFallback();return{execute:async({provider:s,action:u,popup:v,shouldCreateEth:y,shouldCreateSol:E})=>{let m,C;if(!e)throw new n.PrivyClientError("Missing client");function f(r){if(!r&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}switch(s){case"google-drive":{let r,t,{url:o,codeVerifier:a,stateCode:i}=await w({api:e.api,provider:s});f(o);try{let a=await h({url:o,popup:v,provider:s});if(r=a.stateCode,t=a.authorizationCode,r!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:r??""}}),new n.PrivyClientError("Unexpected auth flow. This may be a phishing attempt.",void 0,n.PrivyErrorCode.OAUTH_UNEXPECTED)}catch(r){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:r.toString(),provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}[m,C]=await Promise.all([e.getAccessToken(),p({api:e.api,provider:s,codeVerifier:a,stateCode:r,authorizationCode:t})]);break}case"icloud":{let{url:r}=await w({api:e.api,provider:s});f(r);let{ckWebAuthToken:t}=await h({url:r,popup:v,provider:s});C=t,m=await e.getAccessToken()}}if(!r)throw new n.PrivyClientError("Cannot connect to wallet proxy");if(!m)throw new n.PrivyClientError("Unable to authorize user");switch(u){case"recover":{let t=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!t||!a)throw new n.PrivyClientError("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:t,recoveryMethod:s}}),await r.recover({accessToken:m,entropyId:t,entropyIdVerifier:a,recoveryAccessToken:C}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:t,recoveryMethod:s}});break}case"create-wallet":{let r;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),y&&E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a}),r=await l({chainType:"solana",walletIndex:0,latestUser:r.user});else if(E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"solana",walletIndex:0,latestUser:a});else{if(!y)throw Error("Invalid args to create wallet");r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!r)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:r.account.address}}),i("createWallet","onSuccess",{wallet:r.account});break}case"set-recovery":{let o=c.getPrivyPrimaryWallet(a);if(!o)throw i("setWalletRecovery","onError",n.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:l,entropyIdVerifier:u}=d.getEntropyDetailsForUser(a);await r.setRecovery({accessToken:m,entropyId:l,entropyIdVerifier:u,recoveryMethod:s,recoveryAccessToken:C});let v=c.getPrivyPrimaryWallet(await t());if(!v)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:v});break}default:throw new n.PrivyClientError("Unsupported recovery action")}}}})(),[P,q]=r.useState(!1),{provider:b,action:R,isInAccountCreateFlow:S,shouldCreateEth:x,shouldCreateSol:O}=f?.recoveryOAuthStatus,[k,j]=r.useState(void 0),[T,I]=r.useState("create-wallet"===R);if("user-passcode"===b)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let N=E[b].name,U=E[b].component,M=f?.recoverWallet?.onCompleteNavigateTo,W=new l.RunEffectOnce((async(e="create-wallet")=>(I(!0),new Promise(((r,t)=>{setTimeout((async()=>{try{let t=window.open();await g({provider:b,action:e,popup:t,shouldCreateEth:x,shouldCreateSol:O}),q(!0),r()}catch(r){j({message:`${"recover"===e?"Recovery":"Back up"} with ${N} unsuccessful`,detail:"recover"===R?`Please verify that you are selecting the ${N} account associated with your backup.`:"",retryable:!0}),t()}}),0)})))));r.useEffect((()=>{"recover"!==R&&W.execute(S?"create-wallet":"set-recovery")}),[]),r.useEffect((()=>{if(!P)return;let e=setTimeout((()=>{S?(C({createWallet:{onSuccess:()=>{},onFailure:e=>{_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),s()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),m("EmbeddedWalletCreatedScreen")):A({shouldCallAuthOnSuccess:!1})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}),[P]);let D=r.useCallback((async()=>{await W.execute("recover"),M?m(M):q(!0)}),[]),F="google-drive"===b?"Google Drive":"Apple iCloud",V=P&&`Successfully ${"recover"===R?"recovered":"backed up"} with ${F}.`||k&&k.message||`${"recover"===R?"Recovering":"Backing up"} with ${F}...`,H=k?k.detail:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o.ModalHeader,{}),T?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:V,icon:/*#__PURE__*/e.jsx(U,{style:{width:"38px",height:"38px"}}),description:H}),k&&k?.retryable?/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),j(void 0),"create-wallet"===R?W.execute("create-wallet"):D()},disabled:!P&&!k?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:"Confirm it's really you",icon:/*#__PURE__*/e.jsx(U,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${F} where your account is backed up.`}),/*#__PURE__*/e.jsxs(t.PrimaryButton,{onClick:D,children:["Confirm with ",F]})]}),/*#__PURE__*/e.jsx(o.BlobbyFooter,{})]})}};exports.RecoveryOAuthScreen=m,exports.default=m;