@privy-io/react-auth 3.10.0-beta-20251223041507 → 3.10.0

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 (245) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-C7clL66d.js → AccountNotFoundScreen-CCyWlTJg.js} +1 -1
  2. package/dist/cjs/{Address-BdN5tzBx.js → Address-Dqfr__Us.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-nqY_Fe-R.js → AffirmativeConsentScreen-P0TvXw3I.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-re6ZG8Lh.js → AllowlistRejectionScreen-9DBD3cDT.js} +1 -1
  5. package/dist/cjs/AuthenticateWithWalletScreen-YAI3Rdk5.js +1 -0
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-BM3IBmq9.js → AwaitingEvmToSolBridgingScreen-UOemNgiP.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-B4XlcGzI.js → AwaitingExternalEthereumTransferScreen-CJehLUix.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-DSbqJ8sw.js → AwaitingPasswordlessCodeScreen-D4jIGUIu.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-CwXoMm_a.js → AwaitingSolToEvmBridgingScreen-3prjU9eU.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-C5hl7Cvq.js → BridgeNetworkSelectionView-DhE8OSNF.js} +1 -1
  11. package/dist/cjs/{Button-BdtKzmGp.js → Button-BXkfCTro.js} +1 -1
  12. package/dist/cjs/{CaptchaScreen-MMvbG1XU.js → CaptchaScreen-CJitGEVU.js} +1 -1
  13. package/dist/cjs/{CoinbaseOnrampStatusScreen-C13g-VeP.js → CoinbaseOnrampStatusScreen-4KCVPXSq.js} +1 -1
  14. package/dist/cjs/{ConnectEmailForm-BdLI53Fd.js → ConnectEmailForm-BbfI9mx4.js} +1 -1
  15. package/dist/cjs/{ConnectLedgerScreen-BnmjZTW8.js → ConnectLedgerScreen-Cquqbd_0.js} +1 -1
  16. package/dist/cjs/ConnectOnlyLandingScreen-_3c6hkf-.js +1 -0
  17. package/dist/cjs/{ConnectOnlyStatusScreen-DR659M9-.js → ConnectOnlyStatusScreen-DVV-_bsT.js} +1 -1
  18. package/dist/cjs/{ConnectOrCreateScreen-D6R6Ec06.js → ConnectOrCreateScreen-1tSJt9Vh.js} +1 -1
  19. package/dist/cjs/{ConnectPhoneForm-GsUfLBeN.js → ConnectPhoneForm-DebBPzTl.js} +1 -1
  20. package/dist/cjs/ConnectWalletView-B5NqKXNc.js +1 -0
  21. package/dist/cjs/{ConnectionStatusScreen-BdTKJ00Z.js → ConnectionStatusScreen-gIwTfC-i.js} +1 -1
  22. package/dist/cjs/{CrossAppAuthScreen-MjQpsKtB.js → CrossAppAuthScreen-Cs_HQNmA.js} +1 -1
  23. package/dist/cjs/{CustomLandingScreenView-CQhEjDH5.js → CustomLandingScreenView-KvzjPhN1.js} +2 -2
  24. package/dist/cjs/{DelegatedActionsConsentScreen-CFXpRnY2.js → DelegatedActionsConsentScreen-RTMmMNqK.js} +1 -1
  25. package/dist/cjs/{DelegatedActionsRevokeScreen-DZdidxUM.js → DelegatedActionsRevokeScreen-BqL1cJwX.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletConnectingScreen-DbMJXa_S.js → EmbeddedWalletConnectingScreen-DPqsA0eo.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-D6nEuVl0.js → EmbeddedWalletCreatedScreen-qq5vOQsX.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-DS5HJZhL.js → EmbeddedWalletKeyExportScreen-DdQfRwJI.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-XuCxKKiu.js → EmbeddedWalletOnAccountCreateScreen-CZqtNy72.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-B82XtLOT.js → EmbeddedWalletPasswordUpdateScreen-D-BBWYtp.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-hQeZx9F-.js → EmbeddedWalletPasswordUpdateSplashScreen-CWovcQ2k.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-CDSds4bp.js → EnrollTotp-Cy02Mr_m.js} +1 -1
  33. package/dist/cjs/{ErrorScreen-C6W1-E6m.js → ErrorScreen-CFGSlbsW.js} +1 -1
  34. package/dist/cjs/{FarcasterConnectStatusScreen-DmABWqds.js → FarcasterConnectStatusScreen-DKg6JjVp.js} +2 -2
  35. package/dist/cjs/{FarcasterSignerStatusScreen-n5XqsgJH.js → FarcasterSignerStatusScreen-DTQOhzO9.js} +1 -1
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-CJDB0jUQ.js → FundSolWalletWithExternalSolanaWallet-CwMDKWEn.js} +2 -2
  37. package/dist/cjs/{FundWalletMethodHeader-uzk-ixZP.js → FundWalletMethodHeader-BGagZe1_.js} +1 -1
  38. package/dist/cjs/{FundingEditAmountScreen-Dm9R9JPI.js → FundingEditAmountScreen-FNlgv1bs.js} +1 -1
  39. package/dist/cjs/{FundingMethodSelectionScreen-iEpU1hs4.js → FundingMethodSelectionScreen-Cbo8nBzj.js} +1 -1
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-Beb8qlZC.js → InAppBrowserLoginNotPossible-oNYiPE0R.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-BIWgPJfK.js → InstallWalletScreen-8AY8j4Wj.js} +1 -1
  42. package/dist/cjs/{LandingScreen-D7OP1_yo.js → LandingScreen-Cz-WmQAy.js} +1 -1
  43. package/dist/cjs/{LinkConflictScreen-CX0CaiYv.js → LinkConflictScreen-BAXPDdwj.js} +1 -1
  44. package/dist/cjs/{LinkEmailScreen-B9k2kjn3.js → LinkEmailScreen-DvU88nAX.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-DtKPxsUK.js → LinkPasskeyScreen-CgLhb8y2.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-CJYR_lfw.js → LinkPhoneScreen-DLcdT331.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-BlAMh708.js → LoginFailedScreen-C3sTxb4O.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-DbmalI1O.js → ManualTransferScreen-uxjcgZsd.js} +1 -1
  49. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-C8TLvuYX.js → MfaAuthEnrollmentFlowScreen-DGM9d9sl.js} +1 -1
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-BAPSbY4D.js → MfaAuthVerifyFlowScreen-Dy6rChMo.js} +1 -1
  51. package/dist/cjs/{MfaEnrollmentFlowScreen-BbuKW8By.js → MfaEnrollmentFlowScreen-BUc2dRI1.js} +1 -1
  52. package/dist/cjs/{MfaVerifyFlowScreen-BDn-Sudi.js → MfaVerifyFlowScreen-FQMp0vOd.js} +1 -1
  53. package/dist/cjs/{ModalHeader-OWSWMCEF.js → ModalHeader-DRaJvD2v.js} +1 -1
  54. package/dist/cjs/{MoonpayStatusScreen-LPtLXxZw.js → MoonpayStatusScreen-CeQb57ZI.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-DzQX1znk.js → OAuthStatusScreen-2iZh0Hue.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-iQFF1Hxe.js → PasskeySelectSignupOrLogin-B8axkY8n.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-CZJcGz9v.js → PasskeyStatusScreen-DbbheHb2.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-DxDNndVU.js → PasswordRecoveryScreen-DVyOnBFP.js} +1 -1
  59. package/dist/cjs/{QrCode-C4hJtM22.js → QrCode-C2QE_BbM.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-BnLWeDeU.js → RecoveryOAuthStatusScreen-CV1Ixabo.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-ShjkS8Nf.js → RecoveryPasswordCreateScreen-DfYxuVKR.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-C6S4JMZQ.js → RecoverySelectionScreen-BSOAplv6.js} +1 -1
  63. package/dist/cjs/{Screen-D7sTdyLl.js → Screen-BZ-J4FwQ.js} +1 -1
  64. package/dist/cjs/{ScreenLayout-BQP-gfLF.js → ScreenLayout-CfU_O3al.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-DWtJH_0r.js → SetAutomaticRecoveryScreen-G8MGWul7.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-CcidPSjk.js → SetWalletPasswordForm-CXthXwRt.js} +2 -2
  67. package/dist/cjs/{SignRequestScreen-D9Wl7ftq.js → SignRequestScreen-Q9I_D1su.js} +1 -1
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-zYrTR6bp.js → StandardSignAndSendTransactionScreen-Dz1By2jK.js} +1 -1
  69. package/dist/cjs/{TelegramAuthScreen-CP6vsDtM.js → TelegramAuthScreen-BnHI0GwF.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-DTH_TZpQ.js → TransactionDetails-Bg0E9A_6.js} +2 -2
  71. package/dist/cjs/{TransactionErrorView-BUDEmz2T.js → TransactionErrorView-CX1_GPGO.js} +1 -1
  72. package/dist/cjs/{TransferFromWalletScreen-CrOo6G6H.js → TransferFromWalletScreen-tMc9GAKg.js} +1 -1
  73. package/dist/cjs/{TransferOrBridgeLoadingScreen-DGvT2b_c.js → TransferOrBridgeLoadingScreen-mTz1kP-n.js} +1 -1
  74. package/dist/cjs/{UpdateEmailScreen-B1bG_2YL.js → UpdateEmailScreen-Cy7ySLq9.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-B5Wl9kel.js → UpdatePhoneScreen-iIsFR8Yy.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-BIPUsBl1.js → UserLimitReachedScreen-CKPB8s3w.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-BewbaIC_.js → WalletInfoCard-xuQPIB68.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-Br5fazrn.js → WalletInterstitialScreen-B5Ou9Qat.js} +1 -1
  79. package/dist/cjs/{WalletLink-Da_ICG1G.js → WalletLink-CzKk6PGd.js} +1 -1
  80. package/dist/cjs/{WalletOverflowButton-CHPYVqpu.js → WalletOverflowButton-D_YhHdN5.js} +1 -1
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/{context-bxRrRk2e.js → context-CcgGREUw.js} +1 -1
  83. package/dist/cjs/{ethers-C1-7vvVS.js → ethers-CWRVqVsu.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-RpTO1Sce.js → get-is-unified-wallet-JejAvbr5.js} +1 -1
  86. package/dist/cjs/{index-CwJGaDuo.js → index-CWvayScJ.js} +1 -1
  87. package/dist/cjs/{index-BzsdDRPs.js → index-Cu3bv7vx.js} +1 -1
  88. package/dist/cjs/{index-DG6nzSst.js → index-iQcFLOcm.js} +5 -5
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{prepareFundingModalData-DSU36mVl.js → prepareFundingModalData-DkGmcQac.js} +1 -1
  92. package/dist/cjs/{shared-cL6fofyC.js → shared-C1pyT8u3.js} +1 -1
  93. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DNSXSeaZ.js → shouldProceedtoEmbeddedWalletCreationFlow-BOgjAU1y.js} +1 -1
  94. package/dist/cjs/{smart-wallets-xKqtP8Ub.js → smart-wallets-C6CzRluM.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-B3W7oUF5.js → to-ui-error-B_KfP469.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-create-wallet-without-fallback-D8LW9DKc.js → use-create-wallet-without-fallback-BieSNO71.js} +1 -1
  100. package/dist/cjs/{use-export-wallet-C2suPEqR.js → use-export-wallet-D1_Fnhnu.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-hSS_Ajap.js → useActiveWallet-DTCrzsoG.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-oMgVfBGa.js → useGetTokenPrice-DoyKddna.js} +1 -1
  103. package/dist/cjs/{useI18n-D7JXe5tP.js → useI18n-JB8u7I8Q.js} +1 -1
  104. package/dist/cjs/{usePrivy-DX4q_wvG.js → usePrivy-CyUYnFHC.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-D0_ipP49.js → useSolanaRpcClient-BM36XRol.js} +1 -1
  106. package/dist/cjs/{useWallets-KrPOPwD6.js → useWallets-Cwi9URDf.js} +1 -1
  107. package/dist/cjs/{useWallets-_HUqLUqD.js → useWallets-ggeQUC3m.js} +1 -1
  108. package/dist/dts/{events-context-BYT6PpDG.d.ts → events-context-BTan6II8.d.mts} +1 -1
  109. package/dist/dts/{events-context-BYT6PpDG.d.mts → events-context-BTan6II8.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 +43 -32
  115. package/dist/dts/index.d.ts +43 -32
  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-D7U23FgR.d.mts → types-B4eMcjTQ.d.mts} +2 -1
  123. package/dist/dts/{types-D7U23FgR.d.ts → types-B4eMcjTQ.d.ts} +2 -1
  124. package/dist/dts/ui.d.mts +1 -1
  125. package/dist/dts/ui.d.ts +1 -1
  126. package/dist/esm/{AccountNotFoundScreen-m-ulnyRC.mjs → AccountNotFoundScreen-BzbvtCmu.mjs} +1 -1
  127. package/dist/esm/{Address-Bb7zLnoh.mjs → Address-BUmpXgsy.mjs} +1 -1
  128. package/dist/esm/{AffirmativeConsentScreen-BZiI7gaY.mjs → AffirmativeConsentScreen-CrZKQjas.mjs} +1 -1
  129. package/dist/esm/{AllowlistRejectionScreen-DYujQEMu.mjs → AllowlistRejectionScreen-DhhfJ6ai.mjs} +1 -1
  130. package/dist/esm/AuthenticateWithWalletScreen-BN0s1mtv.mjs +1 -0
  131. package/dist/esm/AwaitingEvmToSolBridgingScreen-C7mp2-Hy.mjs +2 -0
  132. package/dist/esm/{AwaitingExternalEthereumTransferScreen-QSi_jFuT.mjs → AwaitingExternalEthereumTransferScreen-EqM4Kcsu.mjs} +1 -1
  133. package/dist/esm/{AwaitingPasswordlessCodeScreen-CRZX91TB.mjs → AwaitingPasswordlessCodeScreen-NAVmxM9-.mjs} +1 -1
  134. package/dist/esm/{AwaitingSolToEvmBridgingScreen-C5nKj1yd.mjs → AwaitingSolToEvmBridgingScreen-dC9b-wlg.mjs} +2 -2
  135. package/dist/esm/{BridgeNetworkSelectionView-B-gh55-1.mjs → BridgeNetworkSelectionView-BXBCujiq.mjs} +1 -1
  136. package/dist/esm/{Button-BTB0FpvZ.mjs → Button-BCV6mjvS.mjs} +1 -1
  137. package/dist/esm/{CaptchaScreen-Y0vNrbk0.mjs → CaptchaScreen-CTRyyYc9.mjs} +1 -1
  138. package/dist/esm/{CoinbaseOnrampStatusScreen-qhDq6qtP.mjs → CoinbaseOnrampStatusScreen-BNmvm8Bl.mjs} +1 -1
  139. package/dist/esm/{ConnectEmailForm-eTN3xUik.mjs → ConnectEmailForm-DtLW0rv7.mjs} +1 -1
  140. package/dist/esm/{ConnectLedgerScreen-C-dhUpqp.mjs → ConnectLedgerScreen-BEhSz1FM.mjs} +1 -1
  141. package/dist/esm/ConnectOnlyLandingScreen-ZnI9ReZJ.mjs +1 -0
  142. package/dist/esm/{ConnectOnlyStatusScreen-C7OMszka.mjs → ConnectOnlyStatusScreen-1oCuFsd6.mjs} +1 -1
  143. package/dist/esm/ConnectOrCreateScreen-BOO4iaC6.mjs +1 -0
  144. package/dist/esm/{ConnectPhoneForm-DmGv_fDg.mjs → ConnectPhoneForm-OQSgPQxP.mjs} +1 -1
  145. package/dist/esm/ConnectWalletView-Cmm9Ulis.mjs +1 -0
  146. package/dist/esm/{ConnectionStatusScreen-4_pj5yk1.mjs → ConnectionStatusScreen-CZNBQeOQ.mjs} +1 -1
  147. package/dist/esm/{CrossAppAuthScreen-D8abJvV4.mjs → CrossAppAuthScreen-Bno8NQSa.mjs} +1 -1
  148. package/dist/esm/{CustomLandingScreenView-BYAB5iWk.mjs → CustomLandingScreenView-B_ZwsVad.mjs} +2 -2
  149. package/dist/esm/{DelegatedActionsConsentScreen-BPTr4yVf.mjs → DelegatedActionsConsentScreen-B0AwZEKc.mjs} +1 -1
  150. package/dist/esm/{DelegatedActionsRevokeScreen-NY7ZuJZA.mjs → DelegatedActionsRevokeScreen-D0mAKxDs.mjs} +1 -1
  151. package/dist/esm/{EmbeddedWalletConnectingScreen-CnprUZbY.mjs → EmbeddedWalletConnectingScreen-9ADobSle.mjs} +1 -1
  152. package/dist/esm/{EmbeddedWalletCreatedScreen-BlrNZpYf.mjs → EmbeddedWalletCreatedScreen-B7TnCst_.mjs} +1 -1
  153. package/dist/esm/{EmbeddedWalletKeyExportScreen-Dd5N7zPF.mjs → EmbeddedWalletKeyExportScreen-Cmp2CUOa.mjs} +2 -2
  154. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-h5zGIqOI.mjs → EmbeddedWalletOnAccountCreateScreen-vxaCVWy1.mjs} +1 -1
  155. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-UJaVcH1p.mjs → EmbeddedWalletPasswordUpdateScreen-C4dNnXVI.mjs} +1 -1
  156. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CMyJVKRi.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BPTp0nwT.mjs} +1 -1
  157. package/dist/esm/{EnrollTotp-D1Y019Iq.mjs → EnrollTotp-CMtBCJbR.mjs} +1 -1
  158. package/dist/esm/{ErrorScreen-KfzBkWlg.mjs → ErrorScreen-Yi-Rhs0v.mjs} +1 -1
  159. package/dist/esm/{FarcasterConnectStatusScreen-C18PKycv.mjs → FarcasterConnectStatusScreen-BfoDjDwg.mjs} +1 -1
  160. package/dist/esm/{FarcasterSignerStatusScreen-Crgxbwaw.mjs → FarcasterSignerStatusScreen-CsSFmDry.mjs} +1 -1
  161. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BsnoBDOC.mjs → FundSolWalletWithExternalSolanaWallet-BIk-6GIl.mjs} +1 -1
  162. package/dist/esm/{FundWalletMethodHeader-C6QXrL4P.mjs → FundWalletMethodHeader-CS84Ots9.mjs} +1 -1
  163. package/dist/esm/FundingEditAmountScreen-CzbuYpdw.mjs +1 -0
  164. package/dist/esm/{FundingMethodSelectionScreen-BqxUw0Mf.mjs → FundingMethodSelectionScreen-DdZxdcVe.mjs} +1 -1
  165. package/dist/esm/{InAppBrowserLoginNotPossible-BIUZ9A4G.mjs → InAppBrowserLoginNotPossible-COUNBN1W.mjs} +1 -1
  166. package/dist/esm/{InstallWalletScreen-TAbe1EVV.mjs → InstallWalletScreen-BjprJkty.mjs} +1 -1
  167. package/dist/esm/LandingScreen-Dp4m_c2X.mjs +1 -0
  168. package/dist/esm/{LinkConflictScreen-55SLx3hx.mjs → LinkConflictScreen-DMHPhlV7.mjs} +1 -1
  169. package/dist/esm/{LinkEmailScreen-Xzy79V-m.mjs → LinkEmailScreen-D7VTyZrH.mjs} +1 -1
  170. package/dist/esm/{LinkPasskeyScreen-D6FiejG9.mjs → LinkPasskeyScreen-B5LWH116.mjs} +1 -1
  171. package/dist/esm/{LinkPhoneScreen-sf2CMtqv.mjs → LinkPhoneScreen-DdRe154C.mjs} +1 -1
  172. package/dist/esm/{LoginFailedScreen-bwxW7s9F.mjs → LoginFailedScreen-CZnzwKpB.mjs} +1 -1
  173. package/dist/esm/{ManualTransferScreen-D__iGi-r.mjs → ManualTransferScreen-Bn2qhDAI.mjs} +1 -1
  174. package/dist/esm/{MfaAuthEnrollmentFlowScreen-C-bjwRJj.mjs → MfaAuthEnrollmentFlowScreen-CWMULcQb.mjs} +1 -1
  175. package/dist/esm/{MfaAuthVerifyFlowScreen-B9d5FlYJ.mjs → MfaAuthVerifyFlowScreen-B3Hw1YN-.mjs} +1 -1
  176. package/dist/esm/{MfaEnrollmentFlowScreen-CFLh4E-x.mjs → MfaEnrollmentFlowScreen-DcnqGJ3O.mjs} +1 -1
  177. package/dist/esm/{MfaVerifyFlowScreen-BpIzH2DY.mjs → MfaVerifyFlowScreen-BEt8Gfpb.mjs} +1 -1
  178. package/dist/esm/{ModalHeader-20vQXDeu.mjs → ModalHeader-BTru6YQw.mjs} +1 -1
  179. package/dist/esm/{MoonpayStatusScreen-CRNJ6piv.mjs → MoonpayStatusScreen-lYMS5etL.mjs} +1 -1
  180. package/dist/esm/{OAuthStatusScreen-DngcR9YB.mjs → OAuthStatusScreen-DEtT_t2P.mjs} +1 -1
  181. package/dist/esm/{PasskeySelectSignupOrLogin-Db_bv7rS.mjs → PasskeySelectSignupOrLogin-DgH-G2yO.mjs} +1 -1
  182. package/dist/esm/{PasskeyStatusScreen-Ckj7CcsN.mjs → PasskeyStatusScreen-BOac_MoC.mjs} +1 -1
  183. package/dist/esm/{PasswordRecoveryScreen-BX5mNuIA.mjs → PasswordRecoveryScreen-CT1bj8Gb.mjs} +1 -1
  184. package/dist/esm/{QrCode-C7So9kgj.mjs → QrCode-Oxn5GT3C.mjs} +1 -1
  185. package/dist/esm/{RecoveryOAuthStatusScreen-CH9_ywci.mjs → RecoveryOAuthStatusScreen-Ce6qiP-3.mjs} +1 -1
  186. package/dist/esm/{RecoveryPasswordCreateScreen-CVvb7FPI.mjs → RecoveryPasswordCreateScreen-jWT25C0X.mjs} +1 -1
  187. package/dist/esm/{RecoverySelectionScreen-Bhj-0m8Y.mjs → RecoverySelectionScreen-_u02vomS.mjs} +1 -1
  188. package/dist/esm/{Screen-BUPcYMtI.mjs → Screen-_0H_rCdH.mjs} +1 -1
  189. package/dist/esm/{ScreenLayout-6iIsKpRq.mjs → ScreenLayout-CNho46nP.mjs} +1 -1
  190. package/dist/esm/{SetAutomaticRecoveryScreen-BH63Ni6A.mjs → SetAutomaticRecoveryScreen-CUheSZ7h.mjs} +1 -1
  191. package/dist/esm/{SetWalletPasswordForm-BK0mdI5e.mjs → SetWalletPasswordForm-vaG_68V0.mjs} +2 -2
  192. package/dist/esm/{SignRequestScreen-BDw7xxk7.mjs → SignRequestScreen-BNC2mYtk.mjs} +1 -1
  193. package/dist/esm/{StandardSignAndSendTransactionScreen-DYM2d5Hk.mjs → StandardSignAndSendTransactionScreen-Ckxfv32q.mjs} +1 -1
  194. package/dist/esm/{TelegramAuthScreen-DT2RJ9om.mjs → TelegramAuthScreen-xobB3RHK.mjs} +1 -1
  195. package/dist/esm/{TransactionDetails-lKP8UN4t.mjs → TransactionDetails-BdW2lq_B.mjs} +3 -3
  196. package/dist/esm/{TransactionErrorView-CCIFQVpG.mjs → TransactionErrorView-RLIeHdul.mjs} +1 -1
  197. package/dist/esm/{TransferFromWalletScreen-I5s2zHDy.mjs → TransferFromWalletScreen-CLqyv8Ra.mjs} +1 -1
  198. package/dist/esm/{TransferOrBridgeLoadingScreen-B_NJD8Kh.mjs → TransferOrBridgeLoadingScreen-BY7Eot6x.mjs} +1 -1
  199. package/dist/esm/{UpdateEmailScreen-BD0-0Aj5.mjs → UpdateEmailScreen-BVzkFXeI.mjs} +1 -1
  200. package/dist/esm/{UpdatePhoneScreen-DnHd2jee.mjs → UpdatePhoneScreen-DZ_resri.mjs} +1 -1
  201. package/dist/esm/{UserLimitReachedScreen-xflcj6OH.mjs → UserLimitReachedScreen-CTmSitf0.mjs} +1 -1
  202. package/dist/esm/{WalletInfoCard-CpBKe1da.mjs → WalletInfoCard-COAfUoX0.mjs} +1 -1
  203. package/dist/esm/{WalletInterstitialScreen-D7r0v78D.mjs → WalletInterstitialScreen-tDCVxTFi.mjs} +1 -1
  204. package/dist/esm/{WalletLink-Cz8vvc1q.mjs → WalletLink-Cj92ni3W.mjs} +1 -1
  205. package/dist/esm/{WalletOverflowButton-0as7efhF.mjs → WalletOverflowButton-BT_VMZP5.mjs} +1 -1
  206. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  207. package/dist/esm/context-DRLoVlsO.mjs +1 -0
  208. package/dist/esm/{ethers-CVqqoG3x.mjs → ethers-Bl5aM5Gz.mjs} +1 -1
  209. package/dist/esm/extended-chains.mjs +1 -1
  210. package/dist/esm/{get-is-unified-wallet-DJwJGV0c.mjs → get-is-unified-wallet-gMDXpX6C.mjs} +1 -1
  211. package/dist/esm/{index-DZtcKggn.mjs → index-D9w4UYos.mjs} +1 -1
  212. package/dist/esm/{index-PcBcXwU-.mjs → index-DNmMGazz.mjs} +1 -1
  213. package/dist/esm/{index-DcaQ9VMZ.mjs → index-NL2cPmJD.mjs} +5 -5
  214. package/dist/esm/index.mjs +1 -1
  215. package/dist/esm/internal.mjs +1 -1
  216. package/dist/esm/{prepareFundingModalData-BHvIzv1P.mjs → prepareFundingModalData-BVTcQcmw.mjs} +1 -1
  217. package/dist/esm/{shared-BWmKXy6D.mjs → shared-D8TfUpfU.mjs} +1 -1
  218. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-B6qJ8fhx.mjs → shouldProceedtoEmbeddedWalletCreationFlow-BI33jNSF.mjs} +1 -1
  219. package/dist/esm/{smart-wallets-BGPCB0ep.mjs → smart-wallets-9eof3eVL.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-CYFXznYy.mjs +1 -0
  223. package/dist/esm/ui.mjs +1 -1
  224. package/dist/esm/{use-create-wallet-without-fallback-C_y-siw-.mjs → use-create-wallet-without-fallback-C0dI_RFZ.mjs} +1 -1
  225. package/dist/esm/{use-export-wallet-DapEzFil.mjs → use-export-wallet-B1YnjTpb.mjs} +1 -1
  226. package/dist/esm/{useActiveWallet-DDf-vaMZ.mjs → useActiveWallet-BeOB3HTh.mjs} +1 -1
  227. package/dist/esm/{useGetTokenPrice-2p261ACv.mjs → useGetTokenPrice-CDPxMEO-.mjs} +1 -1
  228. package/dist/esm/{useI18n-BRYVrLjs.mjs → useI18n-99pFPsz3.mjs} +1 -1
  229. package/dist/esm/{usePrivy-dzRKwB0-.mjs → usePrivy-BWtc2XF-.mjs} +1 -1
  230. package/dist/esm/{useSolanaRpcClient-7AG_puUr.mjs → useSolanaRpcClient-Brcjny8C.mjs} +1 -1
  231. package/dist/esm/{useWallets-B4MGwFyP.mjs → useWallets-D4IJeaog.mjs} +1 -1
  232. package/dist/esm/{useWallets-N0hQJNER.mjs → useWallets-kObl6ZLS.mjs} +1 -1
  233. package/package.json +3 -3
  234. package/dist/cjs/AuthenticateWithWalletScreen-xtyc2rtb.js +0 -1
  235. package/dist/cjs/ConnectOnlyLandingScreen-BDGZs0Ro.js +0 -1
  236. package/dist/cjs/ConnectWalletView-C7gK4cbO.js +0 -1
  237. package/dist/esm/AuthenticateWithWalletScreen-BJNgLR93.mjs +0 -1
  238. package/dist/esm/AwaitingEvmToSolBridgingScreen-CTM7spSX.mjs +0 -2
  239. package/dist/esm/ConnectOnlyLandingScreen-BXCcG8rx.mjs +0 -1
  240. package/dist/esm/ConnectOrCreateScreen-CsSyifOf.mjs +0 -1
  241. package/dist/esm/ConnectWalletView-BwcROWqJ.mjs +0 -1
  242. package/dist/esm/FundingEditAmountScreen-B_s1b9Zt.mjs +0 -1
  243. package/dist/esm/LandingScreen-Bdy5KSMA.mjs +0 -1
  244. package/dist/esm/context-CoegzSND.mjs +0 -1
  245. package/dist/esm/to-ui-error-Cc8LO7vH.mjs +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("react"),t=require("styled-components"),n=require("./useActiveWallet-hSS_Ajap.js"),o=require("./TodoList-Cm_a93ef.js"),s=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-RpTO1Sce.js"),c=require("./ScreenLayout-BQP-gfLF.js");require("zustand"),require("./context-bxRrRk2e.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("ofetch"),require("./Button-BdtKzmGp.js"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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 d=({passkeys:i,isLoading:t,errorReason:n,success:o,expanded:s,onLinkPasskey:a,onUnlinkPasskey:d,onExpand:y,onBack:h,onClose:m})=>o?/*#__PURE__*/e.jsx(c.ScreenLayout,{title:"Passkeys updated",icon:r.CheckCircle,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}):s?/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Your passkeys",onBack:h,onClose:m,watermark:!0,children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:d,onExpand:y})}):/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:a,loading:t},onClose:m,watermark:!0,helpText:n||void 0,children:0===i.length?/*#__PURE__*/e.jsx(p,{}):/*#__PURE__*/e.jsx(l,{children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:d,onExpand:y})})});let l=/*#__PURE__*/t.styled.div.withConfig({displayName:"ContentContainer",componentId:"sc-a752cbd1-0"})(["margin-bottom:12px;"]),u=({passkeys:t,expanded:o,onUnlink:s,onExpand:a})=>{let[c,d]=i.useState([]),l=o?t.length:2;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsx(g,{children:"Your passkeys"}),/*#__PURE__*/e.jsxs(k,{children:[t.slice(0,l).map((i=>{/*#__PURE__*/return e.jsxs(j,{children:[/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx(f,{children:(t=i,t.authenticatorName?t.createdWithBrowser?`${t.authenticatorName} on ${t.createdWithBrowser}`:t.authenticatorName:t.createdWithBrowser?t.createdWithOs?`${t.createdWithBrowser} on ${t.createdWithOs}`:`${t.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/e.jsxs(v,{children:["Last used:"," ",(i.latestVerifiedAt??i.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e.jsx(C,{disabled:c.includes(i.credentialId),onClick:()=>(async e=>{d((r=>r.concat([e]))),await s(e),d((r=>r.filter((r=>r!==e))))})(i.credentialId),children:c.includes(i.credentialId)?/*#__PURE__*/e.jsx(n.ButtonLoader,{}):/*#__PURE__*/e.jsx(r.Trash2,{size:16})})]},i.credentialId);var t})),t.length>2&&!o&&/*#__PURE__*/e.jsx(x,{onClick:a,children:"View all"})]})]})},p=()=>/*#__PURE__*/e.jsxs(o.TodoList,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e.jsx(o.TodoItem,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Use your passkey to verify transactions and login to your account"})]});const y={component:()=>{let{user:r,unlinkPasskey:t}=a.usePrivyContext(),{linkWithPasskey:n,closePrivyModal:o}=s.usePrivyInternal(),c=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[l,u]=i.useState(!1),[p,y]=i.useState(""),[h,m]=i.useState(!1),[x,k]=i.useState(!1);return i.useEffect((()=>{0===c.length&&k(!1)}),[c.length]),/*#__PURE__*/e.jsx(d,{passkeys:c,isLoading:l,errorReason:p,success:h,expanded:x,onLinkPasskey:()=>{u(!0),n().then((()=>m(!0))).catch((e=>{if(e instanceof s.PrivyError){if(e.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return void y("Cannot link more passkeys to account.");if(e.privyErrorCode===s.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return void y("Passkey request timed out or rejected by user.")}y("Unknown error occurred.")})).finally((()=>{u(!1)}))},onUnlinkPasskey:async e=>(u(!0),await t(e).then((()=>m(!0))).catch((e=>{e instanceof s.PrivyError&&e.privyErrorCode===s.PrivyErrorCode.MISSING_MFA_CREDENTIALS?y("Cannot unlink a passkey enrolled in MFA"):y("Unknown error occurred.")})).finally((()=>{u(!1)}))),onExpand:()=>k(!0),onBack:()=>k(!1),onClose:()=>o()})}},h=/*#__PURE__*/t.styled.div.withConfig({displayName:"DoubleIconWrapper",componentId:"sc-a752cbd1-1"})(["display:flex;align-items:center;justify-content:center;width:180px;height:90px;border-radius:50%;svg + svg{margin-left:12px;}> svg{z-index:2;color:var(--privy-color-accent) !important;stroke:var(--privy-color-accent) !important;fill:var(--privy-color-accent) !important;}"]);let m=/*#__PURE__*/t.css(["&&{width:100%;font-size:0.875rem;line-height:1rem;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;justify-content:center;padding:6px 8px;background-color:var(--privy-color-background);transition:background-color 200ms ease;color:var(--privy-color-accent) !important;:focus{outline:none;box-shadow:none;}}"]);const x=/*#__PURE__*/t.styled.button.withConfig({displayName:"LinkButton",componentId:"sc-a752cbd1-2"})(["",""],m);let k=/*#__PURE__*/t.styled.div.withConfig({displayName:"List",componentId:"sc-a752cbd1-3"})(["display:flex;flex-direction:column;align-items:stretch;gap:0.8rem;padding:0.5rem 0rem 0rem;flex-grow:1;width:100%;"]),g=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyListTitle",componentId:"sc-a752cbd1-4"})(["line-height:20px;height:20px;font-size:1em;font-weight:450;display:flex;justify-content:flex-beginning;width:100%;"]),f=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyItemTitle",componentId:"sc-a752cbd1-5"})(["font-size:1em;line-height:1.3em;font-weight:500;color:var(--privy-color-foreground-2);padding:0.2em 0;"]),v=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyItemSubtitle",componentId:"sc-a752cbd1-6"})(["font-size:0.875rem;line-height:1rem;color:#64668b;padding:0.2em 0;"]),j=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyListItem",componentId:"sc-a752cbd1-7"})(["display:flex;align-items:center;justify-content:space-between;padding:1em;gap:10px;font-size:0.875rem;line-height:1rem;text-align:left;border-radius:8px;border:1px solid #e2e3f0 !important;width:100%;height:5em;"]),w=/*#__PURE__*/t.css([":focus,:hover,:active{outline:none;}display:flex;width:2em;height:2em;justify-content:center;align-items:center;svg{color:var(--privy-color-error);}svg:hover{color:var(--privy-color-foreground-3);}"]),C=/*#__PURE__*/t.styled.button.withConfig({displayName:"PasskeyItemUnlinkButton",componentId:"sc-a752cbd1-8"})(["",""],w);exports.DoubleIconWrapper=h,exports.LinkButton=x,exports.LinkPasskeyScreen=y,exports.LinkPasskeyView=d,exports.default=y;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("react"),t=require("styled-components"),n=require("./useActiveWallet-DTCrzsoG.js"),o=require("./TodoList-Cm_a93ef.js"),s=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-JejAvbr5.js"),c=require("./ScreenLayout-CfU_O3al.js");require("zustand"),require("./context-CcgGREUw.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("ofetch"),require("./Button-BXkfCTro.js"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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 d=({passkeys:i,isLoading:t,errorReason:n,success:o,expanded:s,onLinkPasskey:a,onUnlinkPasskey:d,onExpand:y,onBack:h,onClose:m})=>o?/*#__PURE__*/e.jsx(c.ScreenLayout,{title:"Passkeys updated",icon:r.CheckCircle,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}):s?/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Your passkeys",onBack:h,onClose:m,watermark:!0,children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:d,onExpand:y})}):/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:a,loading:t},onClose:m,watermark:!0,helpText:n||void 0,children:0===i.length?/*#__PURE__*/e.jsx(p,{}):/*#__PURE__*/e.jsx(l,{children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:d,onExpand:y})})});let l=/*#__PURE__*/t.styled.div.withConfig({displayName:"ContentContainer",componentId:"sc-a752cbd1-0"})(["margin-bottom:12px;"]),u=({passkeys:t,expanded:o,onUnlink:s,onExpand:a})=>{let[c,d]=i.useState([]),l=o?t.length:2;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsx(g,{children:"Your passkeys"}),/*#__PURE__*/e.jsxs(k,{children:[t.slice(0,l).map((i=>{/*#__PURE__*/return e.jsxs(j,{children:[/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx(f,{children:(t=i,t.authenticatorName?t.createdWithBrowser?`${t.authenticatorName} on ${t.createdWithBrowser}`:t.authenticatorName:t.createdWithBrowser?t.createdWithOs?`${t.createdWithBrowser} on ${t.createdWithOs}`:`${t.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/e.jsxs(v,{children:["Last used:"," ",(i.latestVerifiedAt??i.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e.jsx(C,{disabled:c.includes(i.credentialId),onClick:()=>(async e=>{d((r=>r.concat([e]))),await s(e),d((r=>r.filter((r=>r!==e))))})(i.credentialId),children:c.includes(i.credentialId)?/*#__PURE__*/e.jsx(n.ButtonLoader,{}):/*#__PURE__*/e.jsx(r.Trash2,{size:16})})]},i.credentialId);var t})),t.length>2&&!o&&/*#__PURE__*/e.jsx(x,{onClick:a,children:"View all"})]})]})},p=()=>/*#__PURE__*/e.jsxs(o.TodoList,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e.jsx(o.TodoItem,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Use your passkey to verify transactions and login to your account"})]});const y={component:()=>{let{user:r,unlinkPasskey:t}=a.usePrivyContext(),{linkWithPasskey:n,closePrivyModal:o}=s.usePrivyInternal(),c=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[l,u]=i.useState(!1),[p,y]=i.useState(""),[h,m]=i.useState(!1),[x,k]=i.useState(!1);return i.useEffect((()=>{0===c.length&&k(!1)}),[c.length]),/*#__PURE__*/e.jsx(d,{passkeys:c,isLoading:l,errorReason:p,success:h,expanded:x,onLinkPasskey:()=>{u(!0),n().then((()=>m(!0))).catch((e=>{if(e instanceof s.PrivyError){if(e.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return void y("Cannot link more passkeys to account.");if(e.privyErrorCode===s.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return void y("Passkey request timed out or rejected by user.")}y("Unknown error occurred.")})).finally((()=>{u(!1)}))},onUnlinkPasskey:async e=>(u(!0),await t(e).then((()=>m(!0))).catch((e=>{e instanceof s.PrivyError&&e.privyErrorCode===s.PrivyErrorCode.MISSING_MFA_CREDENTIALS?y("Cannot unlink a passkey enrolled in MFA"):y("Unknown error occurred.")})).finally((()=>{u(!1)}))),onExpand:()=>k(!0),onBack:()=>k(!1),onClose:()=>o()})}},h=/*#__PURE__*/t.styled.div.withConfig({displayName:"DoubleIconWrapper",componentId:"sc-a752cbd1-1"})(["display:flex;align-items:center;justify-content:center;width:180px;height:90px;border-radius:50%;svg + svg{margin-left:12px;}> svg{z-index:2;color:var(--privy-color-accent) !important;stroke:var(--privy-color-accent) !important;fill:var(--privy-color-accent) !important;}"]);let m=/*#__PURE__*/t.css(["&&{width:100%;font-size:0.875rem;line-height:1rem;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;justify-content:center;padding:6px 8px;background-color:var(--privy-color-background);transition:background-color 200ms ease;color:var(--privy-color-accent) !important;:focus{outline:none;box-shadow:none;}}"]);const x=/*#__PURE__*/t.styled.button.withConfig({displayName:"LinkButton",componentId:"sc-a752cbd1-2"})(["",""],m);let k=/*#__PURE__*/t.styled.div.withConfig({displayName:"List",componentId:"sc-a752cbd1-3"})(["display:flex;flex-direction:column;align-items:stretch;gap:0.8rem;padding:0.5rem 0rem 0rem;flex-grow:1;width:100%;"]),g=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyListTitle",componentId:"sc-a752cbd1-4"})(["line-height:20px;height:20px;font-size:1em;font-weight:450;display:flex;justify-content:flex-beginning;width:100%;"]),f=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyItemTitle",componentId:"sc-a752cbd1-5"})(["font-size:1em;line-height:1.3em;font-weight:500;color:var(--privy-color-foreground-2);padding:0.2em 0;"]),v=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyItemSubtitle",componentId:"sc-a752cbd1-6"})(["font-size:0.875rem;line-height:1rem;color:#64668b;padding:0.2em 0;"]),j=/*#__PURE__*/t.styled.div.withConfig({displayName:"PasskeyListItem",componentId:"sc-a752cbd1-7"})(["display:flex;align-items:center;justify-content:space-between;padding:1em;gap:10px;font-size:0.875rem;line-height:1rem;text-align:left;border-radius:8px;border:1px solid #e2e3f0 !important;width:100%;height:5em;"]),w=/*#__PURE__*/t.css([":focus,:hover,:active{outline:none;}display:flex;width:2em;height:2em;justify-content:center;align-items:center;svg{color:var(--privy-color-error);}svg:hover{color:var(--privy-color-foreground-3);}"]),C=/*#__PURE__*/t.styled.button.withConfig({displayName:"PasskeyItemUnlinkButton",componentId:"sc-a752cbd1-8"})(["",""],w);exports.DoubleIconWrapper=h,exports.LinkButton=x,exports.LinkPasskeyScreen=y,exports.LinkPasskeyView=d,exports.default=y;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-GsUfLBeN.js"),n=require("./context-bxRrRk2e.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-RpTO1Sce.js"),a=require("./ScreenLayout-BQP-gfLF.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-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("./Button-BdtKzmGp.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("tinycolor2"),require("ofetch"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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-DebBPzTl.js"),n=require("./context-CcgGREUw.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-JejAvbr5.js"),a=require("./ScreenLayout-CfU_O3al.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-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("./Button-BXkfCTro.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("tinycolor2"),require("ofetch"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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-RpTO1Sce.js"),n=require("./ScreenLayout-BQP-gfLF.js");require("ofetch"),require("react"),require("viem"),require("./context-bxRrRk2e.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./Button-BdtKzmGp.js"),require("styled-components"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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-JejAvbr5.js"),n=require("./ScreenLayout-CfU_O3al.js");require("ofetch"),require("react"),require("viem"),require("./context-CcgGREUw.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./Button-BXkfCTro.js"),require("styled-components"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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-BdtKzmGp.js"),a=require("./Layouts-dRL0OSpp.js"),t=require("./ModalHeader-OWSWMCEF.js"),o=require("./QrCode-C4hJtM22.js"),u=require("./FundWalletMethodHeader-uzk-ixZP.js"),c=require("./InfoBanner-CTx1eRnV.js"),d=require("./Subtitle-Dtmrw8l5.js"),l=require("./Title-C-tHJvrb.js"),m=require("./WalletInfoCard-BewbaIC_.js"),q=require("./context-bxRrRk2e.js"),p=require("./useActiveWallet-hSS_Ajap.js"),h=require("./internal-context-NWsAL807.js"),f=require("./get-is-unified-wallet-RpTO1Sce.js"),j=require("./useWalletBalance-BVb8F3RO.js"),g=require("./useWallets-_HUqLUqD.js"),v=require("./analytics-C6C_4JmG.js"),C=require("./index-DG6nzSst.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-BdN5tzBx.js"),require("./shared-BPGwTh8c.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.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-DX4q_wvG.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
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("viem"),n=require("@privy-io/js-sdk-core"),s=require("./Button-BXkfCTro.js"),a=require("./Layouts-dRL0OSpp.js"),t=require("./ModalHeader-DRaJvD2v.js"),o=require("./QrCode-C2QE_BbM.js"),u=require("./FundWalletMethodHeader-BGagZe1_.js"),c=require("./InfoBanner-CTx1eRnV.js"),d=require("./Subtitle-Dtmrw8l5.js"),l=require("./Title-C-tHJvrb.js"),m=require("./WalletInfoCard-xuQPIB68.js"),q=require("./context-CcgGREUw.js"),p=require("./useActiveWallet-DTCrzsoG.js"),h=require("./internal-context-NWsAL807.js"),f=require("./get-is-unified-wallet-JejAvbr5.js"),j=require("./useWalletBalance-BVb8F3RO.js"),g=require("./useWallets-ggeQUC3m.js"),v=require("./analytics-C6C_4JmG.js"),y=require("./index-iQcFLOcm.js"),C=require("./getChainName-C4rO8-3n.js"),A=require("./getUsdcMintAddress-REYZSOb9.js"),S=require("./transaction-DjF5X-by.js"),T=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-Dqfr__Us.js"),require("./shared-BPGwTh8c.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.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-CyUYnFHC.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 I={component:()=>{let{wallets:I}=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:W,closePrivyModal:D}=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}),H="solana"===_.chainType,Q=H?_.isUSDC?"USDC":"SOL":_.erc20Address?_.erc20ContractInfo?.symbol:_.chain.nativeCurrency.symbol,Y=H?x.find((({address:e})=>e===_.address)):I.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=H?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)}):y.fetchWalletBalance({rpc:e.rpc,address:_.address})).then((e=>{let r=BigInt(e);P&&r>P&&(O(!0),W({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"solana",address:Y?.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 T.getErc20Balance({chain:_.chain,address:_.address,erc20Address:_.erc20Address,rpcConfig:B,appId:U});return e}})().then((e=>{P&&e>P&&(O(!0),W({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"ethereum",address:Y?.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 z=r.useMemo((()=>null==P?"":_.isUSDC?n.formatTokenAmount({amount:P,decimals:6}):H?S.getNativeCurrencyFromLamports(P,3,!0,!0):null!=_.erc20ContractInfo?.decimals?n.formatTokenAmount({amount:P,decimals:_.erc20ContractInfo.decimals}):n.formatWeiAmount({wei:P})),[P,H,_]),V="ethereum"===_.chainType?_.chain.name:C.getChainName(_.chain),X=r.useMemo((()=>""===_.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(l.Title,{children:_.uiConfig?.receiveFundsTitle??`Receive ${_.amount} ${Q??""}`.trim()})),[_.uiConfig?.receiveFundsTitle,_.amount,Q]),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:`${z} ${Q}`,address:_.address}),$&&/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>D({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let M=({...r})=>/*#__PURE__*/e.jsx(y.Blobby,{color:"black",...r});exports.ManualTransferScreen=I,exports.default=I;
@@ -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-BdtKzmGp.js"),n=require("./useActiveWallet-hSS_Ajap.js"),s=require("./ModalHeader-OWSWMCEF.js"),a=require("./context-bxRrRk2e.js"),u=require("./get-is-unified-wallet-RpTO1Sce.js"),l=require("./EnrollTotp-CDSds4bp.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-DSU36mVl.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-_HUqLUqD.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-C6W1-E6m.js"),require("lucide-react"),require("./index-DG6nzSst.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-DX4q_wvG.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-BQP-gfLF.js"),require("./Screen-D7sTdyLl.js"),require("./index-CRFXS9pP.js"),require("./LinkPasskeyScreen-DtKPxsUK.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-C4hJtM22.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-BXkfCTro.js"),n=require("./useActiveWallet-DTCrzsoG.js"),s=require("./ModalHeader-DRaJvD2v.js"),a=require("./context-CcgGREUw.js"),u=require("./get-is-unified-wallet-JejAvbr5.js"),l=require("./EnrollTotp-Cy02Mr_m.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-DkGmcQac.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-ggeQUC3m.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-CFGSlbsW.js"),require("lucide-react"),require("./index-iQcFLOcm.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-CyUYnFHC.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-CfU_O3al.js"),require("./Screen-BZ-J4FwQ.js"),require("./index-CRFXS9pP.js"),require("./LinkPasskeyScreen-CgLhb8y2.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-C2QE_BbM.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,w]=o.useState(!1),[S,b]=o.useState(),F=async()=>{S?I(S):r?await T({user:r}):I(Error("Must be logged in to manage MFA")),setTimeout((()=>{p(null),v(null)}),500)};if(q.current=F,!d?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:I,onSuccess:T,onBack:P,mfaMethods:E,verify:A,generateTotpSecret:L,enrollTotp:R,unenrollTotp:B,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),w(!0);let r=await W(e);return await T({user:r})}catch(e){b(e)}finally{w(!1),k(!1)}}if(!i||!r||!m)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:F,backFn:P},"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:F},"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),w(!0);let e=await B();return await T({user:e})}catch(e){b(e)}finally{w(!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:F},"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),w(!0);let e=await W([]);return await T({user:e})}catch(e){b(e)}finally{w(!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:F,onReset:K,submitEnrollmentWithTotp:e=>async function(e){try{b(void 0),w(!0);let r=await R(e);return await T({user:r})}catch(e){b(e)}finally{w(!1),p(null)}}(e.mfaCode),error:S,totpInfo:{...x,appName:m?.name||"Privy"}}):"passkey"===f?/*#__PURE__*/e.jsx(l.EnrollPasskey,{onReset:K,onClose:F,submitEnrollmentWithPasskey:Q}):/*#__PURE__*/e.jsx(l.EnrollLandingScreen,{showIntro:!0,userMfaMethods:r.mfaMethods,appMfaMethods:m.mfa.methods,userHasAuthSms:O,backFn:P,handleSelectMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}return"totp"===e?(v(e),g(null),void L().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:S,onClose:F,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:F,backFn:P},"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:F,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-RpTO1Sce.js"),t=require("./to-ui-error-B3W7oUF5.js");require("viem"),require("./context-bxRrRk2e.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-OWSWMCEF.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-BQP-gfLF.js"),require("./Button-BdtKzmGp.js"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("./Screen-D7sTdyLl.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-oMgVfBGa.js"),require("./useGetSolPrice-C986iVoO.js"),require("./index-DG6nzSst.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-DX4q_wvG.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-DTH_TZpQ.js"),require("./WalletLink-Da_ICG1G.js"),require("./ethers-C1-7vvVS.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-JejAvbr5.js"),t=require("./to-ui-error-B_KfP469.js");require("viem"),require("./context-CcgGREUw.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-DRaJvD2v.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-CfU_O3al.js"),require("./Button-BXkfCTro.js"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("./Screen-BZ-J4FwQ.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-DoyKddna.js"),require("./useGetSolPrice-C986iVoO.js"),require("./index-iQcFLOcm.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-CyUYnFHC.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-Bg0E9A_6.js"),require("./WalletLink-CzKk6PGd.js"),require("./ethers-CWRVqVsu.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-BdtKzmGp.js"),l=require("./useActiveWallet-hSS_Ajap.js"),a=require("./ModalHeader-OWSWMCEF.js"),c=require("./context-bxRrRk2e.js"),u=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-RpTO1Sce.js"),h=require("./index-DG6nzSst.js"),m=require("./EnrollTotp-CDSds4bp.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-GsUfLBeN.js"),p=require("./PinInput-DSI6rjOn.js"),q=require("./ErrorScreen-C6W1-E6m.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-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.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-DX4q_wvG.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-DtKPxsUK.js"),require("lucide-react"),require("./TodoList-Cm_a93ef.js"),require("./ScreenLayout-BQP-gfLF.js"),require("./Screen-D7sTdyLl.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-C4hJtM22.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-BXkfCTro.js"),l=require("./useActiveWallet-DTCrzsoG.js"),a=require("./ModalHeader-DRaJvD2v.js"),c=require("./context-CcgGREUw.js"),u=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-JejAvbr5.js"),h=require("./index-iQcFLOcm.js"),m=require("./EnrollTotp-Cy02Mr_m.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-DebBPzTl.js"),p=require("./PinInput-DSI6rjOn.js"),q=require("./ErrorScreen-CFGSlbsW.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-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.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-CyUYnFHC.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-CgLhb8y2.js"),require("lucide-react"),require("./TodoList-Cm_a93ef.js"),require("./ScreenLayout-CfU_O3al.js"),require("./Screen-BZ-J4FwQ.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-C2QE_BbM.js"),require("qrcode"),require("./reservoir-CQGyEBb7.js");var C=/*#__PURE__*/v(r),M=/*#__PURE__*/v(o),g=/*#__PURE__*/v(n),S=/*#__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:g,submitEnrollmentWithSms:S}=h.useMfaEnrollment(),{data:b}=d.usePrivyModal(),F=c.useAppConfig();function I(){b?.mfaEnrollmentFlow?.onSuccess(),o()}return x?/*#__PURE__*/e.jsx(q.ErrorScreenView,{allowlistConfig:F.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 g({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 ",F?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):m?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:I},"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:I,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 S({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,{})]})},F={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:F,onUserCloseViaDialogOrKeybindRef:I}=d.usePrivyModal(),E=c.useAppConfig(),{closePrivyModal:T}=u.usePrivyInternal(),{promptMfa:P}=h.useMfa(),[B,W]=i.useState(!1),[L,R]=i.useState(null),[A,H]=i.useState(null),N=()=>{T({shouldCallAuthOnSuccess:!0}),o(!1),setTimeout((()=>{j(null),R(null)}),500)},[U,D]=i.useState(!1),[O,V]=i.useState();I.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 G(){j(null),R(null)}async function J(e=z){D(!0);try{return await v(),await w({credentialIds:e},{removeForLogin:F?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),F?.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:G,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:G,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=F?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:G,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:F?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})}if(0===F.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(g.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(S.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:G,onClose:N}):"totp"===L&&A?/*#__PURE__*/e.jsx(m.EnrollTotp,{onClose:N,onReset:G,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return V(void 0),await q({mfaCode:e}),F?.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:G,onClose:N,submitEnrollmentWithPasskey:J}):/*#__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 P()}catch(e){return void V(e)}return"totp"===e?(R(e),H(null),void k().then((e=>{H(e)})).catch((()=>{H(null),G()}))):"passkey"===e&&1===z.length?await J():void R(e)},isTotpLoading:"totp"===L&&!A,isPasskeyLoading:U,error:O,onClose:N,setRemovingMfaMethod:async e=>{try{await P()}catch(e){return void V(e)}j(e)}})}};exports.MfaEnrollmentFlowScreen=F,exports.default=F;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-RpTO1Sce.js"),t=require("./index-DG6nzSst.js"),o=require("./to-ui-error-B3W7oUF5.js");require("viem"),require("./context-bxRrRk2e.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DX4q_wvG.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-OWSWMCEF.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-BQP-gfLF.js"),require("./Button-BdtKzmGp.js"),require("./Screen-D7sTdyLl.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-oMgVfBGa.js"),require("./useGetSolPrice-C986iVoO.js"),require("./TransactionDetails-DTH_TZpQ.js"),require("./WalletLink-Da_ICG1G.js"),require("./ethers-C1-7vvVS.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-JejAvbr5.js"),t=require("./index-iQcFLOcm.js"),o=require("./to-ui-error-B_KfP469.js");require("viem"),require("./context-CcgGREUw.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CyUYnFHC.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-DRaJvD2v.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-CfU_O3al.js"),require("./Button-BXkfCTro.js"),require("./Screen-BZ-J4FwQ.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-DoyKddna.js"),require("./useGetSolPrice-C986iVoO.js"),require("./TransactionDetails-Bg0E9A_6.js"),require("./WalletLink-CzKk6PGd.js"),require("./ethers-CWRVqVsu.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-bxRrRk2e.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-CcgGREUw.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-BdtKzmGp.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-hSS_Ajap.js"),l=require("./ModalHeader-OWSWMCEF.js"),u=require("./context-bxRrRk2e.js"),c=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-RpTO1Sce.js"),h=require("./index-BzsdDRPs.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.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-_HUqLUqD.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-BXkfCTro.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-DTCrzsoG.js"),l=require("./ModalHeader-DRaJvD2v.js"),u=require("./context-CcgGREUw.js"),c=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-JejAvbr5.js"),h=require("./index-Cu3bv7vx.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.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-ggeQUC3m.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-RpTO1Sce.js"),o=require("./twitter-BVVRWkcG.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-bxRrRk2e.js"),s=require("./internal-context-NWsAL807.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-DNSXSeaZ.js"),d=require("./ScreenLayout-BQP-gfLF.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-DG6nzSst.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-BdtKzmGp.js"),require("styled-components"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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-DX4q_wvG.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-JejAvbr5.js"),o=require("./twitter-BVVRWkcG.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-CcgGREUw.js"),s=require("./internal-context-NWsAL807.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-BOgjAU1y.js"),d=require("./ScreenLayout-CfU_O3al.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-iQcFLOcm.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-BXkfCTro.js"),require("styled-components"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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-CyUYnFHC.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-DG6nzSst.js"),t=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-RpTO1Sce.js"),s=require("./ScreenLayout-BQP-gfLF.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("./context-bxRrRk2e.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DX4q_wvG.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-BdtKzmGp.js"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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-iQcFLOcm.js"),t=require("./internal-context-NWsAL807.js"),a=require("./get-is-unified-wallet-JejAvbr5.js"),s=require("./ScreenLayout-CfU_O3al.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("./context-CcgGREUw.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CyUYnFHC.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-BXkfCTro.js"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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-bxRrRk2e.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-RpTO1Sce.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-DNSXSeaZ.js"),n=require("./ScreenLayout-BQP-gfLF.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-DG6nzSst.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DX4q_wvG.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-BdtKzmGp.js"),require("./Screen-D7sTdyLl.js"),require("./ModalHeader-OWSWMCEF.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-CcgGREUw.js"),o=require("./internal-context-NWsAL807.js"),u=require("./get-is-unified-wallet-JejAvbr5.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-BOgjAU1y.js"),n=require("./ScreenLayout-CfU_O3al.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-iQcFLOcm.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CyUYnFHC.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-BXkfCTro.js"),require("./Screen-BZ-J4FwQ.js"),require("./ModalHeader-DRaJvD2v.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-RpTO1Sce.js"),o=require("./Button-BdtKzmGp.js"),n=require("./Layouts-dRL0OSpp.js"),a=require("./shared-cL6fofyC.js"),c=require("./index-DG6nzSst.js"),l=require("./internal-context-NWsAL807.js"),u=require("./Screen-D7sTdyLl.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-bxRrRk2e.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-hSS_Ajap.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-_HUqLUqD.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-DX4q_wvG.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-OWSWMCEF.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-JejAvbr5.js"),o=require("./Button-BXkfCTro.js"),n=require("./Layouts-dRL0OSpp.js"),a=require("./shared-C1pyT8u3.js"),c=require("./index-iQcFLOcm.js"),l=require("./internal-context-NWsAL807.js"),u=require("./Screen-BZ-J4FwQ.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-CcgGREUw.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-DTCrzsoG.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DkGmcQac.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-ggeQUC3m.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-CyUYnFHC.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-DRaJvD2v.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-bxRrRk2e.js"),i=require("./useActiveWallet-hSS_Ajap.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-CcgGREUw.js"),i=require("./useActiveWallet-DTCrzsoG.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"})})};