@privy-io/react-auth 3.7.0 → 3.8.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 (361) hide show
  1. package/dist/cjs/AccountNotFoundScreen-jSbfPu_e.js +1 -0
  2. package/dist/cjs/Address-CZQd_MIA.js +1 -0
  3. package/dist/cjs/AffirmativeConsentScreen-7a4hl59A.js +1 -0
  4. package/dist/cjs/AllowlistRejectionScreen-B6roj0JU.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-BcBapHrq.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-D1Xd83Hp.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-COL0WYkT.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-Cx5fqGf6.js +1 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-DYS3lDs0.js +2 -0
  10. package/dist/cjs/BridgeNetworkSelectionView-uivzU_Y9.js +1 -0
  11. package/dist/cjs/Button-nXApC2Jy.js +2 -0
  12. package/dist/cjs/CaptchaScreen-025syTLo.js +1 -0
  13. package/dist/cjs/Checkbox-DXPQZFlQ.js +1 -0
  14. package/dist/cjs/Chip-ChrHHazc.js +1 -0
  15. package/dist/cjs/CoinbaseOnrampStatusScreen-ORl8wt4H.js +1 -0
  16. package/dist/cjs/Column-C2bAbJE0.js +1 -0
  17. package/dist/cjs/ConnectEmailForm-BEv-7qU9.js +1 -0
  18. package/dist/cjs/ConnectLedgerScreen-DBYExlWR.js +1 -0
  19. package/dist/cjs/ConnectOnlyLandingScreen-bOhkl0xJ.js +1 -0
  20. package/dist/cjs/ConnectOnlyStatusScreen-DvTrLHyY.js +1 -0
  21. package/dist/cjs/ConnectOrCreateScreen-Dh4EFU5N.js +1 -0
  22. package/dist/cjs/ConnectPhoneForm-DK-bg2D5.js +1 -0
  23. package/dist/cjs/ConnectWalletView-4vj7Sq7-.js +1 -0
  24. package/dist/cjs/ConnectionStatusScreen-Ct-KTCXS.js +1 -0
  25. package/dist/cjs/CopyToClipboard-fd8Z3kQX.js +1 -0
  26. package/dist/cjs/CrossAppAuthScreen-B-DtA7IH.js +1 -0
  27. package/dist/cjs/CustomLandingScreenView-tt_NEfU6.js +2 -0
  28. package/dist/cjs/DelegatedActionsConsentScreen-B5WlYn7z.js +1 -0
  29. package/dist/cjs/DelegatedActionsRevokeScreen-2g_ydX-Y.js +1 -0
  30. package/dist/cjs/EmailInputForm-tjrhBacA.js +1 -0
  31. package/dist/cjs/EmbeddedWalletConnectingScreen-9seYvsTF.js +1 -0
  32. package/dist/cjs/EmbeddedWalletCreatedScreen-PycFyIz6.js +1 -0
  33. package/dist/cjs/EmbeddedWalletKeyExportScreen-BDTDQY1f.js +2 -0
  34. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B0tXEtG9.js +1 -0
  35. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-ZfgU86hx.js +1 -0
  36. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-tP8rSVUL.js +1 -0
  37. package/dist/cjs/EnrollTotp-DZ5fIrXr.js +1 -0
  38. package/dist/cjs/ErrorBanner-CMjaobRI.js +1 -0
  39. package/dist/cjs/ErrorMessage-f0cRWc29.js +1 -0
  40. package/dist/cjs/ErrorScreen-Cob9AO30.js +1 -0
  41. package/dist/cjs/FarcasterConnectStatusScreen-C5FoWA6N.js +2 -0
  42. package/dist/cjs/FarcasterSignerStatusScreen-CDYkqsxz.js +2 -0
  43. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-DC_xoE6W.js +2 -0
  44. package/dist/cjs/FundWalletMethodHeader-zYWhBIiS.js +1 -0
  45. package/dist/cjs/FundingEditAmountScreen-BB7-k00c.js +1 -0
  46. package/dist/cjs/FundingMethodSelectionScreen-BrV94GD2.js +1 -0
  47. package/dist/cjs/InAppBrowserLoginNotPossible-y8g07-kU.js +1 -0
  48. package/dist/cjs/InfoBanner-CTx1eRnV.js +1 -0
  49. package/dist/cjs/InjectedWalletIcon-UY3nMvZo.js +1 -0
  50. package/dist/cjs/InstallWalletScreen-CmGi6mS1.js +1 -0
  51. package/dist/cjs/JsonTree-xaeo0q6z.js +1 -0
  52. package/dist/cjs/LabelXs-CYMv6rOZ.js +1 -0
  53. package/dist/cjs/LandingScreen-B9jb8n_d.js +1 -0
  54. package/dist/cjs/Layouts-dRL0OSpp.js +1 -0
  55. package/dist/cjs/Link-DmzPZ_M7.js +1 -0
  56. package/dist/cjs/LinkConflictScreen-BJXyOu2J.js +1 -0
  57. package/dist/cjs/LinkEmailScreen-zyJFrvy-.js +1 -0
  58. package/dist/cjs/LinkPasskeyScreen-Bw7Xs741.js +1 -0
  59. package/dist/cjs/LinkPhoneScreen-C4JQblY3.js +1 -0
  60. package/dist/cjs/LoadingSkeleton-DoCrfGnl.js +1 -0
  61. package/dist/cjs/LoginFailedScreen-CGT-2B2h.js +1 -0
  62. package/dist/cjs/ManualTransferScreen-DPz98CSt.js +1 -0
  63. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BBKMKDGR.js +1 -0
  64. package/dist/cjs/MfaAuthVerifyFlowScreen-3LKUo_xV.js +1 -0
  65. package/dist/cjs/MfaEnrollmentFlowScreen-B2YgNRCC.js +1 -0
  66. package/dist/cjs/MfaVerifyFlowScreen-BhVqkM2f.js +1 -0
  67. package/dist/cjs/ModalHeader-DbV81e3m.js +3 -0
  68. package/dist/cjs/MoonpayStatusScreen-yghPhz7v.js +1 -0
  69. package/dist/cjs/NetworkIcon-BZ9Mj6vV.js +1 -0
  70. package/dist/cjs/OAuthStatusScreen-q9MFItPT.js +1 -0
  71. package/dist/cjs/OpenLink-BpCUf9iR.js +1 -0
  72. package/dist/cjs/PasskeySelectSignupOrLogin-BKBH0QxK.js +1 -0
  73. package/dist/cjs/PasskeyStatusScreen-DVx4lzwq.js +1 -0
  74. package/dist/cjs/PasswordRecoveryScreen-BmGdXVfh.js +1 -0
  75. package/dist/cjs/PinInput-DSI6rjOn.js +1 -0
  76. package/dist/cjs/QrCode-Ua_0cVUP.js +2 -0
  77. package/dist/cjs/RecoveryOAuthStatusScreen-DUobwBXF.js +1 -0
  78. package/dist/cjs/RecoveryPasswordCreateScreen-vQG4ErlF.js +1 -0
  79. package/dist/cjs/RecoverySelectionScreen-E2l_NO8y.js +1 -0
  80. package/dist/cjs/Row-CxDF-VMy.js +1 -0
  81. package/dist/cjs/Screen-65eQbiHD.js +9 -0
  82. package/dist/cjs/ScreenHeader-CyURV6Ti.js +2 -0
  83. package/dist/cjs/ScreenLayout-B_60rKhZ.js +1 -0
  84. package/dist/cjs/SetAutomaticRecoveryScreen-DQolobOz.js +1 -0
  85. package/dist/cjs/SetWalletPasswordForm-8g-lawop.js +2 -0
  86. package/dist/cjs/SignRequestScreen-BAgmmVVW.js +1 -0
  87. package/dist/cjs/StackedContainer-ByB6Mdu0.js +1 -0
  88. package/dist/cjs/StandardSignAndSendTransactionScreen-BUB57iWU.js +1 -0
  89. package/dist/cjs/Subtitle-Dtmrw8l5.js +1 -0
  90. package/dist/cjs/TelegramAuthScreen-D5uhx6WN.js +1 -0
  91. package/dist/cjs/Title-C-tHJvrb.js +1 -0
  92. package/dist/cjs/TodoList-Cm_a93ef.js +2 -0
  93. package/dist/cjs/TransactionDetails-BefABtVQ.js +3 -0
  94. package/dist/cjs/TransactionErrorView-QKWh4urc.js +2 -0
  95. package/dist/cjs/TransferFromWalletScreen-C_0IpL-A.js +1 -0
  96. package/dist/cjs/TransferOrBridgeLoadingScreen-C6t1_cTP.js +1 -0
  97. package/dist/cjs/UpdateEmailScreen-BUAgWudx.js +1 -0
  98. package/dist/cjs/UpdatePhoneScreen-DefnuTEZ.js +1 -0
  99. package/dist/cjs/UserLimitReachedScreen-B76r_-LC.js +1 -0
  100. package/dist/cjs/Value-C-XtZyFa.js +1 -0
  101. package/dist/cjs/WalletButtonList-bICzXZXM.js +1 -0
  102. package/dist/cjs/WalletCards-BfpeHH5n.js +1 -0
  103. package/dist/cjs/WalletInfoCard-CscdnrUV.js +1 -0
  104. package/dist/cjs/WalletInterstitialScreen-CG1k3EvV.js +1 -0
  105. package/dist/cjs/WalletLink-DF6dDjkz.js +3 -0
  106. package/dist/cjs/WarningBanner-B_Gs_15p.js +1 -0
  107. package/dist/cjs/abstract-smart-wallets.js +1 -1
  108. package/dist/cjs/analytics-C6C_4JmG.js +1 -0
  109. package/dist/cjs/capitalizeFirstLetter-D-K8mqBm.js +1 -0
  110. package/dist/cjs/context-JUEgi5-6.js +1 -0
  111. package/dist/cjs/copy-BiZ7dtqy.js +1 -0
  112. package/dist/cjs/ethers-uj8IknV_.js +1 -0
  113. package/dist/cjs/events-context-Di6--rDg.js +1 -0
  114. package/dist/cjs/extended-chains.js +1 -1
  115. package/dist/cjs/farcaster-CWHXGAib.js +1 -0
  116. package/dist/cjs/farcaster.js +1 -1
  117. package/dist/cjs/formatErc20TokenAmount-DxwoWe7e.js +1 -0
  118. package/dist/cjs/frame-bPqBJ8fS.js +1 -0
  119. package/dist/cjs/get-is-unified-wallet-DmiciSes.js +1 -0
  120. package/dist/cjs/getChainName-C4rO8-3n.js +1 -0
  121. package/dist/cjs/getErc20Balance-BZ5-OGfD.js +1 -0
  122. package/dist/cjs/getErc20TokenInfo-HX7DgcWx.js +1 -0
  123. package/dist/cjs/getFormattedUsdFromLamports-Mu2fqwL2.js +1 -0
  124. package/dist/cjs/getPublicClient-EjAv8R2z.js +1 -0
  125. package/dist/cjs/getUsdcMintAddress-REYZSOb9.js +1 -0
  126. package/dist/cjs/index-BNNk54gK.js +1 -0
  127. package/dist/cjs/index-CRFXS9pP.js +1 -0
  128. package/dist/cjs/index-Cuv6j_Y0.js +1 -0
  129. package/dist/cjs/index-DvDeCr_m.js +5 -0
  130. package/dist/cjs/index.js +1 -6
  131. package/dist/cjs/internal-context-VDPFkIXN.js +1 -0
  132. package/dist/cjs/internal.js +1 -1
  133. package/dist/cjs/paths-DizMb-lU.js +1 -0
  134. package/dist/cjs/prepareFundingModalData-BVlyr8l5.js +1 -0
  135. package/dist/cjs/reservoir-3I-Vkf2B.js +1 -0
  136. package/dist/cjs/shared-BPGwTh8c.js +1 -0
  137. package/dist/cjs/shared-CT5ocsPG.js +1 -0
  138. package/dist/cjs/shouldProceedtoEmbeddedWalletCreationFlow-DcjqezwI.js +1 -0
  139. package/dist/cjs/smart-wallets-B7vHjGAW.js +1 -0
  140. package/dist/cjs/smart-wallets.js +1 -1
  141. package/dist/cjs/solana.js +1 -1
  142. package/dist/cjs/styles-Ca_DS00a.js +1 -0
  143. package/dist/cjs/styles-D4VeJNv1.js +1 -0
  144. package/dist/cjs/telegram-D3O0_F1a.js +1 -0
  145. package/dist/cjs/to-ui-error-a-xwbRKZ.js +1 -0
  146. package/dist/cjs/transaction-DjF5X-by.js +1 -0
  147. package/dist/cjs/transfer-Cit146vy.js +1 -0
  148. package/dist/cjs/twitch-BNvhZb2Y.js +1 -0
  149. package/dist/cjs/twitter-BVVRWkcG.js +1 -0
  150. package/dist/cjs/ui.js +2 -2
  151. package/dist/cjs/use-create-wallet-without-fallback-DSOJS4h0.js +1 -0
  152. package/dist/cjs/use-export-wallet-BRFTskbr.js +1 -0
  153. package/dist/cjs/{use-sign-with-user-signer-BtJVKMQr.js → use-sign-with-user-signer-On9f1Fag.js} +1 -1
  154. package/dist/cjs/useActiveWallet-DcxqWAsq.js +1 -0
  155. package/dist/cjs/useGetSolPrice-eOpcFeNE.js +1 -0
  156. package/dist/cjs/useGetTokenPrice-EcT0H5rf.js +1 -0
  157. package/dist/cjs/useI18n-hYSvbQCq.js +1 -0
  158. package/dist/cjs/usePrivy-CXPeoT5g.js +1 -0
  159. package/dist/cjs/useSolanaRpcClient-mfV88iJm.js +1 -0
  160. package/dist/cjs/useWalletBalance-CQAgfkRc.js +1 -0
  161. package/dist/cjs/useWallets-TxPVNWGS.js +1 -0
  162. package/dist/cjs/useWallets-h2xCj02C.js +1 -0
  163. package/dist/dts/{events-context-CCElA92Y.d.mts → events-context-CkFXl3uc.d.mts} +1 -1
  164. package/dist/dts/{events-context-CCElA92Y.d.ts → events-context-CkFXl3uc.d.ts} +1 -1
  165. package/dist/dts/extended-chains.d.mts +1 -1
  166. package/dist/dts/extended-chains.d.ts +1 -1
  167. package/dist/dts/farcaster.d.mts +1 -1
  168. package/dist/dts/farcaster.d.ts +1 -1
  169. package/dist/dts/index.d.mts +11 -9
  170. package/dist/dts/index.d.ts +11 -9
  171. package/dist/dts/internal.d.mts +1 -1
  172. package/dist/dts/internal.d.ts +1 -1
  173. package/dist/dts/smart-wallets.d.mts +1 -1
  174. package/dist/dts/smart-wallets.d.ts +1 -1
  175. package/dist/dts/solana.d.mts +3 -3
  176. package/dist/dts/solana.d.ts +3 -3
  177. package/dist/dts/ui.d.mts +1 -1
  178. package/dist/dts/ui.d.ts +1 -1
  179. package/dist/esm/AccountNotFoundScreen-CmhSsknC.mjs +1 -0
  180. package/dist/esm/Address-DtXA0OPS.mjs +1 -0
  181. package/dist/esm/AffirmativeConsentScreen-C6AcYU94.mjs +1 -0
  182. package/dist/esm/AllowlistRejectionScreen-BuH5iBJ3.mjs +1 -0
  183. package/dist/esm/AuthenticateWithWalletScreen-CKJqrLEm.mjs +1 -0
  184. package/dist/esm/AwaitingEvmToSolBridgingScreen-DuO5iRV2.mjs +2 -0
  185. package/dist/esm/AwaitingExternalEthereumTransferScreen-C50_Dj-N.mjs +2 -0
  186. package/dist/esm/AwaitingPasswordlessCodeScreen-Bb0UxW46.mjs +1 -0
  187. package/dist/esm/AwaitingSolToEvmBridgingScreen-YsM6M4T9.mjs +2 -0
  188. package/dist/esm/BridgeNetworkSelectionView-Bu0vi9_a.mjs +1 -0
  189. package/dist/esm/Button-DJ-mtuuD.mjs +2 -0
  190. package/dist/esm/CaptchaScreen-CWQAXaCK.mjs +1 -0
  191. package/dist/esm/Checkbox-NmGCZeKL.mjs +1 -0
  192. package/dist/esm/Chip-Bsgj4Yc-.mjs +1 -0
  193. package/dist/esm/CoinbaseOnrampStatusScreen-NdySyA5D.mjs +1 -0
  194. package/dist/esm/Column-DQ5Vw9t1.mjs +1 -0
  195. package/dist/esm/ConnectEmailForm-DUgOCS2V.mjs +1 -0
  196. package/dist/esm/ConnectLedgerScreen-3wp1wuP2.mjs +1 -0
  197. package/dist/esm/ConnectOnlyLandingScreen-BVkcUaO6.mjs +1 -0
  198. package/dist/esm/ConnectOnlyStatusScreen-CyT_IEgy.mjs +1 -0
  199. package/dist/esm/ConnectOrCreateScreen-BlIxCxVJ.mjs +1 -0
  200. package/dist/esm/ConnectPhoneForm-CbuSfwAI.mjs +1 -0
  201. package/dist/esm/ConnectWalletView-DVDOSzi0.mjs +1 -0
  202. package/dist/esm/ConnectionStatusScreen-DNdZyKcL.mjs +1 -0
  203. package/dist/esm/CopyToClipboard-DatKc59_.mjs +1 -0
  204. package/dist/esm/CrossAppAuthScreen-DEF_slEx.mjs +1 -0
  205. package/dist/esm/CustomLandingScreenView-DWt9lv8W.mjs +2 -0
  206. package/dist/esm/DelegatedActionsConsentScreen-DqeBCJkz.mjs +1 -0
  207. package/dist/esm/DelegatedActionsRevokeScreen-B-xLCB1j.mjs +1 -0
  208. package/dist/esm/EmailInputForm-B4hjCxRU.mjs +1 -0
  209. package/dist/esm/EmbeddedWalletConnectingScreen-BCg7qeI6.mjs +1 -0
  210. package/dist/esm/EmbeddedWalletCreatedScreen-jGepSDyo.mjs +1 -0
  211. package/dist/esm/EmbeddedWalletKeyExportScreen-DX22sVNh.mjs +2 -0
  212. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-hkifQ988.mjs +1 -0
  213. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-CezgHp88.mjs +1 -0
  214. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BFamfPb_.mjs +1 -0
  215. package/dist/esm/EnrollTotp-BzAm1Ya4.mjs +1 -0
  216. package/dist/esm/ErrorBanner-BdiArMwu.mjs +1 -0
  217. package/dist/esm/ErrorMessage-Cx8GKGhL.mjs +1 -0
  218. package/dist/esm/ErrorScreen-DFAo4S7A.mjs +1 -0
  219. package/dist/esm/FarcasterConnectStatusScreen-Ys1uAk-s.mjs +1 -0
  220. package/dist/esm/FarcasterSignerStatusScreen-DIfmv7Ft.mjs +1 -0
  221. package/dist/esm/FundSolWalletWithExternalSolanaWallet-CkEgl8wO.mjs +1 -0
  222. package/dist/esm/FundWalletMethodHeader-CbTaIDLQ.mjs +1 -0
  223. package/dist/esm/FundingEditAmountScreen-Cz4tmsMX.mjs +1 -0
  224. package/dist/esm/FundingMethodSelectionScreen-fBauGI0K.mjs +1 -0
  225. package/dist/esm/InAppBrowserLoginNotPossible-DBhsoAkw.mjs +1 -0
  226. package/dist/esm/InfoBanner-D6C6Bt8L.mjs +1 -0
  227. package/dist/esm/InjectedWalletIcon-DLcYOGDj.mjs +1 -0
  228. package/dist/esm/InstallWalletScreen-CEcl2LHj.mjs +1 -0
  229. package/dist/esm/JsonTree-Bvd2C29R.mjs +1 -0
  230. package/dist/esm/LabelXs-BOisBtqT.mjs +1 -0
  231. package/dist/esm/LandingScreen-BvRIrtFN.mjs +1 -0
  232. package/dist/esm/Layouts-Bmf8DxNP.mjs +1 -0
  233. package/dist/esm/Link-DwjLfHwW.mjs +1 -0
  234. package/dist/esm/LinkConflictScreen-Bg9QTrJX.mjs +1 -0
  235. package/dist/esm/LinkEmailScreen-SlCMvM43.mjs +1 -0
  236. package/dist/esm/LinkPasskeyScreen-CNFL2N09.mjs +1 -0
  237. package/dist/esm/LinkPhoneScreen-DnPAvact.mjs +1 -0
  238. package/dist/esm/LoadingSkeleton-CHdaq3pb.mjs +1 -0
  239. package/dist/esm/LoginFailedScreen-CkxfR75o.mjs +1 -0
  240. package/dist/esm/ManualTransferScreen-px_MUbVh.mjs +1 -0
  241. package/dist/esm/MfaAuthEnrollmentFlowScreen-RbHifi_a.mjs +1 -0
  242. package/dist/esm/MfaAuthVerifyFlowScreen-B3SIiFnH.mjs +1 -0
  243. package/dist/esm/MfaEnrollmentFlowScreen-LgmZFVEZ.mjs +1 -0
  244. package/dist/esm/MfaVerifyFlowScreen-DZkVptvz.mjs +1 -0
  245. package/dist/esm/ModalHeader-D7WajfD8.mjs +3 -0
  246. package/dist/esm/MoonpayStatusScreen-CBc4DLDR.mjs +1 -0
  247. package/dist/esm/NetworkIcon-B48ilzF8.mjs +1 -0
  248. package/dist/esm/OAuthStatusScreen-DvD84FHd.mjs +1 -0
  249. package/dist/esm/OpenLink-BpeNYBKs.mjs +1 -0
  250. package/dist/esm/PasskeySelectSignupOrLogin-DZP4Hj5r.mjs +1 -0
  251. package/dist/esm/PasskeyStatusScreen-bP3yfXNt.mjs +1 -0
  252. package/dist/esm/PasswordRecoveryScreen-Bt_Cf8-l.mjs +1 -0
  253. package/dist/esm/PinInput-C3_MNxMt.mjs +1 -0
  254. package/dist/esm/QrCode-zzqjquVm.mjs +2 -0
  255. package/dist/esm/RecoveryOAuthStatusScreen-y6_gmb9s.mjs +1 -0
  256. package/dist/esm/RecoveryPasswordCreateScreen-CloUjFKm.mjs +1 -0
  257. package/dist/esm/RecoverySelectionScreen-FxCwz-PR.mjs +1 -0
  258. package/dist/esm/Row-CG0lSY5Z.mjs +1 -0
  259. package/dist/esm/Screen-dwi2CitY.mjs +8 -0
  260. package/dist/esm/ScreenHeader-Biz1wq02.mjs +2 -0
  261. package/dist/esm/ScreenLayout-Dmrhdwtt.mjs +1 -0
  262. package/dist/esm/SetAutomaticRecoveryScreen-Db5Xg_sQ.mjs +1 -0
  263. package/dist/esm/SetWalletPasswordForm-ZtRqoZYj.mjs +2 -0
  264. package/dist/esm/SignRequestScreen-DdAK4SlJ.mjs +1 -0
  265. package/dist/esm/StackedContainer-BrIQsdas.mjs +1 -0
  266. package/dist/esm/StandardSignAndSendTransactionScreen-C0IrbkCx.mjs +1 -0
  267. package/dist/esm/Subtitle-DkvfP2Ev.mjs +1 -0
  268. package/dist/esm/TelegramAuthScreen-vp2lrJFZ.mjs +1 -0
  269. package/dist/esm/Title-D0pfZff-.mjs +1 -0
  270. package/dist/esm/TodoList-Dn0Qu-vv.mjs +2 -0
  271. package/dist/esm/TransactionDetails-fgHkAnf9.mjs +3 -0
  272. package/dist/esm/TransactionErrorView-Dgp1KSy5.mjs +2 -0
  273. package/dist/esm/TransferFromWalletScreen-CTAGaF9C.mjs +1 -0
  274. package/dist/esm/TransferOrBridgeLoadingScreen-D3vBwM_o.mjs +1 -0
  275. package/dist/esm/UpdateEmailScreen-BBtChP9Q.mjs +1 -0
  276. package/dist/esm/UpdatePhoneScreen-Byn7UW7u.mjs +1 -0
  277. package/dist/esm/UserLimitReachedScreen-DXDqdBpt.mjs +1 -0
  278. package/dist/esm/Value-B4M62ove.mjs +1 -0
  279. package/dist/esm/WalletButtonList-CGloXTN0.mjs +1 -0
  280. package/dist/esm/WalletCards-DH1rqayz.mjs +1 -0
  281. package/dist/esm/WalletInfoCard-DAv0WFcc.mjs +1 -0
  282. package/dist/esm/WalletInterstitialScreen-CKiSWjpa.mjs +1 -0
  283. package/dist/esm/WalletLink-CjuEskpb.mjs +3 -0
  284. package/dist/esm/WarningBanner-BDp-QC9i.mjs +1 -0
  285. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  286. package/dist/esm/analytics-mkkvFRju.mjs +1 -0
  287. package/dist/esm/capitalizeFirstLetter-DmLYqXsO.mjs +1 -0
  288. package/dist/esm/{events-context-ClaboIDc.mjs → context-Cb5MFcME.mjs} +1 -1
  289. package/dist/esm/copy-Bx2Jwc5_.mjs +1 -0
  290. package/dist/esm/ethers-CpMSCMOg.mjs +1 -0
  291. package/dist/esm/events-context-CI0iqAXA.mjs +1 -0
  292. package/dist/esm/extended-chains.mjs +1 -1
  293. package/dist/esm/farcaster-DPlSjvF5.mjs +1 -0
  294. package/dist/esm/farcaster.mjs +1 -1
  295. package/dist/esm/formatErc20TokenAmount-BuPk9xcy.mjs +1 -0
  296. package/dist/esm/frame-BMa3kyjk.mjs +1 -0
  297. package/dist/esm/get-is-unified-wallet-DymQMSJy.mjs +1 -0
  298. package/dist/esm/getChainName-DjpPdUSc.mjs +1 -0
  299. package/dist/esm/getErc20Balance-Dtau1386.mjs +1 -0
  300. package/dist/esm/getErc20TokenInfo-CKA_MDcy.mjs +1 -0
  301. package/dist/esm/getFormattedUsdFromLamports-B6EqSEho.mjs +1 -0
  302. package/dist/esm/getPublicClient-IxRndou_.mjs +1 -0
  303. package/dist/esm/getUsdcMintAddress-DFI1hv05.mjs +1 -0
  304. package/dist/esm/index-B_e8abKi.mjs +1 -0
  305. package/dist/esm/index-CI666IP9.mjs +5 -0
  306. package/dist/esm/index-CJMgUOnw.mjs +1 -0
  307. package/dist/esm/index-DdlRJsoj.mjs +1 -0
  308. package/dist/esm/index.mjs +1 -5
  309. package/dist/esm/internal-context-Cvo1WmWN.mjs +1 -0
  310. package/dist/esm/internal.mjs +1 -1
  311. package/dist/esm/paths-3HW55qZg.mjs +1 -0
  312. package/dist/esm/prepareFundingModalData-BUyu5Vhr.mjs +1 -0
  313. package/dist/esm/reservoir-B0V48m2I.mjs +1 -0
  314. package/dist/esm/shared-CtYf3O54.mjs +1 -0
  315. package/dist/esm/shared-DsP7M4P5.mjs +1 -0
  316. package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs +1 -0
  317. package/dist/esm/smart-wallets-Cbhn7qlU.mjs +1 -0
  318. package/dist/esm/smart-wallets.mjs +1 -1
  319. package/dist/esm/solana.mjs +1 -1
  320. package/dist/esm/styles-BxA7nKxI.mjs +1 -0
  321. package/dist/esm/styles-DY17fuAX.mjs +1 -0
  322. package/dist/esm/telegram-B-JqnkqZ.mjs +1 -0
  323. package/dist/esm/to-ui-error-B3m2hl6e.mjs +1 -0
  324. package/dist/esm/transaction-CnfuREWo.mjs +1 -0
  325. package/dist/esm/transfer-CMPmjPsM.mjs +1 -0
  326. package/dist/esm/twitch-5IOe4sIQ.mjs +1 -0
  327. package/dist/esm/twitter-6jomarO4.mjs +1 -0
  328. package/dist/esm/ui.mjs +2 -2
  329. package/dist/esm/use-create-wallet-without-fallback-DodUf3VP.mjs +1 -0
  330. package/dist/esm/use-export-wallet-CWslDKqf.mjs +1 -0
  331. package/dist/esm/use-sign-with-user-signer-LJ6ROduD.mjs +1 -0
  332. package/dist/esm/useActiveWallet-hrZcON-K.mjs +1 -0
  333. package/dist/esm/useGetSolPrice-Bi0pPiUW.mjs +1 -0
  334. package/dist/esm/useGetTokenPrice-B4XVfxeD.mjs +1 -0
  335. package/dist/esm/useI18n-ByKvnaXP.mjs +1 -0
  336. package/dist/esm/usePrivy-D3OPY7tm.mjs +1 -0
  337. package/dist/esm/useSolanaRpcClient-DjD2ma5c.mjs +1 -0
  338. package/dist/esm/useWalletBalance-Xca4-c_r.mjs +1 -0
  339. package/dist/esm/useWallets-BplPx0Pz.mjs +1 -0
  340. package/dist/esm/useWallets-CQMJYOF9.mjs +1 -0
  341. package/package.json +15 -9
  342. package/dist/cjs/EmbeddedWalletConnectingScreen-JRafXI8d.js +0 -27
  343. package/dist/cjs/SignRequestScreen-Dy02euV9.js +0 -1
  344. package/dist/cjs/events-context-7-Gs8c_9.js +0 -1
  345. package/dist/cjs/frame-B2orQ_lK.js +0 -1
  346. package/dist/cjs/internal-context-CeWKmK5u.js +0 -1
  347. package/dist/cjs/smart-wallets-DaqaXBrW.js +0 -1
  348. package/dist/cjs/use-export-wallet-Cz8MVlvJ.js +0 -2
  349. package/dist/cjs/useActiveWallet-C5D3a-je.js +0 -1
  350. package/dist/cjs/usePrivy-BdYU4BZI.js +0 -1
  351. package/dist/esm/EmbeddedWalletConnectingScreen-D50stmJi.mjs +0 -25
  352. package/dist/esm/SignRequestScreen-D9o7VhNz.mjs +0 -1
  353. package/dist/esm/frame-Dj70FEYB.mjs +0 -1
  354. package/dist/esm/internal-context-eGSwROSk.mjs +0 -1
  355. package/dist/esm/smart-wallets-BXT3GZwg.mjs +0 -1
  356. package/dist/esm/use-export-wallet-DTiEdSYz.mjs +0 -1
  357. package/dist/esm/use-sign-with-user-signer-DaTvrd5T.mjs +0 -1
  358. package/dist/esm/useActiveWallet-B8DSbnuu.mjs +0 -1
  359. package/dist/esm/usePrivy-BCcRF869.mjs +0 -1
  360. package/dist/dts/{types-B6UNnZ2P.d.mts → types-BkkvIRg5.d.mts} +134 -134
  361. package/dist/dts/{types-B6UNnZ2P.d.ts → types-BkkvIRg5.d.ts} +134 -134
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{ExternalLink as o}from"lucide-react";import{u as e}from"./internal-context-Cvo1WmWN.mjs";import{S as r}from"./ScreenLayout-Dmrhdwtt.mjs";import"ofetch";import"react";import"./Button-DJ-mtuuD.mjs";import"styled-components";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./get-is-unified-wallet-DymQMSJy.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const i=({onClose:e})=>/*#__PURE__*/t(r,{title:"Could not log in with provider",subtitle:"It looks like you're using an in-app browser. To log in, please try again using an external browser.",icon:o,primaryCta:{label:"Close",onClick:e},watermark:!0}),m={component:()=>{let{closePrivyModal:o}=e();/*#__PURE__*/return t(i,{onClose:()=>o()})}};export{m as InAppBrowserLoginNotPossible,i as InAppBrowserLoginNotPossibleView,m as default};
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/InformationCircleIcon";import{styled as t}from"styled-components";const i=({children:t,theme:i})=>/*#__PURE__*/e(n,{$theme:i,children:[/*#__PURE__*/o(r,{width:"20px",height:"20px",color:"var(--privy-color-icon-subtle)",strokeWidth:2,style:{flexShrink:0}}),/*#__PURE__*/o(d,{$theme:i,children:t})]});let n=/*#__PURE__*/t.div.withConfig({displayName:"Container",componentId:"sc-1b5ed8dd-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-background-2);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),d=/*#__PURE__*/t.div.withConfig({displayName:"Content",componentId:"sc-1b5ed8dd-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],(e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"));export{i as I};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/WalletIcon";const i=({icon:i,name:o})=>"string"==typeof i?/*#__PURE__*/t("img",{alt:`${o||"wallet"} logo`,src:i,style:{height:24,width:24,borderRadius:4}}):void 0===i?/*#__PURE__*/t(e,{style:{height:24,width:24}}):i?/*#__PURE__*/t(i,{style:{height:24,width:24}}):null;export{i as I};
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import{L as r}from"./Link-DwjLfHwW.mjs";import{T as i,a}from"./TodoList-Dn0Qu-vv.mjs";import{a as l}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as n}from"./ScreenLayout-Dmrhdwtt.mjs";import"styled-components";import"lucide-react";import"react";import"viem";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"./Button-DJ-mtuuD.mjs";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const s=({walletName:l,installLink:s,title:m,subtitle:c="Follow the instructions below to get started.",onReload:p,onBack:d})=>{let u=m||`Create a ${l} wallet`.replace(/wallet wallet/gi,"wallet");/*#__PURE__*/return t(n,{title:u,subtitle:c,onBack:d,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:p},helpText:/*#__PURE__*/e(o,{children:[/*#__PURE__*/t("span",{children:"Still not sure? "}),/*#__PURE__*/t(r,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:/*#__PURE__*/e(i,{children:[/*#__PURE__*/t(a,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/t("span",{children:"Install the "})," ",/*#__PURE__*/e(r,{href:s,target:"_blank",children:[l," browser extension"]})]})}),/*#__PURE__*/t(a,{children:"Set up your first wallet"}),/*#__PURE__*/t(a,{children:"Store your recovery phrase in a safe place!"})]})})},m={component:()=>{let{navigateBack:e,data:o}=l();if(!o?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:r}=o.installWalletModalData;/*#__PURE__*/return t(s,{walletName:r.name,installLink:r.installLink,onReload:()=>{window.location.reload()},onBack:e})}};export{m as InstallWalletScreen,s as InstallWalletScreenView,m as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{styled as t}from"styled-components";let o=({data:t})=>{let o=t=>"object"==typeof t&&null!==t?/*#__PURE__*/e(a,{children:Object.entries(t).map((([e,t])=>/*#__PURE__*/r("li",{children:[/*#__PURE__*/r("strong",{children:[e,":"]})," ",o(t)]},e)))}):/*#__PURE__*/e("span",{children:String(t)});/*#__PURE__*/return e("div",{children:o(t)})};const i=/*#__PURE__*/t.div.withConfig({displayName:"Message",componentId:"sc-70ec2a4f-0"})(["margin-top:1.5rem;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);padding:12px;text-align:left;max-height:310px;overflow:scroll;white-space:pre-wrap;width:100%;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground);line-height:1.5;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);let a=/*#__PURE__*/t.ul.withConfig({displayName:"MessageList",componentId:"sc-70ec2a4f-1"})(["margin-left:12px !important;white-space:nowrap;&:first-child{margin-left:0 !important;}strong{font-weight:500 !important;}"]);const n=({data:r,className:t})=>/*#__PURE__*/e(i,{className:t,children:/*#__PURE__*/e(o,{data:r})});export{n as D,i as M};
@@ -0,0 +1 @@
1
+ import{styled as o}from"styled-components";const e=/*#__PURE__*/o.span.withConfig({displayName:"LabelXs",componentId:"sc-4c43f9fd-0"})(["color:var(--privy-color-foreground-3);font-size:0.75rem;font-weight:500;line-height:1.125rem;"]);export{e as L};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-Cb5MFcME.mjs";import{C as r,L as i}from"./CustomLandingScreenView-DWt9lv8W.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"./get-is-unified-wallet-DymQMSJy.mjs";import"viem";import"./index-CI666IP9.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"lucide-react";import"./ConnectEmailForm-DUgOCS2V.mjs";import"./Button-DJ-mtuuD.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./farcaster-DPlSjvF5.mjs";import"./ConnectWalletView-DVDOSzi0.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./QrCode-zzqjquVm.mjs";import"qrcode";import"./useI18n-ByKvnaXP.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./Link-DwjLfHwW.mjs";import"./ConnectPhoneForm-CbuSfwAI.mjs";import"./twitter-6jomarO4.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletButtonList-CGloXTN0.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./ScreenLayout-Dmrhdwtt.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!1}):/*#__PURE__*/t(i,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0};export{e as LandingScreen,e as default};
@@ -0,0 +1 @@
1
+ import{styled as e}from"styled-components";const i=/*#__PURE__*/e.div.withConfig({displayName:"BottomPusherContainer",componentId:"sc-cb963810-0"})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;margin-top:auto;gap:16px;flex-grow:100;"]),t=/*#__PURE__*/e.div.withConfig({displayName:"CenteredItem",componentId:"sc-cb963810-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;width:100%;"]),o=/*#__PURE__*/e.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),n=/*#__PURE__*/e(t).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),a=/*#__PURE__*/e(t).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),d=/*#__PURE__*/e.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),c=/*#__PURE__*/e.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),p=/*#__PURE__*/e.div.withConfig({displayName:"StyledCalloutSection",componentId:"sc-cb963810-8"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;padding:16px;margin-top:16px;margin-bottom:16px;width:100%;background:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);&& h4{color:var(--privy-color-foreground-3);font-size:14px;text-decoration:underline;font-weight:medium;}&& p{color:var(--privy-color-foreground-3);font-size:14px;}"]),r=/*#__PURE__*/e.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),l=/*#__PURE__*/e.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"})(["height:12px;"]),s=/*#__PURE__*/e.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],(e=>e.height??"12"));export{i as B,n as C,d as F,o as H,l as R,p as S,c as a,r as b,a as c,s as d,t as e};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{styled as e}from"styled-components";let o=/*#__PURE__*/e.a.withConfig({displayName:"StyledLink",componentId:"sc-c8577138-0"})(["&&{color:",";font-weight:400;text-decoration:",";text-underline-offset:4px;text-decoration-thickness:1px;cursor:",";opacity:",";font-size:",";line-height:",";transition:color 200ms ease,text-decoration-color 200ms ease,opacity 200ms ease;&:hover{color:",";text-decoration:",";text-underline-offset:4px;}&:active{color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;border-radius:2px;}}"],(({$variant:r})=>"underlined"===r?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"),(({$variant:r})=>"underlined"===r?"underline":"var(--privy-link-navigation-decoration, none)"),(({$disabled:r})=>r?"not-allowed":"pointer"),(({$disabled:r})=>r?.5:1),(({$size:r})=>{switch(r){case"xs":return"12px";case"sm":return"14px";default:return"16px"}}),(({$size:r})=>{switch(r){case"xs":return"18px";case"sm":return"22px";default:return"24px"}}),(({$variant:r,$disabled:e})=>"underlined"===r?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"),(({$disabled:r})=>r?"none":"underline"),(({$variant:r,$disabled:e})=>e?"underlined"===r?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))":"var(--privy-color-foreground)"));const n=({size:e="md",variant:n="navigation",disabled:i=!1,as:a,children:t,onClick:d,...l})=>/*#__PURE__*/r(o,{as:a,$size:e,$variant:n,$disabled:i,onClick:r=>{i?r.preventDefault():d?.(r)},...l,children:t});export{n as L};
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import n from"@heroicons/react/24/outline/WalletIcon";import{useState as i}from"react";import{P as a,S as c}from"./Button-DJ-mtuuD.mjs";import{styled as s}from"styled-components";import{M as l,B as d}from"./ModalHeader-D7WajfD8.mjs";import{e as p}from"./StackedContainer-BrIQsdas.mjs";import{A as u}from"./Address-DtXA0OPS.mjs";import{u as m}from"./internal-context-Cvo1WmWN.mjs";import{a as h}from"./get-is-unified-wallet-DymQMSJy.mjs";import{e as f}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{u as g}from"./context-Cb5MFcME.mjs";import y from"@heroicons/react/24/outline/ExclamationCircleIcon";import x from"@heroicons/react/24/outline/Square2StackIcon";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"lucide-react";import"ofetch";import"tinycolor2";const b=/*#__PURE__*/s.span.withConfig({displayName:"CircleBorder",componentId:"sc-9056b8b8-0"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;border-bottom-color:",";}"],(e=>e.color??"var(--privy-color-accent)"),(e=>e.color??"var(--privy-color-accent)"));function w(o){/*#__PURE__*/return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...o,children:[/*#__PURE__*/r("circle",{cx:"12",cy:"12",r:"10"}),/*#__PURE__*/r("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),/*#__PURE__*/r("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}const v=({onTransfer:e,isTransferring:o,transferSuccess:t})=>/*#__PURE__*/r(a,{...t?{success:!0,children:"Success!"}:{warn:!0,loading:o,onClick:e,children:"Transfer and delete account"}}),C=/*#__PURE__*/s.div.withConfig({displayName:"ConnectContainer",componentId:"sc-3505eb4c-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;padding-bottom:16px;"]),T=/*#__PURE__*/s.div.withConfig({displayName:"GappedContainer",componentId:"sc-3505eb4c-1"})(["display:flex;flex-direction:column;&& p{font-size:14px;}width:100%;gap:16px;"]),k=/*#__PURE__*/s.div.withConfig({displayName:"DisclosedAccountContainer",componentId:"sc-3505eb4c-2"})(["display:flex;cursor:pointer;align-items:center;width:100%;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);padding:8px 10px;font-size:14px;font-weight:500;gap:8px;"]),I=/*#__PURE__*/s(y).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-3505eb4c-3"})(["position:relative;width:",";height:",";color:var(--privy-color-foreground-3);margin-left:auto;"],(({$iconSize:e})=>`${e}px`),(({$iconSize:e})=>`${e}px`)),A=/*#__PURE__*/s(x).withConfig({displayName:"StyledCopyIcon",componentId:"sc-3505eb4c-4"})(["position:relative;width:15px;height:15px;color:var(--privy-color-foreground-3);margin-left:auto;"]),S=/*#__PURE__*/s.ol.withConfig({displayName:"ListContainer",componentId:"sc-3505eb4c-5"})(["display:flex;flex-direction:column;font-size:14px;width:100%;text-align:left;"]),j=/*#__PURE__*/s.li.withConfig({displayName:"ListItem",componentId:"sc-3505eb4c-6"})(["font-size:14px;list-style-type:auto;list-style-position:outside;margin-left:1rem;margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]),W=/*#__PURE__*/s.div.withConfig({displayName:"CircleContainer",componentId:"sc-3505eb4c-7"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]);let M=()=>/*#__PURE__*/r(W,{children:/*#__PURE__*/r(I,{$iconSize:60})});const N=({address:t,onClose:i,onRetry:a,onTransfer:c,isTransferring:s,transferSuccess:p})=>{let{defaultChain:m}=g(),h=m.blockExplorers?.default.url??"https://etherscan.io";/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(l,{onClose:i,backFn:a}),/*#__PURE__*/e(C,{children:[/*#__PURE__*/r(M,{}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r("h3",{children:"Check account assets before transferring"}),/*#__PURE__*/r("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),/*#__PURE__*/e(S,{children:[/*#__PURE__*/r("p",{children:" To check your balance, you can:"}),/*#__PURE__*/r(j,{children:"Log out and log back into the other account, or "}),/*#__PURE__*/e(j,{children:["Copy your wallet address and use a"," ",/*#__PURE__*/r("u",{children:/*#__PURE__*/r("a",{target:"_blank",href:h,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),/*#__PURE__*/e(k,{onClick:()=>navigator.clipboard.writeText(t).catch(console.error),children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(u,{address:t,showCopyIcon:!1}),/*#__PURE__*/r(A,{})]}),/*#__PURE__*/r(v,{onTransfer:c,isTransferring:s,transferSuccess:p})]})]}),/*#__PURE__*/r(d,{})]})},z={component:()=>{let{initiateAccountTransfer:e,closePrivyModal:o}=m(),{data:t,navigate:n,lastScreen:a,setModalData:c}=h(),[s,l]=i(void 0),[d,p]=i(!1),[u,f]=i(!1),g=async()=>{try{if(!t?.accountTransfer?.nonce||!t?.accountTransfer?.account)throw Error("missing account transfer inputs");f(!0),await e({nonce:t?.accountTransfer?.nonce,account:t?.accountTransfer?.account,accountType:t?.accountTransfer?.linkMethod,externalWalletMetadata:t?.accountTransfer?.externalWalletMetadata,telegramWebAppData:t?.accountTransfer?.telegramWebAppData,telegramAuthResult:t?.accountTransfer?.telegramAuthResult,farcasterEmbeddedAddress:t?.accountTransfer?.farcasterEmbeddedAddress,oAuthUserInfo:t?.accountTransfer?.oAuthUserInfo}),p(!0),f(!1),setTimeout(o,1e3)}catch(e){c({errorModalData:{error:e,previousScreen:a||"LinkConflictScreen"}}),n("ErrorScreen",!0)}};return s?/*#__PURE__*/r(N,{address:s,onClose:o,onRetry:()=>l(void 0),onTransfer:g,isTransferring:u,transferSuccess:d}):/*#__PURE__*/r(E,{onClose:o,onInfo:()=>l(t?.accountTransfer?.embeddedWalletAddress),onContinue:()=>l(t?.accountTransfer?.embeddedWalletAddress),onTransfer:g,isTransferring:u,transferSuccess:d,data:t})}},E=({onClose:n,onContinue:i,onInfo:s,onTransfer:u,transferSuccess:m,isTransferring:h,data:g})=>{if(!g?.accountTransfer?.linkMethod||!g?.accountTransfer?.displayName)return;let y={method:g?.accountTransfer?.linkMethod,handle:g?.accountTransfer?.displayName,disclosedAccount:g?.accountTransfer?.embeddedWalletAddress?{type:"wallet",handle:g?.accountTransfer?.embeddedWalletAddress}:void 0};/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(l,{closeable:!0}),/*#__PURE__*/e(C,{children:[/*#__PURE__*/r(p,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/r(b,{color:"var(--privy-color-error)"}),/*#__PURE__*/r(t,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/e("h3",{children:[function(e){switch(e){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return`${f(e.replace("_oauth",""))} profile`;default:return e.startsWith("privy:")?"Cross-app account":e}}(y.method)," is associated with another account"]}),/*#__PURE__*/e("p",{children:["Do you want to transfer",/*#__PURE__*/r("b",{children:y.handle?` ${y.handle}`:""})," to this account instead? This will delete your other account."]}),/*#__PURE__*/r(L,{onClick:s,disclosedAccount:y.disclosedAccount})]}),/*#__PURE__*/e(T,{style:{gap:12,marginTop:12},children:[g?.accountTransfer?.embeddedWalletAddress?/*#__PURE__*/r(a,{onClick:i,children:"Continue"}):/*#__PURE__*/r(v,{onTransfer:u,transferSuccess:m,isTransferring:h}),/*#__PURE__*/r(c,{onClick:n,children:"No thanks"})]})]}),/*#__PURE__*/r(d,{})]})};function L({disclosedAccount:o,onClick:t}){return o?/*#__PURE__*/e(k,{onClick:t,children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(u,{address:o.handle,showCopyIcon:!1}),/*#__PURE__*/r(w,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}export{z as LinkConflictScreen,E as LinkConflictScreenView,z as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as r}from"./ConnectEmailForm-DUgOCS2V.mjs";import{B as i}from"./Layouts-Bmf8DxNP.mjs";import{u as e}from"./context-Cb5MFcME.mjs";import{S as m}from"./ScreenLayout-Dmrhdwtt.mjs";import"lucide-react";import"react";import"styled-components";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"./index-CI666IP9.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"./get-is-unified-wallet-DymQMSJy.mjs";import"viem";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-DJ-mtuuD.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"tinycolor2";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const p=({title:e="Connect your email",subtitle:p="Add your email to your account"})=>/*#__PURE__*/t(m,{title:e,subtitle:p,icon:o,watermark:!0,children:/*#__PURE__*/t(i,{children:/*#__PURE__*/t(r,{stacked:!0})})}),s={component:()=>{let o=e();/*#__PURE__*/return t(p,{subtitle:`Add your email to your ${o?.name} account`})}};export{s as LinkEmailScreen,p as LinkEmailScreenView,s as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as i,FingerprintIcon as o,Trash2 as n}from"lucide-react";import{useState as r,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as d}from"./useActiveWallet-hrZcON-K.mjs";import{T as l,a as p}from"./TodoList-Dn0Qu-vv.mjs";import{u as m,c as h,b as y}from"./internal-context-Cvo1WmWN.mjs";import{u}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as f}from"./ScreenLayout-Dmrhdwtt.mjs";import"zustand";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"ofetch";import"./Button-DJ-mtuuD.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const g=({passkeys:t,isLoading:n,errorReason:r,success:a,expanded:s,onLinkPasskey:c,onUnlinkPasskey:d,onExpand:l,onBack:p,onClose:m})=>/*#__PURE__*/e(f,a?{title:"Passkeys updated",icon:i,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}:s?{icon:o,title:"Your passkeys",onBack:p,onClose:m,watermark:!0,children:/*#__PURE__*/e(v,{passkeys:t,expanded:s,onUnlink:d,onExpand:l})}:{icon:o,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:c,loading:n},onClose:m,watermark:!0,helpText:r||void 0,children:0===t.length?/*#__PURE__*/e(x,{}):/*#__PURE__*/e(k,{children:/*#__PURE__*/e(v,{passkeys:t,expanded:s,onUnlink:d,onExpand:l})})});let k=/*#__PURE__*/s.div.withConfig({displayName:"ContentContainer",componentId:"sc-a752cbd1-0"})(["margin-bottom:12px;"]),v=({passkeys:i,expanded:o,onUnlink:a,onExpand:s})=>{let[c,l]=r([]),p=o?i.length:2;/*#__PURE__*/return t("div",{children:[/*#__PURE__*/e(N,{children:"Your passkeys"}),/*#__PURE__*/t(j,{children:[i.slice(0,p).map((i=>{/*#__PURE__*/return t(A,{children:[/*#__PURE__*/t("div",{children:[/*#__PURE__*/e(P,{children:(o=i,o.authenticatorName?o.createdWithBrowser?`${o.authenticatorName} on ${o.createdWithBrowser}`:o.authenticatorName:o.createdWithBrowser?o.createdWithOs?`${o.createdWithBrowser} on ${o.createdWithOs}`:`${o.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/t(L,{children:["Last used:"," ",(i.latestVerifiedAt??i.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e(W,{disabled:c.includes(i.credentialId),onClick:()=>(async e=>{l((t=>t.concat([e]))),await a(e),l((t=>t.filter((t=>t!==e))))})(i.credentialId),children:c.includes(i.credentialId)?/*#__PURE__*/e(d,{}):/*#__PURE__*/e(n,{size:16})})]},i.credentialId);var o})),i.length>2&&!o&&/*#__PURE__*/e(I,{onClick:s,children:"View all"})]})]})},x=()=>/*#__PURE__*/t(l,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e(p,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e(p,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e(p,{children:"Use your passkey to verify transactions and login to your account"})]});const w={component:()=>{let{user:t,unlinkPasskey:i}=u(),{linkWithPasskey:o,closePrivyModal:n}=m(),s=t?.linkedAccounts.filter((e=>"passkey"===e.type)),[c,d]=r(!1),[l,p]=r(""),[f,k]=r(!1),[v,x]=r(!1);return a((()=>{0===s.length&&x(!1)}),[s.length]),/*#__PURE__*/e(g,{passkeys:s,isLoading:c,errorReason:l,success:f,expanded:v,onLinkPasskey:()=>{d(!0),o().then((()=>k(!0))).catch((e=>{if(e instanceof h){if(e.privyErrorCode===y.CANNOT_LINK_MORE_OF_TYPE)return void p("Cannot link more passkeys to account.");if(e.privyErrorCode===y.PASSKEY_NOT_ALLOWED)return void p("Passkey request timed out or rejected by user.")}p("Unknown error occurred.")})).finally((()=>{d(!1)}))},onUnlinkPasskey:async e=>(d(!0),await i(e).then((()=>k(!0))).catch((e=>{e instanceof h&&e.privyErrorCode===y.MISSING_MFA_CREDENTIALS?p("Cannot unlink a passkey enrolled in MFA"):p("Unknown error occurred.")})).finally((()=>{d(!1)}))),onExpand:()=>x(!0),onBack:()=>x(!1),onClose:()=>n()})}},b=/*#__PURE__*/s.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 C=/*#__PURE__*/c(["&&{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 I=/*#__PURE__*/s.button.withConfig({displayName:"LinkButton",componentId:"sc-a752cbd1-2"})(["",""],C);let j=/*#__PURE__*/s.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%;"]),N=/*#__PURE__*/s.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%;"]),P=/*#__PURE__*/s.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;"]),L=/*#__PURE__*/s.div.withConfig({displayName:"PasskeyItemSubtitle",componentId:"sc-a752cbd1-6"})(["font-size:0.875rem;line-height:1rem;color:#64668b;padding:0.2em 0;"]),A=/*#__PURE__*/s.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;"]),E=/*#__PURE__*/c([":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);}"]),W=/*#__PURE__*/s.button.withConfig({displayName:"PasskeyItemUnlinkButton",componentId:"sc-a752cbd1-8"})(["",""],E);export{b as DoubleIconWrapper,I as LinkButton,w as LinkPasskeyScreen,g as LinkPasskeyView,w as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-CbuSfwAI.mjs";import{u as i}from"./context-Cb5MFcME.mjs";import{u as n}from"./internal-context-Cvo1WmWN.mjs";import{a as m}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as a}from"./ScreenLayout-Dmrhdwtt.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Button-DJ-mtuuD.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"tinycolor2";import"ofetch";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const s=({title:i="Connect your phone",subtitle:n="Add your number to your account",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null),l=async()=>{c?.qualifiedPhoneNumber&&await m(c)};/*#__PURE__*/return t(a,{title:i,subtitle:n,icon:e,primaryCta:{label:s?"Submitting":"Submit",onClick:l,disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/t(r,{onChange:t=>{u(t)},onSubmit:l,noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:e,data:r,navigate:a,setModalData:c}=m(),u=i(),{initLoginWithSms:l}=n(),[p,d]=o(!1);/*#__PURE__*/return t(s,{subtitle:`Add your number to your ${u?.name} account`,onSubmit:async t=>{d(!0);try{await l({phoneNumber:t.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(t){c({errorModalData:{error:t,previousScreen:r?.errorModalData?.previousScreen||e||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:p})}};export{c as LinkPhoneScreen,s as LinkPhoneScreenView,c as default};
@@ -0,0 +1 @@
1
+ import{css as r,keyframes as o}from"styled-components";let i=/*#__PURE__*/o(["from,to{background:var(--privy-color-foreground-4);color:var(--privy-color-foreground-4);}50%{background:var(--privy-color-foreground-accent);color:var(--privy-color-foreground-accent);}"]);const n=/*#__PURE__*/r(["",""],(o=>o.$isLoading?/*#__PURE__*/r(["width:35%;animation:"," 2s linear infinite;border-radius:var(--privy-border-radius-sm);"],i):""));export{n as L};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{XCircle as e}from"lucide-react";import{u as o}from"./internal-context-Cvo1WmWN.mjs";import{a as r}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as i}from"./ScreenLayout-Dmrhdwtt.mjs";import"ofetch";import"react";import"viem";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./Button-DJ-mtuuD.mjs";import"styled-components";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const n=({title:o="Could not connect with wallet",subtitle:r="Please check that Phantom multichain is enabled and try again.",primaryCtaText:n="Try again",secondaryCtaText:a="Cancel",onTryAgain:m,onCancel:c})=>/*#__PURE__*/t(i,{title:o,subtitle:r,icon:e,iconVariant:"error",primaryCta:{label:n,onClick:m},secondaryCta:{label:a,onClick:c},watermark:!0}),a={component:()=>{let{closePrivyModal:e}=o(),{navigate:i}=r();/*#__PURE__*/return t(n,{onTryAgain:()=>{i("LandingScreen")},onCancel:async()=>{await e()}})}};export{a as LoginFailedScreen,n as LoginFailedScreenView,a as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useMemo as a}from"react";import{formatUnits as s}from"viem";import{formatTokenAmount as n,formatWeiAmount as m}from"@privy-io/js-sdk-core";import{P as c}from"./Button-DJ-mtuuD.mjs";import{F as d}from"./Layouts-Bmf8DxNP.mjs";import{B as l}from"./ModalHeader-D7WajfD8.mjs";import{Q as p}from"./QrCode-zzqjquVm.mjs";import{t as u}from"./FundWalletMethodHeader-CbTaIDLQ.mjs";import{I as f}from"./InfoBanner-D6C6Bt8L.mjs";import{S as h}from"./Subtitle-DkvfP2Ev.mjs";import{T as g}from"./Title-D0pfZff-.mjs";import{W as v}from"./WalletInfoCard-DAv0WFcc.mjs";import{u as j}from"./context-Cb5MFcME.mjs";import{v as y,D as C}from"./useActiveWallet-hrZcON-K.mjs";import{u as S}from"./internal-context-Cvo1WmWN.mjs";import{a as I}from"./get-is-unified-wallet-DymQMSJy.mjs";import{u as b}from"./useWalletBalance-Xca4-c_r.mjs";import{u as T}from"./useWallets-BplPx0Pz.mjs";import{O as w}from"./analytics-mkkvFRju.mjs";import{z as A,A as k}from"./index-CI666IP9.mjs";import{g as D}from"./getChainName-DjpPdUSc.mjs";import{g as F}from"./getUsdcMintAddress-DFI1hv05.mjs";import{g as M}from"./transaction-CnfuREWo.mjs";import{g as B}from"./getErc20Balance-Dtau1386.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"qrcode";import"@heroicons/react/24/outline/InformationCircleIcon";import"lucide-react";import"./ErrorMessage-Cx8GKGhL.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Address-DtXA0OPS.mjs";import"./shared-CtYf3O54.mjs";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";const U={component:()=>{let{wallets:k}=T(),{connectors:U}=S(),x=U.filter(y).flatMap((e=>e.wallets)),{data:E,setModalData:L,navigate:W,lastScreen:O}=I(),{rpcConfig:P,appId:Q,createAnalyticsEvent:z,closePrivyModal:H}=S(),N=j(),[R,q]=o(void 0),[X,Y]=o(!1),G=E?.funding,{reloadBalance:J}=b({rpcConfig:P,appId:Q,address:"ethereum"===G.chainType?G.address:void 0,chain:"ethereum"===G.chainType?G.chain:void 0}),K="solana"===G.chainType,V=K?G.isUSDC?"USDC":"SOL":G.erc20Address?G.erc20ContractInfo?.symbol:G.chain.nativeCurrency.symbol,Z=K?x.find((({address:e})=>e===G.address)):k.find((({address:e})=>C(e)===C(G.address)));if(!G)return L({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:O||"FundingMethodSelectionScreen"},funding:E?.funding,solanaFundingData:E?.solanaFundingData,sendTransaction:E?.sendTransaction}),W("ErrorScreen"),/*#__PURE__*/e(r,{});i((()=>{let e=K?async function(){if("solana"!==G.chainType)return;let e=N.solanaRpcs[G.chain];e?(G.isUSDC?async function({rpc:e,address:r,mintAddress:t}){let o=await e.getTokenAccountsByOwner(r,{mint:t},{encoding:"jsonParsed",commitment:"confirmed"}).send(),i=o.value[0]?.account;return i?BigInt(i.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:G.address,mintAddress:F(G.chain)}):A({rpc:e.rpc,address:G.address})).then((e=>{let r=BigInt(e);R&&r>R&&(Y(!0),z({eventName:w,payload:{provider:"manual",status:"success",chainType:"solana",address:Z?.address,value:G.isUSDC?s(r-R,6):s(r-R,9),token:G.isUSDC?"USDC":"SOL"}})),q(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===G.chainType&&(async()=>{if(!G.erc20Address)return await J()??BigInt(0);{let{balance:e}=await B({chain:G.chain,address:G.address,erc20Address:G.erc20Address,rpcConfig:P,appId:Q});return e}})().then((e=>{R&&e>R&&(Y(!0),z({eventName:w,payload:{provider:"manual",status:"success",chainType:"ethereum",address:Z?.address,chainId:G.chain.id,value:s(e-R,G.erc20ContractInfo?.decimals??18),token:G.erc20ContractInfo?.symbol??G.erc20Address??"ETH"}})),q(e)})).catch((()=>q(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[R]);let _=a((()=>null==R?"":G.isUSDC?n({amount:R,decimals:6}):K?M(R,3,!0,!0):null!=G.erc20ContractInfo?.decimals?n({amount:R,decimals:G.erc20ContractInfo.decimals}):m({wei:R})),[R,K,G]),ee="ethereum"===G.chainType?G.chain.name:D(G.chain),re=a((()=>""===G.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e(g,{children:G.uiConfig?.receiveFundsTitle??`Receive ${G.amount} ${V??""}`.trim()})),[G.uiConfig?.receiveFundsTitle,G.amount,V]),te=a((()=>""===G.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e(h,{children:G.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${ee}.`})),[G.uiConfig?.receiveFundsSubtitle,ee]),oe="solana"===G.chainType&&G.isUSDC&&F(G.chain)?`?spl-token=${F(G.chain)}`:"";/*#__PURE__*/return t(r,{children:[/*#__PURE__*/e(u,{}),re,te,/*#__PURE__*/t(d,{style:{gap:"1rem",margin:re||te?"1rem 0":"0"},children:[/*#__PURE__*/e(p,{url:`${G.chainType}:${G.address}${oe}`,size:200,squareLogoElement:$}),/*#__PURE__*/t(f,{theme:N.appearance.palette.colorScheme,children:["Make sure to send funds on ",ee,"."]}),/*#__PURE__*/e(v,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${_} ${V}`,address:G.address}),X&&/*#__PURE__*/e(c,{onClick:()=>H({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e(l,{})]})}};let $=({...r})=>/*#__PURE__*/e(k,{color:"black",...r});export{U as ManualTransferScreen,U as default};
@@ -0,0 +1 @@
1
+ import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import i from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as n}from"react";import{P as a}from"./Button-DJ-mtuuD.mjs";import{L as s}from"./useActiveWallet-hrZcON-K.mjs";import{M as m,a as l}from"./ModalHeader-D7WajfD8.mjs";import{u as c}from"./context-Cb5MFcME.mjs";import{u as p,a as u}from"./get-is-unified-wallet-DymQMSJy.mjs";import{M as d,E as h,a as y,b as f}from"./EnrollTotp-BzAm1Ya4.mjs";import{A as v,C as j,I as k,T as g,S as C,B as M}from"./PinInput-C3_MNxMt.mjs";import"styled-components";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/PhoneIcon";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./ErrorScreen-DFAo4S7A.mjs";import"lucide-react";import"./index-CI666IP9.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-B0V48m2I.mjs";import"./ScreenLayout-Dmrhdwtt.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"./LinkPasskeyScreen-CNFL2N09.mjs";import"./TodoList-Dn0Qu-vv.mjs";import"./CopyToClipboard-DatKc59_.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-Bmf8DxNP.mjs";import"./Column-DQ5Vw9t1.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-zzqjquVm.mjs";import"qrcode";const w={component:()=>{let{user:w,ready:b}=p(),{data:I,onUserCloseViaDialogOrKeybindRef:A}=u(),S=c(),[R,E]=n(null),[P,F]=n(null),[T,L]=n(null),[x,B]=n(!1),[W,U]=n(!1),[D,H]=n(),O=async()=>{D?Q(D):w?await $({user:w}):Q(Error("Must be logged in to manage MFA")),setTimeout((()=>{E(null),F(null)}),500)};if(A.current=O,!I?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:Q,onSuccess:$,onBack:z,mfaMethods:X,verify:q,generateTotpSecret:K,enrollTotp:N,unenrollTotp:V,enrollPasskey:Z}=I.mfaEnroll,_=w?.mfaMethods.includes("sms"),G=w?.mfaMethods.includes("totp"),J=w?.mfaMethods.includes("passkey"),Y=!!w?.phone,ee=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function oe(){E(null),F(null),H(void 0)}async function te(e=ee){try{H(void 0),U(!0);let o=await Z(e);return await $({user:o})}catch(e){H(e)}finally{U(!1),B(!1)}}if(!b||!w||!S)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{onClose:O,backFn:z},"header"),/*#__PURE__*/t(v,{children:/*#__PURE__*/t(d,{})}),/*#__PURE__*/t(j,{children:/*#__PURE__*/t(s,{})}),/*#__PURE__*/t(l,{})]});if("sms"===R)return null;if("totp"===R)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{backFn:oe,onClose:O},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e(C,{children:["MFA adds an extra layer of security to your ",S?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(a,{$warn:!0,onClick:async function(){try{H(void 0),U(!0);let e=await V();return await $({user:e})}catch(e){H(e)}finally{U(!1),E(null)}},loading:W,children:"Remove"})}),/*#__PURE__*/t(l,{})]});if("passkey"===R){let i=I.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{backFn:oe,onClose:O},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/t(C,{children:i?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(a,{$warn:!0,onClick:async function(){try{H(void 0),U(!0);let e=await Z([]);return await $({user:e})}catch(e){H(e)}finally{U(!1),E(null)}},loading:W,children:"Remove"})}),/*#__PURE__*/t(l,{})]})}return 0!==X.length||_||G||J?"sms"===P?null:"totp"===P&&T?/*#__PURE__*/t(h,{onClose:O,onReset:oe,submitEnrollmentWithTotp:e=>async function(e){try{H(void 0),U(!0);let o=await N(e);return await $({user:o})}catch(e){H(e)}finally{U(!1),E(null)}}(e.mfaCode),error:D,totpInfo:{...T,appName:S?.name||"Privy"}}):"passkey"===P?/*#__PURE__*/t(y,{onReset:oe,onClose:O,submitEnrollmentWithPasskey:te}):/*#__PURE__*/t(f,{showIntro:!0,userMfaMethods:w.mfaMethods,appMfaMethods:S.mfa.methods,userHasAuthSms:Y,backFn:z,handleSelectMethod:async function(e){H(void 0);try{await q()}catch(e){return void H(e)}return"totp"===e?(F(e),L(null),void K().then((({totpSecret:e,totpAuthUrl:o})=>{L({authUrl:o,secret:e})})).catch((()=>{L(null),oe()}))):"passkey"===e&&1===ee.length?await te():void F(e)},isTotpLoading:"totp"===P&&!T,isPasskeyLoading:x,error:D,onClose:O,setRemovingMfaMethod:async function(e){H(void 0);try{await q()}catch(e){return void H(e)}E(e)}}):/*#__PURE__*/e(o,{children:[/*#__PURE__*/t(m,{onClose:O,backFn:z},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(i,{})}),/*#__PURE__*/t(g,{children:"Add more security"}),/*#__PURE__*/e(C,{children:[S?.name," does not have any verification methods enabled."]}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(a,{onClick:O,children:"Close"})}),/*#__PURE__*/t(l,{})]})}};export{w as MfaAuthEnrollmentFlowScreen,w as default};
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as e,useRef as r}from"react";import{u as i,a as s}from"./get-is-unified-wallet-DymQMSJy.mjs";import{V as m,a as n,b as a,t as c}from"./to-ui-error-B3m2hl6e.mjs";import"viem";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-D7WajfD8.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-Dmrhdwtt.mjs";import"./Button-DJ-mtuuD.mjs";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"./PinInput-C3_MNxMt.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-BrIQsdas.mjs";import"./useGetTokenPrice-B4XVfxeD.mjs";import"./useGetSolPrice-Bi0pPiUW.mjs";import"./index-CI666IP9.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./TransactionDetails-fgHkAnf9.mjs";import"./WalletLink-CjuEskpb.mjs";import"./ethers-CpMSCMOg.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-Bmf8DxNP.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const p={component:()=>{let{user:p}=i(),{data:l}=s(),[u,d]=t(p?.mfaMethods[0]),[h,f]=t(!1),[j,v]=t(),[y,k]=t();if(e((()=>{d(p?.mfaMethods[0])}),[p?.mfaMethods]),!l?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:g,onSuccess:w,generateOptions:M,verifyTotpCode:C,verifyPasskey:I,verifySmsCode:S,sendSmsCode:b}=l.mfaVerify,P=async o=>{if("passkey"!==o)try{d(o),"sms"===o&&(d(o),await b()),"totp"===o&&d(o)}catch(o){console.error(o)}else try{d(o);let t=await M();if(!t)throw Error("something went wrong");v(t),await I(t),f(!0),k(void 0),w()}catch(o){k(c(o))}},x=async o=>{k(void 0);try{if(!o||!u)return;if("passkey"===u){if(!j)throw Error("Missing passkey challenge");await I(j)}else"sms"===u?await S(o):"totp"===u&&await C(o);k(void 0),f(!0),w()}catch(o){throw c(o).error}},A=()=>{y||!h?g(y?.error??Error("Canceled MFA verification.")):w()},E=r(!1);return e((()=>{!E.current&&u&&(E.current=!0,P(u).finally((()=>{E.current=!1})))}),[open]),p?"passkey"===u?/*#__PURE__*/o(m,{account:p.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:h,hasBlockingError:y?.isBlocking??!1,error:y?.error,onClose:A,onBack:()=>{d(void 0),k(void 0)},handleSubmit:()=>x(j).catch(k)}):"sms"===u||"totp"===u?/*#__PURE__*/o(n,{selectedMethod:u,submitSuccess:h,hasBlockingError:y?.isBlocking??!1,handleSubmitCode:x,onClose:A,onBack:p.mfaMethods.length>1?()=>d(void 0):void 0}):/*#__PURE__*/o(a,{user:p,onSelect:P,handleClose:A}):null}};export{p as MfaAuthVerifyFlowScreen,p as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/ShieldCheckIcon";import i from"@heroicons/react/24/solid/CheckBadgeIcon";import l from"@heroicons/react/24/solid/IdentificationIcon";import{useState as a,useEffect as s}from"react";import{P as c,S as m}from"./Button-DJ-mtuuD.mjs";import{L as d}from"./useActiveWallet-hrZcON-K.mjs";import{M as h,a as u}from"./ModalHeader-D7WajfD8.mjs";import{u as p}from"./context-Cb5MFcME.mjs";import{u as f}from"./internal-context-Cvo1WmWN.mjs";import{a as y,u as v}from"./get-is-unified-wallet-DymQMSJy.mjs";import{d as C,f as k,g as w,h as g,i as j,u as b}from"./index-CI666IP9.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-BzAm1Ya4.mjs";import F from"@heroicons/react/24/outline/CheckCircleIcon";import P from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as R}from"@privy-io/js-sdk-core";import{C as x}from"./ConnectPhoneForm-CbuSfwAI.mjs";import{I as W,T as B,S as T,C as A,a as L,B as N,N as U,A as O,L as $,b as D,c as H}from"./PinInput-C3_MNxMt.mjs";import{ErrorScreenView as Q}from"./ErrorScreen-DFAo4S7A.mjs";import"styled-components";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-CNFL2N09.mjs";import"lucide-react";import"./TodoList-Dn0Qu-vv.mjs";import"./ScreenLayout-Dmrhdwtt.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"./CopyToClipboard-DatKc59_.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-Bmf8DxNP.mjs";import"./Column-DQ5Vw9t1.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-zzqjquVm.mjs";import"qrcode";import"./reservoir-B0V48m2I.mjs";const Y=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,m]=a(""),[d,f]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=y(),$=p();function D(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(Q,{allowlistConfig:$.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(h,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(B,{children:"Set up SMS verification"}),/*#__PURE__*/o(T,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(x,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),m(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(L,{children:["By providing your mobile number, you agree to receive text messages from ",$?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(u,{})]}:d?{children:[/*#__PURE__*/e(h,{onClose:D},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(B,{children:"SMS verification added"}),/*#__PURE__*/o(T,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{onClick:D,children:"Done"})}),/*#__PURE__*/e(u,{})]}:{children:[/*#__PURE__*/e(h,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(B,{children:"Enter enrollment code"}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(U,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),f(!0)}catch(e){if(k(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(w(e))throw Error("The code you entered is not valid");if(g(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw j(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/o(T,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(u,{})]})},q={component:()=>{let{user:k,enrollInMfa:w,ready:g}=v(),[j,F]=a(null),{unenrollWithSms:P,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:L,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:Q,initEnrollmentWithTotp:q}=C(),{data:z,onUserCloseViaDialogOrKeybindRef:V}=y(),X=p(),{closePrivyModal:K}=f(),{promptMfa:Z}=b(),[_,G]=a(!1),[J,ee]=a(null),[oe,re]=a(null),te=()=>{K({shouldCallAuthOnSuccess:!0}),w(!1),setTimeout((()=>{F(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();V.current=te;let se=k?.mfaMethods.includes("sms"),ce=!!k?.phone,me=k?.mfaMethods.includes("totp"),de=k?.mfaMethods.includes("passkey"),he=se||me||de,ue=k?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){F(null),ee(null)}async function fe(e=ue){ie(!0);try{return await U(),await Q({credentialIds:e},{removeForLogin:z?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),z?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&G(!0)}),[he]),!g||!k||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(A,{children:/*#__PURE__*/e(d,{})}),/*#__PURE__*/e(u,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Remove SMS verification?"}),/*#__PURE__*/o(T,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{$warn:!0,onClick:async function(){F(null);try{await P()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(T,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{$warn:!0,onClick:async function(){F(null);try{await R()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]});if("passkey"===j){let n=z?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(T,{children:n?"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(N,{children:/*#__PURE__*/e(c,{$warn:!0,onClick:async function(){F(null);try{await x({removeForLogin:z?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]})}if(0===z.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(B,{children:"Add more security"}),/*#__PURE__*/o(T,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{onClick:te,children:"Close"})}),/*#__PURE__*/e(u,{})]});let ye=!he&&!_;return ye?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(B,{children:"Transaction Protection"}),/*#__PURE__*/e(T,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o($,{children:[/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(c,{onClick:()=>G(!0),children:"Continue"}),/*#__PURE__*/e(m,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(u,{})]}):"sms"===J?/*#__PURE__*/e(Y,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===J&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await L({mfaCode:e}),z?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{F(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===J?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:fe}):/*#__PURE__*/e(I,{showIntro:ye,userMfaMethods:k.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){G(!1)},handleSelectMethod:async function(e){try{await Z()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void q().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await fe():void ee(e)},isTotpLoading:"totp"===J&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await Z()}catch(e){return void ae(e)}F(e)}})}};export{q as MfaEnrollmentFlowScreen,q as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as e,useRef as r}from"react";import{u as i}from"./get-is-unified-wallet-DymQMSJy.mjs";import{u as m}from"./index-CI666IP9.mjs";import{V as n,a as s,b as c,t as a}from"./to-ui-error-B3m2hl6e.mjs";import"viem";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Cvo1WmWN.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-Dmrhdwtt.mjs";import"./Button-DJ-mtuuD.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"./PinInput-C3_MNxMt.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-BrIQsdas.mjs";import"./useGetTokenPrice-B4XVfxeD.mjs";import"./useGetSolPrice-Bi0pPiUW.mjs";import"./TransactionDetails-fgHkAnf9.mjs";import"./WalletLink-CjuEskpb.mjs";import"./ethers-CpMSCMOg.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-Bmf8DxNP.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const p=({onClose:p})=>{let{user:l}=i(),[u,d]=o(l?.mfaMethods[0]??null),{init:h,cancel:j,submit:f}=m(),[v,y]=o(!1),[k,g]=o(null),[w,I]=o();e((()=>{d(l?.mfaMethods[0]??null)}),[l?.mfaMethods]);let b=r(!1);async function C(t){I(void 0);try{if(!t||!u)return;await f(u,t),y(!0),I(void 0),p()}catch(t){throw a(t).error}}async function M(t){if("passkey"!==t)try{d(t),await h(t)}catch(t){console.error(t)}else try{d(t);let o=await h(t);if(!o)throw Error("something went wrong");g(o),await f(t,o),y(!0),I(void 0),p()}catch(t){I(a(t))}}e((()=>{!b.current&&u&&(b.current=!0,M(u).finally((()=>{b.current=!1})))}),[]);let S=()=>{d(null),I(void 0),j(),p()};return l?"passkey"===u?/*#__PURE__*/t(n,{account:l.linkedAccounts.filter((t=>"passkey"===t.type&&t.enrolledInMfa)).sort(((t,o)=>o.firstVerifiedAt.valueOf()-t.firstVerifiedAt.valueOf()))[0],submitSuccess:v,hasBlockingError:w?.isBlocking??!1,error:w?.error,onClose:S,onBack:()=>{d(null),I(void 0)},handleSubmit:()=>C(k).catch(I)}):u?/*#__PURE__*/t(s,{submitSuccess:v,hasBlockingError:w?.isBlocking??!1,handleSubmitCode:C,selectedMethod:u,onClose:S,onBack:l.mfaMethods.length>1?()=>d(null):void 0}):/*#__PURE__*/t(c,{user:l,onSelect:M,handleClose:S}):null};export{p as MfaVerifyFlowScreen,p as default};
@@ -0,0 +1,3 @@
1
+ import{jsx as o,jsxs as c}from"react/jsx-runtime";import{styled as e}from"styled-components";import{u as a}from"./context-Cb5MFcME.mjs";import i from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/XMarkIcon";import{u as l}from"./internal-context-Cvo1WmWN.mjs";function t(c){/*#__PURE__*/return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/o("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/o("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 d=/*#__PURE__*/e.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);}"]);function h({app:{legal:{privacyPolicyUrl:e,termsAndConditionsUrl:a,requireUsersAcceptTerms:i}},alwaysShowImplicitConsent:r}){let n=!(!e||!a);return i&&!r||!a&&!e?
2
+ /*#__PURE__*/o(d,{}):
3
+ /*#__PURE__*/ /*#__PURE__*/c(d,{children:["By logging in I agree to the"," ",a&&/*#__PURE__*/o("a",{href:a,target:"_blank",children:n?"Terms":"Terms of Service"}),n&&" & ",e&&/*#__PURE__*/o("a",{href:e,target:"_blank",children:"Privacy Policy"})]})}const s=({className:c})=>{let{appearance:e}=a();/*#__PURE__*/return o(v,{className:c,children:e.footerLogo??/*#__PURE__*/o(p,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/o(t,{color:"currentColor",height:13,width:150})})})};let p=/*#__PURE__*/e.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const v=/*#__PURE__*/e.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;}"]),m=({backFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{onClick:c,children:/*#__PURE__*/o(i,{height:"16px",width:"16px",strokeWidth:2})})}),f=({infoFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(u,{"aria-label":"info",onClick:c,children:/*#__PURE__*/o(r,{height:"22px",width:"22px",strokeWidth:2})})}),g=c=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/o(n,{height:"16px",width:"16px",strokeWidth:2})})}),y=({backFn:e,infoFn:i,onClose:r,title:n,closeable:t=!0,className:d})=>{let{closePrivyModal:h}=l(),s=a();/*#__PURE__*/return c(w,{className:d,children:[/*#__PURE__*/c(b,{children:[e&&/*#__PURE__*/o(m,{backFn:e}),/*#__PURE__*/o("div",{style:{height:24}}),i&&/*#__PURE__*/o(f,{infoFn:i})]}),n&&/*#__PURE__*/o(Z,{id:"privy-dialog-title",children:n}),/*#__PURE__*/o(C,{children:!s.render.standalone&&t&&/*#__PURE__*/o(g,{onClose:r||(()=>h())})})]})};let x=/*#__PURE__*/e.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;}}"]),u=/*#__PURE__*/e(x).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),w=/*#__PURE__*/e.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__*/e.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),C=/*#__PURE__*/e.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Z=/*#__PURE__*/e.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);"]);export{s as B,y as M,h as T,v as a};
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import r from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useMemo as n}from"react";import{styled as a}from"styled-components";import{P as s}from"./Button-DJ-mtuuD.mjs";import{a as c}from"./Layouts-Bmf8DxNP.mjs";import{L as l,a7 as m}from"./useActiveWallet-hrZcON-K.mjs";import{M as d,B as u}from"./ModalHeader-D7WajfD8.mjs";import{u as p}from"./context-Cb5MFcME.mjs";import{u as h}from"./internal-context-Cvo1WmWN.mjs";import{a as f}from"./get-is-unified-wallet-DymQMSJy.mjs";import{u as g}from"./index-DdlRJsoj.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:o=61,...r})=>/*#__PURE__*/t("svg",{width:o,height:o,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/t("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/t("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 C={component:()=>{let{data:r,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:s}=h(),{externalTransactionId:c}=r?.moonpayStatus,l=g(c||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(d,{title:"Fund account",backFn:()=>{let t={...r?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:r?.solanaFundingData}),n()}}),/*#__PURE__*/t(v,{status:l,onClickCta:s}),/*#__PURE__*/t(u,{})]})}};let v=({status:r,onClickCta:i})=>{let{title:a,body:l,cta:m}=n((()=>(t=>{switch(t){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(o,{children:[/*#__PURE__*/e(j,{children:[/*#__PURE__*/t(w,{status:r}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),m&&/*#__PURE__*/t(s,{onClick:i,children:m})]})},w=({status:o})=>{if(!o||"pending"===o){let o="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(l,{color:o,style:{position:"absolute"}}),/*#__PURE__*/t(m,{color:o}),/*#__PURE__*/t(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/t(r,{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}})(o),a=(s=o)?{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)"}[s]:"var(--privy-color-foreground-4)";var s;/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},b=/*#__PURE__*/a.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__*/a.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;"]);export{C as MoonpayStatusScreen,C as default};
@@ -0,0 +1 @@
1
+ import{jsx as l,jsxs as i}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/GlobeAltIcon";import{zora as e,polygon as r,optimism as h,mainnet as o,linea as c,celo as n,base as d,avalanche as s,arbitrum as p}from"@privy-io/js-sdk-core";const C=t=>/*#__PURE__*/i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 397.7 311.7",enableBackground:"new 0 0 397.7 311.7",xmlSpace:"preserve",...t,children:[/*#__PURE__*/i("linearGradient",{id:"SVGID_1_",gradientUnits:"userSpaceOnUse",x1:"360.8791",y1:"351.4553",x2:"141.213",y2:"-69.2936",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/l("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/l("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/l("path",{d:"M64.6,237.9c2.4-2.4,5.7-3.8,9.2-3.8h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5 c-5.8,0-8.7-7-4.6-11.1L64.6,237.9z",fill:"url(#SVGID_1_)"}),/*#__PURE__*/i("linearGradient",{id:"SVGID_2_",gradientUnits:"userSpaceOnUse",x1:"264.8291",y1:"401.6014",x2:"45.163",y2:"-19.1475",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/l("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/l("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/l("path",{d:"M64.6,3.8C67.1,1.4,70.4,0,73.8,0h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5 c-5.8,0-8.7-7-4.6-11.1L64.6,3.8z",fill:"url(#SVGID_2_)"}),/*#__PURE__*/i("linearGradient",{id:"SVGID_3_",gradientUnits:"userSpaceOnUse",x1:"312.5484",y1:"376.688",x2:"92.8822",y2:"-44.061",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/l("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/l("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/l("path",{d:"M333.1,120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8,0-8.7,7-4.6,11.1l62.7,62.7c2.4,2.4,5.7,3.8,9.2,3.8h317.4 c5.8,0,8.7-7,4.6-11.1L333.1,120.1z",fill:"url(#SVGID_3_)"})]});let a={[p.id]:t=>/*#__PURE__*/l("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 2500 2500",xmlSpace:"preserve",...t,children:/*#__PURE__*/l("g",{id:"Layer_x0020_1",children:/*#__PURE__*/i("g",{id:"_2405588477232",children:[/*#__PURE__*/l("rect",{fill:"none",width:"2500",height:"2500"}),/*#__PURE__*/l("g",{children:/*#__PURE__*/i("g",{children:[/*#__PURE__*/l("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760 c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),/*#__PURE__*/l("g",{children:/*#__PURE__*/i("g",{children:[/*#__PURE__*/l("g",{children:/*#__PURE__*/l("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"})}),/*#__PURE__*/l("g",{children:/*#__PURE__*/l("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"})})]})}),/*#__PURE__*/l("g",{children:/*#__PURE__*/l("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5 s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555 c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719 c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"})}),/*#__PURE__*/l("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234 "}),/*#__PURE__*/i("g",{children:[/*#__PURE__*/l("path",{fill:"#FFFFFF",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),/*#__PURE__*/l("path",{fill:"#FFFFFF",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})]})})]})})}),[s.id]:t=>/*#__PURE__*/i("svg",{width:"1503",height:"1504",viewBox:"0 0 1503 1504",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("rect",{x:"287",y:"258",width:"928",height:"844",fill:"white"}),/*#__PURE__*/l("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1502.5 752C1502.5 1166.77 1166.27 1503 751.5 1503C336.734 1503 0.5 1166.77 0.5 752C0.5 337.234 336.734 1 751.5 1C1166.27 1 1502.5 337.234 1502.5 752ZM538.688 1050.86H392.94C362.314 1050.86 347.186 1050.86 337.962 1044.96C327.999 1038.5 321.911 1027.8 321.173 1015.99C320.619 1005.11 328.184 991.822 343.312 965.255L703.182 330.935C718.495 303.999 726.243 290.531 736.021 285.55C746.537 280.2 759.083 280.2 769.599 285.55C779.377 290.531 787.126 303.999 802.438 330.935L876.42 460.079L876.797 460.738C893.336 489.635 901.723 504.289 905.385 519.669C909.443 536.458 909.443 554.169 905.385 570.958C901.695 586.455 893.393 601.215 876.604 630.549L687.573 964.702L687.084 965.558C670.436 994.693 661.999 1009.46 650.306 1020.6C637.576 1032.78 622.263 1041.63 605.474 1046.62C590.161 1050.86 573.004 1050.86 538.688 1050.86ZM906.75 1050.86H1115.59C1146.4 1050.86 1161.9 1050.86 1171.13 1044.78C1181.09 1038.32 1187.36 1027.43 1187.92 1015.63C1188.45 1005.1 1181.05 992.33 1166.55 967.307C1166.05 966.455 1165.55 965.588 1165.04 964.706L1060.43 785.75L1059.24 783.735C1044.54 758.877 1037.12 746.324 1027.59 741.472C1017.08 736.121 1004.71 736.121 994.199 741.472C984.605 746.453 976.857 759.552 961.544 785.934L857.306 964.891L856.949 965.507C841.69 991.847 834.064 1005.01 834.614 1015.81C835.352 1027.62 841.44 1038.5 851.402 1044.96C860.443 1050.86 875.94 1050.86 906.75 1050.86Z",fill:"#E84142"})]}),[d.id]:t=>/*#__PURE__*/i("svg",{width:"146",height:"146",viewBox:"0 0 146 146",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("circle",{cx:"73",cy:"73",r:"73",fill:"#0052FF"}),/*#__PURE__*/l("path",{d:"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z",fill:"white"})]}),[n.id]:t=>/*#__PURE__*/i("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("path",{d:"m0 0h400v400h-400z",fill:"#fcff52"}),/*#__PURE__*/l("path",{d:"m300 100h-200v200h199.996v-69.813h-33.191c-11.442 25.468-37.194 43.206-66.665 43.206-40.63 0-73.533-33.187-73.533-73.533s32.903-73.249 73.533-73.249c30.043 0 55.795 18.313 67.24 44.349h32.62z",fill:"#000"})]}),[c.id]:t=>/*#__PURE__*/i("svg",{width:"200",height:"208",viewBox:"0 0 200 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("rect",{width:"199.4",height:"207.623",fill:"#121212"}),/*#__PURE__*/i("g",{"clip-path":"url(#clip0_2303_643)",children:[/*#__PURE__*/l("path",{d:"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z",fill:"white"}),/*#__PURE__*/l("path",{d:"M132.369 85.7575C141.687 85.7575 149.241 78.2036 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2036 123.05 85.7575 132.369 85.7575Z",fill:"white"})]}),/*#__PURE__*/l("defs",{children:/*#__PURE__*/l("clipPath",{id:"clip0_2303_643",children:/*#__PURE__*/l("rect",{width:"99.5407",height:"103.977",fill:"white",transform:"translate(49.7001 52.0134)"})})})]}),[o.id]:t=>/*#__PURE__*/i("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 327.5 533.3",enableBackground:"new 0 0 327.5 533.3;",xmlSpace:"preserve",...t,children:[/*#__PURE__*/l("path",{fill:"#8492B2",d:"M163.7,197.2V0L0,271.6L163.7,197.2z"}),/*#__PURE__*/l("path",{fill:"#62688F",d:"M163.7,368.4V197.2L0,271.6L163.7,368.4z M163.7,197.2l163.7,74.4L163.7,0V197.2z"}),/*#__PURE__*/l("path",{fill:"#454A75",d:"M163.7,197.2v171.2l163.7-96.8L163.7,197.2z"}),/*#__PURE__*/l("path",{fill:"#8492B2",d:"M163.7,399.4L0,302.7l163.7,230.7V399.4z"}),/*#__PURE__*/l("path",{fill:"#62688F",d:"M327.5,302.7l-163.8,96.7v134L327.5,302.7z"})]}),[h.id]:t=>/*#__PURE__*/i("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("circle",{cx:"250",cy:"250",r:"250",fill:"#FF0420"}),/*#__PURE__*/l("path",{d:"M177.133 316.446C162.247 316.446 150.051 312.943 140.544 305.938C131.162 298.808 126.471 288.676 126.471 275.541C126.471 272.789 126.784 269.411 127.409 265.408C129.036 256.402 131.35 245.581 134.352 232.947C142.858 198.547 164.812 181.347 200.213 181.347C209.845 181.347 218.476 182.973 226.107 186.225C233.738 189.352 239.742 194.106 244.12 200.486C248.498 206.74 250.688 214.246 250.688 223.002C250.688 225.629 250.375 228.944 249.749 232.947C247.873 244.08 245.621 254.901 242.994 265.408C238.616 282.546 231.048 295.368 220.29 303.874C209.532 312.255 195.147 316.446 177.133 316.446ZM179.76 289.426C186.766 289.426 192.707 287.362 197.586 283.234C202.59 279.106 206.155 272.789 208.281 264.283C211.158 252.524 213.348 242.266 214.849 233.51C215.349 230.883 215.599 228.194 215.599 225.441C215.599 214.058 209.657 208.366 197.774 208.366C190.768 208.366 184.764 210.43 179.76 214.558C174.882 218.687 171.379 225.004 169.253 233.51C167.001 241.891 164.749 252.149 162.498 264.283C161.997 266.784 161.747 269.411 161.747 272.163C161.747 283.672 167.752 289.426 179.76 289.426Z",fill:"white"}),/*#__PURE__*/l("path",{d:"M259.303 314.57C257.927 314.57 256.863 314.132 256.113 313.256C255.487 312.255 255.3 311.13 255.55 309.879L281.444 187.914C281.694 186.538 282.382 185.412 283.508 184.536C284.634 183.661 285.822 183.223 287.073 183.223H336.985C350.87 183.223 362.003 186.1 370.384 191.854C378.891 197.609 383.144 205.927 383.144 216.81C383.144 219.937 382.769 223.19 382.018 226.567C378.891 240.953 372.574 251.586 363.067 258.466C353.685 265.346 340.8 268.786 324.413 268.786H299.082L290.451 309.879C290.2 311.255 289.512 312.38 288.387 313.256C287.261 314.132 286.072 314.57 284.822 314.57H259.303ZM325.727 242.892C330.98 242.892 335.546 241.453 339.424 238.576C343.427 235.699 346.054 231.571 347.305 226.192C347.68 224.065 347.868 222.189 347.868 220.563C347.868 216.935 346.805 214.183 344.678 212.307C342.551 210.305 338.924 209.305 333.795 209.305H311.278L304.148 242.892H325.727Z",fill:"white"})]}),[r.id]:t=>/*#__PURE__*/i("svg",{width:"360",height:"360",viewBox:"0 0 360 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/l("rect",{width:"360",height:"360",rx:"180",fill:"#6C00F6"}),/*#__PURE__*/l("path",{d:"M157.743 154.241L141.052 144.58L90.9766 173.561V231.519L141.052 260.5L191.13 231.519V141.359L218.948 125.26L246.77 141.359V173.561L218.948 189.66L202.257 180.002V205.759L218.948 215.42L269.024 186.439V128.481L218.948 99.5L168.873 128.481V218.641L141.052 234.74L113.233 218.641V186.439L141.052 170.34L157.743 179.998V154.241Z",fill:"white"})]}),[e.id]:t=>/*#__PURE__*/i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",...t,children:[/*#__PURE__*/l("g",{clipPath:"url(#clip0)",children:/*#__PURE__*/l("g",{clipPath:"url(#clip1)",children:/*#__PURE__*/l("path",{d:"M14.9188 29.8373C6.67944 29.8373 0.00012207 23.1581 0.00012207 14.9187C0.00012207 6.67931 6.67944 0 14.9188 0C23.1581 0 29.8373 6.67931 29.8373 14.9187C29.8373 23.1581 23.1581 29.8373 14.9188 29.8373Z",fill:"url(#paint0)"})})}),/*#__PURE__*/i("defs",{children:[/*#__PURE__*/i("radialGradient",{id:"paint0",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(21.6921 8.02215) rotate(180) scale(25.2008)",children:[/*#__PURE__*/l("stop",{offset:"0.00682297",stopColor:"#F2CEFE"}),/*#__PURE__*/l("stop",{offset:"0.1913",stopColor:"#AFBAF1"}),/*#__PURE__*/l("stop",{offset:"0.4982",stopColor:"#4281D3"}),/*#__PURE__*/l("stop",{offset:"0.666667",stopColor:"#2E427D"}),/*#__PURE__*/l("stop",{offset:"0.822917",stopColor:"#230101"}),/*#__PURE__*/l("stop",{offset:"1",stopColor:"#8F6B40"})]}),/*#__PURE__*/l("clipPath",{id:"clip0",children:/*#__PURE__*/l("rect",{width:"30",height:"30",fill:"white"})}),/*#__PURE__*/l("clipPath",{id:"clip1",children:/*#__PURE__*/l("rect",{width:"30",height:"30",fill:"white"})})]})]})};const w=({chainId:i,...e})=>{if("solana"===i)/*#__PURE__*/return l(C,{...e});let r=a[i];/*#__PURE__*/return l(r||t,{...e})};export{w as N};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-DymQMSJy.mjs";import{A as s,T as m,I as c,S as l,a as d,L as p,b as u,D as h,G as v}from"./twitter-6jomarO4.mjs";import y from"@heroicons/react/24/outline/GlobeAltIcon";import{T as g,L as f}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-Cb5MFcME.mjs";import{b as T,u as S,i as w}from"./internal-context-Cvo1WmWN.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs";import{S as _}from"./ScreenLayout-Dmrhdwtt.mjs";import{e as C}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{s as j}from"./index-CI666IP9.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./Button-DJ-mtuuD.mjs";import"styled-components";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const O=({style:t})=>/*#__PURE__*/e(y,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:v},discord:{name:"Discord",component:h},github:{name:"Github",component:u},linkedin:{name:"LinkedIn",component:p},twitter:{name:"Twitter",component:d},spotify:{name:"Spotify",component:l},instagram:{name:"Instagram",component:c},tiktok:{name:"Tiktok",component:m},line:{name:"LINE",component:f},twitch:{name:"Twitch",component:g},apple:{name:"Apple",component:s}},N=({iconUrl:e,...r})=>t.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},t.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},t.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const U=(e,r)=>{if(e in R)return R[e];if(i(e)&&r){let o=r.find((t=>t.provider===e));if(o)return{name:o.provider_display_name,component:e=>t.createElement(N,{...e,iconUrl:o.provider_icon_url})}}return{name:"Unknown",component:O}};function I(e,t,r){let o={detail:"",retryable:!1},i=C(t);if(e?.privyErrorCode===T.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===T.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===T.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=U(t,r).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===T.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===T.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===T.OAUTH_UNEXPECTED&&t.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}const L=({providerName:t,ProviderLogo:r,success:o,errorMessage:i,onRetry:a})=>{let n=o?`Successfully connected with ${t}`:i?i.message:`Verifying connection to ${t}`;/*#__PURE__*/return e(_,{title:n,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:r,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&a?{label:"Retry",onClick:a}:void 0,watermark:!0})},k={component:()=>{let{authenticated:t,logout:i,ready:s,user:m}=a(),{setModalData:c,navigate:l,resetNavigation:d}=n(),p=E(),{getAuthMeta:u,initLoginWithOAuth:h,loginWithOAuth:v,updateWallets:y,setReadyToTrue:g,closePrivyModal:f,createAnalyticsEvent:_}=S(),[C,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:D,component:P}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===T.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===T.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===T.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===T.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return N(void 0),d(),c({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:u()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void l("LinkConflictScreen");let{retryable:t,detail:r}=I(e,k,p.customOAuthProviders);N({retryable:t,detail:r,message:"Authentication failed"})})).finally((()=>{j()}))}),[D,k]),o((()=>{if(s&&t&&C&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(b(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:k,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),l("EmbeddedWalletOnAccountCreateScreen")}),A);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return y(),()=>clearTimeout(e)}}}),[s,t,C,m]),/*#__PURE__*/e(L,{providerName:D,ProviderLogo:P,success:C,errorMessage:R,onRetry:R?.retryable?()=>{j(),h(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useState as r}from"react";import{styled as e}from"styled-components";const n=e=>{let[n,i]=r(!1);/*#__PURE__*/return o(t,{color:e.color,href:e.url,target:"_blank",rel:"noreferrer noopener",onClick:()=>{i(!0),setTimeout((()=>i(!1)),1500)},justOpened:n,children:e.text})};let t=/*#__PURE__*/e.a.withConfig({displayName:"StyledOpenLinkButton",componentId:"sc-4e695c83-0"})(["display:flex;align-items:center;gap:6px;&&{margin:8px 2px;font-size:14px;color:",";font-weight:",";transition:color 350ms ease;:focus,:active{background-color:transparent;border:none;outline:none;box-shadow:none;}:hover{color:",";}:active{color:'var(--privy-color-foreground)';font-weight:medium;}@media (max-width:440px){margin:12px 2px;}}svg{width:14px;height:14px;}"],(o=>o.justOpened?"var(--privy-color-foreground)":o.color||"var(--privy-color-foreground-3)"),(o=>o.justOpened?"medium":"normal"),(o=>o.justOpened?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"));export{n as O};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as i}from"./index-CI666IP9.mjs";import{u as o}from"./internal-context-Cvo1WmWN.mjs";import{a as r}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as a}from"./ScreenLayout-Dmrhdwtt.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"./context-Cb5MFcME.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-DJ-mtuuD.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const s=({title:i="Log in or create a new account?",subtitle:o="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:s})=>/*#__PURE__*/t(a,{title:i,subtitle:o,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=i(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:m,initLoginWithPasskey:c}=o();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-Cb5MFcME.mjs";import{c,b as m,u}from"./internal-context-Cvo1WmWN.mjs";import{a as l,u as p}from"./get-is-unified-wallet-DymQMSJy.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs";import{S as y}from"./ScreenLayout-Dmrhdwtt.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-CI666IP9.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-DJ-mtuuD.mjs";import"./Screen-dwi2CitY.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const f=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"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(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.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,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),h={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:h,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,A]=t("loading"),[C,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let T=async()=>{A("loading");try{k?await h():await y(),A("success")}catch(e){P(e),A("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{T()}),[]),/*#__PURE__*/e(f,{status:b,passkeySignupFlow:k,error:C,onRetry:T})}};let g=/*#__PURE__*/i.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);export{h as PasskeyStatusScreen,f as PasskeyStatusScreenView,h as default};
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,h as l}from"./get-is-unified-wallet-DymQMSJy.mjs";import{P as m}from"./Button-DJ-mtuuD.mjs";import{S as p}from"./Layouts-Bmf8DxNP.mjs";import{P as d,a as u,I as h,H as y,S as v}from"./shared-DsP7M4P5.mjs";import{r as f}from"./index-CI666IP9.mjs";import{u as w,k as g}from"./internal-context-Cvo1WmWN.mjs";import{S as j}from"./Screen-dwi2CitY.mjs";import"viem";import"./context-Cb5MFcME.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:k,createAnalyticsEvent:P,client:S}=w(),{navigate:N,data:E,onUserCloseViaDialogOrKeybindRef:M}=c(),[T,W]=o(void 0),[_,H]=o(""),[R,U]=o(!1),{entropyId:z,entropyIdVerifier:B,onCompleteNavigateTo:F,onSuccess:O,onFailure:V}=E.recoverWallet,$=(e="User exited before their wallet could be recovered")=>{k({shouldCallAuthOnSuccess:!1}),V("string"==typeof e?new g(e):e)};M.current=$,i((()=>{if(!m)return $("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:$}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(d,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&W(e)})(e.target.value),disabled:R,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!_&&/*#__PURE__*/r(C,{children:_})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(p,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(I,{loading:R||!A,disabled:!T,onClick:async()=>{U(!0);let e=await S.getAccessToken(),r=l(b,z);if(!e||!r||null===T)return $("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:z,entropyIdVerifier:B,recoveryPassword:T})),H(""),F?N(F):k({shouldCallAuthOnSuccess:!1}),O?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{U(!1)}},$hideAnimations:!z&&R,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=/*#__PURE__*/s.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),C=/*#__PURE__*/s.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;"]),I=/*#__PURE__*/s(m).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/a(["&&{transition:none;}"])));export{b as PasswordRecoveryScreen,b as default};
@@ -0,0 +1 @@
1
+ import{styled as e}from"styled-components";import{jsx as i,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useState as n}from"react";import{isMobile as o}from"react-device-detect";const a=/*#__PURE__*/e.div.withConfig({displayName:"AppLogoContainer",componentId:"sc-ba98f772-0"})(["display:flex;flex-direction:column;align-items:center;padding:0px 0px 30px;@media (max-width:440px){padding:10px 10px 20px;}"]),l=/*#__PURE__*/e.div.withConfig({displayName:"Title",componentId:"sc-ba98f772-1"})(["font-size:18px;line-height:30px;text-align:center;font-weight:600;margin-bottom:10px;"]),p=/*#__PURE__*/e.div.withConfig({displayName:"SubTitle",componentId:"sc-ba98f772-2"})(["font-size:0.875rem;text-align:center;"]),d=/*#__PURE__*/e.div.withConfig({displayName:"Container",componentId:"sc-ba98f772-3"})(["display:flex;flex-direction:column;align-items:center;gap:10px;flex-grow:1;padding:20px 0;@media (max-width:440px){padding:10px 10px 20px;}"]),s=/*#__PURE__*/e.div.withConfig({displayName:"List",componentId:"sc-ba98f772-4"})(["display:flex;flex-direction:column;align-items:stretch;gap:0.75rem;padding:1rem 0rem 0rem;flex-grow:1;width:100%;"]),c=/*#__PURE__*/e.div.withConfig({displayName:"ListItemIcon",componentId:"sc-ba98f772-5"})(["width:25px;display:flex;align-items:center;justify-content:flex-start;> svg{z-index:2;height:25px !important;width:25px !important;color:var(--privy-color-accent);}"]),m=/*#__PURE__*/e.div.withConfig({displayName:"ListItem",componentId:"sc-ba98f772-6"})(["display:flex;align-items:center;gap:10px;font-size:0.875rem;line-height:1rem;text-align:left;"]),f=/*#__PURE__*/e.div.withConfig({displayName:"BottomSection",componentId:"sc-ba98f772-7"})(["display:flex;flex-direction:column;gap:10px;padding-top:20px;"]),x=/*#__PURE__*/e.div.withConfig({displayName:"MethodList",componentId:"sc-ba98f772-8"})(["display:flex;flex-direction:column;align-items:stretch;gap:1rem;padding:1rem 0rem 0rem;flex-grow:1;width:100%;"]),g=/*#__PURE__*/e.div.withConfig({displayName:"MethodListItem",componentId:"sc-ba98f772-9"})(["display:flex;gap:5px;width:100%;position:relative;"]),h=/*#__PURE__*/e.button.withConfig({displayName:"RemoveMethodButton",componentId:"sc-ba98f772-10"})(["&&{background-color:transparent;color:var(--privy-color-foreground-3);padding:0 0.75rem;display:flex;align-items:center;height:100%;> svg{z-index:2;height:20px !important;width:20px !important;}}&&:hover{color:var(--privy-color-error);}"]),u=/*#__PURE__*/e.div.withConfig({displayName:"MethodText",componentId:"sc-ba98f772-11"})(["display:flex;align-items:center;gap:0.5rem;> svg{z-index:2;height:20px !important;width:20px !important;}"]),v=/*#__PURE__*/e.div.withConfig({displayName:"ExtraText",componentId:"sc-ba98f772-12"})(["display:flex;align-items:center;gap:6px;font-weight:400 !important;color:",";> svg{z-index:2;height:18px !important;width:18px !important;display:flex !important;align-items:flex-end;}"],(e=>e.$isAccent?"var(--privy-color-accent)":"var(--privy-color-foreground-3)")),y=/*#__PURE__*/e.div.withConfig({displayName:"SmsInsecureText",componentId:"sc-ba98f772-13"})(["width:100%;display:flex;justify-content:space-between;"]),C=/*#__PURE__*/e.p.withConfig({displayName:"TermsText",componentId:"sc-ba98f772-14"})(["text-align:left;width:100%;color:var(--privy-color-foreground-3) !important;"]),w=/*#__PURE__*/e.button.withConfig({displayName:"PrimaryTextButton",componentId:"sc-ba98f772-15"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:100%;cursor:pointer;border-radius:var(--privy-border-radius-md);font-size:0.875rem;line-height:1rem;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{color:",";background-color:transparent;padding:0.5rem 0px;}&:hover{text-decoration:underline;}"],(e=>"dark"===e.theme?"var(--privy-color-foreground-2)":"var(--privy-color-accent)")),b=/*#__PURE__*/e.div.withConfig({displayName:"IconWrapper",componentId:"sc-ba98f772-16"})(["display:flex;align-items:center;justify-content:center;color:var(--privy-color-accent);width:100%;> svg{z-index:2;width:3rem;height:3rem;}"]),I=/*#__PURE__*/e.div.withConfig({displayName:"ErrorMessage",componentId:"sc-ba98f772-17"})(["color:var(--privy-color-error);"]),N=({style:e,...t})=>/*#__PURE__*/i("svg",{x:0,y:0,width:"65",height:"64",viewBox:"0 0 65 64",style:{height:"64px",width:"65px",...e},fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.71369 17.5625V10.375C3.71369 6.44625 6.85845 3.25 10.7238 3.25H17.7953C18.6783 3.25 19.3941 2.52244 19.3941 1.625C19.3941 0.727562 18.6783 0 17.7953 0H10.7238C5.09529 0 0.516113 4.65419 0.516113 10.375V17.5625C0.516113 18.4599 1.23194 19.1875 2.1149 19.1875C2.99787 19.1875 3.71369 18.4599 3.71369 17.5625ZM17.7953 60.7501C18.6783 60.7501 19.3941 61.4777 19.3941 62.3751C19.3941 63.2726 18.6783 64.0001 17.7953 64.0001H10.7238C5.09529 64.0001 0.516113 59.3459 0.516113 53.6251V46.4376C0.516113 45.5402 1.23194 44.8126 2.1149 44.8126C2.99787 44.8126 3.71369 45.5402 3.71369 46.4376V53.6251C3.71369 57.5538 6.85845 60.7501 10.7238 60.7501H17.7953ZM63.4839 46.4376V53.6251C63.4839 59.3459 58.9048 64.0001 53.2763 64.0001H46.2047C45.3217 64.0001 44.6059 63.2726 44.6059 62.3751C44.6059 61.4777 45.3217 60.7501 46.2047 60.7501H53.2763C57.1416 60.7501 60.2864 57.5538 60.2864 53.6251V46.4376C60.2864 45.5402 61.0022 44.8126 61.8851 44.8126C62.7681 44.8126 63.4839 45.5402 63.4839 46.4376ZM63.4839 10.375V17.5625C63.4839 18.4599 62.7681 19.1875 61.8851 19.1875C61.0022 19.1875 60.2864 18.4599 60.2864 17.5625V10.375C60.2864 6.44625 57.1416 3.25 53.2763 3.25H46.2047C45.3217 3.25 44.6059 2.52244 44.6059 1.625C44.6059 0.727562 45.3217 0 46.2047 0H53.2763C58.9048 0 63.4839 4.65419 63.4839 10.375ZM43.0331 47.3022C43.7067 46.6698 43.7483 45.6022 43.1262 44.9176C42.5039 44.233 41.4536 44.1906 40.78 44.823C38.3832 47.0732 35.265 48.3125 31.9997 48.3125C28.7344 48.3125 25.6162 47.0732 23.2194 44.823C22.5457 44.1906 21.4955 44.233 20.8732 44.9176C20.251 45.6022 20.2927 46.6698 20.9663 47.3022C23.9784 50.1301 27.8968 51.6875 31.9997 51.6875C36.1026 51.6875 40.021 50.1301 43.0331 47.3022ZM35.3207 24.1249V36.1249C35.3207 38.5029 33.4173 40.4374 31.0777 40.4374H29.7249C28.8079 40.4374 28.0646 39.6819 28.0646 38.7499C28.0646 37.8179 28.8079 37.0624 29.7249 37.0624H31.0777C31.5863 37.0624 32.0001 36.6419 32.0001 36.1249V24.1249C32.0001 23.1929 32.7434 22.4374 33.6604 22.4374C34.5774 22.4374 35.3207 23.1929 35.3207 24.1249ZM46.7581 28.8437V24.0312C46.7581 23.151 46.056 22.4374 45.19 22.4374C44.324 22.4374 43.622 23.151 43.622 24.0312V28.8437C43.622 29.7239 44.324 30.4374 45.19 30.4374C46.056 30.4374 46.7581 29.7239 46.7581 28.8437ZM17.6109 28.8437C17.6109 29.7239 18.313 30.4374 19.1789 30.4374C20.0449 30.4374 20.747 29.7239 20.747 28.8437V24.0312C20.747 23.151 20.0449 22.4374 19.1789 22.4374C18.313 22.4374 17.6109 23.151 17.6109 24.0312V28.8437Z"})});let T=Array(6).fill("");var M,V=((M=V||{})[M.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",M[M.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",M);function E(e){return/^[0-9]{1}$/.test(e)}function A(e){return 6===e.length&&e.every(E)}const L=({onChange:e,disabled:a,errorReasonOverride:l,success:p})=>{let[d,s]=n(T),[c,m]=n(null),[f,x]=n(null),g=async i=>{i.preventDefault();let t=i.currentTarget.value.replace(/\s+/g,"");if(""===t)return;let r=d.reduce(((e,i)=>e+Number(E(i))),0),n=t.split(""),o=!n.every(E),a=n.length+r>6;if(o)return m("Passcode can only be numbers"),void x(1);if(a)return m("Passcode must be exactly 6 numbers"),void x(1);m(null),x(null);let l=Number(i.currentTarget.name?.charAt(4)),p=[...t||[""]].slice(0,6-l),c=[...d.slice(0,l),...p,...d.slice(l+p.length)];s(c);let f=Math.min(Math.max(l+p.length,0),5),g=document.querySelector(`input[name=pin-${f}]`);if(g?.focus(),A(c))try{await e(c.join(""));let i=document.querySelector(`input[name=pin-${f}]`);i?.blur()}catch(i){x(1),m(i.message)}else try{await e(null)}catch(i){x(1),m(i.message)}},h=p?"success":!(!l&&!c)?"fail":"";/*#__PURE__*/return i(t,{children:/*#__PURE__*/r(k,{children:[/*#__PURE__*/i("div",{children:d.map(((t,r)=>/*#__PURE__*/i("input",{name:`pin-${r}`,type:"text",value:d[r],onChange:g,onKeyUp:i=>{"Backspace"===i.key&&(i=>{1===f&&(m(null),x(null));let t=[...d.slice(0,i),"",...d.slice(i+1)];if(s(t),i>0){let e=document.querySelector(`input[name=pin-${i-1}]`);e?.focus()}A(t)?e(t.join("")):e(null)})(r)},inputMode:"numeric",autoFocus:0===r,pattern:"[0-9]",className:h,autoComplete:o?"one-time-code":"off",disabled:a},r)))}),/*#__PURE__*/i("div",{children:/*#__PURE__*/i(_,{$fail:!!l||!!c,children:l||c})})]})})};let k=/*#__PURE__*/e.div.withConfig({displayName:"PinInputContainer",componentId:"sc-7a171f6-0"})(["display:flex;flex-direction:column;width:100%;gap:8px;@media (max-width:440px){margin-top:8px;margin-bottom:8px;}> div:nth-child(1){display:flex;justify-content:center;gap:0.5rem;width:100%;border-radius:var(--privy-border-radius-md);> input{border:1px solid var(--privy-color-foreground-4);background:var(--privy-color-background);border-radius:var(--privy-border-radius-md);padding:8px 10px;height:58px;width:46px;text-align:center;font-size:18px;}> input:disabled{background:var(--privy-color-background-2);}> input:focus{border:1px solid var(--privy-color-accent);}> input:invalid{border:1px solid var(--privy-color-error);}> input.success{border:1px solid var(--privy-color-success);}> input.fail{border:1px solid var(--privy-color-error);animation:shake 180ms;animation-iteration-count:2;}}@keyframes shake{0%{transform:translate(1px,0px);}33%{transform:translate(-1px,0px);}67%{transform:translate(-1px,0px);}100%{transform:translate(1px,0px);}}"]),_=/*#__PURE__*/e.div.withConfig({displayName:"InputHelp",componentId:"sc-7a171f6-1"})(["line-height:20px;font-size:13px;display:flex;justify-content:flex-start;width:100%;color:",";"],(e=>e.$fail?"var(--privy-color-error)":"var(--privy-color-foreground-3)"));export{a as A,f as B,d as C,I as E,N as F,b as I,s as L,x as M,L as N,w as P,h as R,p as S,l as T,C as a,m as b,c,g as d,y as e,u as f,v as g};
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as n}from"./context-Cb5MFcME.mjs";import{a2 as c,a3 as a}from"./useActiveWallet-hrZcON-K.mjs";const g=()=>/*#__PURE__*/e("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("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:n})=>
2
+ /*#__PURE__*/e(o,{children:[0,1,2].map((o=>/*#__PURE__*/e("circle",{r:l*(7-2*o)/2,cx:r+7*l/2,cy:t+7*l/2,fill:o%2!=0?i:n},`finder-${r}-${t}-${o}`)))}),s=({cellSize:r,matrixSize:t,bgColor:l,fgColor:i})=>/*#__PURE__*/e(o,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([o,t])=>/*#__PURE__*/e(d,{x:o,y:t,cellSize:r,bgColor:l,fgColor:i},`finder-${o}-${t}`)))}),p=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,n)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:n*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${n}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${n}`)))))}),f=({cellSize:t,matrixSize:l,element:i,sizePercentage:n,bgColor:c})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(n||.14),g=Math.floor(l/2-a/2),h=Math.floor(l/2+a/2);(h-g)%2!=l%2&&(h+=1);let m=(h-g)*t,d=m-.2*m,s=g*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:g*t,y:g*t,width:m,height:m,fill:c}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},u=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,n=c(2*i,{min:.025*t,max:.036*t});/*#__PURE__*/return r("svg",{height:o.outputSize,width:o.outputSize,viewBox:`0 0 ${o.outputSize} ${o.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e(p,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(s,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(f,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},C=/*#__PURE__*/i.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));const x=r=>{let{appearance:o}=n(),t=r.bgColor||"#FFFFFF",l=r.fgColor||"#000000",i=r.size||160,c="dark"===o.palette.colorScheme?t:l;/*#__PURE__*/return e(C,{$size:i,$bgColor:t,$fgColor:l,$borderColor:c,children:/*#__PURE__*/e(u,{url:r.url,logo:{element:r.squareLogoElement??g},outputSize:i,bgColor:t,fgColor:l,errorCorrectionLevel:r.errorCorrectionLevel||"Q"})})};export{x as Q};
@@ -0,0 +1 @@
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{P as c}from"./Button-DJ-mtuuD.mjs";import{M as s,B as l}from"./ModalHeader-D7WajfD8.mjs";import{C as n}from"./ScreenHeader-Biz1wq02.mjs";import{q as d}from"./context-Cb5MFcME.mjs";import{v as p,w as u,x as m,R as h,s as v}from"./index-CI666IP9.mjs";import{a as w,f as y,b as f,u as _}from"./internal-context-Cvo1WmWN.mjs";import{a as A,u as E,g}from"./get-is-unified-wallet-DymQMSJy.mjs";import{a8 as C,a9 as b,aa as R}from"./paths-3HW55qZg.mjs";import{g as k}from"./useWallets-BplPx0Pz.mjs";import{a as T}from"./events-context-CI0iqAXA.mjs";import{u as O}from"./use-create-wallet-without-fallback-DodUf3VP.mjs";import{A as N,G as S,R as I}from"./styles-BxA7nKxI.mjs";import"styled-components";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";async function x({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function M({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new w("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new w("User denied confirmation during OAuth flow");try{return(await e.post(C,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=y(e);if(t.privyErrorCode)throw new w(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new w("Invalid code during oauth flow.",void 0,f.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,f.UNKNOWN_AUTH_ERROR)}}async function j({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(b,{client_type:"web"})).url}:{url:(await e.post(R,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw y(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=E(),{navigate:u,setModalData:m,data:y}=A(),{closePrivyModal:C,createAnalyticsEvent:b}=_(),{execute:R}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=_(),{data:o}=A(),{user:a}=E(),i=T(),{create:c}=O();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new w("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await j({api:e.api,provider:s});h(o);try{let a=await x({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new w("Unexpected auth flow. This may be a phishing attempt.",void 0,f.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new w("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),M({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await j({api:e.api,provider:s});h(t);let{ckWebAuthToken:r}=await x({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new w("Cannot connect to wallet proxy");if(!u)throw new w("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new w("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=g(a);if(!o)throw i("setWalletRecovery","onError",f.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=k(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=g(await r());if(!n)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new w("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=y?.recoveryOAuthStatus,[$,z]=o(void 0),[H,B]=o("create-wallet"===D);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,G=U[W].component,K=y?.recoverWallet?.onCompleteNavigateTo,Y=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await R({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){z({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===D?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==D&&Y.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):C({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let X=i((async()=>{await Y.execute("recover"),K?u(K):S(!0)}),[]),q="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${q}.`||$&&$.message||`${"recover"===D?"Recovering":"Backing up"} with ${q}...`,J=$?$.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(s,{}),H?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(G,{style:{width:"38px",height:"38px"}}),description:J}),$&&$?.retryable?/*#__PURE__*/r(c,{onClick:()=>{v(),z(void 0),"create-wallet"===D?Y.execute("create-wallet"):X()},disabled:!N&&!$?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(G,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${q} where your account is backed up.`}),/*#__PURE__*/e(c,{onClick:X,children:["Confirm with ",q]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{u as r}from"./context-Cb5MFcME.mjs";import{R as i}from"./index-CI666IP9.mjs";import{u as s,k as a}from"./internal-context-Cvo1WmWN.mjs";import{u as n}from"./use-create-wallet-without-fallback-DodUf3VP.mjs";import{a as c,u as l}from"./get-is-unified-wallet-DymQMSJy.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-ZtRqoZYj.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-hrZcON-K.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-IxRndou_.mjs";import"./useWallets-BplPx0Pz.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-Bmf8DxNP.mjs";import"./ModalHeader-D7WajfD8.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-DsP7M4P5.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Button-DJ-mtuuD.mjs";import"./Checkbox-NmGCZeKL.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-Biz1wq02.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=t(""),[f,j]=t(!1),[g,C]=t(),[I,b]=t(null),{create:x}=n(),{authenticated:S,user:P}=l(),{closePrivyModal:A,isNewUserThisSession:k,initializeWalletProxy:M}=s(),{onSuccess:U,onFailure:E,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=t(null),R=new i((async()=>{try{let e;if(O&&W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P}),e=await x({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"solana",walletIndex:0,latestUser:P});else{if(!O)throw Error("Invalid args to create wallet");e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P})}L(e),k?u("EmbeddedWalletCreatedScreen"):(U(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));o((()=>{I||M(3e4).then((e=>b(e)))}),[I]),o((()=>{if(!S||!P)return u("LandingScreen"),void E(Error("User must be authenticated before creating a Privy wallet"))}),[S]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:f,buttonHideAnimations:!D&&f,isResettingPassword:!1,error:y,password:g||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(E(new a("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(U(D),A({shouldCallAuthOnSuccess:T})):(E(new a("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:C,onPasswordGenerate:()=>C(p()),onSubmit:async()=>(j(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>j(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-DymQMSJy.mjs";import{P as d}from"./Button-DJ-mtuuD.mjs";import{M as m,B as u}from"./ModalHeader-D7WajfD8.mjs";import{C as h}from"./ScreenHeader-Biz1wq02.mjs";import{u as y}from"./context-Cb5MFcME.mjs";import{u as v}from"./internal-context-Cvo1WmWN.mjs";import{y as g}from"./index-CI666IP9.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BxA7nKxI.mjs";import{U as k}from"./useActiveWallet-hrZcON-K.mjs";import"viem";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BplPx0Pz.mjs";import"./prepareFundingModalData-BUyu5Vhr.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"./events-context-CI0iqAXA.mjs";import"@marsidev/react-turnstile";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-IxRndou_.mjs";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";let S=/*#__PURE__*/n.div.withConfig({displayName:"IconContainer",componentId:"sc-1c4e63fb-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),A={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},b=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(d,{onClick:t,children:"Select backup method"})]});const I={component:()=>{let[s,n]=c(!1),{navigate:d,lastScreen:j,navigateBack:I,setModalData:x,data:M,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=y(),{closePrivyModal:R}=v(),F=p(O),B=null===F,{isInAccountCreateFlow:D,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=M.recoverySelection,H=F&&"privy"!==F.recoveryMethod,L=H?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:A[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){x({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),d("RecoveryOAuthScreen")}function q(){M?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:M?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return P.current=q,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{onClose:q,backFn:s?()=>n(!1):j?I:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(b,{onClose:()=>n(!1)}):/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(h,{title:H?"Update backup method":"Secure your account",icon:/*#__PURE__*/o(t,{width:48}),description:L}),/*#__PURE__*/o(f,{children:W.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(F?.recoveryMethod||"")||e!==F?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e(k,{onClick:()=>Y("google-drive"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(C,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e(k,{onClick:()=>Y("icloud"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(w,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e(k,{onClick:()=>{d(g({isCreatingWallet:B,skipSplashScreen:!0}))},children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(i,{style:{width:18}})}),E?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/o(u,{})]})}};export{I as RecoverySelectionScreen,I as default};
@@ -0,0 +1 @@
1
+ import{styled as a}from"styled-components";const e=/*#__PURE__*/a.span.withConfig({displayName:"Rows",componentId:"sc-b764aab6-0"})(["display:flex;flex-direction:column;gap:0.35rem;width:100%;"]),o=/*#__PURE__*/a.span.withConfig({displayName:"Row",componentId:"sc-b764aab6-1"})(["display:flex;width:100%;justify-content:space-between;gap:0.5rem;"]);export{o as R,e as a};
@@ -0,0 +1,8 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-hrZcON-K.mjs";import{M as a,B as t}from"./ModalHeader-D7WajfD8.mjs";import{N as c}from"./index-CJMgUOnw.mjs";const l=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/o.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/o(a).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/o.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0)),h=/*#__PURE__*/o.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let m=/*#__PURE__*/o.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),v=/*#__PURE__*/o.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),f=/*#__PURE__*/o.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),u=/*#__PURE__*/o.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),y=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),b=/*#__PURE__*/o.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),x=/*#__PURE__*/o.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e(l,{children:/*#__PURE__*/e(d,{...i,children:r})});let C=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),k=/*#__PURE__*/o(t).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),I=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),N=({step:r})=>r?/*#__PURE__*/e(C,{children:/*#__PURE__*/e(I,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:a,iconLoadingStatus:t,showBack:c,onBack:l,showInfo:d,onInfo:g,showClose:h,onClose:y,step:b,...x})=>/*#__PURE__*/r(s,{...x,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:h?y:void 0,closeable:h}),(n||a||i||o)&&/*#__PURE__*/r(m,{children:[n||a?/*#__PURE__*/e(w.Icon,{icon:n,variant:a,loadingStatus:t}):null,/*#__PURE__*/r(v,{children:[i&&/*#__PURE__*/e(f,{children:i}),o&&/*#__PURE__*/e(u,{children:o})]})]}),b&&/*#__PURE__*/e(N,{step:b})]}),(w.Body=/*#__PURE__*/i.forwardRef((({children:r,...i},o)=>/*#__PURE__*/e(g,{ref:o,...i,children:r})))).displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e(E,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(S,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(k,{}),w.Icon=({icon:o,variant:a="subtle",loadingStatus:t})=>"logo"===a&&o?/*#__PURE__*/e(b,"string"==typeof o?{children:/*#__PURE__*/e("img",{src:o,alt:""})}:/*#__PURE__*/i.isValidElement(o)?{children:o}:{children:/*#__PURE__*/i.createElement(o)}):"loading"===a?o?
2
+ /*#__PURE__*/e(x,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:t?.success,fail:t?.fail}),"string"==typeof o?
3
+ /*#__PURE__*/e("span",{style:{background:`url('${o}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/i.isValidElement(o)?
4
+ /*#__PURE__*/i.cloneElement(o,{style:{width:"38px",height:"38px"}}):
5
+ /*#__PURE__*/i.createElement(o,{style:{width:"38px",height:"38px"}})]})}):
6
+ /*#__PURE__*/e(y,{$variant:a,children:/*#__PURE__*/e(c,{size:"64px"})}):/*#__PURE__*/e(y,{$variant:a,children:o&&("string"==typeof o?
7
+ /*#__PURE__*/e("img",{src:o,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):/*#__PURE__*/i.isValidElement(o)?o:
8
+ /*#__PURE__*/i.createElement(o,{width:32,height:32,stroke:(()=>{switch(a){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let E=/*#__PURE__*/o.div.withConfig({displayName:"ActionsContainer",componentId:"sc-2e815abe-16"})(["width:100%;display:flex;flex-direction:column;gap:calc(var(--screen-space) / 2);"]),S=/*#__PURE__*/o.p.withConfig({displayName:"HelpTextContainer",componentId:"sc-2e815abe-17"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-foreground-3);font-size:14px;line-height:22px;& a{color:var(--privy-color-accent);}}"]);export{w as S};
@@ -0,0 +1,2 @@
1
+ import{jsxs as t,jsx as e,Fragment as i}from"react/jsx-runtime";import{styled as n}from"styled-components";const o=({title:n,description:o,children:r,...c})=>
2
+ /*#__PURE__*/e(l,{...c,children:/*#__PURE__*/t(i,{children:[/*#__PURE__*/e("h3",{children:n}),"string"==typeof o?/*#__PURE__*/e("p",{children:o}):o,r]})}),r=({title:i,description:n,icon:o,children:r,...l})=>/*#__PURE__*/t(c,{...l,children:[o||null,/*#__PURE__*/e("h3",{children:i}),n&&"string"==typeof n?/*#__PURE__*/e("p",{children:n}):n,r]});let l=/*#__PURE__*/n.div.withConfig({displayName:"StyledSection",componentId:"sc-523a75d6-1"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;width:100%;margin-bottom:24px;&& h3{font-size:17px;color:var(--privy-color-foreground);}&& p{color:var(--privy-color-foreground-2);font-size:14px;}"]),c=/*#__PURE__*/n(l).withConfig({displayName:"CenteredStyledSection",componentId:"sc-523a75d6-2"})(["align-items:center;text-align:center;gap:16px;h3{margin-bottom:24px;}"]);export{r as C,o as S};
@@ -0,0 +1 @@
1
+ import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{B as t}from"./Button-DJ-mtuuD.mjs";import{S as a}from"./Screen-dwi2CitY.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:s,watermark:c=!0,children:d,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,a=e.variant||"primary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,a=e.variant||"secondary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),d?/*#__PURE__*/l(a.Body,{children:d}):null,s||o||c?/*#__PURE__*/r(a.Footer,{children:[s?/*#__PURE__*/l(a.HelpText,{children:s}):null,o?/*#__PURE__*/l(a.Actions,{children:o}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null]})};export{n as S};