@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,7 +1,6 @@
1
1
  import { SDK_VERSION, _isFirebaseServerApp, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';
2
2
  import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, isCloudflareWorker, isCloudWorkstation, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, pingServer, updateEmulatorBanner, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
3
3
  import { Logger, LogLevel } from '@firebase/logger';
4
- import { __rest } from 'tslib';
5
4
  import { Component } from '@firebase/component';
6
5
 
7
6
  /**
@@ -477,7 +476,10 @@ function _createError(authOrCode, ...rest) {
477
476
  return createErrorInternal(authOrCode, ...rest);
478
477
  }
479
478
  function _errorWithCustomMessage(auth, code, message) {
480
- const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
479
+ const errorMap = {
480
+ ...prodErrorMap(),
481
+ [code]: message
482
+ };
481
483
  const factory = new ErrorFactory('auth', 'Firebase', errorMap);
482
484
  return factory.create(code, {
483
485
  appName: auth.name
@@ -558,15 +560,13 @@ function debugAssert(assertion, message) {
558
560
  * limitations under the License.
559
561
  */
560
562
  function _getCurrentUrl() {
561
- var _a;
562
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';
563
+ return (typeof self !== 'undefined' && self.location?.href) || '';
563
564
  }
564
565
  function _isHttpOrHttps() {
565
566
  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';
566
567
  }
567
568
  function _getCurrentScheme() {
568
- var _a;
569
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;
569
+ return (typeof self !== 'undefined' && self.location?.protocol) || null;
570
570
  }
571
571
 
572
572
  /**
@@ -880,7 +880,10 @@ const CookieAuthProxiedEndpoints = [
880
880
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
881
881
  function _addTidIfNecessary(auth, request) {
882
882
  if (auth.tenantId && !request.tenantId) {
883
- return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });
883
+ return {
884
+ ...request,
885
+ tenantId: auth.tenantId
886
+ };
884
887
  }
885
888
  return request;
886
889
  }
@@ -898,14 +901,20 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
898
901
  };
899
902
  }
900
903
  }
901
- const query = querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
904
+ const query = querystring({
905
+ key: auth.config.apiKey,
906
+ ...params
907
+ }).slice(1);
902
908
  const headers = await auth._getAdditionalHeaders();
903
909
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
904
910
  if (auth.languageCode) {
905
911
  headers["X-Firebase-Locale" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;
906
912
  }
907
- const fetchArgs = Object.assign({ method,
908
- headers }, body);
913
+ const fetchArgs = {
914
+ method,
915
+ headers,
916
+ ...body
917
+ };
909
918
  /* Security-conscious server-side frameworks tend to have built in mitigations for referrer
910
919
  problems". See the Cloudflare GitHub issue #487: Error: The 'referrerPolicy' field on
911
920
  'RequestInitializerDict' is not implemented."
@@ -921,7 +930,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
921
930
  }
922
931
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
923
932
  auth._canInitEmulator = false;
924
- const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);
933
+ const errorMap = { ...SERVER_ERROR_MAP, ...customErrorMap };
925
934
  try {
926
935
  const networkTimeout = new NetworkTimeout(auth);
927
936
  const response = await Promise.race([
@@ -1262,7 +1271,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1262
1271
  const claims = _parseToken(token);
1263
1272
  _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1264
1273
  const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;
1265
- const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];
1274
+ const signInProvider = firebase?.['sign_in_provider'];
1266
1275
  return {
1267
1276
  claims,
1268
1277
  token,
@@ -1270,7 +1279,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1270
1279
  issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),
1271
1280
  expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),
1272
1281
  signInProvider: signInProvider || null,
1273
- signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null
1282
+ signInSecondFactor: firebase?.['sign_in_second_factor'] || null
1274
1283
  };
1275
1284
  }
1276
1285
  function secondsStringToMilliseconds(seconds) {
@@ -1293,7 +1302,7 @@ function _parseToken(token) {
1293
1302
  return JSON.parse(decoded);
1294
1303
  }
1295
1304
  catch (e) {
1296
- _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());
1305
+ _logError('Caught error parsing JWT payload as JSON', e?.toString());
1297
1306
  return null;
1298
1307
  }
1299
1308
  }
@@ -1389,7 +1398,6 @@ class ProactiveRefresh {
1389
1398
  }
1390
1399
  }
1391
1400
  getInterval(wasError) {
1392
- var _a;
1393
1401
  if (wasError) {
1394
1402
  const interval = this.errorBackoff;
1395
1403
  this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);
@@ -1398,7 +1406,7 @@ class ProactiveRefresh {
1398
1406
  else {
1399
1407
  // Reset the error backoff
1400
1408
  this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;
1401
- const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;
1409
+ const expTime = this.user.stsTokenManager.expirationTime ?? 0;
1402
1410
  const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;
1403
1411
  return Math.max(0, interval);
1404
1412
  }
@@ -1419,7 +1427,7 @@ class ProactiveRefresh {
1419
1427
  }
1420
1428
  catch (e) {
1421
1429
  // Only retry on network errors
1422
- if ((e === null || e === void 0 ? void 0 : e.code) ===
1430
+ if (e?.code ===
1423
1431
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
1424
1432
  this.schedule(/* wasError */ true);
1425
1433
  }
@@ -1485,14 +1493,13 @@ class UserMetadata {
1485
1493
  * limitations under the License.
1486
1494
  */
1487
1495
  async function _reloadWithoutSaving(user) {
1488
- var _a;
1489
1496
  const auth = user.auth;
1490
1497
  const idToken = await user.getIdToken();
1491
1498
  const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));
1492
- _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1499
+ _assert(response?.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1493
1500
  const coreAccount = response.users[0];
1494
1501
  user._notifyReloadListener(coreAccount);
1495
- const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)
1502
+ const newProviderData = coreAccount.providerUserInfo?.length
1496
1503
  ? extractProviderData(coreAccount.providerUserInfo)
1497
1504
  : [];
1498
1505
  const providerData = mergeProviderData(user.providerData, newProviderData);
@@ -1502,7 +1509,7 @@ async function _reloadWithoutSaving(user) {
1502
1509
  // On the other hand, if it was not anonymous before, it should never be
1503
1510
  // considered anonymous now.
1504
1511
  const oldIsAnonymous = user.isAnonymous;
1505
- const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1512
+ const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !providerData?.length;
1506
1513
  const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;
1507
1514
  const updates = {
1508
1515
  uid: coreAccount.localId,
@@ -1539,8 +1546,7 @@ function mergeProviderData(original, newData) {
1539
1546
  return [...deduped, ...newData];
1540
1547
  }
1541
1548
  function extractProviderData(providers) {
1542
- return providers.map((_a) => {
1543
- var { providerId } = _a, provider = __rest(_a, ["providerId"]);
1549
+ return providers.map(({ providerId, ...provider }) => {
1544
1550
  return {
1545
1551
  providerId,
1546
1552
  uid: provider.rawId || '',
@@ -1732,8 +1738,7 @@ function assertStringOrUndefined(assertion, appName) {
1732
1738
  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { appName });
1733
1739
  }
1734
1740
  class UserImpl {
1735
- constructor(_a) {
1736
- var { uid, auth, stsTokenManager } = _a, opt = __rest(_a, ["uid", "auth", "stsTokenManager"]);
1741
+ constructor({ uid, auth, stsTokenManager, ...opt }) {
1737
1742
  // For the user object, provider is always Firebase.
1738
1743
  this.providerId = "firebase" /* ProviderId.FIREBASE */;
1739
1744
  this.proactiveRefresh = new ProactiveRefresh(this);
@@ -1781,12 +1786,16 @@ class UserImpl {
1781
1786
  this.phoneNumber = user.phoneNumber;
1782
1787
  this.isAnonymous = user.isAnonymous;
1783
1788
  this.tenantId = user.tenantId;
1784
- this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));
1789
+ this.providerData = user.providerData.map(userInfo => ({ ...userInfo }));
1785
1790
  this.metadata._copy(user.metadata);
1786
1791
  this.stsTokenManager._assign(user.stsTokenManager);
1787
1792
  }
1788
1793
  _clone(auth) {
1789
- const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));
1794
+ const newUser = new UserImpl({
1795
+ ...this,
1796
+ auth,
1797
+ stsTokenManager: this.stsTokenManager._clone()
1798
+ });
1790
1799
  newUser.metadata._copy(this.metadata);
1791
1800
  return newUser;
1792
1801
  }
@@ -1841,26 +1850,40 @@ class UserImpl {
1841
1850
  return this.auth.signOut();
1842
1851
  }
1843
1852
  toJSON() {
1844
- 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(),
1853
+ return {
1854
+ uid: this.uid,
1855
+ email: this.email || undefined,
1856
+ emailVerified: this.emailVerified,
1857
+ displayName: this.displayName || undefined,
1858
+ isAnonymous: this.isAnonymous,
1859
+ photoURL: this.photoURL || undefined,
1860
+ phoneNumber: this.phoneNumber || undefined,
1861
+ tenantId: this.tenantId || undefined,
1862
+ providerData: this.providerData.map(userInfo => ({ ...userInfo })),
1863
+ stsTokenManager: this.stsTokenManager.toJSON(),
1845
1864
  // Redirect event ID must be maintained in case there is a pending
1846
1865
  // redirect event.
1847
- _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), {
1866
+ _redirectEventId: this._redirectEventId,
1867
+ ...this.metadata.toJSON(),
1848
1868
  // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):
1849
- apiKey: this.auth.config.apiKey, appName: this.auth.name });
1869
+ apiKey: this.auth.config.apiKey,
1870
+ appName: this.auth.name
1871
+ // Missing authDomain will be tolerated by the legacy SDK.
1872
+ // stsTokenManager.apiKey isn't actually required (despite the legacy SDK persisting it).
1873
+ };
1850
1874
  }
1851
1875
  get refreshToken() {
1852
1876
  return this.stsTokenManager.refreshToken || '';
1853
1877
  }
1854
1878
  static _fromJSON(auth, object) {
1855
- var _a, _b, _c, _d, _e, _f, _g, _h;
1856
- const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;
1857
- const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;
1858
- const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;
1859
- const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;
1860
- const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;
1861
- const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;
1862
- const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
1863
- const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;
1879
+ const displayName = object.displayName ?? undefined;
1880
+ const email = object.email ?? undefined;
1881
+ const phoneNumber = object.phoneNumber ?? undefined;
1882
+ const photoURL = object.photoURL ?? undefined;
1883
+ const tenantId = object.tenantId ?? undefined;
1884
+ const _redirectEventId = object._redirectEventId ?? undefined;
1885
+ const createdAt = object.createdAt ?? undefined;
1886
+ const lastLoginAt = object.lastLoginAt ?? undefined;
1864
1887
  const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;
1865
1888
  _assert(uid && plainObjectTokenManager, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1866
1889
  const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);
@@ -1890,7 +1913,7 @@ class UserImpl {
1890
1913
  lastLoginAt
1891
1914
  });
1892
1915
  if (providerData && Array.isArray(providerData)) {
1893
- user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));
1916
+ user.providerData = providerData.map(userInfo => ({ ...userInfo }));
1894
1917
  }
1895
1918
  if (_redirectEventId) {
1896
1919
  user._redirectEventId = _redirectEventId;
@@ -1927,7 +1950,7 @@ class UserImpl {
1927
1950
  const providerData = coreAccount.providerUserInfo !== undefined
1928
1951
  ? extractProviderData(coreAccount.providerUserInfo)
1929
1952
  : [];
1930
- const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1953
+ const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;
1931
1954
  const stsTokenManager = new StsTokenManager();
1932
1955
  stsTokenManager.updateFromIdToken(idToken);
1933
1956
  // Initialize the Firebase Auth user.
@@ -1949,7 +1972,7 @@ class UserImpl {
1949
1972
  providerData,
1950
1973
  metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
1951
1974
  isAnonymous: !(coreAccount.email && coreAccount.passwordHash) &&
1952
- !(providerData === null || providerData === void 0 ? void 0 : providerData.length)
1975
+ !providerData?.length
1953
1976
  };
1954
1977
  Object.assign(user, updates);
1955
1978
  return user;
@@ -2148,7 +2171,7 @@ class PersistenceUserManager {
2148
2171
  break;
2149
2172
  }
2150
2173
  }
2151
- catch (_a) { }
2174
+ catch { }
2152
2175
  }
2153
2176
  // If we find the user in a persistence that does support migration, use
2154
2177
  // that migration path (of only persistences that support migration)
@@ -2171,7 +2194,7 @@ class PersistenceUserManager {
2171
2194
  try {
2172
2195
  await persistence._remove(key);
2173
2196
  }
2174
- catch (_a) { }
2197
+ catch { }
2175
2198
  }
2176
2199
  }));
2177
2200
  return new PersistenceUserManager(selectedPersistence, auth, userKey);
@@ -2241,7 +2264,7 @@ function _getBrowserName(userAgent) {
2241
2264
  // Most modern browsers have name/version at end of user agent string.
2242
2265
  const re = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/;
2243
2266
  const matches = userAgent.match(re);
2244
- if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {
2267
+ if (matches?.length === 2) {
2245
2268
  return matches[1];
2246
2269
  }
2247
2270
  }
@@ -2281,8 +2304,7 @@ function _isIOS7Or8(ua = getUA()) {
2281
2304
  /(iPad|iPhone|iPod).*OS 8_\d/i.test(ua));
2282
2305
  }
2283
2306
  function _isIOSStandalone(ua = getUA()) {
2284
- var _a;
2285
- return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);
2307
+ return _isIOS(ua) && !!window.navigator?.standalone;
2286
2308
  }
2287
2309
  function _isIE10() {
2288
2310
  return isIE() && document.documentMode === 10;
@@ -2413,7 +2435,7 @@ class AuthMiddlewareQueue {
2413
2435
  }
2414
2436
  }
2415
2437
  throw this.auth._errorFactory.create("login-blocked" /* AuthErrorCode.LOGIN_BLOCKED */, {
2416
- originalMessage: e === null || e === void 0 ? void 0 : e.message
2438
+ originalMessage: e?.message
2417
2439
  });
2418
2440
  }
2419
2441
  }
@@ -2471,13 +2493,12 @@ const MINIMUM_MIN_PASSWORD_LENGTH = 6;
2471
2493
  */
2472
2494
  class PasswordPolicyImpl {
2473
2495
  constructor(response) {
2474
- var _a, _b, _c, _d;
2475
2496
  // Only include custom strength options defined in the response.
2476
2497
  const responseOptions = response.customStrengthOptions;
2477
2498
  this.customStrengthOptions = {};
2478
2499
  // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
2479
2500
  this.customStrengthOptions.minPasswordLength =
2480
- (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
2501
+ responseOptions.minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH;
2481
2502
  if (responseOptions.maxPasswordLength) {
2482
2503
  this.customStrengthOptions.maxPasswordLength =
2483
2504
  responseOptions.maxPasswordLength;
@@ -2504,12 +2525,11 @@ class PasswordPolicyImpl {
2504
2525
  }
2505
2526
  // Use an empty string if no non-alphanumeric characters are specified in the response.
2506
2527
  this.allowedNonAlphanumericCharacters =
2507
- (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';
2508
- this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
2528
+ response.allowedNonAlphanumericCharacters?.join('') ?? '';
2529
+ this.forceUpgradeOnSignin = response.forceUpgradeOnSignin ?? false;
2509
2530
  this.schemaVersion = response.schemaVersion;
2510
2531
  }
2511
2532
  validatePassword(password) {
2512
- var _a, _b, _c, _d, _e, _f;
2513
2533
  const status = {
2514
2534
  isValid: true,
2515
2535
  passwordPolicy: this
@@ -2518,12 +2538,12 @@ class PasswordPolicyImpl {
2518
2538
  this.validatePasswordLengthOptions(password, status);
2519
2539
  this.validatePasswordCharacterOptions(password, status);
2520
2540
  // Combine the status into single isValid property.
2521
- status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
2522
- status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
2523
- status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
2524
- status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
2525
- status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
2526
- status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
2541
+ status.isValid && (status.isValid = status.meetsMinPasswordLength ?? true);
2542
+ status.isValid && (status.isValid = status.meetsMaxPasswordLength ?? true);
2543
+ status.isValid && (status.isValid = status.containsLowercaseLetter ?? true);
2544
+ status.isValid && (status.isValid = status.containsUppercaseLetter ?? true);
2545
+ status.isValid && (status.isValid = status.containsNumericCharacter ?? true);
2546
+ status.isValid && (status.isValid = status.containsNonAlphanumericCharacter ?? true);
2527
2547
  return status;
2528
2548
  }
2529
2549
  /**
@@ -2660,18 +2680,17 @@ class AuthImpl {
2660
2680
  // Have to check for app deletion throughout initialization (after each
2661
2681
  // promise resolution)
2662
2682
  this._initializationPromise = this.queue(async () => {
2663
- var _a, _b, _c;
2664
2683
  if (this._deleted) {
2665
2684
  return;
2666
2685
  }
2667
2686
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
2668
- (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
2687
+ this._resolvePersistenceManagerAvailable?.();
2669
2688
  if (this._deleted) {
2670
2689
  return;
2671
2690
  }
2672
2691
  // Initialize the resolver early if necessary (only applicable to web:
2673
2692
  // this will cause the iframe to load immediately in certain cases)
2674
- if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
2693
+ if (this._popupRedirectResolver?._shouldInitProactively) {
2675
2694
  // If this fails, don't halt auth loading
2676
2695
  try {
2677
2696
  await this._popupRedirectResolver._initialize(this);
@@ -2681,7 +2700,7 @@ class AuthImpl {
2681
2700
  }
2682
2701
  }
2683
2702
  await this.initializeCurrentUser(popupRedirectResolver);
2684
- this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2703
+ this.lastNotifiedUid = this.currentUser?.uid || null;
2685
2704
  if (this._deleted) {
2686
2705
  return;
2687
2706
  }
@@ -2726,7 +2745,6 @@ class AuthImpl {
2726
2745
  }
2727
2746
  }
2728
2747
  async initializeCurrentUser(popupRedirectResolver) {
2729
- var _a;
2730
2748
  if (_isFirebaseServerApp(this.app)) {
2731
2749
  const idToken = this.app.settings.authIdToken;
2732
2750
  if (idToken) {
@@ -2746,15 +2764,15 @@ class AuthImpl {
2746
2764
  let needsTocheckMiddleware = false;
2747
2765
  if (popupRedirectResolver && this.config.authDomain) {
2748
2766
  await this.getOrInitRedirectPersistenceManager();
2749
- const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;
2750
- const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;
2767
+ const redirectUserEventId = this.redirectUser?._redirectEventId;
2768
+ const storedUserEventId = futureCurrentUser?._redirectEventId;
2751
2769
  const result = await this.tryRedirectSignIn(popupRedirectResolver);
2752
2770
  // If the stored user (i.e. the old "currentUser") has a redirectId that
2753
2771
  // matches the redirect user, then we want to initially sign in with the
2754
2772
  // new user object from result.
2755
2773
  // TODO(samgho): More thoroughly test all of this
2756
2774
  if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&
2757
- (result === null || result === void 0 ? void 0 : result.user)) {
2775
+ result?.user) {
2758
2776
  futureCurrentUser = result.user;
2759
2777
  needsTocheckMiddleware = true;
2760
2778
  }
@@ -2829,7 +2847,7 @@ class AuthImpl {
2829
2847
  await _reloadWithoutSaving(user);
2830
2848
  }
2831
2849
  catch (e) {
2832
- if ((e === null || e === void 0 ? void 0 : e.code) !==
2850
+ if (e?.code !==
2833
2851
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
2834
2852
  // Something's wrong with the user's token. Log them out and remove
2835
2853
  // them from storage
@@ -2986,12 +3004,11 @@ class AuthImpl {
2986
3004
  }
2987
3005
  }
2988
3006
  toJSON() {
2989
- var _a;
2990
3007
  return {
2991
3008
  apiKey: this.config.apiKey,
2992
3009
  authDomain: this.config.authDomain,
2993
3010
  appName: this.name,
2994
- currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()
3011
+ currentUser: this._currentUser?.toJSON()
2995
3012
  };
2996
3013
  }
2997
3014
  async _setRedirectUser(user, popupRedirectResolver) {
@@ -3012,16 +3029,15 @@ class AuthImpl {
3012
3029
  return this.redirectPersistenceManager;
3013
3030
  }
3014
3031
  async _redirectUserForId(id) {
3015
- var _a, _b;
3016
3032
  // Make sure we've cleared any pending persistence actions if we're not in
3017
3033
  // the initializer
3018
3034
  if (this._isInitialized) {
3019
3035
  await this.queue(async () => { });
3020
3036
  }
3021
- if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {
3037
+ if (this._currentUser?._redirectEventId === id) {
3022
3038
  return this._currentUser;
3023
3039
  }
3024
- if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {
3040
+ if (this.redirectUser?._redirectEventId === id) {
3025
3041
  return this.redirectUser;
3026
3042
  }
3027
3043
  return null;
@@ -3057,12 +3073,11 @@ class AuthImpl {
3057
3073
  return this.currentUser;
3058
3074
  }
3059
3075
  notifyAuthListeners() {
3060
- var _a, _b;
3061
3076
  if (!this._isInitialized) {
3062
3077
  return;
3063
3078
  }
3064
3079
  this.idTokenSubscription.next(this.currentUser);
3065
- const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;
3080
+ const currentUid = this.currentUser?.uid ?? null;
3066
3081
  if (this.lastNotifiedUid !== currentUid) {
3067
3082
  this.lastNotifiedUid = currentUid;
3068
3083
  this.authStateSubscription.next(this.currentUser);
@@ -3147,7 +3162,6 @@ class AuthImpl {
3147
3162
  return this.frameworks;
3148
3163
  }
3149
3164
  async _getAdditionalHeaders() {
3150
- var _a;
3151
3165
  // Additional headers on every request
3152
3166
  const headers = {
3153
3167
  ["X-Client-Version" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion
@@ -3156,10 +3170,11 @@ class AuthImpl {
3156
3170
  headers["X-Firebase-gmpid" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;
3157
3171
  }
3158
3172
  // If the heartbeat service exists, add the heartbeat string
3159
- const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
3173
+ const heartbeatsHeader = await this.heartbeatServiceProvider
3160
3174
  .getImmediate({
3161
3175
  optional: true
3162
- })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
3176
+ })
3177
+ ?.getHeartbeatsHeader();
3163
3178
  if (heartbeatsHeader) {
3164
3179
  headers["X-Firebase-Client" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;
3165
3180
  }
@@ -3171,20 +3186,20 @@ class AuthImpl {
3171
3186
  return headers;
3172
3187
  }
3173
3188
  async _getAppCheckToken() {
3174
- var _a;
3175
3189
  if (_isFirebaseServerApp(this.app) && this.app.settings.appCheckToken) {
3176
3190
  return this.app.settings.appCheckToken;
3177
3191
  }
3178
- const appCheckTokenResult = await ((_a = this.appCheckServiceProvider
3179
- .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
3180
- if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
3192
+ const appCheckTokenResult = await this.appCheckServiceProvider
3193
+ .getImmediate({ optional: true })
3194
+ ?.getToken();
3195
+ if (appCheckTokenResult?.error) {
3181
3196
  // Context: appCheck.getToken() will never throw even if an error happened.
3182
3197
  // In the error case, a dummy token will be returned along with an error field describing
3183
3198
  // the error. In general, we shouldn't care about the error condition and just use
3184
3199
  // the token (actual or dummy) to send requests.
3185
3200
  _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
3186
3201
  }
3187
- return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
3202
+ return appCheckTokenResult?.token;
3188
3203
  }
3189
3204
  }
3190
3205
  /**
@@ -3284,20 +3299,17 @@ class MockReCaptcha {
3284
3299
  return id;
3285
3300
  }
3286
3301
  reset(optWidgetId) {
3287
- var _a;
3288
3302
  const id = optWidgetId || _WIDGET_ID_START;
3289
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());
3303
+ void this._widgets.get(id)?.delete();
3290
3304
  this._widgets.delete(id);
3291
3305
  }
3292
3306
  getResponse(optWidgetId) {
3293
- var _a;
3294
3307
  const id = optWidgetId || _WIDGET_ID_START;
3295
- return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';
3308
+ return this._widgets.get(id)?.getResponse() || '';
3296
3309
  }
3297
3310
  async execute(optWidgetId) {
3298
- var _a;
3299
3311
  const id = optWidgetId || _WIDGET_ID_START;
3300
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());
3312
+ void this._widgets.get(id)?.execute();
3301
3313
  return '';
3302
3314
  }
3303
3315
  }
@@ -3537,7 +3549,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3537
3549
  captchaResponse = await verifier.verify(action, true);
3538
3550
  }
3539
3551
  }
3540
- const newRequest = Object.assign({}, request);
3552
+ const newRequest = { ...request };
3541
3553
  if (action === "mfaSmsEnrollment" /* RecaptchaActionName.MFA_SMS_ENROLLMENT */ ||
3542
3554
  action === "mfaSmsSignIn" /* RecaptchaActionName.MFA_SMS_SIGNIN */) {
3543
3555
  if ('phoneEnrollmentInfo' in newRequest) {
@@ -3579,10 +3591,10 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3579
3591
  return newRequest;
3580
3592
  }
3581
3593
  async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
3582
- var _a, _b;
3583
3594
  if (recaptchaAuthProvider === "EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */) {
3584
- if ((_a = authInstance
3585
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3595
+ if (authInstance
3596
+ ._getRecaptchaConfig()
3597
+ ?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3586
3598
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */);
3587
3599
  return actionMethod(authInstance, requestWithRecaptcha);
3588
3600
  }
@@ -3600,13 +3612,14 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
3600
3612
  }
3601
3613
  }
3602
3614
  else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
3603
- if ((_b = authInstance
3604
- ._getRecaptchaConfig()) === null || _b === void 0 ? void 0 : _b.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3615
+ if (authInstance
3616
+ ._getRecaptchaConfig()
3617
+ ?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3605
3618
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
3606
3619
  return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
3607
- var _a;
3608
- if (((_a = authInstance
3609
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) === "AUDIT" /* EnforcementState.AUDIT */) {
3620
+ if (authInstance
3621
+ ._getRecaptchaConfig()
3622
+ ?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
3610
3623
  // AUDIT mode
3611
3624
  if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
3612
3625
  error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
@@ -3703,7 +3716,7 @@ function initializeAuth(app, deps) {
3703
3716
  if (provider.isInitialized()) {
3704
3717
  const auth = provider.getImmediate();
3705
3718
  const initialOptions = provider.getOptions();
3706
- if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
3719
+ if (deepEqual(initialOptions, deps ?? {})) {
3707
3720
  return auth;
3708
3721
  }
3709
3722
  else {
@@ -3714,15 +3727,15 @@ function initializeAuth(app, deps) {
3714
3727
  return auth;
3715
3728
  }
3716
3729
  function _initializeAuthInstance(auth, deps) {
3717
- const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
3730
+ const persistence = deps?.persistence || [];
3718
3731
  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
3719
- if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
3732
+ if (deps?.errorMap) {
3720
3733
  auth._updateErrorMap(deps.errorMap);
3721
3734
  }
3722
3735
  // This promise is intended to float; auth initialization happens in the
3723
3736
  // background, meanwhile the auth object may be used by the app.
3724
3737
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
3725
- auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
3738
+ auth._initializeWithPersistence(hierarchy, deps?.popupRedirectResolver);
3726
3739
  }
3727
3740
 
3728
3741
  /**
@@ -3750,7 +3763,7 @@ function _initializeAuthInstance(auth, deps) {
3750
3763
  function connectAuthEmulator(auth, url, options) {
3751
3764
  const authInternal = _castAuth(auth);
3752
3765
  _assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
3753
- const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
3766
+ const disableWarnings = !!options?.disableWarnings;
3754
3767
  const protocol = extractProtocol(url);
3755
3768
  const { host, port } = extractHostAndPort(url);
3756
3769
  const portStr = port === null ? '' : `:${port}`;
@@ -4076,7 +4089,7 @@ class EmailAuthCredential extends AuthCredential {
4076
4089
  */
4077
4090
  static fromJSON(json) {
4078
4091
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4079
- if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {
4092
+ if (obj?.email && obj?.password) {
4080
4093
  if (obj.signInMethod === "password" /* SignInMethod.EMAIL_PASSWORD */) {
4081
4094
  return this._fromEmailAndPassword(obj.email, obj.password);
4082
4095
  }
@@ -4236,7 +4249,7 @@ class OAuthCredential extends AuthCredential {
4236
4249
  */
4237
4250
  static fromJSON(json) {
4238
4251
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4239
- const { providerId, signInMethod } = obj, rest = __rest(obj, ["providerId", "signInMethod"]);
4252
+ const { providerId, signInMethod, ...rest } = obj;
4240
4253
  if (!providerId || !signInMethod) {
4241
4254
  return null;
4242
4255
  }
@@ -4327,7 +4340,10 @@ const VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {
4327
4340
  ["USER_NOT_FOUND" /* ServerError.USER_NOT_FOUND */]: "user-not-found" /* AuthErrorCode.USER_DELETED */
4328
4341
  };
4329
4342
  async function verifyPhoneNumberForExisting(auth, request) {
4330
- const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });
4343
+ const apiRequest = {
4344
+ ...request,
4345
+ operation: 'REAUTH'
4346
+ };
4331
4347
  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_);
4332
4348
  }
4333
4349
 
@@ -4371,7 +4387,10 @@ class PhoneAuthCredential extends AuthCredential {
4371
4387
  }
4372
4388
  /** @internal */
4373
4389
  _linkToIdToken(auth, idToken) {
4374
- return linkWithPhoneNumber$1(auth, Object.assign({ idToken }, this._makeVerificationRequest()));
4390
+ return linkWithPhoneNumber$1(auth, {
4391
+ idToken,
4392
+ ...this._makeVerificationRequest()
4393
+ });
4375
4394
  }
4376
4395
  /** @internal */
4377
4396
  _getReauthenticationResolver(auth) {
@@ -4499,19 +4518,18 @@ class ActionCodeURL {
4499
4518
  * @internal
4500
4519
  */
4501
4520
  constructor(actionLink) {
4502
- var _a, _b, _c, _d, _e, _f;
4503
4521
  const searchParams = querystringDecode(extractQuerystring(actionLink));
4504
- const apiKey = (_a = searchParams["apiKey" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;
4505
- const code = (_b = searchParams["oobCode" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;
4506
- const operation = parseMode((_c = searchParams["mode" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);
4522
+ const apiKey = searchParams["apiKey" /* QueryField.API_KEY */] ?? null;
4523
+ const code = searchParams["oobCode" /* QueryField.CODE */] ?? null;
4524
+ const operation = parseMode(searchParams["mode" /* QueryField.MODE */] ?? null);
4507
4525
  // Validate API key, code and mode.
4508
4526
  _assert(apiKey && code && operation, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4509
4527
  this.apiKey = apiKey;
4510
4528
  this.operation = operation;
4511
4529
  this.code = code;
4512
- this.continueUrl = (_d = searchParams["continueUrl" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;
4513
- this.languageCode = (_e = searchParams["lang" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;
4514
- this.tenantId = (_f = searchParams["tenantId" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;
4530
+ this.continueUrl = searchParams["continueUrl" /* QueryField.CONTINUE_URL */] ?? null;
4531
+ this.languageCode = searchParams["lang" /* QueryField.LANGUAGE_CODE */] ?? null;
4532
+ this.tenantId = searchParams["tenantId" /* QueryField.TENANT_ID */] ?? null;
4515
4533
  }
4516
4534
  /**
4517
4535
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -4527,7 +4545,7 @@ class ActionCodeURL {
4527
4545
  try {
4528
4546
  return new ActionCodeURL(actionLink);
4529
4547
  }
4530
- catch (_a) {
4548
+ catch {
4531
4549
  return null;
4532
4550
  }
4533
4551
  }
@@ -4817,13 +4835,17 @@ class OAuthProvider extends BaseOAuthProvider {
4817
4835
  * or the ID token string.
4818
4836
  */
4819
4837
  credential(params) {
4820
- return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
4838
+ return this._credential({ ...params, nonce: params.rawNonce });
4821
4839
  }
4822
4840
  /** An internal credential method that accepts more permissive options */
4823
4841
  _credential(params) {
4824
4842
  _assert(params.idToken || params.accessToken, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4825
4843
  // For OAuthCredential, sign in method is same as providerId.
4826
- return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));
4844
+ return OAuthCredential._fromParams({
4845
+ ...params,
4846
+ providerId: this.providerId,
4847
+ signInMethod: this.providerId
4848
+ });
4827
4849
  }
4828
4850
  /**
4829
4851
  * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
@@ -4975,7 +4997,7 @@ class FacebookAuthProvider extends BaseOAuthProvider {
4975
4997
  try {
4976
4998
  return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
4977
4999
  }
4978
- catch (_a) {
5000
+ catch {
4979
5001
  return null;
4980
5002
  }
4981
5003
  }
@@ -5097,7 +5119,7 @@ class GoogleAuthProvider extends BaseOAuthProvider {
5097
5119
  try {
5098
5120
  return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
5099
5121
  }
5100
- catch (_a) {
5122
+ catch {
5101
5123
  return null;
5102
5124
  }
5103
5125
  }
@@ -5208,7 +5230,7 @@ class GithubAuthProvider extends BaseOAuthProvider {
5208
5230
  try {
5209
5231
  return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
5210
5232
  }
5211
- catch (_a) {
5233
+ catch {
5212
5234
  return null;
5213
5235
  }
5214
5236
  }
@@ -5492,7 +5514,7 @@ class TwitterAuthProvider extends BaseOAuthProvider {
5492
5514
  try {
5493
5515
  return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
5494
5516
  }
5495
- catch (_a) {
5517
+ catch {
5496
5518
  return null;
5497
5519
  }
5498
5520
  }
@@ -5608,13 +5630,12 @@ function providerIdForResponse(response) {
5608
5630
  * @public
5609
5631
  */
5610
5632
  async function signInAnonymously(auth) {
5611
- var _a;
5612
5633
  if (_isFirebaseServerApp(auth.app)) {
5613
5634
  return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(auth));
5614
5635
  }
5615
5636
  const authInternal = _castAuth(auth);
5616
5637
  await authInternal._initializationPromise;
5617
- if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {
5638
+ if (authInternal.currentUser?.isAnonymous) {
5618
5639
  // If an anonymous user is already signed in, no need to sign them in again.
5619
5640
  return new UserCredentialImpl({
5620
5641
  user: authInternal.currentUser,
@@ -5648,7 +5669,6 @@ async function signInAnonymously(auth) {
5648
5669
  */
5649
5670
  class MultiFactorError extends FirebaseError {
5650
5671
  constructor(auth, error, operationType, user) {
5651
- var _a;
5652
5672
  super(error.code, error.message);
5653
5673
  this.operationType = operationType;
5654
5674
  this.user = user;
@@ -5656,7 +5676,7 @@ class MultiFactorError extends FirebaseError {
5656
5676
  Object.setPrototypeOf(this, MultiFactorError.prototype);
5657
5677
  this.customData = {
5658
5678
  appName: auth.name,
5659
- tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
5679
+ tenantId: auth.tenantId ?? undefined,
5660
5680
  _serverResponse: error.customData._serverResponse,
5661
5681
  operationType
5662
5682
  };
@@ -5787,7 +5807,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
5787
5807
  }
5788
5808
  catch (e) {
5789
5809
  // Convert user deleted error into user mismatch
5790
- if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5810
+ if (e?.code === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5791
5811
  _fail(auth, "user-mismatch" /* AuthErrorCode.USER_MISMATCH */);
5792
5812
  }
5793
5813
  throw e;
@@ -6012,8 +6032,7 @@ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
6012
6032
  * limitations under the License.
6013
6033
  */
6014
6034
  function _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {
6015
- var _a;
6016
- _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6035
+ _assert(actionCodeSettings.url?.length > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6017
6036
  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||
6018
6037
  actionCodeSettings.dynamicLinkDomain.length > 0, auth, "invalid-dynamic-link-domain" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);
6019
6038
  _assert(typeof actionCodeSettings.linkDomain === 'undefined' ||
@@ -6374,7 +6393,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
6374
6393
  */
6375
6394
  function isSignInWithEmailLink(auth, emailLink) {
6376
6395
  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);
6377
- return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6396
+ return actionCodeUrl?.operation === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6378
6397
  }
6379
6398
  /**
6380
6399
  * Asynchronously signs in using an email and sign-in email link.
@@ -6747,7 +6766,6 @@ async function updateEmailOrPassword(user, email, password) {
6747
6766
  *
6748
6767
  */
6749
6768
  function _fromIdTokenResponse(idTokenResponse) {
6750
- var _a, _b;
6751
6769
  if (!idTokenResponse) {
6752
6770
  return null;
6753
6771
  }
@@ -6757,8 +6775,8 @@ function _fromIdTokenResponse(idTokenResponse) {
6757
6775
  : {};
6758
6776
  const isNewUser = idTokenResponse.isNewUser ||
6759
6777
  idTokenResponse.kind === "identitytoolkit#SignupNewUserResponse" /* IdTokenResponseKind.SignupNewUser */;
6760
- if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {
6761
- 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'];
6778
+ if (!providerId && idTokenResponse?.idToken) {
6779
+ const signInProvider = _parseToken(idTokenResponse.idToken)?.firebase?.['sign_in_provider'];
6762
6780
  if (signInProvider) {
6763
6781
  const filteredProviderId = signInProvider !== "anonymous" /* ProviderId.ANONYMOUS */ &&
6764
6782
  signInProvider !== "custom" /* ProviderId.CUSTOM */
@@ -6807,7 +6825,7 @@ class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {
6807
6825
  }
6808
6826
  class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {
6809
6827
  constructor(isNewUser, profile) {
6810
- 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);
6828
+ super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof profile?.login === 'string' ? profile?.login : null);
6811
6829
  }
6812
6830
  }
6813
6831
  class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {
@@ -7107,12 +7125,11 @@ class MultiFactorSessionImpl {
7107
7125
  };
7108
7126
  }
7109
7127
  static fromJSON(obj) {
7110
- var _a, _b;
7111
- if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {
7112
- if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {
7128
+ if (obj?.multiFactorSession) {
7129
+ if (obj.multiFactorSession?.pendingCredential) {
7113
7130
  return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);
7114
7131
  }
7115
- else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {
7132
+ else if (obj.multiFactorSession?.idToken) {
7116
7133
  return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);
7117
7134
  }
7118
7135
  }
@@ -7155,7 +7172,11 @@ class MultiFactorResolverImpl {
7155
7172
  delete serverResponse.mfaInfo;
7156
7173
  delete serverResponse.mfaPendingCredential;
7157
7174
  // Use in the new token & refresh token in the old response
7158
- const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });
7175
+ const idTokenResponse = {
7176
+ ...serverResponse,
7177
+ idToken: mfaResponse.idToken,
7178
+ refreshToken: mfaResponse.refreshToken
7179
+ };
7159
7180
  // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case
7160
7181
  switch (error.operationType) {
7161
7182
  case "signIn" /* OperationType.SIGN_IN */:
@@ -7186,11 +7207,10 @@ class MultiFactorResolverImpl {
7186
7207
  * @public
7187
7208
  */
7188
7209
  function getMultiFactorResolver(auth, error) {
7189
- var _a;
7190
7210
  const authModular = getModularInstance(auth);
7191
7211
  const errorInternal = error;
7192
7212
  _assert(error.customData.operationType, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7193
- _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7213
+ _assert(errorInternal.customData._serverResponse?.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7194
7214
  return MultiFactorResolverImpl._fromError(authModular, errorInternal);
7195
7215
  }
7196
7216
 
@@ -7330,7 +7350,7 @@ class BrowserPersistenceClass {
7330
7350
  this.storage.removeItem(STORAGE_AVAILABLE_KEY);
7331
7351
  return Promise.resolve(true);
7332
7352
  }
7333
- catch (_a) {
7353
+ catch {
7334
7354
  return Promise.resolve(false);
7335
7355
  }
7336
7356
  }
@@ -7552,10 +7572,9 @@ const browserLocalPersistence = BrowserLocalPersistence;
7552
7572
  const POLLING_INTERVAL_MS = 1000;
7553
7573
  // Pull a cookie value from document.cookie
7554
7574
  function getDocumentCookie(name) {
7555
- var _a, _b;
7556
7575
  const escapedName = name.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
7557
7576
  const matcher = RegExp(`${escapedName}=([^;]+)`);
7558
- return (_b = (_a = document.cookie.match(matcher)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
7577
+ return document.cookie.match(matcher)?.[1] ?? null;
7559
7578
  }
7560
7579
  // Produce a sanitized cookie name from the persistence key
7561
7580
  function getCookieName(key) {
@@ -7583,14 +7602,13 @@ class CookiePersistence {
7583
7602
  // prerequisites have been met, namely that we're in a secureContext, navigator and document are
7584
7603
  // available and cookies are enabled. Not all UAs support these method, so fallback accordingly.
7585
7604
  async _isAvailable() {
7586
- var _a;
7587
7605
  if (typeof isSecureContext === 'boolean' && !isSecureContext) {
7588
7606
  return false;
7589
7607
  }
7590
7608
  if (typeof navigator === 'undefined' || typeof document === 'undefined') {
7591
7609
  return false;
7592
7610
  }
7593
- return (_a = navigator.cookieEnabled) !== null && _a !== void 0 ? _a : true;
7611
+ return navigator.cookieEnabled ?? true;
7594
7612
  }
7595
7613
  // Set should be a noop as we expect middleware to handle this
7596
7614
  async _set(_key, _value) {
@@ -7604,7 +7622,7 @@ class CookiePersistence {
7604
7622
  const name = getCookieName(key);
7605
7623
  if (window.cookieStore) {
7606
7624
  const cookie = await window.cookieStore.get(name);
7607
- return cookie === null || cookie === void 0 ? void 0 : cookie.value;
7625
+ return cookie?.value;
7608
7626
  }
7609
7627
  return getDocumentCookie(name);
7610
7628
  }
@@ -7815,7 +7833,7 @@ class Receiver {
7815
7833
  const messageEvent = event;
7816
7834
  const { eventId, eventType, data } = messageEvent.data;
7817
7835
  const handlers = this.handlersMap[eventType];
7818
- if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {
7836
+ if (!handlers?.size) {
7819
7837
  return;
7820
7838
  }
7821
7839
  messageEvent.ports[0].postMessage({
@@ -8051,20 +8069,19 @@ function _isWorker() {
8051
8069
  typeof _window()['importScripts'] === 'function');
8052
8070
  }
8053
8071
  async function _getActiveServiceWorker() {
8054
- if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {
8072
+ if (!navigator?.serviceWorker) {
8055
8073
  return null;
8056
8074
  }
8057
8075
  try {
8058
8076
  const registration = await navigator.serviceWorker.ready;
8059
8077
  return registration.active;
8060
8078
  }
8061
- catch (_a) {
8079
+ catch {
8062
8080
  return null;
8063
8081
  }
8064
8082
  }
8065
8083
  function _getServiceWorkerController() {
8066
- var _a;
8067
- return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;
8084
+ return navigator?.serviceWorker?.controller || null;
8068
8085
  }
8069
8086
  function _getWorkerGlobalScope() {
8070
8087
  return _isWorker() ? self : null;
@@ -8247,7 +8264,6 @@ class IndexedDBLocalPersistence {
8247
8264
  * may not resolve.
8248
8265
  */
8249
8266
  async initializeSender() {
8250
- var _a, _b;
8251
8267
  // Check to see if there's an active service worker.
8252
8268
  this.activeServiceWorker = await _getActiveServiceWorker();
8253
8269
  if (!this.activeServiceWorker) {
@@ -8259,8 +8275,8 @@ class IndexedDBLocalPersistence {
8259
8275
  if (!results) {
8260
8276
  return;
8261
8277
  }
8262
- if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) &&
8263
- ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes("keyChanged" /* _EventType.KEY_CHANGED */))) {
8278
+ if (results[0]?.fulfilled &&
8279
+ results[0]?.value.includes("keyChanged" /* _EventType.KEY_CHANGED */)) {
8264
8280
  this.serviceWorkerReceiverAvailable = true;
8265
8281
  }
8266
8282
  }
@@ -8286,7 +8302,7 @@ class IndexedDBLocalPersistence {
8286
8302
  ? 800 /* _TimeoutDuration.LONG_ACK */
8287
8303
  : 50 /* _TimeoutDuration.ACK */);
8288
8304
  }
8289
- catch (_a) {
8305
+ catch {
8290
8306
  // This is a best effort approach. Ignore errors.
8291
8307
  }
8292
8308
  }
@@ -8300,7 +8316,7 @@ class IndexedDBLocalPersistence {
8300
8316
  await _deleteObject(db, STORAGE_AVAILABLE_KEY);
8301
8317
  return true;
8302
8318
  }
8303
- catch (_a) { }
8319
+ catch { }
8304
8320
  return false;
8305
8321
  }
8306
8322
  async _withPendingWrite(write) {
@@ -8466,7 +8482,6 @@ const NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);
8466
8482
  */
8467
8483
  class ReCaptchaLoaderImpl {
8468
8484
  constructor() {
8469
- var _a;
8470
8485
  this.hostLanguage = '';
8471
8486
  this.counter = 0;
8472
8487
  /**
@@ -8474,7 +8489,7 @@ class ReCaptchaLoaderImpl {
8474
8489
  * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
8475
8490
  * `window.grecaptcha.render()` will not. Another load will add it.
8476
8491
  */
8477
- this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);
8492
+ this.librarySeparatelyLoaded = !!_window().grecaptcha?.render;
8478
8493
  }
8479
8494
  load(auth, hl = '') {
8480
8495
  _assert(isHostLanguageValid(hl), auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
@@ -8519,7 +8534,6 @@ class ReCaptchaLoaderImpl {
8519
8534
  this.counter--;
8520
8535
  }
8521
8536
  shouldResolveImmediately(hl) {
8522
- var _a;
8523
8537
  // We can resolve immediately if:
8524
8538
  // • grecaptcha is already defined AND (
8525
8539
  // 1. the requested language codes are the same OR
@@ -8527,7 +8541,7 @@ class ReCaptchaLoaderImpl {
8527
8541
  // 3. the library was already loaded by the app
8528
8542
  // In cases (2) and (3), we _can't_ reload as it would break the recaptchas
8529
8543
  // that are already in the page
8530
- return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&
8544
+ return (!!_window().grecaptcha?.render &&
8531
8545
  (hl === this.hostLanguage ||
8532
8546
  this.counter > 0 ||
8533
8547
  this.librarySeparatelyLoaded));
@@ -8592,7 +8606,9 @@ class RecaptchaVerifier {
8592
8606
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
8593
8607
  * 'invisible'.
8594
8608
  */
8595
- constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
8609
+ constructor(authExtern, containerOrId, parameters = {
8610
+ ...DEFAULT_PARAMS
8611
+ }) {
8596
8612
  this.parameters = parameters;
8597
8613
  /**
8598
8614
  * The application verifier type.
@@ -8876,7 +8892,6 @@ async function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {
8876
8892
  *
8877
8893
  */
8878
8894
  async function _verifyPhoneNumber(auth, options, verifier) {
8879
- var _a;
8880
8895
  if (!auth._getRecaptchaConfig()) {
8881
8896
  try {
8882
8897
  await _initializeRecaptchaConfig(auth);
@@ -8913,7 +8928,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8913
8928
  const startEnrollPhoneMfaActionCallback = async (authInstance, request) => {
8914
8929
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8915
8930
  if (request.phoneEnrollmentInfo.captchaResponse === FAKE_TOKEN) {
8916
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8931
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8917
8932
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8918
8933
  return startEnrollPhoneMfa(authInstance, requestWithRecaptchaV2);
8919
8934
  }
@@ -8927,7 +8942,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8927
8942
  }
8928
8943
  else {
8929
8944
  _assert(session.type === "signin" /* MultiFactorSessionType.SIGN_IN */, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8930
- const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) ||
8945
+ const mfaEnrollmentId = phoneInfoOptions.multiFactorHint?.uid ||
8931
8946
  phoneInfoOptions.multiFactorUid;
8932
8947
  _assert(mfaEnrollmentId, auth, "missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */);
8933
8948
  const startPhoneMfaSignInRequest = {
@@ -8940,7 +8955,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8940
8955
  const startSignInPhoneMfaActionCallback = async (authInstance, request) => {
8941
8956
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8942
8957
  if (request.phoneSignInInfo.captchaResponse === FAKE_TOKEN) {
8943
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8958
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8944
8959
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8945
8960
  return startSignInPhoneMfa(authInstance, requestWithRecaptchaV2);
8946
8961
  }
@@ -8961,7 +8976,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8961
8976
  const sendPhoneVerificationCodeActionCallback = async (authInstance, request) => {
8962
8977
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8963
8978
  if (request.captchaResponse === FAKE_TOKEN) {
8964
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8979
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8965
8980
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8966
8981
  return sendPhoneVerificationCode(authInstance, requestWithRecaptchaV2);
8967
8982
  }
@@ -8975,7 +8990,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8975
8990
  }
8976
8991
  }
8977
8992
  finally {
8978
- verifier === null || verifier === void 0 ? void 0 : verifier._reset();
8993
+ verifier?._reset();
8979
8994
  }
8980
8995
  }
8981
8996
  /**
@@ -9013,7 +9028,7 @@ async function injectRecaptchaV2Token(auth, request, recaptchaV2Verifier) {
9013
9028
  _assert(recaptchaV2Verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9014
9029
  const recaptchaV2Token = await recaptchaV2Verifier.verify();
9015
9030
  _assert(typeof recaptchaV2Token === 'string', auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9016
- const newRequest = Object.assign({}, request);
9031
+ const newRequest = { ...request };
9017
9032
  if ('phoneEnrollmentInfo' in newRequest) {
9018
9033
  const phoneNumber = newRequest.phoneEnrollmentInfo.phoneNumber;
9019
9034
  const captchaResponse = newRequest.phoneEnrollmentInfo.captchaResponse;
@@ -9587,8 +9602,7 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9587
9602
  this.pollUserCancellation();
9588
9603
  }
9589
9604
  get eventId() {
9590
- var _a;
9591
- return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;
9605
+ return this.authWindow?.associatedEvent || null;
9592
9606
  }
9593
9607
  cancel() {
9594
9608
  this.reject(_createError(this.auth, "cancelled-popup-request" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));
@@ -9606,8 +9620,7 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9606
9620
  }
9607
9621
  pollUserCancellation() {
9608
9622
  const poll = () => {
9609
- var _a, _b;
9610
- if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {
9623
+ if (this.authWindow?.window?.closed) {
9611
9624
  // Make sure that there is sufficient time for whatever action to
9612
9625
  // complete. The window could have closed but the sign in network
9613
9626
  // call could still be in flight. This is specifically true for
@@ -10045,9 +10058,8 @@ class AuthEventManager {
10045
10058
  return handled;
10046
10059
  }
10047
10060
  sendToConsumer(event, consumer) {
10048
- var _a;
10049
10061
  if (event.error && !isNullRedirectEvent(event)) {
10050
- const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||
10062
+ const code = event.error.code?.split('auth/')[1] ||
10051
10063
  "internal-error" /* AuthErrorCode.INTERNAL_ERROR */;
10052
10064
  consumer.onError(_createError(this.auth, code));
10053
10065
  }
@@ -10077,7 +10089,7 @@ function eventUid(e) {
10077
10089
  }
10078
10090
  function isNullRedirectEvent({ type, error }) {
10079
10091
  return (type === "unknown" /* AuthEventType.UNKNOWN */ &&
10080
- (error === null || error === void 0 ? void 0 : error.code) === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10092
+ error?.code === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10081
10093
  }
10082
10094
  function isRedirectEvent(event) {
10083
10095
  switch (event.type) {
@@ -10142,7 +10154,7 @@ async function _validateOrigin(auth) {
10142
10154
  return;
10143
10155
  }
10144
10156
  }
10145
- catch (_a) {
10157
+ catch {
10146
10158
  // Do nothing if there's a URL error; just continue searching
10147
10159
  }
10148
10160
  }
@@ -10205,7 +10217,7 @@ function resetUnloadedGapiModules() {
10205
10217
  // Get gapix.beacon context.
10206
10218
  const beacon = _window().___jsl;
10207
10219
  // Get current hint.
10208
- if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {
10220
+ if (beacon?.H) {
10209
10221
  // Get gapi hint.
10210
10222
  for (const hint of Object.keys(beacon.H)) {
10211
10223
  // Requested modules.
@@ -10226,7 +10238,6 @@ function resetUnloadedGapiModules() {
10226
10238
  }
10227
10239
  function loadGapi(auth) {
10228
10240
  return new Promise((resolve, reject) => {
10229
- var _a, _b, _c;
10230
10241
  // Function to run when gapi.load is ready.
10231
10242
  function loadGapiIframe() {
10232
10243
  // The developer may have tried to previously run gapi.load and failed.
@@ -10249,11 +10260,11 @@ function loadGapi(auth) {
10249
10260
  timeout: NETWORK_TIMEOUT.get()
10250
10261
  });
10251
10262
  }
10252
- if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {
10263
+ if (_window().gapi?.iframes?.Iframe) {
10253
10264
  // If gapi.iframes.Iframe available, resolve.
10254
10265
  resolve(gapi.iframes.getContext());
10255
10266
  }
10256
- else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {
10267
+ else if (!!_window().gapi?.load) {
10257
10268
  // Gapi loader ready, load gapi.iframes.
10258
10269
  loadGapiIframe();
10259
10270
  }
@@ -10426,8 +10437,13 @@ function _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT)
10426
10437
  const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();
10427
10438
  const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();
10428
10439
  let target = '';
10429
- const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), { width: width.toString(), height: height.toString(), top,
10430
- left });
10440
+ const options = {
10441
+ ...BASE_POPUP_OPTIONS,
10442
+ width: width.toString(),
10443
+ height: height.toString(),
10444
+ top,
10445
+ left
10446
+ };
10431
10447
  // Chrome iOS 7 and 8 is returning an undefined popup win when target is
10432
10448
  // specified, even though the popup is not necessarily blocked.
10433
10449
  const ua = getUA().toLowerCase();
@@ -10587,8 +10603,7 @@ class BrowserPopupRedirectResolver {
10587
10603
  // Wrapping in async even though we don't await anywhere in order
10588
10604
  // to make sure errors are raised as promise rejections
10589
10605
  async _openPopup(auth, provider, authType, eventId) {
10590
- var _a;
10591
- debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');
10606
+ debugAssert(this.eventManagers[auth._key()]?.manager, '_initialize() not called before _openPopup()');
10592
10607
  const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);
10593
10608
  return _open(auth, url, _generateEventId());
10594
10609
  }
@@ -10623,7 +10638,7 @@ class BrowserPopupRedirectResolver {
10623
10638
  const iframe = await _openIframe(auth);
10624
10639
  const manager = new AuthEventManager(auth);
10625
10640
  iframe.register('authEvent', (iframeEvent) => {
10626
- _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10641
+ _assert(iframeEvent?.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10627
10642
  // TODO: Consider splitting redirect and popup events earlier on
10628
10643
  const handled = manager.onEvent(iframeEvent.authEvent);
10629
10644
  return { status: handled ? "ACK" /* GapiOutcome.ACK */ : "ERROR" /* GapiOutcome.ERROR */ };
@@ -10635,8 +10650,7 @@ class BrowserPopupRedirectResolver {
10635
10650
  _isIframeWebStorageSupported(auth, cb) {
10636
10651
  const iframe = this.iframes[auth._key()];
10637
10652
  iframe.send(WEB_STORAGE_SUPPORT_KEY, { type: WEB_STORAGE_SUPPORT_KEY }, result => {
10638
- var _a;
10639
- const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];
10653
+ const isSupported = result?.[0]?.[WEB_STORAGE_SUPPORT_KEY];
10640
10654
  if (isSupported !== undefined) {
10641
10655
  cb(!!isSupported);
10642
10656
  }
@@ -10779,9 +10793,8 @@ class TotpMultiFactorGenerator {
10779
10793
  * @returns A promise to {@link TotpSecret}.
10780
10794
  */
10781
10795
  static async generateSecret(session) {
10782
- var _a;
10783
10796
  const mfaSession = session;
10784
- _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10797
+ _assert(typeof mfaSession.user?.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10785
10798
  const response = await startEnrollTotpMfa(mfaSession.user.auth, {
10786
10799
  idToken: mfaSession.credential,
10787
10800
  totpEnrollmentInfo: {}
@@ -10865,14 +10878,13 @@ class TotpSecret {
10865
10878
  * @returns A QR code URL string.
10866
10879
  */
10867
10880
  generateQrCodeUrl(accountName, issuer) {
10868
- var _a;
10869
10881
  let useDefaults = false;
10870
10882
  if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
10871
10883
  useDefaults = true;
10872
10884
  }
10873
10885
  if (useDefaults) {
10874
10886
  if (_isEmptyString(accountName)) {
10875
- accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';
10887
+ accountName = this.auth.currentUser?.email || 'unknownuser';
10876
10888
  }
10877
10889
  if (_isEmptyString(issuer)) {
10878
10890
  issuer = this.auth.name;
@@ -10883,11 +10895,11 @@ class TotpSecret {
10883
10895
  }
10884
10896
  /** @internal */
10885
10897
  function _isEmptyString(input) {
10886
- return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
10898
+ return typeof input === 'undefined' || input?.length === 0;
10887
10899
  }
10888
10900
 
10889
10901
  var name = "@firebase/auth";
10890
- var version = "1.10.7";
10902
+ var version = "1.10.8-canary.25b60fdaa";
10891
10903
 
10892
10904
  /**
10893
10905
  * @license
@@ -10911,9 +10923,8 @@ class AuthInterop {
10911
10923
  this.internalListeners = new Map();
10912
10924
  }
10913
10925
  getUid() {
10914
- var _a;
10915
10926
  this.assertAuthConfigured();
10916
- return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
10927
+ return this.auth.currentUser?.uid || null;
10917
10928
  }
10918
10929
  async getToken(forceRefresh) {
10919
10930
  this.assertAuthConfigured();
@@ -10930,7 +10941,7 @@ class AuthInterop {
10930
10941
  return;
10931
10942
  }
10932
10943
  const unsubscribe = this.auth.onIdTokenChanged(user => {
10933
- listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
10944
+ listener(user?.stsTokenManager.accessToken || null);
10934
10945
  });
10935
10946
  this.internalListeners.set(listener, unsubscribe);
10936
10947
  this.updateProactiveRefresh();
@@ -11029,8 +11040,8 @@ function registerAuth(clientPlatform) {
11029
11040
  return (auth => new AuthInterop(auth))(auth);
11030
11041
  }, "PRIVATE" /* ComponentType.PRIVATE */).setInstantiationMode("EXPLICIT" /* InstantiationMode.EXPLICIT */));
11031
11042
  registerVersion(name, version, getVersionForPlatform(clientPlatform));
11032
- // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
11033
- registerVersion(name, version, 'esm2017');
11043
+ // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
11044
+ registerVersion(name, version, 'esm2020');
11034
11045
  }
11035
11046
 
11036
11047
  /**
@@ -11060,7 +11071,7 @@ const mintCookieFactory = (url) => async (user) => {
11060
11071
  return;
11061
11072
  }
11062
11073
  // Specifically trip null => undefined when logged out, to delete any existing cookie
11063
- const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
11074
+ const idToken = idTokenResult?.token;
11064
11075
  if (lastPostedIdToken === idToken) {
11065
11076
  return;
11066
11077
  }
@@ -11115,8 +11126,7 @@ function getAuth(app = getApp()) {
11115
11126
  return auth;
11116
11127
  }
11117
11128
  function getScriptParentElement() {
11118
- var _a, _b;
11119
- return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;
11129
+ return document.getElementsByTagName('head')?.[0] ?? document;
11120
11130
  }
11121
11131
  _setExternalJSProvider({
11122
11132
  loadJS(url) {
@@ -11142,4 +11152,4 @@ _setExternalJSProvider({
11142
11152
  registerAuth("Browser" /* ClientPlatform.BROWSER */);
11143
11153
 
11144
11154
  export { SAMLAuthProvider as $, ActionCodeOperation as A, useDeviceLanguage as B, updateCurrentUser as C, signOut as D, revokeAccessToken as E, FactorId as F, deleteUser as G, debugErrorMap as H, prodErrorMap as I, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as J, initializeAuth as K, connectAuthEmulator as L, AuthCredential as M, EmailAuthCredential as N, OperationType as O, PhoneAuthProvider as P, OAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, PhoneAuthCredential as U, inMemoryPersistence as V, EmailAuthProvider as W, FacebookAuthProvider as X, GoogleAuthProvider as Y, GithubAuthProvider as Z, OAuthProvider as _, browserCookiePersistence as a, TwitterAuthProvider as a0, signInAnonymously as a1, signInWithCredential as a2, linkWithCredential as a3, reauthenticateWithCredential as a4, signInWithCustomToken as a5, sendPasswordResetEmail as a6, confirmPasswordReset as a7, applyActionCode as a8, checkActionCode as a9, _getProjectConfig as aA, _isIOS7Or8 as aB, _createError as aC, _assert as aD, AuthEventManager as aE, _getInstance as aF, _persistenceKeyName as aG, _getRedirectResult as aH, _overrideRedirectResult as aI, _clearRedirectOutcomes as aJ, _castAuth as aK, UserImpl as aL, AuthImpl as aM, _getClientVersion as aN, _generateEventId as aO, AuthPopup as aP, FetchProvider as aQ, SAMLAuthCredential as aR, verifyPasswordResetCode as aa, createUserWithEmailAndPassword as ab, signInWithEmailAndPassword as ac, sendSignInLinkToEmail as ad, isSignInWithEmailLink as ae, signInWithEmailLink as af, fetchSignInMethodsForEmail as ag, sendEmailVerification as ah, verifyBeforeUpdateEmail as ai, ActionCodeURL as aj, parseActionCodeURL as ak, updateProfile as al, updateEmail as am, updatePassword as an, getIdToken as ao, getIdTokenResult as ap, unlink as aq, getAdditionalUserInfo as ar, reload as as, getMultiFactorResolver as at, multiFactor as au, debugAssert as av, _isIOS as aw, _isAndroid as ax, _fail as ay, _getRedirectUrl as az, browserLocalPersistence as b, browserSessionPersistence as c, signInWithPopup as d, linkWithPopup as e, reauthenticateWithPopup as f, signInWithRedirect as g, linkWithRedirect as h, indexedDBLocalPersistence as i, reauthenticateWithRedirect as j, getRedirectResult as k, linkWithPhoneNumber as l, browserPopupRedirectResolver as m, PhoneMultiFactorGenerator as n, TotpSecret as o, getAuth as p, ProviderId as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, setPersistence as t, updatePhoneNumber as u, initializeRecaptchaConfig as v, validatePassword as w, onIdTokenChanged as x, beforeAuthStateChanged as y, onAuthStateChanged as z };
11145
- //# sourceMappingURL=index-8e6e89cb.js.map
11155
+ //# sourceMappingURL=index-9070a94b.js.map