@firebase/auth 1.10.8 → 1.11.0-20250716004940

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 (399) hide show
  1. package/dist/browser-cjs/{index-919d47fb.js → index-f4c52d0c.js} +212 -202
  2. package/dist/browser-cjs/{index-919d47fb.js.map → index-f4c52d0c.js.map} +1 -1
  3. package/dist/browser-cjs/index.js +1 -2
  4. package/dist/browser-cjs/index.js.map +1 -1
  5. package/dist/browser-cjs/internal.js +13 -18
  6. package/dist/browser-cjs/internal.js.map +1 -1
  7. package/dist/cordova/index.js +2 -3
  8. package/dist/cordova/index.js.map +1 -1
  9. package/dist/cordova/internal.js +37 -44
  10. package/dist/cordova/internal.js.map +1 -1
  11. package/dist/cordova/{popup_redirect-6806e8a5.js → popup_redirect-e03e5a65.js} +189 -177
  12. package/dist/cordova/{popup_redirect-6806e8a5.js.map → popup_redirect-e03e5a65.js.map} +1 -1
  13. package/dist/{esm2017/index-35c79a8a.js → esm/index-49b0e4ee.js} +212 -202
  14. package/dist/{esm2017/index-35c79a8a.js.map → esm/index-49b0e4ee.js.map} +1 -1
  15. package/dist/{esm2017 → esm}/index.js +1 -2
  16. package/dist/{esm2017 → esm}/index.js.map +1 -1
  17. package/dist/{esm2017 → esm}/internal.js +14 -19
  18. package/dist/{esm2017 → esm}/internal.js.map +1 -1
  19. package/dist/index.webworker.js +169 -148
  20. package/dist/index.webworker.js.map +1 -1
  21. package/dist/node/index.js +1 -2
  22. package/dist/node/index.js.map +1 -1
  23. package/dist/node/internal.js +16 -22
  24. package/dist/node/internal.js.map +1 -1
  25. package/dist/node/{totp-324f49e5.js → totp-2d91f17d.js} +165 -144
  26. package/dist/{node-esm/totp-a9833fe5.js.map → node/totp-2d91f17d.js.map} +1 -1
  27. package/dist/node-esm/index.js +1 -2
  28. package/dist/node-esm/index.js.map +1 -1
  29. package/dist/node-esm/internal.js +17 -23
  30. package/dist/node-esm/internal.js.map +1 -1
  31. package/dist/node-esm/{totp-a9833fe5.js → totp-b21048bd.js} +165 -144
  32. package/dist/{node/totp-324f49e5.js.map → node-esm/totp-b21048bd.js.map} +1 -1
  33. package/dist/rn/{index-b5f6ef87.js → index-d92c5d92.js} +183 -168
  34. package/dist/rn/{index-b5f6ef87.js.map → index-d92c5d92.js.map} +1 -1
  35. package/dist/rn/index.js +3 -4
  36. package/dist/rn/index.js.map +1 -1
  37. package/dist/rn/internal.js +42 -52
  38. package/dist/rn/internal.js.map +1 -1
  39. package/dist/web-extension-cjs/index.js +1 -2
  40. package/dist/web-extension-cjs/index.js.map +1 -1
  41. package/dist/web-extension-cjs/internal.js +48 -58
  42. package/dist/web-extension-cjs/internal.js.map +1 -1
  43. package/dist/web-extension-cjs/{register-c4ad8877.js → register-f94f7b41.js} +177 -162
  44. package/dist/{web-extension-esm2017/register-8de454ae.js.map → web-extension-cjs/register-f94f7b41.js.map} +1 -1
  45. package/dist/{web-extension-esm2017 → web-extension-esm}/index.js +2 -3
  46. package/dist/{web-extension-esm2017 → web-extension-esm}/index.js.map +1 -1
  47. package/dist/{web-extension-esm2017 → web-extension-esm}/internal.js +49 -59
  48. package/dist/{web-extension-esm2017 → web-extension-esm}/internal.js.map +1 -1
  49. package/dist/{web-extension-esm2017/register-8de454ae.js → web-extension-esm/register-70c7d024.js} +177 -162
  50. package/dist/{web-extension-cjs/register-c4ad8877.js.map → web-extension-esm/register-70c7d024.js.map} +1 -1
  51. package/internal/package.json +4 -4
  52. package/package.json +19 -19
  53. package/web-extension/package.json +3 -3
  54. /package/dist/{esm2017 → esm}/index.cordova.d.ts +0 -0
  55. /package/dist/{esm2017 → esm}/index.d.ts +0 -0
  56. /package/dist/{esm2017 → esm}/index.doc.d.ts +0 -0
  57. /package/dist/{esm2017 → esm}/index.node.d.ts +0 -0
  58. /package/dist/{esm2017 → esm}/index.rn.d.ts +0 -0
  59. /package/dist/{esm2017 → esm}/index.shared.d.ts +0 -0
  60. /package/dist/{esm2017 → esm}/index.web-extension.d.ts +0 -0
  61. /package/dist/{esm2017 → esm}/index.webworker.d.ts +0 -0
  62. /package/dist/{esm2017 → esm}/internal/index.d.ts +0 -0
  63. /package/dist/{esm2017 → esm}/scripts/run_node_tests.d.ts +0 -0
  64. /package/dist/{esm2017 → esm}/src/api/account_management/account.d.ts +0 -0
  65. /package/dist/{esm2017 → esm}/src/api/account_management/email_and_password.d.ts +0 -0
  66. /package/dist/{esm2017 → esm}/src/api/account_management/mfa.d.ts +0 -0
  67. /package/dist/{esm2017 → esm}/src/api/account_management/profile.d.ts +0 -0
  68. /package/dist/{esm2017 → esm}/src/api/authentication/create_auth_uri.d.ts +0 -0
  69. /package/dist/{esm2017 → esm}/src/api/authentication/custom_token.d.ts +0 -0
  70. /package/dist/{esm2017 → esm}/src/api/authentication/email_and_password.d.ts +0 -0
  71. /package/dist/{esm2017 → esm}/src/api/authentication/email_link.d.ts +0 -0
  72. /package/dist/{esm2017 → esm}/src/api/authentication/idp.d.ts +0 -0
  73. /package/dist/{esm2017 → esm}/src/api/authentication/mfa.d.ts +0 -0
  74. /package/dist/{esm2017 → esm}/src/api/authentication/recaptcha.d.ts +0 -0
  75. /package/dist/{esm2017 → esm}/src/api/authentication/sign_up.d.ts +0 -0
  76. /package/dist/{esm2017 → esm}/src/api/authentication/sms.d.ts +0 -0
  77. /package/dist/{esm2017 → esm}/src/api/authentication/token.d.ts +0 -0
  78. /package/dist/{esm2017 → esm}/src/api/errors.d.ts +0 -0
  79. /package/dist/{esm2017 → esm}/src/api/index.d.ts +0 -0
  80. /package/dist/{esm2017 → esm}/src/api/password_policy/get_password_policy.d.ts +0 -0
  81. /package/dist/{esm2017 → esm}/src/api/project_config/get_project_config.d.ts +0 -0
  82. /package/dist/{esm2017 → esm}/src/core/action_code_url.d.ts +0 -0
  83. /package/dist/{esm2017 → esm}/src/core/auth/auth_event_manager.d.ts +0 -0
  84. /package/dist/{esm2017 → esm}/src/core/auth/auth_impl.d.ts +0 -0
  85. /package/dist/{esm2017 → esm}/src/core/auth/emulator.d.ts +0 -0
  86. /package/dist/{esm2017 → esm}/src/core/auth/firebase_internal.d.ts +0 -0
  87. /package/dist/{esm2017 → esm}/src/core/auth/initialize.d.ts +0 -0
  88. /package/dist/{esm2017 → esm}/src/core/auth/middleware.d.ts +0 -0
  89. /package/dist/{esm2017 → esm}/src/core/auth/password_policy_impl.d.ts +0 -0
  90. /package/dist/{esm2017 → esm}/src/core/auth/register.d.ts +0 -0
  91. /package/dist/{esm2017 → esm}/src/core/credentials/auth_credential.d.ts +0 -0
  92. /package/dist/{esm2017 → esm}/src/core/credentials/email.d.ts +0 -0
  93. /package/dist/{esm2017 → esm}/src/core/credentials/index.d.ts +0 -0
  94. /package/dist/{esm2017 → esm}/src/core/credentials/oauth.d.ts +0 -0
  95. /package/dist/{esm2017 → esm}/src/core/credentials/phone.d.ts +0 -0
  96. /package/dist/{esm2017 → esm}/src/core/credentials/saml.d.ts +0 -0
  97. /package/dist/{esm2017 → esm}/src/core/errors.d.ts +0 -0
  98. /package/dist/{esm2017 → esm}/src/core/index.d.ts +0 -0
  99. /package/dist/{esm2017 → esm}/src/core/persistence/in_memory.d.ts +0 -0
  100. /package/dist/{esm2017 → esm}/src/core/persistence/index.d.ts +0 -0
  101. /package/dist/{esm2017 → esm}/src/core/persistence/persistence_user_manager.d.ts +0 -0
  102. /package/dist/{esm2017 → esm}/src/core/providers/email.d.ts +0 -0
  103. /package/dist/{esm2017 → esm}/src/core/providers/facebook.d.ts +0 -0
  104. /package/dist/{esm2017 → esm}/src/core/providers/federated.d.ts +0 -0
  105. /package/dist/{esm2017 → esm}/src/core/providers/github.d.ts +0 -0
  106. /package/dist/{esm2017 → esm}/src/core/providers/google.d.ts +0 -0
  107. /package/dist/{esm2017 → esm}/src/core/providers/oauth.d.ts +0 -0
  108. /package/dist/{esm2017 → esm}/src/core/providers/saml.d.ts +0 -0
  109. /package/dist/{esm2017 → esm}/src/core/providers/twitter.d.ts +0 -0
  110. /package/dist/{esm2017 → esm}/src/core/strategies/abstract_popup_redirect_operation.d.ts +0 -0
  111. /package/dist/{esm2017 → esm}/src/core/strategies/action_code_settings.d.ts +0 -0
  112. /package/dist/{esm2017 → esm}/src/core/strategies/anonymous.d.ts +0 -0
  113. /package/dist/{esm2017 → esm}/src/core/strategies/credential.d.ts +0 -0
  114. /package/dist/{esm2017 → esm}/src/core/strategies/custom_token.d.ts +0 -0
  115. /package/dist/{esm2017 → esm}/src/core/strategies/email.d.ts +0 -0
  116. /package/dist/{esm2017 → esm}/src/core/strategies/email_and_password.d.ts +0 -0
  117. /package/dist/{esm2017 → esm}/src/core/strategies/email_link.d.ts +0 -0
  118. /package/dist/{esm2017 → esm}/src/core/strategies/idp.d.ts +0 -0
  119. /package/dist/{esm2017 → esm}/src/core/strategies/redirect.d.ts +0 -0
  120. /package/dist/{esm2017 → esm}/src/core/user/account_info.d.ts +0 -0
  121. /package/dist/{esm2017 → esm}/src/core/user/additional_user_info.d.ts +0 -0
  122. /package/dist/{esm2017 → esm}/src/core/user/id_token_result.d.ts +0 -0
  123. /package/dist/{esm2017 → esm}/src/core/user/invalidation.d.ts +0 -0
  124. /package/dist/{esm2017 → esm}/src/core/user/link_unlink.d.ts +0 -0
  125. /package/dist/{esm2017 → esm}/src/core/user/proactive_refresh.d.ts +0 -0
  126. /package/dist/{esm2017 → esm}/src/core/user/reauthenticate.d.ts +0 -0
  127. /package/dist/{esm2017 → esm}/src/core/user/reload.d.ts +0 -0
  128. /package/dist/{esm2017 → esm}/src/core/user/token_manager.d.ts +0 -0
  129. /package/dist/{esm2017 → esm}/src/core/user/user_credential_impl.d.ts +0 -0
  130. /package/dist/{esm2017 → esm}/src/core/user/user_impl.d.ts +0 -0
  131. /package/dist/{esm2017 → esm}/src/core/user/user_metadata.d.ts +0 -0
  132. /package/dist/{esm2017 → esm}/src/core/util/assert.d.ts +0 -0
  133. /package/dist/{esm2017 → esm}/src/core/util/browser.d.ts +0 -0
  134. /package/dist/{esm2017 → esm}/src/core/util/delay.d.ts +0 -0
  135. /package/dist/{esm2017 → esm}/src/core/util/emulator.d.ts +0 -0
  136. /package/dist/{esm2017 → esm}/src/core/util/event_id.d.ts +0 -0
  137. /package/dist/{esm2017 → esm}/src/core/util/fetch_provider.d.ts +0 -0
  138. /package/dist/{esm2017 → esm}/src/core/util/handler.d.ts +0 -0
  139. /package/dist/{esm2017 → esm}/src/core/util/instantiator.d.ts +0 -0
  140. /package/dist/{esm2017 → esm}/src/core/util/location.d.ts +0 -0
  141. /package/dist/{esm2017 → esm}/src/core/util/log.d.ts +0 -0
  142. /package/dist/{esm2017 → esm}/src/core/util/navigator.d.ts +0 -0
  143. /package/dist/{esm2017 → esm}/src/core/util/providers.d.ts +0 -0
  144. /package/dist/{esm2017 → esm}/src/core/util/resolver.d.ts +0 -0
  145. /package/dist/{esm2017 → esm}/src/core/util/time.d.ts +0 -0
  146. /package/dist/{esm2017 → esm}/src/core/util/validate_origin.d.ts +0 -0
  147. /package/dist/{esm2017 → esm}/src/core/util/version.d.ts +0 -0
  148. /package/dist/{esm2017 → esm}/src/index.d.ts +0 -0
  149. /package/dist/{esm2017 → esm}/src/mfa/assertions/totp.d.ts +0 -0
  150. /package/dist/{esm2017 → esm}/src/mfa/index.d.ts +0 -0
  151. /package/dist/{esm2017 → esm}/src/mfa/mfa_assertion.d.ts +0 -0
  152. /package/dist/{esm2017 → esm}/src/mfa/mfa_error.d.ts +0 -0
  153. /package/dist/{esm2017 → esm}/src/mfa/mfa_info.d.ts +0 -0
  154. /package/dist/{esm2017 → esm}/src/mfa/mfa_resolver.d.ts +0 -0
  155. /package/dist/{esm2017 → esm}/src/mfa/mfa_session.d.ts +0 -0
  156. /package/dist/{esm2017 → esm}/src/mfa/mfa_user.d.ts +0 -0
  157. /package/dist/{esm2017 → esm}/src/model/application_verifier.d.ts +0 -0
  158. /package/dist/{esm2017 → esm}/src/model/auth.d.ts +0 -0
  159. /package/dist/{esm2017 → esm}/src/model/enum_maps.d.ts +0 -0
  160. /package/dist/{esm2017 → esm}/src/model/enums.d.ts +0 -0
  161. /package/dist/{esm2017 → esm}/src/model/id_token.d.ts +0 -0
  162. /package/dist/{esm2017 → esm}/src/model/password_policy.d.ts +0 -0
  163. /package/dist/{esm2017 → esm}/src/model/popup_redirect.d.ts +0 -0
  164. /package/dist/{esm2017 → esm}/src/model/public_types.d.ts +0 -0
  165. /package/dist/{esm2017 → esm}/src/model/user.d.ts +0 -0
  166. /package/dist/{esm2017 → esm}/src/platform_browser/auth_window.d.ts +0 -0
  167. /package/dist/{esm2017 → esm}/src/platform_browser/iframe/gapi.d.ts +0 -0
  168. /package/dist/{esm2017 → esm}/src/platform_browser/iframe/gapi.iframes.d.ts +0 -0
  169. /package/dist/{esm2017 → esm}/src/platform_browser/iframe/iframe.d.ts +0 -0
  170. /package/dist/{esm2017 → esm}/src/platform_browser/index.d.ts +0 -0
  171. /package/dist/{esm2017 → esm}/src/platform_browser/load_js.d.ts +0 -0
  172. /package/dist/{esm2017 → esm}/src/platform_browser/messagechannel/index.d.ts +0 -0
  173. /package/dist/{esm2017 → esm}/src/platform_browser/messagechannel/promise.d.ts +0 -0
  174. /package/dist/{esm2017 → esm}/src/platform_browser/messagechannel/receiver.d.ts +0 -0
  175. /package/dist/{esm2017 → esm}/src/platform_browser/messagechannel/sender.d.ts +0 -0
  176. /package/dist/{esm2017 → esm}/src/platform_browser/mfa/assertions/phone.d.ts +0 -0
  177. /package/dist/{esm2017 → esm}/src/platform_browser/persistence/browser.d.ts +0 -0
  178. /package/dist/{esm2017 → esm}/src/platform_browser/persistence/cookie_storage.d.ts +0 -0
  179. /package/dist/{esm2017 → esm}/src/platform_browser/persistence/indexed_db.d.ts +0 -0
  180. /package/dist/{esm2017 → esm}/src/platform_browser/persistence/local_storage.d.ts +0 -0
  181. /package/dist/{esm2017 → esm}/src/platform_browser/persistence/session_storage.d.ts +0 -0
  182. /package/dist/{esm2017 → esm}/src/platform_browser/popup_redirect.d.ts +0 -0
  183. /package/dist/{esm2017 → esm}/src/platform_browser/providers/phone.d.ts +0 -0
  184. /package/dist/{esm2017 → esm}/src/platform_browser/recaptcha/recaptcha.d.ts +0 -0
  185. /package/dist/{esm2017 → esm}/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +0 -0
  186. /package/dist/{esm2017 → esm}/src/platform_browser/recaptcha/recaptcha_loader.d.ts +0 -0
  187. /package/dist/{esm2017 → esm}/src/platform_browser/recaptcha/recaptcha_mock.d.ts +0 -0
  188. /package/dist/{esm2017 → esm}/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +0 -0
  189. /package/dist/{esm2017 → esm}/src/platform_browser/strategies/phone.d.ts +0 -0
  190. /package/dist/{esm2017 → esm}/src/platform_browser/strategies/popup.d.ts +0 -0
  191. /package/dist/{esm2017 → esm}/src/platform_browser/strategies/redirect.d.ts +0 -0
  192. /package/dist/{esm2017 → esm}/src/platform_browser/util/popup.d.ts +0 -0
  193. /package/dist/{esm2017 → esm}/src/platform_browser/util/worker.d.ts +0 -0
  194. /package/dist/{esm2017 → esm}/src/platform_cordova/plugins.d.ts +0 -0
  195. /package/dist/{esm2017 → esm}/src/platform_cordova/popup_redirect/events.d.ts +0 -0
  196. /package/dist/{esm2017 → esm}/src/platform_cordova/popup_redirect/popup_redirect.d.ts +0 -0
  197. /package/dist/{esm2017 → esm}/src/platform_cordova/popup_redirect/utils.d.ts +0 -0
  198. /package/dist/{esm2017 → esm}/src/platform_cordova/strategies/redirect.d.ts +0 -0
  199. /package/dist/{esm2017 → esm}/src/platform_node/index.d.ts +0 -0
  200. /package/dist/{esm2017 → esm}/src/platform_react_native/persistence/react_native.d.ts +0 -0
  201. /package/dist/{esm2017 → esm}/test/helpers/api/helper.d.ts +0 -0
  202. /package/dist/{esm2017 → esm}/test/helpers/delay.d.ts +0 -0
  203. /package/dist/{esm2017 → esm}/test/helpers/erroring_unavailable_persistence.d.ts +0 -0
  204. /package/dist/{esm2017 → esm}/test/helpers/fake_service_worker.d.ts +0 -0
  205. /package/dist/{esm2017 → esm}/test/helpers/id_token_response.d.ts +0 -0
  206. /package/dist/{esm2017 → esm}/test/helpers/iframe_event.d.ts +0 -0
  207. /package/dist/{esm2017 → esm}/test/helpers/integration/emulator_rest_helpers.d.ts +0 -0
  208. /package/dist/{esm2017 → esm}/test/helpers/integration/helpers.d.ts +0 -0
  209. /package/dist/{esm2017 → esm}/test/helpers/integration/settings.d.ts +0 -0
  210. /package/dist/{esm2017 → esm}/test/helpers/jwt.d.ts +0 -0
  211. /package/dist/{esm2017 → esm}/test/helpers/mock_auth.d.ts +0 -0
  212. /package/dist/{esm2017 → esm}/test/helpers/mock_auth_credential.d.ts +0 -0
  213. /package/dist/{esm2017 → esm}/test/helpers/mock_fetch.d.ts +0 -0
  214. /package/dist/{esm2017 → esm}/test/helpers/mock_popup_redirect_resolver.d.ts +0 -0
  215. /package/dist/{esm2017 → esm}/test/helpers/redirect_persistence.d.ts +0 -0
  216. /package/dist/{esm2017 → esm}/test/helpers/timeout_stub.d.ts +0 -0
  217. /package/dist/{esm2017 → esm}/test/integration/flows/middleware_test_generator.d.ts +0 -0
  218. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/auth_driver.d.ts +0 -0
  219. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/functions.d.ts +0 -0
  220. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/idp_page.d.ts +0 -0
  221. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/js_load_condition.d.ts +0 -0
  222. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/test_runner.d.ts +0 -0
  223. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/test_server.d.ts +0 -0
  224. /package/dist/{esm2017 → esm}/test/integration/webdriver/util/ui_page.d.ts +0 -0
  225. /package/dist/{web-extension-esm2017 → web-extension-esm}/auth-web-extension-public.d.ts +0 -0
  226. /package/dist/{web-extension-esm2017 → web-extension-esm}/auth-web-extension.d.ts +0 -0
  227. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.cordova.d.ts +0 -0
  228. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.d.ts +0 -0
  229. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.doc.d.ts +0 -0
  230. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.node.d.ts +0 -0
  231. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.rn.d.ts +0 -0
  232. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.shared.d.ts +0 -0
  233. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.web-extension.d.ts +0 -0
  234. /package/dist/{web-extension-esm2017 → web-extension-esm}/index.webworker.d.ts +0 -0
  235. /package/dist/{web-extension-esm2017 → web-extension-esm}/internal/index.d.ts +0 -0
  236. /package/dist/{web-extension-esm2017 → web-extension-esm}/package.json +0 -0
  237. /package/dist/{web-extension-esm2017 → web-extension-esm}/scripts/run_node_tests.d.ts +0 -0
  238. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/account_management/account.d.ts +0 -0
  239. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/account_management/email_and_password.d.ts +0 -0
  240. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/account_management/mfa.d.ts +0 -0
  241. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/account_management/profile.d.ts +0 -0
  242. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/create_auth_uri.d.ts +0 -0
  243. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/custom_token.d.ts +0 -0
  244. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/email_and_password.d.ts +0 -0
  245. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/email_link.d.ts +0 -0
  246. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/idp.d.ts +0 -0
  247. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/mfa.d.ts +0 -0
  248. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/recaptcha.d.ts +0 -0
  249. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/sign_up.d.ts +0 -0
  250. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/sms.d.ts +0 -0
  251. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/authentication/token.d.ts +0 -0
  252. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/errors.d.ts +0 -0
  253. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/index.d.ts +0 -0
  254. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/password_policy/get_password_policy.d.ts +0 -0
  255. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/api/project_config/get_project_config.d.ts +0 -0
  256. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/action_code_url.d.ts +0 -0
  257. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/auth_event_manager.d.ts +0 -0
  258. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/auth_impl.d.ts +0 -0
  259. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/emulator.d.ts +0 -0
  260. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/firebase_internal.d.ts +0 -0
  261. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/initialize.d.ts +0 -0
  262. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/middleware.d.ts +0 -0
  263. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/password_policy_impl.d.ts +0 -0
  264. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/auth/register.d.ts +0 -0
  265. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/auth_credential.d.ts +0 -0
  266. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/email.d.ts +0 -0
  267. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/index.d.ts +0 -0
  268. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/oauth.d.ts +0 -0
  269. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/phone.d.ts +0 -0
  270. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/credentials/saml.d.ts +0 -0
  271. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/errors.d.ts +0 -0
  272. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/index.d.ts +0 -0
  273. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/persistence/in_memory.d.ts +0 -0
  274. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/persistence/index.d.ts +0 -0
  275. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/persistence/persistence_user_manager.d.ts +0 -0
  276. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/email.d.ts +0 -0
  277. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/facebook.d.ts +0 -0
  278. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/federated.d.ts +0 -0
  279. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/github.d.ts +0 -0
  280. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/google.d.ts +0 -0
  281. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/oauth.d.ts +0 -0
  282. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/saml.d.ts +0 -0
  283. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/providers/twitter.d.ts +0 -0
  284. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/abstract_popup_redirect_operation.d.ts +0 -0
  285. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/action_code_settings.d.ts +0 -0
  286. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/anonymous.d.ts +0 -0
  287. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/credential.d.ts +0 -0
  288. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/custom_token.d.ts +0 -0
  289. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/email.d.ts +0 -0
  290. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/email_and_password.d.ts +0 -0
  291. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/email_link.d.ts +0 -0
  292. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/idp.d.ts +0 -0
  293. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/strategies/redirect.d.ts +0 -0
  294. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/account_info.d.ts +0 -0
  295. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/additional_user_info.d.ts +0 -0
  296. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/id_token_result.d.ts +0 -0
  297. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/invalidation.d.ts +0 -0
  298. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/link_unlink.d.ts +0 -0
  299. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/proactive_refresh.d.ts +0 -0
  300. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/reauthenticate.d.ts +0 -0
  301. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/reload.d.ts +0 -0
  302. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/token_manager.d.ts +0 -0
  303. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/user_credential_impl.d.ts +0 -0
  304. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/user_impl.d.ts +0 -0
  305. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/user/user_metadata.d.ts +0 -0
  306. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/assert.d.ts +0 -0
  307. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/browser.d.ts +0 -0
  308. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/delay.d.ts +0 -0
  309. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/emulator.d.ts +0 -0
  310. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/event_id.d.ts +0 -0
  311. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/fetch_provider.d.ts +0 -0
  312. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/handler.d.ts +0 -0
  313. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/instantiator.d.ts +0 -0
  314. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/location.d.ts +0 -0
  315. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/log.d.ts +0 -0
  316. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/navigator.d.ts +0 -0
  317. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/providers.d.ts +0 -0
  318. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/resolver.d.ts +0 -0
  319. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/time.d.ts +0 -0
  320. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/validate_origin.d.ts +0 -0
  321. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/core/util/version.d.ts +0 -0
  322. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/index.d.ts +0 -0
  323. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/assertions/totp.d.ts +0 -0
  324. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/index.d.ts +0 -0
  325. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_assertion.d.ts +0 -0
  326. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_error.d.ts +0 -0
  327. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_info.d.ts +0 -0
  328. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_resolver.d.ts +0 -0
  329. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_session.d.ts +0 -0
  330. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/mfa/mfa_user.d.ts +0 -0
  331. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/application_verifier.d.ts +0 -0
  332. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/auth.d.ts +0 -0
  333. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/enum_maps.d.ts +0 -0
  334. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/enums.d.ts +0 -0
  335. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/id_token.d.ts +0 -0
  336. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/password_policy.d.ts +0 -0
  337. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/popup_redirect.d.ts +0 -0
  338. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/public_types.d.ts +0 -0
  339. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/model/user.d.ts +0 -0
  340. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/auth_window.d.ts +0 -0
  341. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/iframe/gapi.d.ts +0 -0
  342. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/iframe/gapi.iframes.d.ts +0 -0
  343. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/iframe/iframe.d.ts +0 -0
  344. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/index.d.ts +0 -0
  345. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/load_js.d.ts +0 -0
  346. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/messagechannel/index.d.ts +0 -0
  347. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/messagechannel/promise.d.ts +0 -0
  348. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/messagechannel/receiver.d.ts +0 -0
  349. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/messagechannel/sender.d.ts +0 -0
  350. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/mfa/assertions/phone.d.ts +0 -0
  351. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/persistence/browser.d.ts +0 -0
  352. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/persistence/cookie_storage.d.ts +0 -0
  353. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/persistence/indexed_db.d.ts +0 -0
  354. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/persistence/local_storage.d.ts +0 -0
  355. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/persistence/session_storage.d.ts +0 -0
  356. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/popup_redirect.d.ts +0 -0
  357. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/providers/phone.d.ts +0 -0
  358. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/recaptcha/recaptcha.d.ts +0 -0
  359. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +0 -0
  360. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/recaptcha/recaptcha_loader.d.ts +0 -0
  361. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/recaptcha/recaptcha_mock.d.ts +0 -0
  362. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +0 -0
  363. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/strategies/phone.d.ts +0 -0
  364. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/strategies/popup.d.ts +0 -0
  365. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/strategies/redirect.d.ts +0 -0
  366. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/util/popup.d.ts +0 -0
  367. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_browser/util/worker.d.ts +0 -0
  368. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_cordova/plugins.d.ts +0 -0
  369. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_cordova/popup_redirect/events.d.ts +0 -0
  370. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_cordova/popup_redirect/popup_redirect.d.ts +0 -0
  371. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_cordova/popup_redirect/utils.d.ts +0 -0
  372. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_cordova/strategies/redirect.d.ts +0 -0
  373. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_node/index.d.ts +0 -0
  374. /package/dist/{web-extension-esm2017 → web-extension-esm}/src/platform_react_native/persistence/react_native.d.ts +0 -0
  375. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/api/helper.d.ts +0 -0
  376. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/delay.d.ts +0 -0
  377. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/erroring_unavailable_persistence.d.ts +0 -0
  378. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/fake_service_worker.d.ts +0 -0
  379. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/id_token_response.d.ts +0 -0
  380. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/iframe_event.d.ts +0 -0
  381. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/integration/emulator_rest_helpers.d.ts +0 -0
  382. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/integration/helpers.d.ts +0 -0
  383. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/integration/settings.d.ts +0 -0
  384. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/jwt.d.ts +0 -0
  385. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/mock_auth.d.ts +0 -0
  386. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/mock_auth_credential.d.ts +0 -0
  387. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/mock_fetch.d.ts +0 -0
  388. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/mock_popup_redirect_resolver.d.ts +0 -0
  389. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/redirect_persistence.d.ts +0 -0
  390. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/helpers/timeout_stub.d.ts +0 -0
  391. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/flows/middleware_test_generator.d.ts +0 -0
  392. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/auth_driver.d.ts +0 -0
  393. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/functions.d.ts +0 -0
  394. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/idp_page.d.ts +0 -0
  395. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/js_load_condition.d.ts +0 -0
  396. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/test_runner.d.ts +0 -0
  397. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/test_server.d.ts +0 -0
  398. /package/dist/{web-extension-esm2017 → web-extension-esm}/test/integration/webdriver/util/ui_page.d.ts +0 -0
  399. /package/dist/{web-extension-esm2017 → web-extension-esm}/tsdoc-metadata.json +0 -0
@@ -2,7 +2,6 @@
2
2
 
3
3
  var util = require('@firebase/util');
4
4
  var app = require('@firebase/app');
5
- var tslib = require('tslib');
6
5
  var component = require('@firebase/component');
7
6
  var logger = require('@firebase/logger');
8
7
 
@@ -380,7 +379,10 @@ function _createError(authOrCode, ...rest) {
380
379
  return createErrorInternal(authOrCode, ...rest);
381
380
  }
382
381
  function _errorWithCustomMessage(auth, code, message) {
383
- const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
382
+ const errorMap = {
383
+ ...prodErrorMap(),
384
+ [code]: message
385
+ };
384
386
  const factory = new util.ErrorFactory('auth', 'Firebase', errorMap);
385
387
  return factory.create(code, {
386
388
  appName: auth.name
@@ -461,15 +463,13 @@ function debugAssert(assertion, message) {
461
463
  * limitations under the License.
462
464
  */
463
465
  function _getCurrentUrl() {
464
- var _a;
465
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';
466
+ return (typeof self !== 'undefined' && self.location?.href) || '';
466
467
  }
467
468
  function _isHttpOrHttps() {
468
469
  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';
469
470
  }
470
471
  function _getCurrentScheme() {
471
- var _a;
472
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;
472
+ return (typeof self !== 'undefined' && self.location?.protocol) || null;
473
473
  }
474
474
 
475
475
  /**
@@ -783,7 +783,10 @@ const CookieAuthProxiedEndpoints = [
783
783
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
784
784
  function _addTidIfNecessary(auth, request) {
785
785
  if (auth.tenantId && !request.tenantId) {
786
- return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });
786
+ return {
787
+ ...request,
788
+ tenantId: auth.tenantId
789
+ };
787
790
  }
788
791
  return request;
789
792
  }
@@ -801,14 +804,20 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
801
804
  };
802
805
  }
803
806
  }
804
- const query = util.querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
807
+ const query = util.querystring({
808
+ key: auth.config.apiKey,
809
+ ...params
810
+ }).slice(1);
805
811
  const headers = await auth._getAdditionalHeaders();
806
812
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
807
813
  if (auth.languageCode) {
808
814
  headers["X-Firebase-Locale" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;
809
815
  }
810
- const fetchArgs = Object.assign({ method,
811
- headers }, body);
816
+ const fetchArgs = {
817
+ method,
818
+ headers,
819
+ ...body
820
+ };
812
821
  /* Security-conscious server-side frameworks tend to have built in mitigations for referrer
813
822
  problems". See the Cloudflare GitHub issue #487: Error: The 'referrerPolicy' field on
814
823
  'RequestInitializerDict' is not implemented."
@@ -824,7 +833,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
824
833
  }
825
834
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
826
835
  auth._canInitEmulator = false;
827
- const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);
836
+ const errorMap = { ...SERVER_ERROR_MAP, ...customErrorMap };
828
837
  try {
829
838
  const networkTimeout = new NetworkTimeout(auth);
830
839
  const response = await Promise.race([
@@ -1165,7 +1174,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1165
1174
  const claims = _parseToken(token);
1166
1175
  _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1167
1176
  const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;
1168
- const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];
1177
+ const signInProvider = firebase?.['sign_in_provider'];
1169
1178
  return {
1170
1179
  claims,
1171
1180
  token,
@@ -1173,7 +1182,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1173
1182
  issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),
1174
1183
  expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),
1175
1184
  signInProvider: signInProvider || null,
1176
- signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null
1185
+ signInSecondFactor: firebase?.['sign_in_second_factor'] || null
1177
1186
  };
1178
1187
  }
1179
1188
  function secondsStringToMilliseconds(seconds) {
@@ -1196,7 +1205,7 @@ function _parseToken(token) {
1196
1205
  return JSON.parse(decoded);
1197
1206
  }
1198
1207
  catch (e) {
1199
- _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());
1208
+ _logError('Caught error parsing JWT payload as JSON', e?.toString());
1200
1209
  return null;
1201
1210
  }
1202
1211
  }
@@ -1292,7 +1301,6 @@ class ProactiveRefresh {
1292
1301
  }
1293
1302
  }
1294
1303
  getInterval(wasError) {
1295
- var _a;
1296
1304
  if (wasError) {
1297
1305
  const interval = this.errorBackoff;
1298
1306
  this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);
@@ -1301,7 +1309,7 @@ class ProactiveRefresh {
1301
1309
  else {
1302
1310
  // Reset the error backoff
1303
1311
  this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;
1304
- const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;
1312
+ const expTime = this.user.stsTokenManager.expirationTime ?? 0;
1305
1313
  const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;
1306
1314
  return Math.max(0, interval);
1307
1315
  }
@@ -1322,7 +1330,7 @@ class ProactiveRefresh {
1322
1330
  }
1323
1331
  catch (e) {
1324
1332
  // Only retry on network errors
1325
- if ((e === null || e === void 0 ? void 0 : e.code) ===
1333
+ if (e?.code ===
1326
1334
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
1327
1335
  this.schedule(/* wasError */ true);
1328
1336
  }
@@ -1388,14 +1396,13 @@ class UserMetadata {
1388
1396
  * limitations under the License.
1389
1397
  */
1390
1398
  async function _reloadWithoutSaving(user) {
1391
- var _a;
1392
1399
  const auth = user.auth;
1393
1400
  const idToken = await user.getIdToken();
1394
1401
  const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));
1395
- _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1402
+ _assert(response?.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1396
1403
  const coreAccount = response.users[0];
1397
1404
  user._notifyReloadListener(coreAccount);
1398
- const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)
1405
+ const newProviderData = coreAccount.providerUserInfo?.length
1399
1406
  ? extractProviderData(coreAccount.providerUserInfo)
1400
1407
  : [];
1401
1408
  const providerData = mergeProviderData(user.providerData, newProviderData);
@@ -1405,7 +1412,7 @@ async function _reloadWithoutSaving(user) {
1405
1412
  // On the other hand, if it was not anonymous before, it should never be
1406
1413
  // considered anonymous now.
1407
1414
  const oldIsAnonymous = user.isAnonymous;
1408
- const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1415
+ const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !providerData?.length;
1409
1416
  const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;
1410
1417
  const updates = {
1411
1418
  uid: coreAccount.localId,
@@ -1442,8 +1449,7 @@ function mergeProviderData(original, newData) {
1442
1449
  return [...deduped, ...newData];
1443
1450
  }
1444
1451
  function extractProviderData(providers) {
1445
- return providers.map((_a) => {
1446
- var { providerId } = _a, provider = tslib.__rest(_a, ["providerId"]);
1452
+ return providers.map(({ providerId, ...provider }) => {
1447
1453
  return {
1448
1454
  providerId,
1449
1455
  uid: provider.rawId || '',
@@ -1635,8 +1641,7 @@ function assertStringOrUndefined(assertion, appName) {
1635
1641
  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { appName });
1636
1642
  }
1637
1643
  class UserImpl {
1638
- constructor(_a) {
1639
- var { uid, auth, stsTokenManager } = _a, opt = tslib.__rest(_a, ["uid", "auth", "stsTokenManager"]);
1644
+ constructor({ uid, auth, stsTokenManager, ...opt }) {
1640
1645
  // For the user object, provider is always Firebase.
1641
1646
  this.providerId = "firebase" /* ProviderId.FIREBASE */;
1642
1647
  this.proactiveRefresh = new ProactiveRefresh(this);
@@ -1684,12 +1689,16 @@ class UserImpl {
1684
1689
  this.phoneNumber = user.phoneNumber;
1685
1690
  this.isAnonymous = user.isAnonymous;
1686
1691
  this.tenantId = user.tenantId;
1687
- this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));
1692
+ this.providerData = user.providerData.map(userInfo => ({ ...userInfo }));
1688
1693
  this.metadata._copy(user.metadata);
1689
1694
  this.stsTokenManager._assign(user.stsTokenManager);
1690
1695
  }
1691
1696
  _clone(auth) {
1692
- const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));
1697
+ const newUser = new UserImpl({
1698
+ ...this,
1699
+ auth,
1700
+ stsTokenManager: this.stsTokenManager._clone()
1701
+ });
1693
1702
  newUser.metadata._copy(this.metadata);
1694
1703
  return newUser;
1695
1704
  }
@@ -1744,26 +1753,40 @@ class UserImpl {
1744
1753
  return this.auth.signOut();
1745
1754
  }
1746
1755
  toJSON() {
1747
- return Object.assign(Object.assign({ uid: this.uid, email: this.email || undefined, emailVerified: this.emailVerified, displayName: this.displayName || undefined, isAnonymous: this.isAnonymous, photoURL: this.photoURL || undefined, phoneNumber: this.phoneNumber || undefined, tenantId: this.tenantId || undefined, providerData: this.providerData.map(userInfo => (Object.assign({}, userInfo))), stsTokenManager: this.stsTokenManager.toJSON(),
1756
+ return {
1757
+ uid: this.uid,
1758
+ email: this.email || undefined,
1759
+ emailVerified: this.emailVerified,
1760
+ displayName: this.displayName || undefined,
1761
+ isAnonymous: this.isAnonymous,
1762
+ photoURL: this.photoURL || undefined,
1763
+ phoneNumber: this.phoneNumber || undefined,
1764
+ tenantId: this.tenantId || undefined,
1765
+ providerData: this.providerData.map(userInfo => ({ ...userInfo })),
1766
+ stsTokenManager: this.stsTokenManager.toJSON(),
1748
1767
  // Redirect event ID must be maintained in case there is a pending
1749
1768
  // redirect event.
1750
- _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), {
1769
+ _redirectEventId: this._redirectEventId,
1770
+ ...this.metadata.toJSON(),
1751
1771
  // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):
1752
- apiKey: this.auth.config.apiKey, appName: this.auth.name });
1772
+ apiKey: this.auth.config.apiKey,
1773
+ appName: this.auth.name
1774
+ // Missing authDomain will be tolerated by the legacy SDK.
1775
+ // stsTokenManager.apiKey isn't actually required (despite the legacy SDK persisting it).
1776
+ };
1753
1777
  }
1754
1778
  get refreshToken() {
1755
1779
  return this.stsTokenManager.refreshToken || '';
1756
1780
  }
1757
1781
  static _fromJSON(auth, object) {
1758
- var _a, _b, _c, _d, _e, _f, _g, _h;
1759
- const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;
1760
- const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;
1761
- const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;
1762
- const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;
1763
- const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;
1764
- const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;
1765
- const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
1766
- const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;
1782
+ const displayName = object.displayName ?? undefined;
1783
+ const email = object.email ?? undefined;
1784
+ const phoneNumber = object.phoneNumber ?? undefined;
1785
+ const photoURL = object.photoURL ?? undefined;
1786
+ const tenantId = object.tenantId ?? undefined;
1787
+ const _redirectEventId = object._redirectEventId ?? undefined;
1788
+ const createdAt = object.createdAt ?? undefined;
1789
+ const lastLoginAt = object.lastLoginAt ?? undefined;
1767
1790
  const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;
1768
1791
  _assert(uid && plainObjectTokenManager, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1769
1792
  const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);
@@ -1793,7 +1816,7 @@ class UserImpl {
1793
1816
  lastLoginAt
1794
1817
  });
1795
1818
  if (providerData && Array.isArray(providerData)) {
1796
- user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));
1819
+ user.providerData = providerData.map(userInfo => ({ ...userInfo }));
1797
1820
  }
1798
1821
  if (_redirectEventId) {
1799
1822
  user._redirectEventId = _redirectEventId;
@@ -1830,7 +1853,7 @@ class UserImpl {
1830
1853
  const providerData = coreAccount.providerUserInfo !== undefined
1831
1854
  ? extractProviderData(coreAccount.providerUserInfo)
1832
1855
  : [];
1833
- const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1856
+ const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;
1834
1857
  const stsTokenManager = new StsTokenManager();
1835
1858
  stsTokenManager.updateFromIdToken(idToken);
1836
1859
  // Initialize the Firebase Auth user.
@@ -1852,7 +1875,7 @@ class UserImpl {
1852
1875
  providerData,
1853
1876
  metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
1854
1877
  isAnonymous: !(coreAccount.email && coreAccount.passwordHash) &&
1855
- !(providerData === null || providerData === void 0 ? void 0 : providerData.length)
1878
+ !providerData?.length
1856
1879
  };
1857
1880
  Object.assign(user, updates);
1858
1881
  return user;
@@ -2051,7 +2074,7 @@ class PersistenceUserManager {
2051
2074
  break;
2052
2075
  }
2053
2076
  }
2054
- catch (_a) { }
2077
+ catch { }
2055
2078
  }
2056
2079
  // If we find the user in a persistence that does support migration, use
2057
2080
  // that migration path (of only persistences that support migration)
@@ -2074,7 +2097,7 @@ class PersistenceUserManager {
2074
2097
  try {
2075
2098
  await persistence._remove(key);
2076
2099
  }
2077
- catch (_a) { }
2100
+ catch { }
2078
2101
  }
2079
2102
  }));
2080
2103
  return new PersistenceUserManager(selectedPersistence, auth, userKey);
@@ -2144,7 +2167,7 @@ function _getBrowserName(userAgent) {
2144
2167
  // Most modern browsers have name/version at end of user agent string.
2145
2168
  const re = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/;
2146
2169
  const matches = userAgent.match(re);
2147
- if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {
2170
+ if (matches?.length === 2) {
2148
2171
  return matches[1];
2149
2172
  }
2150
2173
  }
@@ -2184,8 +2207,7 @@ function _isIOS7Or8(ua = util.getUA()) {
2184
2207
  /(iPad|iPhone|iPod).*OS 8_\d/i.test(ua));
2185
2208
  }
2186
2209
  function _isIOSStandalone(ua = util.getUA()) {
2187
- var _a;
2188
- return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);
2210
+ return _isIOS(ua) && !!window.navigator?.standalone;
2189
2211
  }
2190
2212
  function _isIE10() {
2191
2213
  return util.isIE() && document.documentMode === 10;
@@ -2316,7 +2338,7 @@ class AuthMiddlewareQueue {
2316
2338
  }
2317
2339
  }
2318
2340
  throw this.auth._errorFactory.create("login-blocked" /* AuthErrorCode.LOGIN_BLOCKED */, {
2319
- originalMessage: e === null || e === void 0 ? void 0 : e.message
2341
+ originalMessage: e?.message
2320
2342
  });
2321
2343
  }
2322
2344
  }
@@ -2374,13 +2396,12 @@ const MINIMUM_MIN_PASSWORD_LENGTH = 6;
2374
2396
  */
2375
2397
  class PasswordPolicyImpl {
2376
2398
  constructor(response) {
2377
- var _a, _b, _c, _d;
2378
2399
  // Only include custom strength options defined in the response.
2379
2400
  const responseOptions = response.customStrengthOptions;
2380
2401
  this.customStrengthOptions = {};
2381
2402
  // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
2382
2403
  this.customStrengthOptions.minPasswordLength =
2383
- (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
2404
+ responseOptions.minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH;
2384
2405
  if (responseOptions.maxPasswordLength) {
2385
2406
  this.customStrengthOptions.maxPasswordLength =
2386
2407
  responseOptions.maxPasswordLength;
@@ -2407,12 +2428,11 @@ class PasswordPolicyImpl {
2407
2428
  }
2408
2429
  // Use an empty string if no non-alphanumeric characters are specified in the response.
2409
2430
  this.allowedNonAlphanumericCharacters =
2410
- (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';
2411
- this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
2431
+ response.allowedNonAlphanumericCharacters?.join('') ?? '';
2432
+ this.forceUpgradeOnSignin = response.forceUpgradeOnSignin ?? false;
2412
2433
  this.schemaVersion = response.schemaVersion;
2413
2434
  }
2414
2435
  validatePassword(password) {
2415
- var _a, _b, _c, _d, _e, _f;
2416
2436
  const status = {
2417
2437
  isValid: true,
2418
2438
  passwordPolicy: this
@@ -2421,12 +2441,12 @@ class PasswordPolicyImpl {
2421
2441
  this.validatePasswordLengthOptions(password, status);
2422
2442
  this.validatePasswordCharacterOptions(password, status);
2423
2443
  // Combine the status into single isValid property.
2424
- status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
2425
- status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
2426
- status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
2427
- status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
2428
- status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
2429
- status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
2444
+ status.isValid && (status.isValid = status.meetsMinPasswordLength ?? true);
2445
+ status.isValid && (status.isValid = status.meetsMaxPasswordLength ?? true);
2446
+ status.isValid && (status.isValid = status.containsLowercaseLetter ?? true);
2447
+ status.isValid && (status.isValid = status.containsUppercaseLetter ?? true);
2448
+ status.isValid && (status.isValid = status.containsNumericCharacter ?? true);
2449
+ status.isValid && (status.isValid = status.containsNonAlphanumericCharacter ?? true);
2430
2450
  return status;
2431
2451
  }
2432
2452
  /**
@@ -2563,18 +2583,17 @@ class AuthImpl {
2563
2583
  // Have to check for app deletion throughout initialization (after each
2564
2584
  // promise resolution)
2565
2585
  this._initializationPromise = this.queue(async () => {
2566
- var _a, _b, _c;
2567
2586
  if (this._deleted) {
2568
2587
  return;
2569
2588
  }
2570
2589
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
2571
- (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
2590
+ this._resolvePersistenceManagerAvailable?.();
2572
2591
  if (this._deleted) {
2573
2592
  return;
2574
2593
  }
2575
2594
  // Initialize the resolver early if necessary (only applicable to web:
2576
2595
  // this will cause the iframe to load immediately in certain cases)
2577
- if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
2596
+ if (this._popupRedirectResolver?._shouldInitProactively) {
2578
2597
  // If this fails, don't halt auth loading
2579
2598
  try {
2580
2599
  await this._popupRedirectResolver._initialize(this);
@@ -2584,7 +2603,7 @@ class AuthImpl {
2584
2603
  }
2585
2604
  }
2586
2605
  await this.initializeCurrentUser(popupRedirectResolver);
2587
- this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2606
+ this.lastNotifiedUid = this.currentUser?.uid || null;
2588
2607
  if (this._deleted) {
2589
2608
  return;
2590
2609
  }
@@ -2629,7 +2648,6 @@ class AuthImpl {
2629
2648
  }
2630
2649
  }
2631
2650
  async initializeCurrentUser(popupRedirectResolver) {
2632
- var _a;
2633
2651
  if (app._isFirebaseServerApp(this.app)) {
2634
2652
  const idToken = this.app.settings.authIdToken;
2635
2653
  if (idToken) {
@@ -2649,15 +2667,15 @@ class AuthImpl {
2649
2667
  let needsTocheckMiddleware = false;
2650
2668
  if (popupRedirectResolver && this.config.authDomain) {
2651
2669
  await this.getOrInitRedirectPersistenceManager();
2652
- const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;
2653
- const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;
2670
+ const redirectUserEventId = this.redirectUser?._redirectEventId;
2671
+ const storedUserEventId = futureCurrentUser?._redirectEventId;
2654
2672
  const result = await this.tryRedirectSignIn(popupRedirectResolver);
2655
2673
  // If the stored user (i.e. the old "currentUser") has a redirectId that
2656
2674
  // matches the redirect user, then we want to initially sign in with the
2657
2675
  // new user object from result.
2658
2676
  // TODO(samgho): More thoroughly test all of this
2659
2677
  if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&
2660
- (result === null || result === void 0 ? void 0 : result.user)) {
2678
+ result?.user) {
2661
2679
  futureCurrentUser = result.user;
2662
2680
  needsTocheckMiddleware = true;
2663
2681
  }
@@ -2732,7 +2750,7 @@ class AuthImpl {
2732
2750
  await _reloadWithoutSaving(user);
2733
2751
  }
2734
2752
  catch (e) {
2735
- if ((e === null || e === void 0 ? void 0 : e.code) !==
2753
+ if (e?.code !==
2736
2754
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
2737
2755
  // Something's wrong with the user's token. Log them out and remove
2738
2756
  // them from storage
@@ -2889,12 +2907,11 @@ class AuthImpl {
2889
2907
  }
2890
2908
  }
2891
2909
  toJSON() {
2892
- var _a;
2893
2910
  return {
2894
2911
  apiKey: this.config.apiKey,
2895
2912
  authDomain: this.config.authDomain,
2896
2913
  appName: this.name,
2897
- currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()
2914
+ currentUser: this._currentUser?.toJSON()
2898
2915
  };
2899
2916
  }
2900
2917
  async _setRedirectUser(user, popupRedirectResolver) {
@@ -2915,16 +2932,15 @@ class AuthImpl {
2915
2932
  return this.redirectPersistenceManager;
2916
2933
  }
2917
2934
  async _redirectUserForId(id) {
2918
- var _a, _b;
2919
2935
  // Make sure we've cleared any pending persistence actions if we're not in
2920
2936
  // the initializer
2921
2937
  if (this._isInitialized) {
2922
2938
  await this.queue(async () => { });
2923
2939
  }
2924
- if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {
2940
+ if (this._currentUser?._redirectEventId === id) {
2925
2941
  return this._currentUser;
2926
2942
  }
2927
- if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {
2943
+ if (this.redirectUser?._redirectEventId === id) {
2928
2944
  return this.redirectUser;
2929
2945
  }
2930
2946
  return null;
@@ -2960,12 +2976,11 @@ class AuthImpl {
2960
2976
  return this.currentUser;
2961
2977
  }
2962
2978
  notifyAuthListeners() {
2963
- var _a, _b;
2964
2979
  if (!this._isInitialized) {
2965
2980
  return;
2966
2981
  }
2967
2982
  this.idTokenSubscription.next(this.currentUser);
2968
- const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;
2983
+ const currentUid = this.currentUser?.uid ?? null;
2969
2984
  if (this.lastNotifiedUid !== currentUid) {
2970
2985
  this.lastNotifiedUid = currentUid;
2971
2986
  this.authStateSubscription.next(this.currentUser);
@@ -3050,7 +3065,6 @@ class AuthImpl {
3050
3065
  return this.frameworks;
3051
3066
  }
3052
3067
  async _getAdditionalHeaders() {
3053
- var _a;
3054
3068
  // Additional headers on every request
3055
3069
  const headers = {
3056
3070
  ["X-Client-Version" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion
@@ -3059,10 +3073,11 @@ class AuthImpl {
3059
3073
  headers["X-Firebase-gmpid" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;
3060
3074
  }
3061
3075
  // If the heartbeat service exists, add the heartbeat string
3062
- const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
3076
+ const heartbeatsHeader = await this.heartbeatServiceProvider
3063
3077
  .getImmediate({
3064
3078
  optional: true
3065
- })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
3079
+ })
3080
+ ?.getHeartbeatsHeader();
3066
3081
  if (heartbeatsHeader) {
3067
3082
  headers["X-Firebase-Client" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;
3068
3083
  }
@@ -3074,20 +3089,20 @@ class AuthImpl {
3074
3089
  return headers;
3075
3090
  }
3076
3091
  async _getAppCheckToken() {
3077
- var _a;
3078
3092
  if (app._isFirebaseServerApp(this.app) && this.app.settings.appCheckToken) {
3079
3093
  return this.app.settings.appCheckToken;
3080
3094
  }
3081
- const appCheckTokenResult = await ((_a = this.appCheckServiceProvider
3082
- .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
3083
- if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
3095
+ const appCheckTokenResult = await this.appCheckServiceProvider
3096
+ .getImmediate({ optional: true })
3097
+ ?.getToken();
3098
+ if (appCheckTokenResult?.error) {
3084
3099
  // Context: appCheck.getToken() will never throw even if an error happened.
3085
3100
  // In the error case, a dummy token will be returned along with an error field describing
3086
3101
  // the error. In general, we shouldn't care about the error condition and just use
3087
3102
  // the token (actual or dummy) to send requests.
3088
3103
  _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
3089
3104
  }
3090
- return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
3105
+ return appCheckTokenResult?.token;
3091
3106
  }
3092
3107
  }
3093
3108
  /**
@@ -3187,20 +3202,17 @@ class MockReCaptcha {
3187
3202
  return id;
3188
3203
  }
3189
3204
  reset(optWidgetId) {
3190
- var _a;
3191
3205
  const id = optWidgetId || _WIDGET_ID_START;
3192
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());
3206
+ void this._widgets.get(id)?.delete();
3193
3207
  this._widgets.delete(id);
3194
3208
  }
3195
3209
  getResponse(optWidgetId) {
3196
- var _a;
3197
3210
  const id = optWidgetId || _WIDGET_ID_START;
3198
- return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';
3211
+ return this._widgets.get(id)?.getResponse() || '';
3199
3212
  }
3200
3213
  async execute(optWidgetId) {
3201
- var _a;
3202
3214
  const id = optWidgetId || _WIDGET_ID_START;
3203
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());
3215
+ void this._widgets.get(id)?.execute();
3204
3216
  return '';
3205
3217
  }
3206
3218
  }
@@ -3440,7 +3452,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3440
3452
  captchaResponse = await verifier.verify(action, true);
3441
3453
  }
3442
3454
  }
3443
- const newRequest = Object.assign({}, request);
3455
+ const newRequest = { ...request };
3444
3456
  if (action === "mfaSmsEnrollment" /* RecaptchaActionName.MFA_SMS_ENROLLMENT */ ||
3445
3457
  action === "mfaSmsSignIn" /* RecaptchaActionName.MFA_SMS_SIGNIN */) {
3446
3458
  if ('phoneEnrollmentInfo' in newRequest) {
@@ -3482,10 +3494,10 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3482
3494
  return newRequest;
3483
3495
  }
3484
3496
  async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
3485
- var _a, _b;
3486
3497
  if (recaptchaAuthProvider === "EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */) {
3487
- if ((_a = authInstance
3488
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3498
+ if (authInstance
3499
+ ._getRecaptchaConfig()
3500
+ ?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3489
3501
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */);
3490
3502
  return actionMethod(authInstance, requestWithRecaptcha);
3491
3503
  }
@@ -3503,13 +3515,14 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
3503
3515
  }
3504
3516
  }
3505
3517
  else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
3506
- if ((_b = authInstance
3507
- ._getRecaptchaConfig()) === null || _b === void 0 ? void 0 : _b.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3518
+ if (authInstance
3519
+ ._getRecaptchaConfig()
3520
+ ?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3508
3521
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
3509
3522
  return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
3510
- var _a;
3511
- if (((_a = authInstance
3512
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) === "AUDIT" /* EnforcementState.AUDIT */) {
3523
+ if (authInstance
3524
+ ._getRecaptchaConfig()
3525
+ ?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
3513
3526
  // AUDIT mode
3514
3527
  if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
3515
3528
  error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
@@ -3606,7 +3619,7 @@ function initializeAuth(app$1, deps) {
3606
3619
  if (provider.isInitialized()) {
3607
3620
  const auth = provider.getImmediate();
3608
3621
  const initialOptions = provider.getOptions();
3609
- if (util.deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
3622
+ if (util.deepEqual(initialOptions, deps ?? {})) {
3610
3623
  return auth;
3611
3624
  }
3612
3625
  else {
@@ -3617,15 +3630,15 @@ function initializeAuth(app$1, deps) {
3617
3630
  return auth;
3618
3631
  }
3619
3632
  function _initializeAuthInstance(auth, deps) {
3620
- const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
3633
+ const persistence = deps?.persistence || [];
3621
3634
  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
3622
- if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
3635
+ if (deps?.errorMap) {
3623
3636
  auth._updateErrorMap(deps.errorMap);
3624
3637
  }
3625
3638
  // This promise is intended to float; auth initialization happens in the
3626
3639
  // background, meanwhile the auth object may be used by the app.
3627
3640
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
3628
- auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
3641
+ auth._initializeWithPersistence(hierarchy, deps?.popupRedirectResolver);
3629
3642
  }
3630
3643
 
3631
3644
  /**
@@ -3653,7 +3666,7 @@ function _initializeAuthInstance(auth, deps) {
3653
3666
  function connectAuthEmulator(auth, url, options) {
3654
3667
  const authInternal = _castAuth(auth);
3655
3668
  _assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
3656
- const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
3669
+ const disableWarnings = !!options?.disableWarnings;
3657
3670
  const protocol = extractProtocol(url);
3658
3671
  const { host, port } = extractHostAndPort(url);
3659
3672
  const portStr = port === null ? '' : `:${port}`;
@@ -3979,7 +3992,7 @@ class EmailAuthCredential extends AuthCredential {
3979
3992
  */
3980
3993
  static fromJSON(json) {
3981
3994
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
3982
- if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {
3995
+ if (obj?.email && obj?.password) {
3983
3996
  if (obj.signInMethod === "password" /* SignInMethod.EMAIL_PASSWORD */) {
3984
3997
  return this._fromEmailAndPassword(obj.email, obj.password);
3985
3998
  }
@@ -4139,7 +4152,7 @@ class OAuthCredential extends AuthCredential {
4139
4152
  */
4140
4153
  static fromJSON(json) {
4141
4154
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4142
- const { providerId, signInMethod } = obj, rest = tslib.__rest(obj, ["providerId", "signInMethod"]);
4155
+ const { providerId, signInMethod, ...rest } = obj;
4143
4156
  if (!providerId || !signInMethod) {
4144
4157
  return null;
4145
4158
  }
@@ -4230,7 +4243,10 @@ const VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {
4230
4243
  ["USER_NOT_FOUND" /* ServerError.USER_NOT_FOUND */]: "user-not-found" /* AuthErrorCode.USER_DELETED */
4231
4244
  };
4232
4245
  async function verifyPhoneNumberForExisting(auth, request) {
4233
- const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });
4246
+ const apiRequest = {
4247
+ ...request,
4248
+ operation: 'REAUTH'
4249
+ };
4234
4250
  return _performSignInRequest(auth, "POST" /* HttpMethod.POST */, "/v1/accounts:signInWithPhoneNumber" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);
4235
4251
  }
4236
4252
 
@@ -4274,7 +4290,10 @@ class PhoneAuthCredential extends AuthCredential {
4274
4290
  }
4275
4291
  /** @internal */
4276
4292
  _linkToIdToken(auth, idToken) {
4277
- return linkWithPhoneNumber$1(auth, Object.assign({ idToken }, this._makeVerificationRequest()));
4293
+ return linkWithPhoneNumber$1(auth, {
4294
+ idToken,
4295
+ ...this._makeVerificationRequest()
4296
+ });
4278
4297
  }
4279
4298
  /** @internal */
4280
4299
  _getReauthenticationResolver(auth) {
@@ -4402,19 +4421,18 @@ class ActionCodeURL {
4402
4421
  * @internal
4403
4422
  */
4404
4423
  constructor(actionLink) {
4405
- var _a, _b, _c, _d, _e, _f;
4406
4424
  const searchParams = util.querystringDecode(util.extractQuerystring(actionLink));
4407
- const apiKey = (_a = searchParams["apiKey" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;
4408
- const code = (_b = searchParams["oobCode" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;
4409
- const operation = parseMode((_c = searchParams["mode" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);
4425
+ const apiKey = searchParams["apiKey" /* QueryField.API_KEY */] ?? null;
4426
+ const code = searchParams["oobCode" /* QueryField.CODE */] ?? null;
4427
+ const operation = parseMode(searchParams["mode" /* QueryField.MODE */] ?? null);
4410
4428
  // Validate API key, code and mode.
4411
4429
  _assert(apiKey && code && operation, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4412
4430
  this.apiKey = apiKey;
4413
4431
  this.operation = operation;
4414
4432
  this.code = code;
4415
- this.continueUrl = (_d = searchParams["continueUrl" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;
4416
- this.languageCode = (_e = searchParams["lang" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;
4417
- this.tenantId = (_f = searchParams["tenantId" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;
4433
+ this.continueUrl = searchParams["continueUrl" /* QueryField.CONTINUE_URL */] ?? null;
4434
+ this.languageCode = searchParams["lang" /* QueryField.LANGUAGE_CODE */] ?? null;
4435
+ this.tenantId = searchParams["tenantId" /* QueryField.TENANT_ID */] ?? null;
4418
4436
  }
4419
4437
  /**
4420
4438
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -4430,7 +4448,7 @@ class ActionCodeURL {
4430
4448
  try {
4431
4449
  return new ActionCodeURL(actionLink);
4432
4450
  }
4433
- catch (_a) {
4451
+ catch {
4434
4452
  return null;
4435
4453
  }
4436
4454
  }
@@ -4720,13 +4738,17 @@ class OAuthProvider extends BaseOAuthProvider {
4720
4738
  * or the ID token string.
4721
4739
  */
4722
4740
  credential(params) {
4723
- return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
4741
+ return this._credential({ ...params, nonce: params.rawNonce });
4724
4742
  }
4725
4743
  /** An internal credential method that accepts more permissive options */
4726
4744
  _credential(params) {
4727
4745
  _assert(params.idToken || params.accessToken, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4728
4746
  // For OAuthCredential, sign in method is same as providerId.
4729
- return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));
4747
+ return OAuthCredential._fromParams({
4748
+ ...params,
4749
+ providerId: this.providerId,
4750
+ signInMethod: this.providerId
4751
+ });
4730
4752
  }
4731
4753
  /**
4732
4754
  * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
@@ -4878,7 +4900,7 @@ class FacebookAuthProvider extends BaseOAuthProvider {
4878
4900
  try {
4879
4901
  return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
4880
4902
  }
4881
- catch (_a) {
4903
+ catch {
4882
4904
  return null;
4883
4905
  }
4884
4906
  }
@@ -5000,7 +5022,7 @@ class GoogleAuthProvider extends BaseOAuthProvider {
5000
5022
  try {
5001
5023
  return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
5002
5024
  }
5003
- catch (_a) {
5025
+ catch {
5004
5026
  return null;
5005
5027
  }
5006
5028
  }
@@ -5111,7 +5133,7 @@ class GithubAuthProvider extends BaseOAuthProvider {
5111
5133
  try {
5112
5134
  return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
5113
5135
  }
5114
- catch (_a) {
5136
+ catch {
5115
5137
  return null;
5116
5138
  }
5117
5139
  }
@@ -5395,7 +5417,7 @@ class TwitterAuthProvider extends BaseOAuthProvider {
5395
5417
  try {
5396
5418
  return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
5397
5419
  }
5398
- catch (_a) {
5420
+ catch {
5399
5421
  return null;
5400
5422
  }
5401
5423
  }
@@ -5511,13 +5533,12 @@ function providerIdForResponse(response) {
5511
5533
  * @public
5512
5534
  */
5513
5535
  async function signInAnonymously(auth) {
5514
- var _a;
5515
5536
  if (app._isFirebaseServerApp(auth.app)) {
5516
5537
  return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(auth));
5517
5538
  }
5518
5539
  const authInternal = _castAuth(auth);
5519
5540
  await authInternal._initializationPromise;
5520
- if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {
5541
+ if (authInternal.currentUser?.isAnonymous) {
5521
5542
  // If an anonymous user is already signed in, no need to sign them in again.
5522
5543
  return new UserCredentialImpl({
5523
5544
  user: authInternal.currentUser,
@@ -5551,7 +5572,6 @@ async function signInAnonymously(auth) {
5551
5572
  */
5552
5573
  class MultiFactorError extends util.FirebaseError {
5553
5574
  constructor(auth, error, operationType, user) {
5554
- var _a;
5555
5575
  super(error.code, error.message);
5556
5576
  this.operationType = operationType;
5557
5577
  this.user = user;
@@ -5559,7 +5579,7 @@ class MultiFactorError extends util.FirebaseError {
5559
5579
  Object.setPrototypeOf(this, MultiFactorError.prototype);
5560
5580
  this.customData = {
5561
5581
  appName: auth.name,
5562
- tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
5582
+ tenantId: auth.tenantId ?? undefined,
5563
5583
  _serverResponse: error.customData._serverResponse,
5564
5584
  operationType
5565
5585
  };
@@ -5690,7 +5710,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
5690
5710
  }
5691
5711
  catch (e) {
5692
5712
  // Convert user deleted error into user mismatch
5693
- if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5713
+ if (e?.code === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5694
5714
  _fail(auth, "user-mismatch" /* AuthErrorCode.USER_MISMATCH */);
5695
5715
  }
5696
5716
  throw e;
@@ -5915,8 +5935,7 @@ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
5915
5935
  * limitations under the License.
5916
5936
  */
5917
5937
  function _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {
5918
- var _a;
5919
- _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
5938
+ _assert(actionCodeSettings.url?.length > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
5920
5939
  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||
5921
5940
  actionCodeSettings.dynamicLinkDomain.length > 0, auth, "invalid-dynamic-link-domain" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);
5922
5941
  _assert(typeof actionCodeSettings.linkDomain === 'undefined' ||
@@ -6277,7 +6296,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
6277
6296
  */
6278
6297
  function isSignInWithEmailLink(auth, emailLink) {
6279
6298
  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);
6280
- return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6299
+ return actionCodeUrl?.operation === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6281
6300
  }
6282
6301
  /**
6283
6302
  * Asynchronously signs in using an email and sign-in email link.
@@ -6650,7 +6669,6 @@ async function updateEmailOrPassword(user, email, password) {
6650
6669
  *
6651
6670
  */
6652
6671
  function _fromIdTokenResponse(idTokenResponse) {
6653
- var _a, _b;
6654
6672
  if (!idTokenResponse) {
6655
6673
  return null;
6656
6674
  }
@@ -6660,8 +6678,8 @@ function _fromIdTokenResponse(idTokenResponse) {
6660
6678
  : {};
6661
6679
  const isNewUser = idTokenResponse.isNewUser ||
6662
6680
  idTokenResponse.kind === "identitytoolkit#SignupNewUserResponse" /* IdTokenResponseKind.SignupNewUser */;
6663
- if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {
6664
- const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];
6681
+ if (!providerId && idTokenResponse?.idToken) {
6682
+ const signInProvider = _parseToken(idTokenResponse.idToken)?.firebase?.['sign_in_provider'];
6665
6683
  if (signInProvider) {
6666
6684
  const filteredProviderId = signInProvider !== "anonymous" /* ProviderId.ANONYMOUS */ &&
6667
6685
  signInProvider !== "custom" /* ProviderId.CUSTOM */
@@ -6710,7 +6728,7 @@ class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {
6710
6728
  }
6711
6729
  class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {
6712
6730
  constructor(isNewUser, profile) {
6713
- super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);
6731
+ super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof profile?.login === 'string' ? profile?.login : null);
6714
6732
  }
6715
6733
  }
6716
6734
  class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {
@@ -7010,12 +7028,11 @@ class MultiFactorSessionImpl {
7010
7028
  };
7011
7029
  }
7012
7030
  static fromJSON(obj) {
7013
- var _a, _b;
7014
- if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {
7015
- if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {
7031
+ if (obj?.multiFactorSession) {
7032
+ if (obj.multiFactorSession?.pendingCredential) {
7016
7033
  return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);
7017
7034
  }
7018
- else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {
7035
+ else if (obj.multiFactorSession?.idToken) {
7019
7036
  return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);
7020
7037
  }
7021
7038
  }
@@ -7058,7 +7075,11 @@ class MultiFactorResolverImpl {
7058
7075
  delete serverResponse.mfaInfo;
7059
7076
  delete serverResponse.mfaPendingCredential;
7060
7077
  // Use in the new token & refresh token in the old response
7061
- const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });
7078
+ const idTokenResponse = {
7079
+ ...serverResponse,
7080
+ idToken: mfaResponse.idToken,
7081
+ refreshToken: mfaResponse.refreshToken
7082
+ };
7062
7083
  // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case
7063
7084
  switch (error.operationType) {
7064
7085
  case "signIn" /* OperationType.SIGN_IN */:
@@ -7089,11 +7110,10 @@ class MultiFactorResolverImpl {
7089
7110
  * @public
7090
7111
  */
7091
7112
  function getMultiFactorResolver(auth, error) {
7092
- var _a;
7093
7113
  const authModular = util.getModularInstance(auth);
7094
7114
  const errorInternal = error;
7095
7115
  _assert(error.customData.operationType, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7096
- _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7116
+ _assert(errorInternal.customData._serverResponse?.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7097
7117
  return MultiFactorResolverImpl._fromError(authModular, errorInternal);
7098
7118
  }
7099
7119
 
@@ -7199,7 +7219,7 @@ function multiFactor(user) {
7199
7219
  }
7200
7220
 
7201
7221
  var name = "@firebase/auth";
7202
- var version = "1.10.8";
7222
+ var version = "1.11.0-20250716004940";
7203
7223
 
7204
7224
  /**
7205
7225
  * @license
@@ -7223,9 +7243,8 @@ class AuthInterop {
7223
7243
  this.internalListeners = new Map();
7224
7244
  }
7225
7245
  getUid() {
7226
- var _a;
7227
7246
  this.assertAuthConfigured();
7228
- return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
7247
+ return this.auth.currentUser?.uid || null;
7229
7248
  }
7230
7249
  async getToken(forceRefresh) {
7231
7250
  this.assertAuthConfigured();
@@ -7242,7 +7261,7 @@ class AuthInterop {
7242
7261
  return;
7243
7262
  }
7244
7263
  const unsubscribe = this.auth.onIdTokenChanged(user => {
7245
- listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
7264
+ listener(user?.stsTokenManager.accessToken || null);
7246
7265
  });
7247
7266
  this.internalListeners.set(listener, unsubscribe);
7248
7267
  this.updateProactiveRefresh();
@@ -7341,8 +7360,8 @@ function registerAuth(clientPlatform) {
7341
7360
  return (auth => new AuthInterop(auth))(auth);
7342
7361
  }, "PRIVATE" /* ComponentType.PRIVATE */).setInstantiationMode("EXPLICIT" /* InstantiationMode.EXPLICIT */));
7343
7362
  app.registerVersion(name, version, getVersionForPlatform(clientPlatform));
7344
- // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
7345
- app.registerVersion(name, version, 'cjs2017');
7363
+ // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
7364
+ app.registerVersion(name, version, 'cjs2020');
7346
7365
  }
7347
7366
 
7348
7367
  /**
@@ -7518,20 +7537,19 @@ function _isWorker() {
7518
7537
  typeof _window()['importScripts'] === 'function');
7519
7538
  }
7520
7539
  async function _getActiveServiceWorker() {
7521
- if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {
7540
+ if (!navigator?.serviceWorker) {
7522
7541
  return null;
7523
7542
  }
7524
7543
  try {
7525
7544
  const registration = await navigator.serviceWorker.ready;
7526
7545
  return registration.active;
7527
7546
  }
7528
- catch (_a) {
7547
+ catch {
7529
7548
  return null;
7530
7549
  }
7531
7550
  }
7532
7551
  function _getServiceWorkerController() {
7533
- var _a;
7534
- return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;
7552
+ return navigator?.serviceWorker?.controller || null;
7535
7553
  }
7536
7554
  function _getWorkerGlobalScope() {
7537
7555
  return _isWorker() ? self : null;
@@ -7562,7 +7580,6 @@ const NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);
7562
7580
  */
7563
7581
  class ReCaptchaLoaderImpl {
7564
7582
  constructor() {
7565
- var _a;
7566
7583
  this.hostLanguage = '';
7567
7584
  this.counter = 0;
7568
7585
  /**
@@ -7570,7 +7587,7 @@ class ReCaptchaLoaderImpl {
7570
7587
  * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
7571
7588
  * `window.grecaptcha.render()` will not. Another load will add it.
7572
7589
  */
7573
- this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);
7590
+ this.librarySeparatelyLoaded = !!_window().grecaptcha?.render;
7574
7591
  }
7575
7592
  load(auth, hl = '') {
7576
7593
  _assert(isHostLanguageValid(hl), auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
@@ -7615,7 +7632,6 @@ class ReCaptchaLoaderImpl {
7615
7632
  this.counter--;
7616
7633
  }
7617
7634
  shouldResolveImmediately(hl) {
7618
- var _a;
7619
7635
  // We can resolve immediately if:
7620
7636
  // • grecaptcha is already defined AND (
7621
7637
  // 1. the requested language codes are the same OR
@@ -7623,7 +7639,7 @@ class ReCaptchaLoaderImpl {
7623
7639
  // 3. the library was already loaded by the app
7624
7640
  // In cases (2) and (3), we _can't_ reload as it would break the recaptchas
7625
7641
  // that are already in the page
7626
- return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&
7642
+ return (!!_window().grecaptcha?.render &&
7627
7643
  (hl === this.hostLanguage ||
7628
7644
  this.counter > 0 ||
7629
7645
  this.librarySeparatelyLoaded));
@@ -7688,7 +7704,9 @@ class RecaptchaVerifier {
7688
7704
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
7689
7705
  * 'invisible'.
7690
7706
  */
7691
- constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
7707
+ constructor(authExtern, containerOrId, parameters = {
7708
+ ...DEFAULT_PARAMS
7709
+ }) {
7692
7710
  this.parameters = parameters;
7693
7711
  /**
7694
7712
  * The application verifier type.
@@ -7972,7 +7990,6 @@ async function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {
7972
7990
  *
7973
7991
  */
7974
7992
  async function _verifyPhoneNumber(auth, options, verifier) {
7975
- var _a;
7976
7993
  if (!auth._getRecaptchaConfig()) {
7977
7994
  try {
7978
7995
  await _initializeRecaptchaConfig(auth);
@@ -8009,7 +8026,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8009
8026
  const startEnrollPhoneMfaActionCallback = async (authInstance, request) => {
8010
8027
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8011
8028
  if (request.phoneEnrollmentInfo.captchaResponse === FAKE_TOKEN) {
8012
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8029
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8013
8030
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8014
8031
  return startEnrollPhoneMfa(authInstance, requestWithRecaptchaV2);
8015
8032
  }
@@ -8023,7 +8040,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8023
8040
  }
8024
8041
  else {
8025
8042
  _assert(session.type === "signin" /* MultiFactorSessionType.SIGN_IN */, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8026
- const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) ||
8043
+ const mfaEnrollmentId = phoneInfoOptions.multiFactorHint?.uid ||
8027
8044
  phoneInfoOptions.multiFactorUid;
8028
8045
  _assert(mfaEnrollmentId, auth, "missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */);
8029
8046
  const startPhoneMfaSignInRequest = {
@@ -8036,7 +8053,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8036
8053
  const startSignInPhoneMfaActionCallback = async (authInstance, request) => {
8037
8054
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8038
8055
  if (request.phoneSignInInfo.captchaResponse === FAKE_TOKEN) {
8039
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8056
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8040
8057
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8041
8058
  return startSignInPhoneMfa(authInstance, requestWithRecaptchaV2);
8042
8059
  }
@@ -8057,7 +8074,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8057
8074
  const sendPhoneVerificationCodeActionCallback = async (authInstance, request) => {
8058
8075
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8059
8076
  if (request.captchaResponse === FAKE_TOKEN) {
8060
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8077
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8061
8078
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8062
8079
  return sendPhoneVerificationCode(authInstance, requestWithRecaptchaV2);
8063
8080
  }
@@ -8071,7 +8088,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8071
8088
  }
8072
8089
  }
8073
8090
  finally {
8074
- verifier === null || verifier === void 0 ? void 0 : verifier._reset();
8091
+ verifier?._reset();
8075
8092
  }
8076
8093
  }
8077
8094
  /**
@@ -8109,7 +8126,7 @@ async function injectRecaptchaV2Token(auth, request, recaptchaV2Verifier) {
8109
8126
  _assert(recaptchaV2Verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8110
8127
  const recaptchaV2Token = await recaptchaV2Verifier.verify();
8111
8128
  _assert(typeof recaptchaV2Token === 'string', auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8112
- const newRequest = Object.assign({}, request);
8129
+ const newRequest = { ...request };
8113
8130
  if ('phoneEnrollmentInfo' in newRequest) {
8114
8131
  const phoneNumber = newRequest.phoneEnrollmentInfo.phoneNumber;
8115
8132
  const captchaResponse = newRequest.phoneEnrollmentInfo.captchaResponse;
@@ -8431,9 +8448,8 @@ class TotpMultiFactorGenerator {
8431
8448
  * @returns A promise to {@link TotpSecret}.
8432
8449
  */
8433
8450
  static async generateSecret(session) {
8434
- var _a;
8435
8451
  const mfaSession = session;
8436
- _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8452
+ _assert(typeof mfaSession.user?.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8437
8453
  const response = await startEnrollTotpMfa(mfaSession.user.auth, {
8438
8454
  idToken: mfaSession.credential,
8439
8455
  totpEnrollmentInfo: {}
@@ -8517,14 +8533,13 @@ class TotpSecret {
8517
8533
  * @returns A QR code URL string.
8518
8534
  */
8519
8535
  generateQrCodeUrl(accountName, issuer) {
8520
- var _a;
8521
8536
  let useDefaults = false;
8522
8537
  if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
8523
8538
  useDefaults = true;
8524
8539
  }
8525
8540
  if (useDefaults) {
8526
8541
  if (_isEmptyString(accountName)) {
8527
- accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';
8542
+ accountName = this.auth.currentUser?.email || 'unknownuser';
8528
8543
  }
8529
8544
  if (_isEmptyString(issuer)) {
8530
8545
  issuer = this.auth.name;
@@ -8535,7 +8550,7 @@ class TotpSecret {
8535
8550
  }
8536
8551
  /** @internal */
8537
8552
  function _isEmptyString(input) {
8538
- return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
8553
+ return typeof input === 'undefined' || input?.length === 0;
8539
8554
  }
8540
8555
 
8541
8556
  const STORAGE_AVAILABLE_KEY = '__sak';
@@ -8659,4 +8674,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
8659
8674
  exports.validatePassword = validatePassword;
8660
8675
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
8661
8676
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
8662
- //# sourceMappingURL=index-b5f6ef87.js.map
8677
+ //# sourceMappingURL=index-d92c5d92.js.map