@privy-io/react-auth 3.19.0 → 3.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-SsWHrdYE.js → AccountNotFoundScreen-DYCTyTXs.js} +1 -1
  2. package/dist/cjs/{Address-iycC7llp.js → Address-Ds4v-4rw.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-WNhpSCGi.js → AffirmativeConsentScreen-Ci_n8F7E.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-B_YmLFLH.js → AllowlistRejectionScreen-C6yc1rZa.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-W9B_xuW1.js → AuthenticateWithWalletScreen-Cup7QUgo.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-CiwL7LcA.js → AwaitingEvmToSolBridgingScreen-Cpnr_izr.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-DYhCX2B7.js → AwaitingExternalEthereumTransferScreen-zRK6yPYM.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-BgMm2oql.js → AwaitingPasswordlessCodeScreen-amPszhnW.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-xE2Ivbu8.js → AwaitingSolToEvmBridgingScreen-Do2M-C2L.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-dTXi9WId.js → BridgeNetworkSelectionView-Dd3bdElY.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-C9UnN57O.js → CaptchaScreen-C-egLUdb.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-A_KP9ZVh.js → CoinbaseOnrampStatusScreen-CR3tKa46.js} +1 -1
  13. package/dist/cjs/ConnectEmailForm-Dj4G-mBL.js +3 -0
  14. package/dist/cjs/{ConnectLedgerScreen-Cs9nP7S2.js → ConnectLedgerScreen-Br-usLx2.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen--jqUYCWy.js → ConnectOnlyLandingScreen-BPTOHq0C.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-Dko5naBk.js → ConnectOnlyStatusScreen-DrSmKwPi.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-W7oTt7SU.js → ConnectOrCreateScreen-CItBL0nw.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-ZgGd_1N7.js → ConnectPhoneForm-D8ABvo-Z.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-DwqKpWZW.js → ConnectWalletView-wV2bTjd1.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-DqTzyQkX.js → ConnectionStatusScreen-CYpmKmHf.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-QmvRtcUx.js → CrossAppAuthScreen-ChEqNPoH.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-3sRiTxzr.js → CustomLandingScreenView-wzEg-LtH.js} +1 -1
  23. package/dist/cjs/{DelegatedActionsConsentScreen-DgvDevuK.js → DelegatedActionsConsentScreen-CDIGJnMw.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-BzfeoGlg.js → DelegatedActionsRevokeScreen-w5UPIVfX.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-B1YKEWJJ.js → EmbeddedWalletConnectingScreen-DfhljwSW.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-Fngy_Z7Z.js → EmbeddedWalletCreatedScreen-BWK6pbWG.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-B_8UQSK5.js → EmbeddedWalletKeyExportScreen-E9GUABG0.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-ByXaeqs_.js → EmbeddedWalletOnAccountCreateScreen-C6dId_1t.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-D3_g6Z9E.js → EmbeddedWalletPasswordUpdateScreen-DxAwGvFN.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-BTTzo0Nh.js → EmbeddedWalletPasswordUpdateSplashScreen-DrfuXtRx.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-C-oJNOLO.js → EnrollTotp-BEiiS2UB.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-BOIQ9Iwp.js → ErrorScreen-BScbES9D.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-7dcgDoLO.js → FarcasterConnectStatusScreen-qUEMDq9f.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-DEnUiPDy.js → FarcasterSignerStatusScreen-lqX_4kxb.js} +1 -1
  35. package/dist/cjs/{FiatOnrampScreen-DfMbEpLz.js → FiatOnrampScreen-DljxP0Mv.js} +1 -1
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-CKsy-0RU.js → FundSolWalletWithExternalSolanaWallet-B8x9e4TY.js} +1 -1
  37. package/dist/cjs/{FundWalletMethodHeader-B67kqHX4.js → FundWalletMethodHeader-2r-I9NM-.js} +1 -1
  38. package/dist/cjs/{FundWithBankDepositScreen-BN8xfFpA.js → FundWithBankDepositScreen-er41PW3w.js} +1 -1
  39. package/dist/cjs/{FundingEditAmountScreen-CqOb6_T5.js → FundingEditAmountScreen-DDRM_NOB.js} +1 -1
  40. package/dist/cjs/{FundingMethodSelectionScreen-fJFztK4M.js → FundingMethodSelectionScreen-lr3OAYNw.js} +1 -1
  41. package/dist/cjs/{InAppBrowserLoginNotPossible-bnagQikv.js → InAppBrowserLoginNotPossible-D5dO3nQl.js} +1 -1
  42. package/dist/cjs/{InstallWalletScreen-CyqS0szB.js → InstallWalletScreen-CfFjKIzG.js} +1 -1
  43. package/dist/cjs/{LandingScreen-DqGmFN52.js → LandingScreen-Pz9zELcJ.js} +1 -1
  44. package/dist/cjs/{LinkConflictScreen-Hv8E3W_9.js → LinkConflictScreen-Bb_I5-Te.js} +1 -1
  45. package/dist/cjs/{LinkEmailScreen-DE4uz-zi.js → LinkEmailScreen-Di-p5vJm.js} +1 -1
  46. package/dist/cjs/{LinkPasskeyScreen-DINSv2Cw.js → LinkPasskeyScreen-Bcgn_taU.js} +1 -1
  47. package/dist/cjs/{LinkPhoneScreen-D5yRjzap.js → LinkPhoneScreen-CFMEPJ0t.js} +1 -1
  48. package/dist/cjs/{LoginFailedScreen-CDk-pwn7.js → LoginFailedScreen-9rLC3NP0.js} +1 -1
  49. package/dist/cjs/{ManualTransferScreen-CAvGP4Cw.js → ManualTransferScreen-D2EclZVn.js} +1 -1
  50. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-aiaV-0Uv.js → MfaAuthEnrollmentFlowScreen-25ay8Vgv.js} +1 -1
  51. package/dist/cjs/{MfaAuthVerifyFlowScreen-DIoi2WYi.js → MfaAuthVerifyFlowScreen-CJ-BYYWM.js} +1 -1
  52. package/dist/cjs/{MfaEnrollmentFlowScreen-BlxwptKt.js → MfaEnrollmentFlowScreen-DUeS5UBj.js} +1 -1
  53. package/dist/cjs/{MfaVerifyFlowScreen-C-ePxfd_.js → MfaVerifyFlowScreen-BTbtGc_Y.js} +1 -1
  54. package/dist/cjs/{ModalHeader-DPbDMuHf.js → ModalHeader-BYzO7cI-.js} +1 -1
  55. package/dist/cjs/MoonpayStatusScreen-INweUDpB.js +16 -0
  56. package/dist/cjs/{OAuthStatusScreen-CfoejRJG.js → OAuthStatusScreen-CyytL7FT.js} +1 -1
  57. package/dist/cjs/{PasskeySelectSignupOrLogin-DD9fXb4k.js → PasskeySelectSignupOrLogin-BdOmRMQe.js} +1 -1
  58. package/dist/cjs/{PasskeyStatusScreen-CsCma4vU.js → PasskeyStatusScreen-D8BF5ph3.js} +1 -1
  59. package/dist/cjs/{PasswordRecoveryScreen-BVfmQnjY.js → PasswordRecoveryScreen-DLc1olFW.js} +1 -1
  60. package/dist/cjs/{QrCode-yq7Uuy-I.js → QrCode-5d8CXJNC.js} +1 -1
  61. package/dist/cjs/{RecoveryOAuthStatusScreen-Wl9S8ozk.js → RecoveryOAuthStatusScreen-P97Qn10e.js} +1 -1
  62. package/dist/cjs/{RecoveryPasswordCreateScreen-CpR3nq4k.js → RecoveryPasswordCreateScreen-D7qbs4YB.js} +1 -1
  63. package/dist/cjs/{RecoverySelectionScreen-B8v3KJ2t.js → RecoverySelectionScreen-CIeH93tq.js} +1 -1
  64. package/dist/cjs/{Screen-D89lHgLy.js → Screen-llJjwrxp.js} +1 -1
  65. package/dist/cjs/{ScreenLayout-eROlbyur.js → ScreenLayout-Eidmvo87.js} +1 -1
  66. package/dist/cjs/{SelectSourceAsset-CTMxHLfc.js → SelectSourceAsset-5tAOAwxT.js} +1 -1
  67. package/dist/cjs/{SetAutomaticRecoveryScreen-DylnsIct.js → SetAutomaticRecoveryScreen-BIJBxtHb.js} +1 -1
  68. package/dist/cjs/{SetWalletPasswordForm-DmJ0uNSz.js → SetWalletPasswordForm-Bn218aUV.js} +1 -1
  69. package/dist/cjs/{SignRequestScreen-C97g_YOw.js → SignRequestScreen-CzkL8_OZ.js} +1 -1
  70. package/dist/cjs/{StandardSignAndSendTransactionScreen-BYoCNZDU.js → StandardSignAndSendTransactionScreen-B_NYTDjh.js} +1 -1
  71. package/dist/cjs/{TelegramAuthScreen-V8PX-ZDY.js → TelegramAuthScreen-C6kXk3kO.js} +1 -1
  72. package/dist/cjs/{TransactionDetails-DaptZw5I.js → TransactionDetails-DxfdvejJ.js} +1 -1
  73. package/dist/cjs/{TransactionErrorView-DMlS9soP.js → TransactionErrorView-C3EX0pEY.js} +1 -1
  74. package/dist/cjs/{TransferFromWalletScreen-D3mttpMw.js → TransferFromWalletScreen-CbKxyZI9.js} +1 -1
  75. package/dist/cjs/{TransferOrBridgeLoadingScreen-yeJf3CeN.js → TransferOrBridgeLoadingScreen-DvNx-nTF.js} +1 -1
  76. package/dist/cjs/UpdateEmailScreen-CEoJvZRy.js +1 -0
  77. package/dist/cjs/{UpdatePhoneScreen-Di0EhXEh.js → UpdatePhoneScreen-B05gtUQK.js} +1 -1
  78. package/dist/cjs/{UserLimitReachedScreen-r2nJEw-F.js → UserLimitReachedScreen-B8KL0BId.js} +1 -1
  79. package/dist/cjs/{WalletInfoCard-BSEQ9ZuG.js → WalletInfoCard-NeYBTrBx.js} +1 -1
  80. package/dist/cjs/{WalletInterstitialScreen-B0b7c8C-.js → WalletInterstitialScreen-BYQ3pudA.js} +1 -1
  81. package/dist/cjs/{WalletLink-px9-j0UX.js → WalletLink-BjNGx38B.js} +1 -1
  82. package/dist/cjs/{WalletOverflowButton-B_wfC2G0.js → WalletOverflowButton-CIy-2ZoT.js} +1 -1
  83. package/dist/cjs/abstract-smart-wallets.js +1 -1
  84. package/dist/cjs/{context-BAKveOwC.js → context-BjjUpD5p.js} +1 -1
  85. package/dist/cjs/{ethers-BN940lEL.js → ethers-ciVcQnjo.js} +1 -1
  86. package/dist/cjs/extended-chains.js +1 -1
  87. package/dist/cjs/{get-entropy-details-for-user-znf4PAFl.js → get-entropy-details-for-user-wkEl61wt.js} +1 -1
  88. package/dist/cjs/{getErc20Balance-C2HeX0xC.js → getErc20Balance-D2ALrsAV.js} +1 -1
  89. package/dist/cjs/{getErc20TokenInfo-BdVxKc8i.js → getErc20TokenInfo-CEs4Dl8g.js} +1 -1
  90. package/dist/cjs/{index-CRJX6e_s.js → index-BZhWzaXl.js} +1 -1
  91. package/dist/cjs/{index-B--7o13p.js → index-CxsK6iOV.js} +3 -3
  92. package/dist/cjs/{index-C18QAA2m.js → index-DN8WQSG4.js} +1 -1
  93. package/dist/cjs/index.js +1 -1
  94. package/dist/cjs/internal.js +1 -1
  95. package/dist/cjs/{privy-context-BvJtlB2I.js → privy-context-D_bfraBb.js} +1 -1
  96. package/dist/cjs/{shared-BsPOVf62.js → shared-BSq7BOqN.js} +1 -1
  97. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-qEV52R11.js → shouldProceedtoEmbeddedWalletCreationFlow-DjivB_oa.js} +1 -1
  98. package/dist/cjs/{smart-wallets-qun8sdo4.js → smart-wallets-D-5DjXBx.js} +1 -1
  99. package/dist/cjs/smart-wallets.js +1 -1
  100. package/dist/cjs/solana.js +1 -1
  101. package/dist/cjs/{styles-yjRZwXww.js → styles-C3jc9Fr1.js} +1 -1
  102. package/dist/cjs/{to-ui-error-1m54Wswj.js → to-ui-error-Bjdw9oEy.js} +1 -1
  103. package/dist/cjs/ui.js +1 -1
  104. package/dist/cjs/{use-export-wallet-BU92CTDl.js → use-export-wallet-0ug9kEzt.js} +1 -1
  105. package/dist/cjs/{use-export-wallet-CobU4v_Q.js → use-export-wallet-CbniK141.js} +1 -1
  106. package/dist/cjs/{useActiveWallet-BBx2W_rS.js → useActiveWallet-B-h9N08f.js} +1 -1
  107. package/dist/cjs/{useGetTokenPrice-B5WCAcBp.js → useGetTokenPrice-D-26qZTh.js} +1 -1
  108. package/dist/cjs/{useI18n-DIxsjQ9B.js → useI18n-CAPzp6vl.js} +1 -1
  109. package/dist/cjs/{usePrivy-uhb6CtaO.js → usePrivy-COyfL9KC.js} +1 -1
  110. package/dist/cjs/{useSolanaRpcClient-mGXfNcZ-.js → useSolanaRpcClient-ra6uo3sD.js} +1 -1
  111. package/dist/cjs/{useWalletBalance-D-Du820J.js → useWalletBalance-DpdYYSSd.js} +1 -1
  112. package/dist/cjs/{useWallets-C7PkfsPn.js → useWallets-3F7K9G5T.js} +1 -1
  113. package/dist/esm/{AccountNotFoundScreen-C5OtLX5Z.mjs → AccountNotFoundScreen-BGKVPOtu.mjs} +1 -1
  114. package/dist/esm/{Address-DjnW56Bj.mjs → Address-uCEGlQhU.mjs} +1 -1
  115. package/dist/esm/{AffirmativeConsentScreen-C5riWiqL.mjs → AffirmativeConsentScreen-VMLckyRD.mjs} +1 -1
  116. package/dist/esm/{AllowlistRejectionScreen-Doq-C6CE.mjs → AllowlistRejectionScreen-fcPBlsKB.mjs} +1 -1
  117. package/dist/esm/{AuthenticateWithWalletScreen-edkTE-4O.mjs → AuthenticateWithWalletScreen-Bt9cf-zV.mjs} +1 -1
  118. package/dist/esm/{AwaitingEvmToSolBridgingScreen-253OZL8g.mjs → AwaitingEvmToSolBridgingScreen-DqwNNSAq.mjs} +1 -1
  119. package/dist/esm/{AwaitingExternalEthereumTransferScreen-cE8_H5Kl.mjs → AwaitingExternalEthereumTransferScreen-C72TxvV3.mjs} +1 -1
  120. package/dist/esm/{AwaitingPasswordlessCodeScreen-BO10KeAt.mjs → AwaitingPasswordlessCodeScreen-aKZPvb2s.mjs} +1 -1
  121. package/dist/esm/{AwaitingSolToEvmBridgingScreen-Bd5UKwsG.mjs → AwaitingSolToEvmBridgingScreen-BoTs-ADD.mjs} +1 -1
  122. package/dist/esm/{BridgeNetworkSelectionView-DB46VHVa.mjs → BridgeNetworkSelectionView-DzzWp4SD.mjs} +1 -1
  123. package/dist/esm/{CaptchaScreen-DUfGAYog.mjs → CaptchaScreen-CaNstdhA.mjs} +1 -1
  124. package/dist/esm/{CoinbaseOnrampStatusScreen-DCHBF8oF.mjs → CoinbaseOnrampStatusScreen-DU-pzP1J.mjs} +1 -1
  125. package/dist/esm/ConnectEmailForm-DyETwtqR.mjs +3 -0
  126. package/dist/esm/{ConnectLedgerScreen-Bjrbf9wS.mjs → ConnectLedgerScreen-D4QXhmr1.mjs} +1 -1
  127. package/dist/esm/{ConnectOnlyLandingScreen-CHhG02AT.mjs → ConnectOnlyLandingScreen-iA6rVvEd.mjs} +1 -1
  128. package/dist/esm/{ConnectOnlyStatusScreen-SGdKkp-M.mjs → ConnectOnlyStatusScreen-DKrUUPNE.mjs} +1 -1
  129. package/dist/esm/{ConnectOrCreateScreen-C-8_VCIH.mjs → ConnectOrCreateScreen-DoWNMZPl.mjs} +1 -1
  130. package/dist/esm/{ConnectPhoneForm-BJKq4xj_.mjs → ConnectPhoneForm-Dnn087oO.mjs} +1 -1
  131. package/dist/esm/{ConnectWalletView-CXu3Gw6w.mjs → ConnectWalletView-BP7oFkWz.mjs} +1 -1
  132. package/dist/esm/{ConnectionStatusScreen-CcPx0tPf.mjs → ConnectionStatusScreen-CHmHFR4r.mjs} +1 -1
  133. package/dist/esm/{CrossAppAuthScreen-jj8MELYk.mjs → CrossAppAuthScreen-CAkf-v9h.mjs} +1 -1
  134. package/dist/esm/{CustomLandingScreenView-bamwAqeL.mjs → CustomLandingScreenView-DmzA26pX.mjs} +1 -1
  135. package/dist/esm/{DelegatedActionsConsentScreen-C8vuydg_.mjs → DelegatedActionsConsentScreen-Dfgw0U2Z.mjs} +1 -1
  136. package/dist/esm/{DelegatedActionsRevokeScreen-CX3fQC0_.mjs → DelegatedActionsRevokeScreen-DtPjgKBF.mjs} +1 -1
  137. package/dist/esm/{EmbeddedWalletConnectingScreen-T95TUkFg.mjs → EmbeddedWalletConnectingScreen-C7NhIf9g.mjs} +1 -1
  138. package/dist/esm/{EmbeddedWalletCreatedScreen-CGs6ATdZ.mjs → EmbeddedWalletCreatedScreen-C5thW9cQ.mjs} +1 -1
  139. package/dist/esm/{EmbeddedWalletKeyExportScreen-DSuDdWjx.mjs → EmbeddedWalletKeyExportScreen-DjKXD9Ex.mjs} +1 -1
  140. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-CTV4Mo3e.mjs → EmbeddedWalletOnAccountCreateScreen-gHJhlnc8.mjs} +1 -1
  141. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-B1anqUGL.mjs → EmbeddedWalletPasswordUpdateScreen-Ba-mWed1.mjs} +1 -1
  142. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CIh8X6ji.mjs → EmbeddedWalletPasswordUpdateSplashScreen-CzVHxSH5.mjs} +1 -1
  143. package/dist/esm/{EnrollTotp-CzAUPBBL.mjs → EnrollTotp-Co7Paw_X.mjs} +1 -1
  144. package/dist/esm/{ErrorScreen-D_oZv5-L.mjs → ErrorScreen-dMCodcFQ.mjs} +1 -1
  145. package/dist/esm/{FarcasterConnectStatusScreen-B8KI1d_Z.mjs → FarcasterConnectStatusScreen-DDEDul9Q.mjs} +1 -1
  146. package/dist/esm/{FarcasterSignerStatusScreen-D03jhZYX.mjs → FarcasterSignerStatusScreen-0TUs3DzO.mjs} +1 -1
  147. package/dist/esm/{FiatOnrampScreen-Du45zPAv.mjs → FiatOnrampScreen-DMGyDOeQ.mjs} +1 -1
  148. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-FbcRItfz.mjs → FundSolWalletWithExternalSolanaWallet-uymzX1mn.mjs} +1 -1
  149. package/dist/esm/{FundWalletMethodHeader-DI7zmHzS.mjs → FundWalletMethodHeader-BCwf858J.mjs} +1 -1
  150. package/dist/esm/{FundWithBankDepositScreen-C13Zljni.mjs → FundWithBankDepositScreen-DAkmrein.mjs} +1 -1
  151. package/dist/esm/{FundingEditAmountScreen-BBpobzZI.mjs → FundingEditAmountScreen-BHcnUSyr.mjs} +1 -1
  152. package/dist/esm/{FundingMethodSelectionScreen-CPdqedYS.mjs → FundingMethodSelectionScreen-CulEjme5.mjs} +1 -1
  153. package/dist/esm/{InAppBrowserLoginNotPossible-C1G59clA.mjs → InAppBrowserLoginNotPossible-CKRjtm8l.mjs} +1 -1
  154. package/dist/esm/{InstallWalletScreen-C-ei-NFv.mjs → InstallWalletScreen-DtcYeSdQ.mjs} +1 -1
  155. package/dist/esm/{LandingScreen-CQ45HDbl.mjs → LandingScreen-3Op5KD-K.mjs} +1 -1
  156. package/dist/esm/{LinkConflictScreen-DqXwl3Eg.mjs → LinkConflictScreen-WMjKThJG.mjs} +1 -1
  157. package/dist/esm/{LinkEmailScreen-CYbgRIbn.mjs → LinkEmailScreen-iRP0dJfw.mjs} +1 -1
  158. package/dist/esm/{LinkPasskeyScreen-BQhZsrBK.mjs → LinkPasskeyScreen-b7O9zyXf.mjs} +1 -1
  159. package/dist/esm/{LinkPhoneScreen-ClKxo5cr.mjs → LinkPhoneScreen-TW2GHgvq.mjs} +1 -1
  160. package/dist/esm/{LoginFailedScreen-BJ4M6Kn-.mjs → LoginFailedScreen-dK2wDOdF.mjs} +1 -1
  161. package/dist/esm/{ManualTransferScreen-C9qPhAAZ.mjs → ManualTransferScreen-rNuduBb4.mjs} +1 -1
  162. package/dist/esm/{MfaAuthEnrollmentFlowScreen-mbqTiHql.mjs → MfaAuthEnrollmentFlowScreen-Dn8p786O.mjs} +1 -1
  163. package/dist/esm/{MfaAuthVerifyFlowScreen-DgphGRo7.mjs → MfaAuthVerifyFlowScreen-C0nLWIBE.mjs} +1 -1
  164. package/dist/esm/{MfaEnrollmentFlowScreen-BjYhGDOo.mjs → MfaEnrollmentFlowScreen-B2txTn7i.mjs} +1 -1
  165. package/dist/esm/{MfaVerifyFlowScreen-DRc1xPzc.mjs → MfaVerifyFlowScreen-J6Y0uDOE.mjs} +1 -1
  166. package/dist/esm/{ModalHeader-BxZPF7qd.mjs → ModalHeader-DoJRUrfg.mjs} +1 -1
  167. package/dist/esm/MoonpayStatusScreen-BeMAl9M_.mjs +16 -0
  168. package/dist/esm/{OAuthStatusScreen-C7AflQnS.mjs → OAuthStatusScreen-Bv2Y62oh.mjs} +1 -1
  169. package/dist/esm/{PasskeySelectSignupOrLogin-Bbx2Drep.mjs → PasskeySelectSignupOrLogin-uB4k-3wi.mjs} +1 -1
  170. package/dist/esm/{PasskeyStatusScreen-CA7_egXn.mjs → PasskeyStatusScreen-6eoKjzOh.mjs} +1 -1
  171. package/dist/esm/{PasswordRecoveryScreen-BuXptYA9.mjs → PasswordRecoveryScreen-Cz7wlwkb.mjs} +1 -1
  172. package/dist/esm/{QrCode-DoSGd0gd.mjs → QrCode-DvdS2fTl.mjs} +1 -1
  173. package/dist/esm/{RecoveryOAuthStatusScreen-g1unBUdr.mjs → RecoveryOAuthStatusScreen-XoCZHVWf.mjs} +1 -1
  174. package/dist/esm/{RecoveryPasswordCreateScreen-DJZV0PyW.mjs → RecoveryPasswordCreateScreen-rqUOx9UX.mjs} +1 -1
  175. package/dist/esm/{RecoverySelectionScreen-CP89GXeT.mjs → RecoverySelectionScreen-CKOt3Nut.mjs} +1 -1
  176. package/dist/esm/{Screen-Cce_5_X_.mjs → Screen-B0W_mkID.mjs} +1 -1
  177. package/dist/esm/{ScreenLayout-CHf1S-9L.mjs → ScreenLayout-dQPPBTHQ.mjs} +1 -1
  178. package/dist/esm/{SelectSourceAsset-QWi9hDN9.mjs → SelectSourceAsset-CDqDZcxU.mjs} +1 -1
  179. package/dist/esm/{SetAutomaticRecoveryScreen-B0MtWhUx.mjs → SetAutomaticRecoveryScreen-Da8-JK8H.mjs} +1 -1
  180. package/dist/esm/{SetWalletPasswordForm-BXbILvyT.mjs → SetWalletPasswordForm-Buvk-M6N.mjs} +1 -1
  181. package/dist/esm/{SignRequestScreen-D_YVDOBu.mjs → SignRequestScreen-CTaSpjNs.mjs} +1 -1
  182. package/dist/esm/{StandardSignAndSendTransactionScreen-AliHQit_.mjs → StandardSignAndSendTransactionScreen-Cd1dGoKG.mjs} +1 -1
  183. package/dist/esm/{TelegramAuthScreen-DWjN9i1k.mjs → TelegramAuthScreen-Bm4n4XFQ.mjs} +1 -1
  184. package/dist/esm/{TransactionDetails-8XGJZ0Ge.mjs → TransactionDetails-MNqLr6QY.mjs} +1 -1
  185. package/dist/esm/{TransactionErrorView-D9VQgKHy.mjs → TransactionErrorView-Co2Eii6d.mjs} +1 -1
  186. package/dist/esm/{TransferFromWalletScreen-CPcbM8ct.mjs → TransferFromWalletScreen-B4Wk_wXp.mjs} +1 -1
  187. package/dist/esm/{TransferOrBridgeLoadingScreen-tI8x9TKA.mjs → TransferOrBridgeLoadingScreen-B3FvN69W.mjs} +1 -1
  188. package/dist/esm/UpdateEmailScreen-DmviL5du.mjs +1 -0
  189. package/dist/esm/{UpdatePhoneScreen-B0uTQUE2.mjs → UpdatePhoneScreen-C4ldfBEK.mjs} +1 -1
  190. package/dist/esm/{UserLimitReachedScreen-2MyKh-yy.mjs → UserLimitReachedScreen-_GDlzsLL.mjs} +1 -1
  191. package/dist/esm/{WalletInfoCard-D5bstd0h.mjs → WalletInfoCard-Z6TrQ80y.mjs} +1 -1
  192. package/dist/esm/{WalletInterstitialScreen-DwXL1Xbn.mjs → WalletInterstitialScreen-CLq6H8SB.mjs} +1 -1
  193. package/dist/esm/{WalletLink-DbseEfVp.mjs → WalletLink-BNfCTkNd.mjs} +1 -1
  194. package/dist/esm/{WalletOverflowButton-rYLbxS3a.mjs → WalletOverflowButton-qWufTlwe.mjs} +1 -1
  195. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  196. package/dist/esm/{context-BDvZRT56.mjs → context-qQM1iNfa.mjs} +1 -1
  197. package/dist/esm/{ethers-CljtMjlx.mjs → ethers-Dhr2H_97.mjs} +1 -1
  198. package/dist/esm/extended-chains.mjs +1 -1
  199. package/dist/esm/{get-entropy-details-for-user-CgVPjq_6.mjs → get-entropy-details-for-user-Czn6Jw3y.mjs} +1 -1
  200. package/dist/esm/{getErc20Balance-Bak89VUo.mjs → getErc20Balance-CNjvj6se.mjs} +1 -1
  201. package/dist/esm/{getErc20TokenInfo-PgoronUM.mjs → getErc20TokenInfo-BqGSedRu.mjs} +1 -1
  202. package/dist/esm/{index-DehjclA2.mjs → index-BzR5msOu.mjs} +1 -1
  203. package/dist/esm/{index-t8luNMU8.mjs → index-DEMX6Xep.mjs} +3 -3
  204. package/dist/esm/{index-Ch8BunPr.mjs → index-nLlScNzY.mjs} +1 -1
  205. package/dist/esm/index.mjs +1 -1
  206. package/dist/esm/internal.mjs +1 -1
  207. package/dist/esm/{privy-context-v-TMVBdt.mjs → privy-context-BN6uOGsO.mjs} +1 -1
  208. package/dist/esm/{shared-BwdRCoW3.mjs → shared-DavaAwrU.mjs} +1 -1
  209. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-eFXUIOL2.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C2YnkwWb.mjs} +1 -1
  210. package/dist/esm/{smart-wallets-CUCYKFEU.mjs → smart-wallets-BgTR6hXN.mjs} +1 -1
  211. package/dist/esm/smart-wallets.mjs +1 -1
  212. package/dist/esm/solana.mjs +1 -1
  213. package/dist/esm/{styles-BHXHIG4L.mjs → styles-DxVNgMho.mjs} +1 -1
  214. package/dist/esm/{to-ui-error-BxE1Clcw.mjs → to-ui-error-dkzrkcpQ.mjs} +1 -1
  215. package/dist/esm/ui.mjs +1 -1
  216. package/dist/esm/{use-export-wallet-C3yKuILk.mjs → use-export-wallet-Bu3_93lu.mjs} +1 -1
  217. package/dist/esm/{use-export-wallet-CjuVPfu7.mjs → use-export-wallet-CemsKgWi.mjs} +1 -1
  218. package/dist/esm/{useActiveWallet-CLfuK4Fv.mjs → useActiveWallet--d716S0q.mjs} +1 -1
  219. package/dist/esm/{useGetTokenPrice-B5d8vo-7.mjs → useGetTokenPrice-JxtZgqMH.mjs} +1 -1
  220. package/dist/esm/{useI18n-B7zlT24x.mjs → useI18n-CJgqqj7B.mjs} +1 -1
  221. package/dist/esm/{usePrivy-B1AsvC0i.mjs → usePrivy-BlM-XgWI.mjs} +1 -1
  222. package/dist/esm/{useSolanaRpcClient-PuydY50L.mjs → useSolanaRpcClient-DBfgMIVD.mjs} +1 -1
  223. package/dist/esm/{useWalletBalance-DebUrdhO.mjs → useWalletBalance-BFiTJAWW.mjs} +1 -1
  224. package/dist/esm/{useWallets-CGkwKA_6.mjs → useWallets-Bjl0fq_c.mjs} +1 -1
  225. package/package.json +9 -9
  226. package/dist/cjs/ConnectEmailForm-C8fmK8xT.js +0 -3
  227. package/dist/cjs/MoonpayStatusScreen-DuiX8J3j.js +0 -16
  228. package/dist/cjs/UpdateEmailScreen-HWXa5jkm.js +0 -1
  229. package/dist/esm/ConnectEmailForm-BC_yo8km.mjs +0 -3
  230. package/dist/esm/MoonpayStatusScreen-d57zC4KR.mjs +0 -16
  231. package/dist/esm/UpdateEmailScreen-DTJvoOp1.mjs +0 -1
@@ -1 +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{M as c,b as m,P as d,S as h}from"./ModalHeader-BxZPF7qd.mjs";import{L as u}from"./useActiveWallet-CLfuK4Fv.mjs";import{u as p}from"./context-BDvZRT56.mjs";import{u as y}from"./internal-context-C4ZqP8IF.mjs";import{a as f,u as v}from"./privy-context-v-TMVBdt.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-t8luNMU8.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-CzAUPBBL.mjs";import P from"@heroicons/react/24/outline/CheckCircleIcon";import F from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as x}from"@privy-io/js-sdk-core";import{C as R}from"./ConnectPhoneForm-BJKq4xj_.mjs";import{I as L,T,S as W,C as A,a as B,B as U,N,A as O,L as q,b as D,c as Y}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as $}from"./ErrorScreen-D_oZv5-L.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.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-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-BQhZsrBK.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-CHf1S-9L.mjs";import"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-DSTf_eKU.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-DoSGd0gd.mjs";import"qrcode";import"./reservoir-DGil2p_K.mjs";const z=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,y]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=f(),q=p();function D(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e($,{allowlistConfig:q.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"Set up SMS verification"}),/*#__PURE__*/o(W,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(R,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(B,{children:["By providing your mobile number, you agree to receive text messages from ",q?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:D},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"SMS verification added"}),/*#__PURE__*/o(W,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(U,{children:/*#__PURE__*/e(d,{onClick:D,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"Enter enrollment code"}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(N,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),y(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(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(W,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:x(s)})]})]}),/*#__PURE__*/e(m,{})]})},H={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,P]=a(null),{unenrollWithSms:F,unenrollWithTotp:x,unenrollWithPasskey:R,submitEnrollmentWithTotp:B,initEnrollmentWithPasskey:N,submitEnrollmentWithPasskey:$,initEnrollmentWithTotp:H}=C(),{data:Q,onUserCloseViaDialogOrKeybindRef:V}=f(),X=p(),{closePrivyModal:G}=y(),{promptMfa:K}=b(),[Z,J]=a(!1),[_,ee]=a(null),[oe,re]=a(null),te=()=>{G({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{P(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();V.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){P(null),ee(null)}async function ye(e=ue){ie(!0);try{return await N(),await $({credentialIds:e},{removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&J(!0)}),[he]),!g||!w||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(A,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove SMS verification?"}),/*#__PURE__*/o(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await F()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await x()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await R({removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===Q.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Add more security"}),/*#__PURE__*/o(W,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(U,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let fe=!he&&!Z;return fe?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Transaction Protection"}),/*#__PURE__*/e(W,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(q,{children:[/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(Y,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(Y,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(U,{children:[/*#__PURE__*/e(d,{onClick:()=>J(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===_?/*#__PURE__*/e(z,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===_&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await B({mfaCode:e}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{P(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===_?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:ye}):/*#__PURE__*/e(I,{showIntro:fe,userMfaMethods:w.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){J(!1)},handleSelectMethod:async function(e){try{await K()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void H().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await ye():void ee(e)},isTotpLoading:"totp"===_&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await K()}catch(e){return void ae(e)}P(e)}})}};export{H as MfaEnrollmentFlowScreen,H as default};
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{M as c,b as m,P as d,S as h}from"./ModalHeader-DoJRUrfg.mjs";import{L as u}from"./useActiveWallet--d716S0q.mjs";import{u as p}from"./context-qQM1iNfa.mjs";import{u as y}from"./internal-context-C4ZqP8IF.mjs";import{a as f,u as v}from"./privy-context-BN6uOGsO.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-DEMX6Xep.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-Co7Paw_X.mjs";import P from"@heroicons/react/24/outline/CheckCircleIcon";import F from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as x}from"@privy-io/js-sdk-core";import{C as R}from"./ConnectPhoneForm-Dnn087oO.mjs";import{I as L,T,S as W,C as A,a as B,B as U,N,A as O,L as q,b as D,c as Y}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as $}from"./ErrorScreen-dMCodcFQ.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.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-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-b7O9zyXf.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-dQPPBTHQ.mjs";import"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-DSTf_eKU.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-DvdS2fTl.mjs";import"qrcode";import"./reservoir-DGil2p_K.mjs";const z=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,y]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=f(),q=p();function D(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e($,{allowlistConfig:q.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"Set up SMS verification"}),/*#__PURE__*/o(W,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(R,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(B,{children:["By providing your mobile number, you agree to receive text messages from ",q?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:D},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"SMS verification added"}),/*#__PURE__*/o(W,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(U,{children:/*#__PURE__*/e(d,{onClick:D,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"Enter enrollment code"}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(N,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),y(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(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(W,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:x(s)})]})]}),/*#__PURE__*/e(m,{})]})},H={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,P]=a(null),{unenrollWithSms:F,unenrollWithTotp:x,unenrollWithPasskey:R,submitEnrollmentWithTotp:B,initEnrollmentWithPasskey:N,submitEnrollmentWithPasskey:$,initEnrollmentWithTotp:H}=C(),{data:Q,onUserCloseViaDialogOrKeybindRef:V}=f(),X=p(),{closePrivyModal:G}=y(),{promptMfa:K}=b(),[Z,J]=a(!1),[_,ee]=a(null),[oe,re]=a(null),te=()=>{G({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{P(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();V.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){P(null),ee(null)}async function ye(e=ue){ie(!0);try{return await N(),await $({credentialIds:e},{removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&J(!0)}),[he]),!g||!w||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(A,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove SMS verification?"}),/*#__PURE__*/o(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await F()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await x()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(W,{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(U,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await R({removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===Q.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Add more security"}),/*#__PURE__*/o(W,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(U,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let fe=!he&&!Z;return fe?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(L,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Transaction Protection"}),/*#__PURE__*/e(W,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(q,{children:[/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(Y,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/e(Y,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(U,{children:[/*#__PURE__*/e(d,{onClick:()=>J(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===_?/*#__PURE__*/e(z,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===_&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await B({mfaCode:e}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{P(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===_?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:ye}):/*#__PURE__*/e(I,{showIntro:fe,userMfaMethods:w.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){J(!1)},handleSelectMethod:async function(e){try{await K()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void H().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await ye():void ee(e)},isTotpLoading:"totp"===_&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await K()}catch(e){return void ae(e)}P(e)}})}};export{H as MfaEnrollmentFlowScreen,H as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{useMemo as t,useState as e,useEffect as r,useRef as i}from"react";import{u as s}from"./context-BDvZRT56.mjs";import{u as m}from"./privy-context-v-TMVBdt.mjs";import{u as n}from"./index-t8luNMU8.mjs";import{V as a,a as c,b as l,t as p}from"./to-ui-error-BxE1Clcw.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@privy-io/are-addresses-equal";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.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-BxZPF7qd.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-CHf1S-9L.mjs";import"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-B5d8vo-7.mjs";import"./useGetSolPrice-DaxM-vxD.mjs";import"./TransactionDetails-8XGJZ0Ge.mjs";import"./WalletLink-DbseEfVp.mjs";import"./ethers-CljtMjlx.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u=({onClose:u})=>{let{user:d}=m(),h=s(),j=t((()=>d?.mfaMethods.filter((o=>"passkey"!==o||!h.globalDisablePasskeys))??[]),[d?.mfaMethods,h.globalDisablePasskeys]),[f,v]=e(j[0]??null),{init:y,cancel:k,submit:g}=n(),[b,w]=e(!1),[I,x]=e(null),[C,P]=e();r((()=>{v(j[0]??null)}),[j]);let S=i(!1);async function M(o){P(void 0);try{if(!o||!f)return;await g(f,o),w(!0),P(void 0),u()}catch(o){throw p(o).error}}async function A(o){if("passkey"!==o)try{v(o),await y(o)}catch(o){console.error(o)}else try{v(o);let t=await y(o);if(!t)throw Error("something went wrong");x(t),await g(o,t),w(!0),P(void 0),u()}catch(o){P(p(o))}}r((()=>{!S.current&&f&&(S.current=!0,A(f).finally((()=>{S.current=!1})))}),[]);let B=()=>{v(null),P(void 0),k(),u()};return d?"passkey"===f?/*#__PURE__*/o(a,{account:d.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:b,hasBlockingError:C?.isBlocking??!1,error:C?.error,onClose:B,onBack:()=>{v(null),P(void 0)},handleSubmit:()=>M(I).catch(P)}):f?/*#__PURE__*/o(c,{submitSuccess:b,hasBlockingError:C?.isBlocking??!1,handleSubmitCode:M,selectedMethod:f,onClose:B,onBack:j.length>1?()=>v(null):void 0}):/*#__PURE__*/o(l,{mfaMethods:j,onSelect:A,handleClose:B}):null};export{u as MfaVerifyFlowScreen,u as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{useMemo as t,useState as e,useEffect as r,useRef as i}from"react";import{u as s}from"./context-qQM1iNfa.mjs";import{u as m}from"./privy-context-BN6uOGsO.mjs";import{u as n}from"./index-DEMX6Xep.mjs";import{V as a,a as c,b as l,t as p}from"./to-ui-error-dkzrkcpQ.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@privy-io/are-addresses-equal";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.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-DoJRUrfg.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-dQPPBTHQ.mjs";import"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-JxtZgqMH.mjs";import"./useGetSolPrice-DaxM-vxD.mjs";import"./TransactionDetails-MNqLr6QY.mjs";import"./WalletLink-BNfCTkNd.mjs";import"./ethers-Dhr2H_97.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u=({onClose:u})=>{let{user:d}=m(),h=s(),j=t((()=>d?.mfaMethods.filter((o=>"passkey"!==o||!h.globalDisablePasskeys))??[]),[d?.mfaMethods,h.globalDisablePasskeys]),[f,v]=e(j[0]??null),{init:y,cancel:k,submit:g}=n(),[b,w]=e(!1),[I,x]=e(null),[C,P]=e();r((()=>{v(j[0]??null)}),[j]);let S=i(!1);async function M(o){P(void 0);try{if(!o||!f)return;await g(f,o),w(!0),P(void 0),u()}catch(o){throw p(o).error}}async function A(o){if("passkey"!==o)try{v(o),await y(o)}catch(o){console.error(o)}else try{v(o);let t=await y(o);if(!t)throw Error("something went wrong");x(t),await g(o,t),w(!0),P(void 0),u()}catch(o){P(p(o))}}r((()=>{!S.current&&f&&(S.current=!0,A(f).finally((()=>{S.current=!1})))}),[]);let B=()=>{v(null),P(void 0),k(),u()};return d?"passkey"===f?/*#__PURE__*/o(a,{account:d.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:b,hasBlockingError:C?.isBlocking??!1,error:C?.error,onClose:B,onBack:()=>{v(null),P(void 0)},handleSubmit:()=>M(I).catch(P)}):f?/*#__PURE__*/o(c,{submitSuccess:b,hasBlockingError:C?.isBlocking??!1,handleSubmitCode:M,selectedMethod:f,onClose:B,onBack:j.length>1?()=>v(null):void 0}):/*#__PURE__*/o(l,{mfaMethods:j,onSelect:A,handleClose:B}):null};export{u as MfaVerifyFlowScreen,u as default};
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{u as c}from"./context-BDvZRT56.mjs";import{B as i}from"./useActiveWallet-CLfuK4Fv.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as s}from"./internal-context-C4ZqP8IF.mjs";function v(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=a.span`
1
+ import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{u as c}from"./context-qQM1iNfa.mjs";import{B as i}from"./useActiveWallet--d716S0q.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as s}from"./internal-context-C4ZqP8IF.mjs";function v(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=a.span`
2
2
  margin-top: 16px;
3
3
  font-size: 13px;
4
4
  text-align: center;
@@ -0,0 +1,16 @@
1
+ import{jsx as r,jsxs as e,Fragment as t}from"react/jsx-runtime";import o 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{M as s,B as l,P as c}from"./ModalHeader-DoJRUrfg.mjs";import{a as m}from"./Layouts-BlFm53ED.mjs";import{L as d,O as u}from"./useActiveWallet--d716S0q.mjs";import{u as p}from"./context-qQM1iNfa.mjs";import{u as h}from"./internal-context-C4ZqP8IF.mjs";import{a as f}from"./privy-context-BN6uOGsO.mjs";import{u as g}from"./index-nLlScNzY.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"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./analytics-mkkvFRju.mjs";const y=({size:t=61,...o})=>/*#__PURE__*/r("svg",{width:t,height:t,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/r("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/r("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 v={component:()=>{let{data:o,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:c}=h(),m=g(o?.moonpayStatus?.externalTransactionId||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(s,{title:"Fund account",backFn:()=>{let r={...o?.funding,showAlternateFundingMethod:!0};r.usingDefaultFundingMethod&&(r.usingDefaultFundingMethod=!1),i({funding:r,solanaFundingData:o?.solanaFundingData}),n()}}),/*#__PURE__*/r(C,{status:m,onClickCta:c}),/*#__PURE__*/r(l,{})]})}};let C=({status:o,onClickCta:i})=>{let{title:a,body:s,cta:l}=n((()=>(r=>{switch(r){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:""}}})(o)),[o]);/*#__PURE__*/return e(t,{children:[/*#__PURE__*/e(b,{children:[/*#__PURE__*/r(w,{status:o}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/r("h3",{children:a}),/*#__PURE__*/r(x,{children:s})]})]}),l&&/*#__PURE__*/r(c,{onClick:i,children:l})]})},w=({status:t})=>{if(!t||"pending"===t){let t="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/r(d,{color:t,style:{position:"absolute"}}),/*#__PURE__*/r(u,{color:t}),/*#__PURE__*/r(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/r(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(t),a=(s=t)?{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 r("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/r(n,{width:"4rem",height:"4rem",color:a})})},x=a.p`
2
+ font-size: 1rem;
3
+ color: var(--privy-color-foreground-3);
4
+ margin-bottom: 1rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 1rem;
8
+ `,b=a.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ margin-left: 1.75rem;
14
+ margin-right: 1.75rem;
15
+ padding: 2rem 0;
16
+ `;export{v as MoonpayStatusScreen,v as default};
@@ -1 +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"./privy-context-v-TMVBdt.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 v,G as y}from"./twitter-BoAxhlj6.mjs";import h from"@heroicons/react/24/outline/GlobeAltIcon";import{T as f,L as g}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-BDvZRT56.mjs";import{c as T,u as S,k as w}from"./internal-context-C4ZqP8IF.mjs";import{s as _}from"./shouldProceedtoEmbeddedWalletCreationFlow-eFXUIOL2.mjs";import{S as C}from"./ScreenLayout-CHf1S-9L.mjs";import{e as b}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-t8luNMU8.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-BxZPF7qd.mjs";import"styled-components";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";const O=({style:t})=>/*#__PURE__*/e(h,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:y},discord:{name:"Discord",component:v},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:g},twitch:{name:"Twitch",component:f},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=b(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(C,{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:v,loginWithOAuth:y,updateWallets:h,setReadyToTrue:f,closePrivyModal:g,createAnalyticsEvent:C}=S(),[b,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:P,component:x}=U(k,p.customOAuthProviders);return o((()=>{y(k).then((()=>{O(!0),f(!0)})).catch((e=>{if(f(!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()}))}),[P,k]),o((()=>{if(s&&t&&b&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(_(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({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((()=>g({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return h(),()=>clearTimeout(e)}}}),[s,t,b,m]),/*#__PURE__*/e(L,{providerName:P,ProviderLogo:x,success:b,errorMessage:R,onRetry:R?.retryable?()=>{j(),v(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
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"./privy-context-BN6uOGsO.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 v,G as y}from"./twitter-BoAxhlj6.mjs";import h from"@heroicons/react/24/outline/GlobeAltIcon";import{T as f,L as g}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-qQM1iNfa.mjs";import{c as T,u as S,k as w}from"./internal-context-C4ZqP8IF.mjs";import{s as _}from"./shouldProceedtoEmbeddedWalletCreationFlow-C2YnkwWb.mjs";import{S as C}from"./ScreenLayout-dQPPBTHQ.mjs";import{e as b}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-DEMX6Xep.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-DoJRUrfg.mjs";import"styled-components";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";const O=({style:t})=>/*#__PURE__*/e(h,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:y},discord:{name:"Discord",component:v},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:g},twitch:{name:"Twitch",component:f},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=b(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(C,{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:v,loginWithOAuth:y,updateWallets:h,setReadyToTrue:f,closePrivyModal:g,createAnalyticsEvent:C}=S(),[b,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:P,component:x}=U(k,p.customOAuthProviders);return o((()=>{y(k).then((()=>{O(!0),f(!0)})).catch((e=>{if(f(!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()}))}),[P,k]),o((()=>{if(s&&t&&b&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(_(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({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((()=>g({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return h(),()=>clearTimeout(e)}}}),[s,t,b,m]),/*#__PURE__*/e(L,{providerName:P,ProviderLogo:x,success:b,errorMessage:R,onRetry:R?.retryable?()=>{j(),v(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-t8luNMU8.mjs";import{u as i}from"./internal-context-C4ZqP8IF.mjs";import{a as r}from"./privy-context-v-TMVBdt.mjs";import{S as a}from"./ScreenLayout-CHf1S-9L.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"./context-BDvZRT56.mjs";import"tinycolor2";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-BxZPF7qd.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"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:o="Log in or create a new account?",subtitle:i="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:o,subtitle:i,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}=o(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},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:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},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:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-DEMX6Xep.mjs";import{u as i}from"./internal-context-C4ZqP8IF.mjs";import{a as r}from"./privy-context-BN6uOGsO.mjs";import{S as a}from"./ScreenLayout-dQPPBTHQ.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"./context-qQM1iNfa.mjs";import"tinycolor2";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DoJRUrfg.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"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:o="Log in or create a new account?",subtitle:i="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:o,subtitle:i,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}=o(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},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:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},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:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
@@ -1,3 +1,3 @@
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 i}from"react";import{styled as s}from"styled-components";import{u as a,q as n}from"./context-BDvZRT56.mjs";import{g as c,c as u,u as m}from"./internal-context-C4ZqP8IF.mjs";import{a as p,u as l}from"./privy-context-v-TMVBdt.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-eFXUIOL2.mjs";import{S as y}from"./ScreenLayout-CHf1S-9L.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-t8luNMU8.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-BxZPF7qd.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"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";const f=({status:t,passkeySignupFlow:o=!1,error:i,onRetry:s})=>/*#__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(v,{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(i instanceof c){if(i.privyErrorCode===u.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===u.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&&s?{label:"Retry",onClick:s}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),h={component:()=>{let{data:r,setModalData:s,navigate:c}=p(),y=a(),{loginWithPasskey:h,signupWithPasskey:v,closePrivyModal:g,createAnalyticsEvent:w}=m(),{user:S,logout:j,ready:k,authenticated:E}=l(),{passkeySignupFlow:C}=r?.passkeyAuthModalData??{},A=n-500,[_,b]=t("loading"),[T,P]=t(null),L=o([]),O=e=>{L.current=[e,...L.current]};i((()=>()=>{L.current.forEach((e=>clearTimeout(e))),L.current=[]}),[]);let x=async()=>{b("loading");try{C?await v():await h(),b("success")}catch(e){if(e?.privyErrorCode===u.USER_DOES_NOT_EXIST)return void c("AccountNotFoundScreen");if(e?.privyErrorCode===u.ALLOWLIST_REJECTED)return void c("AllowlistRejectionScreen");if(e?.privyErrorCode===u.USER_LIMIT_REACHED)return void c("UserLimitReachedScreen");P(e),b("error")}};return i((()=>{if(k&&E&&"success"===_&&S){if(y?.legal.requireUsersAcceptTerms&&!S.hasAcceptedTerms)return void O(setTimeout((()=>{c("AffirmativeConsentScreen")}),A));if(!d(S,y?.embeddedWallets))return void O(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));O(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),w({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),A))}}),[k,E,S,_]),i((()=>{x()}),[]),/*#__PURE__*/e(f,{status:_,passkeySignupFlow:C,error:T,onRetry:x})}};let v=s.span`
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 i}from"react";import{styled as s}from"styled-components";import{u as a,q as n}from"./context-qQM1iNfa.mjs";import{g as c,c as u,u as m}from"./internal-context-C4ZqP8IF.mjs";import{a as p,u as l}from"./privy-context-BN6uOGsO.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-C2YnkwWb.mjs";import{S as y}from"./ScreenLayout-dQPPBTHQ.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-DEMX6Xep.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DoJRUrfg.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"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";const f=({status:t,passkeySignupFlow:o=!1,error:i,onRetry:s})=>/*#__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(v,{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(i instanceof c){if(i.privyErrorCode===u.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===u.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&&s?{label:"Retry",onClick:s}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),h={component:()=>{let{data:r,setModalData:s,navigate:c}=p(),y=a(),{loginWithPasskey:h,signupWithPasskey:v,closePrivyModal:g,createAnalyticsEvent:w}=m(),{user:S,logout:j,ready:k,authenticated:E}=l(),{passkeySignupFlow:C}=r?.passkeyAuthModalData??{},A=n-500,[_,b]=t("loading"),[T,P]=t(null),L=o([]),O=e=>{L.current=[e,...L.current]};i((()=>()=>{L.current.forEach((e=>clearTimeout(e))),L.current=[]}),[]);let x=async()=>{b("loading");try{C?await v():await h(),b("success")}catch(e){if(e?.privyErrorCode===u.USER_DOES_NOT_EXIST)return void c("AccountNotFoundScreen");if(e?.privyErrorCode===u.ALLOWLIST_REJECTED)return void c("AllowlistRejectionScreen");if(e?.privyErrorCode===u.USER_LIMIT_REACHED)return void c("UserLimitReachedScreen");P(e),b("error")}};return i((()=>{if(k&&E&&"success"===_&&S){if(y?.legal.requireUsersAcceptTerms&&!S.hasAcceptedTerms)return void O(setTimeout((()=>{c("AffirmativeConsentScreen")}),A));if(!d(S,y?.embeddedWallets))return void O(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));O(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),w({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),A))}}),[k,E,S,_]),i((()=>{x()}),[]),/*#__PURE__*/e(f,{status:_,passkeySignupFlow:C,error:T,onRetry:x})}};let v=s.span`
2
2
  white-space: pre-wrap;
3
3
  `;export{h as PasskeyStatusScreen,f as PasskeyStatusScreenView,h as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as t,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,j as l}from"./privy-context-v-TMVBdt.mjs";import{P as m}from"./ModalHeader-BxZPF7qd.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-BwdRCoW3.mjs";import{n as f}from"./index-t8luNMU8.mjs";import{u as w,m as g}from"./internal-context-C4ZqP8IF.mjs";import{S as j}from"./Screen-Cce_5_X_.mjs";import"@privy-io/are-addresses-equal";import"./context-BDvZRT56.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"@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"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=t(!0),{authenticated:m,user:b}=n(),{walletProxy:C,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:T,data:W,onUserCloseViaDialogOrKeybindRef:_}=c(),[E,R]=t(void 0),[U,H]=t(""),[M,F]=t(!1),{entropyId:N,entropyIdVerifier:O,onCompleteNavigateTo:V,onSuccess:$,onFailure:z}=W.recoverWallet,L=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};_.current=L,i((()=>{if(!m)return L("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:o,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:L}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:M,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)})})]}),!!U&&/*#__PURE__*/r(k,{children:U})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{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(A,{loading:M||!C,disabled:!E,onClick:async()=>{F(!0);let e=await S.getAccessToken(),r=l(b,N);if(!e||!r||null===E)return L("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(C?.recover({accessToken:e,entropyId:N,entropyIdVerifier:O,recoveryPassword:E})),H(""),V?T(V):I({shouldCallAuthOnSuccess:!1}),$?.(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{F(!1)}},$hideAnimations:!N&&M,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as t,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,j as l}from"./privy-context-BN6uOGsO.mjs";import{P as m}from"./ModalHeader-DoJRUrfg.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-DavaAwrU.mjs";import{n as f}from"./index-DEMX6Xep.mjs";import{u as w,m as g}from"./internal-context-C4ZqP8IF.mjs";import{S as j}from"./Screen-B0W_mkID.mjs";import"@privy-io/are-addresses-equal";import"./context-qQM1iNfa.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"@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"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=t(!0),{authenticated:m,user:b}=n(),{walletProxy:C,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:T,data:W,onUserCloseViaDialogOrKeybindRef:_}=c(),[E,R]=t(void 0),[U,H]=t(""),[M,F]=t(!1),{entropyId:N,entropyIdVerifier:O,onCompleteNavigateTo:V,onSuccess:$,onFailure:z}=W.recoverWallet,L=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};_.current=L,i((()=>{if(!m)return L("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:o,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:L}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:M,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)})})]}),!!U&&/*#__PURE__*/r(k,{children:U})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{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(A,{loading:M||!C,disabled:!E,onClick:async()=>{F(!0);let e=await S.getAccessToken(),r=l(b,N);if(!e||!r||null===E)return L("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(C?.recover({accessToken:e,entropyId:N,entropyIdVerifier:O,recoveryPassword:E})),H(""),V?T(V):I({shouldCallAuthOnSuccess:!1}),$?.(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{F(!1)}},$hideAnimations:!N&&M,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -1,4 +1,4 @@
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 c}from"./context-BDvZRT56.mjs";import{D as n,E as g}from"./use-export-wallet-C3yKuILk.mjs";const a=()=>/*#__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=g(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:c})=>
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 c}from"./context-qQM1iNfa.mjs";import{D as n,E as g}from"./use-export-wallet-Bu3_93lu.mjs";const a=()=>/*#__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=g(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:c})=>
2
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:c},`finder-${r}-${t}-${o}`)))}),p=({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}`)))}),s=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,c)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:c*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${c}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${c}`)))))}),u=({cellSize:t,matrixSize:l,element:i,sizePercentage:c,bgColor:n})=>{if(!i)/*#__PURE__*/return e(o,{});let g=l*(c||.14),a=Math.floor(l/2-g/2),h=Math.floor(l/2+g/2);(h-a)%2!=l%2&&(h+=1);let m=(h-a)*t,d=m-.2*m,p=a*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:a*t,y:a*t,width:m,height:m,fill:n}),/*#__PURE__*/e(i,{x:p+.1*m,y:p+.1*m,height:d,width:d})]})},f=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,c=n(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:`${c}px`},children:[/*#__PURE__*/e(s,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(p,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(u,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},x=i.div.attrs({className:"ph-no-capture"})`
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1 +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{M as c,P as s,B as l}from"./ModalHeader-BxZPF7qd.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-BDvZRT56.mjs";import{o as p,q as u,r as m,v,R as h,l as y}from"./index-t8luNMU8.mjs";import{b as w,f,c as _,u as A}from"./internal-context-C4ZqP8IF.mjs";import{a as E,u as g,g as C}from"./privy-context-v-TMVBdt.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-BzM95ysC.mjs";import{b as T}from"./get-entropy-details-for-user-CgVPjq_6.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as x,G as N,R as S}from"./styles-BsotlekN.mjs";import"styled-components";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"react-device-detect";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"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"ofetch";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";async function I({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(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(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,_.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function U({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let j={"google-drive":{name:"Google Drive",component:N},icloud:{name:"iCloud",component:x}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=v();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function v(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 U({api:e.api,provider:s});v(o);try{let a=await I({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,_.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 U({api:e.api,provider:s});v(t);let{ckWebAuthToken:r}=await I({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",_.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=C(a);if(!o)throw i("setWalletRecovery","onError",_.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}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.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")}}}})(),[x,N]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,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=j[W].name,q=j[W].component,G=f?.recoverWallet?.onCompleteNavigateTo,K=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),N(!0),t()}catch(t){H({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&&K.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!x)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[x]);let Y=i((async()=>{await K.execute("recover"),G?u(G):N(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=x&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===D?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(S,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(q,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{y(),H(void 0),"create-wallet"===D?K.execute("create-wallet"):Y()},disabled:!x&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(S,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(q,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:Y,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
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{M as c,P as s,B as l}from"./ModalHeader-DoJRUrfg.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-qQM1iNfa.mjs";import{o as p,q as u,r as m,v,R as h,l as y}from"./index-DEMX6Xep.mjs";import{b as w,f,c as _,u as A}from"./internal-context-C4ZqP8IF.mjs";import{a as E,u as g,g as C}from"./privy-context-BN6uOGsO.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-BzM95ysC.mjs";import{b as T}from"./get-entropy-details-for-user-Czn6Jw3y.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as x,G as N,R as S}from"./styles-BsotlekN.mjs";import"styled-components";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"react-device-detect";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"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"ofetch";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";async function I({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(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(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,_.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function U({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let j={"google-drive":{name:"Google Drive",component:N},icloud:{name:"iCloud",component:x}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=v();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function v(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 U({api:e.api,provider:s});v(o);try{let a=await I({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,_.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 U({api:e.api,provider:s});v(t);let{ckWebAuthToken:r}=await I({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",_.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=C(a);if(!o)throw i("setWalletRecovery","onError",_.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}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.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")}}}})(),[x,N]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,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=j[W].name,q=j[W].component,G=f?.recoverWallet?.onCompleteNavigateTo,K=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),N(!0),t()}catch(t){H({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&&K.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!x)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[x]);let Y=i((async()=>{await K.execute("recover"),G?u(G):N(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=x&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===D?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(S,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(q,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{y(),H(void 0),"create-wallet"===D?K.execute("create-wallet"):Y()},disabled:!x&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(S,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(q,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:Y,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-BDvZRT56.mjs";import{v as i,R as s}from"./index-t8luNMU8.mjs";import{u as a,m as n}from"./internal-context-C4ZqP8IF.mjs";import{a as c,u as m}from"./privy-context-v-TMVBdt.mjs";import{S as l,g as p}from"./SetWalletPasswordForm-BXbILvyT.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"./ModalHeader-BxZPF7qd.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-BwdRCoW3.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.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-CHmc4-Lu.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[f,j]=o(!1),[C,g]=o(),[I,x]=o(null),{create:b}=i(),{authenticated:P,user:S}=m(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await b({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>x(e)))}),[I]),t((()=>{if(!P||!S)return u("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(l,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:f,buttonHideAnimations:!D&&f,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(j(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>j(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-qQM1iNfa.mjs";import{v as i,R as s}from"./index-DEMX6Xep.mjs";import{u as a,m as n}from"./internal-context-C4ZqP8IF.mjs";import{a as c,u as m}from"./privy-context-BN6uOGsO.mjs";import{S as l,g as p}from"./SetWalletPasswordForm-Buvk-M6N.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"./ModalHeader-DoJRUrfg.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-DavaAwrU.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.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-CHmc4-Lu.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[f,j]=o(!1),[C,g]=o(),[I,x]=o(null),{create:b}=i(),{authenticated:P,user:S}=m(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await b({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>x(e)))}),[I]),t((()=>{if(!P||!S)return u("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(l,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:f,buttonHideAnimations:!D&&f,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(j(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>j(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
@@ -1,4 +1,4 @@
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"./privy-context-v-TMVBdt.mjs";import{M as d,B as u,P as m}from"./ModalHeader-BxZPF7qd.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-BDvZRT56.mjs";import{u as v}from"./internal-context-C4ZqP8IF.mjs";import{w as g}from"./index-t8luNMU8.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{A as k}from"./useActiveWallet-CLfuK4Fv.mjs";import"@privy-io/are-addresses-equal";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"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"viem";import"zustand";import"viem/utils";import"@coinbase/wallet-sdk";import"react-device-detect";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./events-context-CI0iqAXA.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";let S=n.div`
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"./privy-context-BN6uOGsO.mjs";import{M as d,B as u,P as m}from"./ModalHeader-DoJRUrfg.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-qQM1iNfa.mjs";import{u as v}from"./internal-context-C4ZqP8IF.mjs";import{w as g}from"./index-DEMX6Xep.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{A as k}from"./useActiveWallet--d716S0q.mjs";import"@privy-io/are-addresses-equal";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"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"viem";import"zustand";import"viem/utils";import"@coinbase/wallet-sdk";import"react-device-detect";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./events-context-CI0iqAXA.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";let S=n.div`
2
2
  width: 24px;
3
3
  height: 24px;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{N as n}from"./useActiveWallet-CLfuK4Fv.mjs";import{M as t,B as a}from"./ModalHeader-BxZPF7qd.mjs";import{N as l}from"./index-Dq_xe9dz.mjs";const c=o.div`
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{N as n}from"./useActiveWallet--d716S0q.mjs";import{M as t,B as a}from"./ModalHeader-DoJRUrfg.mjs";import{N as l}from"./index-Dq_xe9dz.mjs";const c=o.div`
2
2
  /* spacing tokens */
3
3
  --screen-space: 16px; /* base 1x = 16 */
4
4
  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as l}from"react/jsx-runtime";import{a as t}from"./ModalHeader-BxZPF7qd.mjs";import{S as a}from"./Screen-Cce_5_X_.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,footerText:o,watermark:c=!0,children:s,...m})=>{let h=n||i?/*#__PURE__*/e(r,{children:[n&&(()=>{let{label:e,...r}=n,a=r.variant||"primary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})(),i&&(()=>{let{label:e,...r}=i,a=r.variant||"secondary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})()]}):null;/*#__PURE__*/return e(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),s?/*#__PURE__*/l(a.Body,{children:s}):null,d||h||c?/*#__PURE__*/e(a.Footer,{children:[d?/*#__PURE__*/l(a.HelpText,{children:d}):null,h?/*#__PURE__*/l(a.Actions,{children:h}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null,o?/*#__PURE__*/l(a.FooterText,{children:o}):null]})};export{n as S};
1
+ import{jsxs as e,Fragment as r,jsx as l}from"react/jsx-runtime";import{a as t}from"./ModalHeader-DoJRUrfg.mjs";import{S as a}from"./Screen-B0W_mkID.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,footerText:o,watermark:c=!0,children:s,...m})=>{let h=n||i?/*#__PURE__*/e(r,{children:[n&&(()=>{let{label:e,...r}=n,a=r.variant||"primary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})(),i&&(()=>{let{label:e,...r}=i,a=r.variant||"secondary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})()]}):null;/*#__PURE__*/return e(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),s?/*#__PURE__*/l(a.Body,{children:s}):null,d||h||c?/*#__PURE__*/e(a.Footer,{children:[d?/*#__PURE__*/l(a.HelpText,{children:d}):null,h?/*#__PURE__*/l(a.Actions,{children:h}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null,o?/*#__PURE__*/l(a.FooterText,{children:o}):null]})};export{n as S};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./use-export-wallet-C3yKuILk.mjs";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{ChevronDown as o}from"lucide-react";import{useState as n,useRef as i,useCallback as l,useMemo as a}from"react";import{styled as s}from"styled-components";import{K as d}from"./index-t8luNMU8.mjs";import{S as c}from"./ScreenLayout-CHf1S-9L.mjs";const u=async({operation:r,until:t,delay:o,interval:n,attempts:i,signal:l})=>{let a,s,d=0;for(;d<i;){if(l?.aborted)return{status:"aborted",result:a,attempts:d,error:s};d++;try{if(s=void 0,a=await r(),t(a))return{status:"success",result:a,attempts:d};d<i&&await e(n)}catch(r){r instanceof Error&&(s=r),d<i&&await e(n)}}return{status:"max_attempts",result:a,attempts:d,error:s}},p=({currency:e="usd",value:o,onChange:s,inputMode:c="decimal",autoFocus:u})=>{let[p,m]=n("0"),g=i(null),y=o??p,v=d[e]?.symbol??"$",w=l((e=>{let r=e.target.value,t=(r=r.replace(/[^\d.]/g,"")).split(".");t.length>2&&(r=t[0]+"."+t.slice(1).join("")),2===t.length&&t[1].length>2&&(r=`${t[0]}.${t[1].slice(0,2)}`),r.length>1&&"0"===r[0]&&"."!==r[1]&&(r=r.slice(1)),(""===r||"."===r)&&(r="0"),s?s(r):m(r)}),[s]),b=l((e=>{!(["Delete","Backspace","Tab","Escape","Enter",".","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)||(e.ctrlKey||e.metaKey)&&["a","c","v","x"].includes(e.key.toLowerCase()))&&(e.key>="0"&&e.key<="9"||e.preventDefault())}),[]),x=a((()=>(y.includes("."),y)),[y]);/*#__PURE__*/return r(f,{onClick:()=>g.current?.focus(),children:[/*#__PURE__*/t(h,{children:v}),x,/*#__PURE__*/t("input",{ref:g,type:"text",inputMode:c,value:x,onChange:w,onKeyDown:b,autoFocus:u,placeholder:"0",style:{width:1,height:"1rem",opacity:0,alignSelf:"center",fontSize:"1rem"}}),/*#__PURE__*/t(h,{style:{opacity:0},children:v})]})},m=({selectedAsset:e,onEditSourceAsset:n})=>{let{icon:i}=d[e];/*#__PURE__*/return r(g,{onClick:n,children:[/*#__PURE__*/t(y,{children:i}),/*#__PURE__*/t(v,{children:e.toLocaleUpperCase()}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(o,{})})]})};let f=s.span`
1
+ import{n as e}from"./use-export-wallet-Bu3_93lu.mjs";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{ChevronDown as o}from"lucide-react";import{useState as n,useRef as i,useCallback as l,useMemo as a}from"react";import{styled as s}from"styled-components";import{K as d}from"./index-DEMX6Xep.mjs";import{S as c}from"./ScreenLayout-dQPPBTHQ.mjs";const u=async({operation:r,until:t,delay:o,interval:n,attempts:i,signal:l})=>{let a,s,d=0;for(;d<i;){if(l?.aborted)return{status:"aborted",result:a,attempts:d,error:s};d++;try{if(s=void 0,a=await r(),t(a))return{status:"success",result:a,attempts:d};d<i&&await e(n)}catch(r){r instanceof Error&&(s=r),d<i&&await e(n)}}return{status:"max_attempts",result:a,attempts:d,error:s}},p=({currency:e="usd",value:o,onChange:s,inputMode:c="decimal",autoFocus:u})=>{let[p,m]=n("0"),g=i(null),y=o??p,v=d[e]?.symbol??"$",w=l((e=>{let r=e.target.value,t=(r=r.replace(/[^\d.]/g,"")).split(".");t.length>2&&(r=t[0]+"."+t.slice(1).join("")),2===t.length&&t[1].length>2&&(r=`${t[0]}.${t[1].slice(0,2)}`),r.length>1&&"0"===r[0]&&"."!==r[1]&&(r=r.slice(1)),(""===r||"."===r)&&(r="0"),s?s(r):m(r)}),[s]),b=l((e=>{!(["Delete","Backspace","Tab","Escape","Enter",".","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)||(e.ctrlKey||e.metaKey)&&["a","c","v","x"].includes(e.key.toLowerCase()))&&(e.key>="0"&&e.key<="9"||e.preventDefault())}),[]),x=a((()=>(y.includes("."),y)),[y]);/*#__PURE__*/return r(f,{onClick:()=>g.current?.focus(),children:[/*#__PURE__*/t(h,{children:v}),x,/*#__PURE__*/t("input",{ref:g,type:"text",inputMode:c,value:x,onChange:w,onKeyDown:b,autoFocus:u,placeholder:"0",style:{width:1,height:"1rem",opacity:0,alignSelf:"center",fontSize:"1rem"}}),/*#__PURE__*/t(h,{style:{opacity:0},children:v})]})},m=({selectedAsset:e,onEditSourceAsset:n})=>{let{icon:i}=d[e];/*#__PURE__*/return r(g,{onClick:n,children:[/*#__PURE__*/t(y,{children:i}),/*#__PURE__*/t(v,{children:e.toLocaleUpperCase()}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(o,{})})]})};let f=s.span`
2
2
  background-color: var(--privy-color-background);
3
3
  width: 100%;
4
4
  text-align: center;
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,j as s}from"./privy-context-v-TMVBdt.mjs";import{M as c,c as m,B as d}from"./ModalHeader-BxZPF7qd.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as f}from"./context-BDvZRT56.mjs";import{u as h}from"./internal-context-C4ZqP8IF.mjs";import{G as v}from"./useActiveWallet-CLfuK4Fv.mjs";import"@privy-io/are-addresses-equal";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";const g=p.div`
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,j as s}from"./privy-context-BN6uOGsO.mjs";import{M as c,c as m,B as d}from"./ModalHeader-DoJRUrfg.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as f}from"./context-qQM1iNfa.mjs";import{u as h}from"./internal-context-C4ZqP8IF.mjs";import{G as v}from"./useActiveWallet--d716S0q.mjs";import"@privy-io/are-addresses-equal";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";const g=p.div`
2
2
  && {
3
3
  border-width: 4px;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-BDvZRT56.mjs";import{a as s}from"./privy-context-v-TMVBdt.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as p,c as u}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-BxZPF7qd.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as j,e as A,f as I,g as L}from"./shared-BwdRCoW3.mjs";import{styled as E}from"styled-components";import{C as U}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as T from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[u,y]=n(!0),[v,R]=n(!1),[P,j]=n(""),A=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:u?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:u?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-qQM1iNfa.mjs";import{a as s}from"./privy-context-BN6uOGsO.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as p,c as u}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-DoJRUrfg.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as j,e as A,f as I,g as L}from"./shared-DavaAwrU.mjs";import{styled as E}from"styled-components";import{C as U}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as T from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[u,y]=n(!0),[v,R]=n(!1),[P,j]=n(""),A=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:u?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:u?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
2
2
  /*#__PURE__*/o($,{"aria-hidden":!v||A,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!A,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,u]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/o(R,{children:/*#__PURE__*/e(P,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),u((e=>!e))},children:[/*#__PURE__*/o(U,{color:"var(--privy-color-error)",readOnly:!0,checked:s}),/*#__PURE__*/o(r,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e(_,{children:["user"===c.initiatedBy&&/*#__PURE__*/o(y,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(B,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let _=E.div`
3
3
  display: flex;
4
4
  gap: 10px;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as y,G as h}from"./use-export-wallet-C3yKuILk.mjs";import{W as f,q as x}from"./context-BDvZRT56.mjs";import{u as C}from"./internal-context-C4ZqP8IF.mjs";import{u as v,a as b}from"./privy-context-v-TMVBdt.mjs";import{S as w}from"./ScreenLayout-CHf1S-9L.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"zustand";import"eventemitter3";import"viem/utils";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-BxZPF7qd.mjs";import"./useActiveWallet-CLfuK4Fv.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";const j=s.img`
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as y,G as h}from"./use-export-wallet-Bu3_93lu.mjs";import{W as f,q as x}from"./context-qQM1iNfa.mjs";import{u as C}from"./internal-context-C4ZqP8IF.mjs";import{u as v,a as b}from"./privy-context-BN6uOGsO.mjs";import{S as w}from"./ScreenLayout-dQPPBTHQ.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"zustand";import"eventemitter3";import"viem/utils";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DoJRUrfg.mjs";import"./useActiveWallet--d716S0q.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";const j=s.img`
2
2
  && {
3
3
  height: ${e=>"sm"===e.size?"65px":"140px"};
4
4
  width: ${e=>"sm"===e.size?"65px":"140px"};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,h as l,g as d}from"./privy-context-v-TMVBdt.mjs";import{u}from"./context-BDvZRT56.mjs";import{u as m}from"./internal-context-C4ZqP8IF.mjs";import{u as p}from"./useGetSolPrice-DaxM-vxD.mjs";import{ErrorScreenView as f}from"./ErrorScreen-D_oZv5-L.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-BxZPF7qd.mjs";import{R as v}from"./Layouts-BlFm53ED.mjs";import{C as b}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-DbseEfVp.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{G as x}from"./useActiveWallet-CLfuK4Fv.mjs";import{T as $,a as L}from"./TransactionErrorView-D9VQgKHy.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as W,getTransactionEncoder as J,getBase58Decoder as R,fetchAddressesForLookupTables as q}from"@solana/kit";import{a as D,f as M,s as U,b as H,u as V}from"./useSolanaRpcClient-PuydY50L.mjs";import{D as z,T as G,a as X,S as K,A as N,R as Q,J as Y,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-t8luNMU8.mjs";import"uuid";import"jose";import"eventemitter3";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"viem";import"zustand";import"viem/utils";import"@coinbase/wallet-sdk";import"react-device-detect";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"./events-context-CI0iqAXA.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./reservoir-DGil2p_K.mjs";import"./ScreenLayout-CHf1S-9L.mjs";import"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-CljtMjlx.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-DjnW56Bj.mjs";import"./WalletInfoCard-D5bstd0h.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-D5LqDt95.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
1
+ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,h as l,g as d}from"./privy-context-BN6uOGsO.mjs";import{u}from"./context-qQM1iNfa.mjs";import{u as m}from"./internal-context-C4ZqP8IF.mjs";import{u as p}from"./useGetSolPrice-DaxM-vxD.mjs";import{ErrorScreenView as f}from"./ErrorScreen-dMCodcFQ.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-DoJRUrfg.mjs";import{R as v}from"./Layouts-BlFm53ED.mjs";import{C as b}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-BNfCTkNd.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{G as x}from"./useActiveWallet--d716S0q.mjs";import{T as $,a as L}from"./TransactionErrorView-Co2Eii6d.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as W,getTransactionEncoder as J,getBase58Decoder as R,fetchAddressesForLookupTables as q}from"@solana/kit";import{a as D,f as M,s as U,b as H,u as V}from"./useSolanaRpcClient-DBfgMIVD.mjs";import{D as z,T as G,a as X,S as K,A as N,R as Q,J as Y,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-DEMX6Xep.mjs";import"uuid";import"jose";import"eventemitter3";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"viem";import"zustand";import"viem/utils";import"@coinbase/wallet-sdk";import"react-device-detect";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"./events-context-CI0iqAXA.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./reservoir-DGil2p_K.mjs";import"./ScreenLayout-dQPPBTHQ.mjs";import"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-Dhr2H_97.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-uCEGlQhU.mjs";import"./WalletInfoCard-Z6TrQ80y.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-D5LqDt95.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-t8luNMU8.mjs";import{u as s,q as n}from"./context-BDvZRT56.mjs";import{u as m,c as l,k as c}from"./internal-context-C4ZqP8IF.mjs";import{u as d,a as u}from"./privy-context-v-TMVBdt.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-eFXUIOL2.mjs";import{S as y}from"./ScreenLayout-CHf1S-9L.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CLfuK4Fv.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-C3yKuILk.mjs";import"./get-entropy-details-for-user-CgVPjq_6.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-B1AsvC0i.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"tinycolor2";import"./ModalHeader-BxZPF7qd.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"./Screen-Cce_5_X_.mjs";import"./index-Dq_xe9dz.mjs";const g=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(y,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:y,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:j,resetNavigation:T,data:b}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:x}=m(),[L,k]=t(!1),[M,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!y){if(D.enabled&&"error"===D.status)throw new a(D.error,null,l.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),k(!0),R(!0)}catch(e){if(e?.privyErrorCode===l.ALLOWLIST_REJECTED)return I(void 0),T(),void j("AllowlistRejectionScreen");if(e?.privyErrorCode===l.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),T(),void j("UserLimitReachedScreen");if(e?.privyErrorCode===l.USER_DOES_NOT_EXIST)return I(void 0),T(),void j("AccountNotFoundScreen");if(e?.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),T(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:x()?.telegramAuthResult,telegramWebAppData:x()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void j("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(f&&y&&L&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{j("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),j("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,y,L,h]);/*#__PURE__*/return e(g,{success:L,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),b?.telegramAuthModalData?.seamlessAuth||await C(void 0,b?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,g as TelegramAuthScreenView,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-DEMX6Xep.mjs";import{u as s,q as n}from"./context-qQM1iNfa.mjs";import{u as m,c as l,k as c}from"./internal-context-C4ZqP8IF.mjs";import{u as d,a as u}from"./privy-context-BN6uOGsO.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-C2YnkwWb.mjs";import{S as y}from"./ScreenLayout-dQPPBTHQ.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet--d716S0q.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-Bu3_93lu.mjs";import"./get-entropy-details-for-user-Czn6Jw3y.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-BlM-XgWI.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"tinycolor2";import"./ModalHeader-DoJRUrfg.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"./Screen-B0W_mkID.mjs";import"./index-Dq_xe9dz.mjs";const g=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(y,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:y,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:j,resetNavigation:T,data:b}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:x}=m(),[L,k]=t(!1),[M,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!y){if(D.enabled&&"error"===D.status)throw new a(D.error,null,l.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),k(!0),R(!0)}catch(e){if(e?.privyErrorCode===l.ALLOWLIST_REJECTED)return I(void 0),T(),void j("AllowlistRejectionScreen");if(e?.privyErrorCode===l.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),T(),void j("UserLimitReachedScreen");if(e?.privyErrorCode===l.USER_DOES_NOT_EXIST)return I(void 0),T(),void j("AccountNotFoundScreen");if(e?.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),T(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:x()?.telegramAuthResult,telegramWebAppData:x()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void j("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(f&&y&&L&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{j("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),j("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,y,L,h]);/*#__PURE__*/return e(g,{success:L,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),b?.telegramAuthModalData?.seamlessAuth||await C(void 0,b?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,g as TelegramAuthScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-DbseEfVp.mjs";import{g as d}from"./ethers-CljtMjlx.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-BDvZRT56.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(m,{style:{...r},children:n})]});let f=n.div`
1
+ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-BNfCTkNd.mjs";import{g as d}from"./ethers-Dhr2H_97.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-qQM1iNfa.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(m,{style:{...r},children:n})]});let f=n.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;