@feedmepos/mf-connect 0.1.98-beta.6 → 0.1.98-beta.60

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 (147) hide show
  1. package/dist/{App-CvJ0ASlp.js → App-BUwQLdzG.js} +812 -666
  2. package/dist/{AuditLogs-Bt9S2LKL.js → AuditLogs-laNQB1ef.js} +14 -13
  3. package/dist/{Bin-ZSCDSioa.js → Bin-Bfboeea_.js} +8 -8
  4. package/dist/{Broadcast-BT0R11RB.js → Broadcast-CDz-_eDz.js} +40 -37
  5. package/dist/CampaignAnalytic-BiA-5XG3.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-LweQ57aG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VrTN-c_a.js} +6 -5
  7. package/dist/Card-CKHaW8N7.js +1084 -0
  8. package/dist/{Collections-H7zhe9zN.js → Collections-DRocQb1D.js} +14 -13
  9. package/dist/Credit-DWaoVhSP.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B7ZdULCu.js +53 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js} +54 -52
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-qNmiKaJc.js → EffectSheet.vue_vue_type_style_index_0_lang-yDUjXV2O.js} +35 -35
  13. package/dist/{Experience-CH5tg-tm.js → Experience-C1_LpneJ.js} +112 -86
  14. package/dist/{FileSaver.min-DNFqiyZb.js → FileSaver.min-CWJ-6CFP.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DtTYcSZk.js +356 -0
  17. package/dist/GiftCardSetup-B770Rl1Q.js +662 -0
  18. package/dist/{Grab-3s_sLewD.js → Grab-CN0gmIxT.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fbmoN1e9.js → ImageInput.vue_vue_type_script_setup_true_lang-BaAhKWhX.js} +1 -1
  20. package/dist/{Index-zTWZCiEo.js → Index-0F6aq3f9.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BOxYPkf5.js → LocationPicker.vue_vue_type_script_setup_true_lang-BrKj8W2H.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-wjJ_cwft.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DOuHSVdR.js} +1 -1
  23. package/dist/LoyaltyDashboard-CtXyDFqa.js +2865 -0
  24. package/dist/MainLayout-BSWLr3gE.js +143 -0
  25. package/dist/{Marketing-Bto1OvK1.js → Marketing-Ci2haxRd.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-D7rIqF5U.js → MarketingMaterialEdit-Cw6R0bNM.js} +15 -14
  27. package/dist/Member-DEzSTAQy.js +649 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BrhSxbrI.js +1287 -0
  29. package/dist/MemberImportHistory-BGfNLzma.js +187 -0
  30. package/dist/MemberList-Cq5Gsv3G.js +336 -0
  31. package/dist/{MemberTransactions-CjTtGB2y.js → MemberTransactions-BrUVZRtt.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DvKL7BL5.js → MessageInput.vue_vue_type_script_setup_true_lang-DCQ6Fse-.js} +5434 -5279
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CETwYfZD.js +40 -0
  34. package/dist/Mission-Do4IonLo.js +360 -0
  35. package/dist/{Overview-mxGLyFvE.js → Overview-DA90l9Kb.js} +21 -20
  36. package/dist/Overview-DN-nJxw9.js +1316 -0
  37. package/dist/Point-DQ4w857n.js +288 -0
  38. package/dist/Promotion-Rgt9LcYi.js +423 -0
  39. package/dist/{Queue-DgaFyyyH.js → Queue-SzypUxgD.js} +14 -13
  40. package/dist/{Record-BRol__6_.js → Record-DYvPPhIW.js} +9 -9
  41. package/dist/Review-B0TERyHM.js +45 -0
  42. package/dist/ReviewFacebookCallback-BJ5jQ3Dv.js +238 -0
  43. package/dist/ReviewGoogleCallback-BKQD39dv.js +213 -0
  44. package/dist/{Reward-DQI0PvmR.js → Reward-BexlVT_C.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B6bvQNsU.js → RewardGroup.vue_vue_type_script_setup_true_lang-C-ygqNur.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js → RuleGroup.vue_vue_type_script_setup_true_lang-DjxIJcdv.js} +103 -109
  47. package/dist/{Segment-DFaLx0QZ.js → Segment-CYa4GjtQ.js} +30 -29
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cpb2i9iV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b-K-VDJC.js} +31 -30
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-MvoepHn9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-t2mlDDtn.js} +4 -4
  50. package/dist/{Setting-D2NjFJvq.js → Setting-Dmm5BKdF.js} +14 -14
  51. package/dist/{SettingAdvertisements-CPWgSMaA.js → SettingAdvertisements-cy4cRBop.js} +12 -12
  52. package/dist/Settings-DMQuLDM4.js +230 -0
  53. package/dist/Store-B7KflfSk.js +2612 -0
  54. package/dist/{StoreRewards-Ccj12pyq.js → StoreRewards-BKae8uZn.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-sbIR-k1R.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CfWTn0Xd.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DRT3N9SD.js} +2 -2
  57. package/dist/{Tier-vaJoohiM.js → Tier-BeTz6LHH.js} +2296 -750
  58. package/dist/{Title-BqHC7-v9.js → Title-OEVVw5I-.js} +39 -37
  59. package/dist/Transaction-D-MZjntW.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dporb9KE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-xIEOUOdo.js} +26 -26
  61. package/dist/{Voucher-DeN6C6DQ.js → Voucher-BJCf3pSa.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-De16fuC4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BFQ_CYub.js} +115 -121
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DAC-j0Ln.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGDw3Too.js} +2 -2
  64. package/dist/{app-n4Y2jMee.js → app-J8VIC7-H.js} +29852 -25997
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-HYFFI4OS.js +75 -0
  67. package/dist/{business-jn-_l48y.js → business-BonuheMK.js} +5 -5
  68. package/dist/{campaign-rgDnocfT.js → campaign-7CI7gfS5.js} +74 -96
  69. package/dist/campaign-Ct7jhugP.js +100 -0
  70. package/dist/{campaign.enum-C9HvoKuq.js → campaign.enum-OzJ9IbAW.js} +1 -1
  71. package/dist/{campaign.fn-D21ettpH.js → campaign.fn-CDjxE9B2.js} +99 -99
  72. package/dist/{collectible.enum-_HVU4lWn.js → collectible.enum-Dw_tlI9E.js} +1 -1
  73. package/dist/collection.fn-CER0_NEn.js +26 -0
  74. package/dist/currency-CTUS4vS8.js +7 -0
  75. package/dist/{duplicateCampaign-gzVwrnWb.js → duplicateCampaign-CMQ-RMH-.js} +11 -11
  76. package/dist/{effect-DhpIv1L3.js → effect-DBeGoMNE.js} +1 -1
  77. package/dist/{email-addresses-DPxYLSoa.js → email-addresses-BH3mQzan.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-WYHUnHVy.js → helper-DJe_JbKJ.js} +1 -1
  80. package/dist/{index-BdnHQSDd.js → index-B14H1rLW.js} +5 -4
  81. package/dist/{index-7HizF3GI.js → index-BOVnM3gL.js} +1588 -1522
  82. package/dist/{index-Cvfavr2M.js → index-BRCB6yJ6.js} +232 -200
  83. package/dist/{index-BPsofsGt.js → index-BZKKS7jO.js} +1933 -2560
  84. package/dist/{index-BuLfxJyC.js → index-BlwAgY_z.js} +105 -123
  85. package/dist/index-BmN_Qcw7.js +151 -0
  86. package/dist/index-Bnk3vdb-.js +72 -0
  87. package/dist/index-BzVTqlVH.js +137 -0
  88. package/dist/{index--fNMSXUf.js → index-CEDhjZzd.js} +1 -1
  89. package/dist/{index-BdqRrCt8.js → index-CM9GTQIo.js} +5 -5
  90. package/dist/index-CN8VyVEB.js +53 -0
  91. package/dist/{index-Cte6dHHy.js → index-COuceEFz.js} +14 -14
  92. package/dist/{index-BN-FP9kx.js → index-CWR2s6Nt.js} +1 -1
  93. package/dist/index-CrMBqkKk.js +897 -0
  94. package/dist/{index-xao4ggML.js → index-D9f3AIaO.js} +5 -5
  95. package/dist/index-Do36kJeb.js +51 -0
  96. package/dist/{index-C-5YgmkC.js → index-bGByr1XM.js} +7 -5
  97. package/dist/{index-DUTFNEn9.js → index-bJX4zgh0.js} +4 -4
  98. package/dist/{index.esm2017-CjzFPUCa.js → index.esm2017-BpCPgTjc.js} +128 -128
  99. package/dist/{loading-CojnK00V.js → loading-D_rPJ-Yc.js} +1 -1
  100. package/dist/{lodash-CLkg5jTT.js → lodash-BM976Z2I.js} +1 -1
  101. package/dist/member-import-C5rhD3f8.js +187 -0
  102. package/dist/membership-CIQCEKiL.js +274 -0
  103. package/dist/{money-CyaLaEKo.js → money-BrMT193t.js} +1 -1
  104. package/dist/{number-DEtI4bEX.js → number-DOcD1tqL.js} +1 -1
  105. package/dist/objectid-CAdRRoFu.js +145 -0
  106. package/dist/{plugins-MnP1vCcg.js → plugins-696Z9K6A.js} +3 -3
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-Dk3D26xC.js → reward-lSVIBiE9.js} +1 -1
  109. package/dist/{rule-B1Agad1n.js → rule-BUGAimk8.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-DpqLCq1p.js → template-01_h2Gac.js} +6 -6
  112. package/dist/timezone-okTdM2YU.js +20 -0
  113. package/dist/transaction.fn-Nz0T33ex.js +64 -0
  114. package/dist/{trigger-cwPN-4Ia.js → trigger-CKj1X6zs.js} +17 -17
  115. package/dist/useMarketingMaterialActions-yKqKaPpe.js +96 -0
  116. package/dist/{usePagination-D8zBMxdJ.js → usePagination-D6cYlfni.js} +1 -1
  117. package/dist/{user-EUGwaL2f.js → user-DX5qCQfz.js} +1 -1
  118. package/dist/{vue-i18n-BBj45p9N.js → vue-i18n-DowpocqN.js} +204 -204
  119. package/dist/{xlsx-DiMIlKmu.js → xlsx-Dv4SuJbw.js} +1 -1
  120. package/dist/{zod-B1cU167C.js → zod-DVw24Ejy.js} +1 -1
  121. package/package.json +6 -5
  122. package/dist/Card-Wdh8lyUv.js +0 -910
  123. package/dist/Credit-BuKLrFtM.js +0 -260
  124. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  125. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  126. package/dist/Game-C9s4qZz4.js +0 -330
  127. package/dist/LoyaltyDashboard-tOOk6zvV.js +0 -1082
  128. package/dist/MainLayout-iWi1DzXS.js +0 -41
  129. package/dist/Member-BdgdT-sa.js +0 -280
  130. package/dist/MemberList-DBIE-RWC.js +0 -1601
  131. package/dist/Mission-CWR6FBvN.js +0 -334
  132. package/dist/Point-BIt82fJk.js +0 -262
  133. package/dist/Promotion-Cl1vPi0B.js +0 -397
  134. package/dist/Review-DmV2YnFd.js +0 -1076
  135. package/dist/ReviewFacebookCallback-B5XgAWXo.js +0 -243
  136. package/dist/ReviewGoogleCallback-CYR03Wfd.js +0 -208
  137. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CAImd3yc.js +0 -181
  138. package/dist/Store-DjUe8ady.js +0 -1996
  139. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js +0 -1130
  140. package/dist/Transaction-BOmDOGnD.js +0 -39
  141. package/dist/campaign-BnI7-ceP.js +0 -219
  142. package/dist/export-CWAxYj7W.js +0 -97
  143. package/dist/index-B6EBgIUx.js +0 -85
  144. package/dist/index-CxR1baaG.js +0 -52
  145. package/dist/membership-CeX8E_I9.js +0 -255
  146. package/dist/objectid-CMau7CW-.js +0 -145
  147. package/dist/useMarketingMaterialActions-CGzfJ68e.js +0 -107
@@ -1,21 +1,22 @@
1
- import { defineComponent as ht, ref as te, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ne, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as ie, toDisplayString as je, onMounted as en, Fragment as tn, createBlock as nn, createCommentVNode as Ge, nextTick as rn } from "vue";
2
- import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
3
- import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
4
- import { u as cn } from "./app-wDQR6dpb.js";
5
- import { u as ln } from "./business-jn-_l48y.js";
6
- import "./index--fNMSXUf.js";
7
- import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
- import { u as hn } from "./vue-i18n-BBj45p9N.js";
9
- import { C as Be, m as fn } from "./index-BuLfxJyC.js";
10
- import { R as f } from "./app-n4Y2jMee.js";
11
- import { J as pn } from "./JsonViewer-v8_C7l5N.js";
12
- import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as j, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as An } from "./index.esm2017-CjzFPUCa.js";
13
- import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
- import { S as Ke, c as Pn } from "./index-BdnHQSDd.js";
15
- const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
1
+ import { defineComponent as De, ref as ee, h as Y, computed as ne, watch as xe, resolveComponent as Z, openBlock as H, createElementBlock as pe, createVNode as S, unref as p, createElementVNode as _, toDisplayString as R, createBlock as Ne, withCtx as X, Fragment as It, renderList as cn, onMounted as ln, createCommentVNode as Ae, nextTick as un } from "vue";
2
+ import { useRouter as yt, useRoute as wt, RouterView as dn } from "vue-router";
3
+ import { useCoreStore as me, FeedMeAuth as hn } from "@feedmepos/mf-common";
4
+ import { u as fn } from "./app-wDQR6dpb.js";
5
+ import { u as pn } from "./business-BonuheMK.js";
6
+ import "./index-CEDhjZzd.js";
7
+ import { components as Q, useSnackbar as mn, useDialog as gn } from "@feedmepos/ui-library";
8
+ import { u as Tt } from "./vue-i18n-DowpocqN.js";
9
+ import { m as _n } from "./index-BlwAgY_z.js";
10
+ import { C as Xe } from "./timezone-okTdM2YU.js";
11
+ import { R as f, A as vn, a as Qe } from "./app-J8VIC7-H.js";
12
+ import { J as In } from "./JsonViewer-v8_C7l5N.js";
13
+ import { r as Oe, L as yn, g as kt, i as wn, a as Tn, _ as Ze, C as et, b as kn, S as re, c as A, d as K, E as Fe, e as En, f as Et, h as bn, j as Sn, k as bt, l as y, m as Rn, F as Ve, n as An, q as se, o as Pn, p as Cn, s as Nn, t as On, u as Ln } from "./index.esm2017-BpCPgTjc.js";
14
+ import { _ as $e } from "./tslib.es6-BCqqvLQ_.js";
15
+ import { S as tt, c as Mn } from "./index-B14H1rLW.js";
16
+ const Un = { class: "flex flex-col h-full justify-between py-16" }, Dn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, xn = /* @__PURE__ */ De({
16
17
  __name: "NavigationTab",
17
18
  setup(n) {
18
- const { t: e } = hn(), t = te(), i = [
19
+ const { t: e } = Tt(), t = ee(), i = [
19
20
  {
20
21
  label: e("connect.navigation.analytic"),
21
22
  value: f["$connect-ANALYTIC"]
@@ -61,7 +62,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
61
62
  {
62
63
  label: e("connect.navigation.point"),
63
64
  value: f["$connect-PROGRAM_POINT"],
64
- badge: () => B(z.FmPill, { variant: "premium" })
65
+ badge: () => Y(Q.FmPill, { variant: "premium" })
65
66
  },
66
67
  {
67
68
  label: e("connect.navigation.credit"),
@@ -70,7 +71,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
70
71
  {
71
72
  label: e("connect.navigation.game"),
72
73
  value: f["$connect-PROGRAM_GAME"],
73
- badge: () => B(z.FmPill, { variant: "premium" })
74
+ badge: () => Y(Q.FmPill, { variant: "premium" })
74
75
  },
75
76
  {
76
77
  label: "Mission",
@@ -89,19 +90,19 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
89
90
  {
90
91
  label: e("connect.navigation.segments"),
91
92
  value: f["$connect-LOYALTY_SEGMENT"],
92
- badge: () => B(z.FmPill, { variant: "premium" })
93
+ badge: () => Y(Q.FmPill, { variant: "premium" })
93
94
  },
94
95
  {
95
96
  label: e("connect.navigation.card"),
96
97
  value: f["$connect-LOYALTY_CARD"],
97
- badge: () => B(z.FmPill, { variant: "premium" })
98
+ badge: () => Y(Q.FmPill, { variant: "premium" })
98
99
  }
99
100
  ]
100
101
  },
101
102
  {
102
103
  label: e("connect.navigation.referral"),
103
104
  value: f["$connect-REFERRAL"],
104
- badge: () => B(z.FmPill, { variant: "premium" })
105
+ badge: () => Y(Q.FmPill, { variant: "premium" })
105
106
  },
106
107
  {
107
108
  label: e("connect.navigation.store"),
@@ -131,15 +132,18 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
131
132
  label: e("connect.navigation.bin"),
132
133
  value: f["$connect-BIN"]
133
134
  }
134
- ], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
135
+ ], r = yt(), s = wt(), o = i.reduce((d, h) => [...(h.children ?? []).map((m) => m.value), ...d, h.value], []), c = me(), a = ne(() => {
135
136
  const d = c.currentCountry.value || "MY";
136
- return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
137
+ return console.log(`[MF] Timezone set to: ${Xe[d]}`), Xe[d];
137
138
  });
138
- ft(
139
- () => s,
139
+ xe(
140
+ // Watch `route.matched`, not `route`: `useRoute()` returns a reactive object
141
+ // whose identity never changes, so watching it directly fired once via
142
+ // `immediate` and the highlight then stayed on whatever page loaded first.
143
+ () => s.matched,
140
144
  (d) => {
141
- const h = d.matched.map((p) => p.name).reverse();
142
- t.value = h.find((p) => o.includes(p));
145
+ const m = d.map((v) => v.name).reverse().find((v) => o.includes(v));
146
+ m && (t.value = m);
143
147
  },
144
148
  { immediate: !0 }
145
149
  );
@@ -147,24 +151,165 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
147
151
  await r.push({ name: d });
148
152
  }
149
153
  return (d, h) => {
150
- var w;
151
- const p = Zt("FmCollapsibleTabs");
152
- return ne(), ke("div", Cn, [
153
- pt(p, {
154
+ var v;
155
+ const m = Z("FmCollapsibleTabs");
156
+ return H(), pe("div", Un, [
157
+ S(m, {
154
158
  class: "border-fm-color-neutral-gray-100 border-r px-4",
155
- "model-value": (w = v(t)) == null ? void 0 : w.toString(),
159
+ "model-value": (v = p(t)) == null ? void 0 : v.toString(),
156
160
  items: i,
157
161
  "onUpdate:modelValue": l
158
162
  }, null, 8, ["model-value"]),
159
- ie("div", On, [
160
- ie("div", null, "Timezone: " + je(v(a).split("/")[1].replace("_", " ")), 1),
161
- ie("div", null, "(UTC" + je(v(fn).tz(v(a)).format("Z")) + ")", 1)
163
+ _("div", Dn, [
164
+ _("div", null, "Timezone: " + R(p(a).split("/")[1].replace("_", " ")), 1),
165
+ _("div", null, "(UTC" + R(p(_n).tz(p(a)).format("Z")) + ")", 1)
162
166
  ])
163
167
  ]);
164
168
  };
165
169
  }
170
+ }), St = "feedme_connect_marketing_promo_hidden";
171
+ function Fn() {
172
+ try {
173
+ return localStorage.getItem(St) !== null;
174
+ } catch {
175
+ return !1;
176
+ }
177
+ }
178
+ function Vn() {
179
+ try {
180
+ localStorage.setItem(St, (/* @__PURE__ */ new Date()).toISOString());
181
+ } catch {
182
+ }
183
+ }
184
+ const $n = { class: "flex flex-col gap-12" }, Hn = { class: "fm-corner-radius-xxl bg-fm-color-primary-oats flex items-start gap-4 self-start px-12 py-4" }, jn = { class: "fm-typo-en-body-sm-600 text-fm-color-primary" }, Wn = { class: "fm-typo-en-title-sm-800 max-w-[560px] leading-[42px]" }, Gn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary max-w-[600px]" }, Bn = { class: "flex flex-col gap-24 pb-8" }, zn = { class: "grid grid-cols-1 gap-16 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3" }, qn = { class: "fm-corner-radius-sm bg-fm-color-primary-oats flex h-40 w-40 shrink-0 items-center justify-center" }, Kn = { class: "fm-typo-en-body-lg-600" }, Jn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Yn = { class: "shrink-0" }, Xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = { class: "flex w-full flex-col gap-12 px-[16px]" }, Zn = { class: "flex flex-wrap items-center gap-12" }, ei = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ti = /* @__PURE__ */ De({
185
+ __name: "AiMarketingPromoDialog",
186
+ setup(n) {
187
+ let e = !1;
188
+ const { t } = Tt(), i = yt(), { sessionUser: r, currentCountry: s } = me(), o = ee(!1), c = [
189
+ { key: "completeContent", icon: "layers" },
190
+ { key: "realContext", icon: "storefront" },
191
+ { key: "socialFormat", icon: "aspect_ratio" }
192
+ ], a = ne(() => {
193
+ var w;
194
+ const v = ((w = r.value) == null ? void 0 : w.permissions) ?? [];
195
+ return vn(
196
+ [
197
+ {
198
+ action: Qe.Action.manage,
199
+ subject: Qe.Subject.Business.crm_marketingMaterial
200
+ }
201
+ ],
202
+ v
203
+ ).granted;
204
+ }), l = ne(
205
+ () => s.value === "MY" && a.value
206
+ );
207
+ let d = !1;
208
+ xe(
209
+ l,
210
+ (v) => {
211
+ d || !v || (d = !0, !(Fn() || e) && (e = !0, o.value = !0));
212
+ },
213
+ { immediate: !0 }
214
+ );
215
+ async function h() {
216
+ o.value = !1, await i.push({ name: f["$connect-MARKETING"] });
217
+ }
218
+ function m() {
219
+ Vn(), o.value = !1;
220
+ }
221
+ return (v, w) => {
222
+ const g = Z("FmIcon"), I = Z("FmCard"), T = Z("FmButton"), M = Z("FmDialog");
223
+ return H(), Ne(M, {
224
+ modelValue: o.value,
225
+ "onUpdate:modelValue": w[0] || (w[0] = (k) => o.value = k),
226
+ "min-width": "min(500px, calc(100% - 48px))",
227
+ "max-width": "min(860px, calc(100% - 48px))",
228
+ "max-height": "90vh",
229
+ "dismiss-away": ""
230
+ }, {
231
+ "dialog-header": X(() => [
232
+ _("div", $n, [
233
+ _("div", Hn, [
234
+ S(g, {
235
+ name: "auto_awesome",
236
+ size: "sm",
237
+ color: "primary"
238
+ }),
239
+ _("span", jn, R(p(t)("connect.marketing.whatsNew.badge")), 1)
240
+ ]),
241
+ _("h1", Wn, R(p(t)("connect.marketing.whatsNew.title")), 1),
242
+ _("p", Gn, R(p(t)("connect.marketing.whatsNew.subtitle")), 1)
243
+ ])
244
+ ]),
245
+ "dialog-footer": X(() => [
246
+ _("div", Qn, [
247
+ _("div", Zn, [
248
+ S(T, {
249
+ variant: "primary",
250
+ size: "lg",
251
+ label: p(t)("connect.marketing.whatsNew.cta"),
252
+ "append-icon": "arrow_forward",
253
+ onClick: h
254
+ }, null, 8, ["label"]),
255
+ S(T, {
256
+ variant: "tertiary",
257
+ size: "lg",
258
+ label: p(t)("connect.marketing.whatsNew.dismiss"),
259
+ onClick: m
260
+ }, null, 8, ["label"])
261
+ ]),
262
+ _("div", ei, R(p(t)("connect.marketing.whatsNew.footnote")), 1)
263
+ ])
264
+ ]),
265
+ default: X(() => [
266
+ _("div", Bn, [
267
+ _("div", zn, [
268
+ (H(), pe(It, null, cn(c, (k) => S(I, {
269
+ key: k.key,
270
+ variant: "outlined",
271
+ class: "!h-full flex flex-col gap-8 p-16"
272
+ }, {
273
+ default: X(() => [
274
+ _("div", qn, [
275
+ S(g, {
276
+ name: k.icon,
277
+ size: "md",
278
+ color: "primary"
279
+ }, null, 8, ["name"])
280
+ ]),
281
+ _("div", Kn, R(p(t)(`connect.marketing.whatsNew.benefits.${k.key}.title`)), 1),
282
+ _("div", Jn, R(p(t)(
283
+ `connect.marketing.whatsNew.benefits.${k.key}.description`
284
+ )), 1)
285
+ ]),
286
+ _: 2
287
+ }, 1024)), 64))
288
+ ]),
289
+ S(I, {
290
+ variant: "outlined",
291
+ class: "flex items-start gap-12 p-16"
292
+ }, {
293
+ default: X(() => [
294
+ _("div", Yn, [
295
+ S(g, {
296
+ name: "lightbulb",
297
+ size: "md",
298
+ color: "primary"
299
+ })
300
+ ]),
301
+ _("p", Xn, R(p(t)("connect.marketing.whatsNew.callout")), 1)
302
+ ]),
303
+ _: 1
304
+ })
305
+ ])
306
+ ]),
307
+ _: 1
308
+ }, 8, ["modelValue"]);
309
+ };
310
+ }
166
311
  });
167
- var Ln = "firebase", Mn = "10.12.4";
312
+ var ni = "firebase", ii = "10.12.4";
168
313
  /**
169
314
  * @license
170
315
  * Copyright 2020 Google LLC
@@ -181,13 +326,13 @@ var Ln = "firebase", Mn = "10.12.4";
181
326
  * See the License for the specific language governing permissions and
182
327
  * limitations under the License.
183
328
  */
184
- Se(Ln, Mn, "app");
185
- function It() {
329
+ Oe(ni, ii, "app");
330
+ function Rt() {
186
331
  return {
187
332
  "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
188
333
  };
189
334
  }
190
- const Un = It, Tt = new Ce("auth", "Firebase", It());
335
+ const ri = Rt, At = new Fe("auth", "Firebase", Rt());
191
336
  /**
192
337
  * @license
193
338
  * Copyright 2020 Google LLC
@@ -204,12 +349,12 @@ const Un = It, Tt = new Ce("auth", "Firebase", It());
204
349
  * See the License for the specific language governing permissions and
205
350
  * limitations under the License.
206
351
  */
207
- const ce = new mn("@firebase/auth");
208
- function Dn(n, ...e) {
209
- ce.logLevel <= vt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
352
+ const ge = new yn("@firebase/auth");
353
+ function si(n, ...e) {
354
+ ge.logLevel <= bt.WARN && ge.warn(`Auth (${re}): ${n}`, ...e);
210
355
  }
211
- function re(n, ...e) {
212
- ce.logLevel <= vt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
356
+ function ue(n, ...e) {
357
+ ge.logLevel <= bt.ERROR && ge.error(`Auth (${re}): ${n}`, ...e);
213
358
  }
214
359
  /**
215
360
  * @license
@@ -227,38 +372,38 @@ function re(n, ...e) {
227
372
  * See the License for the specific language governing permissions and
228
373
  * limitations under the License.
229
374
  */
230
- function R(n, ...e) {
231
- throw Le(n, ...e);
375
+ function O(n, ...e) {
376
+ throw He(n, ...e);
232
377
  }
233
- function T(n, ...e) {
234
- return Le(n, ...e);
378
+ function E(n, ...e) {
379
+ return He(n, ...e);
235
380
  }
236
- function yt(n, e, t) {
237
- const i = Object.assign(Object.assign({}, Un()), { [e]: t });
238
- return new Ce("auth", "Firebase", i).create(e, {
381
+ function Pt(n, e, t) {
382
+ const i = Object.assign(Object.assign({}, ri()), { [e]: t });
383
+ return new Fe("auth", "Firebase", i).create(e, {
239
384
  appName: n.name
240
385
  });
241
386
  }
242
- function M(n) {
243
- return yt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
387
+ function $(n) {
388
+ return Pt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
244
389
  }
245
- function Le(n, ...e) {
390
+ function He(n, ...e) {
246
391
  if (typeof n != "string") {
247
392
  const t = e[0], i = [...e.slice(1)];
248
393
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
249
394
  }
250
- return Tt.create(n, ...e);
395
+ return At.create(n, ...e);
251
396
  }
252
397
  function u(n, e, ...t) {
253
398
  if (!n)
254
- throw Le(e, ...t);
399
+ throw He(e, ...t);
255
400
  }
256
- function k(n) {
401
+ function P(n) {
257
402
  const e = "INTERNAL ASSERTION FAILED: " + n;
258
- throw re(e), new Error(e);
403
+ throw ue(e), new Error(e);
259
404
  }
260
- function A(n, e) {
261
- n || k(e);
405
+ function L(n, e) {
406
+ n || P(e);
262
407
  }
263
408
  /**
264
409
  * @license
@@ -276,14 +421,14 @@ function A(n, e) {
276
421
  * See the License for the specific language governing permissions and
277
422
  * limitations under the License.
278
423
  */
279
- function Re() {
424
+ function Le() {
280
425
  var n;
281
426
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
282
427
  }
283
- function Fn() {
284
- return Je() === "http:" || Je() === "https:";
428
+ function oi() {
429
+ return nt() === "http:" || nt() === "https:";
285
430
  }
286
- function Je() {
431
+ function nt() {
287
432
  var n;
288
433
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
289
434
  }
@@ -303,15 +448,15 @@ function Je() {
303
448
  * See the License for the specific language governing permissions and
304
449
  * limitations under the License.
305
450
  */
306
- function xn() {
451
+ function ai() {
307
452
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
308
453
  // This is especially true for Cordova apps which have unreliable
309
454
  // navigator.onLine behavior unless cordova-plugin-network-information is
310
455
  // installed which overwrites the native navigator.onLine value and
311
456
  // defines navigator.connection.
312
- (Fn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
457
+ (oi() || kn() || "connection" in navigator) ? navigator.onLine : !0;
313
458
  }
314
- function Vn() {
459
+ function ci() {
315
460
  if (typeof navigator > "u")
316
461
  return null;
317
462
  const n = navigator;
@@ -339,12 +484,12 @@ function Vn() {
339
484
  * See the License for the specific language governing permissions and
340
485
  * limitations under the License.
341
486
  */
342
- class X {
487
+ class oe {
343
488
  constructor(e, t) {
344
- this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
489
+ this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile = wn() || Tn();
345
490
  }
346
491
  get() {
347
- return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
492
+ return ai() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
348
493
  }
349
494
  }
350
495
  /**
@@ -363,8 +508,8 @@ class X {
363
508
  * See the License for the specific language governing permissions and
364
509
  * limitations under the License.
365
510
  */
366
- function Me(n, e) {
367
- A(n.emulator, "Emulator should always be set here");
511
+ function je(n, e) {
512
+ L(n.emulator, "Emulator should always be set here");
368
513
  const { url: t } = n.emulator;
369
514
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
370
515
  }
@@ -384,7 +529,7 @@ function Me(n, e) {
384
529
  * See the License for the specific language governing permissions and
385
530
  * limitations under the License.
386
531
  */
387
- class wt {
532
+ class Ct {
388
533
  static initialize(e, t, i) {
389
534
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
390
535
  }
@@ -397,7 +542,7 @@ class wt {
397
542
  return globalThis.fetch;
398
543
  if (typeof fetch < "u")
399
544
  return fetch;
400
- k("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
545
+ P("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
401
546
  }
402
547
  static headers() {
403
548
  if (this.headersImpl)
@@ -408,7 +553,7 @@ class wt {
408
553
  return globalThis.Headers;
409
554
  if (typeof Headers < "u")
410
555
  return Headers;
411
- k("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
556
+ P("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
412
557
  }
413
558
  static response() {
414
559
  if (this.responseImpl)
@@ -419,7 +564,7 @@ class wt {
419
564
  return globalThis.Response;
420
565
  if (typeof Response < "u")
421
566
  return Response;
422
- k("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
567
+ P("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
423
568
  }
424
569
  }
425
570
  /**
@@ -438,7 +583,7 @@ class wt {
438
583
  * See the License for the specific language governing permissions and
439
584
  * limitations under the License.
440
585
  */
441
- const $n = {
586
+ const li = {
442
587
  // Custom token errors.
443
588
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
444
589
  // This can only happen if the SDK sends a bad request.
@@ -529,93 +674,93 @@ const $n = {
529
674
  * See the License for the specific language governing permissions and
530
675
  * limitations under the License.
531
676
  */
532
- const Hn = new X(3e4, 6e4);
533
- function fe(n, e) {
677
+ const ui = new oe(3e4, 6e4);
678
+ function we(n, e) {
534
679
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
535
680
  }
536
- async function G(n, e, t, i, r = {}) {
537
- return Et(n, r, async () => {
681
+ async function J(n, e, t, i, r = {}) {
682
+ return Nt(n, r, async () => {
538
683
  let s = {}, o = {};
539
684
  i && (e === "GET" ? o = i : s = {
540
685
  body: JSON.stringify(i)
541
686
  });
542
- const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
687
+ const c = se(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
543
688
  return a[
544
689
  "Content-Type"
545
690
  /* HttpHeader.CONTENT_TYPE */
546
691
  ] = "application/json", n.languageCode && (a[
547
692
  "X-Firebase-Locale"
548
693
  /* HttpHeader.X_FIREBASE_LOCALE */
549
- ] = n.languageCode), wt.fetch()(bt(n, n.config.apiHost, t, c), Object.assign({
694
+ ] = n.languageCode), Ct.fetch()(Lt(n, n.config.apiHost, t, c), Object.assign({
550
695
  method: e,
551
696
  headers: a,
552
697
  referrerPolicy: "no-referrer"
553
698
  }, s));
554
699
  });
555
700
  }
556
- async function Et(n, e, t) {
701
+ async function Nt(n, e, t) {
557
702
  n._canInitEmulator = !1;
558
- const i = Object.assign(Object.assign({}, $n), e);
703
+ const i = Object.assign(Object.assign({}, li), e);
559
704
  try {
560
- const r = new Wn(n), s = await Promise.race([
705
+ const r = new di(n), s = await Promise.race([
561
706
  t(),
562
707
  r.promise
563
708
  ]);
564
709
  r.clearNetworkTimeout();
565
710
  const o = await s.json();
566
711
  if ("needConfirmation" in o)
567
- throw ee(n, "account-exists-with-different-credential", o);
712
+ throw le(n, "account-exists-with-different-credential", o);
568
713
  if (s.ok && !("errorMessage" in o))
569
714
  return o;
570
715
  {
571
716
  const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
572
717
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
573
- throw ee(n, "credential-already-in-use", o);
718
+ throw le(n, "credential-already-in-use", o);
574
719
  if (a === "EMAIL_EXISTS")
575
- throw ee(n, "email-already-in-use", o);
720
+ throw le(n, "email-already-in-use", o);
576
721
  if (a === "USER_DISABLED")
577
- throw ee(n, "user-disabled", o);
722
+ throw le(n, "user-disabled", o);
578
723
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
579
724
  if (l)
580
- throw yt(n, d, l);
581
- R(n, d);
725
+ throw Pt(n, d, l);
726
+ O(n, d);
582
727
  }
583
728
  } catch (r) {
584
- if (r instanceof Oe)
729
+ if (r instanceof Ve)
585
730
  throw r;
586
- R(n, "network-request-failed", { message: String(r) });
731
+ O(n, "network-request-failed", { message: String(r) });
587
732
  }
588
733
  }
589
- async function kt(n, e, t, i, r = {}) {
590
- const s = await G(n, e, t, i, r);
591
- return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
734
+ async function Ot(n, e, t, i, r = {}) {
735
+ const s = await J(n, e, t, i, r);
736
+ return "mfaPendingCredential" in s && O(n, "multi-factor-auth-required", {
592
737
  _serverResponse: s
593
738
  }), s;
594
739
  }
595
- function bt(n, e, t, i) {
740
+ function Lt(n, e, t, i) {
596
741
  const r = `${e}${t}?${i}`;
597
- return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
742
+ return n.config.emulator ? je(n.config, r) : `${n.config.apiScheme}://${r}`;
598
743
  }
599
- class Wn {
744
+ class di {
600
745
  constructor(e) {
601
746
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
602
- this.timer = setTimeout(() => i(T(
747
+ this.timer = setTimeout(() => i(E(
603
748
  this.auth,
604
749
  "network-request-failed"
605
750
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
606
- )), Hn.get());
751
+ )), ui.get());
607
752
  });
608
753
  }
609
754
  clearNetworkTimeout() {
610
755
  clearTimeout(this.timer);
611
756
  }
612
757
  }
613
- function ee(n, e, t) {
758
+ function le(n, e, t) {
614
759
  const i = {
615
760
  appName: n.name
616
761
  };
617
762
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
618
- const r = T(n, e, i);
763
+ const r = E(n, e, i);
619
764
  return r.customData._tokenResponse = t, r;
620
765
  }
621
766
  /**
@@ -634,11 +779,11 @@ function ee(n, e, t) {
634
779
  * See the License for the specific language governing permissions and
635
780
  * limitations under the License.
636
781
  */
637
- async function jn(n, e) {
638
- return G(n, "POST", "/v1/accounts:delete", e);
782
+ async function hi(n, e) {
783
+ return J(n, "POST", "/v1/accounts:delete", e);
639
784
  }
640
- async function St(n, e) {
641
- return G(n, "POST", "/v1/accounts:lookup", e);
785
+ async function Mt(n, e) {
786
+ return J(n, "POST", "/v1/accounts:lookup", e);
642
787
  }
643
788
  /**
644
789
  * @license
@@ -656,7 +801,7 @@ async function St(n, e) {
656
801
  * See the License for the specific language governing permissions and
657
802
  * limitations under the License.
658
803
  */
659
- function q(n) {
804
+ function te(n) {
660
805
  if (n)
661
806
  try {
662
807
  const e = new Date(Number(n));
@@ -665,8 +810,8 @@ function q(n) {
665
810
  } catch {
666
811
  }
667
812
  }
668
- async function Gn(n, e = !1) {
669
- const t = j(n), i = await t.getIdToken(e), r = Ue(i);
813
+ async function fi(n, e = !1) {
814
+ const t = K(n), i = await t.getIdToken(e), r = We(i);
670
815
  u(
671
816
  r && r.exp && r.auth_time && r.iat,
672
817
  t.auth,
@@ -677,29 +822,29 @@ async function Gn(n, e = !1) {
677
822
  return {
678
823
  claims: r,
679
824
  token: i,
680
- authTime: q(ye(r.auth_time)),
681
- issuedAtTime: q(ye(r.iat)),
682
- expirationTime: q(ye(r.exp)),
825
+ authTime: te(Pe(r.auth_time)),
826
+ issuedAtTime: te(Pe(r.iat)),
827
+ expirationTime: te(Pe(r.exp)),
683
828
  signInProvider: o || null,
684
829
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
685
830
  };
686
831
  }
687
- function ye(n) {
832
+ function Pe(n) {
688
833
  return Number(n) * 1e3;
689
834
  }
690
- function Ue(n) {
835
+ function We(n) {
691
836
  const [e, t, i] = n.split(".");
692
837
  if (e === void 0 || t === void 0 || i === void 0)
693
- return re("JWT malformed, contained fewer than 3 sections"), null;
838
+ return ue("JWT malformed, contained fewer than 3 sections"), null;
694
839
  try {
695
- const r = En(t);
696
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
840
+ const r = An(t);
841
+ return r ? JSON.parse(r) : (ue("Failed to decode base64 JWT payload"), null);
697
842
  } catch (r) {
698
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
843
+ return ue("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
699
844
  }
700
845
  }
701
- function Ye(n) {
702
- const e = Ue(n);
846
+ function it(n) {
847
+ const e = We(n);
703
848
  return u(
704
849
  e,
705
850
  "internal-error"
@@ -730,16 +875,16 @@ function Ye(n) {
730
875
  * See the License for the specific language governing permissions and
731
876
  * limitations under the License.
732
877
  */
733
- async function K(n, e, t = !1) {
878
+ async function ie(n, e, t = !1) {
734
879
  if (t)
735
880
  return e;
736
881
  try {
737
882
  return await e;
738
883
  } catch (i) {
739
- throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
884
+ throw i instanceof Ve && pi(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
740
885
  }
741
886
  }
742
- function Bn({ code: n }) {
887
+ function pi({ code: n }) {
743
888
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
744
889
  }
745
890
  /**
@@ -758,7 +903,7 @@ function Bn({ code: n }) {
758
903
  * See the License for the specific language governing permissions and
759
904
  * limitations under the License.
760
905
  */
761
- class zn {
906
+ class mi {
762
907
  constructor(e) {
763
908
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
764
909
  }
@@ -820,12 +965,12 @@ class zn {
820
965
  * See the License for the specific language governing permissions and
821
966
  * limitations under the License.
822
967
  */
823
- class Ae {
968
+ class Me {
824
969
  constructor(e, t) {
825
970
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
826
971
  }
827
972
  _initializeTime() {
828
- this.lastSignInTime = q(this.lastLoginAt), this.creationTime = q(this.createdAt);
973
+ this.lastSignInTime = te(this.lastLoginAt), this.creationTime = te(this.createdAt);
829
974
  }
830
975
  _copy(e) {
831
976
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -853,9 +998,9 @@ class Ae {
853
998
  * See the License for the specific language governing permissions and
854
999
  * limitations under the License.
855
1000
  */
856
- async function le(n) {
1001
+ async function _e(n) {
857
1002
  var e;
858
- const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
1003
+ const t = n.auth, i = await n.getIdToken(), r = await ie(n, Mt(t, { idToken: i }));
859
1004
  u(
860
1005
  r == null ? void 0 : r.users.length,
861
1006
  t,
@@ -864,7 +1009,7 @@ async function le(n) {
864
1009
  );
865
1010
  const s = r.users[0];
866
1011
  n._notifyReloadListener(s);
867
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c = Kn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
1012
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c = _i(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
868
1013
  uid: s.localId,
869
1014
  displayName: s.displayName || null,
870
1015
  photoURL: s.photoUrl || null,
@@ -873,21 +1018,21 @@ async function le(n) {
873
1018
  phoneNumber: s.phoneNumber || null,
874
1019
  tenantId: s.tenantId || null,
875
1020
  providerData: c,
876
- metadata: new Ae(s.createdAt, s.lastLoginAt),
1021
+ metadata: new Me(s.createdAt, s.lastLoginAt),
877
1022
  isAnonymous: d
878
1023
  };
879
1024
  Object.assign(n, h);
880
1025
  }
881
- async function qn(n) {
882
- const e = j(n);
883
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
1026
+ async function gi(n) {
1027
+ const e = K(n);
1028
+ await _e(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
884
1029
  }
885
- function Kn(n, e) {
1030
+ function _i(n, e) {
886
1031
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
887
1032
  }
888
- function Rt(n) {
1033
+ function Ut(n) {
889
1034
  return n.map((e) => {
890
- var { providerId: t } = e, i = Ne(e, ["providerId"]);
1035
+ var { providerId: t } = e, i = $e(e, ["providerId"]);
891
1036
  return {
892
1037
  providerId: t,
893
1038
  uid: i.rawId || "",
@@ -914,16 +1059,16 @@ function Rt(n) {
914
1059
  * See the License for the specific language governing permissions and
915
1060
  * limitations under the License.
916
1061
  */
917
- async function Jn(n, e) {
918
- const t = await Et(n, {}, async () => {
919
- const i = Y({
1062
+ async function vi(n, e) {
1063
+ const t = await Nt(n, {}, async () => {
1064
+ const i = se({
920
1065
  grant_type: "refresh_token",
921
1066
  refresh_token: e
922
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = bt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
1067
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = Lt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
923
1068
  return c[
924
1069
  "Content-Type"
925
1070
  /* HttpHeader.CONTENT_TYPE */
926
- ] = "application/x-www-form-urlencoded", wt.fetch()(o, {
1071
+ ] = "application/x-www-form-urlencoded", Ct.fetch()(o, {
927
1072
  method: "POST",
928
1073
  headers: c,
929
1074
  body: i
@@ -935,8 +1080,8 @@ async function Jn(n, e) {
935
1080
  refreshToken: t.refresh_token
936
1081
  };
937
1082
  }
938
- async function Yn(n, e) {
939
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
1083
+ async function Ii(n, e) {
1084
+ return J(n, "POST", "/v2/accounts:revokeToken", we(n, e));
940
1085
  }
941
1086
  /**
942
1087
  * @license
@@ -954,7 +1099,7 @@ async function Yn(n, e) {
954
1099
  * See the License for the specific language governing permissions and
955
1100
  * limitations under the License.
956
1101
  */
957
- class $ {
1102
+ class B {
958
1103
  constructor() {
959
1104
  this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
960
1105
  }
@@ -975,7 +1120,7 @@ class $ {
975
1120
  "internal-error"
976
1121
  /* AuthErrorCode.INTERNAL_ERROR */
977
1122
  );
978
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ye(e.idToken);
1123
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : it(e.idToken);
979
1124
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
980
1125
  }
981
1126
  updateFromIdToken(e) {
@@ -984,7 +1129,7 @@ class $ {
984
1129
  "internal-error"
985
1130
  /* AuthErrorCode.INTERNAL_ERROR */
986
1131
  );
987
- const t = Ye(e);
1132
+ const t = it(e);
988
1133
  this.updateTokensAndExpiration(e, null, t);
989
1134
  }
990
1135
  async getToken(e, t = !1) {
@@ -999,14 +1144,14 @@ class $ {
999
1144
  this.refreshToken = null;
1000
1145
  }
1001
1146
  async refresh(e, t) {
1002
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Jn(e, t);
1147
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await vi(e, t);
1003
1148
  this.updateTokensAndExpiration(i, r, Number(s));
1004
1149
  }
1005
1150
  updateTokensAndExpiration(e, t, i) {
1006
1151
  this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + i * 1e3;
1007
1152
  }
1008
1153
  static fromJSON(e, t) {
1009
- const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
1154
+ const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new B();
1010
1155
  return i && (u(typeof i == "string", "internal-error", {
1011
1156
  appName: e
1012
1157
  }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
@@ -1026,10 +1171,10 @@ class $ {
1026
1171
  this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
1027
1172
  }
1028
1173
  _clone() {
1029
- return Object.assign(new $(), this.toJSON());
1174
+ return Object.assign(new B(), this.toJSON());
1030
1175
  }
1031
1176
  _performRefresh() {
1032
- return k("not implemented");
1177
+ return P("not implemented");
1033
1178
  }
1034
1179
  }
1035
1180
  /**
@@ -1048,16 +1193,16 @@ class $ {
1048
1193
  * See the License for the specific language governing permissions and
1049
1194
  * limitations under the License.
1050
1195
  */
1051
- function P(n, e) {
1196
+ function U(n, e) {
1052
1197
  u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1053
1198
  }
1054
- class b {
1199
+ class C {
1055
1200
  constructor(e) {
1056
- var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
1057
- this.providerId = "firebase", this.proactiveRefresh = new zn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ae(s.createdAt || void 0, s.lastLoginAt || void 0);
1201
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
1202
+ this.providerId = "firebase", this.proactiveRefresh = new mi(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Me(s.createdAt || void 0, s.lastLoginAt || void 0);
1058
1203
  }
1059
1204
  async getIdToken(e) {
1060
- const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1205
+ const t = await ie(this, this.stsTokenManager.getToken(this.auth, e));
1061
1206
  return u(
1062
1207
  t,
1063
1208
  this.auth,
@@ -1066,10 +1211,10 @@ class b {
1066
1211
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1067
1212
  }
1068
1213
  getIdTokenResult(e) {
1069
- return Gn(this, e);
1214
+ return fi(this, e);
1070
1215
  }
1071
1216
  reload() {
1072
- return qn(this);
1217
+ return gi(this);
1073
1218
  }
1074
1219
  _assign(e) {
1075
1220
  this !== e && (u(
@@ -1080,7 +1225,7 @@ class b {
1080
1225
  ), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
1081
1226
  }
1082
1227
  _clone(e) {
1083
- const t = new b(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1228
+ const t = new C(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1084
1229
  return t.metadata._copy(this.metadata), t;
1085
1230
  }
1086
1231
  _onReload(e) {
@@ -1102,13 +1247,13 @@ class b {
1102
1247
  }
1103
1248
  async _updateTokensIfNecessary(e, t = !1) {
1104
1249
  let i = !1;
1105
- e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await le(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1250
+ e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await _e(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1106
1251
  }
1107
1252
  async delete() {
1108
- if (E(this.auth.app))
1109
- return Promise.reject(M(this.auth));
1253
+ if (A(this.auth.app))
1254
+ return Promise.reject($(this.auth));
1110
1255
  const e = await this.getIdToken();
1111
- return await K(this, jn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1256
+ return await ie(this, hi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1112
1257
  }
1113
1258
  toJSON() {
1114
1259
  return Object.assign(Object.assign({
@@ -1136,45 +1281,45 @@ class b {
1136
1281
  }
1137
1282
  static _fromJSON(e, t) {
1138
1283
  var i, r, s, o, c, a, l, d;
1139
- const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: We } = t;
1284
+ const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, m = (r = t.email) !== null && r !== void 0 ? r : void 0, v = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, w = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, g = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, I = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, T = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, M = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: k, emailVerified: Ke, isAnonymous: Je, providerData: Se, stsTokenManager: Ye } = t;
1140
1285
  u(
1141
- ve && We,
1286
+ k && Ye,
1142
1287
  e,
1143
1288
  "internal-error"
1144
1289
  /* AuthErrorCode.INTERNAL_ERROR */
1145
1290
  );
1146
- const Xt = $.fromJSON(this.name, We);
1291
+ const on = B.fromJSON(this.name, Ye);
1147
1292
  u(
1148
- typeof ve == "string",
1293
+ typeof k == "string",
1149
1294
  e,
1150
1295
  "internal-error"
1151
1296
  /* AuthErrorCode.INTERNAL_ERROR */
1152
- ), P(h, e.name), P(p, e.name), u(
1153
- typeof $e == "boolean",
1297
+ ), U(h, e.name), U(m, e.name), u(
1298
+ typeof Ke == "boolean",
1154
1299
  e,
1155
1300
  "internal-error"
1156
1301
  /* AuthErrorCode.INTERNAL_ERROR */
1157
1302
  ), u(
1158
- typeof He == "boolean",
1303
+ typeof Je == "boolean",
1159
1304
  e,
1160
1305
  "internal-error"
1161
1306
  /* AuthErrorCode.INTERNAL_ERROR */
1162
- ), P(w, e.name), P(U, e.name), P(m, e.name), P(g, e.name), P(I, e.name), P(x, e.name);
1163
- const Te = new b({
1164
- uid: ve,
1307
+ ), U(v, e.name), U(w, e.name), U(g, e.name), U(I, e.name), U(T, e.name), U(M, e.name);
1308
+ const Re = new C({
1309
+ uid: k,
1165
1310
  auth: e,
1166
- email: p,
1167
- emailVerified: $e,
1311
+ email: m,
1312
+ emailVerified: Ke,
1168
1313
  displayName: h,
1169
- isAnonymous: He,
1170
- photoURL: U,
1171
- phoneNumber: w,
1172
- tenantId: m,
1173
- stsTokenManager: Xt,
1174
- createdAt: I,
1175
- lastLoginAt: x
1314
+ isAnonymous: Je,
1315
+ photoURL: w,
1316
+ phoneNumber: v,
1317
+ tenantId: g,
1318
+ stsTokenManager: on,
1319
+ createdAt: T,
1320
+ lastLoginAt: M
1176
1321
  });
1177
- return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), g && (Te._redirectEventId = g), Te;
1322
+ return Se && Array.isArray(Se) && (Re.providerData = Se.map((an) => Object.assign({}, an))), I && (Re._redirectEventId = I), Re;
1178
1323
  }
1179
1324
  /**
1180
1325
  * Initialize a User from an idToken server response
@@ -1182,15 +1327,15 @@ class b {
1182
1327
  * @param idTokenResponse
1183
1328
  */
1184
1329
  static async _fromIdTokenResponse(e, t, i = !1) {
1185
- const r = new $();
1330
+ const r = new B();
1186
1331
  r.updateFromServerResponse(t);
1187
- const s = new b({
1332
+ const s = new C({
1188
1333
  uid: t.localId,
1189
1334
  auth: e,
1190
1335
  stsTokenManager: r,
1191
1336
  isAnonymous: i
1192
1337
  });
1193
- return await le(s), s;
1338
+ return await _e(s), s;
1194
1339
  }
1195
1340
  /**
1196
1341
  * Initialize a User from an idToken server response
@@ -1204,9 +1349,9 @@ class b {
1204
1349
  "internal-error"
1205
1350
  /* AuthErrorCode.INTERNAL_ERROR */
1206
1351
  );
1207
- const s = r.providerUserInfo !== void 0 ? Rt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1352
+ const s = r.providerUserInfo !== void 0 ? Ut(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new B();
1208
1353
  c.updateFromIdToken(i);
1209
- const a = new b({
1354
+ const a = new C({
1210
1355
  uid: r.localId,
1211
1356
  auth: e,
1212
1357
  stsTokenManager: c,
@@ -1220,7 +1365,7 @@ class b {
1220
1365
  phoneNumber: r.phoneNumber || null,
1221
1366
  tenantId: r.tenantId || null,
1222
1367
  providerData: s,
1223
- metadata: new Ae(r.createdAt, r.lastLoginAt),
1368
+ metadata: new Me(r.createdAt, r.lastLoginAt),
1224
1369
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1225
1370
  };
1226
1371
  return Object.assign(a, l), a;
@@ -1242,11 +1387,11 @@ class b {
1242
1387
  * See the License for the specific language governing permissions and
1243
1388
  * limitations under the License.
1244
1389
  */
1245
- const Xe = /* @__PURE__ */ new Map();
1246
- function S(n) {
1247
- A(n instanceof Function, "Expected a class definition");
1248
- let e = Xe.get(n);
1249
- return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Xe.set(n, e), e);
1390
+ const rt = /* @__PURE__ */ new Map();
1391
+ function N(n) {
1392
+ L(n instanceof Function, "Expected a class definition");
1393
+ let e = rt.get(n);
1394
+ return e ? (L(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), rt.set(n, e), e);
1250
1395
  }
1251
1396
  /**
1252
1397
  * @license
@@ -1264,7 +1409,7 @@ function S(n) {
1264
1409
  * See the License for the specific language governing permissions and
1265
1410
  * limitations under the License.
1266
1411
  */
1267
- class At {
1412
+ class Dt {
1268
1413
  constructor() {
1269
1414
  this.type = "NONE", this.storage = {};
1270
1415
  }
@@ -1286,8 +1431,8 @@ class At {
1286
1431
  _removeListener(e, t) {
1287
1432
  }
1288
1433
  }
1289
- At.type = "NONE";
1290
- const Qe = At;
1434
+ Dt.type = "NONE";
1435
+ const st = Dt;
1291
1436
  /**
1292
1437
  * @license
1293
1438
  * Copyright 2019 Google LLC
@@ -1304,21 +1449,21 @@ const Qe = At;
1304
1449
  * See the License for the specific language governing permissions and
1305
1450
  * limitations under the License.
1306
1451
  */
1307
- function se(n, e, t) {
1452
+ function de(n, e, t) {
1308
1453
  return `firebase:${n}:${e}:${t}`;
1309
1454
  }
1310
- class H {
1455
+ class z {
1311
1456
  constructor(e, t, i) {
1312
1457
  this.persistence = e, this.auth = t, this.userKey = i;
1313
1458
  const { config: r, name: s } = this.auth;
1314
- this.fullUserKey = se(this.userKey, r.apiKey, s), this.fullPersistenceKey = se("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1459
+ this.fullUserKey = de(this.userKey, r.apiKey, s), this.fullPersistenceKey = de("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1315
1460
  }
1316
1461
  setCurrentUser(e) {
1317
1462
  return this.persistence._set(this.fullUserKey, e.toJSON());
1318
1463
  }
1319
1464
  async getCurrentUser() {
1320
1465
  const e = await this.persistence._get(this.fullUserKey);
1321
- return e ? b._fromJSON(this.auth, e) : null;
1466
+ return e ? C._fromJSON(this.auth, e) : null;
1322
1467
  }
1323
1468
  removeCurrentUser() {
1324
1469
  return this.persistence._remove(this.fullUserKey);
@@ -1338,32 +1483,32 @@ class H {
1338
1483
  }
1339
1484
  static async create(e, t, i = "authUser") {
1340
1485
  if (!t.length)
1341
- return new H(S(Qe), e, i);
1486
+ return new z(N(st), e, i);
1342
1487
  const r = (await Promise.all(t.map(async (l) => {
1343
1488
  if (await l._isAvailable())
1344
1489
  return l;
1345
1490
  }))).filter((l) => l);
1346
- let s = r[0] || S(Qe);
1347
- const o = se(i, e.config.apiKey, e.name);
1491
+ let s = r[0] || N(st);
1492
+ const o = de(i, e.config.apiKey, e.name);
1348
1493
  let c = null;
1349
1494
  for (const l of t)
1350
1495
  try {
1351
1496
  const d = await l._get(o);
1352
1497
  if (d) {
1353
- const h = b._fromJSON(e, d);
1498
+ const h = C._fromJSON(e, d);
1354
1499
  l !== s && (c = h), s = l;
1355
1500
  break;
1356
1501
  }
1357
1502
  } catch {
1358
1503
  }
1359
1504
  const a = r.filter((l) => l._shouldAllowMigration);
1360
- return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1505
+ return !s._shouldAllowMigration || !a.length ? new z(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1361
1506
  if (l !== s)
1362
1507
  try {
1363
1508
  await l._remove(o);
1364
1509
  } catch {
1365
1510
  }
1366
- })), new H(s, e, i));
1511
+ })), new z(s, e, i));
1367
1512
  }
1368
1513
  }
1369
1514
  /**
@@ -1382,29 +1527,29 @@ class H {
1382
1527
  * See the License for the specific language governing permissions and
1383
1528
  * limitations under the License.
1384
1529
  */
1385
- function Ze(n) {
1530
+ function ot(n) {
1386
1531
  const e = n.toLowerCase();
1387
1532
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1388
1533
  return "Opera";
1389
- if (Ot(e))
1534
+ if (Vt(e))
1390
1535
  return "IEMobile";
1391
1536
  if (e.includes("msie") || e.includes("trident/"))
1392
1537
  return "IE";
1393
1538
  if (e.includes("edge/"))
1394
1539
  return "Edge";
1395
- if (Pt(e))
1540
+ if (xt(e))
1396
1541
  return "Firefox";
1397
1542
  if (e.includes("silk/"))
1398
1543
  return "Silk";
1399
- if (Lt(e))
1544
+ if (Ht(e))
1400
1545
  return "Blackberry";
1401
- if (Mt(e))
1546
+ if (jt(e))
1402
1547
  return "Webos";
1403
- if (De(e))
1548
+ if (Ge(e))
1404
1549
  return "Safari";
1405
- if ((e.includes("chrome/") || Ct(e)) && !e.includes("edge/"))
1550
+ if ((e.includes("chrome/") || Ft(e)) && !e.includes("edge/"))
1406
1551
  return "Chrome";
1407
- if (Nt(e))
1552
+ if ($t(e))
1408
1553
  return "Android";
1409
1554
  {
1410
1555
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1413,42 +1558,42 @@ function Ze(n) {
1413
1558
  }
1414
1559
  return "Other";
1415
1560
  }
1416
- function Pt(n = _()) {
1561
+ function xt(n = y()) {
1417
1562
  return /firefox\//i.test(n);
1418
1563
  }
1419
- function De(n = _()) {
1564
+ function Ge(n = y()) {
1420
1565
  const e = n.toLowerCase();
1421
1566
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1422
1567
  }
1423
- function Ct(n = _()) {
1568
+ function Ft(n = y()) {
1424
1569
  return /crios\//i.test(n);
1425
1570
  }
1426
- function Ot(n = _()) {
1571
+ function Vt(n = y()) {
1427
1572
  return /iemobile/i.test(n);
1428
1573
  }
1429
- function Nt(n = _()) {
1574
+ function $t(n = y()) {
1430
1575
  return /android/i.test(n);
1431
1576
  }
1432
- function Lt(n = _()) {
1577
+ function Ht(n = y()) {
1433
1578
  return /blackberry/i.test(n);
1434
1579
  }
1435
- function Mt(n = _()) {
1580
+ function jt(n = y()) {
1436
1581
  return /webos/i.test(n);
1437
1582
  }
1438
- function pe(n = _()) {
1583
+ function Te(n = y()) {
1439
1584
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1440
1585
  }
1441
- function Xn(n = _()) {
1586
+ function yi(n = y()) {
1442
1587
  var e;
1443
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1588
+ return Te(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1444
1589
  }
1445
- function Qn() {
1446
- return kn() && document.documentMode === 10;
1590
+ function wi() {
1591
+ return Pn() && document.documentMode === 10;
1447
1592
  }
1448
- function Ut(n = _()) {
1449
- return pe(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
1593
+ function Wt(n = y()) {
1594
+ return Te(n) || $t(n) || jt(n) || Ht(n) || /windows phone/i.test(n) || Vt(n);
1450
1595
  }
1451
- function Zn() {
1596
+ function Ti() {
1452
1597
  try {
1453
1598
  return !!(window && window !== window.top);
1454
1599
  } catch {
@@ -1471,20 +1616,20 @@ function Zn() {
1471
1616
  * See the License for the specific language governing permissions and
1472
1617
  * limitations under the License.
1473
1618
  */
1474
- function Dt(n, e = []) {
1619
+ function Gt(n, e = []) {
1475
1620
  let t;
1476
1621
  switch (n) {
1477
1622
  case "Browser":
1478
- t = Ze(_());
1623
+ t = ot(y());
1479
1624
  break;
1480
1625
  case "Worker":
1481
- t = `${Ze(_())}-${n}`;
1626
+ t = `${ot(y())}-${n}`;
1482
1627
  break;
1483
1628
  default:
1484
1629
  t = n;
1485
1630
  }
1486
1631
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1487
- return `${t}/JsCore/${J}/${i}`;
1632
+ return `${t}/JsCore/${re}/${i}`;
1488
1633
  }
1489
1634
  /**
1490
1635
  * @license
@@ -1502,7 +1647,7 @@ function Dt(n, e = []) {
1502
1647
  * See the License for the specific language governing permissions and
1503
1648
  * limitations under the License.
1504
1649
  */
1505
- class ei {
1650
+ class ki {
1506
1651
  constructor(e) {
1507
1652
  this.auth = e, this.queue = [];
1508
1653
  }
@@ -1557,8 +1702,8 @@ class ei {
1557
1702
  * See the License for the specific language governing permissions and
1558
1703
  * limitations under the License.
1559
1704
  */
1560
- async function ti(n, e = {}) {
1561
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1705
+ async function Ei(n, e = {}) {
1706
+ return J(n, "GET", "/v2/passwordPolicy", we(n, e));
1562
1707
  }
1563
1708
  /**
1564
1709
  * @license
@@ -1576,12 +1721,12 @@ async function ti(n, e = {}) {
1576
1721
  * See the License for the specific language governing permissions and
1577
1722
  * limitations under the License.
1578
1723
  */
1579
- const ni = 6;
1580
- class ii {
1724
+ const bi = 6;
1725
+ class Si {
1581
1726
  constructor(e) {
1582
1727
  var t, i, r, s;
1583
1728
  const o = e.customStrengthOptions;
1584
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ni, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1729
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : bi, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1585
1730
  }
1586
1731
  validatePassword(e) {
1587
1732
  var t, i, r, s, o, c;
@@ -1664,14 +1809,14 @@ class ii {
1664
1809
  * See the License for the specific language governing permissions and
1665
1810
  * limitations under the License.
1666
1811
  */
1667
- class ri {
1812
+ class Ri {
1668
1813
  constructor(e, t, i, r) {
1669
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new et(this), this.idTokenSubscription = new et(this), this.beforeStateQueue = new ei(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = Tt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
1814
+ this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new ki(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = At, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
1670
1815
  }
1671
1816
  _initializeWithPersistence(e, t) {
1672
- return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
1817
+ return t && (this._popupRedirectResolver = N(t)), this._initializationPromise = this.queue(async () => {
1673
1818
  var i, r;
1674
- if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1819
+ if (!this._deleted && (this.persistenceManager = await z.create(this, e), !this._deleted)) {
1675
1820
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
1676
1821
  try {
1677
1822
  await this._popupRedirectResolver._initialize(this);
@@ -1702,7 +1847,7 @@ class ri {
1702
1847
  }
1703
1848
  async initializeCurrentUserFromIdToken(e) {
1704
1849
  try {
1705
- const t = await St(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1850
+ const t = await Mt(this, { idToken: e }), i = await C._fromGetAccountInfoResponse(this, t, e);
1706
1851
  await this.directlySetCurrentUser(i);
1707
1852
  } catch (t) {
1708
1853
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1710,7 +1855,7 @@ class ri {
1710
1855
  }
1711
1856
  async initializeCurrentUser(e) {
1712
1857
  var t;
1713
- if (E(this.app)) {
1858
+ if (A(this.app)) {
1714
1859
  const o = this.app.settings.authIdToken;
1715
1860
  return o ? new Promise((c) => {
1716
1861
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -1752,7 +1897,7 @@ class ri {
1752
1897
  }
1753
1898
  async reloadAndSetCurrentUserOrClear(e) {
1754
1899
  try {
1755
- await le(e);
1900
+ await _e(e);
1756
1901
  } catch (t) {
1757
1902
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1758
1903
  return this.directlySetCurrentUser(null);
@@ -1760,15 +1905,15 @@ class ri {
1760
1905
  return this.directlySetCurrentUser(e);
1761
1906
  }
1762
1907
  useDeviceLanguage() {
1763
- this.languageCode = Vn();
1908
+ this.languageCode = ci();
1764
1909
  }
1765
1910
  async _delete() {
1766
1911
  this._deleted = !0;
1767
1912
  }
1768
1913
  async updateCurrentUser(e) {
1769
- if (E(this.app))
1770
- return Promise.reject(M(this));
1771
- const t = e ? j(e) : null;
1914
+ if (A(this.app))
1915
+ return Promise.reject($(this));
1916
+ const t = e ? K(e) : null;
1772
1917
  return t && u(
1773
1918
  t.auth.config.apiKey === this.config.apiKey,
1774
1919
  this,
@@ -1788,15 +1933,15 @@ class ri {
1788
1933
  });
1789
1934
  }
1790
1935
  async signOut() {
1791
- return E(this.app) ? Promise.reject(M(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1936
+ return A(this.app) ? Promise.reject($(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1792
1937
  null,
1793
1938
  /* skipBeforeStateCallbacks */
1794
1939
  !0
1795
1940
  ));
1796
1941
  }
1797
1942
  setPersistence(e) {
1798
- return E(this.app) ? Promise.reject(M(this)) : this.queue(async () => {
1799
- await this.assertedPersistence.setPersistence(S(e));
1943
+ return A(this.app) ? Promise.reject($(this)) : this.queue(async () => {
1944
+ await this.assertedPersistence.setPersistence(N(e));
1800
1945
  });
1801
1946
  }
1802
1947
  _getRecaptchaConfig() {
@@ -1811,14 +1956,14 @@ class ri {
1811
1956
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1812
1957
  }
1813
1958
  async _updatePasswordPolicy() {
1814
- const e = await ti(this), t = new ii(e);
1959
+ const e = await Ei(this), t = new Si(e);
1815
1960
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1816
1961
  }
1817
1962
  _getPersistence() {
1818
1963
  return this.assertedPersistence.persistence.type;
1819
1964
  }
1820
1965
  _updateErrorMap(e) {
1821
- this._errorFactory = new Ce("auth", "Firebase", e());
1966
+ this._errorFactory = new Fe("auth", "Firebase", e());
1822
1967
  }
1823
1968
  onAuthStateChanged(e, t, i) {
1824
1969
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1851,7 +1996,7 @@ class ri {
1851
1996
  token: e,
1852
1997
  idToken: t
1853
1998
  };
1854
- this.tenantId != null && (i.tenantId = this.tenantId), await Yn(this, i);
1999
+ this.tenantId != null && (i.tenantId = this.tenantId), await Ii(this, i);
1855
2000
  }
1856
2001
  }
1857
2002
  toJSON() {
@@ -1869,15 +2014,15 @@ class ri {
1869
2014
  }
1870
2015
  async getOrInitRedirectPersistenceManager(e) {
1871
2016
  if (!this.redirectPersistenceManager) {
1872
- const t = e && S(e) || this._popupRedirectResolver;
2017
+ const t = e && N(e) || this._popupRedirectResolver;
1873
2018
  u(
1874
2019
  t,
1875
2020
  this,
1876
2021
  "argument-error"
1877
2022
  /* AuthErrorCode.ARGUMENT_ERROR */
1878
- ), this.redirectPersistenceManager = await H.create(
2023
+ ), this.redirectPersistenceManager = await z.create(
1879
2024
  this,
1880
- [S(t._redirectPersistence)],
2025
+ [N(t._redirectPersistence)],
1881
2026
  "redirectUser"
1882
2027
  /* KeyName.REDIRECT_USER */
1883
2028
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -1964,7 +2109,7 @@ class ri {
1964
2109
  ), this.persistenceManager;
1965
2110
  }
1966
2111
  _logFramework(e) {
1967
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Dt(this.config.clientPlatform, this._getFrameworks()));
2112
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Gt(this.config.clientPlatform, this._getFrameworks()));
1968
2113
  }
1969
2114
  _getFrameworks() {
1970
2115
  return this.frameworks;
@@ -1994,15 +2139,15 @@ class ri {
1994
2139
  async _getAppCheckToken() {
1995
2140
  var e;
1996
2141
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
1997
- return t != null && t.error && Dn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
2142
+ return t != null && t.error && si(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1998
2143
  }
1999
2144
  }
2000
- function me(n) {
2001
- return j(n);
2145
+ function ke(n) {
2146
+ return K(n);
2002
2147
  }
2003
- class et {
2148
+ class at {
2004
2149
  constructor(e) {
2005
- this.auth = e, this.observer = null, this.addObserver = In((t) => this.observer = t);
2150
+ this.auth = e, this.observer = null, this.addObserver = En((t) => this.observer = t);
2006
2151
  }
2007
2152
  get next() {
2008
2153
  return u(
@@ -2029,7 +2174,7 @@ class et {
2029
2174
  * See the License for the specific language governing permissions and
2030
2175
  * limitations under the License.
2031
2176
  */
2032
- let Fe = {
2177
+ let Be = {
2033
2178
  async loadJS() {
2034
2179
  throw new Error("Unable to load external scripts");
2035
2180
  },
@@ -2037,16 +2182,16 @@ let Fe = {
2037
2182
  recaptchaEnterpriseScript: "",
2038
2183
  gapiScript: ""
2039
2184
  };
2040
- function si(n) {
2041
- Fe = n;
2185
+ function Ai(n) {
2186
+ Be = n;
2042
2187
  }
2043
- function oi(n) {
2044
- return Fe.loadJS(n);
2188
+ function Pi(n) {
2189
+ return Be.loadJS(n);
2045
2190
  }
2046
- function ai() {
2047
- return Fe.gapiScript;
2191
+ function Ci() {
2192
+ return Be.gapiScript;
2048
2193
  }
2049
- function ci(n) {
2194
+ function Ni(n) {
2050
2195
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2051
2196
  }
2052
2197
  /**
@@ -2065,13 +2210,13 @@ function ci(n) {
2065
2210
  * See the License for the specific language governing permissions and
2066
2211
  * limitations under the License.
2067
2212
  */
2068
- function li(n, e) {
2069
- const t = _t(n, "auth");
2213
+ function Oi(n, e) {
2214
+ const t = Et(n, "auth");
2070
2215
  if (t.isInitialized()) {
2071
2216
  const r = t.getImmediate(), s = t.getOptions();
2072
- if (wn(s, e ?? {}))
2217
+ if (Rn(s, e ?? {}))
2073
2218
  return r;
2074
- R(
2219
+ O(
2075
2220
  r,
2076
2221
  "already-initialized"
2077
2222
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2079,12 +2224,12 @@ function li(n, e) {
2079
2224
  }
2080
2225
  return t.initialize({ options: e });
2081
2226
  }
2082
- function ui(n, e) {
2083
- const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2227
+ function Li(n, e) {
2228
+ const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(N);
2084
2229
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2085
2230
  }
2086
- function di(n, e, t) {
2087
- const i = me(n);
2231
+ function Mi(n, e, t) {
2232
+ const i = ke(n);
2088
2233
  u(
2089
2234
  i._canInitEmulator,
2090
2235
  i,
@@ -2096,38 +2241,38 @@ function di(n, e, t) {
2096
2241
  "invalid-emulator-scheme"
2097
2242
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2098
2243
  );
2099
- const r = !1, s = Ft(e), { host: o, port: c } = hi(e), a = c === null ? "" : `:${c}`;
2244
+ const r = !1, s = Bt(e), { host: o, port: c } = Ui(e), a = c === null ? "" : `:${c}`;
2100
2245
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2101
2246
  host: o,
2102
2247
  port: c,
2103
2248
  protocol: s.replace(":", ""),
2104
2249
  options: Object.freeze({ disableWarnings: r })
2105
- }), fi();
2250
+ }), Di();
2106
2251
  }
2107
- function Ft(n) {
2252
+ function Bt(n) {
2108
2253
  const e = n.indexOf(":");
2109
2254
  return e < 0 ? "" : n.substr(0, e + 1);
2110
2255
  }
2111
- function hi(n) {
2112
- const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2256
+ function Ui(n) {
2257
+ const e = Bt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
2258
  if (!t)
2114
2259
  return { host: "", port: null };
2115
2260
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2116
2261
  if (r) {
2117
2262
  const s = r[1];
2118
- return { host: s, port: tt(i.substr(s.length + 1)) };
2263
+ return { host: s, port: ct(i.substr(s.length + 1)) };
2119
2264
  } else {
2120
2265
  const [s, o] = i.split(":");
2121
- return { host: s, port: tt(o) };
2266
+ return { host: s, port: ct(o) };
2122
2267
  }
2123
2268
  }
2124
- function tt(n) {
2269
+ function ct(n) {
2125
2270
  if (!n)
2126
2271
  return null;
2127
2272
  const e = Number(n);
2128
2273
  return isNaN(e) ? null : e;
2129
2274
  }
2130
- function fi() {
2275
+ function Di() {
2131
2276
  function n() {
2132
2277
  const e = document.createElement("p"), t = e.style;
2133
2278
  e.innerText = "Running in emulator mode. Do not use with production credentials.", t.position = "fixed", t.width = "100%", t.backgroundColor = "#ffffff", t.border = ".1em solid #000000", t.color = "#b50000", t.bottom = "0px", t.left = "0px", t.margin = "0px", t.zIndex = "10000", t.textAlign = "center", e.classList.add("firebase-emulator-warning"), document.body.appendChild(e);
@@ -2150,7 +2295,7 @@ function fi() {
2150
2295
  * See the License for the specific language governing permissions and
2151
2296
  * limitations under the License.
2152
2297
  */
2153
- class xt {
2298
+ class zt {
2154
2299
  /** @internal */
2155
2300
  constructor(e, t) {
2156
2301
  this.providerId = e, this.signInMethod = t;
@@ -2161,19 +2306,19 @@ class xt {
2161
2306
  * @returns a JSON-serializable representation of this object.
2162
2307
  */
2163
2308
  toJSON() {
2164
- return k("not implemented");
2309
+ return P("not implemented");
2165
2310
  }
2166
2311
  /** @internal */
2167
2312
  _getIdTokenResponse(e) {
2168
- return k("not implemented");
2313
+ return P("not implemented");
2169
2314
  }
2170
2315
  /** @internal */
2171
2316
  _linkToIdToken(e, t) {
2172
- return k("not implemented");
2317
+ return P("not implemented");
2173
2318
  }
2174
2319
  /** @internal */
2175
2320
  _getReauthenticationResolver(e) {
2176
- return k("not implemented");
2321
+ return P("not implemented");
2177
2322
  }
2178
2323
  }
2179
2324
  /**
@@ -2192,8 +2337,8 @@ class xt {
2192
2337
  * See the License for the specific language governing permissions and
2193
2338
  * limitations under the License.
2194
2339
  */
2195
- async function W(n, e) {
2196
- return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2340
+ async function q(n, e) {
2341
+ return Ot(n, "POST", "/v1/accounts:signInWithIdp", we(n, e));
2197
2342
  }
2198
2343
  /**
2199
2344
  * @license
@@ -2211,15 +2356,15 @@ async function W(n, e) {
2211
2356
  * See the License for the specific language governing permissions and
2212
2357
  * limitations under the License.
2213
2358
  */
2214
- const pi = "http://localhost";
2215
- class D extends xt {
2359
+ const xi = "http://localhost";
2360
+ class j extends zt {
2216
2361
  constructor() {
2217
2362
  super(...arguments), this.pendingToken = null;
2218
2363
  }
2219
2364
  /** @internal */
2220
2365
  static _fromParams(e) {
2221
- const t = new D(e.providerId, e.signInMethod);
2222
- return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : R(
2366
+ const t = new j(e.providerId, e.signInMethod);
2367
+ return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : O(
2223
2368
  "argument-error"
2224
2369
  /* AuthErrorCode.ARGUMENT_ERROR */
2225
2370
  ), t;
@@ -2246,37 +2391,37 @@ class D extends xt {
2246
2391
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2247
2392
  */
2248
2393
  static fromJSON(e) {
2249
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
2394
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = $e(t, ["providerId", "signInMethod"]);
2250
2395
  if (!i || !r)
2251
2396
  return null;
2252
- const o = new D(i, r);
2397
+ const o = new j(i, r);
2253
2398
  return o.idToken = s.idToken || void 0, o.accessToken = s.accessToken || void 0, o.secret = s.secret, o.nonce = s.nonce, o.pendingToken = s.pendingToken || null, o;
2254
2399
  }
2255
2400
  /** @internal */
2256
2401
  _getIdTokenResponse(e) {
2257
2402
  const t = this.buildRequest();
2258
- return W(e, t);
2403
+ return q(e, t);
2259
2404
  }
2260
2405
  /** @internal */
2261
2406
  _linkToIdToken(e, t) {
2262
2407
  const i = this.buildRequest();
2263
- return i.idToken = t, W(e, i);
2408
+ return i.idToken = t, q(e, i);
2264
2409
  }
2265
2410
  /** @internal */
2266
2411
  _getReauthenticationResolver(e) {
2267
2412
  const t = this.buildRequest();
2268
- return t.autoCreate = !1, W(e, t);
2413
+ return t.autoCreate = !1, q(e, t);
2269
2414
  }
2270
2415
  buildRequest() {
2271
2416
  const e = {
2272
- requestUri: pi,
2417
+ requestUri: xi,
2273
2418
  returnSecureToken: !0
2274
2419
  };
2275
2420
  if (this.pendingToken)
2276
2421
  e.pendingToken = this.pendingToken;
2277
2422
  else {
2278
2423
  const t = {};
2279
- this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Y(t);
2424
+ this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = se(t);
2280
2425
  }
2281
2426
  return e;
2282
2427
  }
@@ -2297,7 +2442,7 @@ class D extends xt {
2297
2442
  * See the License for the specific language governing permissions and
2298
2443
  * limitations under the License.
2299
2444
  */
2300
- class Vt {
2445
+ class qt {
2301
2446
  /**
2302
2447
  * Constructor for generic OAuth providers.
2303
2448
  *
@@ -2350,7 +2495,7 @@ class Vt {
2350
2495
  * See the License for the specific language governing permissions and
2351
2496
  * limitations under the License.
2352
2497
  */
2353
- class Q extends Vt {
2498
+ class ae extends qt {
2354
2499
  constructor() {
2355
2500
  super(...arguments), this.scopes = [];
2356
2501
  }
@@ -2385,7 +2530,7 @@ class Q extends Vt {
2385
2530
  * See the License for the specific language governing permissions and
2386
2531
  * limitations under the License.
2387
2532
  */
2388
- class C extends Q {
2533
+ class D extends ae {
2389
2534
  constructor() {
2390
2535
  super(
2391
2536
  "facebook.com"
@@ -2405,9 +2550,9 @@ class C extends Q {
2405
2550
  * @param accessToken - Facebook access token.
2406
2551
  */
2407
2552
  static credential(e) {
2408
- return D._fromParams({
2409
- providerId: C.PROVIDER_ID,
2410
- signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
2553
+ return j._fromParams({
2554
+ providerId: D.PROVIDER_ID,
2555
+ signInMethod: D.FACEBOOK_SIGN_IN_METHOD,
2411
2556
  accessToken: e
2412
2557
  });
2413
2558
  }
@@ -2417,7 +2562,7 @@ class C extends Q {
2417
2562
  * @param userCredential - The user credential.
2418
2563
  */
2419
2564
  static credentialFromResult(e) {
2420
- return C.credentialFromTaggedObject(e);
2565
+ return D.credentialFromTaggedObject(e);
2421
2566
  }
2422
2567
  /**
2423
2568
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2426,20 +2571,20 @@ class C extends Q {
2426
2571
  * @param userCredential - The user credential.
2427
2572
  */
2428
2573
  static credentialFromError(e) {
2429
- return C.credentialFromTaggedObject(e.customData || {});
2574
+ return D.credentialFromTaggedObject(e.customData || {});
2430
2575
  }
2431
2576
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2432
2577
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2433
2578
  return null;
2434
2579
  try {
2435
- return C.credential(e.oauthAccessToken);
2580
+ return D.credential(e.oauthAccessToken);
2436
2581
  } catch {
2437
2582
  return null;
2438
2583
  }
2439
2584
  }
2440
2585
  }
2441
- C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2442
- C.PROVIDER_ID = "facebook.com";
2586
+ D.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2587
+ D.PROVIDER_ID = "facebook.com";
2443
2588
  /**
2444
2589
  * @license
2445
2590
  * Copyright 2020 Google LLC
@@ -2456,7 +2601,7 @@ C.PROVIDER_ID = "facebook.com";
2456
2601
  * See the License for the specific language governing permissions and
2457
2602
  * limitations under the License.
2458
2603
  */
2459
- class O extends Q {
2604
+ class x extends ae {
2460
2605
  constructor() {
2461
2606
  super(
2462
2607
  "google.com"
@@ -2477,9 +2622,9 @@ class O extends Q {
2477
2622
  * @param accessToken - Google access token.
2478
2623
  */
2479
2624
  static credential(e, t) {
2480
- return D._fromParams({
2481
- providerId: O.PROVIDER_ID,
2482
- signInMethod: O.GOOGLE_SIGN_IN_METHOD,
2625
+ return j._fromParams({
2626
+ providerId: x.PROVIDER_ID,
2627
+ signInMethod: x.GOOGLE_SIGN_IN_METHOD,
2483
2628
  idToken: e,
2484
2629
  accessToken: t
2485
2630
  });
@@ -2490,7 +2635,7 @@ class O extends Q {
2490
2635
  * @param userCredential - The user credential.
2491
2636
  */
2492
2637
  static credentialFromResult(e) {
2493
- return O.credentialFromTaggedObject(e);
2638
+ return x.credentialFromTaggedObject(e);
2494
2639
  }
2495
2640
  /**
2496
2641
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2499,7 +2644,7 @@ class O extends Q {
2499
2644
  * @param userCredential - The user credential.
2500
2645
  */
2501
2646
  static credentialFromError(e) {
2502
- return O.credentialFromTaggedObject(e.customData || {});
2647
+ return x.credentialFromTaggedObject(e.customData || {});
2503
2648
  }
2504
2649
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2505
2650
  if (!e)
@@ -2508,14 +2653,14 @@ class O extends Q {
2508
2653
  if (!t && !i)
2509
2654
  return null;
2510
2655
  try {
2511
- return O.credential(t, i);
2656
+ return x.credential(t, i);
2512
2657
  } catch {
2513
2658
  return null;
2514
2659
  }
2515
2660
  }
2516
2661
  }
2517
- O.GOOGLE_SIGN_IN_METHOD = "google.com";
2518
- O.PROVIDER_ID = "google.com";
2662
+ x.GOOGLE_SIGN_IN_METHOD = "google.com";
2663
+ x.PROVIDER_ID = "google.com";
2519
2664
  /**
2520
2665
  * @license
2521
2666
  * Copyright 2020 Google LLC
@@ -2532,7 +2677,7 @@ O.PROVIDER_ID = "google.com";
2532
2677
  * See the License for the specific language governing permissions and
2533
2678
  * limitations under the License.
2534
2679
  */
2535
- class N extends Q {
2680
+ class F extends ae {
2536
2681
  constructor() {
2537
2682
  super(
2538
2683
  "github.com"
@@ -2545,9 +2690,9 @@ class N extends Q {
2545
2690
  * @param accessToken - Github access token.
2546
2691
  */
2547
2692
  static credential(e) {
2548
- return D._fromParams({
2549
- providerId: N.PROVIDER_ID,
2550
- signInMethod: N.GITHUB_SIGN_IN_METHOD,
2693
+ return j._fromParams({
2694
+ providerId: F.PROVIDER_ID,
2695
+ signInMethod: F.GITHUB_SIGN_IN_METHOD,
2551
2696
  accessToken: e
2552
2697
  });
2553
2698
  }
@@ -2557,7 +2702,7 @@ class N extends Q {
2557
2702
  * @param userCredential - The user credential.
2558
2703
  */
2559
2704
  static credentialFromResult(e) {
2560
- return N.credentialFromTaggedObject(e);
2705
+ return F.credentialFromTaggedObject(e);
2561
2706
  }
2562
2707
  /**
2563
2708
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2566,20 +2711,20 @@ class N extends Q {
2566
2711
  * @param userCredential - The user credential.
2567
2712
  */
2568
2713
  static credentialFromError(e) {
2569
- return N.credentialFromTaggedObject(e.customData || {});
2714
+ return F.credentialFromTaggedObject(e.customData || {});
2570
2715
  }
2571
2716
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2572
2717
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2573
2718
  return null;
2574
2719
  try {
2575
- return N.credential(e.oauthAccessToken);
2720
+ return F.credential(e.oauthAccessToken);
2576
2721
  } catch {
2577
2722
  return null;
2578
2723
  }
2579
2724
  }
2580
2725
  }
2581
- N.GITHUB_SIGN_IN_METHOD = "github.com";
2582
- N.PROVIDER_ID = "github.com";
2726
+ F.GITHUB_SIGN_IN_METHOD = "github.com";
2727
+ F.PROVIDER_ID = "github.com";
2583
2728
  /**
2584
2729
  * @license
2585
2730
  * Copyright 2020 Google LLC
@@ -2596,7 +2741,7 @@ N.PROVIDER_ID = "github.com";
2596
2741
  * See the License for the specific language governing permissions and
2597
2742
  * limitations under the License.
2598
2743
  */
2599
- class L extends Q {
2744
+ class V extends ae {
2600
2745
  constructor() {
2601
2746
  super(
2602
2747
  "twitter.com"
@@ -2610,9 +2755,9 @@ class L extends Q {
2610
2755
  * @param secret - Twitter secret.
2611
2756
  */
2612
2757
  static credential(e, t) {
2613
- return D._fromParams({
2614
- providerId: L.PROVIDER_ID,
2615
- signInMethod: L.TWITTER_SIGN_IN_METHOD,
2758
+ return j._fromParams({
2759
+ providerId: V.PROVIDER_ID,
2760
+ signInMethod: V.TWITTER_SIGN_IN_METHOD,
2616
2761
  oauthToken: e,
2617
2762
  oauthTokenSecret: t
2618
2763
  });
@@ -2623,7 +2768,7 @@ class L extends Q {
2623
2768
  * @param userCredential - The user credential.
2624
2769
  */
2625
2770
  static credentialFromResult(e) {
2626
- return L.credentialFromTaggedObject(e);
2771
+ return V.credentialFromTaggedObject(e);
2627
2772
  }
2628
2773
  /**
2629
2774
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2632,7 +2777,7 @@ class L extends Q {
2632
2777
  * @param userCredential - The user credential.
2633
2778
  */
2634
2779
  static credentialFromError(e) {
2635
- return L.credentialFromTaggedObject(e.customData || {});
2780
+ return V.credentialFromTaggedObject(e.customData || {});
2636
2781
  }
2637
2782
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2638
2783
  if (!e)
@@ -2641,14 +2786,14 @@ class L extends Q {
2641
2786
  if (!t || !i)
2642
2787
  return null;
2643
2788
  try {
2644
- return L.credential(t, i);
2789
+ return V.credential(t, i);
2645
2790
  } catch {
2646
2791
  return null;
2647
2792
  }
2648
2793
  }
2649
2794
  }
2650
- L.TWITTER_SIGN_IN_METHOD = "twitter.com";
2651
- L.PROVIDER_ID = "twitter.com";
2795
+ V.TWITTER_SIGN_IN_METHOD = "twitter.com";
2796
+ V.PROVIDER_ID = "twitter.com";
2652
2797
  /**
2653
2798
  * @license
2654
2799
  * Copyright 2020 Google LLC
@@ -2665,13 +2810,13 @@ L.PROVIDER_ID = "twitter.com";
2665
2810
  * See the License for the specific language governing permissions and
2666
2811
  * limitations under the License.
2667
2812
  */
2668
- class F {
2813
+ class W {
2669
2814
  constructor(e) {
2670
2815
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2671
2816
  }
2672
2817
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2673
- const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
2674
- return new F({
2818
+ const s = await C._fromIdTokenResponse(e, i, r), o = lt(i);
2819
+ return new W({
2675
2820
  user: s,
2676
2821
  providerId: o,
2677
2822
  _tokenResponse: i,
@@ -2684,8 +2829,8 @@ class F {
2684
2829
  /* reload */
2685
2830
  !0
2686
2831
  );
2687
- const r = nt(i);
2688
- return new F({
2832
+ const r = lt(i);
2833
+ return new W({
2689
2834
  user: e,
2690
2835
  providerId: r,
2691
2836
  _tokenResponse: i,
@@ -2693,7 +2838,7 @@ class F {
2693
2838
  });
2694
2839
  }
2695
2840
  }
2696
- function nt(n) {
2841
+ function lt(n) {
2697
2842
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2698
2843
  }
2699
2844
  /**
@@ -2712,10 +2857,10 @@ function nt(n) {
2712
2857
  * See the License for the specific language governing permissions and
2713
2858
  * limitations under the License.
2714
2859
  */
2715
- class ue extends Oe {
2860
+ class ve extends Ve {
2716
2861
  constructor(e, t, i, r) {
2717
2862
  var s;
2718
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2863
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ve.prototype), this.customData = {
2719
2864
  appName: e.name,
2720
2865
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2721
2866
  _serverResponse: t.customData._serverResponse,
@@ -2723,17 +2868,17 @@ class ue extends Oe {
2723
2868
  };
2724
2869
  }
2725
2870
  static _fromErrorAndOperation(e, t, i, r) {
2726
- return new ue(e, t, i, r);
2871
+ return new ve(e, t, i, r);
2727
2872
  }
2728
2873
  }
2729
- function $t(n, e, t, i) {
2874
+ function Kt(n, e, t, i) {
2730
2875
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
2731
- throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
2876
+ throw s.code === "auth/multi-factor-auth-required" ? ve._fromErrorAndOperation(n, s, e, i) : s;
2732
2877
  });
2733
2878
  }
2734
- async function mi(n, e, t = !1) {
2735
- const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
- return F._forOperation(n, "link", i);
2879
+ async function Fi(n, e, t = !1) {
2880
+ const i = await ie(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2881
+ return W._forOperation(n, "link", i);
2737
2882
  }
2738
2883
  /**
2739
2884
  * @license
@@ -2751,20 +2896,20 @@ async function mi(n, e, t = !1) {
2751
2896
  * See the License for the specific language governing permissions and
2752
2897
  * limitations under the License.
2753
2898
  */
2754
- async function gi(n, e, t = !1) {
2899
+ async function Vi(n, e, t = !1) {
2755
2900
  const { auth: i } = n;
2756
- if (E(i.app))
2757
- return Promise.reject(M(i));
2901
+ if (A(i.app))
2902
+ return Promise.reject($(i));
2758
2903
  const r = "reauthenticate";
2759
2904
  try {
2760
- const s = await K(n, $t(i, r, e, n), t);
2905
+ const s = await ie(n, Kt(i, r, e, n), t);
2761
2906
  u(
2762
2907
  s.idToken,
2763
2908
  i,
2764
2909
  "internal-error"
2765
2910
  /* AuthErrorCode.INTERNAL_ERROR */
2766
2911
  );
2767
- const o = Ue(s.idToken);
2912
+ const o = We(s.idToken);
2768
2913
  u(
2769
2914
  o,
2770
2915
  i,
@@ -2777,9 +2922,9 @@ async function gi(n, e, t = !1) {
2777
2922
  i,
2778
2923
  "user-mismatch"
2779
2924
  /* AuthErrorCode.USER_MISMATCH */
2780
- ), F._forOperation(n, r, s);
2925
+ ), W._forOperation(n, r, s);
2781
2926
  } catch (s) {
2782
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
2927
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && O(
2783
2928
  i,
2784
2929
  "user-mismatch"
2785
2930
  /* AuthErrorCode.USER_MISMATCH */
@@ -2802,10 +2947,10 @@ async function gi(n, e, t = !1) {
2802
2947
  * See the License for the specific language governing permissions and
2803
2948
  * limitations under the License.
2804
2949
  */
2805
- async function _i(n, e, t = !1) {
2806
- if (E(n.app))
2807
- return Promise.reject(M(n));
2808
- const i = "signIn", r = await $t(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2950
+ async function $i(n, e, t = !1) {
2951
+ if (A(n.app))
2952
+ return Promise.reject($(n));
2953
+ const i = "signIn", r = await Kt(n, i, e), s = await W._fromIdTokenResponse(n, i, r);
2809
2954
  return t || await n._updateCurrentUser(s.user), s;
2810
2955
  }
2811
2956
  /**
@@ -2824,8 +2969,8 @@ async function _i(n, e, t = !1) {
2824
2969
  * See the License for the specific language governing permissions and
2825
2970
  * limitations under the License.
2826
2971
  */
2827
- async function vi(n, e) {
2828
- return kt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2972
+ async function Hi(n, e) {
2973
+ return Ot(n, "POST", "/v1/accounts:signInWithCustomToken", we(n, e));
2829
2974
  }
2830
2975
  /**
2831
2976
  * @license
@@ -2843,22 +2988,22 @@ async function vi(n, e) {
2843
2988
  * See the License for the specific language governing permissions and
2844
2989
  * limitations under the License.
2845
2990
  */
2846
- async function Ii(n, e) {
2847
- if (E(n.app))
2848
- return Promise.reject(M(n));
2849
- const t = me(n), i = await vi(t, {
2991
+ async function ji(n, e) {
2992
+ if (A(n.app))
2993
+ return Promise.reject($(n));
2994
+ const t = ke(n), i = await Hi(t, {
2850
2995
  token: e,
2851
2996
  returnSecureToken: !0
2852
- }), r = await F._fromIdTokenResponse(t, "signIn", i);
2997
+ }), r = await W._fromIdTokenResponse(t, "signIn", i);
2853
2998
  return await t._updateCurrentUser(r.user), r;
2854
2999
  }
2855
- function Ti(n, e, t, i) {
2856
- return j(n).onIdTokenChanged(e, t, i);
3000
+ function Wi(n, e, t, i) {
3001
+ return K(n).onIdTokenChanged(e, t, i);
2857
3002
  }
2858
- function yi(n, e, t) {
2859
- return j(n).beforeAuthStateChanged(e, t);
3003
+ function Gi(n, e, t) {
3004
+ return K(n).beforeAuthStateChanged(e, t);
2860
3005
  }
2861
- const de = "__sak";
3006
+ const Ie = "__sak";
2862
3007
  /**
2863
3008
  * @license
2864
3009
  * Copyright 2019 Google LLC
@@ -2875,13 +3020,13 @@ const de = "__sak";
2875
3020
  * See the License for the specific language governing permissions and
2876
3021
  * limitations under the License.
2877
3022
  */
2878
- class Ht {
3023
+ class Jt {
2879
3024
  constructor(e, t) {
2880
3025
  this.storageRetriever = e, this.type = t;
2881
3026
  }
2882
3027
  _isAvailable() {
2883
3028
  try {
2884
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
3029
+ return this.storage ? (this.storage.setItem(Ie, "1"), this.storage.removeItem(Ie), Promise.resolve(!0)) : Promise.resolve(!1);
2885
3030
  } catch {
2886
3031
  return Promise.resolve(!1);
2887
3032
  }
@@ -2916,18 +3061,18 @@ class Ht {
2916
3061
  * See the License for the specific language governing permissions and
2917
3062
  * limitations under the License.
2918
3063
  */
2919
- function wi() {
2920
- const n = _();
2921
- return De(n) || pe(n);
3064
+ function Bi() {
3065
+ const n = y();
3066
+ return Ge(n) || Te(n);
2922
3067
  }
2923
- const Ei = 1e3, ki = 10;
2924
- class Wt extends Ht {
3068
+ const zi = 1e3, qi = 10;
3069
+ class Yt extends Jt {
2925
3070
  constructor() {
2926
3071
  super(
2927
3072
  () => window.localStorage,
2928
3073
  "LOCAL"
2929
3074
  /* PersistenceType.LOCAL */
2930
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = wi() && Zn(), this.fallbackToPolling = Ut(), this._shouldAllowMigration = !0;
3075
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Bi() && Ti(), this.fallbackToPolling = Wt(), this._shouldAllowMigration = !0;
2931
3076
  }
2932
3077
  forAllChangedKeys(e) {
2933
3078
  for (const t of Object.keys(this.listeners)) {
@@ -2954,7 +3099,7 @@ class Wt extends Ht {
2954
3099
  const o = this.storage.getItem(i);
2955
3100
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2956
3101
  }, s = this.storage.getItem(i);
2957
- Qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, ki) : r();
3102
+ wi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, qi) : r();
2958
3103
  }
2959
3104
  notifyListeners(e, t) {
2960
3105
  this.localCache[e] = t;
@@ -2976,7 +3121,7 @@ class Wt extends Ht {
2976
3121
  !0
2977
3122
  );
2978
3123
  });
2979
- }, Ei);
3124
+ }, zi);
2980
3125
  }
2981
3126
  stopPolling() {
2982
3127
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3005,8 +3150,8 @@ class Wt extends Ht {
3005
3150
  await super._remove(e), delete this.localCache[e];
3006
3151
  }
3007
3152
  }
3008
- Wt.type = "LOCAL";
3009
- const bi = Wt;
3153
+ Yt.type = "LOCAL";
3154
+ const Ki = Yt;
3010
3155
  /**
3011
3156
  * @license
3012
3157
  * Copyright 2020 Google LLC
@@ -3023,7 +3168,7 @@ const bi = Wt;
3023
3168
  * See the License for the specific language governing permissions and
3024
3169
  * limitations under the License.
3025
3170
  */
3026
- class jt extends Ht {
3171
+ class Xt extends Jt {
3027
3172
  constructor() {
3028
3173
  super(
3029
3174
  () => window.sessionStorage,
@@ -3036,8 +3181,8 @@ class jt extends Ht {
3036
3181
  _removeListener(e, t) {
3037
3182
  }
3038
3183
  }
3039
- jt.type = "SESSION";
3040
- const Gt = jt;
3184
+ Xt.type = "SESSION";
3185
+ const Qt = Xt;
3041
3186
  /**
3042
3187
  * @license
3043
3188
  * Copyright 2019 Google LLC
@@ -3054,7 +3199,7 @@ const Gt = jt;
3054
3199
  * See the License for the specific language governing permissions and
3055
3200
  * limitations under the License.
3056
3201
  */
3057
- function Si(n) {
3202
+ function Ji(n) {
3058
3203
  return Promise.all(n.map(async (e) => {
3059
3204
  try {
3060
3205
  return {
@@ -3085,7 +3230,7 @@ function Si(n) {
3085
3230
  * See the License for the specific language governing permissions and
3086
3231
  * limitations under the License.
3087
3232
  */
3088
- class ge {
3233
+ class Ee {
3089
3234
  constructor(e) {
3090
3235
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3091
3236
  }
@@ -3099,7 +3244,7 @@ class ge {
3099
3244
  const t = this.receivers.find((r) => r.isListeningto(e));
3100
3245
  if (t)
3101
3246
  return t;
3102
- const i = new ge(e);
3247
+ const i = new Ee(e);
3103
3248
  return this.receivers.push(i), i;
3104
3249
  }
3105
3250
  isListeningto(e) {
@@ -3124,7 +3269,7 @@ class ge {
3124
3269
  eventId: i,
3125
3270
  eventType: r
3126
3271
  });
3127
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Si(c);
3272
+ const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ji(c);
3128
3273
  t.ports[0].postMessage({
3129
3274
  status: "done",
3130
3275
  eventId: i,
@@ -3153,7 +3298,7 @@ class ge {
3153
3298
  this.handlersMap[e] && t && this.handlersMap[e].delete(t), (!t || this.handlersMap[e].size === 0) && delete this.handlersMap[e], Object.keys(this.handlersMap).length === 0 && this.eventTarget.removeEventListener("message", this.boundEventHandler);
3154
3299
  }
3155
3300
  }
3156
- ge.receivers = [];
3301
+ Ee.receivers = [];
3157
3302
  /**
3158
3303
  * @license
3159
3304
  * Copyright 2020 Google LLC
@@ -3170,7 +3315,7 @@ ge.receivers = [];
3170
3315
  * See the License for the specific language governing permissions and
3171
3316
  * limitations under the License.
3172
3317
  */
3173
- function xe(n = "", e = 10) {
3318
+ function ze(n = "", e = 10) {
3174
3319
  let t = "";
3175
3320
  for (let i = 0; i < e; i++)
3176
3321
  t += Math.floor(Math.random() * 10);
@@ -3192,7 +3337,7 @@ function xe(n = "", e = 10) {
3192
3337
  * See the License for the specific language governing permissions and
3193
3338
  * limitations under the License.
3194
3339
  */
3195
- class Ri {
3340
+ class Yi {
3196
3341
  constructor(e) {
3197
3342
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3198
3343
  }
@@ -3226,7 +3371,7 @@ class Ri {
3226
3371
  );
3227
3372
  let s, o;
3228
3373
  return new Promise((c, a) => {
3229
- const l = xe("", 20);
3374
+ const l = ze("", 20);
3230
3375
  r.port1.start();
3231
3376
  const d = setTimeout(() => {
3232
3377
  a(new Error(
@@ -3237,9 +3382,9 @@ class Ri {
3237
3382
  o = {
3238
3383
  messageChannel: r,
3239
3384
  onMessage(h) {
3240
- const p = h;
3241
- if (p.data.eventId === l)
3242
- switch (p.data.status) {
3385
+ const m = h;
3386
+ if (m.data.eventId === l)
3387
+ switch (m.data.status) {
3243
3388
  case "ack":
3244
3389
  clearTimeout(d), s = setTimeout(
3245
3390
  () => {
@@ -3253,7 +3398,7 @@ class Ri {
3253
3398
  );
3254
3399
  break;
3255
3400
  case "done":
3256
- clearTimeout(s), c(p.data.response);
3401
+ clearTimeout(s), c(m.data.response);
3257
3402
  break;
3258
3403
  default:
3259
3404
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -3289,11 +3434,11 @@ class Ri {
3289
3434
  * See the License for the specific language governing permissions and
3290
3435
  * limitations under the License.
3291
3436
  */
3292
- function y() {
3437
+ function b() {
3293
3438
  return window;
3294
3439
  }
3295
- function Ai(n) {
3296
- y().location.href = n;
3440
+ function Xi(n) {
3441
+ b().location.href = n;
3297
3442
  }
3298
3443
  /**
3299
3444
  * @license
@@ -3311,10 +3456,10 @@ function Ai(n) {
3311
3456
  * See the License for the specific language governing permissions and
3312
3457
  * limitations under the License.
3313
3458
  */
3314
- function Bt() {
3315
- return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
3459
+ function Zt() {
3460
+ return typeof b().WorkerGlobalScope < "u" && typeof b().importScripts == "function";
3316
3461
  }
3317
- async function Pi() {
3462
+ async function Qi() {
3318
3463
  if (!(navigator != null && navigator.serviceWorker))
3319
3464
  return null;
3320
3465
  try {
@@ -3323,12 +3468,12 @@ async function Pi() {
3323
3468
  return null;
3324
3469
  }
3325
3470
  }
3326
- function Ci() {
3471
+ function Zi() {
3327
3472
  var n;
3328
3473
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3329
3474
  }
3330
- function Oi() {
3331
- return Bt() ? self : null;
3475
+ function er() {
3476
+ return Zt() ? self : null;
3332
3477
  }
3333
3478
  /**
3334
3479
  * @license
@@ -3346,8 +3491,8 @@ function Oi() {
3346
3491
  * See the License for the specific language governing permissions and
3347
3492
  * limitations under the License.
3348
3493
  */
3349
- const zt = "firebaseLocalStorageDb", Ni = 1, he = "firebaseLocalStorage", qt = "fbase_key";
3350
- class Z {
3494
+ const en = "firebaseLocalStorageDb", tr = 1, ye = "firebaseLocalStorage", tn = "fbase_key";
3495
+ class ce {
3351
3496
  constructor(e) {
3352
3497
  this.request = e;
3353
3498
  }
@@ -3361,55 +3506,55 @@ class Z {
3361
3506
  });
3362
3507
  }
3363
3508
  }
3364
- function _e(n, e) {
3365
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3509
+ function be(n, e) {
3510
+ return n.transaction([ye], e ? "readwrite" : "readonly").objectStore(ye);
3366
3511
  }
3367
- function Li() {
3368
- const n = indexedDB.deleteDatabase(zt);
3369
- return new Z(n).toPromise();
3512
+ function nr() {
3513
+ const n = indexedDB.deleteDatabase(en);
3514
+ return new ce(n).toPromise();
3370
3515
  }
3371
- function Pe() {
3372
- const n = indexedDB.open(zt, Ni);
3516
+ function Ue() {
3517
+ const n = indexedDB.open(en, tr);
3373
3518
  return new Promise((e, t) => {
3374
3519
  n.addEventListener("error", () => {
3375
3520
  t(n.error);
3376
3521
  }), n.addEventListener("upgradeneeded", () => {
3377
3522
  const i = n.result;
3378
3523
  try {
3379
- i.createObjectStore(he, { keyPath: qt });
3524
+ i.createObjectStore(ye, { keyPath: tn });
3380
3525
  } catch (r) {
3381
3526
  t(r);
3382
3527
  }
3383
3528
  }), n.addEventListener("success", async () => {
3384
3529
  const i = n.result;
3385
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Pe()));
3530
+ i.objectStoreNames.contains(ye) ? e(i) : (i.close(), await nr(), e(await Ue()));
3386
3531
  });
3387
3532
  });
3388
3533
  }
3389
- async function it(n, e, t) {
3390
- const i = _e(n, !0).put({
3391
- [qt]: e,
3534
+ async function ut(n, e, t) {
3535
+ const i = be(n, !0).put({
3536
+ [tn]: e,
3392
3537
  value: t
3393
3538
  });
3394
- return new Z(i).toPromise();
3539
+ return new ce(i).toPromise();
3395
3540
  }
3396
- async function Mi(n, e) {
3397
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3541
+ async function ir(n, e) {
3542
+ const t = be(n, !1).get(e), i = await new ce(t).toPromise();
3398
3543
  return i === void 0 ? null : i.value;
3399
3544
  }
3400
- function rt(n, e) {
3401
- const t = _e(n, !0).delete(e);
3402
- return new Z(t).toPromise();
3545
+ function dt(n, e) {
3546
+ const t = be(n, !0).delete(e);
3547
+ return new ce(t).toPromise();
3403
3548
  }
3404
- const Ui = 800, Di = 3;
3405
- class Kt {
3549
+ const rr = 800, sr = 3;
3550
+ class nn {
3406
3551
  constructor() {
3407
3552
  this.type = "LOCAL", this._shouldAllowMigration = !0, this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.pendingWrites = 0, this.receiver = null, this.sender = null, this.serviceWorkerReceiverAvailable = !1, this.activeServiceWorker = null, this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {
3408
3553
  }, () => {
3409
3554
  });
3410
3555
  }
3411
3556
  async _openDb() {
3412
- return this.db ? this.db : (this.db = await Pe(), this.db);
3557
+ return this.db ? this.db : (this.db = await Ue(), this.db);
3413
3558
  }
3414
3559
  async _withRetries(e) {
3415
3560
  let t = 0;
@@ -3418,7 +3563,7 @@ class Kt {
3418
3563
  const i = await this._openDb();
3419
3564
  return await e(i);
3420
3565
  } catch (i) {
3421
- if (t++ > Di)
3566
+ if (t++ > sr)
3422
3567
  throw i;
3423
3568
  this.db && (this.db.close(), this.db = void 0);
3424
3569
  }
@@ -3428,13 +3573,13 @@ class Kt {
3428
3573
  * postMessage interface to send these events to the worker ourselves.
3429
3574
  */
3430
3575
  async initializeServiceWorkerMessaging() {
3431
- return Bt() ? this.initializeReceiver() : this.initializeSender();
3576
+ return Zt() ? this.initializeReceiver() : this.initializeSender();
3432
3577
  }
3433
3578
  /**
3434
3579
  * As the worker we should listen to events from the main window.
3435
3580
  */
3436
3581
  async initializeReceiver() {
3437
- this.receiver = ge._getInstance(Oi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3582
+ this.receiver = Ee._getInstance(er()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3438
3583
  keyProcessed: (await this._poll()).includes(t.key)
3439
3584
  })), this.receiver._subscribe("ping", async (e, t) => [
3440
3585
  "keyChanged"
@@ -3450,9 +3595,9 @@ class Kt {
3450
3595
  */
3451
3596
  async initializeSender() {
3452
3597
  var e, t;
3453
- if (this.activeServiceWorker = await Pi(), !this.activeServiceWorker)
3598
+ if (this.activeServiceWorker = await Qi(), !this.activeServiceWorker)
3454
3599
  return;
3455
- this.sender = new Ri(this.activeServiceWorker);
3600
+ this.sender = new Yi(this.activeServiceWorker);
3456
3601
  const i = await this.sender._send(
3457
3602
  "ping",
3458
3603
  {},
@@ -3474,7 +3619,7 @@ class Kt {
3474
3619
  * @param key - Storage key which changed.
3475
3620
  */
3476
3621
  async notifyServiceWorker(e) {
3477
- if (!(!this.sender || !this.activeServiceWorker || Ci() !== this.activeServiceWorker))
3622
+ if (!(!this.sender || !this.activeServiceWorker || Zi() !== this.activeServiceWorker))
3478
3623
  try {
3479
3624
  await this.sender._send(
3480
3625
  "keyChanged",
@@ -3490,8 +3635,8 @@ class Kt {
3490
3635
  try {
3491
3636
  if (!indexedDB)
3492
3637
  return !1;
3493
- const e = await Pe();
3494
- return await it(e, de, "1"), await rt(e, de), !0;
3638
+ const e = await Ue();
3639
+ return await ut(e, Ie, "1"), await dt(e, Ie), !0;
3495
3640
  } catch {
3496
3641
  }
3497
3642
  return !1;
@@ -3505,19 +3650,19 @@ class Kt {
3505
3650
  }
3506
3651
  }
3507
3652
  async _set(e, t) {
3508
- return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3653
+ return this._withPendingWrite(async () => (await this._withRetries((i) => ut(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3509
3654
  }
3510
3655
  async _get(e) {
3511
- const t = await this._withRetries((i) => Mi(i, e));
3656
+ const t = await this._withRetries((i) => ir(i, e));
3512
3657
  return this.localCache[e] = t, t;
3513
3658
  }
3514
3659
  async _remove(e) {
3515
- return this._withPendingWrite(async () => (await this._withRetries((t) => rt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3660
+ return this._withPendingWrite(async () => (await this._withRetries((t) => dt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3516
3661
  }
3517
3662
  async _poll() {
3518
3663
  const e = await this._withRetries((r) => {
3519
- const s = _e(r, !1).getAll();
3520
- return new Z(s).toPromise();
3664
+ const s = be(r, !1).getAll();
3665
+ return new ce(s).toPromise();
3521
3666
  });
3522
3667
  if (!e)
3523
3668
  return [];
@@ -3539,7 +3684,7 @@ class Kt {
3539
3684
  r(t);
3540
3685
  }
3541
3686
  startPolling() {
3542
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ui);
3687
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), rr);
3543
3688
  }
3544
3689
  stopPolling() {
3545
3690
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3551,9 +3696,9 @@ class Kt {
3551
3696
  this.listeners[e] && (this.listeners[e].delete(t), this.listeners[e].size === 0 && delete this.listeners[e]), Object.keys(this.listeners).length === 0 && this.stopPolling();
3552
3697
  }
3553
3698
  }
3554
- Kt.type = "LOCAL";
3555
- const Fi = Kt;
3556
- new X(3e4, 6e4);
3699
+ nn.type = "LOCAL";
3700
+ const or = nn;
3701
+ new oe(3e4, 6e4);
3557
3702
  /**
3558
3703
  * @license
3559
3704
  * Copyright 2021 Google LLC
@@ -3570,8 +3715,8 @@ new X(3e4, 6e4);
3570
3715
  * See the License for the specific language governing permissions and
3571
3716
  * limitations under the License.
3572
3717
  */
3573
- function xi(n, e) {
3574
- return e ? S(e) : (u(
3718
+ function ar(n, e) {
3719
+ return e ? N(e) : (u(
3575
3720
  n._popupRedirectResolver,
3576
3721
  n,
3577
3722
  "argument-error"
@@ -3594,7 +3739,7 @@ function xi(n, e) {
3594
3739
  * See the License for the specific language governing permissions and
3595
3740
  * limitations under the License.
3596
3741
  */
3597
- class Ve extends xt {
3742
+ class qe extends zt {
3598
3743
  constructor(e) {
3599
3744
  super(
3600
3745
  "custom",
@@ -3603,13 +3748,13 @@ class Ve extends xt {
3603
3748
  ), this.params = e;
3604
3749
  }
3605
3750
  _getIdTokenResponse(e) {
3606
- return W(e, this._buildIdpRequest());
3751
+ return q(e, this._buildIdpRequest());
3607
3752
  }
3608
3753
  _linkToIdToken(e, t) {
3609
- return W(e, this._buildIdpRequest(t));
3754
+ return q(e, this._buildIdpRequest(t));
3610
3755
  }
3611
3756
  _getReauthenticationResolver(e) {
3612
- return W(e, this._buildIdpRequest());
3757
+ return q(e, this._buildIdpRequest());
3613
3758
  }
3614
3759
  _buildIdpRequest(e) {
3615
3760
  const t = {
@@ -3624,26 +3769,26 @@ class Ve extends xt {
3624
3769
  return e && (t.idToken = e), t;
3625
3770
  }
3626
3771
  }
3627
- function Vi(n) {
3628
- return _i(n.auth, new Ve(n), n.bypassAuthState);
3772
+ function cr(n) {
3773
+ return $i(n.auth, new qe(n), n.bypassAuthState);
3629
3774
  }
3630
- function $i(n) {
3775
+ function lr(n) {
3631
3776
  const { auth: e, user: t } = n;
3632
3777
  return u(
3633
3778
  t,
3634
3779
  e,
3635
3780
  "internal-error"
3636
3781
  /* AuthErrorCode.INTERNAL_ERROR */
3637
- ), gi(t, new Ve(n), n.bypassAuthState);
3782
+ ), Vi(t, new qe(n), n.bypassAuthState);
3638
3783
  }
3639
- async function Hi(n) {
3784
+ async function ur(n) {
3640
3785
  const { auth: e, user: t } = n;
3641
3786
  return u(
3642
3787
  t,
3643
3788
  e,
3644
3789
  "internal-error"
3645
3790
  /* AuthErrorCode.INTERNAL_ERROR */
3646
- ), mi(t, new Ve(n), n.bypassAuthState);
3791
+ ), Fi(t, new qe(n), n.bypassAuthState);
3647
3792
  }
3648
3793
  /**
3649
3794
  * @license
@@ -3661,7 +3806,7 @@ async function Hi(n) {
3661
3806
  * See the License for the specific language governing permissions and
3662
3807
  * limitations under the License.
3663
3808
  */
3664
- class Jt {
3809
+ class rn {
3665
3810
  constructor(e, t, i, r, s = !1) {
3666
3811
  this.auth = e, this.resolver = i, this.user = r, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
3667
3812
  }
@@ -3703,15 +3848,15 @@ class Jt {
3703
3848
  switch (e) {
3704
3849
  case "signInViaPopup":
3705
3850
  case "signInViaRedirect":
3706
- return Vi;
3851
+ return cr;
3707
3852
  case "linkViaPopup":
3708
3853
  case "linkViaRedirect":
3709
- return Hi;
3854
+ return ur;
3710
3855
  case "reauthViaPopup":
3711
3856
  case "reauthViaRedirect":
3712
- return $i;
3857
+ return lr;
3713
3858
  default:
3714
- R(
3859
+ O(
3715
3860
  this.auth,
3716
3861
  "internal-error"
3717
3862
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3719,10 +3864,10 @@ class Jt {
3719
3864
  }
3720
3865
  }
3721
3866
  resolve(e) {
3722
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3867
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3723
3868
  }
3724
3869
  reject(e) {
3725
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3870
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3726
3871
  }
3727
3872
  unregisterAndCleanUp() {
3728
3873
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3744,10 +3889,10 @@ class Jt {
3744
3889
  * See the License for the specific language governing permissions and
3745
3890
  * limitations under the License.
3746
3891
  */
3747
- const Wi = new X(2e3, 1e4);
3748
- class V extends Jt {
3892
+ const dr = new oe(2e3, 1e4);
3893
+ class G extends rn {
3749
3894
  constructor(e, t, i, r, s) {
3750
- super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3895
+ super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, G.currentPopupAction && G.currentPopupAction.cancel(), G.currentPopupAction = this;
3751
3896
  }
3752
3897
  async executeNotNull() {
3753
3898
  const e = await this.execute();
@@ -3759,8 +3904,8 @@ class V extends Jt {
3759
3904
  ), e;
3760
3905
  }
3761
3906
  async onExecution() {
3762
- A(this.filter.length === 1, "Popup operations only handle one event");
3763
- const e = xe();
3907
+ L(this.filter.length === 1, "Popup operations only handle one event");
3908
+ const e = ze();
3764
3909
  this.authWindow = await this.resolver._openPopup(
3765
3910
  this.auth,
3766
3911
  this.provider,
@@ -3770,7 +3915,7 @@ class V extends Jt {
3770
3915
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3771
3916
  this.reject(t);
3772
3917
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3773
- t || this.reject(T(
3918
+ t || this.reject(E(
3774
3919
  this.auth,
3775
3920
  "web-storage-unsupported"
3776
3921
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3782,14 +3927,14 @@ class V extends Jt {
3782
3927
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3783
3928
  }
3784
3929
  cancel() {
3785
- this.reject(T(
3930
+ this.reject(E(
3786
3931
  this.auth,
3787
3932
  "cancelled-popup-request"
3788
3933
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
3789
3934
  ));
3790
3935
  }
3791
3936
  cleanUp() {
3792
- this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, V.currentPopupAction = null;
3937
+ this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, G.currentPopupAction = null;
3793
3938
  }
3794
3939
  pollUserCancellation() {
3795
3940
  const e = () => {
@@ -3797,7 +3942,7 @@ class V extends Jt {
3797
3942
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3798
3943
  this.pollId = window.setTimeout(
3799
3944
  () => {
3800
- this.pollId = null, this.reject(T(
3945
+ this.pollId = null, this.reject(E(
3801
3946
  this.auth,
3802
3947
  "popup-closed-by-user"
3803
3948
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3808,12 +3953,12 @@ class V extends Jt {
3808
3953
  );
3809
3954
  return;
3810
3955
  }
3811
- this.pollId = window.setTimeout(e, Wi.get());
3956
+ this.pollId = window.setTimeout(e, dr.get());
3812
3957
  };
3813
3958
  e();
3814
3959
  }
3815
3960
  }
3816
- V.currentPopupAction = null;
3961
+ G.currentPopupAction = null;
3817
3962
  /**
3818
3963
  * @license
3819
3964
  * Copyright 2020 Google LLC
@@ -3830,8 +3975,8 @@ V.currentPopupAction = null;
3830
3975
  * See the License for the specific language governing permissions and
3831
3976
  * limitations under the License.
3832
3977
  */
3833
- const ji = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3834
- class Gi extends Jt {
3978
+ const hr = "pendingRedirect", he = /* @__PURE__ */ new Map();
3979
+ class fr extends rn {
3835
3980
  constructor(e, t, i = !1) {
3836
3981
  super(e, [
3837
3982
  "signInViaRedirect",
@@ -3846,17 +3991,17 @@ class Gi extends Jt {
3846
3991
  * just return it.
3847
3992
  */
3848
3993
  async execute() {
3849
- let e = oe.get(this.auth._key());
3994
+ let e = he.get(this.auth._key());
3850
3995
  if (!e) {
3851
3996
  try {
3852
- const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
3997
+ const i = await pr(this.resolver, this.auth) ? await super.execute() : null;
3853
3998
  e = () => Promise.resolve(i);
3854
3999
  } catch (t) {
3855
4000
  e = () => Promise.reject(t);
3856
4001
  }
3857
- oe.set(this.auth._key(), e);
4002
+ he.set(this.auth._key(), e);
3858
4003
  }
3859
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
4004
+ return this.bypassAuthState || he.set(this.auth._key(), () => Promise.resolve(null)), e();
3860
4005
  }
3861
4006
  async onAuthEvent(e) {
3862
4007
  if (e.type === "signInViaRedirect")
@@ -3877,26 +4022,26 @@ class Gi extends Jt {
3877
4022
  cleanUp() {
3878
4023
  }
3879
4024
  }
3880
- async function Bi(n, e) {
3881
- const t = Ki(e), i = qi(n);
4025
+ async function pr(n, e) {
4026
+ const t = _r(e), i = gr(n);
3882
4027
  if (!await i._isAvailable())
3883
4028
  return !1;
3884
4029
  const r = await i._get(t) === "true";
3885
4030
  return await i._remove(t), r;
3886
4031
  }
3887
- function zi(n, e) {
3888
- oe.set(n._key(), e);
4032
+ function mr(n, e) {
4033
+ he.set(n._key(), e);
3889
4034
  }
3890
- function qi(n) {
3891
- return S(n._redirectPersistence);
4035
+ function gr(n) {
4036
+ return N(n._redirectPersistence);
3892
4037
  }
3893
- function Ki(n) {
3894
- return se(ji, n.config.apiKey, n.name);
4038
+ function _r(n) {
4039
+ return de(hr, n.config.apiKey, n.name);
3895
4040
  }
3896
- async function Ji(n, e, t = !1) {
3897
- if (E(n.app))
3898
- return Promise.reject(M(n));
3899
- const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
4041
+ async function vr(n, e, t = !1) {
4042
+ if (A(n.app))
4043
+ return Promise.reject($(n));
4044
+ const i = ke(n), r = ar(i, e), o = await new fr(i, r, t).execute();
3900
4045
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3901
4046
  }
3902
4047
  /**
@@ -3915,8 +4060,8 @@ async function Ji(n, e, t = !1) {
3915
4060
  * See the License for the specific language governing permissions and
3916
4061
  * limitations under the License.
3917
4062
  */
3918
- const Yi = 10 * 60 * 1e3;
3919
- class Xi {
4063
+ const Ir = 10 * 60 * 1e3;
4064
+ class yr {
3920
4065
  constructor(e) {
3921
4066
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3922
4067
  }
@@ -3932,13 +4077,13 @@ class Xi {
3932
4077
  let t = !1;
3933
4078
  return this.consumers.forEach((i) => {
3934
4079
  this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
3935
- }), this.hasHandledPotentialRedirect || !Qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
4080
+ }), this.hasHandledPotentialRedirect || !wr(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3936
4081
  }
3937
4082
  sendToConsumer(e, t) {
3938
4083
  var i;
3939
- if (e.error && !Yt(e)) {
4084
+ if (e.error && !sn(e)) {
3940
4085
  const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
3941
- t.onError(T(this.auth, r));
4086
+ t.onError(E(this.auth, r));
3942
4087
  } else
3943
4088
  t.onAuthEvent(e);
3944
4089
  }
@@ -3947,26 +4092,26 @@ class Xi {
3947
4092
  return t.filter.includes(e.type) && i;
3948
4093
  }
3949
4094
  hasEventBeenHandled(e) {
3950
- return Date.now() - this.lastProcessedEventTime >= Yi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
4095
+ return Date.now() - this.lastProcessedEventTime >= Ir && this.cachedEventUids.clear(), this.cachedEventUids.has(ht(e));
3951
4096
  }
3952
4097
  saveEventToCache(e) {
3953
- this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
4098
+ this.cachedEventUids.add(ht(e)), this.lastProcessedEventTime = Date.now();
3954
4099
  }
3955
4100
  }
3956
- function st(n) {
4101
+ function ht(n) {
3957
4102
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3958
4103
  }
3959
- function Yt({ type: n, error: e }) {
4104
+ function sn({ type: n, error: e }) {
3960
4105
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3961
4106
  }
3962
- function Qi(n) {
4107
+ function wr(n) {
3963
4108
  switch (n.type) {
3964
4109
  case "signInViaRedirect":
3965
4110
  case "linkViaRedirect":
3966
4111
  case "reauthViaRedirect":
3967
4112
  return !0;
3968
4113
  case "unknown":
3969
- return Yt(n);
4114
+ return sn(n);
3970
4115
  default:
3971
4116
  return !1;
3972
4117
  }
@@ -3987,8 +4132,8 @@ function Qi(n) {
3987
4132
  * See the License for the specific language governing permissions and
3988
4133
  * limitations under the License.
3989
4134
  */
3990
- async function Zi(n, e = {}) {
3991
- return G(n, "GET", "/v1/projects", e);
4135
+ async function Tr(n, e = {}) {
4136
+ return J(n, "GET", "/v1/projects", e);
3992
4137
  }
3993
4138
  /**
3994
4139
  * @license
@@ -4006,32 +4151,32 @@ async function Zi(n, e = {}) {
4006
4151
  * See the License for the specific language governing permissions and
4007
4152
  * limitations under the License.
4008
4153
  */
4009
- const er = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, tr = /^https?/;
4010
- async function nr(n) {
4154
+ const kr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Er = /^https?/;
4155
+ async function br(n) {
4011
4156
  if (n.config.emulator)
4012
4157
  return;
4013
- const { authorizedDomains: e } = await Zi(n);
4158
+ const { authorizedDomains: e } = await Tr(n);
4014
4159
  for (const t of e)
4015
4160
  try {
4016
- if (ir(t))
4161
+ if (Sr(t))
4017
4162
  return;
4018
4163
  } catch {
4019
4164
  }
4020
- R(
4165
+ O(
4021
4166
  n,
4022
4167
  "unauthorized-domain"
4023
4168
  /* AuthErrorCode.INVALID_ORIGIN */
4024
4169
  );
4025
4170
  }
4026
- function ir(n) {
4027
- const e = Re(), { protocol: t, hostname: i } = new URL(e);
4171
+ function Sr(n) {
4172
+ const e = Le(), { protocol: t, hostname: i } = new URL(e);
4028
4173
  if (n.startsWith("chrome-extension://")) {
4029
4174
  const o = new URL(n);
4030
4175
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4031
4176
  }
4032
- if (!tr.test(t))
4177
+ if (!Er.test(t))
4033
4178
  return !1;
4034
- if (er.test(n))
4179
+ if (kr.test(n))
4035
4180
  return i === n;
4036
4181
  const r = n.replace(/\./g, "\\.");
4037
4182
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4052,9 +4197,9 @@ function ir(n) {
4052
4197
  * See the License for the specific language governing permissions and
4053
4198
  * limitations under the License.
4054
4199
  */
4055
- const rr = new X(3e4, 6e4);
4056
- function ot() {
4057
- const n = y().___jsl;
4200
+ const Rr = new oe(3e4, 6e4);
4201
+ function ft() {
4202
+ const n = b().___jsl;
4058
4203
  if (n != null && n.H) {
4059
4204
  for (const e of Object.keys(n.H))
4060
4205
  if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
@@ -4062,45 +4207,45 @@ function ot() {
4062
4207
  n.CP[t] = null;
4063
4208
  }
4064
4209
  }
4065
- function sr(n) {
4210
+ function Ar(n) {
4066
4211
  return new Promise((e, t) => {
4067
4212
  var i, r, s;
4068
4213
  function o() {
4069
- ot(), gapi.load("gapi.iframes", {
4214
+ ft(), gapi.load("gapi.iframes", {
4070
4215
  callback: () => {
4071
4216
  e(gapi.iframes.getContext());
4072
4217
  },
4073
4218
  ontimeout: () => {
4074
- ot(), t(T(
4219
+ ft(), t(E(
4075
4220
  n,
4076
4221
  "network-request-failed"
4077
4222
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4078
4223
  ));
4079
4224
  },
4080
- timeout: rr.get()
4225
+ timeout: Rr.get()
4081
4226
  });
4082
4227
  }
4083
- if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4228
+ if (!((r = (i = b().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4084
4229
  e(gapi.iframes.getContext());
4085
- else if (!((s = y().gapi) === null || s === void 0) && s.load)
4230
+ else if (!((s = b().gapi) === null || s === void 0) && s.load)
4086
4231
  o();
4087
4232
  else {
4088
- const c = ci("iframefcb");
4089
- return y()[c] = () => {
4090
- gapi.load ? o() : t(T(
4233
+ const c = Ni("iframefcb");
4234
+ return b()[c] = () => {
4235
+ gapi.load ? o() : t(E(
4091
4236
  n,
4092
4237
  "network-request-failed"
4093
4238
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4094
4239
  ));
4095
- }, oi(`${ai()}?onload=${c}`).catch((a) => t(a));
4240
+ }, Pi(`${Ci()}?onload=${c}`).catch((a) => t(a));
4096
4241
  }
4097
4242
  }).catch((e) => {
4098
- throw ae = null, e;
4243
+ throw fe = null, e;
4099
4244
  });
4100
4245
  }
4101
- let ae = null;
4102
- function or(n) {
4103
- return ae = ae || sr(n), ae;
4246
+ let fe = null;
4247
+ function Pr(n) {
4248
+ return fe = fe || Ar(n), fe;
4104
4249
  }
4105
4250
  /**
4106
4251
  * @license
@@ -4118,7 +4263,7 @@ function or(n) {
4118
4263
  * See the License for the specific language governing permissions and
4119
4264
  * limitations under the License.
4120
4265
  */
4121
- const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe", ur = {
4266
+ const Cr = new oe(5e3, 15e3), Nr = "__/auth/iframe", Or = "emulator/auth/iframe", Lr = {
4122
4267
  style: {
4123
4268
  position: "absolute",
4124
4269
  top: "-100px",
@@ -4127,13 +4272,13 @@ const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe",
4127
4272
  },
4128
4273
  "aria-hidden": "true",
4129
4274
  tabindex: "-1"
4130
- }, dr = /* @__PURE__ */ new Map([
4275
+ }, Mr = /* @__PURE__ */ new Map([
4131
4276
  ["identitytoolkit.googleapis.com", "p"],
4132
4277
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4133
4278
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4134
4279
  // test
4135
4280
  ]);
4136
- function hr(n) {
4281
+ function Ur(n) {
4137
4282
  const e = n.config;
4138
4283
  u(
4139
4284
  e.authDomain,
@@ -4141,17 +4286,17 @@ function hr(n) {
4141
4286
  "auth-domain-config-required"
4142
4287
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4143
4288
  );
4144
- const t = e.emulator ? Me(e, lr) : `https://${n.config.authDomain}/${cr}`, i = {
4289
+ const t = e.emulator ? je(e, Or) : `https://${n.config.authDomain}/${Nr}`, i = {
4145
4290
  apiKey: e.apiKey,
4146
4291
  appName: n.name,
4147
- v: J
4148
- }, r = dr.get(n.config.apiHost);
4292
+ v: re
4293
+ }, r = Mr.get(n.config.apiHost);
4149
4294
  r && (i.eid = r);
4150
4295
  const s = n._getFrameworks();
4151
- return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4296
+ return s.length && (i.fw = s.join(",")), `${t}?${se(i).slice(1)}`;
4152
4297
  }
4153
- async function fr(n) {
4154
- const e = await or(n), t = y().gapi;
4298
+ async function Dr(n) {
4299
+ const e = await Pr(n), t = b().gapi;
4155
4300
  return u(
4156
4301
  t,
4157
4302
  n,
@@ -4159,24 +4304,24 @@ async function fr(n) {
4159
4304
  /* AuthErrorCode.INTERNAL_ERROR */
4160
4305
  ), e.open({
4161
4306
  where: document.body,
4162
- url: hr(n),
4307
+ url: Ur(n),
4163
4308
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4164
- attributes: ur,
4309
+ attributes: Lr,
4165
4310
  dontclear: !0
4166
4311
  }, (i) => new Promise(async (r, s) => {
4167
4312
  await i.restyle({
4168
4313
  // Prevent iframe from closing on mouse out.
4169
4314
  setHideOnLeave: !1
4170
4315
  });
4171
- const o = T(
4316
+ const o = E(
4172
4317
  n,
4173
4318
  "network-request-failed"
4174
4319
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4175
- ), c = y().setTimeout(() => {
4320
+ ), c = b().setTimeout(() => {
4176
4321
  s(o);
4177
- }, ar.get());
4322
+ }, Cr.get());
4178
4323
  function a() {
4179
- y().clearTimeout(c), r(i);
4324
+ b().clearTimeout(c), r(i);
4180
4325
  }
4181
4326
  i.ping(a).then(a, () => {
4182
4327
  s(o);
@@ -4199,13 +4344,13 @@ async function fr(n) {
4199
4344
  * See the License for the specific language governing permissions and
4200
4345
  * limitations under the License.
4201
4346
  */
4202
- const pr = {
4347
+ const xr = {
4203
4348
  location: "yes",
4204
4349
  resizable: "yes",
4205
4350
  statusbar: "yes",
4206
4351
  toolbar: "no"
4207
- }, mr = 500, gr = 600, _r = "_blank", vr = "http://localhost";
4208
- class at {
4352
+ }, Fr = 500, Vr = 600, $r = "_blank", Hr = "http://localhost";
4353
+ class pt {
4209
4354
  constructor(e) {
4210
4355
  this.window = e, this.associatedEvent = null;
4211
4356
  }
@@ -4217,19 +4362,19 @@ class at {
4217
4362
  }
4218
4363
  }
4219
4364
  }
4220
- function Ir(n, e, t, i = mr, r = gr) {
4365
+ function jr(n, e, t, i = Fr, r = Vr) {
4221
4366
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4222
4367
  let c = "";
4223
- const a = Object.assign(Object.assign({}, pr), {
4368
+ const a = Object.assign(Object.assign({}, xr), {
4224
4369
  width: i.toString(),
4225
4370
  height: r.toString(),
4226
4371
  top: s,
4227
4372
  left: o
4228
- }), l = _().toLowerCase();
4229
- t && (c = Ct(l) ? _r : t), Pt(l) && (e = e || vr, a.scrollbars = "yes");
4230
- const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
4231
- if (Xn(l) && c !== "_self")
4232
- return Tr(e || "", c), new at(null);
4373
+ }), l = y().toLowerCase();
4374
+ t && (c = Ft(l) ? $r : t), xt(l) && (e = e || Hr, a.scrollbars = "yes");
4375
+ const d = Object.entries(a).reduce((m, [v, w]) => `${m}${v}=${w},`, "");
4376
+ if (yi(l) && c !== "_self")
4377
+ return Wr(e || "", c), new pt(null);
4233
4378
  const h = window.open(e || "", c, d);
4234
4379
  u(
4235
4380
  h,
@@ -4241,9 +4386,9 @@ function Ir(n, e, t, i = mr, r = gr) {
4241
4386
  h.focus();
4242
4387
  } catch {
4243
4388
  }
4244
- return new at(h);
4389
+ return new pt(h);
4245
4390
  }
4246
- function Tr(n, e) {
4391
+ function Wr(n, e) {
4247
4392
  const t = document.createElement("a");
4248
4393
  t.href = n, t.target = e;
4249
4394
  const i = document.createEvent("MouseEvent");
@@ -4265,8 +4410,8 @@ function Tr(n, e) {
4265
4410
  * See the License for the specific language governing permissions and
4266
4411
  * limitations under the License.
4267
4412
  */
4268
- const yr = "__/auth/handler", wr = "emulator/auth/handler", Er = encodeURIComponent("fac");
4269
- async function ct(n, e, t, i, r, s) {
4413
+ const Gr = "__/auth/handler", Br = "emulator/auth/handler", zr = encodeURIComponent("fac");
4414
+ async function mt(n, e, t, i, r, s) {
4270
4415
  u(
4271
4416
  n.config.authDomain,
4272
4417
  n,
@@ -4283,15 +4428,15 @@ async function ct(n, e, t, i, r, s) {
4283
4428
  appName: n.name,
4284
4429
  authType: t,
4285
4430
  redirectUrl: i,
4286
- v: J,
4431
+ v: re,
4287
4432
  eventId: r
4288
4433
  };
4289
- if (e instanceof Vt) {
4290
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", bn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4434
+ if (e instanceof qt) {
4435
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Cn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4291
4436
  for (const [d, h] of Object.entries({}))
4292
4437
  o[d] = h;
4293
4438
  }
4294
- if (e instanceof Q) {
4439
+ if (e instanceof ae) {
4295
4440
  const d = e.getScopes().filter((h) => h !== "");
4296
4441
  d.length > 0 && (o.scopes = d.join(","));
4297
4442
  }
@@ -4299,11 +4444,11 @@ async function ct(n, e, t, i, r, s) {
4299
4444
  const c = o;
4300
4445
  for (const d of Object.keys(c))
4301
4446
  c[d] === void 0 && delete c[d];
4302
- const a = await n._getAppCheckToken(), l = a ? `#${Er}=${encodeURIComponent(a)}` : "";
4303
- return `${kr(n)}?${Y(c).slice(1)}${l}`;
4447
+ const a = await n._getAppCheckToken(), l = a ? `#${zr}=${encodeURIComponent(a)}` : "";
4448
+ return `${qr(n)}?${se(c).slice(1)}${l}`;
4304
4449
  }
4305
- function kr({ config: n }) {
4306
- return n.emulator ? Me(n, wr) : `https://${n.authDomain}/${yr}`;
4450
+ function qr({ config: n }) {
4451
+ return n.emulator ? je(n, Br) : `https://${n.authDomain}/${Gr}`;
4307
4452
  }
4308
4453
  /**
4309
4454
  * @license
@@ -4321,30 +4466,30 @@ function kr({ config: n }) {
4321
4466
  * See the License for the specific language governing permissions and
4322
4467
  * limitations under the License.
4323
4468
  */
4324
- const we = "webStorageSupport";
4325
- class br {
4469
+ const Ce = "webStorageSupport";
4470
+ class Kr {
4326
4471
  constructor() {
4327
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
4472
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn = vr, this._overrideRedirectResult = mr;
4328
4473
  }
4329
4474
  // Wrapping in async even though we don't await anywhere in order
4330
4475
  // to make sure errors are raised as promise rejections
4331
4476
  async _openPopup(e, t, i, r) {
4332
4477
  var s;
4333
- A((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4334
- const o = await ct(e, t, i, Re(), r);
4335
- return Ir(e, o, xe());
4478
+ L((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4479
+ const o = await mt(e, t, i, Le(), r);
4480
+ return jr(e, o, ze());
4336
4481
  }
4337
4482
  async _openRedirect(e, t, i, r) {
4338
4483
  await this._originValidation(e);
4339
- const s = await ct(e, t, i, Re(), r);
4340
- return Ai(s), new Promise(() => {
4484
+ const s = await mt(e, t, i, Le(), r);
4485
+ return Xi(s), new Promise(() => {
4341
4486
  });
4342
4487
  }
4343
4488
  _initialize(e) {
4344
4489
  const t = e._key();
4345
4490
  if (this.eventManagers[t]) {
4346
4491
  const { manager: r, promise: s } = this.eventManagers[t];
4347
- return r ? Promise.resolve(r) : (A(s, "If manager is not set, promise should be"), s);
4492
+ return r ? Promise.resolve(r) : (L(s, "If manager is not set, promise should be"), s);
4348
4493
  }
4349
4494
  const i = this.initAndGetManager(e);
4350
4495
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4352,7 +4497,7 @@ class br {
4352
4497
  }), i;
4353
4498
  }
4354
4499
  async initAndGetManager(e) {
4355
- const t = await fr(e), i = new Xi(e);
4500
+ const t = await Dr(e), i = new yr(e);
4356
4501
  return t.register("authEvent", (r) => (u(
4357
4502
  r == null ? void 0 : r.authEvent,
4358
4503
  e,
@@ -4364,10 +4509,10 @@ class br {
4364
4509
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: i }, this.iframes[e._key()] = t, i;
4365
4510
  }
4366
4511
  _isIframeWebStorageSupported(e, t) {
4367
- this.iframes[e._key()].send(we, { type: we }, (r) => {
4512
+ this.iframes[e._key()].send(Ce, { type: Ce }, (r) => {
4368
4513
  var s;
4369
- const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4370
- o !== void 0 && t(!!o), R(
4514
+ const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ce];
4515
+ o !== void 0 && t(!!o), O(
4371
4516
  e,
4372
4517
  "internal-error"
4373
4518
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4376,14 +4521,14 @@ class br {
4376
4521
  }
4377
4522
  _originValidation(e) {
4378
4523
  const t = e._key();
4379
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = nr(e)), this.originValidationPromises[t];
4524
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = br(e)), this.originValidationPromises[t];
4380
4525
  }
4381
4526
  get _shouldInitProactively() {
4382
- return Ut() || De() || pe();
4527
+ return Wt() || Ge() || Te();
4383
4528
  }
4384
4529
  }
4385
- const Sr = br;
4386
- var lt = "@firebase/auth", ut = "1.7.5";
4530
+ const Jr = Kr;
4531
+ var gt = "@firebase/auth", _t = "1.7.5";
4387
4532
  /**
4388
4533
  * @license
4389
4534
  * Copyright 2020 Google LLC
@@ -4400,7 +4545,7 @@ var lt = "@firebase/auth", ut = "1.7.5";
4400
4545
  * See the License for the specific language governing permissions and
4401
4546
  * limitations under the License.
4402
4547
  */
4403
- class Rr {
4548
+ class Yr {
4404
4549
  constructor(e) {
4405
4550
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4406
4551
  }
@@ -4451,7 +4596,7 @@ class Rr {
4451
4596
  * See the License for the specific language governing permissions and
4452
4597
  * limitations under the License.
4453
4598
  */
4454
- function Ar(n) {
4599
+ function Xr(n) {
4455
4600
  switch (n) {
4456
4601
  case "Node":
4457
4602
  return "node";
@@ -4467,8 +4612,8 @@ function Ar(n) {
4467
4612
  return;
4468
4613
  }
4469
4614
  }
4470
- function Pr(n) {
4471
- ze(new qe(
4615
+ function Qr(n) {
4616
+ Ze(new et(
4472
4617
  "auth",
4473
4618
  (e, { options: t }) => {
4474
4619
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
@@ -4480,9 +4625,9 @@ function Pr(n) {
4480
4625
  apiHost: "identitytoolkit.googleapis.com",
4481
4626
  tokenApiHost: "securetoken.googleapis.com",
4482
4627
  apiScheme: "https",
4483
- sdkClientVersion: Dt(n)
4484
- }, l = new ri(i, r, s, a);
4485
- return ui(l, t), l;
4628
+ sdkClientVersion: Gt(n)
4629
+ }, l = new Ri(i, r, s, a);
4630
+ return Li(l, t), l;
4486
4631
  },
4487
4632
  "PUBLIC"
4488
4633
  /* ComponentType.PUBLIC */
@@ -4494,21 +4639,21 @@ function Pr(n) {
4494
4639
  "auth-internal"
4495
4640
  /* _ComponentName.AUTH_INTERNAL */
4496
4641
  ).initialize();
4497
- })), ze(new qe(
4642
+ })), Ze(new et(
4498
4643
  "auth-internal",
4499
4644
  (e) => {
4500
- const t = me(e.getProvider(
4645
+ const t = ke(e.getProvider(
4501
4646
  "auth"
4502
4647
  /* _ComponentName.AUTH */
4503
4648
  ).getImmediate());
4504
- return ((i) => new Rr(i))(t);
4649
+ return ((i) => new Yr(i))(t);
4505
4650
  },
4506
4651
  "PRIVATE"
4507
4652
  /* ComponentType.PRIVATE */
4508
4653
  ).setInstantiationMode(
4509
4654
  "EXPLICIT"
4510
4655
  /* InstantiationMode.EXPLICIT */
4511
- )), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
4656
+ )), Oe(gt, _t, Xr(n)), Oe(gt, _t, "esm2017");
4512
4657
  }
4513
4658
  /**
4514
4659
  * @license
@@ -4526,117 +4671,118 @@ function Pr(n) {
4526
4671
  * See the License for the specific language governing permissions and
4527
4672
  * limitations under the License.
4528
4673
  */
4529
- const Cr = 5 * 60, Or = gt("authIdTokenMaxAge") || Cr;
4530
- let dt = null;
4531
- const Nr = (n) => async (e) => {
4674
+ const Zr = 5 * 60, es = kt("authIdTokenMaxAge") || Zr;
4675
+ let vt = null;
4676
+ const ts = (n) => async (e) => {
4532
4677
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4533
- if (i && i > Or)
4678
+ if (i && i > es)
4534
4679
  return;
4535
4680
  const r = t == null ? void 0 : t.token;
4536
- dt !== r && (dt = r, await fetch(n, {
4681
+ vt !== r && (vt = r, await fetch(n, {
4537
4682
  method: r ? "POST" : "DELETE",
4538
4683
  headers: r ? {
4539
4684
  Authorization: `Bearer ${r}`
4540
4685
  } : {}
4541
4686
  }));
4542
4687
  };
4543
- function Lr(n = yn()) {
4544
- const e = _t(n, "auth");
4688
+ function ns(n = Sn()) {
4689
+ const e = Et(n, "auth");
4545
4690
  if (e.isInitialized())
4546
4691
  return e.getImmediate();
4547
- const t = li(n, {
4548
- popupRedirectResolver: Sr,
4692
+ const t = Oi(n, {
4693
+ popupRedirectResolver: Jr,
4549
4694
  persistence: [
4550
- Fi,
4551
- bi,
4552
- Gt
4695
+ or,
4696
+ Ki,
4697
+ Qt
4553
4698
  ]
4554
- }), i = gt("authTokenSyncURL");
4699
+ }), i = kt("authTokenSyncURL");
4555
4700
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4556
4701
  const s = new URL(i, location.origin);
4557
4702
  if (location.origin === s.origin) {
4558
- const o = Nr(s.toString());
4559
- yi(t, o, () => o(t.currentUser)), Ti(t, (c) => o(c));
4703
+ const o = ts(s.toString());
4704
+ Gi(t, o, () => o(t.currentUser)), Wi(t, (c) => o(c));
4560
4705
  }
4561
4706
  }
4562
- const r = Tn("auth");
4563
- return r && di(t, `http://${r}`), t;
4707
+ const r = bn("auth");
4708
+ return r && Mi(t, `http://${r}`), t;
4564
4709
  }
4565
- function Mr() {
4710
+ function is() {
4566
4711
  var n, e;
4567
4712
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4568
4713
  }
4569
- si({
4714
+ Ai({
4570
4715
  loadJS(n) {
4571
4716
  return new Promise((e, t) => {
4572
4717
  const i = document.createElement("script");
4573
4718
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4574
- const s = T(
4719
+ const s = E(
4575
4720
  "internal-error"
4576
4721
  /* AuthErrorCode.INTERNAL_ERROR */
4577
4722
  );
4578
4723
  s.customData = r, t(s);
4579
- }, i.type = "text/javascript", i.charset = "UTF-8", Mr().appendChild(i);
4724
+ }, i.type = "text/javascript", i.charset = "UTF-8", is().appendChild(i);
4580
4725
  });
4581
4726
  },
4582
4727
  gapiScript: "https://apis.google.com/js/api.js",
4583
4728
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4584
4729
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4585
4730
  });
4586
- Pr(
4731
+ Qr(
4587
4732
  "Browser"
4588
4733
  /* ClientPlatform.BROWSER */
4589
4734
  );
4590
- var Ur = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Dr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4591
- const Fr = {
4592
- key: 1,
4735
+ var rs = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, ss = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4736
+ const os = {
4737
+ key: 2,
4593
4738
  class: "h-full w-full"
4594
- }, xr = ["src"], Zr = /* @__PURE__ */ ht({
4739
+ }, as = ["src"], ks = /* @__PURE__ */ De({
4595
4740
  __name: "App",
4596
4741
  setup(n) {
4597
- const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = be(), d = te(!1), h = Ee(() => i.version), p = Ee(() => {
4598
- const m = e.currentCountry.value || "MY", g = Ke.getIdToken(), I = l.value._id;
4599
- return `${Dr.marketingV1Portal}/b/${I}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4742
+ const e = me(), t = fn(), i = pn(), r = mn(), s = gn(), o = wt(), c = ee(o.query.showHeader !== "false"), a = ee(!1), { currentBusiness: l } = me(), d = ee(!1), h = ne(() => i.version), m = ne(() => {
4743
+ const g = e.currentCountry.value || "MY", I = tt.getIdToken(), T = l.value._id;
4744
+ return `${ss.marketingV1Portal}/b/${T}/marketing/overview?showHeader=false&country=${g}&token=${I}`;
4600
4745
  });
4601
- async function w() {
4602
- if (Sn().length) {
4746
+ async function v() {
4747
+ if (Nn().length) {
4603
4748
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4604
4749
  return;
4605
4750
  }
4606
- const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
4607
- await Ii(I, g), An(m), console.log("initFirebase", m);
4751
+ const g = On(rs.firebase), I = await hn.getCustomToken(), T = ns();
4752
+ await ji(T, I), Ln(g), console.log("initFirebase", g);
4608
4753
  }
4609
- const U = async () => {
4610
- d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Nn) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
4754
+ const w = async () => {
4755
+ d.value = !1, await un(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(xn) : e.hideSidebarToggle(!0), await v(), a.value = !0, d.value = !0;
4611
4756
  };
4612
- return en(() => {
4613
- if (Pn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4614
- const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
4615
- m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4757
+ return ln(() => {
4758
+ if (Mn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4759
+ const g = document.getElementsByClassName("app-header")[0], I = document.getElementsByClassName("app-sidebar")[0], T = document.getElementsByClassName("app-container")[0], M = document.getElementsByTagName("main")[0];
4760
+ g == null || g.classList.add("!hidden"), I == null || I.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), M == null || M.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4616
4761
  }
4617
- l.value != null && (console.log("App mounted, forceRerender"), U());
4618
- }), ft(
4762
+ l.value != null && (console.log("App mounted, forceRerender"), w());
4763
+ }), xe(
4619
4764
  () => e.currentBusiness.value,
4620
- async (m, g) => {
4621
- console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
4765
+ async (g, I) => {
4766
+ console.log("Current business changed"), g != null && g._id != I._id && (console.log("forceRerender when business changes", g, I), w());
4622
4767
  }
4623
- ), (m, g) => (ne(), ke(tn, null, [
4624
- v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) : Ge("", !0),
4625
- v(d) && v(h) !== "v2" ? (ne(), ke("div", Fr, [
4626
- pt(pn, {
4627
- json: { url: v(p) }
4768
+ ), (g, I) => (H(), pe(It, null, [
4769
+ p(d) && p(h) === "v2" ? (H(), Ne(p(dn), { key: 0 })) : Ae("", !0),
4770
+ p(d) && p(h) === "v2" && p(c) ? (H(), Ne(ti, { key: 1 })) : Ae("", !0),
4771
+ p(d) && p(h) !== "v2" ? (H(), pe("div", os, [
4772
+ S(In, {
4773
+ json: { url: p(m) }
4628
4774
  }, null, 8, ["json"]),
4629
- ie("iframe", {
4775
+ _("iframe", {
4630
4776
  allow: "clipboard-read; clipboard-write",
4631
4777
  frameBorder: "0",
4632
4778
  height: "100%",
4633
4779
  width: "100%",
4634
- src: v(p)
4635
- }, null, 8, xr)
4636
- ])) : Ge("", !0)
4780
+ src: p(m)
4781
+ }, null, 8, as)
4782
+ ])) : Ae("", !0)
4637
4783
  ], 64));
4638
4784
  }
4639
4785
  });
4640
4786
  export {
4641
- Zr as default
4787
+ ks as default
4642
4788
  };