@firebase/auth 1.10.7 → 1.10.8-canary.25b60fdaa

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-d8380d90.js → index-ebbd6577.js} +212 -202
  2. package/dist/browser-cjs/{index-d8380d90.js.map → index-ebbd6577.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-2822224b.js → popup_redirect-6226898d.js} +189 -177
  12. package/dist/cordova/{popup_redirect-2822224b.js.map → popup_redirect-6226898d.js.map} +1 -1
  13. package/dist/{esm2017/index-8e6e89cb.js → esm/index-9070a94b.js} +212 -202
  14. package/dist/{esm2017/index-8e6e89cb.js.map → esm/index-9070a94b.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-9fae27f4.js → totp-e66b7ec4.js} +165 -144
  26. package/dist/{node-esm/totp-18137433.js.map → node/totp-e66b7ec4.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-18137433.js → totp-dac3769c.js} +165 -144
  32. package/dist/{node/totp-9fae27f4.js.map → node-esm/totp-dac3769c.js.map} +1 -1
  33. package/dist/rn/{index-88065ec9.js → index-bd7c14b0.js} +183 -168
  34. package/dist/rn/{index-88065ec9.js.map → index-bd7c14b0.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-e67a5434.js → register-0be0e604.js} +177 -162
  44. package/dist/{web-extension-esm2017/register-eb80272b.js.map → web-extension-cjs/register-0be0e604.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-eb80272b.js → web-extension-esm/register-41226db6.js} +177 -162
  50. package/dist/{web-extension-cjs/register-e67a5434.js.map → web-extension-esm/register-41226db6.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
@@ -1,6 +1,5 @@
1
1
  import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, isCloudflareWorker, isCloudWorkstation, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, pingServer, updateEmulatorBanner, querystringDecode, extractQuerystring, isEmpty } from '@firebase/util';
2
2
  import { SDK_VERSION, _isFirebaseServerApp, _getProvider, _registerComponent, registerVersion } from '@firebase/app';
3
- import { __rest } from 'tslib';
4
3
  import { Component } from '@firebase/component';
5
4
  import { Logger, LogLevel } from '@firebase/logger';
6
5
 
@@ -106,7 +105,7 @@ class Receiver {
106
105
  const messageEvent = event;
107
106
  const { eventId, eventType, data } = messageEvent.data;
108
107
  const handlers = this.handlersMap[eventType];
109
- if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {
108
+ if (!handlers?.size) {
110
109
  return;
111
110
  }
112
111
  messageEvent.ports[0].postMessage({
@@ -342,20 +341,19 @@ function _isWorker() {
342
341
  typeof _window()['importScripts'] === 'function');
343
342
  }
344
343
  async function _getActiveServiceWorker() {
345
- if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {
344
+ if (!navigator?.serviceWorker) {
346
345
  return null;
347
346
  }
348
347
  try {
349
348
  const registration = await navigator.serviceWorker.ready;
350
349
  return registration.active;
351
350
  }
352
- catch (_a) {
351
+ catch {
353
352
  return null;
354
353
  }
355
354
  }
356
355
  function _getServiceWorkerController() {
357
- var _a;
358
- return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;
356
+ return navigator?.serviceWorker?.controller || null;
359
357
  }
360
358
  function _getWorkerGlobalScope() {
361
359
  return _isWorker() ? self : null;
@@ -538,7 +536,6 @@ class IndexedDBLocalPersistence {
538
536
  * may not resolve.
539
537
  */
540
538
  async initializeSender() {
541
- var _a, _b;
542
539
  // Check to see if there's an active service worker.
543
540
  this.activeServiceWorker = await _getActiveServiceWorker();
544
541
  if (!this.activeServiceWorker) {
@@ -550,8 +547,8 @@ class IndexedDBLocalPersistence {
550
547
  if (!results) {
551
548
  return;
552
549
  }
553
- if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) &&
554
- ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes("keyChanged" /* _EventType.KEY_CHANGED */))) {
550
+ if (results[0]?.fulfilled &&
551
+ results[0]?.value.includes("keyChanged" /* _EventType.KEY_CHANGED */)) {
555
552
  this.serviceWorkerReceiverAvailable = true;
556
553
  }
557
554
  }
@@ -577,7 +574,7 @@ class IndexedDBLocalPersistence {
577
574
  ? 800 /* _TimeoutDuration.LONG_ACK */
578
575
  : 50 /* _TimeoutDuration.ACK */);
579
576
  }
580
- catch (_a) {
577
+ catch {
581
578
  // This is a best effort approach. Ignore errors.
582
579
  }
583
580
  }
@@ -591,7 +588,7 @@ class IndexedDBLocalPersistence {
591
588
  await _deleteObject(db, STORAGE_AVAILABLE_KEY);
592
589
  return true;
593
590
  }
594
- catch (_a) { }
591
+ catch { }
595
592
  return false;
596
593
  }
597
594
  async _withPendingWrite(write) {
@@ -1080,7 +1077,10 @@ function _createError(authOrCode, ...rest) {
1080
1077
  return createErrorInternal(authOrCode, ...rest);
1081
1078
  }
1082
1079
  function _errorWithCustomMessage(auth, code, message) {
1083
- const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
1080
+ const errorMap = {
1081
+ ...prodErrorMap(),
1082
+ [code]: message
1083
+ };
1084
1084
  const factory = new ErrorFactory('auth', 'Firebase', errorMap);
1085
1085
  return factory.create(code, {
1086
1086
  appName: auth.name
@@ -1161,15 +1161,13 @@ function debugAssert(assertion, message) {
1161
1161
  * limitations under the License.
1162
1162
  */
1163
1163
  function _getCurrentUrl() {
1164
- var _a;
1165
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';
1164
+ return (typeof self !== 'undefined' && self.location?.href) || '';
1166
1165
  }
1167
1166
  function _isHttpOrHttps() {
1168
1167
  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';
1169
1168
  }
1170
1169
  function _getCurrentScheme() {
1171
- var _a;
1172
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;
1170
+ return (typeof self !== 'undefined' && self.location?.protocol) || null;
1173
1171
  }
1174
1172
 
1175
1173
  /**
@@ -1483,7 +1481,10 @@ const CookieAuthProxiedEndpoints = [
1483
1481
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
1484
1482
  function _addTidIfNecessary(auth, request) {
1485
1483
  if (auth.tenantId && !request.tenantId) {
1486
- return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });
1484
+ return {
1485
+ ...request,
1486
+ tenantId: auth.tenantId
1487
+ };
1487
1488
  }
1488
1489
  return request;
1489
1490
  }
@@ -1501,14 +1502,20 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
1501
1502
  };
1502
1503
  }
1503
1504
  }
1504
- const query = querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
1505
+ const query = querystring({
1506
+ key: auth.config.apiKey,
1507
+ ...params
1508
+ }).slice(1);
1505
1509
  const headers = await auth._getAdditionalHeaders();
1506
1510
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
1507
1511
  if (auth.languageCode) {
1508
1512
  headers["X-Firebase-Locale" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;
1509
1513
  }
1510
- const fetchArgs = Object.assign({ method,
1511
- headers }, body);
1514
+ const fetchArgs = {
1515
+ method,
1516
+ headers,
1517
+ ...body
1518
+ };
1512
1519
  /* Security-conscious server-side frameworks tend to have built in mitigations for referrer
1513
1520
  problems". See the Cloudflare GitHub issue #487: Error: The 'referrerPolicy' field on
1514
1521
  'RequestInitializerDict' is not implemented."
@@ -1524,7 +1531,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
1524
1531
  }
1525
1532
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
1526
1533
  auth._canInitEmulator = false;
1527
- const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);
1534
+ const errorMap = { ...SERVER_ERROR_MAP, ...customErrorMap };
1528
1535
  try {
1529
1536
  const networkTimeout = new NetworkTimeout(auth);
1530
1537
  const response = await Promise.race([
@@ -1865,7 +1872,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1865
1872
  const claims = _parseToken(token);
1866
1873
  _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1867
1874
  const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;
1868
- const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];
1875
+ const signInProvider = firebase?.['sign_in_provider'];
1869
1876
  return {
1870
1877
  claims,
1871
1878
  token,
@@ -1873,7 +1880,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1873
1880
  issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),
1874
1881
  expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),
1875
1882
  signInProvider: signInProvider || null,
1876
- signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null
1883
+ signInSecondFactor: firebase?.['sign_in_second_factor'] || null
1877
1884
  };
1878
1885
  }
1879
1886
  function secondsStringToMilliseconds(seconds) {
@@ -1896,7 +1903,7 @@ function _parseToken(token) {
1896
1903
  return JSON.parse(decoded);
1897
1904
  }
1898
1905
  catch (e) {
1899
- _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());
1906
+ _logError('Caught error parsing JWT payload as JSON', e?.toString());
1900
1907
  return null;
1901
1908
  }
1902
1909
  }
@@ -1992,7 +1999,6 @@ class ProactiveRefresh {
1992
1999
  }
1993
2000
  }
1994
2001
  getInterval(wasError) {
1995
- var _a;
1996
2002
  if (wasError) {
1997
2003
  const interval = this.errorBackoff;
1998
2004
  this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);
@@ -2001,7 +2007,7 @@ class ProactiveRefresh {
2001
2007
  else {
2002
2008
  // Reset the error backoff
2003
2009
  this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;
2004
- const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;
2010
+ const expTime = this.user.stsTokenManager.expirationTime ?? 0;
2005
2011
  const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;
2006
2012
  return Math.max(0, interval);
2007
2013
  }
@@ -2022,7 +2028,7 @@ class ProactiveRefresh {
2022
2028
  }
2023
2029
  catch (e) {
2024
2030
  // Only retry on network errors
2025
- if ((e === null || e === void 0 ? void 0 : e.code) ===
2031
+ if (e?.code ===
2026
2032
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
2027
2033
  this.schedule(/* wasError */ true);
2028
2034
  }
@@ -2088,14 +2094,13 @@ class UserMetadata {
2088
2094
  * limitations under the License.
2089
2095
  */
2090
2096
  async function _reloadWithoutSaving(user) {
2091
- var _a;
2092
2097
  const auth = user.auth;
2093
2098
  const idToken = await user.getIdToken();
2094
2099
  const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));
2095
- _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
2100
+ _assert(response?.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
2096
2101
  const coreAccount = response.users[0];
2097
2102
  user._notifyReloadListener(coreAccount);
2098
- const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)
2103
+ const newProviderData = coreAccount.providerUserInfo?.length
2099
2104
  ? extractProviderData(coreAccount.providerUserInfo)
2100
2105
  : [];
2101
2106
  const providerData = mergeProviderData(user.providerData, newProviderData);
@@ -2105,7 +2110,7 @@ async function _reloadWithoutSaving(user) {
2105
2110
  // On the other hand, if it was not anonymous before, it should never be
2106
2111
  // considered anonymous now.
2107
2112
  const oldIsAnonymous = user.isAnonymous;
2108
- const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
2113
+ const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !providerData?.length;
2109
2114
  const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;
2110
2115
  const updates = {
2111
2116
  uid: coreAccount.localId,
@@ -2142,8 +2147,7 @@ function mergeProviderData(original, newData) {
2142
2147
  return [...deduped, ...newData];
2143
2148
  }
2144
2149
  function extractProviderData(providers) {
2145
- return providers.map((_a) => {
2146
- var { providerId } = _a, provider = __rest(_a, ["providerId"]);
2150
+ return providers.map(({ providerId, ...provider }) => {
2147
2151
  return {
2148
2152
  providerId,
2149
2153
  uid: provider.rawId || '',
@@ -2335,8 +2339,7 @@ function assertStringOrUndefined(assertion, appName) {
2335
2339
  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { appName });
2336
2340
  }
2337
2341
  class UserImpl {
2338
- constructor(_a) {
2339
- var { uid, auth, stsTokenManager } = _a, opt = __rest(_a, ["uid", "auth", "stsTokenManager"]);
2342
+ constructor({ uid, auth, stsTokenManager, ...opt }) {
2340
2343
  // For the user object, provider is always Firebase.
2341
2344
  this.providerId = "firebase" /* ProviderId.FIREBASE */;
2342
2345
  this.proactiveRefresh = new ProactiveRefresh(this);
@@ -2384,12 +2387,16 @@ class UserImpl {
2384
2387
  this.phoneNumber = user.phoneNumber;
2385
2388
  this.isAnonymous = user.isAnonymous;
2386
2389
  this.tenantId = user.tenantId;
2387
- this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));
2390
+ this.providerData = user.providerData.map(userInfo => ({ ...userInfo }));
2388
2391
  this.metadata._copy(user.metadata);
2389
2392
  this.stsTokenManager._assign(user.stsTokenManager);
2390
2393
  }
2391
2394
  _clone(auth) {
2392
- const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));
2395
+ const newUser = new UserImpl({
2396
+ ...this,
2397
+ auth,
2398
+ stsTokenManager: this.stsTokenManager._clone()
2399
+ });
2393
2400
  newUser.metadata._copy(this.metadata);
2394
2401
  return newUser;
2395
2402
  }
@@ -2444,26 +2451,40 @@ class UserImpl {
2444
2451
  return this.auth.signOut();
2445
2452
  }
2446
2453
  toJSON() {
2447
- 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(),
2454
+ return {
2455
+ uid: this.uid,
2456
+ email: this.email || undefined,
2457
+ emailVerified: this.emailVerified,
2458
+ displayName: this.displayName || undefined,
2459
+ isAnonymous: this.isAnonymous,
2460
+ photoURL: this.photoURL || undefined,
2461
+ phoneNumber: this.phoneNumber || undefined,
2462
+ tenantId: this.tenantId || undefined,
2463
+ providerData: this.providerData.map(userInfo => ({ ...userInfo })),
2464
+ stsTokenManager: this.stsTokenManager.toJSON(),
2448
2465
  // Redirect event ID must be maintained in case there is a pending
2449
2466
  // redirect event.
2450
- _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), {
2467
+ _redirectEventId: this._redirectEventId,
2468
+ ...this.metadata.toJSON(),
2451
2469
  // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):
2452
- apiKey: this.auth.config.apiKey, appName: this.auth.name });
2470
+ apiKey: this.auth.config.apiKey,
2471
+ appName: this.auth.name
2472
+ // Missing authDomain will be tolerated by the legacy SDK.
2473
+ // stsTokenManager.apiKey isn't actually required (despite the legacy SDK persisting it).
2474
+ };
2453
2475
  }
2454
2476
  get refreshToken() {
2455
2477
  return this.stsTokenManager.refreshToken || '';
2456
2478
  }
2457
2479
  static _fromJSON(auth, object) {
2458
- var _a, _b, _c, _d, _e, _f, _g, _h;
2459
- const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;
2460
- const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;
2461
- const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;
2462
- const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;
2463
- const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;
2464
- const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;
2465
- const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
2466
- const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;
2480
+ const displayName = object.displayName ?? undefined;
2481
+ const email = object.email ?? undefined;
2482
+ const phoneNumber = object.phoneNumber ?? undefined;
2483
+ const photoURL = object.photoURL ?? undefined;
2484
+ const tenantId = object.tenantId ?? undefined;
2485
+ const _redirectEventId = object._redirectEventId ?? undefined;
2486
+ const createdAt = object.createdAt ?? undefined;
2487
+ const lastLoginAt = object.lastLoginAt ?? undefined;
2467
2488
  const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;
2468
2489
  _assert(uid && plainObjectTokenManager, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
2469
2490
  const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);
@@ -2493,7 +2514,7 @@ class UserImpl {
2493
2514
  lastLoginAt
2494
2515
  });
2495
2516
  if (providerData && Array.isArray(providerData)) {
2496
- user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));
2517
+ user.providerData = providerData.map(userInfo => ({ ...userInfo }));
2497
2518
  }
2498
2519
  if (_redirectEventId) {
2499
2520
  user._redirectEventId = _redirectEventId;
@@ -2530,7 +2551,7 @@ class UserImpl {
2530
2551
  const providerData = coreAccount.providerUserInfo !== undefined
2531
2552
  ? extractProviderData(coreAccount.providerUserInfo)
2532
2553
  : [];
2533
- const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
2554
+ const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;
2534
2555
  const stsTokenManager = new StsTokenManager();
2535
2556
  stsTokenManager.updateFromIdToken(idToken);
2536
2557
  // Initialize the Firebase Auth user.
@@ -2552,7 +2573,7 @@ class UserImpl {
2552
2573
  providerData,
2553
2574
  metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
2554
2575
  isAnonymous: !(coreAccount.email && coreAccount.passwordHash) &&
2555
- !(providerData === null || providerData === void 0 ? void 0 : providerData.length)
2576
+ !providerData?.length
2556
2577
  };
2557
2578
  Object.assign(user, updates);
2558
2579
  return user;
@@ -2751,7 +2772,7 @@ class PersistenceUserManager {
2751
2772
  break;
2752
2773
  }
2753
2774
  }
2754
- catch (_a) { }
2775
+ catch { }
2755
2776
  }
2756
2777
  // If we find the user in a persistence that does support migration, use
2757
2778
  // that migration path (of only persistences that support migration)
@@ -2774,7 +2795,7 @@ class PersistenceUserManager {
2774
2795
  try {
2775
2796
  await persistence._remove(key);
2776
2797
  }
2777
- catch (_a) { }
2798
+ catch { }
2778
2799
  }
2779
2800
  }));
2780
2801
  return new PersistenceUserManager(selectedPersistence, auth, userKey);
@@ -2844,7 +2865,7 @@ function _getBrowserName(userAgent) {
2844
2865
  // Most modern browsers have name/version at end of user agent string.
2845
2866
  const re = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/;
2846
2867
  const matches = userAgent.match(re);
2847
- if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {
2868
+ if (matches?.length === 2) {
2848
2869
  return matches[1];
2849
2870
  }
2850
2871
  }
@@ -2884,8 +2905,7 @@ function _isIOS7Or8(ua = getUA()) {
2884
2905
  /(iPad|iPhone|iPod).*OS 8_\d/i.test(ua));
2885
2906
  }
2886
2907
  function _isIOSStandalone(ua = getUA()) {
2887
- var _a;
2888
- return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);
2908
+ return _isIOS(ua) && !!window.navigator?.standalone;
2889
2909
  }
2890
2910
  function _isIE10() {
2891
2911
  return isIE() && document.documentMode === 10;
@@ -3016,7 +3036,7 @@ class AuthMiddlewareQueue {
3016
3036
  }
3017
3037
  }
3018
3038
  throw this.auth._errorFactory.create("login-blocked" /* AuthErrorCode.LOGIN_BLOCKED */, {
3019
- originalMessage: e === null || e === void 0 ? void 0 : e.message
3039
+ originalMessage: e?.message
3020
3040
  });
3021
3041
  }
3022
3042
  }
@@ -3074,13 +3094,12 @@ const MINIMUM_MIN_PASSWORD_LENGTH = 6;
3074
3094
  */
3075
3095
  class PasswordPolicyImpl {
3076
3096
  constructor(response) {
3077
- var _a, _b, _c, _d;
3078
3097
  // Only include custom strength options defined in the response.
3079
3098
  const responseOptions = response.customStrengthOptions;
3080
3099
  this.customStrengthOptions = {};
3081
3100
  // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
3082
3101
  this.customStrengthOptions.minPasswordLength =
3083
- (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
3102
+ responseOptions.minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH;
3084
3103
  if (responseOptions.maxPasswordLength) {
3085
3104
  this.customStrengthOptions.maxPasswordLength =
3086
3105
  responseOptions.maxPasswordLength;
@@ -3107,12 +3126,11 @@ class PasswordPolicyImpl {
3107
3126
  }
3108
3127
  // Use an empty string if no non-alphanumeric characters are specified in the response.
3109
3128
  this.allowedNonAlphanumericCharacters =
3110
- (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';
3111
- this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
3129
+ response.allowedNonAlphanumericCharacters?.join('') ?? '';
3130
+ this.forceUpgradeOnSignin = response.forceUpgradeOnSignin ?? false;
3112
3131
  this.schemaVersion = response.schemaVersion;
3113
3132
  }
3114
3133
  validatePassword(password) {
3115
- var _a, _b, _c, _d, _e, _f;
3116
3134
  const status = {
3117
3135
  isValid: true,
3118
3136
  passwordPolicy: this
@@ -3121,12 +3139,12 @@ class PasswordPolicyImpl {
3121
3139
  this.validatePasswordLengthOptions(password, status);
3122
3140
  this.validatePasswordCharacterOptions(password, status);
3123
3141
  // Combine the status into single isValid property.
3124
- status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
3125
- status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
3126
- status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
3127
- status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
3128
- status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
3129
- status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
3142
+ status.isValid && (status.isValid = status.meetsMinPasswordLength ?? true);
3143
+ status.isValid && (status.isValid = status.meetsMaxPasswordLength ?? true);
3144
+ status.isValid && (status.isValid = status.containsLowercaseLetter ?? true);
3145
+ status.isValid && (status.isValid = status.containsUppercaseLetter ?? true);
3146
+ status.isValid && (status.isValid = status.containsNumericCharacter ?? true);
3147
+ status.isValid && (status.isValid = status.containsNonAlphanumericCharacter ?? true);
3130
3148
  return status;
3131
3149
  }
3132
3150
  /**
@@ -3263,18 +3281,17 @@ class AuthImpl {
3263
3281
  // Have to check for app deletion throughout initialization (after each
3264
3282
  // promise resolution)
3265
3283
  this._initializationPromise = this.queue(async () => {
3266
- var _a, _b, _c;
3267
3284
  if (this._deleted) {
3268
3285
  return;
3269
3286
  }
3270
3287
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
3271
- (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
3288
+ this._resolvePersistenceManagerAvailable?.();
3272
3289
  if (this._deleted) {
3273
3290
  return;
3274
3291
  }
3275
3292
  // Initialize the resolver early if necessary (only applicable to web:
3276
3293
  // this will cause the iframe to load immediately in certain cases)
3277
- if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
3294
+ if (this._popupRedirectResolver?._shouldInitProactively) {
3278
3295
  // If this fails, don't halt auth loading
3279
3296
  try {
3280
3297
  await this._popupRedirectResolver._initialize(this);
@@ -3284,7 +3301,7 @@ class AuthImpl {
3284
3301
  }
3285
3302
  }
3286
3303
  await this.initializeCurrentUser(popupRedirectResolver);
3287
- this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
3304
+ this.lastNotifiedUid = this.currentUser?.uid || null;
3288
3305
  if (this._deleted) {
3289
3306
  return;
3290
3307
  }
@@ -3329,7 +3346,6 @@ class AuthImpl {
3329
3346
  }
3330
3347
  }
3331
3348
  async initializeCurrentUser(popupRedirectResolver) {
3332
- var _a;
3333
3349
  if (_isFirebaseServerApp(this.app)) {
3334
3350
  const idToken = this.app.settings.authIdToken;
3335
3351
  if (idToken) {
@@ -3349,15 +3365,15 @@ class AuthImpl {
3349
3365
  let needsTocheckMiddleware = false;
3350
3366
  if (popupRedirectResolver && this.config.authDomain) {
3351
3367
  await this.getOrInitRedirectPersistenceManager();
3352
- const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;
3353
- const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;
3368
+ const redirectUserEventId = this.redirectUser?._redirectEventId;
3369
+ const storedUserEventId = futureCurrentUser?._redirectEventId;
3354
3370
  const result = await this.tryRedirectSignIn(popupRedirectResolver);
3355
3371
  // If the stored user (i.e. the old "currentUser") has a redirectId that
3356
3372
  // matches the redirect user, then we want to initially sign in with the
3357
3373
  // new user object from result.
3358
3374
  // TODO(samgho): More thoroughly test all of this
3359
3375
  if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&
3360
- (result === null || result === void 0 ? void 0 : result.user)) {
3376
+ result?.user) {
3361
3377
  futureCurrentUser = result.user;
3362
3378
  needsTocheckMiddleware = true;
3363
3379
  }
@@ -3432,7 +3448,7 @@ class AuthImpl {
3432
3448
  await _reloadWithoutSaving(user);
3433
3449
  }
3434
3450
  catch (e) {
3435
- if ((e === null || e === void 0 ? void 0 : e.code) !==
3451
+ if (e?.code !==
3436
3452
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
3437
3453
  // Something's wrong with the user's token. Log them out and remove
3438
3454
  // them from storage
@@ -3589,12 +3605,11 @@ class AuthImpl {
3589
3605
  }
3590
3606
  }
3591
3607
  toJSON() {
3592
- var _a;
3593
3608
  return {
3594
3609
  apiKey: this.config.apiKey,
3595
3610
  authDomain: this.config.authDomain,
3596
3611
  appName: this.name,
3597
- currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()
3612
+ currentUser: this._currentUser?.toJSON()
3598
3613
  };
3599
3614
  }
3600
3615
  async _setRedirectUser(user, popupRedirectResolver) {
@@ -3615,16 +3630,15 @@ class AuthImpl {
3615
3630
  return this.redirectPersistenceManager;
3616
3631
  }
3617
3632
  async _redirectUserForId(id) {
3618
- var _a, _b;
3619
3633
  // Make sure we've cleared any pending persistence actions if we're not in
3620
3634
  // the initializer
3621
3635
  if (this._isInitialized) {
3622
3636
  await this.queue(async () => { });
3623
3637
  }
3624
- if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {
3638
+ if (this._currentUser?._redirectEventId === id) {
3625
3639
  return this._currentUser;
3626
3640
  }
3627
- if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {
3641
+ if (this.redirectUser?._redirectEventId === id) {
3628
3642
  return this.redirectUser;
3629
3643
  }
3630
3644
  return null;
@@ -3660,12 +3674,11 @@ class AuthImpl {
3660
3674
  return this.currentUser;
3661
3675
  }
3662
3676
  notifyAuthListeners() {
3663
- var _a, _b;
3664
3677
  if (!this._isInitialized) {
3665
3678
  return;
3666
3679
  }
3667
3680
  this.idTokenSubscription.next(this.currentUser);
3668
- const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;
3681
+ const currentUid = this.currentUser?.uid ?? null;
3669
3682
  if (this.lastNotifiedUid !== currentUid) {
3670
3683
  this.lastNotifiedUid = currentUid;
3671
3684
  this.authStateSubscription.next(this.currentUser);
@@ -3750,7 +3763,6 @@ class AuthImpl {
3750
3763
  return this.frameworks;
3751
3764
  }
3752
3765
  async _getAdditionalHeaders() {
3753
- var _a;
3754
3766
  // Additional headers on every request
3755
3767
  const headers = {
3756
3768
  ["X-Client-Version" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion
@@ -3759,10 +3771,11 @@ class AuthImpl {
3759
3771
  headers["X-Firebase-gmpid" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;
3760
3772
  }
3761
3773
  // If the heartbeat service exists, add the heartbeat string
3762
- const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
3774
+ const heartbeatsHeader = await this.heartbeatServiceProvider
3763
3775
  .getImmediate({
3764
3776
  optional: true
3765
- })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
3777
+ })
3778
+ ?.getHeartbeatsHeader();
3766
3779
  if (heartbeatsHeader) {
3767
3780
  headers["X-Firebase-Client" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;
3768
3781
  }
@@ -3774,20 +3787,20 @@ class AuthImpl {
3774
3787
  return headers;
3775
3788
  }
3776
3789
  async _getAppCheckToken() {
3777
- var _a;
3778
3790
  if (_isFirebaseServerApp(this.app) && this.app.settings.appCheckToken) {
3779
3791
  return this.app.settings.appCheckToken;
3780
3792
  }
3781
- const appCheckTokenResult = await ((_a = this.appCheckServiceProvider
3782
- .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
3783
- if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
3793
+ const appCheckTokenResult = await this.appCheckServiceProvider
3794
+ .getImmediate({ optional: true })
3795
+ ?.getToken();
3796
+ if (appCheckTokenResult?.error) {
3784
3797
  // Context: appCheck.getToken() will never throw even if an error happened.
3785
3798
  // In the error case, a dummy token will be returned along with an error field describing
3786
3799
  // the error. In general, we shouldn't care about the error condition and just use
3787
3800
  // the token (actual or dummy) to send requests.
3788
3801
  _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
3789
3802
  }
3790
- return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
3803
+ return appCheckTokenResult?.token;
3791
3804
  }
3792
3805
  }
3793
3806
  /**
@@ -3887,20 +3900,17 @@ class MockReCaptcha {
3887
3900
  return id;
3888
3901
  }
3889
3902
  reset(optWidgetId) {
3890
- var _a;
3891
3903
  const id = optWidgetId || _WIDGET_ID_START;
3892
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());
3904
+ void this._widgets.get(id)?.delete();
3893
3905
  this._widgets.delete(id);
3894
3906
  }
3895
3907
  getResponse(optWidgetId) {
3896
- var _a;
3897
3908
  const id = optWidgetId || _WIDGET_ID_START;
3898
- return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';
3909
+ return this._widgets.get(id)?.getResponse() || '';
3899
3910
  }
3900
3911
  async execute(optWidgetId) {
3901
- var _a;
3902
3912
  const id = optWidgetId || _WIDGET_ID_START;
3903
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());
3913
+ void this._widgets.get(id)?.execute();
3904
3914
  return '';
3905
3915
  }
3906
3916
  }
@@ -4140,7 +4150,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
4140
4150
  captchaResponse = await verifier.verify(action, true);
4141
4151
  }
4142
4152
  }
4143
- const newRequest = Object.assign({}, request);
4153
+ const newRequest = { ...request };
4144
4154
  if (action === "mfaSmsEnrollment" /* RecaptchaActionName.MFA_SMS_ENROLLMENT */ ||
4145
4155
  action === "mfaSmsSignIn" /* RecaptchaActionName.MFA_SMS_SIGNIN */) {
4146
4156
  if ('phoneEnrollmentInfo' in newRequest) {
@@ -4182,10 +4192,10 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
4182
4192
  return newRequest;
4183
4193
  }
4184
4194
  async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
4185
- var _a, _b;
4186
4195
  if (recaptchaAuthProvider === "EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */) {
4187
- if ((_a = authInstance
4188
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
4196
+ if (authInstance
4197
+ ._getRecaptchaConfig()
4198
+ ?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
4189
4199
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */);
4190
4200
  return actionMethod(authInstance, requestWithRecaptcha);
4191
4201
  }
@@ -4203,13 +4213,14 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
4203
4213
  }
4204
4214
  }
4205
4215
  else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
4206
- if ((_b = authInstance
4207
- ._getRecaptchaConfig()) === null || _b === void 0 ? void 0 : _b.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
4216
+ if (authInstance
4217
+ ._getRecaptchaConfig()
4218
+ ?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
4208
4219
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
4209
4220
  return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
4210
- var _a;
4211
- if (((_a = authInstance
4212
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) === "AUDIT" /* EnforcementState.AUDIT */) {
4221
+ if (authInstance
4222
+ ._getRecaptchaConfig()
4223
+ ?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
4213
4224
  // AUDIT mode
4214
4225
  if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
4215
4226
  error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
@@ -4306,7 +4317,7 @@ function initializeAuth(app, deps) {
4306
4317
  if (provider.isInitialized()) {
4307
4318
  const auth = provider.getImmediate();
4308
4319
  const initialOptions = provider.getOptions();
4309
- if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
4320
+ if (deepEqual(initialOptions, deps ?? {})) {
4310
4321
  return auth;
4311
4322
  }
4312
4323
  else {
@@ -4317,15 +4328,15 @@ function initializeAuth(app, deps) {
4317
4328
  return auth;
4318
4329
  }
4319
4330
  function _initializeAuthInstance(auth, deps) {
4320
- const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
4331
+ const persistence = deps?.persistence || [];
4321
4332
  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
4322
- if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
4333
+ if (deps?.errorMap) {
4323
4334
  auth._updateErrorMap(deps.errorMap);
4324
4335
  }
4325
4336
  // This promise is intended to float; auth initialization happens in the
4326
4337
  // background, meanwhile the auth object may be used by the app.
4327
4338
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
4328
- auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
4339
+ auth._initializeWithPersistence(hierarchy, deps?.popupRedirectResolver);
4329
4340
  }
4330
4341
 
4331
4342
  /**
@@ -4353,7 +4364,7 @@ function _initializeAuthInstance(auth, deps) {
4353
4364
  function connectAuthEmulator(auth, url, options) {
4354
4365
  const authInternal = _castAuth(auth);
4355
4366
  _assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
4356
- const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
4367
+ const disableWarnings = !!options?.disableWarnings;
4357
4368
  const protocol = extractProtocol(url);
4358
4369
  const { host, port } = extractHostAndPort(url);
4359
4370
  const portStr = port === null ? '' : `:${port}`;
@@ -4679,7 +4690,7 @@ class EmailAuthCredential extends AuthCredential {
4679
4690
  */
4680
4691
  static fromJSON(json) {
4681
4692
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4682
- if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {
4693
+ if (obj?.email && obj?.password) {
4683
4694
  if (obj.signInMethod === "password" /* SignInMethod.EMAIL_PASSWORD */) {
4684
4695
  return this._fromEmailAndPassword(obj.email, obj.password);
4685
4696
  }
@@ -4839,7 +4850,7 @@ class OAuthCredential extends AuthCredential {
4839
4850
  */
4840
4851
  static fromJSON(json) {
4841
4852
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4842
- const { providerId, signInMethod } = obj, rest = __rest(obj, ["providerId", "signInMethod"]);
4853
+ const { providerId, signInMethod, ...rest } = obj;
4843
4854
  if (!providerId || !signInMethod) {
4844
4855
  return null;
4845
4856
  }
@@ -4930,7 +4941,10 @@ const VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {
4930
4941
  ["USER_NOT_FOUND" /* ServerError.USER_NOT_FOUND */]: "user-not-found" /* AuthErrorCode.USER_DELETED */
4931
4942
  };
4932
4943
  async function verifyPhoneNumberForExisting(auth, request) {
4933
- const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });
4944
+ const apiRequest = {
4945
+ ...request,
4946
+ operation: 'REAUTH'
4947
+ };
4934
4948
  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_);
4935
4949
  }
4936
4950
 
@@ -4974,7 +4988,10 @@ class PhoneAuthCredential extends AuthCredential {
4974
4988
  }
4975
4989
  /** @internal */
4976
4990
  _linkToIdToken(auth, idToken) {
4977
- return linkWithPhoneNumber(auth, Object.assign({ idToken }, this._makeVerificationRequest()));
4991
+ return linkWithPhoneNumber(auth, {
4992
+ idToken,
4993
+ ...this._makeVerificationRequest()
4994
+ });
4978
4995
  }
4979
4996
  /** @internal */
4980
4997
  _getReauthenticationResolver(auth) {
@@ -5102,19 +5119,18 @@ class ActionCodeURL {
5102
5119
  * @internal
5103
5120
  */
5104
5121
  constructor(actionLink) {
5105
- var _a, _b, _c, _d, _e, _f;
5106
5122
  const searchParams = querystringDecode(extractQuerystring(actionLink));
5107
- const apiKey = (_a = searchParams["apiKey" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;
5108
- const code = (_b = searchParams["oobCode" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;
5109
- const operation = parseMode((_c = searchParams["mode" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);
5123
+ const apiKey = searchParams["apiKey" /* QueryField.API_KEY */] ?? null;
5124
+ const code = searchParams["oobCode" /* QueryField.CODE */] ?? null;
5125
+ const operation = parseMode(searchParams["mode" /* QueryField.MODE */] ?? null);
5110
5126
  // Validate API key, code and mode.
5111
5127
  _assert(apiKey && code && operation, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
5112
5128
  this.apiKey = apiKey;
5113
5129
  this.operation = operation;
5114
5130
  this.code = code;
5115
- this.continueUrl = (_d = searchParams["continueUrl" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;
5116
- this.languageCode = (_e = searchParams["lang" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;
5117
- this.tenantId = (_f = searchParams["tenantId" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;
5131
+ this.continueUrl = searchParams["continueUrl" /* QueryField.CONTINUE_URL */] ?? null;
5132
+ this.languageCode = searchParams["lang" /* QueryField.LANGUAGE_CODE */] ?? null;
5133
+ this.tenantId = searchParams["tenantId" /* QueryField.TENANT_ID */] ?? null;
5118
5134
  }
5119
5135
  /**
5120
5136
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -5130,7 +5146,7 @@ class ActionCodeURL {
5130
5146
  try {
5131
5147
  return new ActionCodeURL(actionLink);
5132
5148
  }
5133
- catch (_a) {
5149
+ catch {
5134
5150
  return null;
5135
5151
  }
5136
5152
  }
@@ -5420,13 +5436,17 @@ class OAuthProvider extends BaseOAuthProvider {
5420
5436
  * or the ID token string.
5421
5437
  */
5422
5438
  credential(params) {
5423
- return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
5439
+ return this._credential({ ...params, nonce: params.rawNonce });
5424
5440
  }
5425
5441
  /** An internal credential method that accepts more permissive options */
5426
5442
  _credential(params) {
5427
5443
  _assert(params.idToken || params.accessToken, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
5428
5444
  // For OAuthCredential, sign in method is same as providerId.
5429
- return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));
5445
+ return OAuthCredential._fromParams({
5446
+ ...params,
5447
+ providerId: this.providerId,
5448
+ signInMethod: this.providerId
5449
+ });
5430
5450
  }
5431
5451
  /**
5432
5452
  * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
@@ -5578,7 +5598,7 @@ class FacebookAuthProvider extends BaseOAuthProvider {
5578
5598
  try {
5579
5599
  return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
5580
5600
  }
5581
- catch (_a) {
5601
+ catch {
5582
5602
  return null;
5583
5603
  }
5584
5604
  }
@@ -5700,7 +5720,7 @@ class GoogleAuthProvider extends BaseOAuthProvider {
5700
5720
  try {
5701
5721
  return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
5702
5722
  }
5703
- catch (_a) {
5723
+ catch {
5704
5724
  return null;
5705
5725
  }
5706
5726
  }
@@ -5811,7 +5831,7 @@ class GithubAuthProvider extends BaseOAuthProvider {
5811
5831
  try {
5812
5832
  return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
5813
5833
  }
5814
- catch (_a) {
5834
+ catch {
5815
5835
  return null;
5816
5836
  }
5817
5837
  }
@@ -6095,7 +6115,7 @@ class TwitterAuthProvider extends BaseOAuthProvider {
6095
6115
  try {
6096
6116
  return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
6097
6117
  }
6098
- catch (_a) {
6118
+ catch {
6099
6119
  return null;
6100
6120
  }
6101
6121
  }
@@ -6211,13 +6231,12 @@ function providerIdForResponse(response) {
6211
6231
  * @public
6212
6232
  */
6213
6233
  async function signInAnonymously(auth) {
6214
- var _a;
6215
6234
  if (_isFirebaseServerApp(auth.app)) {
6216
6235
  return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(auth));
6217
6236
  }
6218
6237
  const authInternal = _castAuth(auth);
6219
6238
  await authInternal._initializationPromise;
6220
- if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {
6239
+ if (authInternal.currentUser?.isAnonymous) {
6221
6240
  // If an anonymous user is already signed in, no need to sign them in again.
6222
6241
  return new UserCredentialImpl({
6223
6242
  user: authInternal.currentUser,
@@ -6251,7 +6270,6 @@ async function signInAnonymously(auth) {
6251
6270
  */
6252
6271
  class MultiFactorError extends FirebaseError {
6253
6272
  constructor(auth, error, operationType, user) {
6254
- var _a;
6255
6273
  super(error.code, error.message);
6256
6274
  this.operationType = operationType;
6257
6275
  this.user = user;
@@ -6259,7 +6277,7 @@ class MultiFactorError extends FirebaseError {
6259
6277
  Object.setPrototypeOf(this, MultiFactorError.prototype);
6260
6278
  this.customData = {
6261
6279
  appName: auth.name,
6262
- tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
6280
+ tenantId: auth.tenantId ?? undefined,
6263
6281
  _serverResponse: error.customData._serverResponse,
6264
6282
  operationType
6265
6283
  };
@@ -6390,7 +6408,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
6390
6408
  }
6391
6409
  catch (e) {
6392
6410
  // Convert user deleted error into user mismatch
6393
- if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
6411
+ if (e?.code === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
6394
6412
  _fail(auth, "user-mismatch" /* AuthErrorCode.USER_MISMATCH */);
6395
6413
  }
6396
6414
  throw e;
@@ -6615,8 +6633,7 @@ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
6615
6633
  * limitations under the License.
6616
6634
  */
6617
6635
  function _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {
6618
- var _a;
6619
- _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6636
+ _assert(actionCodeSettings.url?.length > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6620
6637
  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||
6621
6638
  actionCodeSettings.dynamicLinkDomain.length > 0, auth, "invalid-dynamic-link-domain" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);
6622
6639
  _assert(typeof actionCodeSettings.linkDomain === 'undefined' ||
@@ -6977,7 +6994,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
6977
6994
  */
6978
6995
  function isSignInWithEmailLink(auth, emailLink) {
6979
6996
  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);
6980
- return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6997
+ return actionCodeUrl?.operation === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6981
6998
  }
6982
6999
  /**
6983
7000
  * Asynchronously signs in using an email and sign-in email link.
@@ -7350,7 +7367,6 @@ async function updateEmailOrPassword(user, email, password) {
7350
7367
  *
7351
7368
  */
7352
7369
  function _fromIdTokenResponse(idTokenResponse) {
7353
- var _a, _b;
7354
7370
  if (!idTokenResponse) {
7355
7371
  return null;
7356
7372
  }
@@ -7360,8 +7376,8 @@ function _fromIdTokenResponse(idTokenResponse) {
7360
7376
  : {};
7361
7377
  const isNewUser = idTokenResponse.isNewUser ||
7362
7378
  idTokenResponse.kind === "identitytoolkit#SignupNewUserResponse" /* IdTokenResponseKind.SignupNewUser */;
7363
- if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {
7364
- 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'];
7379
+ if (!providerId && idTokenResponse?.idToken) {
7380
+ const signInProvider = _parseToken(idTokenResponse.idToken)?.firebase?.['sign_in_provider'];
7365
7381
  if (signInProvider) {
7366
7382
  const filteredProviderId = signInProvider !== "anonymous" /* ProviderId.ANONYMOUS */ &&
7367
7383
  signInProvider !== "custom" /* ProviderId.CUSTOM */
@@ -7410,7 +7426,7 @@ class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {
7410
7426
  }
7411
7427
  class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {
7412
7428
  constructor(isNewUser, profile) {
7413
- 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);
7429
+ super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof profile?.login === 'string' ? profile?.login : null);
7414
7430
  }
7415
7431
  }
7416
7432
  class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {
@@ -7710,12 +7726,11 @@ class MultiFactorSessionImpl {
7710
7726
  };
7711
7727
  }
7712
7728
  static fromJSON(obj) {
7713
- var _a, _b;
7714
- if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {
7715
- if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {
7729
+ if (obj?.multiFactorSession) {
7730
+ if (obj.multiFactorSession?.pendingCredential) {
7716
7731
  return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);
7717
7732
  }
7718
- else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {
7733
+ else if (obj.multiFactorSession?.idToken) {
7719
7734
  return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);
7720
7735
  }
7721
7736
  }
@@ -7758,7 +7773,11 @@ class MultiFactorResolverImpl {
7758
7773
  delete serverResponse.mfaInfo;
7759
7774
  delete serverResponse.mfaPendingCredential;
7760
7775
  // Use in the new token & refresh token in the old response
7761
- const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });
7776
+ const idTokenResponse = {
7777
+ ...serverResponse,
7778
+ idToken: mfaResponse.idToken,
7779
+ refreshToken: mfaResponse.refreshToken
7780
+ };
7762
7781
  // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case
7763
7782
  switch (error.operationType) {
7764
7783
  case "signIn" /* OperationType.SIGN_IN */:
@@ -7789,11 +7808,10 @@ class MultiFactorResolverImpl {
7789
7808
  * @public
7790
7809
  */
7791
7810
  function getMultiFactorResolver(auth, error) {
7792
- var _a;
7793
7811
  const authModular = getModularInstance(auth);
7794
7812
  const errorInternal = error;
7795
7813
  _assert(error.customData.operationType, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7796
- _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7814
+ _assert(errorInternal.customData._serverResponse?.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7797
7815
  return MultiFactorResolverImpl._fromError(authModular, errorInternal);
7798
7816
  }
7799
7817
 
@@ -7899,7 +7917,7 @@ function multiFactor(user) {
7899
7917
  }
7900
7918
 
7901
7919
  var name = "@firebase/auth";
7902
- var version = "1.10.7";
7920
+ var version = "1.10.8-canary.25b60fdaa";
7903
7921
 
7904
7922
  /**
7905
7923
  * @license
@@ -7923,9 +7941,8 @@ class AuthInterop {
7923
7941
  this.internalListeners = new Map();
7924
7942
  }
7925
7943
  getUid() {
7926
- var _a;
7927
7944
  this.assertAuthConfigured();
7928
- return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
7945
+ return this.auth.currentUser?.uid || null;
7929
7946
  }
7930
7947
  async getToken(forceRefresh) {
7931
7948
  this.assertAuthConfigured();
@@ -7942,7 +7959,7 @@ class AuthInterop {
7942
7959
  return;
7943
7960
  }
7944
7961
  const unsubscribe = this.auth.onIdTokenChanged(user => {
7945
- listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
7962
+ listener(user?.stsTokenManager.accessToken || null);
7946
7963
  });
7947
7964
  this.internalListeners.set(listener, unsubscribe);
7948
7965
  this.updateProactiveRefresh();
@@ -8041,8 +8058,8 @@ function registerAuth(clientPlatform) {
8041
8058
  return (auth => new AuthInterop(auth))(auth);
8042
8059
  }, "PRIVATE" /* ComponentType.PRIVATE */).setInstantiationMode("EXPLICIT" /* InstantiationMode.EXPLICIT */));
8043
8060
  registerVersion(name, version, getVersionForPlatform(clientPlatform));
8044
- // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
8045
- registerVersion(name, version, 'esm2017');
8061
+ // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
8062
+ registerVersion(name, version, 'esm2020');
8046
8063
  }
8047
8064
 
8048
8065
  /**
@@ -8177,7 +8194,7 @@ class BrowserPersistenceClass {
8177
8194
  this.storage.removeItem(STORAGE_AVAILABLE_KEY);
8178
8195
  return Promise.resolve(true);
8179
8196
  }
8180
- catch (_a) {
8197
+ catch {
8181
8198
  return Promise.resolve(false);
8182
8199
  }
8183
8200
  }
@@ -9112,7 +9129,6 @@ const REDIRECT_TIMEOUT_MS = 2000;
9112
9129
  * Generates the URL for the OAuth handler.
9113
9130
  */
9114
9131
  async function _generateHandlerUrl(auth, event, provider) {
9115
- var _a;
9116
9132
  // Get the cordova plugins
9117
9133
  const { BuildInfo } = _cordovaWindow();
9118
9134
  debugAssert(event.sessionId, 'AuthEvent did not contain a session ID');
@@ -9135,7 +9151,7 @@ async function _generateHandlerUrl(auth, event, provider) {
9135
9151
  }
9136
9152
  // Attached the hashed session ID
9137
9153
  additionalParams['sessionId'] = sessionDigest;
9138
- return _getRedirectUrl(auth, provider, event.type, undefined, (_a = event.eventId) !== null && _a !== void 0 ? _a : undefined, additionalParams);
9154
+ return _getRedirectUrl(auth, provider, event.type, undefined, event.eventId ?? undefined, additionalParams);
9139
9155
  }
9140
9156
  /**
9141
9157
  * Validates that this app is valid for this project configuration
@@ -9187,17 +9203,16 @@ async function _waitForAppResume(auth, eventListener, iabRef) {
9187
9203
  let onCloseTimer = null;
9188
9204
  // DEFINE ALL THE CALLBACKS =====
9189
9205
  function authEventSeen() {
9190
- var _a;
9191
9206
  // Auth event was detected. Resolve this promise and close the extra
9192
9207
  // window if it's still open.
9193
9208
  resolve();
9194
- const closeBrowserTab = (_a = cordova.plugins.browsertab) === null || _a === void 0 ? void 0 : _a.close;
9209
+ const closeBrowserTab = cordova.plugins.browsertab?.close;
9195
9210
  if (typeof closeBrowserTab === 'function') {
9196
9211
  closeBrowserTab();
9197
9212
  }
9198
9213
  // Close inappbrowser embedded webview in iOS7 and 8 case if still
9199
9214
  // open.
9200
- if (typeof (iabRef === null || iabRef === void 0 ? void 0 : iabRef.close) === 'function') {
9215
+ if (typeof iabRef?.close === 'function') {
9201
9216
  iabRef.close();
9202
9217
  }
9203
9218
  }
@@ -9212,7 +9227,7 @@ async function _waitForAppResume(auth, eventListener, iabRef) {
9212
9227
  }, REDIRECT_TIMEOUT_MS);
9213
9228
  }
9214
9229
  function visibilityChanged() {
9215
- if ((document === null || document === void 0 ? void 0 : document.visibilityState) === 'visible') {
9230
+ if (document?.visibilityState === 'visible') {
9216
9231
  resumed();
9217
9232
  }
9218
9233
  }
@@ -9245,29 +9260,28 @@ async function _waitForAppResume(auth, eventListener, iabRef) {
9245
9260
  * missing plugin.
9246
9261
  */
9247
9262
  function _checkCordovaConfiguration(auth) {
9248
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9249
9263
  const win = _cordovaWindow();
9250
9264
  // Check all dependencies installed.
9251
9265
  // https://github.com/nordnet/cordova-universal-links-plugin
9252
9266
  // Note that cordova-universal-links-plugin has been abandoned.
9253
9267
  // A fork with latest fixes is available at:
9254
9268
  // https://www.npmjs.com/package/cordova-universal-links-plugin-fix
9255
- _assert(typeof ((_a = win === null || win === void 0 ? void 0 : win.universalLinks) === null || _a === void 0 ? void 0 : _a.subscribe) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9269
+ _assert(typeof win?.universalLinks?.subscribe === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9256
9270
  missingPlugin: 'cordova-universal-links-plugin-fix'
9257
9271
  });
9258
9272
  // https://www.npmjs.com/package/cordova-plugin-buildinfo
9259
- _assert(typeof ((_b = win === null || win === void 0 ? void 0 : win.BuildInfo) === null || _b === void 0 ? void 0 : _b.packageName) !== 'undefined', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9273
+ _assert(typeof win?.BuildInfo?.packageName !== 'undefined', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9260
9274
  missingPlugin: 'cordova-plugin-buildInfo'
9261
9275
  });
9262
9276
  // https://github.com/google/cordova-plugin-browsertab
9263
- _assert(typeof ((_e = (_d = (_c = win === null || win === void 0 ? void 0 : win.cordova) === null || _c === void 0 ? void 0 : _c.plugins) === null || _d === void 0 ? void 0 : _d.browsertab) === null || _e === void 0 ? void 0 : _e.openUrl) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9277
+ _assert(typeof win?.cordova?.plugins?.browsertab?.openUrl === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9264
9278
  missingPlugin: 'cordova-plugin-browsertab'
9265
9279
  });
9266
- _assert(typeof ((_h = (_g = (_f = win === null || win === void 0 ? void 0 : win.cordova) === null || _f === void 0 ? void 0 : _f.plugins) === null || _g === void 0 ? void 0 : _g.browsertab) === null || _h === void 0 ? void 0 : _h.isAvailable) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9280
+ _assert(typeof win?.cordova?.plugins?.browsertab?.isAvailable === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9267
9281
  missingPlugin: 'cordova-plugin-browsertab'
9268
9282
  });
9269
9283
  // https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/
9270
- _assert(typeof ((_k = (_j = win === null || win === void 0 ? void 0 : win.cordova) === null || _j === void 0 ? void 0 : _j.InAppBrowser) === null || _k === void 0 ? void 0 : _k.open) === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9284
+ _assert(typeof win?.cordova?.InAppBrowser?.open === 'function', auth, "invalid-cordova-configuration" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */, {
9271
9285
  missingPlugin: 'cordova-plugin-inappbrowser'
9272
9286
  });
9273
9287
  }
@@ -9368,9 +9382,8 @@ class AuthEventManager {
9368
9382
  return handled;
9369
9383
  }
9370
9384
  sendToConsumer(event, consumer) {
9371
- var _a;
9372
9385
  if (event.error && !isNullRedirectEvent(event)) {
9373
- const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||
9386
+ const code = event.error.code?.split('auth/')[1] ||
9374
9387
  "internal-error" /* AuthErrorCode.INTERNAL_ERROR */;
9375
9388
  consumer.onError(_createError(this.auth, code));
9376
9389
  }
@@ -9400,7 +9413,7 @@ function eventUid(e) {
9400
9413
  }
9401
9414
  function isNullRedirectEvent({ type, error }) {
9402
9415
  return (type === "unknown" /* AuthEventType.UNKNOWN */ &&
9403
- (error === null || error === void 0 ? void 0 : error.code) === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
9416
+ error?.code === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
9404
9417
  }
9405
9418
  function isRedirectEvent(event) {
9406
9419
  switch (event.type) {
@@ -9488,7 +9501,6 @@ async function _getAndRemoveEvent(auth) {
9488
9501
  return event;
9489
9502
  }
9490
9503
  function _eventFromPartialAndUrl(partialEvent, url) {
9491
- var _a, _b;
9492
9504
  // Parse the deep link within the dynamic link URL.
9493
9505
  const callbackUrl = _getDeepLinkFromCallback(url);
9494
9506
  // Confirm it is actually a callback URL.
@@ -9505,7 +9517,7 @@ function _eventFromPartialAndUrl(partialEvent, url) {
9505
9517
  const errorObject = params['firebaseError']
9506
9518
  ? parseJsonOrNull(decodeURIComponent(params['firebaseError']))
9507
9519
  : null;
9508
- const code = (_b = (_a = errorObject === null || errorObject === void 0 ? void 0 : errorObject['code']) === null || _a === void 0 ? void 0 : _a.split('auth/')) === null || _b === void 0 ? void 0 : _b[1];
9520
+ const code = errorObject?.['code']?.split('auth/')?.[1];
9509
9521
  const error = code ? _createError(code) : null;
9510
9522
  if (error) {
9511
9523
  return {
@@ -9572,7 +9584,7 @@ function _getDeepLinkFromCallback(url) {
9572
9584
  * empty search params object.
9573
9585
  */
9574
9586
  function searchParamsOrEmpty(url) {
9575
- if (!(url === null || url === void 0 ? void 0 : url.includes('?'))) {
9587
+ if (!url?.includes('?')) {
9576
9588
  return {};
9577
9589
  }
9578
9590
  const [_, ...rest] = url.split('?');
@@ -9662,7 +9674,7 @@ class CordovaPopupRedirectResolver {
9662
9674
  clearTimeout(noEventTimeout);
9663
9675
  const partialEvent = await _getAndRemoveEvent(auth);
9664
9676
  let finalEvent = null;
9665
- if (partialEvent && (eventData === null || eventData === void 0 ? void 0 : eventData['url'])) {
9677
+ if (partialEvent && eventData?.['url']) {
9666
9678
  finalEvent = _eventFromPartialAndUrl(partialEvent, eventData['url']);
9667
9679
  }
9668
9680
  // If finalEvent is never filled, trigger with no event
@@ -9719,4 +9731,4 @@ function generateNoEvent() {
9719
9731
  }
9720
9732
 
9721
9733
  export { signInWithEmailAndPassword as $, ActionCodeOperation as A, PhoneAuthCredential as B, inMemoryPersistence as C, EmailAuthProvider as D, EmailAuthCredential as E, FactorId as F, FacebookAuthProvider as G, GoogleAuthProvider as H, GithubAuthProvider as I, OAuthProvider as J, SAMLAuthProvider as K, signInAnonymously as L, signInWithCredential as M, linkWithCredential as N, OperationType as O, ProviderId as P, reauthenticateWithCredential as Q, signInWithCustomToken as R, SignInMethod as S, TwitterAuthProvider as T, sendPasswordResetEmail as U, confirmPasswordReset as V, applyActionCode as W, checkActionCode as X, verifyPasswordResetCode as Y, createUserWithEmailAndPassword as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, debugFail as a$, sendSignInLinkToEmail as a0, isSignInWithEmailLink as a1, signInWithEmailLink as a2, fetchSignInMethodsForEmail as a3, sendEmailVerification as a4, verifyBeforeUpdateEmail as a5, ActionCodeURL as a6, parseActionCodeURL as a7, updateProfile as a8, updateEmail as a9, FAKE_TOKEN as aA, startEnrollPhoneMfa as aB, handleRecaptchaFlow as aC, sendPhoneVerificationCode as aD, _link$1 as aE, _assertInstanceOf as aF, _withDefaultResolver as aG, AbstractPopupRedirectOperation as aH, debugAssert as aI, _generateEventId as aJ, FederatedAuthProvider as aK, _getProjectConfig as aL, _fail as aM, _getCurrentUrl as aN, _gapiScriptUrl as aO, _emulatorUrl as aP, _isChromeIOS as aQ, _isFirefox as aR, _isIOSStandalone as aS, _getRedirectResult as aT, _overrideRedirectResult as aU, _getRedirectUrl as aV, _setWindowLocation as aW, _isMobileBrowser as aX, _isSafari as aY, _isIOS as aZ, AuthEventManager as a_, updatePassword as aa, getIdToken as ab, getIdTokenResult as ac, unlink as ad, getAdditionalUserInfo as ae, reload as af, getMultiFactorResolver as ag, multiFactor as ah, _performApiRequest as ai, _addTidIfNecessary as aj, Delay as ak, _window as al, _assert as am, isV2 as an, _createError as ao, _recaptchaV2ScriptUrl as ap, _loadJS as aq, MockReCaptcha as ar, _generateCallbackName as as, _castAuth as at, _isHttpOrHttps as au, _isWorker as av, getRecaptchaParams as aw, _serverAppCurrentUserOperationNotSupportedError as ax, _assertLinkedStatus as ay, _initializeRecaptchaConfig as az, _linkWithRedirect as b, finalizeEnrollPhoneMfa as b0, startEnrollTotpMfa as b1, finalizeEnrollTotpMfa as b2, _setExternalJSProvider as b3, _persistenceKeyName as b4, UserImpl as b5, _getInstance as b6, AuthImpl as b7, _getClientVersion as b8, FetchProvider as b9, SAMLAuthCredential as ba, signInWithRedirect as bb, linkWithRedirect as bc, reauthenticateWithRedirect as bd, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, initializeRecaptchaConfig as h, initializeAuth as i, beforeAuthStateChanged as j, onAuthStateChanged as k, updateCurrentUser as l, signOut as m, revokeAccessToken as n, onIdTokenChanged as o, deleteUser as p, debugErrorMap as q, registerAuth as r, setPersistence as s, prodErrorMap as t, useDeviceLanguage as u, validatePassword as v, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as w, connectAuthEmulator as x, AuthCredential as y, OAuthCredential as z };
9722
- //# sourceMappingURL=popup_redirect-2822224b.js.map
9734
+ //# sourceMappingURL=popup_redirect-6226898d.js.map