@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
@@ -3,7 +3,6 @@
3
3
  var app = require('@firebase/app');
4
4
  var util = require('@firebase/util');
5
5
  var logger = require('@firebase/logger');
6
- var tslib = require('tslib');
7
6
  var component = require('@firebase/component');
8
7
 
9
8
  /**
@@ -479,7 +478,10 @@ function _createError(authOrCode, ...rest) {
479
478
  return createErrorInternal(authOrCode, ...rest);
480
479
  }
481
480
  function _errorWithCustomMessage(auth, code, message) {
482
- const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
481
+ const errorMap = {
482
+ ...prodErrorMap(),
483
+ [code]: message
484
+ };
483
485
  const factory = new util.ErrorFactory('auth', 'Firebase', errorMap);
484
486
  return factory.create(code, {
485
487
  appName: auth.name
@@ -560,15 +562,13 @@ function debugAssert(assertion, message) {
560
562
  * limitations under the License.
561
563
  */
562
564
  function _getCurrentUrl() {
563
- var _a;
564
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';
565
+ return (typeof self !== 'undefined' && self.location?.href) || '';
565
566
  }
566
567
  function _isHttpOrHttps() {
567
568
  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';
568
569
  }
569
570
  function _getCurrentScheme() {
570
- var _a;
571
- return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;
571
+ return (typeof self !== 'undefined' && self.location?.protocol) || null;
572
572
  }
573
573
 
574
574
  /**
@@ -882,7 +882,10 @@ const CookieAuthProxiedEndpoints = [
882
882
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
883
883
  function _addTidIfNecessary(auth, request) {
884
884
  if (auth.tenantId && !request.tenantId) {
885
- return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });
885
+ return {
886
+ ...request,
887
+ tenantId: auth.tenantId
888
+ };
886
889
  }
887
890
  return request;
888
891
  }
@@ -900,14 +903,20 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
900
903
  };
901
904
  }
902
905
  }
903
- const query = util.querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
906
+ const query = util.querystring({
907
+ key: auth.config.apiKey,
908
+ ...params
909
+ }).slice(1);
904
910
  const headers = await auth._getAdditionalHeaders();
905
911
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
906
912
  if (auth.languageCode) {
907
913
  headers["X-Firebase-Locale" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;
908
914
  }
909
- const fetchArgs = Object.assign({ method,
910
- headers }, body);
915
+ const fetchArgs = {
916
+ method,
917
+ headers,
918
+ ...body
919
+ };
911
920
  /* Security-conscious server-side frameworks tend to have built in mitigations for referrer
912
921
  problems". See the Cloudflare GitHub issue #487: Error: The 'referrerPolicy' field on
913
922
  'RequestInitializerDict' is not implemented."
@@ -923,7 +932,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
923
932
  }
924
933
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
925
934
  auth._canInitEmulator = false;
926
- const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);
935
+ const errorMap = { ...SERVER_ERROR_MAP, ...customErrorMap };
927
936
  try {
928
937
  const networkTimeout = new NetworkTimeout(auth);
929
938
  const response = await Promise.race([
@@ -1264,7 +1273,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1264
1273
  const claims = _parseToken(token);
1265
1274
  _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1266
1275
  const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;
1267
- const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];
1276
+ const signInProvider = firebase?.['sign_in_provider'];
1268
1277
  return {
1269
1278
  claims,
1270
1279
  token,
@@ -1272,7 +1281,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1272
1281
  issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),
1273
1282
  expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),
1274
1283
  signInProvider: signInProvider || null,
1275
- signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null
1284
+ signInSecondFactor: firebase?.['sign_in_second_factor'] || null
1276
1285
  };
1277
1286
  }
1278
1287
  function secondsStringToMilliseconds(seconds) {
@@ -1295,7 +1304,7 @@ function _parseToken(token) {
1295
1304
  return JSON.parse(decoded);
1296
1305
  }
1297
1306
  catch (e) {
1298
- _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());
1307
+ _logError('Caught error parsing JWT payload as JSON', e?.toString());
1299
1308
  return null;
1300
1309
  }
1301
1310
  }
@@ -1391,7 +1400,6 @@ class ProactiveRefresh {
1391
1400
  }
1392
1401
  }
1393
1402
  getInterval(wasError) {
1394
- var _a;
1395
1403
  if (wasError) {
1396
1404
  const interval = this.errorBackoff;
1397
1405
  this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);
@@ -1400,7 +1408,7 @@ class ProactiveRefresh {
1400
1408
  else {
1401
1409
  // Reset the error backoff
1402
1410
  this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;
1403
- const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;
1411
+ const expTime = this.user.stsTokenManager.expirationTime ?? 0;
1404
1412
  const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;
1405
1413
  return Math.max(0, interval);
1406
1414
  }
@@ -1421,7 +1429,7 @@ class ProactiveRefresh {
1421
1429
  }
1422
1430
  catch (e) {
1423
1431
  // Only retry on network errors
1424
- if ((e === null || e === void 0 ? void 0 : e.code) ===
1432
+ if (e?.code ===
1425
1433
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
1426
1434
  this.schedule(/* wasError */ true);
1427
1435
  }
@@ -1487,14 +1495,13 @@ class UserMetadata {
1487
1495
  * limitations under the License.
1488
1496
  */
1489
1497
  async function _reloadWithoutSaving(user) {
1490
- var _a;
1491
1498
  const auth = user.auth;
1492
1499
  const idToken = await user.getIdToken();
1493
1500
  const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));
1494
- _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1501
+ _assert(response?.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1495
1502
  const coreAccount = response.users[0];
1496
1503
  user._notifyReloadListener(coreAccount);
1497
- const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)
1504
+ const newProviderData = coreAccount.providerUserInfo?.length
1498
1505
  ? extractProviderData(coreAccount.providerUserInfo)
1499
1506
  : [];
1500
1507
  const providerData = mergeProviderData(user.providerData, newProviderData);
@@ -1504,7 +1511,7 @@ async function _reloadWithoutSaving(user) {
1504
1511
  // On the other hand, if it was not anonymous before, it should never be
1505
1512
  // considered anonymous now.
1506
1513
  const oldIsAnonymous = user.isAnonymous;
1507
- const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1514
+ const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !providerData?.length;
1508
1515
  const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;
1509
1516
  const updates = {
1510
1517
  uid: coreAccount.localId,
@@ -1541,8 +1548,7 @@ function mergeProviderData(original, newData) {
1541
1548
  return [...deduped, ...newData];
1542
1549
  }
1543
1550
  function extractProviderData(providers) {
1544
- return providers.map((_a) => {
1545
- var { providerId } = _a, provider = tslib.__rest(_a, ["providerId"]);
1551
+ return providers.map(({ providerId, ...provider }) => {
1546
1552
  return {
1547
1553
  providerId,
1548
1554
  uid: provider.rawId || '',
@@ -1734,8 +1740,7 @@ function assertStringOrUndefined(assertion, appName) {
1734
1740
  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { appName });
1735
1741
  }
1736
1742
  class UserImpl {
1737
- constructor(_a) {
1738
- var { uid, auth, stsTokenManager } = _a, opt = tslib.__rest(_a, ["uid", "auth", "stsTokenManager"]);
1743
+ constructor({ uid, auth, stsTokenManager, ...opt }) {
1739
1744
  // For the user object, provider is always Firebase.
1740
1745
  this.providerId = "firebase" /* ProviderId.FIREBASE */;
1741
1746
  this.proactiveRefresh = new ProactiveRefresh(this);
@@ -1783,12 +1788,16 @@ class UserImpl {
1783
1788
  this.phoneNumber = user.phoneNumber;
1784
1789
  this.isAnonymous = user.isAnonymous;
1785
1790
  this.tenantId = user.tenantId;
1786
- this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));
1791
+ this.providerData = user.providerData.map(userInfo => ({ ...userInfo }));
1787
1792
  this.metadata._copy(user.metadata);
1788
1793
  this.stsTokenManager._assign(user.stsTokenManager);
1789
1794
  }
1790
1795
  _clone(auth) {
1791
- const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));
1796
+ const newUser = new UserImpl({
1797
+ ...this,
1798
+ auth,
1799
+ stsTokenManager: this.stsTokenManager._clone()
1800
+ });
1792
1801
  newUser.metadata._copy(this.metadata);
1793
1802
  return newUser;
1794
1803
  }
@@ -1843,26 +1852,40 @@ class UserImpl {
1843
1852
  return this.auth.signOut();
1844
1853
  }
1845
1854
  toJSON() {
1846
- 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(),
1855
+ return {
1856
+ uid: this.uid,
1857
+ email: this.email || undefined,
1858
+ emailVerified: this.emailVerified,
1859
+ displayName: this.displayName || undefined,
1860
+ isAnonymous: this.isAnonymous,
1861
+ photoURL: this.photoURL || undefined,
1862
+ phoneNumber: this.phoneNumber || undefined,
1863
+ tenantId: this.tenantId || undefined,
1864
+ providerData: this.providerData.map(userInfo => ({ ...userInfo })),
1865
+ stsTokenManager: this.stsTokenManager.toJSON(),
1847
1866
  // Redirect event ID must be maintained in case there is a pending
1848
1867
  // redirect event.
1849
- _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), {
1868
+ _redirectEventId: this._redirectEventId,
1869
+ ...this.metadata.toJSON(),
1850
1870
  // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):
1851
- apiKey: this.auth.config.apiKey, appName: this.auth.name });
1871
+ apiKey: this.auth.config.apiKey,
1872
+ appName: this.auth.name
1873
+ // Missing authDomain will be tolerated by the legacy SDK.
1874
+ // stsTokenManager.apiKey isn't actually required (despite the legacy SDK persisting it).
1875
+ };
1852
1876
  }
1853
1877
  get refreshToken() {
1854
1878
  return this.stsTokenManager.refreshToken || '';
1855
1879
  }
1856
1880
  static _fromJSON(auth, object) {
1857
- var _a, _b, _c, _d, _e, _f, _g, _h;
1858
- const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;
1859
- const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;
1860
- const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;
1861
- const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;
1862
- const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;
1863
- const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;
1864
- const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
1865
- const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;
1881
+ const displayName = object.displayName ?? undefined;
1882
+ const email = object.email ?? undefined;
1883
+ const phoneNumber = object.phoneNumber ?? undefined;
1884
+ const photoURL = object.photoURL ?? undefined;
1885
+ const tenantId = object.tenantId ?? undefined;
1886
+ const _redirectEventId = object._redirectEventId ?? undefined;
1887
+ const createdAt = object.createdAt ?? undefined;
1888
+ const lastLoginAt = object.lastLoginAt ?? undefined;
1866
1889
  const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;
1867
1890
  _assert(uid && plainObjectTokenManager, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1868
1891
  const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);
@@ -1892,7 +1915,7 @@ class UserImpl {
1892
1915
  lastLoginAt
1893
1916
  });
1894
1917
  if (providerData && Array.isArray(providerData)) {
1895
- user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));
1918
+ user.providerData = providerData.map(userInfo => ({ ...userInfo }));
1896
1919
  }
1897
1920
  if (_redirectEventId) {
1898
1921
  user._redirectEventId = _redirectEventId;
@@ -1929,7 +1952,7 @@ class UserImpl {
1929
1952
  const providerData = coreAccount.providerUserInfo !== undefined
1930
1953
  ? extractProviderData(coreAccount.providerUserInfo)
1931
1954
  : [];
1932
- const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1955
+ const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;
1933
1956
  const stsTokenManager = new StsTokenManager();
1934
1957
  stsTokenManager.updateFromIdToken(idToken);
1935
1958
  // Initialize the Firebase Auth user.
@@ -1951,7 +1974,7 @@ class UserImpl {
1951
1974
  providerData,
1952
1975
  metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
1953
1976
  isAnonymous: !(coreAccount.email && coreAccount.passwordHash) &&
1954
- !(providerData === null || providerData === void 0 ? void 0 : providerData.length)
1977
+ !providerData?.length
1955
1978
  };
1956
1979
  Object.assign(user, updates);
1957
1980
  return user;
@@ -2150,7 +2173,7 @@ class PersistenceUserManager {
2150
2173
  break;
2151
2174
  }
2152
2175
  }
2153
- catch (_a) { }
2176
+ catch { }
2154
2177
  }
2155
2178
  // If we find the user in a persistence that does support migration, use
2156
2179
  // that migration path (of only persistences that support migration)
@@ -2173,7 +2196,7 @@ class PersistenceUserManager {
2173
2196
  try {
2174
2197
  await persistence._remove(key);
2175
2198
  }
2176
- catch (_a) { }
2199
+ catch { }
2177
2200
  }
2178
2201
  }));
2179
2202
  return new PersistenceUserManager(selectedPersistence, auth, userKey);
@@ -2243,7 +2266,7 @@ function _getBrowserName(userAgent) {
2243
2266
  // Most modern browsers have name/version at end of user agent string.
2244
2267
  const re = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/;
2245
2268
  const matches = userAgent.match(re);
2246
- if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {
2269
+ if (matches?.length === 2) {
2247
2270
  return matches[1];
2248
2271
  }
2249
2272
  }
@@ -2283,8 +2306,7 @@ function _isIOS7Or8(ua = util.getUA()) {
2283
2306
  /(iPad|iPhone|iPod).*OS 8_\d/i.test(ua));
2284
2307
  }
2285
2308
  function _isIOSStandalone(ua = util.getUA()) {
2286
- var _a;
2287
- return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);
2309
+ return _isIOS(ua) && !!window.navigator?.standalone;
2288
2310
  }
2289
2311
  function _isIE10() {
2290
2312
  return util.isIE() && document.documentMode === 10;
@@ -2415,7 +2437,7 @@ class AuthMiddlewareQueue {
2415
2437
  }
2416
2438
  }
2417
2439
  throw this.auth._errorFactory.create("login-blocked" /* AuthErrorCode.LOGIN_BLOCKED */, {
2418
- originalMessage: e === null || e === void 0 ? void 0 : e.message
2440
+ originalMessage: e?.message
2419
2441
  });
2420
2442
  }
2421
2443
  }
@@ -2473,13 +2495,12 @@ const MINIMUM_MIN_PASSWORD_LENGTH = 6;
2473
2495
  */
2474
2496
  class PasswordPolicyImpl {
2475
2497
  constructor(response) {
2476
- var _a, _b, _c, _d;
2477
2498
  // Only include custom strength options defined in the response.
2478
2499
  const responseOptions = response.customStrengthOptions;
2479
2500
  this.customStrengthOptions = {};
2480
2501
  // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
2481
2502
  this.customStrengthOptions.minPasswordLength =
2482
- (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
2503
+ responseOptions.minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH;
2483
2504
  if (responseOptions.maxPasswordLength) {
2484
2505
  this.customStrengthOptions.maxPasswordLength =
2485
2506
  responseOptions.maxPasswordLength;
@@ -2506,12 +2527,11 @@ class PasswordPolicyImpl {
2506
2527
  }
2507
2528
  // Use an empty string if no non-alphanumeric characters are specified in the response.
2508
2529
  this.allowedNonAlphanumericCharacters =
2509
- (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';
2510
- this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
2530
+ response.allowedNonAlphanumericCharacters?.join('') ?? '';
2531
+ this.forceUpgradeOnSignin = response.forceUpgradeOnSignin ?? false;
2511
2532
  this.schemaVersion = response.schemaVersion;
2512
2533
  }
2513
2534
  validatePassword(password) {
2514
- var _a, _b, _c, _d, _e, _f;
2515
2535
  const status = {
2516
2536
  isValid: true,
2517
2537
  passwordPolicy: this
@@ -2520,12 +2540,12 @@ class PasswordPolicyImpl {
2520
2540
  this.validatePasswordLengthOptions(password, status);
2521
2541
  this.validatePasswordCharacterOptions(password, status);
2522
2542
  // Combine the status into single isValid property.
2523
- status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
2524
- status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
2525
- status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
2526
- status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
2527
- status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
2528
- status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
2543
+ status.isValid && (status.isValid = status.meetsMinPasswordLength ?? true);
2544
+ status.isValid && (status.isValid = status.meetsMaxPasswordLength ?? true);
2545
+ status.isValid && (status.isValid = status.containsLowercaseLetter ?? true);
2546
+ status.isValid && (status.isValid = status.containsUppercaseLetter ?? true);
2547
+ status.isValid && (status.isValid = status.containsNumericCharacter ?? true);
2548
+ status.isValid && (status.isValid = status.containsNonAlphanumericCharacter ?? true);
2529
2549
  return status;
2530
2550
  }
2531
2551
  /**
@@ -2662,18 +2682,17 @@ class AuthImpl {
2662
2682
  // Have to check for app deletion throughout initialization (after each
2663
2683
  // promise resolution)
2664
2684
  this._initializationPromise = this.queue(async () => {
2665
- var _a, _b, _c;
2666
2685
  if (this._deleted) {
2667
2686
  return;
2668
2687
  }
2669
2688
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
2670
- (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
2689
+ this._resolvePersistenceManagerAvailable?.();
2671
2690
  if (this._deleted) {
2672
2691
  return;
2673
2692
  }
2674
2693
  // Initialize the resolver early if necessary (only applicable to web:
2675
2694
  // this will cause the iframe to load immediately in certain cases)
2676
- if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
2695
+ if (this._popupRedirectResolver?._shouldInitProactively) {
2677
2696
  // If this fails, don't halt auth loading
2678
2697
  try {
2679
2698
  await this._popupRedirectResolver._initialize(this);
@@ -2683,7 +2702,7 @@ class AuthImpl {
2683
2702
  }
2684
2703
  }
2685
2704
  await this.initializeCurrentUser(popupRedirectResolver);
2686
- this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2705
+ this.lastNotifiedUid = this.currentUser?.uid || null;
2687
2706
  if (this._deleted) {
2688
2707
  return;
2689
2708
  }
@@ -2728,7 +2747,6 @@ class AuthImpl {
2728
2747
  }
2729
2748
  }
2730
2749
  async initializeCurrentUser(popupRedirectResolver) {
2731
- var _a;
2732
2750
  if (app._isFirebaseServerApp(this.app)) {
2733
2751
  const idToken = this.app.settings.authIdToken;
2734
2752
  if (idToken) {
@@ -2748,15 +2766,15 @@ class AuthImpl {
2748
2766
  let needsTocheckMiddleware = false;
2749
2767
  if (popupRedirectResolver && this.config.authDomain) {
2750
2768
  await this.getOrInitRedirectPersistenceManager();
2751
- const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;
2752
- const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;
2769
+ const redirectUserEventId = this.redirectUser?._redirectEventId;
2770
+ const storedUserEventId = futureCurrentUser?._redirectEventId;
2753
2771
  const result = await this.tryRedirectSignIn(popupRedirectResolver);
2754
2772
  // If the stored user (i.e. the old "currentUser") has a redirectId that
2755
2773
  // matches the redirect user, then we want to initially sign in with the
2756
2774
  // new user object from result.
2757
2775
  // TODO(samgho): More thoroughly test all of this
2758
2776
  if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&
2759
- (result === null || result === void 0 ? void 0 : result.user)) {
2777
+ result?.user) {
2760
2778
  futureCurrentUser = result.user;
2761
2779
  needsTocheckMiddleware = true;
2762
2780
  }
@@ -2831,7 +2849,7 @@ class AuthImpl {
2831
2849
  await _reloadWithoutSaving(user);
2832
2850
  }
2833
2851
  catch (e) {
2834
- if ((e === null || e === void 0 ? void 0 : e.code) !==
2852
+ if (e?.code !==
2835
2853
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
2836
2854
  // Something's wrong with the user's token. Log them out and remove
2837
2855
  // them from storage
@@ -2988,12 +3006,11 @@ class AuthImpl {
2988
3006
  }
2989
3007
  }
2990
3008
  toJSON() {
2991
- var _a;
2992
3009
  return {
2993
3010
  apiKey: this.config.apiKey,
2994
3011
  authDomain: this.config.authDomain,
2995
3012
  appName: this.name,
2996
- currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()
3013
+ currentUser: this._currentUser?.toJSON()
2997
3014
  };
2998
3015
  }
2999
3016
  async _setRedirectUser(user, popupRedirectResolver) {
@@ -3014,16 +3031,15 @@ class AuthImpl {
3014
3031
  return this.redirectPersistenceManager;
3015
3032
  }
3016
3033
  async _redirectUserForId(id) {
3017
- var _a, _b;
3018
3034
  // Make sure we've cleared any pending persistence actions if we're not in
3019
3035
  // the initializer
3020
3036
  if (this._isInitialized) {
3021
3037
  await this.queue(async () => { });
3022
3038
  }
3023
- if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {
3039
+ if (this._currentUser?._redirectEventId === id) {
3024
3040
  return this._currentUser;
3025
3041
  }
3026
- if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {
3042
+ if (this.redirectUser?._redirectEventId === id) {
3027
3043
  return this.redirectUser;
3028
3044
  }
3029
3045
  return null;
@@ -3059,12 +3075,11 @@ class AuthImpl {
3059
3075
  return this.currentUser;
3060
3076
  }
3061
3077
  notifyAuthListeners() {
3062
- var _a, _b;
3063
3078
  if (!this._isInitialized) {
3064
3079
  return;
3065
3080
  }
3066
3081
  this.idTokenSubscription.next(this.currentUser);
3067
- const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;
3082
+ const currentUid = this.currentUser?.uid ?? null;
3068
3083
  if (this.lastNotifiedUid !== currentUid) {
3069
3084
  this.lastNotifiedUid = currentUid;
3070
3085
  this.authStateSubscription.next(this.currentUser);
@@ -3149,7 +3164,6 @@ class AuthImpl {
3149
3164
  return this.frameworks;
3150
3165
  }
3151
3166
  async _getAdditionalHeaders() {
3152
- var _a;
3153
3167
  // Additional headers on every request
3154
3168
  const headers = {
3155
3169
  ["X-Client-Version" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion
@@ -3158,10 +3172,11 @@ class AuthImpl {
3158
3172
  headers["X-Firebase-gmpid" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;
3159
3173
  }
3160
3174
  // If the heartbeat service exists, add the heartbeat string
3161
- const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
3175
+ const heartbeatsHeader = await this.heartbeatServiceProvider
3162
3176
  .getImmediate({
3163
3177
  optional: true
3164
- })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
3178
+ })
3179
+ ?.getHeartbeatsHeader();
3165
3180
  if (heartbeatsHeader) {
3166
3181
  headers["X-Firebase-Client" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;
3167
3182
  }
@@ -3173,20 +3188,20 @@ class AuthImpl {
3173
3188
  return headers;
3174
3189
  }
3175
3190
  async _getAppCheckToken() {
3176
- var _a;
3177
3191
  if (app._isFirebaseServerApp(this.app) && this.app.settings.appCheckToken) {
3178
3192
  return this.app.settings.appCheckToken;
3179
3193
  }
3180
- const appCheckTokenResult = await ((_a = this.appCheckServiceProvider
3181
- .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
3182
- if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
3194
+ const appCheckTokenResult = await this.appCheckServiceProvider
3195
+ .getImmediate({ optional: true })
3196
+ ?.getToken();
3197
+ if (appCheckTokenResult?.error) {
3183
3198
  // Context: appCheck.getToken() will never throw even if an error happened.
3184
3199
  // In the error case, a dummy token will be returned along with an error field describing
3185
3200
  // the error. In general, we shouldn't care about the error condition and just use
3186
3201
  // the token (actual or dummy) to send requests.
3187
3202
  _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
3188
3203
  }
3189
- return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
3204
+ return appCheckTokenResult?.token;
3190
3205
  }
3191
3206
  }
3192
3207
  /**
@@ -3286,20 +3301,17 @@ class MockReCaptcha {
3286
3301
  return id;
3287
3302
  }
3288
3303
  reset(optWidgetId) {
3289
- var _a;
3290
3304
  const id = optWidgetId || _WIDGET_ID_START;
3291
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());
3305
+ void this._widgets.get(id)?.delete();
3292
3306
  this._widgets.delete(id);
3293
3307
  }
3294
3308
  getResponse(optWidgetId) {
3295
- var _a;
3296
3309
  const id = optWidgetId || _WIDGET_ID_START;
3297
- return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';
3310
+ return this._widgets.get(id)?.getResponse() || '';
3298
3311
  }
3299
3312
  async execute(optWidgetId) {
3300
- var _a;
3301
3313
  const id = optWidgetId || _WIDGET_ID_START;
3302
- void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());
3314
+ void this._widgets.get(id)?.execute();
3303
3315
  return '';
3304
3316
  }
3305
3317
  }
@@ -3539,7 +3551,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3539
3551
  captchaResponse = await verifier.verify(action, true);
3540
3552
  }
3541
3553
  }
3542
- const newRequest = Object.assign({}, request);
3554
+ const newRequest = { ...request };
3543
3555
  if (action === "mfaSmsEnrollment" /* RecaptchaActionName.MFA_SMS_ENROLLMENT */ ||
3544
3556
  action === "mfaSmsSignIn" /* RecaptchaActionName.MFA_SMS_SIGNIN */) {
3545
3557
  if ('phoneEnrollmentInfo' in newRequest) {
@@ -3581,10 +3593,10 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3581
3593
  return newRequest;
3582
3594
  }
3583
3595
  async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
3584
- var _a, _b;
3585
3596
  if (recaptchaAuthProvider === "EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */) {
3586
- if ((_a = authInstance
3587
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3597
+ if (authInstance
3598
+ ._getRecaptchaConfig()
3599
+ ?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3588
3600
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */);
3589
3601
  return actionMethod(authInstance, requestWithRecaptcha);
3590
3602
  }
@@ -3602,13 +3614,14 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
3602
3614
  }
3603
3615
  }
3604
3616
  else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
3605
- if ((_b = authInstance
3606
- ._getRecaptchaConfig()) === null || _b === void 0 ? void 0 : _b.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3617
+ if (authInstance
3618
+ ._getRecaptchaConfig()
3619
+ ?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3607
3620
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
3608
3621
  return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
3609
- var _a;
3610
- if (((_a = authInstance
3611
- ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) === "AUDIT" /* EnforcementState.AUDIT */) {
3622
+ if (authInstance
3623
+ ._getRecaptchaConfig()
3624
+ ?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
3612
3625
  // AUDIT mode
3613
3626
  if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
3614
3627
  error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
@@ -3705,7 +3718,7 @@ function initializeAuth(app$1, deps) {
3705
3718
  if (provider.isInitialized()) {
3706
3719
  const auth = provider.getImmediate();
3707
3720
  const initialOptions = provider.getOptions();
3708
- if (util.deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
3721
+ if (util.deepEqual(initialOptions, deps ?? {})) {
3709
3722
  return auth;
3710
3723
  }
3711
3724
  else {
@@ -3716,15 +3729,15 @@ function initializeAuth(app$1, deps) {
3716
3729
  return auth;
3717
3730
  }
3718
3731
  function _initializeAuthInstance(auth, deps) {
3719
- const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
3732
+ const persistence = deps?.persistence || [];
3720
3733
  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
3721
- if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
3734
+ if (deps?.errorMap) {
3722
3735
  auth._updateErrorMap(deps.errorMap);
3723
3736
  }
3724
3737
  // This promise is intended to float; auth initialization happens in the
3725
3738
  // background, meanwhile the auth object may be used by the app.
3726
3739
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
3727
- auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
3740
+ auth._initializeWithPersistence(hierarchy, deps?.popupRedirectResolver);
3728
3741
  }
3729
3742
 
3730
3743
  /**
@@ -3752,7 +3765,7 @@ function _initializeAuthInstance(auth, deps) {
3752
3765
  function connectAuthEmulator(auth, url, options) {
3753
3766
  const authInternal = _castAuth(auth);
3754
3767
  _assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
3755
- const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
3768
+ const disableWarnings = !!options?.disableWarnings;
3756
3769
  const protocol = extractProtocol(url);
3757
3770
  const { host, port } = extractHostAndPort(url);
3758
3771
  const portStr = port === null ? '' : `:${port}`;
@@ -4078,7 +4091,7 @@ class EmailAuthCredential extends AuthCredential {
4078
4091
  */
4079
4092
  static fromJSON(json) {
4080
4093
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4081
- if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {
4094
+ if (obj?.email && obj?.password) {
4082
4095
  if (obj.signInMethod === "password" /* SignInMethod.EMAIL_PASSWORD */) {
4083
4096
  return this._fromEmailAndPassword(obj.email, obj.password);
4084
4097
  }
@@ -4238,7 +4251,7 @@ class OAuthCredential extends AuthCredential {
4238
4251
  */
4239
4252
  static fromJSON(json) {
4240
4253
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4241
- const { providerId, signInMethod } = obj, rest = tslib.__rest(obj, ["providerId", "signInMethod"]);
4254
+ const { providerId, signInMethod, ...rest } = obj;
4242
4255
  if (!providerId || !signInMethod) {
4243
4256
  return null;
4244
4257
  }
@@ -4329,7 +4342,10 @@ const VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {
4329
4342
  ["USER_NOT_FOUND" /* ServerError.USER_NOT_FOUND */]: "user-not-found" /* AuthErrorCode.USER_DELETED */
4330
4343
  };
4331
4344
  async function verifyPhoneNumberForExisting(auth, request) {
4332
- const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });
4345
+ const apiRequest = {
4346
+ ...request,
4347
+ operation: 'REAUTH'
4348
+ };
4333
4349
  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_);
4334
4350
  }
4335
4351
 
@@ -4373,7 +4389,10 @@ class PhoneAuthCredential extends AuthCredential {
4373
4389
  }
4374
4390
  /** @internal */
4375
4391
  _linkToIdToken(auth, idToken) {
4376
- return linkWithPhoneNumber$1(auth, Object.assign({ idToken }, this._makeVerificationRequest()));
4392
+ return linkWithPhoneNumber$1(auth, {
4393
+ idToken,
4394
+ ...this._makeVerificationRequest()
4395
+ });
4377
4396
  }
4378
4397
  /** @internal */
4379
4398
  _getReauthenticationResolver(auth) {
@@ -4501,19 +4520,18 @@ class ActionCodeURL {
4501
4520
  * @internal
4502
4521
  */
4503
4522
  constructor(actionLink) {
4504
- var _a, _b, _c, _d, _e, _f;
4505
4523
  const searchParams = util.querystringDecode(util.extractQuerystring(actionLink));
4506
- const apiKey = (_a = searchParams["apiKey" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;
4507
- const code = (_b = searchParams["oobCode" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;
4508
- const operation = parseMode((_c = searchParams["mode" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);
4524
+ const apiKey = searchParams["apiKey" /* QueryField.API_KEY */] ?? null;
4525
+ const code = searchParams["oobCode" /* QueryField.CODE */] ?? null;
4526
+ const operation = parseMode(searchParams["mode" /* QueryField.MODE */] ?? null);
4509
4527
  // Validate API key, code and mode.
4510
4528
  _assert(apiKey && code && operation, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4511
4529
  this.apiKey = apiKey;
4512
4530
  this.operation = operation;
4513
4531
  this.code = code;
4514
- this.continueUrl = (_d = searchParams["continueUrl" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;
4515
- this.languageCode = (_e = searchParams["lang" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;
4516
- this.tenantId = (_f = searchParams["tenantId" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;
4532
+ this.continueUrl = searchParams["continueUrl" /* QueryField.CONTINUE_URL */] ?? null;
4533
+ this.languageCode = searchParams["lang" /* QueryField.LANGUAGE_CODE */] ?? null;
4534
+ this.tenantId = searchParams["tenantId" /* QueryField.TENANT_ID */] ?? null;
4517
4535
  }
4518
4536
  /**
4519
4537
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -4529,7 +4547,7 @@ class ActionCodeURL {
4529
4547
  try {
4530
4548
  return new ActionCodeURL(actionLink);
4531
4549
  }
4532
- catch (_a) {
4550
+ catch {
4533
4551
  return null;
4534
4552
  }
4535
4553
  }
@@ -4819,13 +4837,17 @@ class OAuthProvider extends BaseOAuthProvider {
4819
4837
  * or the ID token string.
4820
4838
  */
4821
4839
  credential(params) {
4822
- return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
4840
+ return this._credential({ ...params, nonce: params.rawNonce });
4823
4841
  }
4824
4842
  /** An internal credential method that accepts more permissive options */
4825
4843
  _credential(params) {
4826
4844
  _assert(params.idToken || params.accessToken, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4827
4845
  // For OAuthCredential, sign in method is same as providerId.
4828
- return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));
4846
+ return OAuthCredential._fromParams({
4847
+ ...params,
4848
+ providerId: this.providerId,
4849
+ signInMethod: this.providerId
4850
+ });
4829
4851
  }
4830
4852
  /**
4831
4853
  * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
@@ -4977,7 +4999,7 @@ class FacebookAuthProvider extends BaseOAuthProvider {
4977
4999
  try {
4978
5000
  return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
4979
5001
  }
4980
- catch (_a) {
5002
+ catch {
4981
5003
  return null;
4982
5004
  }
4983
5005
  }
@@ -5099,7 +5121,7 @@ class GoogleAuthProvider extends BaseOAuthProvider {
5099
5121
  try {
5100
5122
  return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
5101
5123
  }
5102
- catch (_a) {
5124
+ catch {
5103
5125
  return null;
5104
5126
  }
5105
5127
  }
@@ -5210,7 +5232,7 @@ class GithubAuthProvider extends BaseOAuthProvider {
5210
5232
  try {
5211
5233
  return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
5212
5234
  }
5213
- catch (_a) {
5235
+ catch {
5214
5236
  return null;
5215
5237
  }
5216
5238
  }
@@ -5494,7 +5516,7 @@ class TwitterAuthProvider extends BaseOAuthProvider {
5494
5516
  try {
5495
5517
  return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
5496
5518
  }
5497
- catch (_a) {
5519
+ catch {
5498
5520
  return null;
5499
5521
  }
5500
5522
  }
@@ -5610,13 +5632,12 @@ function providerIdForResponse(response) {
5610
5632
  * @public
5611
5633
  */
5612
5634
  async function signInAnonymously(auth) {
5613
- var _a;
5614
5635
  if (app._isFirebaseServerApp(auth.app)) {
5615
5636
  return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(auth));
5616
5637
  }
5617
5638
  const authInternal = _castAuth(auth);
5618
5639
  await authInternal._initializationPromise;
5619
- if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {
5640
+ if (authInternal.currentUser?.isAnonymous) {
5620
5641
  // If an anonymous user is already signed in, no need to sign them in again.
5621
5642
  return new UserCredentialImpl({
5622
5643
  user: authInternal.currentUser,
@@ -5650,7 +5671,6 @@ async function signInAnonymously(auth) {
5650
5671
  */
5651
5672
  class MultiFactorError extends util.FirebaseError {
5652
5673
  constructor(auth, error, operationType, user) {
5653
- var _a;
5654
5674
  super(error.code, error.message);
5655
5675
  this.operationType = operationType;
5656
5676
  this.user = user;
@@ -5658,7 +5678,7 @@ class MultiFactorError extends util.FirebaseError {
5658
5678
  Object.setPrototypeOf(this, MultiFactorError.prototype);
5659
5679
  this.customData = {
5660
5680
  appName: auth.name,
5661
- tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
5681
+ tenantId: auth.tenantId ?? undefined,
5662
5682
  _serverResponse: error.customData._serverResponse,
5663
5683
  operationType
5664
5684
  };
@@ -5789,7 +5809,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
5789
5809
  }
5790
5810
  catch (e) {
5791
5811
  // Convert user deleted error into user mismatch
5792
- if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5812
+ if (e?.code === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5793
5813
  _fail(auth, "user-mismatch" /* AuthErrorCode.USER_MISMATCH */);
5794
5814
  }
5795
5815
  throw e;
@@ -6014,8 +6034,7 @@ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
6014
6034
  * limitations under the License.
6015
6035
  */
6016
6036
  function _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {
6017
- var _a;
6018
- _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6037
+ _assert(actionCodeSettings.url?.length > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6019
6038
  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||
6020
6039
  actionCodeSettings.dynamicLinkDomain.length > 0, auth, "invalid-dynamic-link-domain" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);
6021
6040
  _assert(typeof actionCodeSettings.linkDomain === 'undefined' ||
@@ -6376,7 +6395,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
6376
6395
  */
6377
6396
  function isSignInWithEmailLink(auth, emailLink) {
6378
6397
  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);
6379
- return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6398
+ return actionCodeUrl?.operation === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6380
6399
  }
6381
6400
  /**
6382
6401
  * Asynchronously signs in using an email and sign-in email link.
@@ -6749,7 +6768,6 @@ async function updateEmailOrPassword(user, email, password) {
6749
6768
  *
6750
6769
  */
6751
6770
  function _fromIdTokenResponse(idTokenResponse) {
6752
- var _a, _b;
6753
6771
  if (!idTokenResponse) {
6754
6772
  return null;
6755
6773
  }
@@ -6759,8 +6777,8 @@ function _fromIdTokenResponse(idTokenResponse) {
6759
6777
  : {};
6760
6778
  const isNewUser = idTokenResponse.isNewUser ||
6761
6779
  idTokenResponse.kind === "identitytoolkit#SignupNewUserResponse" /* IdTokenResponseKind.SignupNewUser */;
6762
- if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {
6763
- 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'];
6780
+ if (!providerId && idTokenResponse?.idToken) {
6781
+ const signInProvider = _parseToken(idTokenResponse.idToken)?.firebase?.['sign_in_provider'];
6764
6782
  if (signInProvider) {
6765
6783
  const filteredProviderId = signInProvider !== "anonymous" /* ProviderId.ANONYMOUS */ &&
6766
6784
  signInProvider !== "custom" /* ProviderId.CUSTOM */
@@ -6809,7 +6827,7 @@ class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {
6809
6827
  }
6810
6828
  class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {
6811
6829
  constructor(isNewUser, profile) {
6812
- 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);
6830
+ super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof profile?.login === 'string' ? profile?.login : null);
6813
6831
  }
6814
6832
  }
6815
6833
  class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {
@@ -7109,12 +7127,11 @@ class MultiFactorSessionImpl {
7109
7127
  };
7110
7128
  }
7111
7129
  static fromJSON(obj) {
7112
- var _a, _b;
7113
- if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {
7114
- if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {
7130
+ if (obj?.multiFactorSession) {
7131
+ if (obj.multiFactorSession?.pendingCredential) {
7115
7132
  return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);
7116
7133
  }
7117
- else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {
7134
+ else if (obj.multiFactorSession?.idToken) {
7118
7135
  return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);
7119
7136
  }
7120
7137
  }
@@ -7157,7 +7174,11 @@ class MultiFactorResolverImpl {
7157
7174
  delete serverResponse.mfaInfo;
7158
7175
  delete serverResponse.mfaPendingCredential;
7159
7176
  // Use in the new token & refresh token in the old response
7160
- const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });
7177
+ const idTokenResponse = {
7178
+ ...serverResponse,
7179
+ idToken: mfaResponse.idToken,
7180
+ refreshToken: mfaResponse.refreshToken
7181
+ };
7161
7182
  // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case
7162
7183
  switch (error.operationType) {
7163
7184
  case "signIn" /* OperationType.SIGN_IN */:
@@ -7188,11 +7209,10 @@ class MultiFactorResolverImpl {
7188
7209
  * @public
7189
7210
  */
7190
7211
  function getMultiFactorResolver(auth, error) {
7191
- var _a;
7192
7212
  const authModular = util.getModularInstance(auth);
7193
7213
  const errorInternal = error;
7194
7214
  _assert(error.customData.operationType, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7195
- _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7215
+ _assert(errorInternal.customData._serverResponse?.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7196
7216
  return MultiFactorResolverImpl._fromError(authModular, errorInternal);
7197
7217
  }
7198
7218
 
@@ -7332,7 +7352,7 @@ class BrowserPersistenceClass {
7332
7352
  this.storage.removeItem(STORAGE_AVAILABLE_KEY);
7333
7353
  return Promise.resolve(true);
7334
7354
  }
7335
- catch (_a) {
7355
+ catch {
7336
7356
  return Promise.resolve(false);
7337
7357
  }
7338
7358
  }
@@ -7554,10 +7574,9 @@ const browserLocalPersistence = BrowserLocalPersistence;
7554
7574
  const POLLING_INTERVAL_MS = 1000;
7555
7575
  // Pull a cookie value from document.cookie
7556
7576
  function getDocumentCookie(name) {
7557
- var _a, _b;
7558
7577
  const escapedName = name.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
7559
7578
  const matcher = RegExp(`${escapedName}=([^;]+)`);
7560
- return (_b = (_a = document.cookie.match(matcher)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
7579
+ return document.cookie.match(matcher)?.[1] ?? null;
7561
7580
  }
7562
7581
  // Produce a sanitized cookie name from the persistence key
7563
7582
  function getCookieName(key) {
@@ -7585,14 +7604,13 @@ class CookiePersistence {
7585
7604
  // prerequisites have been met, namely that we're in a secureContext, navigator and document are
7586
7605
  // available and cookies are enabled. Not all UAs support these method, so fallback accordingly.
7587
7606
  async _isAvailable() {
7588
- var _a;
7589
7607
  if (typeof isSecureContext === 'boolean' && !isSecureContext) {
7590
7608
  return false;
7591
7609
  }
7592
7610
  if (typeof navigator === 'undefined' || typeof document === 'undefined') {
7593
7611
  return false;
7594
7612
  }
7595
- return (_a = navigator.cookieEnabled) !== null && _a !== void 0 ? _a : true;
7613
+ return navigator.cookieEnabled ?? true;
7596
7614
  }
7597
7615
  // Set should be a noop as we expect middleware to handle this
7598
7616
  async _set(_key, _value) {
@@ -7606,7 +7624,7 @@ class CookiePersistence {
7606
7624
  const name = getCookieName(key);
7607
7625
  if (window.cookieStore) {
7608
7626
  const cookie = await window.cookieStore.get(name);
7609
- return cookie === null || cookie === void 0 ? void 0 : cookie.value;
7627
+ return cookie?.value;
7610
7628
  }
7611
7629
  return getDocumentCookie(name);
7612
7630
  }
@@ -7817,7 +7835,7 @@ class Receiver {
7817
7835
  const messageEvent = event;
7818
7836
  const { eventId, eventType, data } = messageEvent.data;
7819
7837
  const handlers = this.handlersMap[eventType];
7820
- if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {
7838
+ if (!handlers?.size) {
7821
7839
  return;
7822
7840
  }
7823
7841
  messageEvent.ports[0].postMessage({
@@ -8053,20 +8071,19 @@ function _isWorker() {
8053
8071
  typeof _window()['importScripts'] === 'function');
8054
8072
  }
8055
8073
  async function _getActiveServiceWorker() {
8056
- if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {
8074
+ if (!navigator?.serviceWorker) {
8057
8075
  return null;
8058
8076
  }
8059
8077
  try {
8060
8078
  const registration = await navigator.serviceWorker.ready;
8061
8079
  return registration.active;
8062
8080
  }
8063
- catch (_a) {
8081
+ catch {
8064
8082
  return null;
8065
8083
  }
8066
8084
  }
8067
8085
  function _getServiceWorkerController() {
8068
- var _a;
8069
- return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;
8086
+ return navigator?.serviceWorker?.controller || null;
8070
8087
  }
8071
8088
  function _getWorkerGlobalScope() {
8072
8089
  return _isWorker() ? self : null;
@@ -8249,7 +8266,6 @@ class IndexedDBLocalPersistence {
8249
8266
  * may not resolve.
8250
8267
  */
8251
8268
  async initializeSender() {
8252
- var _a, _b;
8253
8269
  // Check to see if there's an active service worker.
8254
8270
  this.activeServiceWorker = await _getActiveServiceWorker();
8255
8271
  if (!this.activeServiceWorker) {
@@ -8261,8 +8277,8 @@ class IndexedDBLocalPersistence {
8261
8277
  if (!results) {
8262
8278
  return;
8263
8279
  }
8264
- if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) &&
8265
- ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes("keyChanged" /* _EventType.KEY_CHANGED */))) {
8280
+ if (results[0]?.fulfilled &&
8281
+ results[0]?.value.includes("keyChanged" /* _EventType.KEY_CHANGED */)) {
8266
8282
  this.serviceWorkerReceiverAvailable = true;
8267
8283
  }
8268
8284
  }
@@ -8288,7 +8304,7 @@ class IndexedDBLocalPersistence {
8288
8304
  ? 800 /* _TimeoutDuration.LONG_ACK */
8289
8305
  : 50 /* _TimeoutDuration.ACK */);
8290
8306
  }
8291
- catch (_a) {
8307
+ catch {
8292
8308
  // This is a best effort approach. Ignore errors.
8293
8309
  }
8294
8310
  }
@@ -8302,7 +8318,7 @@ class IndexedDBLocalPersistence {
8302
8318
  await _deleteObject(db, STORAGE_AVAILABLE_KEY);
8303
8319
  return true;
8304
8320
  }
8305
- catch (_a) { }
8321
+ catch { }
8306
8322
  return false;
8307
8323
  }
8308
8324
  async _withPendingWrite(write) {
@@ -8468,7 +8484,6 @@ const NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);
8468
8484
  */
8469
8485
  class ReCaptchaLoaderImpl {
8470
8486
  constructor() {
8471
- var _a;
8472
8487
  this.hostLanguage = '';
8473
8488
  this.counter = 0;
8474
8489
  /**
@@ -8476,7 +8491,7 @@ class ReCaptchaLoaderImpl {
8476
8491
  * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
8477
8492
  * `window.grecaptcha.render()` will not. Another load will add it.
8478
8493
  */
8479
- this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);
8494
+ this.librarySeparatelyLoaded = !!_window().grecaptcha?.render;
8480
8495
  }
8481
8496
  load(auth, hl = '') {
8482
8497
  _assert(isHostLanguageValid(hl), auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
@@ -8521,7 +8536,6 @@ class ReCaptchaLoaderImpl {
8521
8536
  this.counter--;
8522
8537
  }
8523
8538
  shouldResolveImmediately(hl) {
8524
- var _a;
8525
8539
  // We can resolve immediately if:
8526
8540
  // • grecaptcha is already defined AND (
8527
8541
  // 1. the requested language codes are the same OR
@@ -8529,7 +8543,7 @@ class ReCaptchaLoaderImpl {
8529
8543
  // 3. the library was already loaded by the app
8530
8544
  // In cases (2) and (3), we _can't_ reload as it would break the recaptchas
8531
8545
  // that are already in the page
8532
- return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&
8546
+ return (!!_window().grecaptcha?.render &&
8533
8547
  (hl === this.hostLanguage ||
8534
8548
  this.counter > 0 ||
8535
8549
  this.librarySeparatelyLoaded));
@@ -8594,7 +8608,9 @@ class RecaptchaVerifier {
8594
8608
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
8595
8609
  * 'invisible'.
8596
8610
  */
8597
- constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
8611
+ constructor(authExtern, containerOrId, parameters = {
8612
+ ...DEFAULT_PARAMS
8613
+ }) {
8598
8614
  this.parameters = parameters;
8599
8615
  /**
8600
8616
  * The application verifier type.
@@ -8878,7 +8894,6 @@ async function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {
8878
8894
  *
8879
8895
  */
8880
8896
  async function _verifyPhoneNumber(auth, options, verifier) {
8881
- var _a;
8882
8897
  if (!auth._getRecaptchaConfig()) {
8883
8898
  try {
8884
8899
  await _initializeRecaptchaConfig(auth);
@@ -8915,7 +8930,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8915
8930
  const startEnrollPhoneMfaActionCallback = async (authInstance, request) => {
8916
8931
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8917
8932
  if (request.phoneEnrollmentInfo.captchaResponse === FAKE_TOKEN) {
8918
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8933
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8919
8934
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8920
8935
  return startEnrollPhoneMfa(authInstance, requestWithRecaptchaV2);
8921
8936
  }
@@ -8929,7 +8944,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8929
8944
  }
8930
8945
  else {
8931
8946
  _assert(session.type === "signin" /* MultiFactorSessionType.SIGN_IN */, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8932
- const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) ||
8947
+ const mfaEnrollmentId = phoneInfoOptions.multiFactorHint?.uid ||
8933
8948
  phoneInfoOptions.multiFactorUid;
8934
8949
  _assert(mfaEnrollmentId, auth, "missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */);
8935
8950
  const startPhoneMfaSignInRequest = {
@@ -8942,7 +8957,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8942
8957
  const startSignInPhoneMfaActionCallback = async (authInstance, request) => {
8943
8958
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8944
8959
  if (request.phoneSignInInfo.captchaResponse === FAKE_TOKEN) {
8945
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8960
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8946
8961
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8947
8962
  return startSignInPhoneMfa(authInstance, requestWithRecaptchaV2);
8948
8963
  }
@@ -8963,7 +8978,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8963
8978
  const sendPhoneVerificationCodeActionCallback = async (authInstance, request) => {
8964
8979
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8965
8980
  if (request.captchaResponse === FAKE_TOKEN) {
8966
- _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8981
+ _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8967
8982
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8968
8983
  return sendPhoneVerificationCode(authInstance, requestWithRecaptchaV2);
8969
8984
  }
@@ -8977,7 +8992,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8977
8992
  }
8978
8993
  }
8979
8994
  finally {
8980
- verifier === null || verifier === void 0 ? void 0 : verifier._reset();
8995
+ verifier?._reset();
8981
8996
  }
8982
8997
  }
8983
8998
  /**
@@ -9015,7 +9030,7 @@ async function injectRecaptchaV2Token(auth, request, recaptchaV2Verifier) {
9015
9030
  _assert(recaptchaV2Verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9016
9031
  const recaptchaV2Token = await recaptchaV2Verifier.verify();
9017
9032
  _assert(typeof recaptchaV2Token === 'string', auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9018
- const newRequest = Object.assign({}, request);
9033
+ const newRequest = { ...request };
9019
9034
  if ('phoneEnrollmentInfo' in newRequest) {
9020
9035
  const phoneNumber = newRequest.phoneEnrollmentInfo.phoneNumber;
9021
9036
  const captchaResponse = newRequest.phoneEnrollmentInfo.captchaResponse;
@@ -9589,8 +9604,7 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9589
9604
  this.pollUserCancellation();
9590
9605
  }
9591
9606
  get eventId() {
9592
- var _a;
9593
- return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;
9607
+ return this.authWindow?.associatedEvent || null;
9594
9608
  }
9595
9609
  cancel() {
9596
9610
  this.reject(_createError(this.auth, "cancelled-popup-request" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));
@@ -9608,8 +9622,7 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9608
9622
  }
9609
9623
  pollUserCancellation() {
9610
9624
  const poll = () => {
9611
- var _a, _b;
9612
- if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {
9625
+ if (this.authWindow?.window?.closed) {
9613
9626
  // Make sure that there is sufficient time for whatever action to
9614
9627
  // complete. The window could have closed but the sign in network
9615
9628
  // call could still be in flight. This is specifically true for
@@ -10047,9 +10060,8 @@ class AuthEventManager {
10047
10060
  return handled;
10048
10061
  }
10049
10062
  sendToConsumer(event, consumer) {
10050
- var _a;
10051
10063
  if (event.error && !isNullRedirectEvent(event)) {
10052
- const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||
10064
+ const code = event.error.code?.split('auth/')[1] ||
10053
10065
  "internal-error" /* AuthErrorCode.INTERNAL_ERROR */;
10054
10066
  consumer.onError(_createError(this.auth, code));
10055
10067
  }
@@ -10079,7 +10091,7 @@ function eventUid(e) {
10079
10091
  }
10080
10092
  function isNullRedirectEvent({ type, error }) {
10081
10093
  return (type === "unknown" /* AuthEventType.UNKNOWN */ &&
10082
- (error === null || error === void 0 ? void 0 : error.code) === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10094
+ error?.code === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10083
10095
  }
10084
10096
  function isRedirectEvent(event) {
10085
10097
  switch (event.type) {
@@ -10144,7 +10156,7 @@ async function _validateOrigin(auth) {
10144
10156
  return;
10145
10157
  }
10146
10158
  }
10147
- catch (_a) {
10159
+ catch {
10148
10160
  // Do nothing if there's a URL error; just continue searching
10149
10161
  }
10150
10162
  }
@@ -10207,7 +10219,7 @@ function resetUnloadedGapiModules() {
10207
10219
  // Get gapix.beacon context.
10208
10220
  const beacon = _window().___jsl;
10209
10221
  // Get current hint.
10210
- if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {
10222
+ if (beacon?.H) {
10211
10223
  // Get gapi hint.
10212
10224
  for (const hint of Object.keys(beacon.H)) {
10213
10225
  // Requested modules.
@@ -10228,7 +10240,6 @@ function resetUnloadedGapiModules() {
10228
10240
  }
10229
10241
  function loadGapi(auth) {
10230
10242
  return new Promise((resolve, reject) => {
10231
- var _a, _b, _c;
10232
10243
  // Function to run when gapi.load is ready.
10233
10244
  function loadGapiIframe() {
10234
10245
  // The developer may have tried to previously run gapi.load and failed.
@@ -10251,11 +10262,11 @@ function loadGapi(auth) {
10251
10262
  timeout: NETWORK_TIMEOUT.get()
10252
10263
  });
10253
10264
  }
10254
- if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {
10265
+ if (_window().gapi?.iframes?.Iframe) {
10255
10266
  // If gapi.iframes.Iframe available, resolve.
10256
10267
  resolve(gapi.iframes.getContext());
10257
10268
  }
10258
- else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {
10269
+ else if (!!_window().gapi?.load) {
10259
10270
  // Gapi loader ready, load gapi.iframes.
10260
10271
  loadGapiIframe();
10261
10272
  }
@@ -10428,8 +10439,13 @@ function _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT)
10428
10439
  const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();
10429
10440
  const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();
10430
10441
  let target = '';
10431
- const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), { width: width.toString(), height: height.toString(), top,
10432
- left });
10442
+ const options = {
10443
+ ...BASE_POPUP_OPTIONS,
10444
+ width: width.toString(),
10445
+ height: height.toString(),
10446
+ top,
10447
+ left
10448
+ };
10433
10449
  // Chrome iOS 7 and 8 is returning an undefined popup win when target is
10434
10450
  // specified, even though the popup is not necessarily blocked.
10435
10451
  const ua = util.getUA().toLowerCase();
@@ -10589,8 +10605,7 @@ class BrowserPopupRedirectResolver {
10589
10605
  // Wrapping in async even though we don't await anywhere in order
10590
10606
  // to make sure errors are raised as promise rejections
10591
10607
  async _openPopup(auth, provider, authType, eventId) {
10592
- var _a;
10593
- debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');
10608
+ debugAssert(this.eventManagers[auth._key()]?.manager, '_initialize() not called before _openPopup()');
10594
10609
  const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);
10595
10610
  return _open(auth, url, _generateEventId());
10596
10611
  }
@@ -10625,7 +10640,7 @@ class BrowserPopupRedirectResolver {
10625
10640
  const iframe = await _openIframe(auth);
10626
10641
  const manager = new AuthEventManager(auth);
10627
10642
  iframe.register('authEvent', (iframeEvent) => {
10628
- _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10643
+ _assert(iframeEvent?.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10629
10644
  // TODO: Consider splitting redirect and popup events earlier on
10630
10645
  const handled = manager.onEvent(iframeEvent.authEvent);
10631
10646
  return { status: handled ? "ACK" /* GapiOutcome.ACK */ : "ERROR" /* GapiOutcome.ERROR */ };
@@ -10637,8 +10652,7 @@ class BrowserPopupRedirectResolver {
10637
10652
  _isIframeWebStorageSupported(auth, cb) {
10638
10653
  const iframe = this.iframes[auth._key()];
10639
10654
  iframe.send(WEB_STORAGE_SUPPORT_KEY, { type: WEB_STORAGE_SUPPORT_KEY }, result => {
10640
- var _a;
10641
- const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];
10655
+ const isSupported = result?.[0]?.[WEB_STORAGE_SUPPORT_KEY];
10642
10656
  if (isSupported !== undefined) {
10643
10657
  cb(!!isSupported);
10644
10658
  }
@@ -10781,9 +10795,8 @@ class TotpMultiFactorGenerator {
10781
10795
  * @returns A promise to {@link TotpSecret}.
10782
10796
  */
10783
10797
  static async generateSecret(session) {
10784
- var _a;
10785
10798
  const mfaSession = session;
10786
- _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10799
+ _assert(typeof mfaSession.user?.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10787
10800
  const response = await startEnrollTotpMfa(mfaSession.user.auth, {
10788
10801
  idToken: mfaSession.credential,
10789
10802
  totpEnrollmentInfo: {}
@@ -10867,14 +10880,13 @@ class TotpSecret {
10867
10880
  * @returns A QR code URL string.
10868
10881
  */
10869
10882
  generateQrCodeUrl(accountName, issuer) {
10870
- var _a;
10871
10883
  let useDefaults = false;
10872
10884
  if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
10873
10885
  useDefaults = true;
10874
10886
  }
10875
10887
  if (useDefaults) {
10876
10888
  if (_isEmptyString(accountName)) {
10877
- accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';
10889
+ accountName = this.auth.currentUser?.email || 'unknownuser';
10878
10890
  }
10879
10891
  if (_isEmptyString(issuer)) {
10880
10892
  issuer = this.auth.name;
@@ -10885,11 +10897,11 @@ class TotpSecret {
10885
10897
  }
10886
10898
  /** @internal */
10887
10899
  function _isEmptyString(input) {
10888
- return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
10900
+ return typeof input === 'undefined' || input?.length === 0;
10889
10901
  }
10890
10902
 
10891
10903
  var name = "@firebase/auth";
10892
- var version = "1.10.7";
10904
+ var version = "1.10.8-canary.25b60fdaa";
10893
10905
 
10894
10906
  /**
10895
10907
  * @license
@@ -10913,9 +10925,8 @@ class AuthInterop {
10913
10925
  this.internalListeners = new Map();
10914
10926
  }
10915
10927
  getUid() {
10916
- var _a;
10917
10928
  this.assertAuthConfigured();
10918
- return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
10929
+ return this.auth.currentUser?.uid || null;
10919
10930
  }
10920
10931
  async getToken(forceRefresh) {
10921
10932
  this.assertAuthConfigured();
@@ -10932,7 +10943,7 @@ class AuthInterop {
10932
10943
  return;
10933
10944
  }
10934
10945
  const unsubscribe = this.auth.onIdTokenChanged(user => {
10935
- listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
10946
+ listener(user?.stsTokenManager.accessToken || null);
10936
10947
  });
10937
10948
  this.internalListeners.set(listener, unsubscribe);
10938
10949
  this.updateProactiveRefresh();
@@ -11031,8 +11042,8 @@ function registerAuth(clientPlatform) {
11031
11042
  return (auth => new AuthInterop(auth))(auth);
11032
11043
  }, "PRIVATE" /* ComponentType.PRIVATE */).setInstantiationMode("EXPLICIT" /* InstantiationMode.EXPLICIT */));
11033
11044
  app.registerVersion(name, version, getVersionForPlatform(clientPlatform));
11034
- // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
11035
- app.registerVersion(name, version, 'cjs2017');
11045
+ // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
11046
+ app.registerVersion(name, version, 'cjs2020');
11036
11047
  }
11037
11048
 
11038
11049
  /**
@@ -11062,7 +11073,7 @@ const mintCookieFactory = (url) => async (user) => {
11062
11073
  return;
11063
11074
  }
11064
11075
  // Specifically trip null => undefined when logged out, to delete any existing cookie
11065
- const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
11076
+ const idToken = idTokenResult?.token;
11066
11077
  if (lastPostedIdToken === idToken) {
11067
11078
  return;
11068
11079
  }
@@ -11117,8 +11128,7 @@ function getAuth(app$1 = app.getApp()) {
11117
11128
  return auth;
11118
11129
  }
11119
11130
  function getScriptParentElement() {
11120
- var _a, _b;
11121
- return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;
11131
+ return document.getElementsByTagName('head')?.[0] ?? document;
11122
11132
  }
11123
11133
  _setExternalJSProvider({
11124
11134
  loadJS(url) {
@@ -11251,4 +11261,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
11251
11261
  exports.validatePassword = validatePassword;
11252
11262
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
11253
11263
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
11254
- //# sourceMappingURL=index-d8380d90.js.map
11264
+ //# sourceMappingURL=index-ebbd6577.js.map