@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.38-beta.21

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 (96) hide show
  1. package/dist/{Analytic-BjSfI2Ff.js → Analytic-CEd_WApy.js} +14 -14
  2. package/dist/{App-D11A2JY1.js → App-ulCtuU5o.js} +671 -661
  3. package/dist/{AuditLogs-DWCFYoRg.js → AuditLogs-BM1Np61K.js} +11 -11
  4. package/dist/{Bin-9wV4Ah3M.js → Bin-icbjnKXw.js} +9 -9
  5. package/dist/{Broadcast-I3BtSk8V.js → Broadcast-COQ3E8vI.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js} +6 -6
  7. package/dist/{Card-CqALG5RM.js → Card-Cwh3GXi0.js} +142 -136
  8. package/dist/{Collections-rg3SzoUb.js → Collections-EuOjzpkL.js} +81 -75
  9. package/dist/{Credit-BNn1sYZv.js → Credit-BY2Fpdhh.js} +9 -9
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js} +678 -675
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js} +6 -6
  13. package/dist/{Experience-D_Qm8SUj.js → Experience-rAH7zk71.js} +9 -9
  14. package/dist/{Game-CKXgXm6Q.js → Game-DlI0yNF0.js} +10 -10
  15. package/dist/{Index-D4DGfUHd.js → Index-DemXFS3d.js} +10 -10
  16. package/dist/{Marketing-Dn9A1vgH.js → Marketing-shNBO9Rc.js} +7 -7
  17. package/dist/{Member-B55vWHDd.js → Member-C19ZgpaL.js} +10 -10
  18. package/dist/{MemberList-BWTG9Ohy.js → MemberList-B2tNB4yg.js} +27 -27
  19. package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-BN3qaTVY.js} +1 -1
  20. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js → MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js} +5621 -5418
  21. package/dist/{Mission-CFvhROuB.js → Mission-j1KI0-hJ.js} +10 -10
  22. package/dist/{Overview-4273yNwL.js → Overview-BN2Vdu8Q.js} +18 -18
  23. package/dist/{Point-B_-_C919.js → Point-8zy7QcTk.js} +9 -9
  24. package/dist/{Promotion-D2S3COxk.js → Promotion-mcUcylXB.js} +10 -10
  25. package/dist/{Queue-BmS1Oi-C.js → Queue-BsNv4P8u.js} +11 -11
  26. package/dist/{Record-DRBl0M8g.js → Record-VA6Bdlnz.js} +9 -9
  27. package/dist/{Reward-8056NmfK.js → Reward-CVyO3Ga1.js} +15 -15
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js} +11 -11
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js +1763 -0
  30. package/dist/{Segment-Bzq-pyhc.js → Segment-BMgcdIIS.js} +209 -209
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js} +3 -3
  34. package/dist/{Setting-BrJfYoru.js → Setting-BMKKkZTD.js} +457 -442
  35. package/dist/{Store-Bpl_4yZW.js → Store-DdxMDtfL.js} +466 -459
  36. package/dist/{StoreRewards-Cu7n7Pjz.js → StoreRewards-CRyeHEMF.js} +13 -13
  37. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js} +207 -221
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js} +1 -1
  39. package/dist/{Tier-_LnXg3n6.js → Tier-D5Xmp5vV.js} +229 -226
  40. package/dist/{Title-B7AGStvx.js → Title-CsK2crqD.js} +141 -138
  41. package/dist/{Transaction-Chxv6V7u.js → Transaction-Dvfc9x4f.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js} +6 -6
  43. package/dist/{Voucher-C5z2kOq9.js → Voucher-CPN7TMho.js} +13 -13
  44. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js} +10 -10
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js} +1 -1
  46. package/dist/{app-BVojNX0w.js → app-DRBevJsF.js} +1 -1
  47. package/dist/{app-7cvPyHJ7.js → app-DteFjR9L.js} +459 -449
  48. package/dist/app.js +1 -1
  49. package/dist/{business-CmxV69wT.js → business-BqV9jK-p.js} +1 -1
  50. package/dist/{campaign-CT_cNJEL.js → campaign-BHDq-yx-.js} +10 -10
  51. package/dist/{campaign-Dq5C_no-.js → campaign-CsWoG6e_.js} +2 -2
  52. package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-Dfa96W5V.js} +1 -1
  53. package/dist/{campaign.fn-BYZgKDN7.js → campaign.fn-pLrwyHA_.js} +37 -37
  54. package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-BYTYWPsR.js} +1 -1
  55. package/dist/{collection.fn-CNZRdUgy.js → collection.fn-CYLIQJig.js} +2 -2
  56. package/dist/{dto-CT9zZbv9.js → dto-DBfDbpyb.js} +4 -4
  57. package/dist/{effect-FIlOEC4H.js → effect-D9pD5RCk.js} +1 -1
  58. package/dist/{email-addresses-Ba7xImfX.js → email-addresses-BApvdLkQ.js} +1 -1
  59. package/dist/{export-uzjZFNF9.js → export--EfmCiw0.js} +4 -4
  60. package/dist/{helper-D4sAZde0.js → helper-BHiK3pLT.js} +1 -1
  61. package/dist/{index-B9pl4zRZ.js → index-2dknXEFJ.js} +19 -9
  62. package/dist/{index-CNJLP3D5.js → index-B9_Tn8si.js} +1 -1
  63. package/dist/{index-BjU8LVUC.js → index-BSQXDDQY.js} +6347 -6305
  64. package/dist/{index-CwsMG2cV.js → index-Bqc7PV3K.js} +1 -1
  65. package/dist/{index-CONvJfKv.js → index-C1Vrltkc.js} +1 -1
  66. package/dist/{index-D5rvMvzx.js → index-CD2bkLo_.js} +1 -1
  67. package/dist/{index-DNxa8Rqx.js → index-CDLBLuYq.js} +69 -68
  68. package/dist/{index-BXz54M1s.js → index-COiVJ9pA.js} +1 -1
  69. package/dist/{index-CH3z92VV.js → index-CVxruvVB.js} +1 -1
  70. package/dist/{index-CS3Jmojj.js → index-Cc80pBYX.js} +573 -573
  71. package/dist/{index-l2F5MnLF.js → index-DXM3o6kl.js} +11 -4
  72. package/dist/{index-BI3m1Ehv.js → index-DYgdunxw.js} +3 -3
  73. package/dist/{index-CvBcve-r.js → index-Pd9RCQxn.js} +1 -1
  74. package/dist/{index-CUfS9Kp1.js → index-qd_dvZcw.js} +2 -2
  75. package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DAWS_ALH.js} +34 -34
  76. package/dist/{loading-BWGQSrCB.js → loading-BVUeda4s.js} +1 -1
  77. package/dist/{membership-Cc4OZ8-U.js → membership-BL_43RJR.js} +3 -3
  78. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  79. package/dist/{money-D7p8nfun.js → money-Cd8hLiNc.js} +1 -1
  80. package/dist/{number-CMJjC4qz.js → number-DVb8PSrj.js} +1 -1
  81. package/dist/objectid-D33s3gxp.js +145 -0
  82. package/dist/{plugins-eQis66QR.js → plugins-BKtBkC9Q.js} +2 -2
  83. package/dist/{reward-DrnzbG20.js → reward-f41dJcaL.js} +1 -1
  84. package/dist/{rule-CtRxkYXB.js → rule-Cbux1-fC.js} +4 -4
  85. package/dist/rule-builder-BrZeF45Z.js +91 -0
  86. package/dist/style.css +4 -1
  87. package/dist/{template-C3UfY0v5.js → template-tqhgmIdT.js} +4 -4
  88. package/dist/timezone-DaTVH4y0.js +1150 -0
  89. package/dist/{trigger-C9U7Zgad.js → trigger-C34RfwrT.js} +4 -4
  90. package/dist/{user-D7n9yYmO.js → user-DgKhDLYr.js} +1 -1
  91. package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-xo56wiwi.js} +410 -410
  92. package/dist/{xlsx-D4S4qbcZ.js → xlsx-D8ZZRjtf.js} +1 -1
  93. package/package.json +3 -2
  94. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js +0 -1728
  95. package/dist/objectid-D5T27iny.js +0 -145
  96. package/dist/rule-builder-Di9RIYHF.js +0 -89
@@ -1,153 +1,163 @@
1
- import { defineComponent as lt, ref as ne, h as B, watch as ut, resolveComponent as Yt, openBlock as ie, createBlock as dt, unref as P, computed as Ve, onMounted as Xt, createElementBlock as $e, Fragment as Qt, createCommentVNode as He, createVNode as Zt, createElementVNode as en, nextTick as tn } from "vue";
2
- import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
3
- import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
4
- import { u as on } from "./app-wDQR6dpb.js";
5
- import { u as an } from "./business-CmxV69wT.js";
6
- import "./index-CNJLP3D5.js";
7
- import { components as q, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
8
- import { u as un } from "./vue-i18n-Bz45zC04.js";
9
- import { R as h } from "./app-7cvPyHJ7.js";
10
- import { J as dn } from "./JsonViewer-v8_C7l5N.js";
11
- import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as J, c as w, d as j, E as Se, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as Y, o as wn, p as yn, s as En, t as kn, u as bn } from "./index.esm2017-ATcsD5N4.js";
12
- import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
13
- import { S as Be, c as Sn } from "./index-BjU8LVUC.js";
14
- import { Y as Rn } from "./remy-vue-client-Cpppk9h-.js";
15
- const Pn = /* @__PURE__ */ lt({
1
+ import { defineComponent as ht, ref as ne, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ie, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as re, toDisplayString as We, 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-BqV9jK-p.js";
6
+ import "./index-B9_Tn8si.js";
7
+ import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
+ import { u as hn } from "./vue-i18n-xo56wiwi.js";
9
+ import { C as Be, m as fn } from "./timezone-DaTVH4y0.js";
10
+ import { R as f } from "./app-DteFjR9L.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 W, 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 Pn } from "./index.esm2017-DAWS_ALH.js";
13
+ import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
+ import { S as Ke, c as An } from "./index-BSQXDDQY.js";
15
+ import { Y as Cn } from "./remy-vue-client-Cpppk9h-.js";
16
+ const On = { class: "flex flex-col h-full justify-between py-16" }, Nn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Ln = /* @__PURE__ */ ht({
16
17
  __name: "NavigationTab",
17
18
  setup(n) {
18
- const { t: e } = un(), t = ne(), i = [
19
+ const { t: e } = hn(), t = ne(), i = [
19
20
  {
20
21
  label: e("connect.navigation.analytic"),
21
- value: h["$connect-ANALYTIC"]
22
+ value: f["$connect-ANALYTIC"]
22
23
  },
23
24
  {
24
25
  label: e("connect.navigation.campaign"),
25
- value: h["$connect-CAMPAIGN"],
26
+ value: f["$connect-CAMPAIGN"],
26
27
  children: [
27
28
  {
28
29
  label: e("connect.navigation.promotion"),
29
- value: h["$connect-CAMPAIGN_PROMOTION"]
30
+ value: f["$connect-CAMPAIGN_PROMOTION"]
30
31
  },
31
32
  {
32
33
  label: e("connect.navigation.voucher"),
33
- value: h["$connect-CAMPAIGN_VOUCHER"]
34
+ value: f["$connect-CAMPAIGN_VOUCHER"]
34
35
  },
35
36
  {
36
37
  label: e("connect.navigation.broadcast"),
37
- value: h["$connect-CAMPAIGN_BROADCAST"]
38
+ value: f["$connect-CAMPAIGN_BROADCAST"]
38
39
  }
39
40
  ]
40
41
  },
41
42
  {
42
43
  label: e("connect.navigation.program"),
43
- value: h["$connect-PROGRAM"],
44
+ value: f["$connect-PROGRAM"],
44
45
  children: [
45
46
  {
46
47
  label: e("connect.navigation.tier"),
47
- value: h["$connect-PROGRAM_TIER"]
48
+ value: f["$connect-PROGRAM_TIER"]
48
49
  },
49
50
  {
50
51
  label: e("connect.navigation.title"),
51
- value: h["$connect-PROGRAM_TITLE"]
52
+ value: f["$connect-PROGRAM_TITLE"]
52
53
  },
53
54
  {
54
55
  label: e("connect.navigation.experience"),
55
- value: h["$connect-PROGRAM_EXPERIENCE"]
56
+ value: f["$connect-PROGRAM_EXPERIENCE"]
56
57
  },
57
58
  {
58
59
  label: e("connect.navigation.point"),
59
- value: h["$connect-PROGRAM_POINT"],
60
- badge: () => B(q.FmPill, { variant: "premium" })
60
+ value: f["$connect-PROGRAM_POINT"],
61
+ badge: () => B(z.FmPill, { variant: "premium" })
61
62
  },
62
63
  {
63
64
  label: e("connect.navigation.credit"),
64
- value: h["$connect-PROGRAM_CREDIT"]
65
+ value: f["$connect-PROGRAM_CREDIT"]
65
66
  },
66
67
  {
67
68
  label: e("connect.navigation.game"),
68
- value: h["$connect-PROGRAM_GAME"],
69
- badge: () => B(q.FmPill, { variant: "premium" })
69
+ value: f["$connect-PROGRAM_GAME"],
70
+ badge: () => B(z.FmPill, { variant: "premium" })
70
71
  },
71
72
  {
72
73
  label: "Mission",
73
- value: h["$connect-PROGRAM_MISSION"]
74
+ value: f["$connect-PROGRAM_MISSION"]
74
75
  }
75
76
  ]
76
77
  },
77
78
  {
78
79
  label: e("connect.navigation.loyalty"),
79
- value: h["$connect-LOYALTY"],
80
+ value: f["$connect-LOYALTY"],
80
81
  children: [
81
82
  {
82
83
  label: e("connect.navigation.member"),
83
- value: h["$connect-LOYALTY_MEMBER_LIST"]
84
+ value: f["$connect-LOYALTY_MEMBER_LIST"]
84
85
  },
85
86
  {
86
87
  label: e("connect.navigation.segments"),
87
- value: h["$connect-LOYALTY_SEGMENT"],
88
- badge: () => B(q.FmPill, { variant: "premium" })
88
+ value: f["$connect-LOYALTY_SEGMENT"],
89
+ badge: () => B(z.FmPill, { variant: "premium" })
89
90
  },
90
91
  {
91
92
  label: e("connect.navigation.card"),
92
- value: h["$connect-LOYALTY_CARD"],
93
- badge: () => B(q.FmPill, { variant: "premium" })
93
+ value: f["$connect-LOYALTY_CARD"],
94
+ badge: () => B(z.FmPill, { variant: "premium" })
94
95
  }
95
96
  ]
96
97
  },
97
98
  {
98
99
  label: e("connect.navigation.referral"),
99
- value: h["$connect-REFERRAL"],
100
- badge: () => B(q.FmPill, { variant: "premium" })
100
+ value: f["$connect-REFERRAL"],
101
+ badge: () => B(z.FmPill, { variant: "premium" })
101
102
  },
102
103
  {
103
104
  label: e("connect.navigation.store"),
104
- value: h["$connect-STORE"]
105
+ value: f["$connect-STORE"]
105
106
  },
106
107
  {
107
108
  label: e("connect.navigation.transaction"),
108
- value: h["$connect-TRANSACTION"]
109
+ value: f["$connect-TRANSACTION"]
109
110
  },
110
111
  {
111
112
  label: "Marketing material",
112
- value: h["$connect-MARKETING"]
113
+ value: f["$connect-MARKETING"]
113
114
  },
114
115
  {
115
116
  label: e("connect.navigation.auditLogs"),
116
- value: h["$connect-AUDIT_LOGS"]
117
+ value: f["$connect-AUDIT_LOGS"]
117
118
  },
118
119
  {
119
120
  label: e("connect.navigation.setting"),
120
- value: h["$connect-SETTING"]
121
+ value: f["$connect-SETTING"]
121
122
  },
122
123
  {
123
124
  label: e("connect.navigation.bin"),
124
- value: h["$connect-BIN"]
125
+ value: f["$connect-BIN"]
125
126
  }
126
- ], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
127
- ut(
127
+ ], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
128
+ const d = c.currentCountry.value || "MY";
129
+ return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
130
+ });
131
+ ft(
128
132
  () => s,
129
- (a) => {
130
- const l = a.matched.map((d) => d.name).reverse();
131
- t.value = l.find((d) => o.includes(d));
133
+ (d) => {
134
+ const h = d.matched.map((p) => p.name).reverse();
135
+ t.value = h.find((p) => o.includes(p));
132
136
  },
133
137
  { immediate: !0 }
134
138
  );
135
- async function c(a) {
136
- await r.push({ name: a });
139
+ async function l(d) {
140
+ await r.push({ name: d });
137
141
  }
138
- return (a, l) => {
139
- var f;
140
- const d = Yt("FmCollapsibleTabs");
141
- return ie(), dt(d, {
142
- class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
143
- "model-value": (f = P(t)) == null ? void 0 : f.toString(),
144
- items: i,
145
- "onUpdate:modelValue": c
146
- }, null, 8, ["model-value"]);
142
+ return (d, h) => {
143
+ var w;
144
+ const p = Zt("FmCollapsibleTabs");
145
+ return ie(), ke("div", On, [
146
+ pt(p, {
147
+ class: "border-fm-color-neutral-gray-100 border-r px-4",
148
+ "model-value": (w = v(t)) == null ? void 0 : w.toString(),
149
+ items: i,
150
+ "onUpdate:modelValue": l
151
+ }, null, 8, ["model-value"]),
152
+ re("div", Nn, [
153
+ re("div", null, "Timezone: " + We(v(a).split("/")[1].replace("_", " ")), 1),
154
+ re("div", null, "(UTC" + We(v(fn).tz(v(a)).format("Z")) + ")", 1)
155
+ ])
156
+ ]);
147
157
  };
148
158
  }
149
159
  });
150
- var An = "firebase", Cn = "10.12.4";
160
+ var Mn = "firebase", Un = "10.12.4";
151
161
  /**
152
162
  * @license
153
163
  * Copyright 2020 Google LLC
@@ -164,13 +174,13 @@ var An = "firebase", Cn = "10.12.4";
164
174
  * See the License for the specific language governing permissions and
165
175
  * limitations under the License.
166
176
  */
167
- ye(An, Cn, "app");
168
- function gt() {
177
+ Se(Mn, Un, "app");
178
+ function It() {
169
179
  return {
170
180
  "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."
171
181
  };
172
182
  }
173
- const On = gt, _t = new Se("auth", "Firebase", gt());
183
+ const Dn = It, Tt = new Ce("auth", "Firebase", It());
174
184
  /**
175
185
  * @license
176
186
  * Copyright 2020 Google LLC
@@ -187,12 +197,12 @@ const On = gt, _t = new Se("auth", "Firebase", gt());
187
197
  * See the License for the specific language governing permissions and
188
198
  * limitations under the License.
189
199
  */
190
- const ce = new hn("@firebase/auth");
191
- function Nn(n, ...e) {
192
- ce.logLevel <= mt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
200
+ const le = new mn("@firebase/auth");
201
+ function Fn(n, ...e) {
202
+ le.logLevel <= vt.WARN && le.warn(`Auth (${J}): ${n}`, ...e);
193
203
  }
194
- function re(n, ...e) {
195
- ce.logLevel <= mt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
204
+ function se(n, ...e) {
205
+ le.logLevel <= vt.ERROR && le.error(`Auth (${J}): ${n}`, ...e);
196
206
  }
197
207
  /**
198
208
  * @license
@@ -210,38 +220,38 @@ function re(n, ...e) {
210
220
  * See the License for the specific language governing permissions and
211
221
  * limitations under the License.
212
222
  */
213
- function b(n, ...e) {
214
- throw Ae(n, ...e);
223
+ function R(n, ...e) {
224
+ throw Le(n, ...e);
215
225
  }
216
- function I(n, ...e) {
217
- return Ae(n, ...e);
226
+ function T(n, ...e) {
227
+ return Le(n, ...e);
218
228
  }
219
- function vt(n, e, t) {
220
- const i = Object.assign(Object.assign({}, On()), { [e]: t });
221
- return new Se("auth", "Firebase", i).create(e, {
229
+ function yt(n, e, t) {
230
+ const i = Object.assign(Object.assign({}, Dn()), { [e]: t });
231
+ return new Ce("auth", "Firebase", i).create(e, {
222
232
  appName: n.name
223
233
  });
224
234
  }
225
- function L(n) {
226
- return vt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
235
+ function M(n) {
236
+ return yt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
227
237
  }
228
- function Ae(n, ...e) {
238
+ function Le(n, ...e) {
229
239
  if (typeof n != "string") {
230
240
  const t = e[0], i = [...e.slice(1)];
231
241
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
232
242
  }
233
- return _t.create(n, ...e);
243
+ return Tt.create(n, ...e);
234
244
  }
235
245
  function u(n, e, ...t) {
236
246
  if (!n)
237
- throw Ae(e, ...t);
247
+ throw Le(e, ...t);
238
248
  }
239
- function y(n) {
249
+ function k(n) {
240
250
  const e = "INTERNAL ASSERTION FAILED: " + n;
241
- throw re(e), new Error(e);
251
+ throw se(e), new Error(e);
242
252
  }
243
- function S(n, e) {
244
- n || y(e);
253
+ function P(n, e) {
254
+ n || k(e);
245
255
  }
246
256
  /**
247
257
  * @license
@@ -259,14 +269,14 @@ function S(n, e) {
259
269
  * See the License for the specific language governing permissions and
260
270
  * limitations under the License.
261
271
  */
262
- function Ee() {
272
+ function Re() {
263
273
  var n;
264
274
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
265
275
  }
266
- function Ln() {
267
- return qe() === "http:" || qe() === "https:";
276
+ function xn() {
277
+ return Je() === "http:" || Je() === "https:";
268
278
  }
269
- function qe() {
279
+ function Je() {
270
280
  var n;
271
281
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
272
282
  }
@@ -286,15 +296,15 @@ function qe() {
286
296
  * See the License for the specific language governing permissions and
287
297
  * limitations under the License.
288
298
  */
289
- function Mn() {
299
+ function Vn() {
290
300
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
291
301
  // This is especially true for Cordova apps which have unreliable
292
302
  // navigator.onLine behavior unless cordova-plugin-network-information is
293
303
  // installed which overwrites the native navigator.onLine value and
294
304
  // defines navigator.connection.
295
- (Ln() || mn() || "connection" in navigator) ? navigator.onLine : !0;
305
+ (xn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
296
306
  }
297
- function Un() {
307
+ function $n() {
298
308
  if (typeof navigator > "u")
299
309
  return null;
300
310
  const n = navigator;
@@ -324,10 +334,10 @@ function Un() {
324
334
  */
325
335
  class X {
326
336
  constructor(e, t) {
327
- this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
337
+ this.shortDelay = e, this.longDelay = t, P(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
328
338
  }
329
339
  get() {
330
- return Mn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
340
+ return Vn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
331
341
  }
332
342
  }
333
343
  /**
@@ -346,8 +356,8 @@ class X {
346
356
  * See the License for the specific language governing permissions and
347
357
  * limitations under the License.
348
358
  */
349
- function Ce(n, e) {
350
- S(n.emulator, "Emulator should always be set here");
359
+ function Me(n, e) {
360
+ P(n.emulator, "Emulator should always be set here");
351
361
  const { url: t } = n.emulator;
352
362
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
353
363
  }
@@ -367,7 +377,7 @@ function Ce(n, e) {
367
377
  * See the License for the specific language governing permissions and
368
378
  * limitations under the License.
369
379
  */
370
- class It {
380
+ class wt {
371
381
  static initialize(e, t, i) {
372
382
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
373
383
  }
@@ -380,7 +390,7 @@ class It {
380
390
  return globalThis.fetch;
381
391
  if (typeof fetch < "u")
382
392
  return fetch;
383
- y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
393
+ k("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
384
394
  }
385
395
  static headers() {
386
396
  if (this.headersImpl)
@@ -391,7 +401,7 @@ class It {
391
401
  return globalThis.Headers;
392
402
  if (typeof Headers < "u")
393
403
  return Headers;
394
- y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
404
+ k("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
395
405
  }
396
406
  static response() {
397
407
  if (this.responseImpl)
@@ -402,7 +412,7 @@ class It {
402
412
  return globalThis.Response;
403
413
  if (typeof Response < "u")
404
414
  return Response;
405
- y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
415
+ k("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
406
416
  }
407
417
  }
408
418
  /**
@@ -421,7 +431,7 @@ class It {
421
431
  * See the License for the specific language governing permissions and
422
432
  * limitations under the License.
423
433
  */
424
- const Dn = {
434
+ const Hn = {
425
435
  // Custom token errors.
426
436
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
427
437
  // This can only happen if the SDK sends a bad request.
@@ -512,12 +522,12 @@ const Dn = {
512
522
  * See the License for the specific language governing permissions and
513
523
  * limitations under the License.
514
524
  */
515
- const Fn = new X(3e4, 6e4);
516
- function fe(n, e) {
525
+ const jn = new X(3e4, 6e4);
526
+ function pe(n, e) {
517
527
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
518
528
  }
519
529
  async function G(n, e, t, i, r = {}) {
520
- return Tt(n, r, async () => {
530
+ return Et(n, r, async () => {
521
531
  let s = {}, o = {};
522
532
  i && (e === "GET" ? o = i : s = {
523
533
  body: JSON.stringify(i)
@@ -529,18 +539,18 @@ async function G(n, e, t, i, r = {}) {
529
539
  ] = "application/json", n.languageCode && (a[
530
540
  "X-Firebase-Locale"
531
541
  /* HttpHeader.X_FIREBASE_LOCALE */
532
- ] = n.languageCode), It.fetch()(yt(n, n.config.apiHost, t, c), Object.assign({
542
+ ] = n.languageCode), wt.fetch()(bt(n, n.config.apiHost, t, c), Object.assign({
533
543
  method: e,
534
544
  headers: a,
535
545
  referrerPolicy: "no-referrer"
536
546
  }, s));
537
547
  });
538
548
  }
539
- async function Tt(n, e, t) {
549
+ async function Et(n, e, t) {
540
550
  n._canInitEmulator = !1;
541
- const i = Object.assign(Object.assign({}, Dn), e);
551
+ const i = Object.assign(Object.assign({}, Hn), e);
542
552
  try {
543
- const r = new xn(n), s = await Promise.race([
553
+ const r = new Wn(n), s = await Promise.race([
544
554
  t(),
545
555
  r.promise
546
556
  ]);
@@ -560,33 +570,33 @@ async function Tt(n, e, t) {
560
570
  throw te(n, "user-disabled", o);
561
571
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
562
572
  if (l)
563
- throw vt(n, d, l);
564
- b(n, d);
573
+ throw yt(n, d, l);
574
+ R(n, d);
565
575
  }
566
576
  } catch (r) {
567
- if (r instanceof Re)
577
+ if (r instanceof Oe)
568
578
  throw r;
569
- b(n, "network-request-failed", { message: String(r) });
579
+ R(n, "network-request-failed", { message: String(r) });
570
580
  }
571
581
  }
572
- async function wt(n, e, t, i, r = {}) {
582
+ async function kt(n, e, t, i, r = {}) {
573
583
  const s = await G(n, e, t, i, r);
574
- return "mfaPendingCredential" in s && b(n, "multi-factor-auth-required", {
584
+ return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
575
585
  _serverResponse: s
576
586
  }), s;
577
587
  }
578
- function yt(n, e, t, i) {
588
+ function bt(n, e, t, i) {
579
589
  const r = `${e}${t}?${i}`;
580
- return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
590
+ return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
581
591
  }
582
- class xn {
592
+ class Wn {
583
593
  constructor(e) {
584
594
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
585
- this.timer = setTimeout(() => i(I(
595
+ this.timer = setTimeout(() => i(T(
586
596
  this.auth,
587
597
  "network-request-failed"
588
598
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
589
- )), Fn.get());
599
+ )), jn.get());
590
600
  });
591
601
  }
592
602
  clearNetworkTimeout() {
@@ -598,7 +608,7 @@ function te(n, e, t) {
598
608
  appName: n.name
599
609
  };
600
610
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
601
- const r = I(n, e, i);
611
+ const r = T(n, e, i);
602
612
  return r.customData._tokenResponse = t, r;
603
613
  }
604
614
  /**
@@ -617,10 +627,10 @@ function te(n, e, t) {
617
627
  * See the License for the specific language governing permissions and
618
628
  * limitations under the License.
619
629
  */
620
- async function Vn(n, e) {
630
+ async function Gn(n, e) {
621
631
  return G(n, "POST", "/v1/accounts:delete", e);
622
632
  }
623
- async function Et(n, e) {
633
+ async function St(n, e) {
624
634
  return G(n, "POST", "/v1/accounts:lookup", e);
625
635
  }
626
636
  /**
@@ -639,7 +649,7 @@ async function Et(n, e) {
639
649
  * See the License for the specific language governing permissions and
640
650
  * limitations under the License.
641
651
  */
642
- function z(n) {
652
+ function q(n) {
643
653
  if (n)
644
654
  try {
645
655
  const e = new Date(Number(n));
@@ -648,8 +658,8 @@ function z(n) {
648
658
  } catch {
649
659
  }
650
660
  }
651
- async function $n(n, e = !1) {
652
- const t = j(n), i = await t.getIdToken(e), r = Oe(i);
661
+ async function Bn(n, e = !1) {
662
+ const t = W(n), i = await t.getIdToken(e), r = Ue(i);
653
663
  u(
654
664
  r && r.exp && r.auth_time && r.iat,
655
665
  t.auth,
@@ -660,29 +670,29 @@ async function $n(n, e = !1) {
660
670
  return {
661
671
  claims: r,
662
672
  token: i,
663
- authTime: z(Te(r.auth_time)),
664
- issuedAtTime: z(Te(r.iat)),
665
- expirationTime: z(Te(r.exp)),
673
+ authTime: q(ye(r.auth_time)),
674
+ issuedAtTime: q(ye(r.iat)),
675
+ expirationTime: q(ye(r.exp)),
666
676
  signInProvider: o || null,
667
677
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
668
678
  };
669
679
  }
670
- function Te(n) {
680
+ function ye(n) {
671
681
  return Number(n) * 1e3;
672
682
  }
673
- function Oe(n) {
683
+ function Ue(n) {
674
684
  const [e, t, i] = n.split(".");
675
685
  if (e === void 0 || t === void 0 || i === void 0)
676
- return re("JWT malformed, contained fewer than 3 sections"), null;
686
+ return se("JWT malformed, contained fewer than 3 sections"), null;
677
687
  try {
678
- const r = Tn(t);
679
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
688
+ const r = En(t);
689
+ return r ? JSON.parse(r) : (se("Failed to decode base64 JWT payload"), null);
680
690
  } catch (r) {
681
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
691
+ return se("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
682
692
  }
683
693
  }
684
- function ze(n) {
685
- const e = Oe(n);
694
+ function Ye(n) {
695
+ const e = Ue(n);
686
696
  return u(
687
697
  e,
688
698
  "internal-error"
@@ -719,10 +729,10 @@ async function K(n, e, t = !1) {
719
729
  try {
720
730
  return await e;
721
731
  } catch (i) {
722
- throw i instanceof Re && Hn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
732
+ throw i instanceof Oe && zn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
723
733
  }
724
734
  }
725
- function Hn({ code: n }) {
735
+ function zn({ code: n }) {
726
736
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
727
737
  }
728
738
  /**
@@ -741,7 +751,7 @@ function Hn({ code: n }) {
741
751
  * See the License for the specific language governing permissions and
742
752
  * limitations under the License.
743
753
  */
744
- class Wn {
754
+ class qn {
745
755
  constructor(e) {
746
756
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
747
757
  }
@@ -803,12 +813,12 @@ class Wn {
803
813
  * See the License for the specific language governing permissions and
804
814
  * limitations under the License.
805
815
  */
806
- class ke {
816
+ class Pe {
807
817
  constructor(e, t) {
808
818
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
809
819
  }
810
820
  _initializeTime() {
811
- this.lastSignInTime = z(this.lastLoginAt), this.creationTime = z(this.createdAt);
821
+ this.lastSignInTime = q(this.lastLoginAt), this.creationTime = q(this.createdAt);
812
822
  }
813
823
  _copy(e) {
814
824
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -836,9 +846,9 @@ class ke {
836
846
  * See the License for the specific language governing permissions and
837
847
  * limitations under the License.
838
848
  */
839
- async function le(n) {
849
+ async function ue(n) {
840
850
  var e;
841
- const t = n.auth, i = await n.getIdToken(), r = await K(n, Et(t, { idToken: i }));
851
+ const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
842
852
  u(
843
853
  r == null ? void 0 : r.users.length,
844
854
  t,
@@ -847,7 +857,7 @@ async function le(n) {
847
857
  );
848
858
  const s = r.users[0];
849
859
  n._notifyReloadListener(s);
850
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = Gn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, f = {
860
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c = Jn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
851
861
  uid: s.localId,
852
862
  displayName: s.displayName || null,
853
863
  photoURL: s.photoUrl || null,
@@ -856,21 +866,21 @@ async function le(n) {
856
866
  phoneNumber: s.phoneNumber || null,
857
867
  tenantId: s.tenantId || null,
858
868
  providerData: c,
859
- metadata: new ke(s.createdAt, s.lastLoginAt),
869
+ metadata: new Pe(s.createdAt, s.lastLoginAt),
860
870
  isAnonymous: d
861
871
  };
862
- Object.assign(n, f);
872
+ Object.assign(n, h);
863
873
  }
864
- async function jn(n) {
865
- const e = j(n);
866
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
874
+ async function Kn(n) {
875
+ const e = W(n);
876
+ await ue(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
867
877
  }
868
- function Gn(n, e) {
878
+ function Jn(n, e) {
869
879
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
870
880
  }
871
- function kt(n) {
881
+ function Rt(n) {
872
882
  return n.map((e) => {
873
- var { providerId: t } = e, i = Pe(e, ["providerId"]);
883
+ var { providerId: t } = e, i = Ne(e, ["providerId"]);
874
884
  return {
875
885
  providerId: t,
876
886
  uid: i.rawId || "",
@@ -897,16 +907,16 @@ function kt(n) {
897
907
  * See the License for the specific language governing permissions and
898
908
  * limitations under the License.
899
909
  */
900
- async function Bn(n, e) {
901
- const t = await Tt(n, {}, async () => {
910
+ async function Yn(n, e) {
911
+ const t = await Et(n, {}, async () => {
902
912
  const i = Y({
903
913
  grant_type: "refresh_token",
904
914
  refresh_token: e
905
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = yt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
915
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = bt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
906
916
  return c[
907
917
  "Content-Type"
908
918
  /* HttpHeader.CONTENT_TYPE */
909
- ] = "application/x-www-form-urlencoded", It.fetch()(o, {
919
+ ] = "application/x-www-form-urlencoded", wt.fetch()(o, {
910
920
  method: "POST",
911
921
  headers: c,
912
922
  body: i
@@ -918,8 +928,8 @@ async function Bn(n, e) {
918
928
  refreshToken: t.refresh_token
919
929
  };
920
930
  }
921
- async function qn(n, e) {
922
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
931
+ async function Xn(n, e) {
932
+ return G(n, "POST", "/v2/accounts:revokeToken", pe(n, e));
923
933
  }
924
934
  /**
925
935
  * @license
@@ -958,7 +968,7 @@ class $ {
958
968
  "internal-error"
959
969
  /* AuthErrorCode.INTERNAL_ERROR */
960
970
  );
961
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : ze(e.idToken);
971
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ye(e.idToken);
962
972
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
963
973
  }
964
974
  updateFromIdToken(e) {
@@ -967,7 +977,7 @@ class $ {
967
977
  "internal-error"
968
978
  /* AuthErrorCode.INTERNAL_ERROR */
969
979
  );
970
- const t = ze(e);
980
+ const t = Ye(e);
971
981
  this.updateTokensAndExpiration(e, null, t);
972
982
  }
973
983
  async getToken(e, t = !1) {
@@ -982,7 +992,7 @@ class $ {
982
992
  this.refreshToken = null;
983
993
  }
984
994
  async refresh(e, t) {
985
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Bn(e, t);
995
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await Yn(e, t);
986
996
  this.updateTokensAndExpiration(i, r, Number(s));
987
997
  }
988
998
  updateTokensAndExpiration(e, t, i) {
@@ -1012,7 +1022,7 @@ class $ {
1012
1022
  return Object.assign(new $(), this.toJSON());
1013
1023
  }
1014
1024
  _performRefresh() {
1015
- return y("not implemented");
1025
+ return k("not implemented");
1016
1026
  }
1017
1027
  }
1018
1028
  /**
@@ -1031,13 +1041,13 @@ class $ {
1031
1041
  * See the License for the specific language governing permissions and
1032
1042
  * limitations under the License.
1033
1043
  */
1034
- function R(n, e) {
1044
+ function A(n, e) {
1035
1045
  u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1036
1046
  }
1037
- class E {
1047
+ class b {
1038
1048
  constructor(e) {
1039
- var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
1040
- this.providerId = "firebase", this.proactiveRefresh = new Wn(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 ke(s.createdAt || void 0, s.lastLoginAt || void 0);
1049
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
1050
+ this.providerId = "firebase", this.proactiveRefresh = new qn(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 Pe(s.createdAt || void 0, s.lastLoginAt || void 0);
1041
1051
  }
1042
1052
  async getIdToken(e) {
1043
1053
  const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
@@ -1049,10 +1059,10 @@ class E {
1049
1059
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1050
1060
  }
1051
1061
  getIdTokenResult(e) {
1052
- return $n(this, e);
1062
+ return Bn(this, e);
1053
1063
  }
1054
1064
  reload() {
1055
- return jn(this);
1065
+ return Kn(this);
1056
1066
  }
1057
1067
  _assign(e) {
1058
1068
  this !== e && (u(
@@ -1063,7 +1073,7 @@ class E {
1063
1073
  ), 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));
1064
1074
  }
1065
1075
  _clone(e) {
1066
- const t = new E(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1076
+ const t = new b(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1067
1077
  return t.metadata._copy(this.metadata), t;
1068
1078
  }
1069
1079
  _onReload(e) {
@@ -1085,13 +1095,13 @@ class E {
1085
1095
  }
1086
1096
  async _updateTokensIfNecessary(e, t = !1) {
1087
1097
  let i = !1;
1088
- 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);
1098
+ e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await ue(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1089
1099
  }
1090
1100
  async delete() {
1091
- if (w(this.auth.app))
1092
- return Promise.reject(L(this.auth));
1101
+ if (E(this.auth.app))
1102
+ return Promise.reject(M(this.auth));
1093
1103
  const e = await this.getIdToken();
1094
- return await K(this, Vn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1104
+ return await K(this, Gn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1095
1105
  }
1096
1106
  toJSON() {
1097
1107
  return Object.assign(Object.assign({
@@ -1119,45 +1129,45 @@ class E {
1119
1129
  }
1120
1130
  static _fromJSON(e, t) {
1121
1131
  var i, r, s, o, c, a, l, d;
1122
- const f = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, x = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, ee = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, p = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, m = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, v = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: U, emailVerified: De, isAnonymous: Fe, providerData: ve, stsTokenManager: xe } = t;
1132
+ 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, ee = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, g = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, I = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: D, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: je } = t;
1123
1133
  u(
1124
- U && xe,
1134
+ D && je,
1125
1135
  e,
1126
1136
  "internal-error"
1127
1137
  /* AuthErrorCode.INTERNAL_ERROR */
1128
1138
  );
1129
- const Kt = $.fromJSON(this.name, xe);
1139
+ const Xt = $.fromJSON(this.name, je);
1130
1140
  u(
1131
- typeof U == "string",
1141
+ typeof D == "string",
1132
1142
  e,
1133
1143
  "internal-error"
1134
1144
  /* AuthErrorCode.INTERNAL_ERROR */
1135
- ), R(f, e.name), R(_, e.name), u(
1136
- typeof De == "boolean",
1145
+ ), A(h, e.name), A(p, e.name), u(
1146
+ typeof $e == "boolean",
1137
1147
  e,
1138
1148
  "internal-error"
1139
1149
  /* AuthErrorCode.INTERNAL_ERROR */
1140
1150
  ), u(
1141
- typeof Fe == "boolean",
1151
+ typeof He == "boolean",
1142
1152
  e,
1143
1153
  "internal-error"
1144
1154
  /* AuthErrorCode.INTERNAL_ERROR */
1145
- ), R(x, e.name), R(M, e.name), R(ee, e.name), R(p, e.name), R(m, e.name), R(v, e.name);
1146
- const Ie = new E({
1147
- uid: U,
1155
+ ), A(w, e.name), A(U, e.name), A(ee, e.name), A(m, e.name), A(g, e.name), A(I, e.name);
1156
+ const Te = new b({
1157
+ uid: D,
1148
1158
  auth: e,
1149
- email: _,
1150
- emailVerified: De,
1151
- displayName: f,
1152
- isAnonymous: Fe,
1153
- photoURL: M,
1154
- phoneNumber: x,
1159
+ email: p,
1160
+ emailVerified: $e,
1161
+ displayName: h,
1162
+ isAnonymous: He,
1163
+ photoURL: U,
1164
+ phoneNumber: w,
1155
1165
  tenantId: ee,
1156
- stsTokenManager: Kt,
1157
- createdAt: m,
1158
- lastLoginAt: v
1166
+ stsTokenManager: Xt,
1167
+ createdAt: g,
1168
+ lastLoginAt: I
1159
1169
  });
1160
- return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), p && (Ie._redirectEventId = p), Ie;
1170
+ return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), m && (Te._redirectEventId = m), Te;
1161
1171
  }
1162
1172
  /**
1163
1173
  * Initialize a User from an idToken server response
@@ -1167,13 +1177,13 @@ class E {
1167
1177
  static async _fromIdTokenResponse(e, t, i = !1) {
1168
1178
  const r = new $();
1169
1179
  r.updateFromServerResponse(t);
1170
- const s = new E({
1180
+ const s = new b({
1171
1181
  uid: t.localId,
1172
1182
  auth: e,
1173
1183
  stsTokenManager: r,
1174
1184
  isAnonymous: i
1175
1185
  });
1176
- return await le(s), s;
1186
+ return await ue(s), s;
1177
1187
  }
1178
1188
  /**
1179
1189
  * Initialize a User from an idToken server response
@@ -1187,9 +1197,9 @@ class E {
1187
1197
  "internal-error"
1188
1198
  /* AuthErrorCode.INTERNAL_ERROR */
1189
1199
  );
1190
- const s = r.providerUserInfo !== void 0 ? kt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1200
+ const s = r.providerUserInfo !== void 0 ? Rt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1191
1201
  c.updateFromIdToken(i);
1192
- const a = new E({
1202
+ const a = new b({
1193
1203
  uid: r.localId,
1194
1204
  auth: e,
1195
1205
  stsTokenManager: c,
@@ -1203,7 +1213,7 @@ class E {
1203
1213
  phoneNumber: r.phoneNumber || null,
1204
1214
  tenantId: r.tenantId || null,
1205
1215
  providerData: s,
1206
- metadata: new ke(r.createdAt, r.lastLoginAt),
1216
+ metadata: new Pe(r.createdAt, r.lastLoginAt),
1207
1217
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1208
1218
  };
1209
1219
  return Object.assign(a, l), a;
@@ -1225,11 +1235,11 @@ class E {
1225
1235
  * See the License for the specific language governing permissions and
1226
1236
  * limitations under the License.
1227
1237
  */
1228
- const Ke = /* @__PURE__ */ new Map();
1229
- function k(n) {
1230
- S(n instanceof Function, "Expected a class definition");
1231
- let e = Ke.get(n);
1232
- return e ? (S(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Ke.set(n, e), e);
1238
+ const Xe = /* @__PURE__ */ new Map();
1239
+ function S(n) {
1240
+ P(n instanceof Function, "Expected a class definition");
1241
+ let e = Xe.get(n);
1242
+ return e ? (P(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Xe.set(n, e), e);
1233
1243
  }
1234
1244
  /**
1235
1245
  * @license
@@ -1247,7 +1257,7 @@ function k(n) {
1247
1257
  * See the License for the specific language governing permissions and
1248
1258
  * limitations under the License.
1249
1259
  */
1250
- class bt {
1260
+ class Pt {
1251
1261
  constructor() {
1252
1262
  this.type = "NONE", this.storage = {};
1253
1263
  }
@@ -1269,8 +1279,8 @@ class bt {
1269
1279
  _removeListener(e, t) {
1270
1280
  }
1271
1281
  }
1272
- bt.type = "NONE";
1273
- const Je = bt;
1282
+ Pt.type = "NONE";
1283
+ const Qe = Pt;
1274
1284
  /**
1275
1285
  * @license
1276
1286
  * Copyright 2019 Google LLC
@@ -1287,21 +1297,21 @@ const Je = bt;
1287
1297
  * See the License for the specific language governing permissions and
1288
1298
  * limitations under the License.
1289
1299
  */
1290
- function se(n, e, t) {
1300
+ function oe(n, e, t) {
1291
1301
  return `firebase:${n}:${e}:${t}`;
1292
1302
  }
1293
1303
  class H {
1294
1304
  constructor(e, t, i) {
1295
1305
  this.persistence = e, this.auth = t, this.userKey = i;
1296
1306
  const { config: r, name: s } = this.auth;
1297
- 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);
1307
+ this.fullUserKey = oe(this.userKey, r.apiKey, s), this.fullPersistenceKey = oe("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1298
1308
  }
1299
1309
  setCurrentUser(e) {
1300
1310
  return this.persistence._set(this.fullUserKey, e.toJSON());
1301
1311
  }
1302
1312
  async getCurrentUser() {
1303
1313
  const e = await this.persistence._get(this.fullUserKey);
1304
- return e ? E._fromJSON(this.auth, e) : null;
1314
+ return e ? b._fromJSON(this.auth, e) : null;
1305
1315
  }
1306
1316
  removeCurrentUser() {
1307
1317
  return this.persistence._remove(this.fullUserKey);
@@ -1321,20 +1331,20 @@ class H {
1321
1331
  }
1322
1332
  static async create(e, t, i = "authUser") {
1323
1333
  if (!t.length)
1324
- return new H(k(Je), e, i);
1334
+ return new H(S(Qe), e, i);
1325
1335
  const r = (await Promise.all(t.map(async (l) => {
1326
1336
  if (await l._isAvailable())
1327
1337
  return l;
1328
1338
  }))).filter((l) => l);
1329
- let s = r[0] || k(Je);
1330
- const o = se(i, e.config.apiKey, e.name);
1339
+ let s = r[0] || S(Qe);
1340
+ const o = oe(i, e.config.apiKey, e.name);
1331
1341
  let c = null;
1332
1342
  for (const l of t)
1333
1343
  try {
1334
1344
  const d = await l._get(o);
1335
1345
  if (d) {
1336
- const f = E._fromJSON(e, d);
1337
- l !== s && (c = f), s = l;
1346
+ const h = b._fromJSON(e, d);
1347
+ l !== s && (c = h), s = l;
1338
1348
  break;
1339
1349
  }
1340
1350
  } catch {
@@ -1365,29 +1375,29 @@ class H {
1365
1375
  * See the License for the specific language governing permissions and
1366
1376
  * limitations under the License.
1367
1377
  */
1368
- function Ye(n) {
1378
+ function Ze(n) {
1369
1379
  const e = n.toLowerCase();
1370
1380
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1371
1381
  return "Opera";
1372
- if (Pt(e))
1382
+ if (Ot(e))
1373
1383
  return "IEMobile";
1374
1384
  if (e.includes("msie") || e.includes("trident/"))
1375
1385
  return "IE";
1376
1386
  if (e.includes("edge/"))
1377
1387
  return "Edge";
1378
- if (St(e))
1388
+ if (At(e))
1379
1389
  return "Firefox";
1380
1390
  if (e.includes("silk/"))
1381
1391
  return "Silk";
1382
- if (Ct(e))
1392
+ if (Lt(e))
1383
1393
  return "Blackberry";
1384
- if (Ot(e))
1394
+ if (Mt(e))
1385
1395
  return "Webos";
1386
- if (Ne(e))
1396
+ if (De(e))
1387
1397
  return "Safari";
1388
- if ((e.includes("chrome/") || Rt(e)) && !e.includes("edge/"))
1398
+ if ((e.includes("chrome/") || Ct(e)) && !e.includes("edge/"))
1389
1399
  return "Chrome";
1390
- if (At(e))
1400
+ if (Nt(e))
1391
1401
  return "Android";
1392
1402
  {
1393
1403
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1396,42 +1406,42 @@ function Ye(n) {
1396
1406
  }
1397
1407
  return "Other";
1398
1408
  }
1399
- function St(n = g()) {
1409
+ function At(n = _()) {
1400
1410
  return /firefox\//i.test(n);
1401
1411
  }
1402
- function Ne(n = g()) {
1412
+ function De(n = _()) {
1403
1413
  const e = n.toLowerCase();
1404
1414
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1405
1415
  }
1406
- function Rt(n = g()) {
1416
+ function Ct(n = _()) {
1407
1417
  return /crios\//i.test(n);
1408
1418
  }
1409
- function Pt(n = g()) {
1419
+ function Ot(n = _()) {
1410
1420
  return /iemobile/i.test(n);
1411
1421
  }
1412
- function At(n = g()) {
1422
+ function Nt(n = _()) {
1413
1423
  return /android/i.test(n);
1414
1424
  }
1415
- function Ct(n = g()) {
1425
+ function Lt(n = _()) {
1416
1426
  return /blackberry/i.test(n);
1417
1427
  }
1418
- function Ot(n = g()) {
1428
+ function Mt(n = _()) {
1419
1429
  return /webos/i.test(n);
1420
1430
  }
1421
- function pe(n = g()) {
1431
+ function me(n = _()) {
1422
1432
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1423
1433
  }
1424
- function zn(n = g()) {
1434
+ function Qn(n = _()) {
1425
1435
  var e;
1426
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1436
+ return me(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1427
1437
  }
1428
- function Kn() {
1429
- return wn() && document.documentMode === 10;
1438
+ function Zn() {
1439
+ return kn() && document.documentMode === 10;
1430
1440
  }
1431
- function Nt(n = g()) {
1432
- return pe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
1441
+ function Ut(n = _()) {
1442
+ return me(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
1433
1443
  }
1434
- function Jn() {
1444
+ function ei() {
1435
1445
  try {
1436
1446
  return !!(window && window !== window.top);
1437
1447
  } catch {
@@ -1454,14 +1464,14 @@ function Jn() {
1454
1464
  * See the License for the specific language governing permissions and
1455
1465
  * limitations under the License.
1456
1466
  */
1457
- function Lt(n, e = []) {
1467
+ function Dt(n, e = []) {
1458
1468
  let t;
1459
1469
  switch (n) {
1460
1470
  case "Browser":
1461
- t = Ye(g());
1471
+ t = Ze(_());
1462
1472
  break;
1463
1473
  case "Worker":
1464
- t = `${Ye(g())}-${n}`;
1474
+ t = `${Ze(_())}-${n}`;
1465
1475
  break;
1466
1476
  default:
1467
1477
  t = n;
@@ -1485,7 +1495,7 @@ function Lt(n, e = []) {
1485
1495
  * See the License for the specific language governing permissions and
1486
1496
  * limitations under the License.
1487
1497
  */
1488
- class Yn {
1498
+ class ti {
1489
1499
  constructor(e) {
1490
1500
  this.auth = e, this.queue = [];
1491
1501
  }
@@ -1540,8 +1550,8 @@ class Yn {
1540
1550
  * See the License for the specific language governing permissions and
1541
1551
  * limitations under the License.
1542
1552
  */
1543
- async function Xn(n, e = {}) {
1544
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1553
+ async function ni(n, e = {}) {
1554
+ return G(n, "GET", "/v2/passwordPolicy", pe(n, e));
1545
1555
  }
1546
1556
  /**
1547
1557
  * @license
@@ -1559,12 +1569,12 @@ async function Xn(n, e = {}) {
1559
1569
  * See the License for the specific language governing permissions and
1560
1570
  * limitations under the License.
1561
1571
  */
1562
- const Qn = 6;
1563
- class Zn {
1572
+ const ii = 6;
1573
+ class ri {
1564
1574
  constructor(e) {
1565
1575
  var t, i, r, s;
1566
1576
  const o = e.customStrengthOptions;
1567
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Qn, 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;
1577
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ii, 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;
1568
1578
  }
1569
1579
  validatePassword(e) {
1570
1580
  var t, i, r, s, o, c;
@@ -1647,12 +1657,12 @@ class Zn {
1647
1657
  * See the License for the specific language governing permissions and
1648
1658
  * limitations under the License.
1649
1659
  */
1650
- class ei {
1660
+ class si {
1651
1661
  constructor(e, t, i, r) {
1652
- 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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Yn(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 = _t, 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;
1662
+ 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 ti(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;
1653
1663
  }
1654
1664
  _initializeWithPersistence(e, t) {
1655
- return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
1665
+ return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
1656
1666
  var i, r;
1657
1667
  if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1658
1668
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
@@ -1685,7 +1695,7 @@ class ei {
1685
1695
  }
1686
1696
  async initializeCurrentUserFromIdToken(e) {
1687
1697
  try {
1688
- const t = await Et(this, { idToken: e }), i = await E._fromGetAccountInfoResponse(this, t, e);
1698
+ const t = await St(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1689
1699
  await this.directlySetCurrentUser(i);
1690
1700
  } catch (t) {
1691
1701
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1693,7 +1703,7 @@ class ei {
1693
1703
  }
1694
1704
  async initializeCurrentUser(e) {
1695
1705
  var t;
1696
- if (w(this.app)) {
1706
+ if (E(this.app)) {
1697
1707
  const o = this.app.settings.authIdToken;
1698
1708
  return o ? new Promise((c) => {
1699
1709
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -1735,7 +1745,7 @@ class ei {
1735
1745
  }
1736
1746
  async reloadAndSetCurrentUserOrClear(e) {
1737
1747
  try {
1738
- await le(e);
1748
+ await ue(e);
1739
1749
  } catch (t) {
1740
1750
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1741
1751
  return this.directlySetCurrentUser(null);
@@ -1743,15 +1753,15 @@ class ei {
1743
1753
  return this.directlySetCurrentUser(e);
1744
1754
  }
1745
1755
  useDeviceLanguage() {
1746
- this.languageCode = Un();
1756
+ this.languageCode = $n();
1747
1757
  }
1748
1758
  async _delete() {
1749
1759
  this._deleted = !0;
1750
1760
  }
1751
1761
  async updateCurrentUser(e) {
1752
- if (w(this.app))
1753
- return Promise.reject(L(this));
1754
- const t = e ? j(e) : null;
1762
+ if (E(this.app))
1763
+ return Promise.reject(M(this));
1764
+ const t = e ? W(e) : null;
1755
1765
  return t && u(
1756
1766
  t.auth.config.apiKey === this.config.apiKey,
1757
1767
  this,
@@ -1771,15 +1781,15 @@ class ei {
1771
1781
  });
1772
1782
  }
1773
1783
  async signOut() {
1774
- return w(this.app) ? Promise.reject(L(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1784
+ return E(this.app) ? Promise.reject(M(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1775
1785
  null,
1776
1786
  /* skipBeforeStateCallbacks */
1777
1787
  !0
1778
1788
  ));
1779
1789
  }
1780
1790
  setPersistence(e) {
1781
- return w(this.app) ? Promise.reject(L(this)) : this.queue(async () => {
1782
- await this.assertedPersistence.setPersistence(k(e));
1791
+ return E(this.app) ? Promise.reject(M(this)) : this.queue(async () => {
1792
+ await this.assertedPersistence.setPersistence(S(e));
1783
1793
  });
1784
1794
  }
1785
1795
  _getRecaptchaConfig() {
@@ -1794,14 +1804,14 @@ class ei {
1794
1804
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1795
1805
  }
1796
1806
  async _updatePasswordPolicy() {
1797
- const e = await Xn(this), t = new Zn(e);
1807
+ const e = await ni(this), t = new ri(e);
1798
1808
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1799
1809
  }
1800
1810
  _getPersistence() {
1801
1811
  return this.assertedPersistence.persistence.type;
1802
1812
  }
1803
1813
  _updateErrorMap(e) {
1804
- this._errorFactory = new Se("auth", "Firebase", e());
1814
+ this._errorFactory = new Ce("auth", "Firebase", e());
1805
1815
  }
1806
1816
  onAuthStateChanged(e, t, i) {
1807
1817
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1834,7 +1844,7 @@ class ei {
1834
1844
  token: e,
1835
1845
  idToken: t
1836
1846
  };
1837
- this.tenantId != null && (i.tenantId = this.tenantId), await qn(this, i);
1847
+ this.tenantId != null && (i.tenantId = this.tenantId), await Xn(this, i);
1838
1848
  }
1839
1849
  }
1840
1850
  toJSON() {
@@ -1852,7 +1862,7 @@ class ei {
1852
1862
  }
1853
1863
  async getOrInitRedirectPersistenceManager(e) {
1854
1864
  if (!this.redirectPersistenceManager) {
1855
- const t = e && k(e) || this._popupRedirectResolver;
1865
+ const t = e && S(e) || this._popupRedirectResolver;
1856
1866
  u(
1857
1867
  t,
1858
1868
  this,
@@ -1860,7 +1870,7 @@ class ei {
1860
1870
  /* AuthErrorCode.ARGUMENT_ERROR */
1861
1871
  ), this.redirectPersistenceManager = await H.create(
1862
1872
  this,
1863
- [k(t._redirectPersistence)],
1873
+ [S(t._redirectPersistence)],
1864
1874
  "redirectUser"
1865
1875
  /* KeyName.REDIRECT_USER */
1866
1876
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -1947,7 +1957,7 @@ class ei {
1947
1957
  ), this.persistenceManager;
1948
1958
  }
1949
1959
  _logFramework(e) {
1950
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Lt(this.config.clientPlatform, this._getFrameworks()));
1960
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Dt(this.config.clientPlatform, this._getFrameworks()));
1951
1961
  }
1952
1962
  _getFrameworks() {
1953
1963
  return this.frameworks;
@@ -1977,15 +1987,15 @@ class ei {
1977
1987
  async _getAppCheckToken() {
1978
1988
  var e;
1979
1989
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
1980
- return t != null && t.error && Nn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1990
+ return t != null && t.error && Fn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1981
1991
  }
1982
1992
  }
1983
- function me(n) {
1984
- return j(n);
1993
+ function ge(n) {
1994
+ return W(n);
1985
1995
  }
1986
- class Xe {
1996
+ class et {
1987
1997
  constructor(e) {
1988
- this.auth = e, this.observer = null, this.addObserver = gn((t) => this.observer = t);
1998
+ this.auth = e, this.observer = null, this.addObserver = In((t) => this.observer = t);
1989
1999
  }
1990
2000
  get next() {
1991
2001
  return u(
@@ -2012,7 +2022,7 @@ class Xe {
2012
2022
  * See the License for the specific language governing permissions and
2013
2023
  * limitations under the License.
2014
2024
  */
2015
- let Le = {
2025
+ let Fe = {
2016
2026
  async loadJS() {
2017
2027
  throw new Error("Unable to load external scripts");
2018
2028
  },
@@ -2020,16 +2030,16 @@ let Le = {
2020
2030
  recaptchaEnterpriseScript: "",
2021
2031
  gapiScript: ""
2022
2032
  };
2023
- function ti(n) {
2024
- Le = n;
2033
+ function oi(n) {
2034
+ Fe = n;
2025
2035
  }
2026
- function ni(n) {
2027
- return Le.loadJS(n);
2036
+ function ai(n) {
2037
+ return Fe.loadJS(n);
2028
2038
  }
2029
- function ii() {
2030
- return Le.gapiScript;
2039
+ function ci() {
2040
+ return Fe.gapiScript;
2031
2041
  }
2032
- function ri(n) {
2042
+ function li(n) {
2033
2043
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2034
2044
  }
2035
2045
  /**
@@ -2048,13 +2058,13 @@ function ri(n) {
2048
2058
  * See the License for the specific language governing permissions and
2049
2059
  * limitations under the License.
2050
2060
  */
2051
- function si(n, e) {
2052
- const t = pt(n, "auth");
2061
+ function ui(n, e) {
2062
+ const t = _t(n, "auth");
2053
2063
  if (t.isInitialized()) {
2054
2064
  const r = t.getImmediate(), s = t.getOptions();
2055
- if (In(s, e ?? {}))
2065
+ if (wn(s, e ?? {}))
2056
2066
  return r;
2057
- b(
2067
+ R(
2058
2068
  r,
2059
2069
  "already-initialized"
2060
2070
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2062,12 +2072,12 @@ function si(n, e) {
2062
2072
  }
2063
2073
  return t.initialize({ options: e });
2064
2074
  }
2065
- function oi(n, e) {
2066
- const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
2075
+ function di(n, e) {
2076
+ const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2067
2077
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2068
2078
  }
2069
- function ai(n, e, t) {
2070
- const i = me(n);
2079
+ function hi(n, e, t) {
2080
+ const i = ge(n);
2071
2081
  u(
2072
2082
  i._canInitEmulator,
2073
2083
  i,
@@ -2079,38 +2089,38 @@ function ai(n, e, t) {
2079
2089
  "invalid-emulator-scheme"
2080
2090
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2081
2091
  );
2082
- const r = !1, s = Mt(e), { host: o, port: c } = ci(e), a = c === null ? "" : `:${c}`;
2092
+ const r = !1, s = Ft(e), { host: o, port: c } = fi(e), a = c === null ? "" : `:${c}`;
2083
2093
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2084
2094
  host: o,
2085
2095
  port: c,
2086
2096
  protocol: s.replace(":", ""),
2087
2097
  options: Object.freeze({ disableWarnings: r })
2088
- }), li();
2098
+ }), pi();
2089
2099
  }
2090
- function Mt(n) {
2100
+ function Ft(n) {
2091
2101
  const e = n.indexOf(":");
2092
2102
  return e < 0 ? "" : n.substr(0, e + 1);
2093
2103
  }
2094
- function ci(n) {
2095
- const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2104
+ function fi(n) {
2105
+ const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2096
2106
  if (!t)
2097
2107
  return { host: "", port: null };
2098
2108
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2099
2109
  if (r) {
2100
2110
  const s = r[1];
2101
- return { host: s, port: Qe(i.substr(s.length + 1)) };
2111
+ return { host: s, port: tt(i.substr(s.length + 1)) };
2102
2112
  } else {
2103
2113
  const [s, o] = i.split(":");
2104
- return { host: s, port: Qe(o) };
2114
+ return { host: s, port: tt(o) };
2105
2115
  }
2106
2116
  }
2107
- function Qe(n) {
2117
+ function tt(n) {
2108
2118
  if (!n)
2109
2119
  return null;
2110
2120
  const e = Number(n);
2111
2121
  return isNaN(e) ? null : e;
2112
2122
  }
2113
- function li() {
2123
+ function pi() {
2114
2124
  function n() {
2115
2125
  const e = document.createElement("p"), t = e.style;
2116
2126
  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);
@@ -2133,7 +2143,7 @@ function li() {
2133
2143
  * See the License for the specific language governing permissions and
2134
2144
  * limitations under the License.
2135
2145
  */
2136
- class Ut {
2146
+ class xt {
2137
2147
  /** @internal */
2138
2148
  constructor(e, t) {
2139
2149
  this.providerId = e, this.signInMethod = t;
@@ -2144,19 +2154,19 @@ class Ut {
2144
2154
  * @returns a JSON-serializable representation of this object.
2145
2155
  */
2146
2156
  toJSON() {
2147
- return y("not implemented");
2157
+ return k("not implemented");
2148
2158
  }
2149
2159
  /** @internal */
2150
2160
  _getIdTokenResponse(e) {
2151
- return y("not implemented");
2161
+ return k("not implemented");
2152
2162
  }
2153
2163
  /** @internal */
2154
2164
  _linkToIdToken(e, t) {
2155
- return y("not implemented");
2165
+ return k("not implemented");
2156
2166
  }
2157
2167
  /** @internal */
2158
2168
  _getReauthenticationResolver(e) {
2159
- return y("not implemented");
2169
+ return k("not implemented");
2160
2170
  }
2161
2171
  }
2162
2172
  /**
@@ -2175,8 +2185,8 @@ class Ut {
2175
2185
  * See the License for the specific language governing permissions and
2176
2186
  * limitations under the License.
2177
2187
  */
2178
- async function W(n, e) {
2179
- return wt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2188
+ async function j(n, e) {
2189
+ return kt(n, "POST", "/v1/accounts:signInWithIdp", pe(n, e));
2180
2190
  }
2181
2191
  /**
2182
2192
  * @license
@@ -2194,15 +2204,15 @@ async function W(n, e) {
2194
2204
  * See the License for the specific language governing permissions and
2195
2205
  * limitations under the License.
2196
2206
  */
2197
- const ui = "http://localhost";
2198
- class D extends Ut {
2207
+ const mi = "http://localhost";
2208
+ class F extends xt {
2199
2209
  constructor() {
2200
2210
  super(...arguments), this.pendingToken = null;
2201
2211
  }
2202
2212
  /** @internal */
2203
2213
  static _fromParams(e) {
2204
- const t = new D(e.providerId, e.signInMethod);
2205
- 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) : b(
2214
+ const t = new F(e.providerId, e.signInMethod);
2215
+ 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(
2206
2216
  "argument-error"
2207
2217
  /* AuthErrorCode.ARGUMENT_ERROR */
2208
2218
  ), t;
@@ -2229,30 +2239,30 @@ class D extends Ut {
2229
2239
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2230
2240
  */
2231
2241
  static fromJSON(e) {
2232
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Pe(t, ["providerId", "signInMethod"]);
2242
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
2233
2243
  if (!i || !r)
2234
2244
  return null;
2235
- const o = new D(i, r);
2245
+ const o = new F(i, r);
2236
2246
  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;
2237
2247
  }
2238
2248
  /** @internal */
2239
2249
  _getIdTokenResponse(e) {
2240
2250
  const t = this.buildRequest();
2241
- return W(e, t);
2251
+ return j(e, t);
2242
2252
  }
2243
2253
  /** @internal */
2244
2254
  _linkToIdToken(e, t) {
2245
2255
  const i = this.buildRequest();
2246
- return i.idToken = t, W(e, i);
2256
+ return i.idToken = t, j(e, i);
2247
2257
  }
2248
2258
  /** @internal */
2249
2259
  _getReauthenticationResolver(e) {
2250
2260
  const t = this.buildRequest();
2251
- return t.autoCreate = !1, W(e, t);
2261
+ return t.autoCreate = !1, j(e, t);
2252
2262
  }
2253
2263
  buildRequest() {
2254
2264
  const e = {
2255
- requestUri: ui,
2265
+ requestUri: mi,
2256
2266
  returnSecureToken: !0
2257
2267
  };
2258
2268
  if (this.pendingToken)
@@ -2280,7 +2290,7 @@ class D extends Ut {
2280
2290
  * See the License for the specific language governing permissions and
2281
2291
  * limitations under the License.
2282
2292
  */
2283
- class Dt {
2293
+ class Vt {
2284
2294
  /**
2285
2295
  * Constructor for generic OAuth providers.
2286
2296
  *
@@ -2333,7 +2343,7 @@ class Dt {
2333
2343
  * See the License for the specific language governing permissions and
2334
2344
  * limitations under the License.
2335
2345
  */
2336
- class Q extends Dt {
2346
+ class Q extends Vt {
2337
2347
  constructor() {
2338
2348
  super(...arguments), this.scopes = [];
2339
2349
  }
@@ -2368,7 +2378,7 @@ class Q extends Dt {
2368
2378
  * See the License for the specific language governing permissions and
2369
2379
  * limitations under the License.
2370
2380
  */
2371
- class A extends Q {
2381
+ class C extends Q {
2372
2382
  constructor() {
2373
2383
  super(
2374
2384
  "facebook.com"
@@ -2388,9 +2398,9 @@ class A extends Q {
2388
2398
  * @param accessToken - Facebook access token.
2389
2399
  */
2390
2400
  static credential(e) {
2391
- return D._fromParams({
2392
- providerId: A.PROVIDER_ID,
2393
- signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
2401
+ return F._fromParams({
2402
+ providerId: C.PROVIDER_ID,
2403
+ signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
2394
2404
  accessToken: e
2395
2405
  });
2396
2406
  }
@@ -2400,7 +2410,7 @@ class A extends Q {
2400
2410
  * @param userCredential - The user credential.
2401
2411
  */
2402
2412
  static credentialFromResult(e) {
2403
- return A.credentialFromTaggedObject(e);
2413
+ return C.credentialFromTaggedObject(e);
2404
2414
  }
2405
2415
  /**
2406
2416
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2409,20 +2419,20 @@ class A extends Q {
2409
2419
  * @param userCredential - The user credential.
2410
2420
  */
2411
2421
  static credentialFromError(e) {
2412
- return A.credentialFromTaggedObject(e.customData || {});
2422
+ return C.credentialFromTaggedObject(e.customData || {});
2413
2423
  }
2414
2424
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2415
2425
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2416
2426
  return null;
2417
2427
  try {
2418
- return A.credential(e.oauthAccessToken);
2428
+ return C.credential(e.oauthAccessToken);
2419
2429
  } catch {
2420
2430
  return null;
2421
2431
  }
2422
2432
  }
2423
2433
  }
2424
- A.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2425
- A.PROVIDER_ID = "facebook.com";
2434
+ C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2435
+ C.PROVIDER_ID = "facebook.com";
2426
2436
  /**
2427
2437
  * @license
2428
2438
  * Copyright 2020 Google LLC
@@ -2439,7 +2449,7 @@ A.PROVIDER_ID = "facebook.com";
2439
2449
  * See the License for the specific language governing permissions and
2440
2450
  * limitations under the License.
2441
2451
  */
2442
- class C extends Q {
2452
+ class O extends Q {
2443
2453
  constructor() {
2444
2454
  super(
2445
2455
  "google.com"
@@ -2460,9 +2470,9 @@ class C extends Q {
2460
2470
  * @param accessToken - Google access token.
2461
2471
  */
2462
2472
  static credential(e, t) {
2463
- return D._fromParams({
2464
- providerId: C.PROVIDER_ID,
2465
- signInMethod: C.GOOGLE_SIGN_IN_METHOD,
2473
+ return F._fromParams({
2474
+ providerId: O.PROVIDER_ID,
2475
+ signInMethod: O.GOOGLE_SIGN_IN_METHOD,
2466
2476
  idToken: e,
2467
2477
  accessToken: t
2468
2478
  });
@@ -2473,7 +2483,7 @@ class C extends Q {
2473
2483
  * @param userCredential - The user credential.
2474
2484
  */
2475
2485
  static credentialFromResult(e) {
2476
- return C.credentialFromTaggedObject(e);
2486
+ return O.credentialFromTaggedObject(e);
2477
2487
  }
2478
2488
  /**
2479
2489
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2482,7 +2492,7 @@ class C extends Q {
2482
2492
  * @param userCredential - The user credential.
2483
2493
  */
2484
2494
  static credentialFromError(e) {
2485
- return C.credentialFromTaggedObject(e.customData || {});
2495
+ return O.credentialFromTaggedObject(e.customData || {});
2486
2496
  }
2487
2497
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2488
2498
  if (!e)
@@ -2491,14 +2501,14 @@ class C extends Q {
2491
2501
  if (!t && !i)
2492
2502
  return null;
2493
2503
  try {
2494
- return C.credential(t, i);
2504
+ return O.credential(t, i);
2495
2505
  } catch {
2496
2506
  return null;
2497
2507
  }
2498
2508
  }
2499
2509
  }
2500
- C.GOOGLE_SIGN_IN_METHOD = "google.com";
2501
- C.PROVIDER_ID = "google.com";
2510
+ O.GOOGLE_SIGN_IN_METHOD = "google.com";
2511
+ O.PROVIDER_ID = "google.com";
2502
2512
  /**
2503
2513
  * @license
2504
2514
  * Copyright 2020 Google LLC
@@ -2515,7 +2525,7 @@ C.PROVIDER_ID = "google.com";
2515
2525
  * See the License for the specific language governing permissions and
2516
2526
  * limitations under the License.
2517
2527
  */
2518
- class O extends Q {
2528
+ class N extends Q {
2519
2529
  constructor() {
2520
2530
  super(
2521
2531
  "github.com"
@@ -2528,9 +2538,9 @@ class O extends Q {
2528
2538
  * @param accessToken - Github access token.
2529
2539
  */
2530
2540
  static credential(e) {
2531
- return D._fromParams({
2532
- providerId: O.PROVIDER_ID,
2533
- signInMethod: O.GITHUB_SIGN_IN_METHOD,
2541
+ return F._fromParams({
2542
+ providerId: N.PROVIDER_ID,
2543
+ signInMethod: N.GITHUB_SIGN_IN_METHOD,
2534
2544
  accessToken: e
2535
2545
  });
2536
2546
  }
@@ -2540,7 +2550,7 @@ class O extends Q {
2540
2550
  * @param userCredential - The user credential.
2541
2551
  */
2542
2552
  static credentialFromResult(e) {
2543
- return O.credentialFromTaggedObject(e);
2553
+ return N.credentialFromTaggedObject(e);
2544
2554
  }
2545
2555
  /**
2546
2556
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2549,20 +2559,20 @@ class O extends Q {
2549
2559
  * @param userCredential - The user credential.
2550
2560
  */
2551
2561
  static credentialFromError(e) {
2552
- return O.credentialFromTaggedObject(e.customData || {});
2562
+ return N.credentialFromTaggedObject(e.customData || {});
2553
2563
  }
2554
2564
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2555
2565
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2556
2566
  return null;
2557
2567
  try {
2558
- return O.credential(e.oauthAccessToken);
2568
+ return N.credential(e.oauthAccessToken);
2559
2569
  } catch {
2560
2570
  return null;
2561
2571
  }
2562
2572
  }
2563
2573
  }
2564
- O.GITHUB_SIGN_IN_METHOD = "github.com";
2565
- O.PROVIDER_ID = "github.com";
2574
+ N.GITHUB_SIGN_IN_METHOD = "github.com";
2575
+ N.PROVIDER_ID = "github.com";
2566
2576
  /**
2567
2577
  * @license
2568
2578
  * Copyright 2020 Google LLC
@@ -2579,7 +2589,7 @@ O.PROVIDER_ID = "github.com";
2579
2589
  * See the License for the specific language governing permissions and
2580
2590
  * limitations under the License.
2581
2591
  */
2582
- class N extends Q {
2592
+ class L extends Q {
2583
2593
  constructor() {
2584
2594
  super(
2585
2595
  "twitter.com"
@@ -2593,9 +2603,9 @@ class N extends Q {
2593
2603
  * @param secret - Twitter secret.
2594
2604
  */
2595
2605
  static credential(e, t) {
2596
- return D._fromParams({
2597
- providerId: N.PROVIDER_ID,
2598
- signInMethod: N.TWITTER_SIGN_IN_METHOD,
2606
+ return F._fromParams({
2607
+ providerId: L.PROVIDER_ID,
2608
+ signInMethod: L.TWITTER_SIGN_IN_METHOD,
2599
2609
  oauthToken: e,
2600
2610
  oauthTokenSecret: t
2601
2611
  });
@@ -2606,7 +2616,7 @@ class N extends Q {
2606
2616
  * @param userCredential - The user credential.
2607
2617
  */
2608
2618
  static credentialFromResult(e) {
2609
- return N.credentialFromTaggedObject(e);
2619
+ return L.credentialFromTaggedObject(e);
2610
2620
  }
2611
2621
  /**
2612
2622
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2615,7 +2625,7 @@ class N extends Q {
2615
2625
  * @param userCredential - The user credential.
2616
2626
  */
2617
2627
  static credentialFromError(e) {
2618
- return N.credentialFromTaggedObject(e.customData || {});
2628
+ return L.credentialFromTaggedObject(e.customData || {});
2619
2629
  }
2620
2630
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2621
2631
  if (!e)
@@ -2624,14 +2634,14 @@ class N extends Q {
2624
2634
  if (!t || !i)
2625
2635
  return null;
2626
2636
  try {
2627
- return N.credential(t, i);
2637
+ return L.credential(t, i);
2628
2638
  } catch {
2629
2639
  return null;
2630
2640
  }
2631
2641
  }
2632
2642
  }
2633
- N.TWITTER_SIGN_IN_METHOD = "twitter.com";
2634
- N.PROVIDER_ID = "twitter.com";
2643
+ L.TWITTER_SIGN_IN_METHOD = "twitter.com";
2644
+ L.PROVIDER_ID = "twitter.com";
2635
2645
  /**
2636
2646
  * @license
2637
2647
  * Copyright 2020 Google LLC
@@ -2648,13 +2658,13 @@ N.PROVIDER_ID = "twitter.com";
2648
2658
  * See the License for the specific language governing permissions and
2649
2659
  * limitations under the License.
2650
2660
  */
2651
- class F {
2661
+ class x {
2652
2662
  constructor(e) {
2653
2663
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2654
2664
  }
2655
2665
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2656
- const s = await E._fromIdTokenResponse(e, i, r), o = Ze(i);
2657
- return new F({
2666
+ const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
2667
+ return new x({
2658
2668
  user: s,
2659
2669
  providerId: o,
2660
2670
  _tokenResponse: i,
@@ -2667,8 +2677,8 @@ class F {
2667
2677
  /* reload */
2668
2678
  !0
2669
2679
  );
2670
- const r = Ze(i);
2671
- return new F({
2680
+ const r = nt(i);
2681
+ return new x({
2672
2682
  user: e,
2673
2683
  providerId: r,
2674
2684
  _tokenResponse: i,
@@ -2676,7 +2686,7 @@ class F {
2676
2686
  });
2677
2687
  }
2678
2688
  }
2679
- function Ze(n) {
2689
+ function nt(n) {
2680
2690
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2681
2691
  }
2682
2692
  /**
@@ -2695,10 +2705,10 @@ function Ze(n) {
2695
2705
  * See the License for the specific language governing permissions and
2696
2706
  * limitations under the License.
2697
2707
  */
2698
- class ue extends Re {
2708
+ class de extends Oe {
2699
2709
  constructor(e, t, i, r) {
2700
2710
  var s;
2701
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2711
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, de.prototype), this.customData = {
2702
2712
  appName: e.name,
2703
2713
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2704
2714
  _serverResponse: t.customData._serverResponse,
@@ -2706,17 +2716,17 @@ class ue extends Re {
2706
2716
  };
2707
2717
  }
2708
2718
  static _fromErrorAndOperation(e, t, i, r) {
2709
- return new ue(e, t, i, r);
2719
+ return new de(e, t, i, r);
2710
2720
  }
2711
2721
  }
2712
- function Ft(n, e, t, i) {
2722
+ function $t(n, e, t, i) {
2713
2723
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
2714
- throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
2724
+ throw s.code === "auth/multi-factor-auth-required" ? de._fromErrorAndOperation(n, s, e, i) : s;
2715
2725
  });
2716
2726
  }
2717
- async function di(n, e, t = !1) {
2727
+ async function gi(n, e, t = !1) {
2718
2728
  const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2719
- return F._forOperation(n, "link", i);
2729
+ return x._forOperation(n, "link", i);
2720
2730
  }
2721
2731
  /**
2722
2732
  * @license
@@ -2734,20 +2744,20 @@ async function di(n, e, t = !1) {
2734
2744
  * See the License for the specific language governing permissions and
2735
2745
  * limitations under the License.
2736
2746
  */
2737
- async function hi(n, e, t = !1) {
2747
+ async function _i(n, e, t = !1) {
2738
2748
  const { auth: i } = n;
2739
- if (w(i.app))
2740
- return Promise.reject(L(i));
2749
+ if (E(i.app))
2750
+ return Promise.reject(M(i));
2741
2751
  const r = "reauthenticate";
2742
2752
  try {
2743
- const s = await K(n, Ft(i, r, e, n), t);
2753
+ const s = await K(n, $t(i, r, e, n), t);
2744
2754
  u(
2745
2755
  s.idToken,
2746
2756
  i,
2747
2757
  "internal-error"
2748
2758
  /* AuthErrorCode.INTERNAL_ERROR */
2749
2759
  );
2750
- const o = Oe(s.idToken);
2760
+ const o = Ue(s.idToken);
2751
2761
  u(
2752
2762
  o,
2753
2763
  i,
@@ -2760,9 +2770,9 @@ async function hi(n, e, t = !1) {
2760
2770
  i,
2761
2771
  "user-mismatch"
2762
2772
  /* AuthErrorCode.USER_MISMATCH */
2763
- ), F._forOperation(n, r, s);
2773
+ ), x._forOperation(n, r, s);
2764
2774
  } catch (s) {
2765
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && b(
2775
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
2766
2776
  i,
2767
2777
  "user-mismatch"
2768
2778
  /* AuthErrorCode.USER_MISMATCH */
@@ -2785,10 +2795,10 @@ async function hi(n, e, t = !1) {
2785
2795
  * See the License for the specific language governing permissions and
2786
2796
  * limitations under the License.
2787
2797
  */
2788
- async function fi(n, e, t = !1) {
2789
- if (w(n.app))
2790
- return Promise.reject(L(n));
2791
- const i = "signIn", r = await Ft(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2798
+ async function vi(n, e, t = !1) {
2799
+ if (E(n.app))
2800
+ return Promise.reject(M(n));
2801
+ const i = "signIn", r = await $t(n, i, e), s = await x._fromIdTokenResponse(n, i, r);
2792
2802
  return t || await n._updateCurrentUser(s.user), s;
2793
2803
  }
2794
2804
  /**
@@ -2807,8 +2817,8 @@ async function fi(n, e, t = !1) {
2807
2817
  * See the License for the specific language governing permissions and
2808
2818
  * limitations under the License.
2809
2819
  */
2810
- async function pi(n, e) {
2811
- return wt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2820
+ async function Ii(n, e) {
2821
+ return kt(n, "POST", "/v1/accounts:signInWithCustomToken", pe(n, e));
2812
2822
  }
2813
2823
  /**
2814
2824
  * @license
@@ -2826,22 +2836,22 @@ async function pi(n, e) {
2826
2836
  * See the License for the specific language governing permissions and
2827
2837
  * limitations under the License.
2828
2838
  */
2829
- async function mi(n, e) {
2830
- if (w(n.app))
2831
- return Promise.reject(L(n));
2832
- const t = me(n), i = await pi(t, {
2839
+ async function Ti(n, e) {
2840
+ if (E(n.app))
2841
+ return Promise.reject(M(n));
2842
+ const t = ge(n), i = await Ii(t, {
2833
2843
  token: e,
2834
2844
  returnSecureToken: !0
2835
- }), r = await F._fromIdTokenResponse(t, "signIn", i);
2845
+ }), r = await x._fromIdTokenResponse(t, "signIn", i);
2836
2846
  return await t._updateCurrentUser(r.user), r;
2837
2847
  }
2838
- function gi(n, e, t, i) {
2839
- return j(n).onIdTokenChanged(e, t, i);
2848
+ function yi(n, e, t, i) {
2849
+ return W(n).onIdTokenChanged(e, t, i);
2840
2850
  }
2841
- function _i(n, e, t) {
2842
- return j(n).beforeAuthStateChanged(e, t);
2851
+ function wi(n, e, t) {
2852
+ return W(n).beforeAuthStateChanged(e, t);
2843
2853
  }
2844
- const de = "__sak";
2854
+ const he = "__sak";
2845
2855
  /**
2846
2856
  * @license
2847
2857
  * Copyright 2019 Google LLC
@@ -2858,13 +2868,13 @@ const de = "__sak";
2858
2868
  * See the License for the specific language governing permissions and
2859
2869
  * limitations under the License.
2860
2870
  */
2861
- class xt {
2871
+ class Ht {
2862
2872
  constructor(e, t) {
2863
2873
  this.storageRetriever = e, this.type = t;
2864
2874
  }
2865
2875
  _isAvailable() {
2866
2876
  try {
2867
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
2877
+ return this.storage ? (this.storage.setItem(he, "1"), this.storage.removeItem(he), Promise.resolve(!0)) : Promise.resolve(!1);
2868
2878
  } catch {
2869
2879
  return Promise.resolve(!1);
2870
2880
  }
@@ -2899,18 +2909,18 @@ class xt {
2899
2909
  * See the License for the specific language governing permissions and
2900
2910
  * limitations under the License.
2901
2911
  */
2902
- function vi() {
2903
- const n = g();
2904
- return Ne(n) || pe(n);
2912
+ function Ei() {
2913
+ const n = _();
2914
+ return De(n) || me(n);
2905
2915
  }
2906
- const Ii = 1e3, Ti = 10;
2907
- class Vt extends xt {
2916
+ const ki = 1e3, bi = 10;
2917
+ class jt extends Ht {
2908
2918
  constructor() {
2909
2919
  super(
2910
2920
  () => window.localStorage,
2911
2921
  "LOCAL"
2912
2922
  /* PersistenceType.LOCAL */
2913
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = vi() && Jn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
2923
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Ei() && ei(), this.fallbackToPolling = Ut(), this._shouldAllowMigration = !0;
2914
2924
  }
2915
2925
  forAllChangedKeys(e) {
2916
2926
  for (const t of Object.keys(this.listeners)) {
@@ -2937,7 +2947,7 @@ class Vt extends xt {
2937
2947
  const o = this.storage.getItem(i);
2938
2948
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2939
2949
  }, s = this.storage.getItem(i);
2940
- Kn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ti) : r();
2950
+ Zn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, bi) : r();
2941
2951
  }
2942
2952
  notifyListeners(e, t) {
2943
2953
  this.localCache[e] = t;
@@ -2959,7 +2969,7 @@ class Vt extends xt {
2959
2969
  !0
2960
2970
  );
2961
2971
  });
2962
- }, Ii);
2972
+ }, ki);
2963
2973
  }
2964
2974
  stopPolling() {
2965
2975
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -2988,8 +2998,8 @@ class Vt extends xt {
2988
2998
  await super._remove(e), delete this.localCache[e];
2989
2999
  }
2990
3000
  }
2991
- Vt.type = "LOCAL";
2992
- const wi = Vt;
3001
+ jt.type = "LOCAL";
3002
+ const Si = jt;
2993
3003
  /**
2994
3004
  * @license
2995
3005
  * Copyright 2020 Google LLC
@@ -3006,7 +3016,7 @@ const wi = Vt;
3006
3016
  * See the License for the specific language governing permissions and
3007
3017
  * limitations under the License.
3008
3018
  */
3009
- class $t extends xt {
3019
+ class Wt extends Ht {
3010
3020
  constructor() {
3011
3021
  super(
3012
3022
  () => window.sessionStorage,
@@ -3019,8 +3029,8 @@ class $t extends xt {
3019
3029
  _removeListener(e, t) {
3020
3030
  }
3021
3031
  }
3022
- $t.type = "SESSION";
3023
- const Ht = $t;
3032
+ Wt.type = "SESSION";
3033
+ const Gt = Wt;
3024
3034
  /**
3025
3035
  * @license
3026
3036
  * Copyright 2019 Google LLC
@@ -3037,7 +3047,7 @@ const Ht = $t;
3037
3047
  * See the License for the specific language governing permissions and
3038
3048
  * limitations under the License.
3039
3049
  */
3040
- function yi(n) {
3050
+ function Ri(n) {
3041
3051
  return Promise.all(n.map(async (e) => {
3042
3052
  try {
3043
3053
  return {
@@ -3068,7 +3078,7 @@ function yi(n) {
3068
3078
  * See the License for the specific language governing permissions and
3069
3079
  * limitations under the License.
3070
3080
  */
3071
- class ge {
3081
+ class _e {
3072
3082
  constructor(e) {
3073
3083
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3074
3084
  }
@@ -3082,7 +3092,7 @@ class ge {
3082
3092
  const t = this.receivers.find((r) => r.isListeningto(e));
3083
3093
  if (t)
3084
3094
  return t;
3085
- const i = new ge(e);
3095
+ const i = new _e(e);
3086
3096
  return this.receivers.push(i), i;
3087
3097
  }
3088
3098
  isListeningto(e) {
@@ -3107,7 +3117,7 @@ class ge {
3107
3117
  eventId: i,
3108
3118
  eventType: r
3109
3119
  });
3110
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await yi(c);
3120
+ const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ri(c);
3111
3121
  t.ports[0].postMessage({
3112
3122
  status: "done",
3113
3123
  eventId: i,
@@ -3136,7 +3146,7 @@ class ge {
3136
3146
  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);
3137
3147
  }
3138
3148
  }
3139
- ge.receivers = [];
3149
+ _e.receivers = [];
3140
3150
  /**
3141
3151
  * @license
3142
3152
  * Copyright 2020 Google LLC
@@ -3153,7 +3163,7 @@ ge.receivers = [];
3153
3163
  * See the License for the specific language governing permissions and
3154
3164
  * limitations under the License.
3155
3165
  */
3156
- function Me(n = "", e = 10) {
3166
+ function xe(n = "", e = 10) {
3157
3167
  let t = "";
3158
3168
  for (let i = 0; i < e; i++)
3159
3169
  t += Math.floor(Math.random() * 10);
@@ -3175,7 +3185,7 @@ function Me(n = "", e = 10) {
3175
3185
  * See the License for the specific language governing permissions and
3176
3186
  * limitations under the License.
3177
3187
  */
3178
- class Ei {
3188
+ class Pi {
3179
3189
  constructor(e) {
3180
3190
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3181
3191
  }
@@ -3209,7 +3219,7 @@ class Ei {
3209
3219
  );
3210
3220
  let s, o;
3211
3221
  return new Promise((c, a) => {
3212
- const l = Me("", 20);
3222
+ const l = xe("", 20);
3213
3223
  r.port1.start();
3214
3224
  const d = setTimeout(() => {
3215
3225
  a(new Error(
@@ -3219,10 +3229,10 @@ class Ei {
3219
3229
  }, i);
3220
3230
  o = {
3221
3231
  messageChannel: r,
3222
- onMessage(f) {
3223
- const _ = f;
3224
- if (_.data.eventId === l)
3225
- switch (_.data.status) {
3232
+ onMessage(h) {
3233
+ const p = h;
3234
+ if (p.data.eventId === l)
3235
+ switch (p.data.status) {
3226
3236
  case "ack":
3227
3237
  clearTimeout(d), s = setTimeout(
3228
3238
  () => {
@@ -3236,7 +3246,7 @@ class Ei {
3236
3246
  );
3237
3247
  break;
3238
3248
  case "done":
3239
- clearTimeout(s), c(_.data.response);
3249
+ clearTimeout(s), c(p.data.response);
3240
3250
  break;
3241
3251
  default:
3242
3252
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -3272,11 +3282,11 @@ class Ei {
3272
3282
  * See the License for the specific language governing permissions and
3273
3283
  * limitations under the License.
3274
3284
  */
3275
- function T() {
3285
+ function y() {
3276
3286
  return window;
3277
3287
  }
3278
- function ki(n) {
3279
- T().location.href = n;
3288
+ function Ai(n) {
3289
+ y().location.href = n;
3280
3290
  }
3281
3291
  /**
3282
3292
  * @license
@@ -3294,10 +3304,10 @@ function ki(n) {
3294
3304
  * See the License for the specific language governing permissions and
3295
3305
  * limitations under the License.
3296
3306
  */
3297
- function Wt() {
3298
- return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
3307
+ function Bt() {
3308
+ return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
3299
3309
  }
3300
- async function bi() {
3310
+ async function Ci() {
3301
3311
  if (!(navigator != null && navigator.serviceWorker))
3302
3312
  return null;
3303
3313
  try {
@@ -3306,12 +3316,12 @@ async function bi() {
3306
3316
  return null;
3307
3317
  }
3308
3318
  }
3309
- function Si() {
3319
+ function Oi() {
3310
3320
  var n;
3311
3321
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3312
3322
  }
3313
- function Ri() {
3314
- return Wt() ? self : null;
3323
+ function Ni() {
3324
+ return Bt() ? self : null;
3315
3325
  }
3316
3326
  /**
3317
3327
  * @license
@@ -3329,7 +3339,7 @@ function Ri() {
3329
3339
  * See the License for the specific language governing permissions and
3330
3340
  * limitations under the License.
3331
3341
  */
3332
- const jt = "firebaseLocalStorageDb", Pi = 1, he = "firebaseLocalStorage", Gt = "fbase_key";
3342
+ const zt = "firebaseLocalStorageDb", Li = 1, fe = "firebaseLocalStorage", qt = "fbase_key";
3333
3343
  class Z {
3334
3344
  constructor(e) {
3335
3345
  this.request = e;
@@ -3344,55 +3354,55 @@ class Z {
3344
3354
  });
3345
3355
  }
3346
3356
  }
3347
- function _e(n, e) {
3348
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3357
+ function ve(n, e) {
3358
+ return n.transaction([fe], e ? "readwrite" : "readonly").objectStore(fe);
3349
3359
  }
3350
- function Ai() {
3351
- const n = indexedDB.deleteDatabase(jt);
3360
+ function Mi() {
3361
+ const n = indexedDB.deleteDatabase(zt);
3352
3362
  return new Z(n).toPromise();
3353
3363
  }
3354
- function be() {
3355
- const n = indexedDB.open(jt, Pi);
3364
+ function Ae() {
3365
+ const n = indexedDB.open(zt, Li);
3356
3366
  return new Promise((e, t) => {
3357
3367
  n.addEventListener("error", () => {
3358
3368
  t(n.error);
3359
3369
  }), n.addEventListener("upgradeneeded", () => {
3360
3370
  const i = n.result;
3361
3371
  try {
3362
- i.createObjectStore(he, { keyPath: Gt });
3372
+ i.createObjectStore(fe, { keyPath: qt });
3363
3373
  } catch (r) {
3364
3374
  t(r);
3365
3375
  }
3366
3376
  }), n.addEventListener("success", async () => {
3367
3377
  const i = n.result;
3368
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Ai(), e(await be()));
3378
+ i.objectStoreNames.contains(fe) ? e(i) : (i.close(), await Mi(), e(await Ae()));
3369
3379
  });
3370
3380
  });
3371
3381
  }
3372
- async function et(n, e, t) {
3373
- const i = _e(n, !0).put({
3374
- [Gt]: e,
3382
+ async function it(n, e, t) {
3383
+ const i = ve(n, !0).put({
3384
+ [qt]: e,
3375
3385
  value: t
3376
3386
  });
3377
3387
  return new Z(i).toPromise();
3378
3388
  }
3379
- async function Ci(n, e) {
3380
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3389
+ async function Ui(n, e) {
3390
+ const t = ve(n, !1).get(e), i = await new Z(t).toPromise();
3381
3391
  return i === void 0 ? null : i.value;
3382
3392
  }
3383
- function tt(n, e) {
3384
- const t = _e(n, !0).delete(e);
3393
+ function rt(n, e) {
3394
+ const t = ve(n, !0).delete(e);
3385
3395
  return new Z(t).toPromise();
3386
3396
  }
3387
- const Oi = 800, Ni = 3;
3388
- class Bt {
3397
+ const Di = 800, Fi = 3;
3398
+ class Kt {
3389
3399
  constructor() {
3390
3400
  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(() => {
3391
3401
  }, () => {
3392
3402
  });
3393
3403
  }
3394
3404
  async _openDb() {
3395
- return this.db ? this.db : (this.db = await be(), this.db);
3405
+ return this.db ? this.db : (this.db = await Ae(), this.db);
3396
3406
  }
3397
3407
  async _withRetries(e) {
3398
3408
  let t = 0;
@@ -3401,7 +3411,7 @@ class Bt {
3401
3411
  const i = await this._openDb();
3402
3412
  return await e(i);
3403
3413
  } catch (i) {
3404
- if (t++ > Ni)
3414
+ if (t++ > Fi)
3405
3415
  throw i;
3406
3416
  this.db && (this.db.close(), this.db = void 0);
3407
3417
  }
@@ -3411,13 +3421,13 @@ class Bt {
3411
3421
  * postMessage interface to send these events to the worker ourselves.
3412
3422
  */
3413
3423
  async initializeServiceWorkerMessaging() {
3414
- return Wt() ? this.initializeReceiver() : this.initializeSender();
3424
+ return Bt() ? this.initializeReceiver() : this.initializeSender();
3415
3425
  }
3416
3426
  /**
3417
3427
  * As the worker we should listen to events from the main window.
3418
3428
  */
3419
3429
  async initializeReceiver() {
3420
- this.receiver = ge._getInstance(Ri()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3430
+ this.receiver = _e._getInstance(Ni()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3421
3431
  keyProcessed: (await this._poll()).includes(t.key)
3422
3432
  })), this.receiver._subscribe("ping", async (e, t) => [
3423
3433
  "keyChanged"
@@ -3433,9 +3443,9 @@ class Bt {
3433
3443
  */
3434
3444
  async initializeSender() {
3435
3445
  var e, t;
3436
- if (this.activeServiceWorker = await bi(), !this.activeServiceWorker)
3446
+ if (this.activeServiceWorker = await Ci(), !this.activeServiceWorker)
3437
3447
  return;
3438
- this.sender = new Ei(this.activeServiceWorker);
3448
+ this.sender = new Pi(this.activeServiceWorker);
3439
3449
  const i = await this.sender._send(
3440
3450
  "ping",
3441
3451
  {},
@@ -3457,7 +3467,7 @@ class Bt {
3457
3467
  * @param key - Storage key which changed.
3458
3468
  */
3459
3469
  async notifyServiceWorker(e) {
3460
- if (!(!this.sender || !this.activeServiceWorker || Si() !== this.activeServiceWorker))
3470
+ if (!(!this.sender || !this.activeServiceWorker || Oi() !== this.activeServiceWorker))
3461
3471
  try {
3462
3472
  await this.sender._send(
3463
3473
  "keyChanged",
@@ -3473,8 +3483,8 @@ class Bt {
3473
3483
  try {
3474
3484
  if (!indexedDB)
3475
3485
  return !1;
3476
- const e = await be();
3477
- return await et(e, de, "1"), await tt(e, de), !0;
3486
+ const e = await Ae();
3487
+ return await it(e, he, "1"), await rt(e, he), !0;
3478
3488
  } catch {
3479
3489
  }
3480
3490
  return !1;
@@ -3488,18 +3498,18 @@ class Bt {
3488
3498
  }
3489
3499
  }
3490
3500
  async _set(e, t) {
3491
- return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3501
+ return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3492
3502
  }
3493
3503
  async _get(e) {
3494
- const t = await this._withRetries((i) => Ci(i, e));
3504
+ const t = await this._withRetries((i) => Ui(i, e));
3495
3505
  return this.localCache[e] = t, t;
3496
3506
  }
3497
3507
  async _remove(e) {
3498
- return this._withPendingWrite(async () => (await this._withRetries((t) => tt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3508
+ return this._withPendingWrite(async () => (await this._withRetries((t) => rt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3499
3509
  }
3500
3510
  async _poll() {
3501
3511
  const e = await this._withRetries((r) => {
3502
- const s = _e(r, !1).getAll();
3512
+ const s = ve(r, !1).getAll();
3503
3513
  return new Z(s).toPromise();
3504
3514
  });
3505
3515
  if (!e)
@@ -3522,7 +3532,7 @@ class Bt {
3522
3532
  r(t);
3523
3533
  }
3524
3534
  startPolling() {
3525
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Oi);
3535
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Di);
3526
3536
  }
3527
3537
  stopPolling() {
3528
3538
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3534,8 +3544,8 @@ class Bt {
3534
3544
  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();
3535
3545
  }
3536
3546
  }
3537
- Bt.type = "LOCAL";
3538
- const Li = Bt;
3547
+ Kt.type = "LOCAL";
3548
+ const xi = Kt;
3539
3549
  new X(3e4, 6e4);
3540
3550
  /**
3541
3551
  * @license
@@ -3553,8 +3563,8 @@ new X(3e4, 6e4);
3553
3563
  * See the License for the specific language governing permissions and
3554
3564
  * limitations under the License.
3555
3565
  */
3556
- function Mi(n, e) {
3557
- return e ? k(e) : (u(
3566
+ function Vi(n, e) {
3567
+ return e ? S(e) : (u(
3558
3568
  n._popupRedirectResolver,
3559
3569
  n,
3560
3570
  "argument-error"
@@ -3577,7 +3587,7 @@ function Mi(n, e) {
3577
3587
  * See the License for the specific language governing permissions and
3578
3588
  * limitations under the License.
3579
3589
  */
3580
- class Ue extends Ut {
3590
+ class Ve extends xt {
3581
3591
  constructor(e) {
3582
3592
  super(
3583
3593
  "custom",
@@ -3586,13 +3596,13 @@ class Ue extends Ut {
3586
3596
  ), this.params = e;
3587
3597
  }
3588
3598
  _getIdTokenResponse(e) {
3589
- return W(e, this._buildIdpRequest());
3599
+ return j(e, this._buildIdpRequest());
3590
3600
  }
3591
3601
  _linkToIdToken(e, t) {
3592
- return W(e, this._buildIdpRequest(t));
3602
+ return j(e, this._buildIdpRequest(t));
3593
3603
  }
3594
3604
  _getReauthenticationResolver(e) {
3595
- return W(e, this._buildIdpRequest());
3605
+ return j(e, this._buildIdpRequest());
3596
3606
  }
3597
3607
  _buildIdpRequest(e) {
3598
3608
  const t = {
@@ -3607,26 +3617,26 @@ class Ue extends Ut {
3607
3617
  return e && (t.idToken = e), t;
3608
3618
  }
3609
3619
  }
3610
- function Ui(n) {
3611
- return fi(n.auth, new Ue(n), n.bypassAuthState);
3620
+ function $i(n) {
3621
+ return vi(n.auth, new Ve(n), n.bypassAuthState);
3612
3622
  }
3613
- function Di(n) {
3623
+ function Hi(n) {
3614
3624
  const { auth: e, user: t } = n;
3615
3625
  return u(
3616
3626
  t,
3617
3627
  e,
3618
3628
  "internal-error"
3619
3629
  /* AuthErrorCode.INTERNAL_ERROR */
3620
- ), hi(t, new Ue(n), n.bypassAuthState);
3630
+ ), _i(t, new Ve(n), n.bypassAuthState);
3621
3631
  }
3622
- async function Fi(n) {
3632
+ async function ji(n) {
3623
3633
  const { auth: e, user: t } = n;
3624
3634
  return u(
3625
3635
  t,
3626
3636
  e,
3627
3637
  "internal-error"
3628
3638
  /* AuthErrorCode.INTERNAL_ERROR */
3629
- ), di(t, new Ue(n), n.bypassAuthState);
3639
+ ), gi(t, new Ve(n), n.bypassAuthState);
3630
3640
  }
3631
3641
  /**
3632
3642
  * @license
@@ -3644,7 +3654,7 @@ async function Fi(n) {
3644
3654
  * See the License for the specific language governing permissions and
3645
3655
  * limitations under the License.
3646
3656
  */
3647
- class qt {
3657
+ class Jt {
3648
3658
  constructor(e, t, i, r, s = !1) {
3649
3659
  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];
3650
3660
  }
@@ -3686,15 +3696,15 @@ class qt {
3686
3696
  switch (e) {
3687
3697
  case "signInViaPopup":
3688
3698
  case "signInViaRedirect":
3689
- return Ui;
3699
+ return $i;
3690
3700
  case "linkViaPopup":
3691
3701
  case "linkViaRedirect":
3692
- return Fi;
3702
+ return ji;
3693
3703
  case "reauthViaPopup":
3694
3704
  case "reauthViaRedirect":
3695
- return Di;
3705
+ return Hi;
3696
3706
  default:
3697
- b(
3707
+ R(
3698
3708
  this.auth,
3699
3709
  "internal-error"
3700
3710
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3702,10 +3712,10 @@ class qt {
3702
3712
  }
3703
3713
  }
3704
3714
  resolve(e) {
3705
- S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3715
+ P(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3706
3716
  }
3707
3717
  reject(e) {
3708
- S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3718
+ P(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3709
3719
  }
3710
3720
  unregisterAndCleanUp() {
3711
3721
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3727,8 +3737,8 @@ class qt {
3727
3737
  * See the License for the specific language governing permissions and
3728
3738
  * limitations under the License.
3729
3739
  */
3730
- const xi = new X(2e3, 1e4);
3731
- class V extends qt {
3740
+ const Wi = new X(2e3, 1e4);
3741
+ class V extends Jt {
3732
3742
  constructor(e, t, i, r, s) {
3733
3743
  super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3734
3744
  }
@@ -3742,8 +3752,8 @@ class V extends qt {
3742
3752
  ), e;
3743
3753
  }
3744
3754
  async onExecution() {
3745
- S(this.filter.length === 1, "Popup operations only handle one event");
3746
- const e = Me();
3755
+ P(this.filter.length === 1, "Popup operations only handle one event");
3756
+ const e = xe();
3747
3757
  this.authWindow = await this.resolver._openPopup(
3748
3758
  this.auth,
3749
3759
  this.provider,
@@ -3753,7 +3763,7 @@ class V extends qt {
3753
3763
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3754
3764
  this.reject(t);
3755
3765
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3756
- t || this.reject(I(
3766
+ t || this.reject(T(
3757
3767
  this.auth,
3758
3768
  "web-storage-unsupported"
3759
3769
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3765,7 +3775,7 @@ class V extends qt {
3765
3775
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3766
3776
  }
3767
3777
  cancel() {
3768
- this.reject(I(
3778
+ this.reject(T(
3769
3779
  this.auth,
3770
3780
  "cancelled-popup-request"
3771
3781
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
@@ -3780,7 +3790,7 @@ class V extends qt {
3780
3790
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3781
3791
  this.pollId = window.setTimeout(
3782
3792
  () => {
3783
- this.pollId = null, this.reject(I(
3793
+ this.pollId = null, this.reject(T(
3784
3794
  this.auth,
3785
3795
  "popup-closed-by-user"
3786
3796
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3791,7 +3801,7 @@ class V extends qt {
3791
3801
  );
3792
3802
  return;
3793
3803
  }
3794
- this.pollId = window.setTimeout(e, xi.get());
3804
+ this.pollId = window.setTimeout(e, Wi.get());
3795
3805
  };
3796
3806
  e();
3797
3807
  }
@@ -3813,8 +3823,8 @@ V.currentPopupAction = null;
3813
3823
  * See the License for the specific language governing permissions and
3814
3824
  * limitations under the License.
3815
3825
  */
3816
- const Vi = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3817
- class $i extends qt {
3826
+ const Gi = "pendingRedirect", ae = /* @__PURE__ */ new Map();
3827
+ class Bi extends Jt {
3818
3828
  constructor(e, t, i = !1) {
3819
3829
  super(e, [
3820
3830
  "signInViaRedirect",
@@ -3829,17 +3839,17 @@ class $i extends qt {
3829
3839
  * just return it.
3830
3840
  */
3831
3841
  async execute() {
3832
- let e = oe.get(this.auth._key());
3842
+ let e = ae.get(this.auth._key());
3833
3843
  if (!e) {
3834
3844
  try {
3835
- const i = await Hi(this.resolver, this.auth) ? await super.execute() : null;
3845
+ const i = await zi(this.resolver, this.auth) ? await super.execute() : null;
3836
3846
  e = () => Promise.resolve(i);
3837
3847
  } catch (t) {
3838
3848
  e = () => Promise.reject(t);
3839
3849
  }
3840
- oe.set(this.auth._key(), e);
3850
+ ae.set(this.auth._key(), e);
3841
3851
  }
3842
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
3852
+ return this.bypassAuthState || ae.set(this.auth._key(), () => Promise.resolve(null)), e();
3843
3853
  }
3844
3854
  async onAuthEvent(e) {
3845
3855
  if (e.type === "signInViaRedirect")
@@ -3860,26 +3870,26 @@ class $i extends qt {
3860
3870
  cleanUp() {
3861
3871
  }
3862
3872
  }
3863
- async function Hi(n, e) {
3864
- const t = Gi(e), i = ji(n);
3873
+ async function zi(n, e) {
3874
+ const t = Ji(e), i = Ki(n);
3865
3875
  if (!await i._isAvailable())
3866
3876
  return !1;
3867
3877
  const r = await i._get(t) === "true";
3868
3878
  return await i._remove(t), r;
3869
3879
  }
3870
- function Wi(n, e) {
3871
- oe.set(n._key(), e);
3880
+ function qi(n, e) {
3881
+ ae.set(n._key(), e);
3872
3882
  }
3873
- function ji(n) {
3874
- return k(n._redirectPersistence);
3883
+ function Ki(n) {
3884
+ return S(n._redirectPersistence);
3875
3885
  }
3876
- function Gi(n) {
3877
- return se(Vi, n.config.apiKey, n.name);
3886
+ function Ji(n) {
3887
+ return oe(Gi, n.config.apiKey, n.name);
3878
3888
  }
3879
- async function Bi(n, e, t = !1) {
3880
- if (w(n.app))
3881
- return Promise.reject(L(n));
3882
- const i = me(n), r = Mi(i, e), o = await new $i(i, r, t).execute();
3889
+ async function Yi(n, e, t = !1) {
3890
+ if (E(n.app))
3891
+ return Promise.reject(M(n));
3892
+ const i = ge(n), r = Vi(i, e), o = await new Bi(i, r, t).execute();
3883
3893
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3884
3894
  }
3885
3895
  /**
@@ -3898,8 +3908,8 @@ async function Bi(n, e, t = !1) {
3898
3908
  * See the License for the specific language governing permissions and
3899
3909
  * limitations under the License.
3900
3910
  */
3901
- const qi = 10 * 60 * 1e3;
3902
- class zi {
3911
+ const Xi = 10 * 60 * 1e3;
3912
+ class Qi {
3903
3913
  constructor(e) {
3904
3914
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3905
3915
  }
@@ -3915,13 +3925,13 @@ class zi {
3915
3925
  let t = !1;
3916
3926
  return this.consumers.forEach((i) => {
3917
3927
  this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
3918
- }), this.hasHandledPotentialRedirect || !Ki(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3928
+ }), this.hasHandledPotentialRedirect || !Zi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3919
3929
  }
3920
3930
  sendToConsumer(e, t) {
3921
3931
  var i;
3922
- if (e.error && !zt(e)) {
3932
+ if (e.error && !Yt(e)) {
3923
3933
  const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
3924
- t.onError(I(this.auth, r));
3934
+ t.onError(T(this.auth, r));
3925
3935
  } else
3926
3936
  t.onAuthEvent(e);
3927
3937
  }
@@ -3930,26 +3940,26 @@ class zi {
3930
3940
  return t.filter.includes(e.type) && i;
3931
3941
  }
3932
3942
  hasEventBeenHandled(e) {
3933
- return Date.now() - this.lastProcessedEventTime >= qi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
3943
+ return Date.now() - this.lastProcessedEventTime >= Xi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
3934
3944
  }
3935
3945
  saveEventToCache(e) {
3936
- this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
3946
+ this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
3937
3947
  }
3938
3948
  }
3939
- function nt(n) {
3949
+ function st(n) {
3940
3950
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3941
3951
  }
3942
- function zt({ type: n, error: e }) {
3952
+ function Yt({ type: n, error: e }) {
3943
3953
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3944
3954
  }
3945
- function Ki(n) {
3955
+ function Zi(n) {
3946
3956
  switch (n.type) {
3947
3957
  case "signInViaRedirect":
3948
3958
  case "linkViaRedirect":
3949
3959
  case "reauthViaRedirect":
3950
3960
  return !0;
3951
3961
  case "unknown":
3952
- return zt(n);
3962
+ return Yt(n);
3953
3963
  default:
3954
3964
  return !1;
3955
3965
  }
@@ -3970,7 +3980,7 @@ function Ki(n) {
3970
3980
  * See the License for the specific language governing permissions and
3971
3981
  * limitations under the License.
3972
3982
  */
3973
- async function Ji(n, e = {}) {
3983
+ async function er(n, e = {}) {
3974
3984
  return G(n, "GET", "/v1/projects", e);
3975
3985
  }
3976
3986
  /**
@@ -3989,32 +3999,32 @@ async function Ji(n, e = {}) {
3989
3999
  * See the License for the specific language governing permissions and
3990
4000
  * limitations under the License.
3991
4001
  */
3992
- const Yi = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Xi = /^https?/;
3993
- async function Qi(n) {
4002
+ const tr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, nr = /^https?/;
4003
+ async function ir(n) {
3994
4004
  if (n.config.emulator)
3995
4005
  return;
3996
- const { authorizedDomains: e } = await Ji(n);
4006
+ const { authorizedDomains: e } = await er(n);
3997
4007
  for (const t of e)
3998
4008
  try {
3999
- if (Zi(t))
4009
+ if (rr(t))
4000
4010
  return;
4001
4011
  } catch {
4002
4012
  }
4003
- b(
4013
+ R(
4004
4014
  n,
4005
4015
  "unauthorized-domain"
4006
4016
  /* AuthErrorCode.INVALID_ORIGIN */
4007
4017
  );
4008
4018
  }
4009
- function Zi(n) {
4010
- const e = Ee(), { protocol: t, hostname: i } = new URL(e);
4019
+ function rr(n) {
4020
+ const e = Re(), { protocol: t, hostname: i } = new URL(e);
4011
4021
  if (n.startsWith("chrome-extension://")) {
4012
4022
  const o = new URL(n);
4013
4023
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4014
4024
  }
4015
- if (!Xi.test(t))
4025
+ if (!nr.test(t))
4016
4026
  return !1;
4017
- if (Yi.test(n))
4027
+ if (tr.test(n))
4018
4028
  return i === n;
4019
4029
  const r = n.replace(/\./g, "\\.");
4020
4030
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4035,9 +4045,9 @@ function Zi(n) {
4035
4045
  * See the License for the specific language governing permissions and
4036
4046
  * limitations under the License.
4037
4047
  */
4038
- const er = new X(3e4, 6e4);
4039
- function it() {
4040
- const n = T().___jsl;
4048
+ const sr = new X(3e4, 6e4);
4049
+ function ot() {
4050
+ const n = y().___jsl;
4041
4051
  if (n != null && n.H) {
4042
4052
  for (const e of Object.keys(n.H))
4043
4053
  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)
@@ -4045,45 +4055,45 @@ function it() {
4045
4055
  n.CP[t] = null;
4046
4056
  }
4047
4057
  }
4048
- function tr(n) {
4058
+ function or(n) {
4049
4059
  return new Promise((e, t) => {
4050
4060
  var i, r, s;
4051
4061
  function o() {
4052
- it(), gapi.load("gapi.iframes", {
4062
+ ot(), gapi.load("gapi.iframes", {
4053
4063
  callback: () => {
4054
4064
  e(gapi.iframes.getContext());
4055
4065
  },
4056
4066
  ontimeout: () => {
4057
- it(), t(I(
4067
+ ot(), t(T(
4058
4068
  n,
4059
4069
  "network-request-failed"
4060
4070
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4061
4071
  ));
4062
4072
  },
4063
- timeout: er.get()
4073
+ timeout: sr.get()
4064
4074
  });
4065
4075
  }
4066
- if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4076
+ if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4067
4077
  e(gapi.iframes.getContext());
4068
- else if (!((s = T().gapi) === null || s === void 0) && s.load)
4078
+ else if (!((s = y().gapi) === null || s === void 0) && s.load)
4069
4079
  o();
4070
4080
  else {
4071
- const c = ri("iframefcb");
4072
- return T()[c] = () => {
4073
- gapi.load ? o() : t(I(
4081
+ const c = li("iframefcb");
4082
+ return y()[c] = () => {
4083
+ gapi.load ? o() : t(T(
4074
4084
  n,
4075
4085
  "network-request-failed"
4076
4086
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4077
4087
  ));
4078
- }, ni(`${ii()}?onload=${c}`).catch((a) => t(a));
4088
+ }, ai(`${ci()}?onload=${c}`).catch((a) => t(a));
4079
4089
  }
4080
4090
  }).catch((e) => {
4081
- throw ae = null, e;
4091
+ throw ce = null, e;
4082
4092
  });
4083
4093
  }
4084
- let ae = null;
4085
- function nr(n) {
4086
- return ae = ae || tr(n), ae;
4094
+ let ce = null;
4095
+ function ar(n) {
4096
+ return ce = ce || or(n), ce;
4087
4097
  }
4088
4098
  /**
4089
4099
  * @license
@@ -4101,7 +4111,7 @@ function nr(n) {
4101
4111
  * See the License for the specific language governing permissions and
4102
4112
  * limitations under the License.
4103
4113
  */
4104
- const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe", or = {
4114
+ const cr = new X(5e3, 15e3), lr = "__/auth/iframe", ur = "emulator/auth/iframe", dr = {
4105
4115
  style: {
4106
4116
  position: "absolute",
4107
4117
  top: "-100px",
@@ -4110,13 +4120,13 @@ const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe",
4110
4120
  },
4111
4121
  "aria-hidden": "true",
4112
4122
  tabindex: "-1"
4113
- }, ar = /* @__PURE__ */ new Map([
4123
+ }, hr = /* @__PURE__ */ new Map([
4114
4124
  ["identitytoolkit.googleapis.com", "p"],
4115
4125
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4116
4126
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4117
4127
  // test
4118
4128
  ]);
4119
- function cr(n) {
4129
+ function fr(n) {
4120
4130
  const e = n.config;
4121
4131
  u(
4122
4132
  e.authDomain,
@@ -4124,17 +4134,17 @@ function cr(n) {
4124
4134
  "auth-domain-config-required"
4125
4135
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4126
4136
  );
4127
- const t = e.emulator ? Ce(e, sr) : `https://${n.config.authDomain}/${rr}`, i = {
4137
+ const t = e.emulator ? Me(e, ur) : `https://${n.config.authDomain}/${lr}`, i = {
4128
4138
  apiKey: e.apiKey,
4129
4139
  appName: n.name,
4130
4140
  v: J
4131
- }, r = ar.get(n.config.apiHost);
4141
+ }, r = hr.get(n.config.apiHost);
4132
4142
  r && (i.eid = r);
4133
4143
  const s = n._getFrameworks();
4134
4144
  return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4135
4145
  }
4136
- async function lr(n) {
4137
- const e = await nr(n), t = T().gapi;
4146
+ async function pr(n) {
4147
+ const e = await ar(n), t = y().gapi;
4138
4148
  return u(
4139
4149
  t,
4140
4150
  n,
@@ -4142,24 +4152,24 @@ async function lr(n) {
4142
4152
  /* AuthErrorCode.INTERNAL_ERROR */
4143
4153
  ), e.open({
4144
4154
  where: document.body,
4145
- url: cr(n),
4155
+ url: fr(n),
4146
4156
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4147
- attributes: or,
4157
+ attributes: dr,
4148
4158
  dontclear: !0
4149
4159
  }, (i) => new Promise(async (r, s) => {
4150
4160
  await i.restyle({
4151
4161
  // Prevent iframe from closing on mouse out.
4152
4162
  setHideOnLeave: !1
4153
4163
  });
4154
- const o = I(
4164
+ const o = T(
4155
4165
  n,
4156
4166
  "network-request-failed"
4157
4167
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4158
- ), c = T().setTimeout(() => {
4168
+ ), c = y().setTimeout(() => {
4159
4169
  s(o);
4160
- }, ir.get());
4170
+ }, cr.get());
4161
4171
  function a() {
4162
- T().clearTimeout(c), r(i);
4172
+ y().clearTimeout(c), r(i);
4163
4173
  }
4164
4174
  i.ping(a).then(a, () => {
4165
4175
  s(o);
@@ -4182,13 +4192,13 @@ async function lr(n) {
4182
4192
  * See the License for the specific language governing permissions and
4183
4193
  * limitations under the License.
4184
4194
  */
4185
- const ur = {
4195
+ const mr = {
4186
4196
  location: "yes",
4187
4197
  resizable: "yes",
4188
4198
  statusbar: "yes",
4189
4199
  toolbar: "no"
4190
- }, dr = 500, hr = 600, fr = "_blank", pr = "http://localhost";
4191
- class rt {
4200
+ }, gr = 500, _r = 600, vr = "_blank", Ir = "http://localhost";
4201
+ class at {
4192
4202
  constructor(e) {
4193
4203
  this.window = e, this.associatedEvent = null;
4194
4204
  }
@@ -4200,33 +4210,33 @@ class rt {
4200
4210
  }
4201
4211
  }
4202
4212
  }
4203
- function mr(n, e, t, i = dr, r = hr) {
4213
+ function Tr(n, e, t, i = gr, r = _r) {
4204
4214
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4205
4215
  let c = "";
4206
- const a = Object.assign(Object.assign({}, ur), {
4216
+ const a = Object.assign(Object.assign({}, mr), {
4207
4217
  width: i.toString(),
4208
4218
  height: r.toString(),
4209
4219
  top: s,
4210
4220
  left: o
4211
- }), l = g().toLowerCase();
4212
- t && (c = Rt(l) ? fr : t), St(l) && (e = e || pr, a.scrollbars = "yes");
4213
- const d = Object.entries(a).reduce((_, [x, M]) => `${_}${x}=${M},`, "");
4214
- if (zn(l) && c !== "_self")
4215
- return gr(e || "", c), new rt(null);
4216
- const f = window.open(e || "", c, d);
4221
+ }), l = _().toLowerCase();
4222
+ t && (c = Ct(l) ? vr : t), At(l) && (e = e || Ir, a.scrollbars = "yes");
4223
+ const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
4224
+ if (Qn(l) && c !== "_self")
4225
+ return yr(e || "", c), new at(null);
4226
+ const h = window.open(e || "", c, d);
4217
4227
  u(
4218
- f,
4228
+ h,
4219
4229
  n,
4220
4230
  "popup-blocked"
4221
4231
  /* AuthErrorCode.POPUP_BLOCKED */
4222
4232
  );
4223
4233
  try {
4224
- f.focus();
4234
+ h.focus();
4225
4235
  } catch {
4226
4236
  }
4227
- return new rt(f);
4237
+ return new at(h);
4228
4238
  }
4229
- function gr(n, e) {
4239
+ function yr(n, e) {
4230
4240
  const t = document.createElement("a");
4231
4241
  t.href = n, t.target = e;
4232
4242
  const i = document.createEvent("MouseEvent");
@@ -4248,8 +4258,8 @@ function gr(n, e) {
4248
4258
  * See the License for the specific language governing permissions and
4249
4259
  * limitations under the License.
4250
4260
  */
4251
- const _r = "__/auth/handler", vr = "emulator/auth/handler", Ir = encodeURIComponent("fac");
4252
- async function st(n, e, t, i, r, s) {
4261
+ const wr = "__/auth/handler", Er = "emulator/auth/handler", kr = encodeURIComponent("fac");
4262
+ async function ct(n, e, t, i, r, s) {
4253
4263
  u(
4254
4264
  n.config.authDomain,
4255
4265
  n,
@@ -4269,24 +4279,24 @@ async function st(n, e, t, i, r, s) {
4269
4279
  v: J,
4270
4280
  eventId: r
4271
4281
  };
4272
- if (e instanceof Dt) {
4273
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", yn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4274
- for (const [d, f] of Object.entries({}))
4275
- o[d] = f;
4282
+ if (e instanceof Vt) {
4283
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", bn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4284
+ for (const [d, h] of Object.entries({}))
4285
+ o[d] = h;
4276
4286
  }
4277
4287
  if (e instanceof Q) {
4278
- const d = e.getScopes().filter((f) => f !== "");
4288
+ const d = e.getScopes().filter((h) => h !== "");
4279
4289
  d.length > 0 && (o.scopes = d.join(","));
4280
4290
  }
4281
4291
  n.tenantId && (o.tid = n.tenantId);
4282
4292
  const c = o;
4283
4293
  for (const d of Object.keys(c))
4284
4294
  c[d] === void 0 && delete c[d];
4285
- const a = await n._getAppCheckToken(), l = a ? `#${Ir}=${encodeURIComponent(a)}` : "";
4286
- return `${Tr(n)}?${Y(c).slice(1)}${l}`;
4295
+ const a = await n._getAppCheckToken(), l = a ? `#${kr}=${encodeURIComponent(a)}` : "";
4296
+ return `${br(n)}?${Y(c).slice(1)}${l}`;
4287
4297
  }
4288
- function Tr({ config: n }) {
4289
- return n.emulator ? Ce(n, vr) : `https://${n.authDomain}/${_r}`;
4298
+ function br({ config: n }) {
4299
+ return n.emulator ? Me(n, Er) : `https://${n.authDomain}/${wr}`;
4290
4300
  }
4291
4301
  /**
4292
4302
  * @license
@@ -4305,29 +4315,29 @@ function Tr({ config: n }) {
4305
4315
  * limitations under the License.
4306
4316
  */
4307
4317
  const we = "webStorageSupport";
4308
- class wr {
4318
+ class Sr {
4309
4319
  constructor() {
4310
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Ht, this._completeRedirectFn = Bi, this._overrideRedirectResult = Wi;
4320
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Yi, this._overrideRedirectResult = qi;
4311
4321
  }
4312
4322
  // Wrapping in async even though we don't await anywhere in order
4313
4323
  // to make sure errors are raised as promise rejections
4314
4324
  async _openPopup(e, t, i, r) {
4315
4325
  var s;
4316
- S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4317
- const o = await st(e, t, i, Ee(), r);
4318
- return mr(e, o, Me());
4326
+ P((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4327
+ const o = await ct(e, t, i, Re(), r);
4328
+ return Tr(e, o, xe());
4319
4329
  }
4320
4330
  async _openRedirect(e, t, i, r) {
4321
4331
  await this._originValidation(e);
4322
- const s = await st(e, t, i, Ee(), r);
4323
- return ki(s), new Promise(() => {
4332
+ const s = await ct(e, t, i, Re(), r);
4333
+ return Ai(s), new Promise(() => {
4324
4334
  });
4325
4335
  }
4326
4336
  _initialize(e) {
4327
4337
  const t = e._key();
4328
4338
  if (this.eventManagers[t]) {
4329
4339
  const { manager: r, promise: s } = this.eventManagers[t];
4330
- return r ? Promise.resolve(r) : (S(s, "If manager is not set, promise should be"), s);
4340
+ return r ? Promise.resolve(r) : (P(s, "If manager is not set, promise should be"), s);
4331
4341
  }
4332
4342
  const i = this.initAndGetManager(e);
4333
4343
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4335,7 +4345,7 @@ class wr {
4335
4345
  }), i;
4336
4346
  }
4337
4347
  async initAndGetManager(e) {
4338
- const t = await lr(e), i = new zi(e);
4348
+ const t = await pr(e), i = new Qi(e);
4339
4349
  return t.register("authEvent", (r) => (u(
4340
4350
  r == null ? void 0 : r.authEvent,
4341
4351
  e,
@@ -4350,7 +4360,7 @@ class wr {
4350
4360
  this.iframes[e._key()].send(we, { type: we }, (r) => {
4351
4361
  var s;
4352
4362
  const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4353
- o !== void 0 && t(!!o), b(
4363
+ o !== void 0 && t(!!o), R(
4354
4364
  e,
4355
4365
  "internal-error"
4356
4366
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4359,14 +4369,14 @@ class wr {
4359
4369
  }
4360
4370
  _originValidation(e) {
4361
4371
  const t = e._key();
4362
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = Qi(e)), this.originValidationPromises[t];
4372
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = ir(e)), this.originValidationPromises[t];
4363
4373
  }
4364
4374
  get _shouldInitProactively() {
4365
- return Nt() || Ne() || pe();
4375
+ return Ut() || De() || me();
4366
4376
  }
4367
4377
  }
4368
- const yr = wr;
4369
- var ot = "@firebase/auth", at = "1.7.5";
4378
+ const Rr = Sr;
4379
+ var lt = "@firebase/auth", ut = "1.7.5";
4370
4380
  /**
4371
4381
  * @license
4372
4382
  * Copyright 2020 Google LLC
@@ -4383,7 +4393,7 @@ var ot = "@firebase/auth", at = "1.7.5";
4383
4393
  * See the License for the specific language governing permissions and
4384
4394
  * limitations under the License.
4385
4395
  */
4386
- class Er {
4396
+ class Pr {
4387
4397
  constructor(e) {
4388
4398
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4389
4399
  }
@@ -4434,7 +4444,7 @@ class Er {
4434
4444
  * See the License for the specific language governing permissions and
4435
4445
  * limitations under the License.
4436
4446
  */
4437
- function kr(n) {
4447
+ function Ar(n) {
4438
4448
  switch (n) {
4439
4449
  case "Node":
4440
4450
  return "node";
@@ -4450,8 +4460,8 @@ function kr(n) {
4450
4460
  return;
4451
4461
  }
4452
4462
  }
4453
- function br(n) {
4454
- je(new Ge(
4463
+ function Cr(n) {
4464
+ ze(new qe(
4455
4465
  "auth",
4456
4466
  (e, { options: t }) => {
4457
4467
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
@@ -4463,9 +4473,9 @@ function br(n) {
4463
4473
  apiHost: "identitytoolkit.googleapis.com",
4464
4474
  tokenApiHost: "securetoken.googleapis.com",
4465
4475
  apiScheme: "https",
4466
- sdkClientVersion: Lt(n)
4467
- }, l = new ei(i, r, s, a);
4468
- return oi(l, t), l;
4476
+ sdkClientVersion: Dt(n)
4477
+ }, l = new si(i, r, s, a);
4478
+ return di(l, t), l;
4469
4479
  },
4470
4480
  "PUBLIC"
4471
4481
  /* ComponentType.PUBLIC */
@@ -4477,21 +4487,21 @@ function br(n) {
4477
4487
  "auth-internal"
4478
4488
  /* _ComponentName.AUTH_INTERNAL */
4479
4489
  ).initialize();
4480
- })), je(new Ge(
4490
+ })), ze(new qe(
4481
4491
  "auth-internal",
4482
4492
  (e) => {
4483
- const t = me(e.getProvider(
4493
+ const t = ge(e.getProvider(
4484
4494
  "auth"
4485
4495
  /* _ComponentName.AUTH */
4486
4496
  ).getImmediate());
4487
- return ((i) => new Er(i))(t);
4497
+ return ((i) => new Pr(i))(t);
4488
4498
  },
4489
4499
  "PRIVATE"
4490
4500
  /* ComponentType.PRIVATE */
4491
4501
  ).setInstantiationMode(
4492
4502
  "EXPLICIT"
4493
4503
  /* InstantiationMode.EXPLICIT */
4494
- )), ye(ot, at, kr(n)), ye(ot, at, "esm2017");
4504
+ )), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
4495
4505
  }
4496
4506
  /**
4497
4507
  * @license
@@ -4509,124 +4519,124 @@ function br(n) {
4509
4519
  * See the License for the specific language governing permissions and
4510
4520
  * limitations under the License.
4511
4521
  */
4512
- const Sr = 5 * 60, Rr = ft("authIdTokenMaxAge") || Sr;
4513
- let ct = null;
4514
- const Pr = (n) => async (e) => {
4522
+ const Or = 5 * 60, Nr = gt("authIdTokenMaxAge") || Or;
4523
+ let dt = null;
4524
+ const Lr = (n) => async (e) => {
4515
4525
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4516
- if (i && i > Rr)
4526
+ if (i && i > Nr)
4517
4527
  return;
4518
4528
  const r = t == null ? void 0 : t.token;
4519
- ct !== r && (ct = r, await fetch(n, {
4529
+ dt !== r && (dt = r, await fetch(n, {
4520
4530
  method: r ? "POST" : "DELETE",
4521
4531
  headers: r ? {
4522
4532
  Authorization: `Bearer ${r}`
4523
4533
  } : {}
4524
4534
  }));
4525
4535
  };
4526
- function Ar(n = vn()) {
4527
- const e = pt(n, "auth");
4536
+ function Mr(n = yn()) {
4537
+ const e = _t(n, "auth");
4528
4538
  if (e.isInitialized())
4529
4539
  return e.getImmediate();
4530
- const t = si(n, {
4531
- popupRedirectResolver: yr,
4540
+ const t = ui(n, {
4541
+ popupRedirectResolver: Rr,
4532
4542
  persistence: [
4533
- Li,
4534
- wi,
4535
- Ht
4543
+ xi,
4544
+ Si,
4545
+ Gt
4536
4546
  ]
4537
- }), i = ft("authTokenSyncURL");
4547
+ }), i = gt("authTokenSyncURL");
4538
4548
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4539
4549
  const s = new URL(i, location.origin);
4540
4550
  if (location.origin === s.origin) {
4541
- const o = Pr(s.toString());
4542
- _i(t, o, () => o(t.currentUser)), gi(t, (c) => o(c));
4551
+ const o = Lr(s.toString());
4552
+ wi(t, o, () => o(t.currentUser)), yi(t, (c) => o(c));
4543
4553
  }
4544
4554
  }
4545
- const r = _n("auth");
4546
- return r && ai(t, `http://${r}`), t;
4555
+ const r = Tn("auth");
4556
+ return r && hi(t, `http://${r}`), t;
4547
4557
  }
4548
- function Cr() {
4558
+ function Ur() {
4549
4559
  var n, e;
4550
4560
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4551
4561
  }
4552
- ti({
4562
+ oi({
4553
4563
  loadJS(n) {
4554
4564
  return new Promise((e, t) => {
4555
4565
  const i = document.createElement("script");
4556
4566
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4557
- const s = I(
4567
+ const s = T(
4558
4568
  "internal-error"
4559
4569
  /* AuthErrorCode.INTERNAL_ERROR */
4560
4570
  );
4561
4571
  s.customData = r, t(s);
4562
- }, i.type = "text/javascript", i.charset = "UTF-8", Cr().appendChild(i);
4572
+ }, i.type = "text/javascript", i.charset = "UTF-8", Ur().appendChild(i);
4563
4573
  });
4564
4574
  },
4565
4575
  gapiScript: "https://apis.google.com/js/api.js",
4566
4576
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4567
4577
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4568
4578
  });
4569
- br(
4579
+ Cr(
4570
4580
  "Browser"
4571
4581
  /* ClientPlatform.BROWSER */
4572
4582
  );
4573
- var Or = { 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" }, Nr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" }, Lr = { mode: "development", appMode: "mf" };
4574
- const Mr = {
4583
+ var Dr = { 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" }, Fr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" }, xr = { mode: "development", appMode: "mf" };
4584
+ const Vr = {
4575
4585
  key: 1,
4576
4586
  class: "h-full w-full"
4577
- }, Ur = ["src"], Yr = /* @__PURE__ */ lt({
4587
+ }, $r = ["src"], ns = /* @__PURE__ */ ht({
4578
4588
  __name: "App",
4579
4589
  setup(n) {
4580
- const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = ne(o.query.showHeader !== "false"), a = ne(!1), { currentBusiness: l } = We(), d = ne(!1), f = Ve(() => i.version), _ = Ve(() => {
4581
- const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
4582
- return `${Nr.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
4590
+ const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c = ne(o.query.showHeader !== "false"), a = ne(!1), { currentBusiness: l } = be(), d = ne(!1), h = Ee(() => i.version), p = Ee(() => {
4591
+ const m = e.currentCountry.value || "MY", g = Ke.getIdToken(), I = l.value._id;
4592
+ return `${Fr.marketingV1Portal}/b/${I}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4583
4593
  });
4584
- async function x() {
4585
- if (En().length) {
4594
+ async function w() {
4595
+ if (Sn().length) {
4586
4596
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4587
4597
  return;
4588
4598
  }
4589
- const p = kn(Or.firebase), m = await sn.getCustomToken(), v = Ar();
4590
- await mi(v, m), bn(p), console.log("initFirebase", p);
4599
+ const m = Rn(Dr.firebase), g = await an.getCustomToken(), I = Mr();
4600
+ await Ti(I, g), Pn(m), console.log("initFirebase", m);
4591
4601
  }
4592
- const M = async () => {
4593
- d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && f.value === "v2" ? e.registerSidebarComponent(Pn) : e.hideSidebarToggle(!0), await x(), a.value = !0, d.value = !0;
4602
+ const U = async () => {
4603
+ d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Ln) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
4594
4604
  };
4595
4605
  async function ee() {
4596
- var p;
4597
- console.log("initRemyClient.."), await Rn.init({
4598
- token: ((p = e.sessionUser.value) == null ? void 0 : p.token) || "",
4599
- dev: Lr.mode === "development"
4606
+ var m;
4607
+ console.log("initRemyClient.."), await Cn.init({
4608
+ token: ((m = e.sessionUser.value) == null ? void 0 : m.token) || "",
4609
+ dev: xr.mode === "development"
4600
4610
  });
4601
4611
  }
4602
- return Xt(() => {
4603
- if (Sn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4604
- const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], U = document.getElementsByTagName("main")[0];
4605
- p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), U == null || U.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4612
+ return en(() => {
4613
+ if (An.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], D = 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"), D == null || D.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4606
4616
  }
4607
- l.value != null && (console.log("App mounted, forceRerender"), M()), ee();
4608
- }), ut(
4617
+ l.value != null && (console.log("App mounted, forceRerender"), U()), ee();
4618
+ }), ft(
4609
4619
  () => e.currentBusiness.value,
4610
- async (p, m) => {
4611
- console.log("Current business changed"), p != null && p._id != m._id && (console.log("forceRerender when business changes", p, m), M());
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());
4612
4622
  }
4613
- ), (p, m) => (ie(), $e(Qt, null, [
4614
- P(d) && P(f) === "v2" ? (ie(), dt(P(rn), { key: 0 })) : He("", !0),
4615
- P(d) && P(f) !== "v2" ? (ie(), $e("div", Mr, [
4616
- Zt(dn, {
4617
- json: { url: P(_) }
4623
+ ), (m, g) => (ie(), ke(tn, null, [
4624
+ v(d) && v(h) === "v2" ? (ie(), nn(v(on), { key: 0 })) : Ge("", !0),
4625
+ v(d) && v(h) !== "v2" ? (ie(), ke("div", Vr, [
4626
+ pt(pn, {
4627
+ json: { url: v(p) }
4618
4628
  }, null, 8, ["json"]),
4619
- en("iframe", {
4629
+ re("iframe", {
4620
4630
  allow: "clipboard-read; clipboard-write",
4621
4631
  frameBorder: "0",
4622
4632
  height: "100%",
4623
4633
  width: "100%",
4624
- src: P(_)
4625
- }, null, 8, Ur)
4626
- ])) : He("", !0)
4634
+ src: v(p)
4635
+ }, null, 8, $r)
4636
+ ])) : Ge("", !0)
4627
4637
  ], 64));
4628
4638
  }
4629
4639
  });
4630
4640
  export {
4631
- Yr as default
4641
+ ns as default
4632
4642
  };