@feedmepos/mf-connect 0.1.38-beta.9 → 0.1.38-beta.92

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 (161) hide show
  1. package/dist/{Analytic-3MN2saaU.js → Analytic-CWhVZ2N2.js} +31 -32
  2. package/dist/{App-Co8X5Wdy.js → App-BzHDZ550.js} +741 -728
  3. package/dist/AuditLogs-DjJOfxWr.js +2013 -0
  4. package/dist/{Bin-8a56ZDib.js → Bin-H9Mc0kOX.js} +10 -10
  5. package/dist/Broadcast-BlKv9pTl.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVXlfq31.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bfpr1EuT.js} +6 -6
  7. package/dist/{Card-B8_09LJu.js → Card-ByEYCMZi.js} +145 -140
  8. package/dist/Collections-BjlqpQR0.js +540 -0
  9. package/dist/Credit-DyBVTpfr.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  12. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DP50lRfA.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BCQxJpVP.js +351 -0
  15. package/dist/Experience-Cf6lxdu_.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BIgeA5yw.js} +1 -1
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-CCgsa5as.js +330 -0
  20. package/dist/Grab-oIvB2uUc.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-BuiY288K.js} +49 -48
  22. package/dist/{Index-DLF71mx_.js → Index--bmiSYq2.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BQMZvHq2.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bj6wuosW.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DTva8da3.js} +1 -1
  26. package/dist/Marketing-D-5rvdRJ.js +236 -0
  27. package/dist/MarketingMaterialEdit-CZvsnFG5.js +1036 -0
  28. package/dist/{Member-Bkw4aqtv.js → Member-CxKA1iM1.js} +38 -37
  29. package/dist/{MemberList-a3PdVYB3.js → MemberList-CmBZ6w5v.js} +485 -489
  30. package/dist/{MemberTransactions-CPDBd-n3.js → MemberTransactions-Dc9uE1Jy.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-pbN8pN1m.js → MessageInput.vue_vue_type_script_setup_true_lang-DiOsNoiJ.js} +10392 -9967
  32. package/dist/Mission-D9ruHJsQ.js +334 -0
  33. package/dist/{Overview-De97NDoe.js → Overview-B4eiwvqi.js} +34 -34
  34. package/dist/Point-MXmcuDtD.js +262 -0
  35. package/dist/Promotion-CBoCcEhJ.js +397 -0
  36. package/dist/{Queue-ISVZxCE2.js → Queue-if5Lji0q.js} +18 -18
  37. package/dist/{Record-2FMByNC6.js → Record-XLXvSqlF.js} +15 -14
  38. package/dist/Review-BKIkmxLd.js +621 -0
  39. package/dist/ReviewFacebookCallback-B6TIL_H7.js +243 -0
  40. package/dist/ReviewGoogleCallback-D3sQbfuc.js +213 -0
  41. package/dist/{Reward-DPRyQ37x.js → Reward-DaymLqOP.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Ba7-3bL-.js → RewardGroup.vue_vue_type_script_setup_true_lang-cGyeUFlK.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BOJdm376.js +1912 -0
  44. package/dist/Segment-o7srzt8o.js +1015 -0
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DZbyDVid.js → SelectItems.vue_vue_type_script_setup_true_lang-DnA83SVT.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ioMFYIwK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-RKn_DhW0.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-mzGtatEl.js +226 -0
  48. package/dist/Setting-Clbp5X2E.js +2039 -0
  49. package/dist/SettingAdvertisements-D9KTw00Q.js +264 -0
  50. package/dist/Store-DApDz7rO.js +1996 -0
  51. package/dist/StoreRewards-DTraNhDh.js +537 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BusvWI37.js +1130 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D5HOiiLG.js +7007 -0
  54. package/dist/{Tier-CwRj0oJ1.js → Tier-BWiO5an3.js} +562 -480
  55. package/dist/{Title-EII5OxSP.js → Title-Dur74Of5.js} +151 -149
  56. package/dist/{Transaction-1MTkAfej.js → Transaction-x3fZwXdy.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BlQVWQHJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-9XLlfUdp.js} +7 -7
  58. package/dist/Voucher-DH7x7NAS.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CNn4GR2l.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CTeGK4bk.js → ZodTextField.vue_vue_type_script_setup_true_lang-W-qWPW20.js} +2 -2
  61. package/dist/app-IRmnrMb8.js +59647 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-DjnN-J4U.js → business-BZG7VHN8.js} +11 -8
  64. package/dist/campaign-BUvMmYOk.js +219 -0
  65. package/dist/campaign-BeRxvBzZ.js +254 -0
  66. package/dist/campaign.enum-BmFHrnub.js +26 -0
  67. package/dist/campaign.fn-B0sgTkC-.js +776 -0
  68. package/dist/{collectible.enum-r6N115Lu.js → collectible.enum-J0aolcpF.js} +1 -1
  69. package/dist/{collection.fn-CSsfVv26.js → collection.fn-BOhZm8S0.js} +2 -2
  70. package/dist/dto-CSNH3rWF.js +222 -0
  71. package/dist/duplicateCampaign-CAOL6p7n.js +51 -0
  72. package/dist/effect-DTL3F8d_.js +89 -0
  73. package/dist/{email-addresses-D8uheCCF.js → email-addresses-Bw8rSTHa.js} +2 -2
  74. package/dist/{export-Ver6WiX6.js → export-CY5VAxnU.js} +4 -4
  75. package/dist/{helper-Bg4xoFbh.js → helper-1sIKNm6C.js} +22 -7
  76. package/dist/{index-Dn_bmcns.js → index-BX_igCG6.js} +3 -3
  77. package/dist/index-B_-tEYD0.js +3625 -0
  78. package/dist/{index-BZZ4iF4-.js → index-BultP2zY.js} +23 -12
  79. package/dist/index-CAIsxBzT.js +48 -0
  80. package/dist/index-CVbL8J7-.js +85 -0
  81. package/dist/index-CuvNtC_M.js +61 -0
  82. package/dist/{index-D4JOeJJJ.js → index-D4Bx6J2q.js} +1 -1
  83. package/dist/{index-hJUxCNsF.js → index-DO2AYnVc.js} +1 -1
  84. package/dist/index-DPmqQmoC.js +30289 -0
  85. package/dist/{index-CNhr0_Zx.js → index-DoupH575.js} +617 -191
  86. package/dist/{index-Bb0CHeNx.js → index-DpXwZYX4.js} +3 -3
  87. package/dist/{index-BPQyQc4q.js → index-Gr5htFUW.js} +1 -1
  88. package/dist/index-KC-9_cY4.js +8910 -0
  89. package/dist/index-nMxh2OZ2.js +28900 -0
  90. package/dist/{index.esm2017-hK1Mi9yY.js → index.esm2017-0cVB_6L1.js} +122 -122
  91. package/dist/{loading-kIQFOTwH.js → loading-BUAN8WyV.js} +4 -3
  92. package/dist/{lodash-B5I3zXaY.js → lodash-C7OD0MNW.js} +1 -1
  93. package/dist/{membership--xR-HZoa.js → membership-CZkPkDiM.js} +38 -18
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-c-ITXnlg.js → money-CdTox5sS.js} +1 -1
  96. package/dist/{number-DfZSBLOY.js → number-CxHO_EhJ.js} +1 -1
  97. package/dist/objectid-DL2GZe9v.js +145 -0
  98. package/dist/{campaign-BpJ1O6KS.js → plugins-BR4hQ6yY.js} +677 -699
  99. package/dist/remy-D_Deb3ue.js +13 -0
  100. package/dist/{reward-CE0ifMHS.js → reward-DWwwkcS3.js} +1 -1
  101. package/dist/{rule-DrjdmpaB.js → rule-CY_w8dsS.js} +505 -487
  102. package/dist/rule-builder-DMdUBkxB.js +102 -0
  103. package/dist/string-Gcy5IM_H.js +32 -0
  104. package/dist/style.css +11 -2
  105. package/dist/template-tuIzBpOC.js +188 -0
  106. package/dist/timezone-Dt3UFIE2.js +1156 -0
  107. package/dist/trigger-B9pWO76n.js +213 -0
  108. package/dist/useMarketingMaterialActions-C7XoKutU.js +96 -0
  109. package/dist/usePagination-Dvqiv0Ms.js +220 -0
  110. package/dist/{user-Cl3IotYV.js → user-DlrL0A8u.js} +15 -14
  111. package/dist/{vue-i18n-DKh0SMhL.js → vue-i18n-B2srUL0h.js} +449 -449
  112. package/dist/{xlsx-BDBzdOuM.js → xlsx-B9pnBbNc.js} +1 -1
  113. package/dist/{zod-Bg2FbC-D.js → zod-CO0ds3MB.js} +32 -31
  114. package/package.json +14 -6
  115. package/dist/AuditLogs-DTq6IAuc.js +0 -1887
  116. package/dist/Broadcast-UreS5Kiq.js +0 -227
  117. package/dist/Collections-B0I5ULxR.js +0 -465
  118. package/dist/Credit-B4Ad8DWP.js +0 -222
  119. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  120. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js +0 -2185
  121. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y5JnuIev.js +0 -347
  122. package/dist/Experience-xO5KpTTm.js +0 -223
  123. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  124. package/dist/Game-ChgrVvz5.js +0 -278
  125. package/dist/Marketing-BlmRXSGl.js +0 -20073
  126. package/dist/Mission-B07wK0HX.js +0 -296
  127. package/dist/Point-Ckj9QIeH.js +0 -226
  128. package/dist/Promotion-aGNCOeRN.js +0 -289
  129. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js +0 -1751
  130. package/dist/Segment-CRMNJ11X.js +0 -882
  131. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cfp8XXdO.js +0 -147
  132. package/dist/Setting-c0FWRZsD.js +0 -1936
  133. package/dist/Store-Bm1_15s8.js +0 -1842
  134. package/dist/StoreRewards-BCQHHfay.js +0 -423
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfTF2l-D.js +0 -1029
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-rvhoxo0w.js +0 -139
  137. package/dist/Voucher-CYvjCb-v.js +0 -384
  138. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-63Jr71dJ.js +0 -419
  139. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  140. package/dist/app-BJLHk8ao.js +0 -33357
  141. package/dist/app-BzIk1ojT.js +0 -7086
  142. package/dist/campaign-BHNS5kXt.js +0 -96
  143. package/dist/campaign.enum-CJDWE_Om.js +0 -20
  144. package/dist/campaign.fn-C0HQE9uh.js +0 -758
  145. package/dist/dto-Byq51uVH.js +0 -214
  146. package/dist/effect-Do3yTM-_.js +0 -78
  147. package/dist/index-B1V9UnI9.js +0 -76
  148. package/dist/index-BM9CWjC6.js +0 -38
  149. package/dist/index-CsaQJMAR.js +0 -66
  150. package/dist/index-D6VxioBg.js +0 -30038
  151. package/dist/index-DGKlRWn3.js +0 -32260
  152. package/dist/index-DLKyOu7W.js +0 -8861
  153. package/dist/index-DyYF6HYL.js +0 -121
  154. package/dist/index-UXtH44XQ.js +0 -3120
  155. package/dist/objectid-DKbha9-x.js +0 -145
  156. package/dist/plugins-DtakupKW.js +0 -208
  157. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  158. package/dist/rule-builder-B_hCyq3x.js +0 -89
  159. package/dist/template-WI4a-lFY.js +0 -190
  160. package/dist/trigger-DieDHht3.js +0 -144
  161. package/dist/usePagination-BeF5K3M7.js +0 -223
@@ -1,153 +1,172 @@
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-DjnN-J4U.js";
6
- import "./index-D4JOeJJJ.js";
7
- import { components as q, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
8
- import { u as un } from "./vue-i18n-DKh0SMhL.js";
9
- import { R as h } from "./app-BzIk1ojT.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-hK1Mi9yY.js";
12
- import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
13
- import { S as Be, c as Sn } from "./index-D6VxioBg.js";
14
- import { Y as Rn } from "./remy-vue-client-Cpppk9h-.js";
15
- const Pn = /* @__PURE__ */ lt({
1
+ import { defineComponent as ft, ref as ie, h as z, computed as ke, watch as pt, resolveComponent as en, openBlock as K, createElementBlock as be, createVNode as mt, unref as v, createElementVNode as re, toDisplayString as Ge, onMounted as tn, Fragment as nn, createBlock as Be, createCommentVNode as ye, nextTick as rn } from "vue";
2
+ import { useRouter as sn, useRoute as gt, RouterView as on } from "vue-router";
3
+ import { useCoreStore as Se, FeedMeAuth as an } from "@feedmepos/mf-common";
4
+ import { u as cn } from "./app-wDQR6dpb.js";
5
+ import { u as ln } from "./business-BZG7VHN8.js";
6
+ import "./index-D4Bx6J2q.js";
7
+ import { components as q, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
+ import { u as hn } from "./vue-i18n-B2srUL0h.js";
9
+ import { C as ze, m as fn } from "./timezone-Dt3UFIE2.js";
10
+ import { R as f } from "./app-IRmnrMb8.js";
11
+ import { J as pn } from "./JsonViewer-v8_C7l5N.js";
12
+ import { ChatPanel as mn } from "@feedmepos/mf-remy-panel";
13
+ import { u as gn } from "./remy-D_Deb3ue.js";
14
+ import { r as Re, L as _n, g as _t, i as vn, a as In, _ as qe, C as Ke, b as Tn, S as X, c as E, d as j, E as Oe, e as yn, f as vt, h as wn, j as En, k as It, l as _, m as kn, F as Ne, n as bn, q as Q, o as Sn, p as Rn, s as An, t as Pn, u as Cn } from "./index.esm2017-0cVB_6L1.js";
15
+ import { _ as Le } from "./tslib.es6-BCqqvLQ_.js";
16
+ import { S as Je, c as On } from "./index-nMxh2OZ2.js";
17
+ const Nn = { class: "flex flex-col h-full justify-between py-16" }, Ln = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Mn = /* @__PURE__ */ ft({
16
18
  __name: "NavigationTab",
17
19
  setup(n) {
18
- const { t: e } = un(), t = ne(), i = [
20
+ const { t: e } = hn(), t = ie(), i = [
19
21
  {
20
22
  label: e("connect.navigation.analytic"),
21
- value: h["$connect-ANALYTIC"]
23
+ value: f["$connect-ANALYTIC"]
22
24
  },
23
25
  {
24
26
  label: e("connect.navigation.campaign"),
25
- value: h["$connect-CAMPAIGN"],
27
+ value: f["$connect-CAMPAIGN"],
26
28
  children: [
27
29
  {
28
30
  label: e("connect.navigation.promotion"),
29
- value: h["$connect-CAMPAIGN_PROMOTION"]
31
+ value: f["$connect-CAMPAIGN_PROMOTION"]
30
32
  },
31
33
  {
32
34
  label: e("connect.navigation.voucher"),
33
- value: h["$connect-CAMPAIGN_VOUCHER"]
35
+ value: f["$connect-CAMPAIGN_VOUCHER"]
34
36
  },
35
37
  {
36
38
  label: e("connect.navigation.broadcast"),
37
- value: h["$connect-CAMPAIGN_BROADCAST"]
39
+ value: f["$connect-CAMPAIGN_BROADCAST"]
40
+ },
41
+ {
42
+ label: e("connect.navigation.grab"),
43
+ value: f["$connect-CAMPAIGN_GRAB"]
38
44
  }
39
45
  ]
40
46
  },
41
47
  {
42
48
  label: e("connect.navigation.program"),
43
- value: h["$connect-PROGRAM"],
49
+ value: f["$connect-PROGRAM"],
44
50
  children: [
45
51
  {
46
52
  label: e("connect.navigation.tier"),
47
- value: h["$connect-PROGRAM_TIER"]
53
+ value: f["$connect-PROGRAM_TIER"]
48
54
  },
49
55
  {
50
56
  label: e("connect.navigation.title"),
51
- value: h["$connect-PROGRAM_TITLE"]
57
+ value: f["$connect-PROGRAM_TITLE"]
52
58
  },
53
59
  {
54
60
  label: e("connect.navigation.experience"),
55
- value: h["$connect-PROGRAM_EXPERIENCE"]
61
+ value: f["$connect-PROGRAM_EXPERIENCE"]
56
62
  },
57
63
  {
58
64
  label: e("connect.navigation.point"),
59
- value: h["$connect-PROGRAM_POINT"],
60
- badge: () => B(q.FmPill, { variant: "premium" })
65
+ value: f["$connect-PROGRAM_POINT"],
66
+ badge: () => z(q.FmPill, { variant: "premium" })
61
67
  },
62
68
  {
63
69
  label: e("connect.navigation.credit"),
64
- value: h["$connect-PROGRAM_CREDIT"]
70
+ value: f["$connect-PROGRAM_CREDIT"]
65
71
  },
66
72
  {
67
73
  label: e("connect.navigation.game"),
68
- value: h["$connect-PROGRAM_GAME"],
69
- badge: () => B(q.FmPill, { variant: "premium" })
74
+ value: f["$connect-PROGRAM_GAME"],
75
+ badge: () => z(q.FmPill, { variant: "premium" })
70
76
  },
71
77
  {
72
78
  label: "Mission",
73
- value: h["$connect-PROGRAM_MISSION"]
79
+ value: f["$connect-PROGRAM_MISSION"]
74
80
  }
75
81
  ]
76
82
  },
77
83
  {
78
84
  label: e("connect.navigation.loyalty"),
79
- value: h["$connect-LOYALTY"],
85
+ value: f["$connect-LOYALTY"],
80
86
  children: [
81
87
  {
82
88
  label: e("connect.navigation.member"),
83
- value: h["$connect-LOYALTY_MEMBER_LIST"]
89
+ value: f["$connect-LOYALTY_MEMBER_LIST"]
84
90
  },
85
91
  {
86
92
  label: e("connect.navigation.segments"),
87
- value: h["$connect-LOYALTY_SEGMENT"],
88
- badge: () => B(q.FmPill, { variant: "premium" })
93
+ value: f["$connect-LOYALTY_SEGMENT"],
94
+ badge: () => z(q.FmPill, { variant: "premium" })
89
95
  },
90
96
  {
91
97
  label: e("connect.navigation.card"),
92
- value: h["$connect-LOYALTY_CARD"],
93
- badge: () => B(q.FmPill, { variant: "premium" })
98
+ value: f["$connect-LOYALTY_CARD"],
99
+ badge: () => z(q.FmPill, { variant: "premium" })
94
100
  }
95
101
  ]
96
102
  },
97
103
  {
98
104
  label: e("connect.navigation.referral"),
99
- value: h["$connect-REFERRAL"],
100
- badge: () => B(q.FmPill, { variant: "premium" })
105
+ value: f["$connect-REFERRAL"],
106
+ badge: () => z(q.FmPill, { variant: "premium" })
101
107
  },
102
108
  {
103
109
  label: e("connect.navigation.store"),
104
- value: h["$connect-STORE"]
110
+ value: f["$connect-STORE"]
105
111
  },
106
112
  {
107
113
  label: e("connect.navigation.transaction"),
108
- value: h["$connect-TRANSACTION"]
114
+ value: f["$connect-TRANSACTION"]
109
115
  },
110
116
  {
111
- label: "Marketing material",
112
- value: h["$connect-MARKETING"]
117
+ label: e("connect.navigation.marketingMaterials"),
118
+ value: f["$connect-MARKETING"]
113
119
  },
114
120
  {
115
121
  label: e("connect.navigation.auditLogs"),
116
- value: h["$connect-AUDIT_LOGS"]
122
+ value: f["$connect-AUDIT_LOGS"]
123
+ },
124
+ {
125
+ label: e("connect.navigation.review"),
126
+ value: f["$connect-REVIEW"]
117
127
  },
118
128
  {
119
129
  label: e("connect.navigation.setting"),
120
- value: h["$connect-SETTING"]
130
+ value: f["$connect-SETTING"]
121
131
  },
122
132
  {
123
133
  label: e("connect.navigation.bin"),
124
- value: h["$connect-BIN"]
134
+ value: f["$connect-BIN"]
125
135
  }
126
- ], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
127
- ut(
136
+ ], r = sn(), s = gt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = Se(), a = ke(() => {
137
+ const d = c.currentCountry.value || "MY";
138
+ return console.log(`[MF] Timezone set to: ${ze[d]}`), ze[d];
139
+ });
140
+ pt(
128
141
  () => s,
129
- (a) => {
130
- const l = a.matched.map((d) => d.name).reverse();
131
- t.value = l.find((d) => o.includes(d));
142
+ (d) => {
143
+ const h = d.matched.map((p) => p.name).reverse();
144
+ t.value = h.find((p) => o.includes(p));
132
145
  },
133
146
  { immediate: !0 }
134
147
  );
135
- async function c(a) {
136
- await r.push({ name: a });
148
+ async function u(d) {
149
+ await r.push({ name: d });
137
150
  }
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"]);
151
+ return (d, h) => {
152
+ var I;
153
+ const p = en("FmCollapsibleTabs");
154
+ return K(), be("div", Nn, [
155
+ mt(p, {
156
+ class: "border-fm-color-neutral-gray-100 border-r px-4",
157
+ "model-value": (I = v(t)) == null ? void 0 : I.toString(),
158
+ items: i,
159
+ "onUpdate:modelValue": u
160
+ }, null, 8, ["model-value"]),
161
+ re("div", Ln, [
162
+ re("div", null, "Timezone: " + Ge(v(a).split("/")[1].replace("_", " ")), 1),
163
+ re("div", null, "(UTC" + Ge(v(fn).tz(v(a)).format("Z")) + ")", 1)
164
+ ])
165
+ ]);
147
166
  };
148
167
  }
149
168
  });
150
- var An = "firebase", Cn = "10.12.4";
169
+ var Un = "firebase", Dn = "10.12.4";
151
170
  /**
152
171
  * @license
153
172
  * Copyright 2020 Google LLC
@@ -164,13 +183,13 @@ var An = "firebase", Cn = "10.12.4";
164
183
  * See the License for the specific language governing permissions and
165
184
  * limitations under the License.
166
185
  */
167
- ye(An, Cn, "app");
168
- function gt() {
186
+ Re(Un, Dn, "app");
187
+ function Tt() {
169
188
  return {
170
189
  "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
190
  };
172
191
  }
173
- const On = gt, _t = new Se("auth", "Firebase", gt());
192
+ const Fn = Tt, yt = new Oe("auth", "Firebase", Tt());
174
193
  /**
175
194
  * @license
176
195
  * Copyright 2020 Google LLC
@@ -187,12 +206,12 @@ const On = gt, _t = new Se("auth", "Firebase", gt());
187
206
  * See the License for the specific language governing permissions and
188
207
  * limitations under the License.
189
208
  */
190
- const ce = new hn("@firebase/auth");
191
- function Nn(n, ...e) {
192
- ce.logLevel <= mt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
209
+ const le = new _n("@firebase/auth");
210
+ function xn(n, ...e) {
211
+ le.logLevel <= It.WARN && le.warn(`Auth (${X}): ${n}`, ...e);
193
212
  }
194
- function re(n, ...e) {
195
- ce.logLevel <= mt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
213
+ function se(n, ...e) {
214
+ le.logLevel <= It.ERROR && le.error(`Auth (${X}): ${n}`, ...e);
196
215
  }
197
216
  /**
198
217
  * @license
@@ -210,38 +229,38 @@ function re(n, ...e) {
210
229
  * See the License for the specific language governing permissions and
211
230
  * limitations under the License.
212
231
  */
213
- function b(n, ...e) {
214
- throw Ae(n, ...e);
232
+ function R(n, ...e) {
233
+ throw Me(n, ...e);
215
234
  }
216
- function I(n, ...e) {
217
- return Ae(n, ...e);
235
+ function y(n, ...e) {
236
+ return Me(n, ...e);
218
237
  }
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, {
238
+ function wt(n, e, t) {
239
+ const i = Object.assign(Object.assign({}, Fn()), { [e]: t });
240
+ return new Oe("auth", "Firebase", i).create(e, {
222
241
  appName: n.name
223
242
  });
224
243
  }
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");
244
+ function M(n) {
245
+ return wt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
227
246
  }
228
- function Ae(n, ...e) {
247
+ function Me(n, ...e) {
229
248
  if (typeof n != "string") {
230
249
  const t = e[0], i = [...e.slice(1)];
231
250
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
232
251
  }
233
- return _t.create(n, ...e);
252
+ return yt.create(n, ...e);
234
253
  }
235
- function u(n, e, ...t) {
254
+ function l(n, e, ...t) {
236
255
  if (!n)
237
- throw Ae(e, ...t);
256
+ throw Me(e, ...t);
238
257
  }
239
- function y(n) {
258
+ function k(n) {
240
259
  const e = "INTERNAL ASSERTION FAILED: " + n;
241
- throw re(e), new Error(e);
260
+ throw se(e), new Error(e);
242
261
  }
243
- function S(n, e) {
244
- n || y(e);
262
+ function A(n, e) {
263
+ n || k(e);
245
264
  }
246
265
  /**
247
266
  * @license
@@ -259,14 +278,14 @@ function S(n, e) {
259
278
  * See the License for the specific language governing permissions and
260
279
  * limitations under the License.
261
280
  */
262
- function Ee() {
281
+ function Ae() {
263
282
  var n;
264
283
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
265
284
  }
266
- function Ln() {
267
- return qe() === "http:" || qe() === "https:";
285
+ function Vn() {
286
+ return Ye() === "http:" || Ye() === "https:";
268
287
  }
269
- function qe() {
288
+ function Ye() {
270
289
  var n;
271
290
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
272
291
  }
@@ -286,15 +305,15 @@ function qe() {
286
305
  * See the License for the specific language governing permissions and
287
306
  * limitations under the License.
288
307
  */
289
- function Mn() {
308
+ function $n() {
290
309
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
291
310
  // This is especially true for Cordova apps which have unreliable
292
311
  // navigator.onLine behavior unless cordova-plugin-network-information is
293
312
  // installed which overwrites the native navigator.onLine value and
294
313
  // defines navigator.connection.
295
- (Ln() || mn() || "connection" in navigator) ? navigator.onLine : !0;
314
+ (Vn() || Tn() || "connection" in navigator) ? navigator.onLine : !0;
296
315
  }
297
- function Un() {
316
+ function Hn() {
298
317
  if (typeof navigator > "u")
299
318
  return null;
300
319
  const n = navigator;
@@ -322,12 +341,12 @@ function Un() {
322
341
  * See the License for the specific language governing permissions and
323
342
  * limitations under the License.
324
343
  */
325
- class X {
344
+ class Z {
326
345
  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();
346
+ this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = vn() || In();
328
347
  }
329
348
  get() {
330
- return Mn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
349
+ return $n() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
331
350
  }
332
351
  }
333
352
  /**
@@ -346,8 +365,8 @@ class X {
346
365
  * See the License for the specific language governing permissions and
347
366
  * limitations under the License.
348
367
  */
349
- function Ce(n, e) {
350
- S(n.emulator, "Emulator should always be set here");
368
+ function Ue(n, e) {
369
+ A(n.emulator, "Emulator should always be set here");
351
370
  const { url: t } = n.emulator;
352
371
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
353
372
  }
@@ -367,7 +386,7 @@ function Ce(n, e) {
367
386
  * See the License for the specific language governing permissions and
368
387
  * limitations under the License.
369
388
  */
370
- class It {
389
+ class Et {
371
390
  static initialize(e, t, i) {
372
391
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
373
392
  }
@@ -380,7 +399,7 @@ class It {
380
399
  return globalThis.fetch;
381
400
  if (typeof fetch < "u")
382
401
  return fetch;
383
- y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
402
+ k("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
384
403
  }
385
404
  static headers() {
386
405
  if (this.headersImpl)
@@ -391,7 +410,7 @@ class It {
391
410
  return globalThis.Headers;
392
411
  if (typeof Headers < "u")
393
412
  return Headers;
394
- y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
413
+ k("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
395
414
  }
396
415
  static response() {
397
416
  if (this.responseImpl)
@@ -402,7 +421,7 @@ class It {
402
421
  return globalThis.Response;
403
422
  if (typeof Response < "u")
404
423
  return Response;
405
- y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
424
+ k("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
406
425
  }
407
426
  }
408
427
  /**
@@ -421,7 +440,7 @@ class It {
421
440
  * See the License for the specific language governing permissions and
422
441
  * limitations under the License.
423
442
  */
424
- const Dn = {
443
+ const Wn = {
425
444
  // Custom token errors.
426
445
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
427
446
  // This can only happen if the SDK sends a bad request.
@@ -512,93 +531,93 @@ const Dn = {
512
531
  * See the License for the specific language governing permissions and
513
532
  * limitations under the License.
514
533
  */
515
- const Fn = new X(3e4, 6e4);
516
- function fe(n, e) {
534
+ const jn = new Z(3e4, 6e4);
535
+ function pe(n, e) {
517
536
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
518
537
  }
519
538
  async function G(n, e, t, i, r = {}) {
520
- return Tt(n, r, async () => {
539
+ return kt(n, r, async () => {
521
540
  let s = {}, o = {};
522
541
  i && (e === "GET" ? o = i : s = {
523
542
  body: JSON.stringify(i)
524
543
  });
525
- const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
544
+ const c = Q(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
526
545
  return a[
527
546
  "Content-Type"
528
547
  /* HttpHeader.CONTENT_TYPE */
529
548
  ] = "application/json", n.languageCode && (a[
530
549
  "X-Firebase-Locale"
531
550
  /* HttpHeader.X_FIREBASE_LOCALE */
532
- ] = n.languageCode), It.fetch()(yt(n, n.config.apiHost, t, c), Object.assign({
551
+ ] = n.languageCode), Et.fetch()(St(n, n.config.apiHost, t, c), Object.assign({
533
552
  method: e,
534
553
  headers: a,
535
554
  referrerPolicy: "no-referrer"
536
555
  }, s));
537
556
  });
538
557
  }
539
- async function Tt(n, e, t) {
558
+ async function kt(n, e, t) {
540
559
  n._canInitEmulator = !1;
541
- const i = Object.assign(Object.assign({}, Dn), e);
560
+ const i = Object.assign(Object.assign({}, Wn), e);
542
561
  try {
543
- const r = new xn(n), s = await Promise.race([
562
+ const r = new Gn(n), s = await Promise.race([
544
563
  t(),
545
564
  r.promise
546
565
  ]);
547
566
  r.clearNetworkTimeout();
548
567
  const o = await s.json();
549
568
  if ("needConfirmation" in o)
550
- throw te(n, "account-exists-with-different-credential", o);
569
+ throw ne(n, "account-exists-with-different-credential", o);
551
570
  if (s.ok && !("errorMessage" in o))
552
571
  return o;
553
572
  {
554
- const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
573
+ const c = s.ok ? o.errorMessage : o.error.message, [a, u] = c.split(" : ");
555
574
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
556
- throw te(n, "credential-already-in-use", o);
575
+ throw ne(n, "credential-already-in-use", o);
557
576
  if (a === "EMAIL_EXISTS")
558
- throw te(n, "email-already-in-use", o);
577
+ throw ne(n, "email-already-in-use", o);
559
578
  if (a === "USER_DISABLED")
560
- throw te(n, "user-disabled", o);
579
+ throw ne(n, "user-disabled", o);
561
580
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
562
- if (l)
563
- throw vt(n, d, l);
564
- b(n, d);
581
+ if (u)
582
+ throw wt(n, d, u);
583
+ R(n, d);
565
584
  }
566
585
  } catch (r) {
567
- if (r instanceof Re)
586
+ if (r instanceof Ne)
568
587
  throw r;
569
- b(n, "network-request-failed", { message: String(r) });
588
+ R(n, "network-request-failed", { message: String(r) });
570
589
  }
571
590
  }
572
- async function wt(n, e, t, i, r = {}) {
591
+ async function bt(n, e, t, i, r = {}) {
573
592
  const s = await G(n, e, t, i, r);
574
- return "mfaPendingCredential" in s && b(n, "multi-factor-auth-required", {
593
+ return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
575
594
  _serverResponse: s
576
595
  }), s;
577
596
  }
578
- function yt(n, e, t, i) {
597
+ function St(n, e, t, i) {
579
598
  const r = `${e}${t}?${i}`;
580
- return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
599
+ return n.config.emulator ? Ue(n.config, r) : `${n.config.apiScheme}://${r}`;
581
600
  }
582
- class xn {
601
+ class Gn {
583
602
  constructor(e) {
584
603
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
585
- this.timer = setTimeout(() => i(I(
604
+ this.timer = setTimeout(() => i(y(
586
605
  this.auth,
587
606
  "network-request-failed"
588
607
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
589
- )), Fn.get());
608
+ )), jn.get());
590
609
  });
591
610
  }
592
611
  clearNetworkTimeout() {
593
612
  clearTimeout(this.timer);
594
613
  }
595
614
  }
596
- function te(n, e, t) {
615
+ function ne(n, e, t) {
597
616
  const i = {
598
617
  appName: n.name
599
618
  };
600
619
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
601
- const r = I(n, e, i);
620
+ const r = y(n, e, i);
602
621
  return r.customData._tokenResponse = t, r;
603
622
  }
604
623
  /**
@@ -617,10 +636,10 @@ function te(n, e, t) {
617
636
  * See the License for the specific language governing permissions and
618
637
  * limitations under the License.
619
638
  */
620
- async function Vn(n, e) {
639
+ async function Bn(n, e) {
621
640
  return G(n, "POST", "/v1/accounts:delete", e);
622
641
  }
623
- async function Et(n, e) {
642
+ async function Rt(n, e) {
624
643
  return G(n, "POST", "/v1/accounts:lookup", e);
625
644
  }
626
645
  /**
@@ -639,7 +658,7 @@ async function Et(n, e) {
639
658
  * See the License for the specific language governing permissions and
640
659
  * limitations under the License.
641
660
  */
642
- function z(n) {
661
+ function J(n) {
643
662
  if (n)
644
663
  try {
645
664
  const e = new Date(Number(n));
@@ -648,9 +667,9 @@ function z(n) {
648
667
  } catch {
649
668
  }
650
669
  }
651
- async function $n(n, e = !1) {
652
- const t = j(n), i = await t.getIdToken(e), r = Oe(i);
653
- u(
670
+ async function zn(n, e = !1) {
671
+ const t = j(n), i = await t.getIdToken(e), r = De(i);
672
+ l(
654
673
  r && r.exp && r.auth_time && r.iat,
655
674
  t.auth,
656
675
  "internal-error"
@@ -660,38 +679,38 @@ async function $n(n, e = !1) {
660
679
  return {
661
680
  claims: r,
662
681
  token: i,
663
- authTime: z(Te(r.auth_time)),
664
- issuedAtTime: z(Te(r.iat)),
665
- expirationTime: z(Te(r.exp)),
682
+ authTime: J(we(r.auth_time)),
683
+ issuedAtTime: J(we(r.iat)),
684
+ expirationTime: J(we(r.exp)),
666
685
  signInProvider: o || null,
667
686
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
668
687
  };
669
688
  }
670
- function Te(n) {
689
+ function we(n) {
671
690
  return Number(n) * 1e3;
672
691
  }
673
- function Oe(n) {
692
+ function De(n) {
674
693
  const [e, t, i] = n.split(".");
675
694
  if (e === void 0 || t === void 0 || i === void 0)
676
- return re("JWT malformed, contained fewer than 3 sections"), null;
695
+ return se("JWT malformed, contained fewer than 3 sections"), null;
677
696
  try {
678
- const r = Tn(t);
679
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
697
+ const r = bn(t);
698
+ return r ? JSON.parse(r) : (se("Failed to decode base64 JWT payload"), null);
680
699
  } catch (r) {
681
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
700
+ return se("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
682
701
  }
683
702
  }
684
- function ze(n) {
685
- const e = Oe(n);
686
- return u(
703
+ function Xe(n) {
704
+ const e = De(n);
705
+ return l(
687
706
  e,
688
707
  "internal-error"
689
708
  /* AuthErrorCode.INTERNAL_ERROR */
690
- ), u(
709
+ ), l(
691
710
  typeof e.exp < "u",
692
711
  "internal-error"
693
712
  /* AuthErrorCode.INTERNAL_ERROR */
694
- ), u(
713
+ ), l(
695
714
  typeof e.iat < "u",
696
715
  "internal-error"
697
716
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -713,16 +732,16 @@ function ze(n) {
713
732
  * See the License for the specific language governing permissions and
714
733
  * limitations under the License.
715
734
  */
716
- async function K(n, e, t = !1) {
735
+ async function Y(n, e, t = !1) {
717
736
  if (t)
718
737
  return e;
719
738
  try {
720
739
  return await e;
721
740
  } catch (i) {
722
- throw i instanceof Re && Hn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
741
+ throw i instanceof Ne && qn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
723
742
  }
724
743
  }
725
- function Hn({ code: n }) {
744
+ function qn({ code: n }) {
726
745
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
727
746
  }
728
747
  /**
@@ -741,7 +760,7 @@ function Hn({ code: n }) {
741
760
  * See the License for the specific language governing permissions and
742
761
  * limitations under the License.
743
762
  */
744
- class Wn {
763
+ class Kn {
745
764
  constructor(e) {
746
765
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
747
766
  }
@@ -803,12 +822,12 @@ class Wn {
803
822
  * See the License for the specific language governing permissions and
804
823
  * limitations under the License.
805
824
  */
806
- class ke {
825
+ class Pe {
807
826
  constructor(e, t) {
808
827
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
809
828
  }
810
829
  _initializeTime() {
811
- this.lastSignInTime = z(this.lastLoginAt), this.creationTime = z(this.createdAt);
830
+ this.lastSignInTime = J(this.lastLoginAt), this.creationTime = J(this.createdAt);
812
831
  }
813
832
  _copy(e) {
814
833
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -836,10 +855,10 @@ class ke {
836
855
  * See the License for the specific language governing permissions and
837
856
  * limitations under the License.
838
857
  */
839
- async function le(n) {
858
+ async function ue(n) {
840
859
  var e;
841
- const t = n.auth, i = await n.getIdToken(), r = await K(n, Et(t, { idToken: i }));
842
- u(
860
+ const t = n.auth, i = await n.getIdToken(), r = await Y(n, Rt(t, { idToken: i }));
861
+ l(
843
862
  r == null ? void 0 : r.users.length,
844
863
  t,
845
864
  "internal-error"
@@ -847,7 +866,7 @@ async function le(n) {
847
866
  );
848
867
  const s = r.users[0];
849
868
  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 = {
869
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? At(s.providerUserInfo) : [], c = Yn(n.providerData, o), a = n.isAnonymous, u = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? u : !1, h = {
851
870
  uid: s.localId,
852
871
  displayName: s.displayName || null,
853
872
  photoURL: s.photoUrl || null,
@@ -856,21 +875,21 @@ async function le(n) {
856
875
  phoneNumber: s.phoneNumber || null,
857
876
  tenantId: s.tenantId || null,
858
877
  providerData: c,
859
- metadata: new ke(s.createdAt, s.lastLoginAt),
878
+ metadata: new Pe(s.createdAt, s.lastLoginAt),
860
879
  isAnonymous: d
861
880
  };
862
- Object.assign(n, f);
881
+ Object.assign(n, h);
863
882
  }
864
- async function jn(n) {
883
+ async function Jn(n) {
865
884
  const e = j(n);
866
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
885
+ await ue(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
867
886
  }
868
- function Gn(n, e) {
887
+ function Yn(n, e) {
869
888
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
870
889
  }
871
- function kt(n) {
890
+ function At(n) {
872
891
  return n.map((e) => {
873
- var { providerId: t } = e, i = Pe(e, ["providerId"]);
892
+ var { providerId: t } = e, i = Le(e, ["providerId"]);
874
893
  return {
875
894
  providerId: t,
876
895
  uid: i.rawId || "",
@@ -897,16 +916,16 @@ function kt(n) {
897
916
  * See the License for the specific language governing permissions and
898
917
  * limitations under the License.
899
918
  */
900
- async function Bn(n, e) {
901
- const t = await Tt(n, {}, async () => {
902
- const i = Y({
919
+ async function Xn(n, e) {
920
+ const t = await kt(n, {}, async () => {
921
+ const i = Q({
903
922
  grant_type: "refresh_token",
904
923
  refresh_token: e
905
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = yt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
924
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = St(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
906
925
  return c[
907
926
  "Content-Type"
908
927
  /* HttpHeader.CONTENT_TYPE */
909
- ] = "application/x-www-form-urlencoded", It.fetch()(o, {
928
+ ] = "application/x-www-form-urlencoded", Et.fetch()(o, {
910
929
  method: "POST",
911
930
  headers: c,
912
931
  body: i
@@ -918,8 +937,8 @@ async function Bn(n, e) {
918
937
  refreshToken: t.refresh_token
919
938
  };
920
939
  }
921
- async function qn(n, e) {
922
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
940
+ async function Qn(n, e) {
941
+ return G(n, "POST", "/v2/accounts:revokeToken", pe(n, e));
923
942
  }
924
943
  /**
925
944
  * @license
@@ -945,33 +964,33 @@ class $ {
945
964
  return !this.expirationTime || Date.now() > this.expirationTime - 3e4;
946
965
  }
947
966
  updateFromServerResponse(e) {
948
- u(
967
+ l(
949
968
  e.idToken,
950
969
  "internal-error"
951
970
  /* AuthErrorCode.INTERNAL_ERROR */
952
- ), u(
971
+ ), l(
953
972
  typeof e.idToken < "u",
954
973
  "internal-error"
955
974
  /* AuthErrorCode.INTERNAL_ERROR */
956
- ), u(
975
+ ), l(
957
976
  typeof e.refreshToken < "u",
958
977
  "internal-error"
959
978
  /* AuthErrorCode.INTERNAL_ERROR */
960
979
  );
961
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : ze(e.idToken);
980
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Xe(e.idToken);
962
981
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
963
982
  }
964
983
  updateFromIdToken(e) {
965
- u(
984
+ l(
966
985
  e.length !== 0,
967
986
  "internal-error"
968
987
  /* AuthErrorCode.INTERNAL_ERROR */
969
988
  );
970
- const t = ze(e);
989
+ const t = Xe(e);
971
990
  this.updateTokensAndExpiration(e, null, t);
972
991
  }
973
992
  async getToken(e, t = !1) {
974
- return !t && this.accessToken && !this.isExpired ? this.accessToken : (u(
993
+ return !t && this.accessToken && !this.isExpired ? this.accessToken : (l(
975
994
  this.refreshToken,
976
995
  e,
977
996
  "user-token-expired"
@@ -982,7 +1001,7 @@ class $ {
982
1001
  this.refreshToken = null;
983
1002
  }
984
1003
  async refresh(e, t) {
985
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Bn(e, t);
1004
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await Xn(e, t);
986
1005
  this.updateTokensAndExpiration(i, r, Number(s));
987
1006
  }
988
1007
  updateTokensAndExpiration(e, t, i) {
@@ -990,11 +1009,11 @@ class $ {
990
1009
  }
991
1010
  static fromJSON(e, t) {
992
1011
  const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
993
- return i && (u(typeof i == "string", "internal-error", {
1012
+ return i && (l(typeof i == "string", "internal-error", {
994
1013
  appName: e
995
- }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
1014
+ }), o.refreshToken = i), r && (l(typeof r == "string", "internal-error", {
996
1015
  appName: e
997
- }), o.accessToken = r), s && (u(typeof s == "number", "internal-error", {
1016
+ }), o.accessToken = r), s && (l(typeof s == "number", "internal-error", {
998
1017
  appName: e
999
1018
  }), o.expirationTime = s), o;
1000
1019
  }
@@ -1012,7 +1031,7 @@ class $ {
1012
1031
  return Object.assign(new $(), this.toJSON());
1013
1032
  }
1014
1033
  _performRefresh() {
1015
- return y("not implemented");
1034
+ return k("not implemented");
1016
1035
  }
1017
1036
  }
1018
1037
  /**
@@ -1031,17 +1050,17 @@ class $ {
1031
1050
  * See the License for the specific language governing permissions and
1032
1051
  * limitations under the License.
1033
1052
  */
1034
- function R(n, e) {
1035
- u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1053
+ function P(n, e) {
1054
+ l(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1036
1055
  }
1037
- class E {
1056
+ class b {
1038
1057
  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);
1058
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = Le(e, ["uid", "auth", "stsTokenManager"]);
1059
+ this.providerId = "firebase", this.proactiveRefresh = new Kn(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
1060
  }
1042
1061
  async getIdToken(e) {
1043
- const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1044
- return u(
1062
+ const t = await Y(this, this.stsTokenManager.getToken(this.auth, e));
1063
+ return l(
1045
1064
  t,
1046
1065
  this.auth,
1047
1066
  "internal-error"
@@ -1049,13 +1068,13 @@ class E {
1049
1068
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1050
1069
  }
1051
1070
  getIdTokenResult(e) {
1052
- return $n(this, e);
1071
+ return zn(this, e);
1053
1072
  }
1054
1073
  reload() {
1055
- return jn(this);
1074
+ return Jn(this);
1056
1075
  }
1057
1076
  _assign(e) {
1058
- this !== e && (u(
1077
+ this !== e && (l(
1059
1078
  this.uid === e.uid,
1060
1079
  this.auth,
1061
1080
  "internal-error"
@@ -1063,11 +1082,11 @@ class E {
1063
1082
  ), 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
1083
  }
1065
1084
  _clone(e) {
1066
- const t = new E(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1085
+ const t = new b(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1067
1086
  return t.metadata._copy(this.metadata), t;
1068
1087
  }
1069
1088
  _onReload(e) {
1070
- u(
1089
+ l(
1071
1090
  !this.reloadListener,
1072
1091
  this.auth,
1073
1092
  "internal-error"
@@ -1085,13 +1104,13 @@ class E {
1085
1104
  }
1086
1105
  async _updateTokensIfNecessary(e, t = !1) {
1087
1106
  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);
1107
+ 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
1108
  }
1090
1109
  async delete() {
1091
- if (w(this.auth.app))
1092
- return Promise.reject(L(this.auth));
1110
+ if (E(this.auth.app))
1111
+ return Promise.reject(M(this.auth));
1093
1112
  const e = await this.getIdToken();
1094
- return await K(this, Vn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1113
+ return await Y(this, Bn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1095
1114
  }
1096
1115
  toJSON() {
1097
1116
  return Object.assign(Object.assign({
@@ -1118,46 +1137,46 @@ class E {
1118
1137
  return this.stsTokenManager.refreshToken || "";
1119
1138
  }
1120
1139
  static _fromJSON(e, t) {
1121
- 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;
1123
- u(
1124
- U && xe,
1140
+ var i, r, s, o, c, a, u, d;
1141
+ const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, I = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, x = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, B = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, g = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, T = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: U, emailVerified: He, isAnonymous: We, providerData: Ie, stsTokenManager: je } = t;
1142
+ l(
1143
+ U && je,
1125
1144
  e,
1126
1145
  "internal-error"
1127
1146
  /* AuthErrorCode.INTERNAL_ERROR */
1128
1147
  );
1129
- const Kt = $.fromJSON(this.name, xe);
1130
- u(
1148
+ const Qt = $.fromJSON(this.name, je);
1149
+ l(
1131
1150
  typeof U == "string",
1132
1151
  e,
1133
1152
  "internal-error"
1134
1153
  /* AuthErrorCode.INTERNAL_ERROR */
1135
- ), R(f, e.name), R(_, e.name), u(
1136
- typeof De == "boolean",
1154
+ ), P(h, e.name), P(p, e.name), l(
1155
+ typeof He == "boolean",
1137
1156
  e,
1138
1157
  "internal-error"
1139
1158
  /* AuthErrorCode.INTERNAL_ERROR */
1140
- ), u(
1141
- typeof Fe == "boolean",
1159
+ ), l(
1160
+ typeof We == "boolean",
1142
1161
  e,
1143
1162
  "internal-error"
1144
1163
  /* 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({
1164
+ ), P(I, e.name), P(x, e.name), P(B, e.name), P(m, e.name), P(g, e.name), P(T, e.name);
1165
+ const Te = new b({
1147
1166
  uid: U,
1148
1167
  auth: e,
1149
- email: _,
1150
- emailVerified: De,
1151
- displayName: f,
1152
- isAnonymous: Fe,
1153
- photoURL: M,
1154
- phoneNumber: x,
1155
- tenantId: ee,
1156
- stsTokenManager: Kt,
1157
- createdAt: m,
1158
- lastLoginAt: v
1168
+ email: p,
1169
+ emailVerified: He,
1170
+ displayName: h,
1171
+ isAnonymous: We,
1172
+ photoURL: x,
1173
+ phoneNumber: I,
1174
+ tenantId: B,
1175
+ stsTokenManager: Qt,
1176
+ createdAt: g,
1177
+ lastLoginAt: T
1159
1178
  });
1160
- return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), p && (Ie._redirectEventId = p), Ie;
1179
+ return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Zt) => Object.assign({}, Zt))), m && (Te._redirectEventId = m), Te;
1161
1180
  }
1162
1181
  /**
1163
1182
  * Initialize a User from an idToken server response
@@ -1167,13 +1186,13 @@ class E {
1167
1186
  static async _fromIdTokenResponse(e, t, i = !1) {
1168
1187
  const r = new $();
1169
1188
  r.updateFromServerResponse(t);
1170
- const s = new E({
1189
+ const s = new b({
1171
1190
  uid: t.localId,
1172
1191
  auth: e,
1173
1192
  stsTokenManager: r,
1174
1193
  isAnonymous: i
1175
1194
  });
1176
- return await le(s), s;
1195
+ return await ue(s), s;
1177
1196
  }
1178
1197
  /**
1179
1198
  * Initialize a User from an idToken server response
@@ -1182,19 +1201,19 @@ class E {
1182
1201
  */
1183
1202
  static async _fromGetAccountInfoResponse(e, t, i) {
1184
1203
  const r = t.users[0];
1185
- u(
1204
+ l(
1186
1205
  r.localId !== void 0,
1187
1206
  "internal-error"
1188
1207
  /* AuthErrorCode.INTERNAL_ERROR */
1189
1208
  );
1190
- const s = r.providerUserInfo !== void 0 ? kt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1209
+ const s = r.providerUserInfo !== void 0 ? At(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1191
1210
  c.updateFromIdToken(i);
1192
- const a = new E({
1211
+ const a = new b({
1193
1212
  uid: r.localId,
1194
1213
  auth: e,
1195
1214
  stsTokenManager: c,
1196
1215
  isAnonymous: o
1197
- }), l = {
1216
+ }), u = {
1198
1217
  uid: r.localId,
1199
1218
  displayName: r.displayName || null,
1200
1219
  photoURL: r.photoUrl || null,
@@ -1203,10 +1222,10 @@ class E {
1203
1222
  phoneNumber: r.phoneNumber || null,
1204
1223
  tenantId: r.tenantId || null,
1205
1224
  providerData: s,
1206
- metadata: new ke(r.createdAt, r.lastLoginAt),
1225
+ metadata: new Pe(r.createdAt, r.lastLoginAt),
1207
1226
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1208
1227
  };
1209
- return Object.assign(a, l), a;
1228
+ return Object.assign(a, u), a;
1210
1229
  }
1211
1230
  }
1212
1231
  /**
@@ -1225,11 +1244,11 @@ class E {
1225
1244
  * See the License for the specific language governing permissions and
1226
1245
  * limitations under the License.
1227
1246
  */
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);
1247
+ const Qe = /* @__PURE__ */ new Map();
1248
+ function S(n) {
1249
+ A(n instanceof Function, "Expected a class definition");
1250
+ let e = Qe.get(n);
1251
+ return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Qe.set(n, e), e);
1233
1252
  }
1234
1253
  /**
1235
1254
  * @license
@@ -1247,7 +1266,7 @@ function k(n) {
1247
1266
  * See the License for the specific language governing permissions and
1248
1267
  * limitations under the License.
1249
1268
  */
1250
- class bt {
1269
+ class Pt {
1251
1270
  constructor() {
1252
1271
  this.type = "NONE", this.storage = {};
1253
1272
  }
@@ -1269,8 +1288,8 @@ class bt {
1269
1288
  _removeListener(e, t) {
1270
1289
  }
1271
1290
  }
1272
- bt.type = "NONE";
1273
- const Je = bt;
1291
+ Pt.type = "NONE";
1292
+ const Ze = Pt;
1274
1293
  /**
1275
1294
  * @license
1276
1295
  * Copyright 2019 Google LLC
@@ -1287,21 +1306,21 @@ const Je = bt;
1287
1306
  * See the License for the specific language governing permissions and
1288
1307
  * limitations under the License.
1289
1308
  */
1290
- function se(n, e, t) {
1309
+ function oe(n, e, t) {
1291
1310
  return `firebase:${n}:${e}:${t}`;
1292
1311
  }
1293
1312
  class H {
1294
1313
  constructor(e, t, i) {
1295
1314
  this.persistence = e, this.auth = t, this.userKey = i;
1296
1315
  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);
1316
+ 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
1317
  }
1299
1318
  setCurrentUser(e) {
1300
1319
  return this.persistence._set(this.fullUserKey, e.toJSON());
1301
1320
  }
1302
1321
  async getCurrentUser() {
1303
1322
  const e = await this.persistence._get(this.fullUserKey);
1304
- return e ? E._fromJSON(this.auth, e) : null;
1323
+ return e ? b._fromJSON(this.auth, e) : null;
1305
1324
  }
1306
1325
  removeCurrentUser() {
1307
1326
  return this.persistence._remove(this.fullUserKey);
@@ -1321,29 +1340,29 @@ class H {
1321
1340
  }
1322
1341
  static async create(e, t, i = "authUser") {
1323
1342
  if (!t.length)
1324
- return new H(k(Je), e, i);
1325
- const r = (await Promise.all(t.map(async (l) => {
1326
- if (await l._isAvailable())
1327
- return l;
1328
- }))).filter((l) => l);
1329
- let s = r[0] || k(Je);
1330
- const o = se(i, e.config.apiKey, e.name);
1343
+ return new H(S(Ze), e, i);
1344
+ const r = (await Promise.all(t.map(async (u) => {
1345
+ if (await u._isAvailable())
1346
+ return u;
1347
+ }))).filter((u) => u);
1348
+ let s = r[0] || S(Ze);
1349
+ const o = oe(i, e.config.apiKey, e.name);
1331
1350
  let c = null;
1332
- for (const l of t)
1351
+ for (const u of t)
1333
1352
  try {
1334
- const d = await l._get(o);
1353
+ const d = await u._get(o);
1335
1354
  if (d) {
1336
- const f = E._fromJSON(e, d);
1337
- l !== s && (c = f), s = l;
1355
+ const h = b._fromJSON(e, d);
1356
+ u !== s && (c = h), s = u;
1338
1357
  break;
1339
1358
  }
1340
1359
  } catch {
1341
1360
  }
1342
- const a = r.filter((l) => l._shouldAllowMigration);
1343
- return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1344
- if (l !== s)
1361
+ const a = r.filter((u) => u._shouldAllowMigration);
1362
+ return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (u) => {
1363
+ if (u !== s)
1345
1364
  try {
1346
- await l._remove(o);
1365
+ await u._remove(o);
1347
1366
  } catch {
1348
1367
  }
1349
1368
  })), new H(s, e, i));
@@ -1365,29 +1384,29 @@ class H {
1365
1384
  * See the License for the specific language governing permissions and
1366
1385
  * limitations under the License.
1367
1386
  */
1368
- function Ye(n) {
1387
+ function et(n) {
1369
1388
  const e = n.toLowerCase();
1370
1389
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1371
1390
  return "Opera";
1372
- if (Pt(e))
1391
+ if (Nt(e))
1373
1392
  return "IEMobile";
1374
1393
  if (e.includes("msie") || e.includes("trident/"))
1375
1394
  return "IE";
1376
1395
  if (e.includes("edge/"))
1377
1396
  return "Edge";
1378
- if (St(e))
1397
+ if (Ct(e))
1379
1398
  return "Firefox";
1380
1399
  if (e.includes("silk/"))
1381
1400
  return "Silk";
1382
- if (Ct(e))
1401
+ if (Mt(e))
1383
1402
  return "Blackberry";
1384
- if (Ot(e))
1403
+ if (Ut(e))
1385
1404
  return "Webos";
1386
- if (Ne(e))
1405
+ if (Fe(e))
1387
1406
  return "Safari";
1388
- if ((e.includes("chrome/") || Rt(e)) && !e.includes("edge/"))
1407
+ if ((e.includes("chrome/") || Ot(e)) && !e.includes("edge/"))
1389
1408
  return "Chrome";
1390
- if (At(e))
1409
+ if (Lt(e))
1391
1410
  return "Android";
1392
1411
  {
1393
1412
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1396,42 +1415,42 @@ function Ye(n) {
1396
1415
  }
1397
1416
  return "Other";
1398
1417
  }
1399
- function St(n = g()) {
1418
+ function Ct(n = _()) {
1400
1419
  return /firefox\//i.test(n);
1401
1420
  }
1402
- function Ne(n = g()) {
1421
+ function Fe(n = _()) {
1403
1422
  const e = n.toLowerCase();
1404
1423
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1405
1424
  }
1406
- function Rt(n = g()) {
1425
+ function Ot(n = _()) {
1407
1426
  return /crios\//i.test(n);
1408
1427
  }
1409
- function Pt(n = g()) {
1428
+ function Nt(n = _()) {
1410
1429
  return /iemobile/i.test(n);
1411
1430
  }
1412
- function At(n = g()) {
1431
+ function Lt(n = _()) {
1413
1432
  return /android/i.test(n);
1414
1433
  }
1415
- function Ct(n = g()) {
1434
+ function Mt(n = _()) {
1416
1435
  return /blackberry/i.test(n);
1417
1436
  }
1418
- function Ot(n = g()) {
1437
+ function Ut(n = _()) {
1419
1438
  return /webos/i.test(n);
1420
1439
  }
1421
- function pe(n = g()) {
1440
+ function me(n = _()) {
1422
1441
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1423
1442
  }
1424
- function zn(n = g()) {
1443
+ function Zn(n = _()) {
1425
1444
  var e;
1426
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1445
+ return me(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1427
1446
  }
1428
- function Kn() {
1429
- return wn() && document.documentMode === 10;
1447
+ function ei() {
1448
+ return Sn() && document.documentMode === 10;
1430
1449
  }
1431
- function Nt(n = g()) {
1432
- return pe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
1450
+ function Dt(n = _()) {
1451
+ return me(n) || Lt(n) || Ut(n) || Mt(n) || /windows phone/i.test(n) || Nt(n);
1433
1452
  }
1434
- function Jn() {
1453
+ function ti() {
1435
1454
  try {
1436
1455
  return !!(window && window !== window.top);
1437
1456
  } catch {
@@ -1454,20 +1473,20 @@ function Jn() {
1454
1473
  * See the License for the specific language governing permissions and
1455
1474
  * limitations under the License.
1456
1475
  */
1457
- function Lt(n, e = []) {
1476
+ function Ft(n, e = []) {
1458
1477
  let t;
1459
1478
  switch (n) {
1460
1479
  case "Browser":
1461
- t = Ye(g());
1480
+ t = et(_());
1462
1481
  break;
1463
1482
  case "Worker":
1464
- t = `${Ye(g())}-${n}`;
1483
+ t = `${et(_())}-${n}`;
1465
1484
  break;
1466
1485
  default:
1467
1486
  t = n;
1468
1487
  }
1469
1488
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1470
- return `${t}/JsCore/${J}/${i}`;
1489
+ return `${t}/JsCore/${X}/${i}`;
1471
1490
  }
1472
1491
  /**
1473
1492
  * @license
@@ -1485,7 +1504,7 @@ function Lt(n, e = []) {
1485
1504
  * See the License for the specific language governing permissions and
1486
1505
  * limitations under the License.
1487
1506
  */
1488
- class Yn {
1507
+ class ni {
1489
1508
  constructor(e) {
1490
1509
  this.auth = e, this.queue = [];
1491
1510
  }
@@ -1540,8 +1559,8 @@ class Yn {
1540
1559
  * See the License for the specific language governing permissions and
1541
1560
  * limitations under the License.
1542
1561
  */
1543
- async function Xn(n, e = {}) {
1544
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1562
+ async function ii(n, e = {}) {
1563
+ return G(n, "GET", "/v2/passwordPolicy", pe(n, e));
1545
1564
  }
1546
1565
  /**
1547
1566
  * @license
@@ -1559,12 +1578,12 @@ async function Xn(n, e = {}) {
1559
1578
  * See the License for the specific language governing permissions and
1560
1579
  * limitations under the License.
1561
1580
  */
1562
- const Qn = 6;
1563
- class Zn {
1581
+ const ri = 6;
1582
+ class si {
1564
1583
  constructor(e) {
1565
1584
  var t, i, r, s;
1566
1585
  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;
1586
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ri, 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
1587
  }
1569
1588
  validatePassword(e) {
1570
1589
  var t, i, r, s, o, c;
@@ -1647,12 +1666,12 @@ class Zn {
1647
1666
  * See the License for the specific language governing permissions and
1648
1667
  * limitations under the License.
1649
1668
  */
1650
- class ei {
1669
+ class oi {
1651
1670
  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;
1671
+ 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 tt(this), this.idTokenSubscription = new tt(this), this.beforeStateQueue = new ni(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 = yt, 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
1672
  }
1654
1673
  _initializeWithPersistence(e, t) {
1655
- return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
1674
+ return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
1656
1675
  var i, r;
1657
1676
  if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1658
1677
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
@@ -1685,7 +1704,7 @@ class ei {
1685
1704
  }
1686
1705
  async initializeCurrentUserFromIdToken(e) {
1687
1706
  try {
1688
- const t = await Et(this, { idToken: e }), i = await E._fromGetAccountInfoResponse(this, t, e);
1707
+ const t = await Rt(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1689
1708
  await this.directlySetCurrentUser(i);
1690
1709
  } catch (t) {
1691
1710
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1693,7 +1712,7 @@ class ei {
1693
1712
  }
1694
1713
  async initializeCurrentUser(e) {
1695
1714
  var t;
1696
- if (w(this.app)) {
1715
+ if (E(this.app)) {
1697
1716
  const o = this.app.settings.authIdToken;
1698
1717
  return o ? new Promise((c) => {
1699
1718
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -1717,7 +1736,7 @@ class ei {
1717
1736
  }
1718
1737
  return r ? this.reloadAndSetCurrentUserOrClear(r) : this.directlySetCurrentUser(null);
1719
1738
  }
1720
- return u(
1739
+ return l(
1721
1740
  this._popupRedirectResolver,
1722
1741
  this,
1723
1742
  "argument-error"
@@ -1735,7 +1754,7 @@ class ei {
1735
1754
  }
1736
1755
  async reloadAndSetCurrentUserOrClear(e) {
1737
1756
  try {
1738
- await le(e);
1757
+ await ue(e);
1739
1758
  } catch (t) {
1740
1759
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1741
1760
  return this.directlySetCurrentUser(null);
@@ -1743,16 +1762,16 @@ class ei {
1743
1762
  return this.directlySetCurrentUser(e);
1744
1763
  }
1745
1764
  useDeviceLanguage() {
1746
- this.languageCode = Un();
1765
+ this.languageCode = Hn();
1747
1766
  }
1748
1767
  async _delete() {
1749
1768
  this._deleted = !0;
1750
1769
  }
1751
1770
  async updateCurrentUser(e) {
1752
- if (w(this.app))
1753
- return Promise.reject(L(this));
1771
+ if (E(this.app))
1772
+ return Promise.reject(M(this));
1754
1773
  const t = e ? j(e) : null;
1755
- return t && u(
1774
+ return t && l(
1756
1775
  t.auth.config.apiKey === this.config.apiKey,
1757
1776
  this,
1758
1777
  "invalid-user-token"
@@ -1761,7 +1780,7 @@ class ei {
1761
1780
  }
1762
1781
  async _updateCurrentUser(e, t = !1) {
1763
1782
  if (!this._deleted)
1764
- return e && u(
1783
+ return e && l(
1765
1784
  this.tenantId === e.tenantId,
1766
1785
  this,
1767
1786
  "tenant-id-mismatch"
@@ -1771,15 +1790,15 @@ class ei {
1771
1790
  });
1772
1791
  }
1773
1792
  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(
1793
+ return E(this.app) ? Promise.reject(M(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1775
1794
  null,
1776
1795
  /* skipBeforeStateCallbacks */
1777
1796
  !0
1778
1797
  ));
1779
1798
  }
1780
1799
  setPersistence(e) {
1781
- return w(this.app) ? Promise.reject(L(this)) : this.queue(async () => {
1782
- await this.assertedPersistence.setPersistence(k(e));
1800
+ return E(this.app) ? Promise.reject(M(this)) : this.queue(async () => {
1801
+ await this.assertedPersistence.setPersistence(S(e));
1783
1802
  });
1784
1803
  }
1785
1804
  _getRecaptchaConfig() {
@@ -1794,14 +1813,14 @@ class ei {
1794
1813
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1795
1814
  }
1796
1815
  async _updatePasswordPolicy() {
1797
- const e = await Xn(this), t = new Zn(e);
1816
+ const e = await ii(this), t = new si(e);
1798
1817
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1799
1818
  }
1800
1819
  _getPersistence() {
1801
1820
  return this.assertedPersistence.persistence.type;
1802
1821
  }
1803
1822
  _updateErrorMap(e) {
1804
- this._errorFactory = new Se("auth", "Firebase", e());
1823
+ this._errorFactory = new Oe("auth", "Firebase", e());
1805
1824
  }
1806
1825
  onAuthStateChanged(e, t, i) {
1807
1826
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1834,7 +1853,7 @@ class ei {
1834
1853
  token: e,
1835
1854
  idToken: t
1836
1855
  };
1837
- this.tenantId != null && (i.tenantId = this.tenantId), await qn(this, i);
1856
+ this.tenantId != null && (i.tenantId = this.tenantId), await Qn(this, i);
1838
1857
  }
1839
1858
  }
1840
1859
  toJSON() {
@@ -1852,15 +1871,15 @@ class ei {
1852
1871
  }
1853
1872
  async getOrInitRedirectPersistenceManager(e) {
1854
1873
  if (!this.redirectPersistenceManager) {
1855
- const t = e && k(e) || this._popupRedirectResolver;
1856
- u(
1874
+ const t = e && S(e) || this._popupRedirectResolver;
1875
+ l(
1857
1876
  t,
1858
1877
  this,
1859
1878
  "argument-error"
1860
1879
  /* AuthErrorCode.ARGUMENT_ERROR */
1861
1880
  ), this.redirectPersistenceManager = await H.create(
1862
1881
  this,
1863
- [k(t._redirectPersistence)],
1882
+ [S(t._redirectPersistence)],
1864
1883
  "redirectUser"
1865
1884
  /* KeyName.REDIRECT_USER */
1866
1885
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -1908,7 +1927,7 @@ class ei {
1908
1927
  const s = typeof t == "function" ? t : t.next.bind(t);
1909
1928
  let o = !1;
1910
1929
  const c = this._isInitialized ? Promise.resolve() : this._initializationPromise;
1911
- if (u(
1930
+ if (l(
1912
1931
  c,
1913
1932
  this,
1914
1933
  "internal-error"
@@ -1939,7 +1958,7 @@ class ei {
1939
1958
  return this.operations = this.operations.then(e, e), this.operations;
1940
1959
  }
1941
1960
  get assertedPersistence() {
1942
- return u(
1961
+ return l(
1943
1962
  this.persistenceManager,
1944
1963
  this,
1945
1964
  "internal-error"
@@ -1947,7 +1966,7 @@ class ei {
1947
1966
  ), this.persistenceManager;
1948
1967
  }
1949
1968
  _logFramework(e) {
1950
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Lt(this.config.clientPlatform, this._getFrameworks()));
1969
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Ft(this.config.clientPlatform, this._getFrameworks()));
1951
1970
  }
1952
1971
  _getFrameworks() {
1953
1972
  return this.frameworks;
@@ -1977,18 +1996,18 @@ class ei {
1977
1996
  async _getAppCheckToken() {
1978
1997
  var e;
1979
1998
  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;
1999
+ return t != null && t.error && xn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1981
2000
  }
1982
2001
  }
1983
- function me(n) {
2002
+ function ge(n) {
1984
2003
  return j(n);
1985
2004
  }
1986
- class Xe {
2005
+ class tt {
1987
2006
  constructor(e) {
1988
- this.auth = e, this.observer = null, this.addObserver = gn((t) => this.observer = t);
2007
+ this.auth = e, this.observer = null, this.addObserver = yn((t) => this.observer = t);
1989
2008
  }
1990
2009
  get next() {
1991
- return u(
2010
+ return l(
1992
2011
  this.observer,
1993
2012
  this.auth,
1994
2013
  "internal-error"
@@ -2012,7 +2031,7 @@ class Xe {
2012
2031
  * See the License for the specific language governing permissions and
2013
2032
  * limitations under the License.
2014
2033
  */
2015
- let Le = {
2034
+ let xe = {
2016
2035
  async loadJS() {
2017
2036
  throw new Error("Unable to load external scripts");
2018
2037
  },
@@ -2020,16 +2039,16 @@ let Le = {
2020
2039
  recaptchaEnterpriseScript: "",
2021
2040
  gapiScript: ""
2022
2041
  };
2023
- function ti(n) {
2024
- Le = n;
2042
+ function ai(n) {
2043
+ xe = n;
2025
2044
  }
2026
- function ni(n) {
2027
- return Le.loadJS(n);
2045
+ function ci(n) {
2046
+ return xe.loadJS(n);
2028
2047
  }
2029
- function ii() {
2030
- return Le.gapiScript;
2048
+ function li() {
2049
+ return xe.gapiScript;
2031
2050
  }
2032
- function ri(n) {
2051
+ function ui(n) {
2033
2052
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2034
2053
  }
2035
2054
  /**
@@ -2048,13 +2067,13 @@ function ri(n) {
2048
2067
  * See the License for the specific language governing permissions and
2049
2068
  * limitations under the License.
2050
2069
  */
2051
- function si(n, e) {
2052
- const t = pt(n, "auth");
2070
+ function di(n, e) {
2071
+ const t = vt(n, "auth");
2053
2072
  if (t.isInitialized()) {
2054
2073
  const r = t.getImmediate(), s = t.getOptions();
2055
- if (In(s, e ?? {}))
2074
+ if (kn(s, e ?? {}))
2056
2075
  return r;
2057
- b(
2076
+ R(
2058
2077
  r,
2059
2078
  "already-initialized"
2060
2079
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2062,55 +2081,55 @@ function si(n, e) {
2062
2081
  }
2063
2082
  return t.initialize({ options: e });
2064
2083
  }
2065
- function oi(n, e) {
2066
- const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
2084
+ function hi(n, e) {
2085
+ const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2067
2086
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2068
2087
  }
2069
- function ai(n, e, t) {
2070
- const i = me(n);
2071
- u(
2088
+ function fi(n, e, t) {
2089
+ const i = ge(n);
2090
+ l(
2072
2091
  i._canInitEmulator,
2073
2092
  i,
2074
2093
  "emulator-config-failed"
2075
2094
  /* AuthErrorCode.EMULATOR_CONFIG_FAILED */
2076
- ), u(
2095
+ ), l(
2077
2096
  /^https?:\/\//.test(e),
2078
2097
  i,
2079
2098
  "invalid-emulator-scheme"
2080
2099
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2081
2100
  );
2082
- const r = !1, s = Mt(e), { host: o, port: c } = ci(e), a = c === null ? "" : `:${c}`;
2101
+ const r = !1, s = xt(e), { host: o, port: c } = pi(e), a = c === null ? "" : `:${c}`;
2083
2102
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2084
2103
  host: o,
2085
2104
  port: c,
2086
2105
  protocol: s.replace(":", ""),
2087
2106
  options: Object.freeze({ disableWarnings: r })
2088
- }), li();
2107
+ }), mi();
2089
2108
  }
2090
- function Mt(n) {
2109
+ function xt(n) {
2091
2110
  const e = n.indexOf(":");
2092
2111
  return e < 0 ? "" : n.substr(0, e + 1);
2093
2112
  }
2094
- function ci(n) {
2095
- const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
+ function pi(n) {
2114
+ const e = xt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2096
2115
  if (!t)
2097
2116
  return { host: "", port: null };
2098
2117
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2099
2118
  if (r) {
2100
2119
  const s = r[1];
2101
- return { host: s, port: Qe(i.substr(s.length + 1)) };
2120
+ return { host: s, port: nt(i.substr(s.length + 1)) };
2102
2121
  } else {
2103
2122
  const [s, o] = i.split(":");
2104
- return { host: s, port: Qe(o) };
2123
+ return { host: s, port: nt(o) };
2105
2124
  }
2106
2125
  }
2107
- function Qe(n) {
2126
+ function nt(n) {
2108
2127
  if (!n)
2109
2128
  return null;
2110
2129
  const e = Number(n);
2111
2130
  return isNaN(e) ? null : e;
2112
2131
  }
2113
- function li() {
2132
+ function mi() {
2114
2133
  function n() {
2115
2134
  const e = document.createElement("p"), t = e.style;
2116
2135
  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 +2152,7 @@ function li() {
2133
2152
  * See the License for the specific language governing permissions and
2134
2153
  * limitations under the License.
2135
2154
  */
2136
- class Ut {
2155
+ class Vt {
2137
2156
  /** @internal */
2138
2157
  constructor(e, t) {
2139
2158
  this.providerId = e, this.signInMethod = t;
@@ -2144,19 +2163,19 @@ class Ut {
2144
2163
  * @returns a JSON-serializable representation of this object.
2145
2164
  */
2146
2165
  toJSON() {
2147
- return y("not implemented");
2166
+ return k("not implemented");
2148
2167
  }
2149
2168
  /** @internal */
2150
2169
  _getIdTokenResponse(e) {
2151
- return y("not implemented");
2170
+ return k("not implemented");
2152
2171
  }
2153
2172
  /** @internal */
2154
2173
  _linkToIdToken(e, t) {
2155
- return y("not implemented");
2174
+ return k("not implemented");
2156
2175
  }
2157
2176
  /** @internal */
2158
2177
  _getReauthenticationResolver(e) {
2159
- return y("not implemented");
2178
+ return k("not implemented");
2160
2179
  }
2161
2180
  }
2162
2181
  /**
@@ -2176,7 +2195,7 @@ class Ut {
2176
2195
  * limitations under the License.
2177
2196
  */
2178
2197
  async function W(n, e) {
2179
- return wt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2198
+ return bt(n, "POST", "/v1/accounts:signInWithIdp", pe(n, e));
2180
2199
  }
2181
2200
  /**
2182
2201
  * @license
@@ -2194,15 +2213,15 @@ async function W(n, e) {
2194
2213
  * See the License for the specific language governing permissions and
2195
2214
  * limitations under the License.
2196
2215
  */
2197
- const ui = "http://localhost";
2198
- class D extends Ut {
2216
+ const gi = "http://localhost";
2217
+ class D extends Vt {
2199
2218
  constructor() {
2200
2219
  super(...arguments), this.pendingToken = null;
2201
2220
  }
2202
2221
  /** @internal */
2203
2222
  static _fromParams(e) {
2204
2223
  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(
2224
+ 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
2225
  "argument-error"
2207
2226
  /* AuthErrorCode.ARGUMENT_ERROR */
2208
2227
  ), t;
@@ -2229,7 +2248,7 @@ class D extends Ut {
2229
2248
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2230
2249
  */
2231
2250
  static fromJSON(e) {
2232
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Pe(t, ["providerId", "signInMethod"]);
2251
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Le(t, ["providerId", "signInMethod"]);
2233
2252
  if (!i || !r)
2234
2253
  return null;
2235
2254
  const o = new D(i, r);
@@ -2252,14 +2271,14 @@ class D extends Ut {
2252
2271
  }
2253
2272
  buildRequest() {
2254
2273
  const e = {
2255
- requestUri: ui,
2274
+ requestUri: gi,
2256
2275
  returnSecureToken: !0
2257
2276
  };
2258
2277
  if (this.pendingToken)
2259
2278
  e.pendingToken = this.pendingToken;
2260
2279
  else {
2261
2280
  const t = {};
2262
- this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Y(t);
2281
+ this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Q(t);
2263
2282
  }
2264
2283
  return e;
2265
2284
  }
@@ -2280,7 +2299,7 @@ class D extends Ut {
2280
2299
  * See the License for the specific language governing permissions and
2281
2300
  * limitations under the License.
2282
2301
  */
2283
- class Dt {
2302
+ class $t {
2284
2303
  /**
2285
2304
  * Constructor for generic OAuth providers.
2286
2305
  *
@@ -2333,7 +2352,7 @@ class Dt {
2333
2352
  * See the License for the specific language governing permissions and
2334
2353
  * limitations under the License.
2335
2354
  */
2336
- class Q extends Dt {
2355
+ class ee extends $t {
2337
2356
  constructor() {
2338
2357
  super(...arguments), this.scopes = [];
2339
2358
  }
@@ -2368,7 +2387,7 @@ class Q extends Dt {
2368
2387
  * See the License for the specific language governing permissions and
2369
2388
  * limitations under the License.
2370
2389
  */
2371
- class A extends Q {
2390
+ class C extends ee {
2372
2391
  constructor() {
2373
2392
  super(
2374
2393
  "facebook.com"
@@ -2389,8 +2408,8 @@ class A extends Q {
2389
2408
  */
2390
2409
  static credential(e) {
2391
2410
  return D._fromParams({
2392
- providerId: A.PROVIDER_ID,
2393
- signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
2411
+ providerId: C.PROVIDER_ID,
2412
+ signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
2394
2413
  accessToken: e
2395
2414
  });
2396
2415
  }
@@ -2400,7 +2419,7 @@ class A extends Q {
2400
2419
  * @param userCredential - The user credential.
2401
2420
  */
2402
2421
  static credentialFromResult(e) {
2403
- return A.credentialFromTaggedObject(e);
2422
+ return C.credentialFromTaggedObject(e);
2404
2423
  }
2405
2424
  /**
2406
2425
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2409,20 +2428,20 @@ class A extends Q {
2409
2428
  * @param userCredential - The user credential.
2410
2429
  */
2411
2430
  static credentialFromError(e) {
2412
- return A.credentialFromTaggedObject(e.customData || {});
2431
+ return C.credentialFromTaggedObject(e.customData || {});
2413
2432
  }
2414
2433
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2415
2434
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2416
2435
  return null;
2417
2436
  try {
2418
- return A.credential(e.oauthAccessToken);
2437
+ return C.credential(e.oauthAccessToken);
2419
2438
  } catch {
2420
2439
  return null;
2421
2440
  }
2422
2441
  }
2423
2442
  }
2424
- A.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2425
- A.PROVIDER_ID = "facebook.com";
2443
+ C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2444
+ C.PROVIDER_ID = "facebook.com";
2426
2445
  /**
2427
2446
  * @license
2428
2447
  * Copyright 2020 Google LLC
@@ -2439,7 +2458,7 @@ A.PROVIDER_ID = "facebook.com";
2439
2458
  * See the License for the specific language governing permissions and
2440
2459
  * limitations under the License.
2441
2460
  */
2442
- class C extends Q {
2461
+ class O extends ee {
2443
2462
  constructor() {
2444
2463
  super(
2445
2464
  "google.com"
@@ -2461,8 +2480,8 @@ class C extends Q {
2461
2480
  */
2462
2481
  static credential(e, t) {
2463
2482
  return D._fromParams({
2464
- providerId: C.PROVIDER_ID,
2465
- signInMethod: C.GOOGLE_SIGN_IN_METHOD,
2483
+ providerId: O.PROVIDER_ID,
2484
+ signInMethod: O.GOOGLE_SIGN_IN_METHOD,
2466
2485
  idToken: e,
2467
2486
  accessToken: t
2468
2487
  });
@@ -2473,7 +2492,7 @@ class C extends Q {
2473
2492
  * @param userCredential - The user credential.
2474
2493
  */
2475
2494
  static credentialFromResult(e) {
2476
- return C.credentialFromTaggedObject(e);
2495
+ return O.credentialFromTaggedObject(e);
2477
2496
  }
2478
2497
  /**
2479
2498
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2482,7 +2501,7 @@ class C extends Q {
2482
2501
  * @param userCredential - The user credential.
2483
2502
  */
2484
2503
  static credentialFromError(e) {
2485
- return C.credentialFromTaggedObject(e.customData || {});
2504
+ return O.credentialFromTaggedObject(e.customData || {});
2486
2505
  }
2487
2506
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2488
2507
  if (!e)
@@ -2491,14 +2510,14 @@ class C extends Q {
2491
2510
  if (!t && !i)
2492
2511
  return null;
2493
2512
  try {
2494
- return C.credential(t, i);
2513
+ return O.credential(t, i);
2495
2514
  } catch {
2496
2515
  return null;
2497
2516
  }
2498
2517
  }
2499
2518
  }
2500
- C.GOOGLE_SIGN_IN_METHOD = "google.com";
2501
- C.PROVIDER_ID = "google.com";
2519
+ O.GOOGLE_SIGN_IN_METHOD = "google.com";
2520
+ O.PROVIDER_ID = "google.com";
2502
2521
  /**
2503
2522
  * @license
2504
2523
  * Copyright 2020 Google LLC
@@ -2515,7 +2534,7 @@ C.PROVIDER_ID = "google.com";
2515
2534
  * See the License for the specific language governing permissions and
2516
2535
  * limitations under the License.
2517
2536
  */
2518
- class O extends Q {
2537
+ class N extends ee {
2519
2538
  constructor() {
2520
2539
  super(
2521
2540
  "github.com"
@@ -2529,8 +2548,8 @@ class O extends Q {
2529
2548
  */
2530
2549
  static credential(e) {
2531
2550
  return D._fromParams({
2532
- providerId: O.PROVIDER_ID,
2533
- signInMethod: O.GITHUB_SIGN_IN_METHOD,
2551
+ providerId: N.PROVIDER_ID,
2552
+ signInMethod: N.GITHUB_SIGN_IN_METHOD,
2534
2553
  accessToken: e
2535
2554
  });
2536
2555
  }
@@ -2540,7 +2559,7 @@ class O extends Q {
2540
2559
  * @param userCredential - The user credential.
2541
2560
  */
2542
2561
  static credentialFromResult(e) {
2543
- return O.credentialFromTaggedObject(e);
2562
+ return N.credentialFromTaggedObject(e);
2544
2563
  }
2545
2564
  /**
2546
2565
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2549,20 +2568,20 @@ class O extends Q {
2549
2568
  * @param userCredential - The user credential.
2550
2569
  */
2551
2570
  static credentialFromError(e) {
2552
- return O.credentialFromTaggedObject(e.customData || {});
2571
+ return N.credentialFromTaggedObject(e.customData || {});
2553
2572
  }
2554
2573
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2555
2574
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2556
2575
  return null;
2557
2576
  try {
2558
- return O.credential(e.oauthAccessToken);
2577
+ return N.credential(e.oauthAccessToken);
2559
2578
  } catch {
2560
2579
  return null;
2561
2580
  }
2562
2581
  }
2563
2582
  }
2564
- O.GITHUB_SIGN_IN_METHOD = "github.com";
2565
- O.PROVIDER_ID = "github.com";
2583
+ N.GITHUB_SIGN_IN_METHOD = "github.com";
2584
+ N.PROVIDER_ID = "github.com";
2566
2585
  /**
2567
2586
  * @license
2568
2587
  * Copyright 2020 Google LLC
@@ -2579,7 +2598,7 @@ O.PROVIDER_ID = "github.com";
2579
2598
  * See the License for the specific language governing permissions and
2580
2599
  * limitations under the License.
2581
2600
  */
2582
- class N extends Q {
2601
+ class L extends ee {
2583
2602
  constructor() {
2584
2603
  super(
2585
2604
  "twitter.com"
@@ -2594,8 +2613,8 @@ class N extends Q {
2594
2613
  */
2595
2614
  static credential(e, t) {
2596
2615
  return D._fromParams({
2597
- providerId: N.PROVIDER_ID,
2598
- signInMethod: N.TWITTER_SIGN_IN_METHOD,
2616
+ providerId: L.PROVIDER_ID,
2617
+ signInMethod: L.TWITTER_SIGN_IN_METHOD,
2599
2618
  oauthToken: e,
2600
2619
  oauthTokenSecret: t
2601
2620
  });
@@ -2606,7 +2625,7 @@ class N extends Q {
2606
2625
  * @param userCredential - The user credential.
2607
2626
  */
2608
2627
  static credentialFromResult(e) {
2609
- return N.credentialFromTaggedObject(e);
2628
+ return L.credentialFromTaggedObject(e);
2610
2629
  }
2611
2630
  /**
2612
2631
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2615,7 +2634,7 @@ class N extends Q {
2615
2634
  * @param userCredential - The user credential.
2616
2635
  */
2617
2636
  static credentialFromError(e) {
2618
- return N.credentialFromTaggedObject(e.customData || {});
2637
+ return L.credentialFromTaggedObject(e.customData || {});
2619
2638
  }
2620
2639
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2621
2640
  if (!e)
@@ -2624,14 +2643,14 @@ class N extends Q {
2624
2643
  if (!t || !i)
2625
2644
  return null;
2626
2645
  try {
2627
- return N.credential(t, i);
2646
+ return L.credential(t, i);
2628
2647
  } catch {
2629
2648
  return null;
2630
2649
  }
2631
2650
  }
2632
2651
  }
2633
- N.TWITTER_SIGN_IN_METHOD = "twitter.com";
2634
- N.PROVIDER_ID = "twitter.com";
2652
+ L.TWITTER_SIGN_IN_METHOD = "twitter.com";
2653
+ L.PROVIDER_ID = "twitter.com";
2635
2654
  /**
2636
2655
  * @license
2637
2656
  * Copyright 2020 Google LLC
@@ -2653,7 +2672,7 @@ class F {
2653
2672
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2654
2673
  }
2655
2674
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2656
- const s = await E._fromIdTokenResponse(e, i, r), o = Ze(i);
2675
+ const s = await b._fromIdTokenResponse(e, i, r), o = it(i);
2657
2676
  return new F({
2658
2677
  user: s,
2659
2678
  providerId: o,
@@ -2667,7 +2686,7 @@ class F {
2667
2686
  /* reload */
2668
2687
  !0
2669
2688
  );
2670
- const r = Ze(i);
2689
+ const r = it(i);
2671
2690
  return new F({
2672
2691
  user: e,
2673
2692
  providerId: r,
@@ -2676,7 +2695,7 @@ class F {
2676
2695
  });
2677
2696
  }
2678
2697
  }
2679
- function Ze(n) {
2698
+ function it(n) {
2680
2699
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2681
2700
  }
2682
2701
  /**
@@ -2695,10 +2714,10 @@ function Ze(n) {
2695
2714
  * See the License for the specific language governing permissions and
2696
2715
  * limitations under the License.
2697
2716
  */
2698
- class ue extends Re {
2717
+ class de extends Ne {
2699
2718
  constructor(e, t, i, r) {
2700
2719
  var s;
2701
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2720
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, de.prototype), this.customData = {
2702
2721
  appName: e.name,
2703
2722
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2704
2723
  _serverResponse: t.customData._serverResponse,
@@ -2706,16 +2725,16 @@ class ue extends Re {
2706
2725
  };
2707
2726
  }
2708
2727
  static _fromErrorAndOperation(e, t, i, r) {
2709
- return new ue(e, t, i, r);
2728
+ return new de(e, t, i, r);
2710
2729
  }
2711
2730
  }
2712
- function Ft(n, e, t, i) {
2731
+ function Ht(n, e, t, i) {
2713
2732
  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;
2733
+ throw s.code === "auth/multi-factor-auth-required" ? de._fromErrorAndOperation(n, s, e, i) : s;
2715
2734
  });
2716
2735
  }
2717
- async function di(n, e, t = !1) {
2718
- const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
+ async function _i(n, e, t = !1) {
2737
+ const i = await Y(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2719
2738
  return F._forOperation(n, "link", i);
2720
2739
  }
2721
2740
  /**
@@ -2734,35 +2753,35 @@ async function di(n, e, t = !1) {
2734
2753
  * See the License for the specific language governing permissions and
2735
2754
  * limitations under the License.
2736
2755
  */
2737
- async function hi(n, e, t = !1) {
2756
+ async function vi(n, e, t = !1) {
2738
2757
  const { auth: i } = n;
2739
- if (w(i.app))
2740
- return Promise.reject(L(i));
2758
+ if (E(i.app))
2759
+ return Promise.reject(M(i));
2741
2760
  const r = "reauthenticate";
2742
2761
  try {
2743
- const s = await K(n, Ft(i, r, e, n), t);
2744
- u(
2762
+ const s = await Y(n, Ht(i, r, e, n), t);
2763
+ l(
2745
2764
  s.idToken,
2746
2765
  i,
2747
2766
  "internal-error"
2748
2767
  /* AuthErrorCode.INTERNAL_ERROR */
2749
2768
  );
2750
- const o = Oe(s.idToken);
2751
- u(
2769
+ const o = De(s.idToken);
2770
+ l(
2752
2771
  o,
2753
2772
  i,
2754
2773
  "internal-error"
2755
2774
  /* AuthErrorCode.INTERNAL_ERROR */
2756
2775
  );
2757
2776
  const { sub: c } = o;
2758
- return u(
2777
+ return l(
2759
2778
  n.uid === c,
2760
2779
  i,
2761
2780
  "user-mismatch"
2762
2781
  /* AuthErrorCode.USER_MISMATCH */
2763
2782
  ), F._forOperation(n, r, s);
2764
2783
  } catch (s) {
2765
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && b(
2784
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
2766
2785
  i,
2767
2786
  "user-mismatch"
2768
2787
  /* AuthErrorCode.USER_MISMATCH */
@@ -2785,10 +2804,10 @@ async function hi(n, e, t = !1) {
2785
2804
  * See the License for the specific language governing permissions and
2786
2805
  * limitations under the License.
2787
2806
  */
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);
2807
+ async function Ii(n, e, t = !1) {
2808
+ if (E(n.app))
2809
+ return Promise.reject(M(n));
2810
+ const i = "signIn", r = await Ht(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2792
2811
  return t || await n._updateCurrentUser(s.user), s;
2793
2812
  }
2794
2813
  /**
@@ -2807,8 +2826,8 @@ async function fi(n, e, t = !1) {
2807
2826
  * See the License for the specific language governing permissions and
2808
2827
  * limitations under the License.
2809
2828
  */
2810
- async function pi(n, e) {
2811
- return wt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2829
+ async function Ti(n, e) {
2830
+ return bt(n, "POST", "/v1/accounts:signInWithCustomToken", pe(n, e));
2812
2831
  }
2813
2832
  /**
2814
2833
  * @license
@@ -2826,22 +2845,22 @@ async function pi(n, e) {
2826
2845
  * See the License for the specific language governing permissions and
2827
2846
  * limitations under the License.
2828
2847
  */
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, {
2848
+ async function yi(n, e) {
2849
+ if (E(n.app))
2850
+ return Promise.reject(M(n));
2851
+ const t = ge(n), i = await Ti(t, {
2833
2852
  token: e,
2834
2853
  returnSecureToken: !0
2835
2854
  }), r = await F._fromIdTokenResponse(t, "signIn", i);
2836
2855
  return await t._updateCurrentUser(r.user), r;
2837
2856
  }
2838
- function gi(n, e, t, i) {
2857
+ function wi(n, e, t, i) {
2839
2858
  return j(n).onIdTokenChanged(e, t, i);
2840
2859
  }
2841
- function _i(n, e, t) {
2860
+ function Ei(n, e, t) {
2842
2861
  return j(n).beforeAuthStateChanged(e, t);
2843
2862
  }
2844
- const de = "__sak";
2863
+ const he = "__sak";
2845
2864
  /**
2846
2865
  * @license
2847
2866
  * Copyright 2019 Google LLC
@@ -2858,13 +2877,13 @@ const de = "__sak";
2858
2877
  * See the License for the specific language governing permissions and
2859
2878
  * limitations under the License.
2860
2879
  */
2861
- class xt {
2880
+ class Wt {
2862
2881
  constructor(e, t) {
2863
2882
  this.storageRetriever = e, this.type = t;
2864
2883
  }
2865
2884
  _isAvailable() {
2866
2885
  try {
2867
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
2886
+ return this.storage ? (this.storage.setItem(he, "1"), this.storage.removeItem(he), Promise.resolve(!0)) : Promise.resolve(!1);
2868
2887
  } catch {
2869
2888
  return Promise.resolve(!1);
2870
2889
  }
@@ -2899,18 +2918,18 @@ class xt {
2899
2918
  * See the License for the specific language governing permissions and
2900
2919
  * limitations under the License.
2901
2920
  */
2902
- function vi() {
2903
- const n = g();
2904
- return Ne(n) || pe(n);
2921
+ function ki() {
2922
+ const n = _();
2923
+ return Fe(n) || me(n);
2905
2924
  }
2906
- const Ii = 1e3, Ti = 10;
2907
- class Vt extends xt {
2925
+ const bi = 1e3, Si = 10;
2926
+ class jt extends Wt {
2908
2927
  constructor() {
2909
2928
  super(
2910
2929
  () => window.localStorage,
2911
2930
  "LOCAL"
2912
2931
  /* 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;
2932
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = ki() && ti(), this.fallbackToPolling = Dt(), this._shouldAllowMigration = !0;
2914
2933
  }
2915
2934
  forAllChangedKeys(e) {
2916
2935
  for (const t of Object.keys(this.listeners)) {
@@ -2937,7 +2956,7 @@ class Vt extends xt {
2937
2956
  const o = this.storage.getItem(i);
2938
2957
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2939
2958
  }, s = this.storage.getItem(i);
2940
- Kn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ti) : r();
2959
+ ei() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Si) : r();
2941
2960
  }
2942
2961
  notifyListeners(e, t) {
2943
2962
  this.localCache[e] = t;
@@ -2959,7 +2978,7 @@ class Vt extends xt {
2959
2978
  !0
2960
2979
  );
2961
2980
  });
2962
- }, Ii);
2981
+ }, bi);
2963
2982
  }
2964
2983
  stopPolling() {
2965
2984
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -2988,8 +3007,8 @@ class Vt extends xt {
2988
3007
  await super._remove(e), delete this.localCache[e];
2989
3008
  }
2990
3009
  }
2991
- Vt.type = "LOCAL";
2992
- const wi = Vt;
3010
+ jt.type = "LOCAL";
3011
+ const Ri = jt;
2993
3012
  /**
2994
3013
  * @license
2995
3014
  * Copyright 2020 Google LLC
@@ -3006,7 +3025,7 @@ const wi = Vt;
3006
3025
  * See the License for the specific language governing permissions and
3007
3026
  * limitations under the License.
3008
3027
  */
3009
- class $t extends xt {
3028
+ class Gt extends Wt {
3010
3029
  constructor() {
3011
3030
  super(
3012
3031
  () => window.sessionStorage,
@@ -3019,8 +3038,8 @@ class $t extends xt {
3019
3038
  _removeListener(e, t) {
3020
3039
  }
3021
3040
  }
3022
- $t.type = "SESSION";
3023
- const Ht = $t;
3041
+ Gt.type = "SESSION";
3042
+ const Bt = Gt;
3024
3043
  /**
3025
3044
  * @license
3026
3045
  * Copyright 2019 Google LLC
@@ -3037,7 +3056,7 @@ const Ht = $t;
3037
3056
  * See the License for the specific language governing permissions and
3038
3057
  * limitations under the License.
3039
3058
  */
3040
- function yi(n) {
3059
+ function Ai(n) {
3041
3060
  return Promise.all(n.map(async (e) => {
3042
3061
  try {
3043
3062
  return {
@@ -3068,7 +3087,7 @@ function yi(n) {
3068
3087
  * See the License for the specific language governing permissions and
3069
3088
  * limitations under the License.
3070
3089
  */
3071
- class ge {
3090
+ class _e {
3072
3091
  constructor(e) {
3073
3092
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3074
3093
  }
@@ -3082,7 +3101,7 @@ class ge {
3082
3101
  const t = this.receivers.find((r) => r.isListeningto(e));
3083
3102
  if (t)
3084
3103
  return t;
3085
- const i = new ge(e);
3104
+ const i = new _e(e);
3086
3105
  return this.receivers.push(i), i;
3087
3106
  }
3088
3107
  isListeningto(e) {
@@ -3107,7 +3126,7 @@ class ge {
3107
3126
  eventId: i,
3108
3127
  eventType: r
3109
3128
  });
3110
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await yi(c);
3129
+ const c = Array.from(o).map(async (u) => u(t.origin, s)), a = await Ai(c);
3111
3130
  t.ports[0].postMessage({
3112
3131
  status: "done",
3113
3132
  eventId: i,
@@ -3136,7 +3155,7 @@ class ge {
3136
3155
  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
3156
  }
3138
3157
  }
3139
- ge.receivers = [];
3158
+ _e.receivers = [];
3140
3159
  /**
3141
3160
  * @license
3142
3161
  * Copyright 2020 Google LLC
@@ -3153,7 +3172,7 @@ ge.receivers = [];
3153
3172
  * See the License for the specific language governing permissions and
3154
3173
  * limitations under the License.
3155
3174
  */
3156
- function Me(n = "", e = 10) {
3175
+ function Ve(n = "", e = 10) {
3157
3176
  let t = "";
3158
3177
  for (let i = 0; i < e; i++)
3159
3178
  t += Math.floor(Math.random() * 10);
@@ -3175,7 +3194,7 @@ function Me(n = "", e = 10) {
3175
3194
  * See the License for the specific language governing permissions and
3176
3195
  * limitations under the License.
3177
3196
  */
3178
- class Ei {
3197
+ class Pi {
3179
3198
  constructor(e) {
3180
3199
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3181
3200
  }
@@ -3209,7 +3228,7 @@ class Ei {
3209
3228
  );
3210
3229
  let s, o;
3211
3230
  return new Promise((c, a) => {
3212
- const l = Me("", 20);
3231
+ const u = Ve("", 20);
3213
3232
  r.port1.start();
3214
3233
  const d = setTimeout(() => {
3215
3234
  a(new Error(
@@ -3219,10 +3238,10 @@ class Ei {
3219
3238
  }, i);
3220
3239
  o = {
3221
3240
  messageChannel: r,
3222
- onMessage(f) {
3223
- const _ = f;
3224
- if (_.data.eventId === l)
3225
- switch (_.data.status) {
3241
+ onMessage(h) {
3242
+ const p = h;
3243
+ if (p.data.eventId === u)
3244
+ switch (p.data.status) {
3226
3245
  case "ack":
3227
3246
  clearTimeout(d), s = setTimeout(
3228
3247
  () => {
@@ -3236,7 +3255,7 @@ class Ei {
3236
3255
  );
3237
3256
  break;
3238
3257
  case "done":
3239
- clearTimeout(s), c(_.data.response);
3258
+ clearTimeout(s), c(p.data.response);
3240
3259
  break;
3241
3260
  default:
3242
3261
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -3248,7 +3267,7 @@ class Ei {
3248
3267
  }
3249
3268
  }, this.handlers.add(o), r.port1.addEventListener("message", o.onMessage), this.target.postMessage({
3250
3269
  eventType: e,
3251
- eventId: l,
3270
+ eventId: u,
3252
3271
  data: t
3253
3272
  }, [r.port2]);
3254
3273
  }).finally(() => {
@@ -3272,11 +3291,11 @@ class Ei {
3272
3291
  * See the License for the specific language governing permissions and
3273
3292
  * limitations under the License.
3274
3293
  */
3275
- function T() {
3294
+ function w() {
3276
3295
  return window;
3277
3296
  }
3278
- function ki(n) {
3279
- T().location.href = n;
3297
+ function Ci(n) {
3298
+ w().location.href = n;
3280
3299
  }
3281
3300
  /**
3282
3301
  * @license
@@ -3294,10 +3313,10 @@ function ki(n) {
3294
3313
  * See the License for the specific language governing permissions and
3295
3314
  * limitations under the License.
3296
3315
  */
3297
- function Wt() {
3298
- return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
3316
+ function zt() {
3317
+ return typeof w().WorkerGlobalScope < "u" && typeof w().importScripts == "function";
3299
3318
  }
3300
- async function bi() {
3319
+ async function Oi() {
3301
3320
  if (!(navigator != null && navigator.serviceWorker))
3302
3321
  return null;
3303
3322
  try {
@@ -3306,12 +3325,12 @@ async function bi() {
3306
3325
  return null;
3307
3326
  }
3308
3327
  }
3309
- function Si() {
3328
+ function Ni() {
3310
3329
  var n;
3311
3330
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3312
3331
  }
3313
- function Ri() {
3314
- return Wt() ? self : null;
3332
+ function Li() {
3333
+ return zt() ? self : null;
3315
3334
  }
3316
3335
  /**
3317
3336
  * @license
@@ -3329,8 +3348,8 @@ function Ri() {
3329
3348
  * See the License for the specific language governing permissions and
3330
3349
  * limitations under the License.
3331
3350
  */
3332
- const jt = "firebaseLocalStorageDb", Pi = 1, he = "firebaseLocalStorage", Gt = "fbase_key";
3333
- class Z {
3351
+ const qt = "firebaseLocalStorageDb", Mi = 1, fe = "firebaseLocalStorage", Kt = "fbase_key";
3352
+ class te {
3334
3353
  constructor(e) {
3335
3354
  this.request = e;
3336
3355
  }
@@ -3344,55 +3363,55 @@ class Z {
3344
3363
  });
3345
3364
  }
3346
3365
  }
3347
- function _e(n, e) {
3348
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3366
+ function ve(n, e) {
3367
+ return n.transaction([fe], e ? "readwrite" : "readonly").objectStore(fe);
3349
3368
  }
3350
- function Ai() {
3351
- const n = indexedDB.deleteDatabase(jt);
3352
- return new Z(n).toPromise();
3369
+ function Ui() {
3370
+ const n = indexedDB.deleteDatabase(qt);
3371
+ return new te(n).toPromise();
3353
3372
  }
3354
- function be() {
3355
- const n = indexedDB.open(jt, Pi);
3373
+ function Ce() {
3374
+ const n = indexedDB.open(qt, Mi);
3356
3375
  return new Promise((e, t) => {
3357
3376
  n.addEventListener("error", () => {
3358
3377
  t(n.error);
3359
3378
  }), n.addEventListener("upgradeneeded", () => {
3360
3379
  const i = n.result;
3361
3380
  try {
3362
- i.createObjectStore(he, { keyPath: Gt });
3381
+ i.createObjectStore(fe, { keyPath: Kt });
3363
3382
  } catch (r) {
3364
3383
  t(r);
3365
3384
  }
3366
3385
  }), n.addEventListener("success", async () => {
3367
3386
  const i = n.result;
3368
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Ai(), e(await be()));
3387
+ i.objectStoreNames.contains(fe) ? e(i) : (i.close(), await Ui(), e(await Ce()));
3369
3388
  });
3370
3389
  });
3371
3390
  }
3372
- async function et(n, e, t) {
3373
- const i = _e(n, !0).put({
3374
- [Gt]: e,
3391
+ async function rt(n, e, t) {
3392
+ const i = ve(n, !0).put({
3393
+ [Kt]: e,
3375
3394
  value: t
3376
3395
  });
3377
- return new Z(i).toPromise();
3396
+ return new te(i).toPromise();
3378
3397
  }
3379
- async function Ci(n, e) {
3380
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3398
+ async function Di(n, e) {
3399
+ const t = ve(n, !1).get(e), i = await new te(t).toPromise();
3381
3400
  return i === void 0 ? null : i.value;
3382
3401
  }
3383
- function tt(n, e) {
3384
- const t = _e(n, !0).delete(e);
3385
- return new Z(t).toPromise();
3402
+ function st(n, e) {
3403
+ const t = ve(n, !0).delete(e);
3404
+ return new te(t).toPromise();
3386
3405
  }
3387
- const Oi = 800, Ni = 3;
3388
- class Bt {
3406
+ const Fi = 800, xi = 3;
3407
+ class Jt {
3389
3408
  constructor() {
3390
3409
  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
3410
  }, () => {
3392
3411
  });
3393
3412
  }
3394
3413
  async _openDb() {
3395
- return this.db ? this.db : (this.db = await be(), this.db);
3414
+ return this.db ? this.db : (this.db = await Ce(), this.db);
3396
3415
  }
3397
3416
  async _withRetries(e) {
3398
3417
  let t = 0;
@@ -3401,7 +3420,7 @@ class Bt {
3401
3420
  const i = await this._openDb();
3402
3421
  return await e(i);
3403
3422
  } catch (i) {
3404
- if (t++ > Ni)
3423
+ if (t++ > xi)
3405
3424
  throw i;
3406
3425
  this.db && (this.db.close(), this.db = void 0);
3407
3426
  }
@@ -3411,13 +3430,13 @@ class Bt {
3411
3430
  * postMessage interface to send these events to the worker ourselves.
3412
3431
  */
3413
3432
  async initializeServiceWorkerMessaging() {
3414
- return Wt() ? this.initializeReceiver() : this.initializeSender();
3433
+ return zt() ? this.initializeReceiver() : this.initializeSender();
3415
3434
  }
3416
3435
  /**
3417
3436
  * As the worker we should listen to events from the main window.
3418
3437
  */
3419
3438
  async initializeReceiver() {
3420
- this.receiver = ge._getInstance(Ri()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3439
+ this.receiver = _e._getInstance(Li()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3421
3440
  keyProcessed: (await this._poll()).includes(t.key)
3422
3441
  })), this.receiver._subscribe("ping", async (e, t) => [
3423
3442
  "keyChanged"
@@ -3433,9 +3452,9 @@ class Bt {
3433
3452
  */
3434
3453
  async initializeSender() {
3435
3454
  var e, t;
3436
- if (this.activeServiceWorker = await bi(), !this.activeServiceWorker)
3455
+ if (this.activeServiceWorker = await Oi(), !this.activeServiceWorker)
3437
3456
  return;
3438
- this.sender = new Ei(this.activeServiceWorker);
3457
+ this.sender = new Pi(this.activeServiceWorker);
3439
3458
  const i = await this.sender._send(
3440
3459
  "ping",
3441
3460
  {},
@@ -3457,7 +3476,7 @@ class Bt {
3457
3476
  * @param key - Storage key which changed.
3458
3477
  */
3459
3478
  async notifyServiceWorker(e) {
3460
- if (!(!this.sender || !this.activeServiceWorker || Si() !== this.activeServiceWorker))
3479
+ if (!(!this.sender || !this.activeServiceWorker || Ni() !== this.activeServiceWorker))
3461
3480
  try {
3462
3481
  await this.sender._send(
3463
3482
  "keyChanged",
@@ -3473,8 +3492,8 @@ class Bt {
3473
3492
  try {
3474
3493
  if (!indexedDB)
3475
3494
  return !1;
3476
- const e = await be();
3477
- return await et(e, de, "1"), await tt(e, de), !0;
3495
+ const e = await Ce();
3496
+ return await rt(e, he, "1"), await st(e, he), !0;
3478
3497
  } catch {
3479
3498
  }
3480
3499
  return !1;
@@ -3488,19 +3507,19 @@ class Bt {
3488
3507
  }
3489
3508
  }
3490
3509
  async _set(e, t) {
3491
- return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3510
+ return this._withPendingWrite(async () => (await this._withRetries((i) => rt(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3492
3511
  }
3493
3512
  async _get(e) {
3494
- const t = await this._withRetries((i) => Ci(i, e));
3513
+ const t = await this._withRetries((i) => Di(i, e));
3495
3514
  return this.localCache[e] = t, t;
3496
3515
  }
3497
3516
  async _remove(e) {
3498
- return this._withPendingWrite(async () => (await this._withRetries((t) => tt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3517
+ return this._withPendingWrite(async () => (await this._withRetries((t) => st(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3499
3518
  }
3500
3519
  async _poll() {
3501
3520
  const e = await this._withRetries((r) => {
3502
- const s = _e(r, !1).getAll();
3503
- return new Z(s).toPromise();
3521
+ const s = ve(r, !1).getAll();
3522
+ return new te(s).toPromise();
3504
3523
  });
3505
3524
  if (!e)
3506
3525
  return [];
@@ -3522,7 +3541,7 @@ class Bt {
3522
3541
  r(t);
3523
3542
  }
3524
3543
  startPolling() {
3525
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Oi);
3544
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Fi);
3526
3545
  }
3527
3546
  stopPolling() {
3528
3547
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3534,9 +3553,9 @@ class Bt {
3534
3553
  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
3554
  }
3536
3555
  }
3537
- Bt.type = "LOCAL";
3538
- const Li = Bt;
3539
- new X(3e4, 6e4);
3556
+ Jt.type = "LOCAL";
3557
+ const Vi = Jt;
3558
+ new Z(3e4, 6e4);
3540
3559
  /**
3541
3560
  * @license
3542
3561
  * Copyright 2021 Google LLC
@@ -3553,8 +3572,8 @@ new X(3e4, 6e4);
3553
3572
  * See the License for the specific language governing permissions and
3554
3573
  * limitations under the License.
3555
3574
  */
3556
- function Mi(n, e) {
3557
- return e ? k(e) : (u(
3575
+ function $i(n, e) {
3576
+ return e ? S(e) : (l(
3558
3577
  n._popupRedirectResolver,
3559
3578
  n,
3560
3579
  "argument-error"
@@ -3577,7 +3596,7 @@ function Mi(n, e) {
3577
3596
  * See the License for the specific language governing permissions and
3578
3597
  * limitations under the License.
3579
3598
  */
3580
- class Ue extends Ut {
3599
+ class $e extends Vt {
3581
3600
  constructor(e) {
3582
3601
  super(
3583
3602
  "custom",
@@ -3607,26 +3626,26 @@ class Ue extends Ut {
3607
3626
  return e && (t.idToken = e), t;
3608
3627
  }
3609
3628
  }
3610
- function Ui(n) {
3611
- return fi(n.auth, new Ue(n), n.bypassAuthState);
3629
+ function Hi(n) {
3630
+ return Ii(n.auth, new $e(n), n.bypassAuthState);
3612
3631
  }
3613
- function Di(n) {
3632
+ function Wi(n) {
3614
3633
  const { auth: e, user: t } = n;
3615
- return u(
3634
+ return l(
3616
3635
  t,
3617
3636
  e,
3618
3637
  "internal-error"
3619
3638
  /* AuthErrorCode.INTERNAL_ERROR */
3620
- ), hi(t, new Ue(n), n.bypassAuthState);
3639
+ ), vi(t, new $e(n), n.bypassAuthState);
3621
3640
  }
3622
- async function Fi(n) {
3641
+ async function ji(n) {
3623
3642
  const { auth: e, user: t } = n;
3624
- return u(
3643
+ return l(
3625
3644
  t,
3626
3645
  e,
3627
3646
  "internal-error"
3628
3647
  /* AuthErrorCode.INTERNAL_ERROR */
3629
- ), di(t, new Ue(n), n.bypassAuthState);
3648
+ ), _i(t, new $e(n), n.bypassAuthState);
3630
3649
  }
3631
3650
  /**
3632
3651
  * @license
@@ -3644,7 +3663,7 @@ async function Fi(n) {
3644
3663
  * See the License for the specific language governing permissions and
3645
3664
  * limitations under the License.
3646
3665
  */
3647
- class qt {
3666
+ class Yt {
3648
3667
  constructor(e, t, i, r, s = !1) {
3649
3668
  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
3669
  }
@@ -3675,8 +3694,8 @@ class qt {
3675
3694
  };
3676
3695
  try {
3677
3696
  this.resolve(await this.getIdpTask(c)(a));
3678
- } catch (l) {
3679
- this.reject(l);
3697
+ } catch (u) {
3698
+ this.reject(u);
3680
3699
  }
3681
3700
  }
3682
3701
  onError(e) {
@@ -3686,15 +3705,15 @@ class qt {
3686
3705
  switch (e) {
3687
3706
  case "signInViaPopup":
3688
3707
  case "signInViaRedirect":
3689
- return Ui;
3708
+ return Hi;
3690
3709
  case "linkViaPopup":
3691
3710
  case "linkViaRedirect":
3692
- return Fi;
3711
+ return ji;
3693
3712
  case "reauthViaPopup":
3694
3713
  case "reauthViaRedirect":
3695
- return Di;
3714
+ return Wi;
3696
3715
  default:
3697
- b(
3716
+ R(
3698
3717
  this.auth,
3699
3718
  "internal-error"
3700
3719
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3702,10 +3721,10 @@ class qt {
3702
3721
  }
3703
3722
  }
3704
3723
  resolve(e) {
3705
- S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3724
+ A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3706
3725
  }
3707
3726
  reject(e) {
3708
- S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3727
+ A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3709
3728
  }
3710
3729
  unregisterAndCleanUp() {
3711
3730
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3727,14 +3746,14 @@ class qt {
3727
3746
  * See the License for the specific language governing permissions and
3728
3747
  * limitations under the License.
3729
3748
  */
3730
- const xi = new X(2e3, 1e4);
3731
- class V extends qt {
3749
+ const Gi = new Z(2e3, 1e4);
3750
+ class V extends Yt {
3732
3751
  constructor(e, t, i, r, s) {
3733
3752
  super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3734
3753
  }
3735
3754
  async executeNotNull() {
3736
3755
  const e = await this.execute();
3737
- return u(
3756
+ return l(
3738
3757
  e,
3739
3758
  this.auth,
3740
3759
  "internal-error"
@@ -3742,8 +3761,8 @@ class V extends qt {
3742
3761
  ), e;
3743
3762
  }
3744
3763
  async onExecution() {
3745
- S(this.filter.length === 1, "Popup operations only handle one event");
3746
- const e = Me();
3764
+ A(this.filter.length === 1, "Popup operations only handle one event");
3765
+ const e = Ve();
3747
3766
  this.authWindow = await this.resolver._openPopup(
3748
3767
  this.auth,
3749
3768
  this.provider,
@@ -3753,7 +3772,7 @@ class V extends qt {
3753
3772
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3754
3773
  this.reject(t);
3755
3774
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3756
- t || this.reject(I(
3775
+ t || this.reject(y(
3757
3776
  this.auth,
3758
3777
  "web-storage-unsupported"
3759
3778
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3765,7 +3784,7 @@ class V extends qt {
3765
3784
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3766
3785
  }
3767
3786
  cancel() {
3768
- this.reject(I(
3787
+ this.reject(y(
3769
3788
  this.auth,
3770
3789
  "cancelled-popup-request"
3771
3790
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
@@ -3780,7 +3799,7 @@ class V extends qt {
3780
3799
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3781
3800
  this.pollId = window.setTimeout(
3782
3801
  () => {
3783
- this.pollId = null, this.reject(I(
3802
+ this.pollId = null, this.reject(y(
3784
3803
  this.auth,
3785
3804
  "popup-closed-by-user"
3786
3805
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3791,7 +3810,7 @@ class V extends qt {
3791
3810
  );
3792
3811
  return;
3793
3812
  }
3794
- this.pollId = window.setTimeout(e, xi.get());
3813
+ this.pollId = window.setTimeout(e, Gi.get());
3795
3814
  };
3796
3815
  e();
3797
3816
  }
@@ -3813,8 +3832,8 @@ V.currentPopupAction = null;
3813
3832
  * See the License for the specific language governing permissions and
3814
3833
  * limitations under the License.
3815
3834
  */
3816
- const Vi = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3817
- class $i extends qt {
3835
+ const Bi = "pendingRedirect", ae = /* @__PURE__ */ new Map();
3836
+ class zi extends Yt {
3818
3837
  constructor(e, t, i = !1) {
3819
3838
  super(e, [
3820
3839
  "signInViaRedirect",
@@ -3829,17 +3848,17 @@ class $i extends qt {
3829
3848
  * just return it.
3830
3849
  */
3831
3850
  async execute() {
3832
- let e = oe.get(this.auth._key());
3851
+ let e = ae.get(this.auth._key());
3833
3852
  if (!e) {
3834
3853
  try {
3835
- const i = await Hi(this.resolver, this.auth) ? await super.execute() : null;
3854
+ const i = await qi(this.resolver, this.auth) ? await super.execute() : null;
3836
3855
  e = () => Promise.resolve(i);
3837
3856
  } catch (t) {
3838
3857
  e = () => Promise.reject(t);
3839
3858
  }
3840
- oe.set(this.auth._key(), e);
3859
+ ae.set(this.auth._key(), e);
3841
3860
  }
3842
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
3861
+ return this.bypassAuthState || ae.set(this.auth._key(), () => Promise.resolve(null)), e();
3843
3862
  }
3844
3863
  async onAuthEvent(e) {
3845
3864
  if (e.type === "signInViaRedirect")
@@ -3860,26 +3879,26 @@ class $i extends qt {
3860
3879
  cleanUp() {
3861
3880
  }
3862
3881
  }
3863
- async function Hi(n, e) {
3864
- const t = Gi(e), i = ji(n);
3882
+ async function qi(n, e) {
3883
+ const t = Yi(e), i = Ji(n);
3865
3884
  if (!await i._isAvailable())
3866
3885
  return !1;
3867
3886
  const r = await i._get(t) === "true";
3868
3887
  return await i._remove(t), r;
3869
3888
  }
3870
- function Wi(n, e) {
3871
- oe.set(n._key(), e);
3889
+ function Ki(n, e) {
3890
+ ae.set(n._key(), e);
3872
3891
  }
3873
- function ji(n) {
3874
- return k(n._redirectPersistence);
3892
+ function Ji(n) {
3893
+ return S(n._redirectPersistence);
3875
3894
  }
3876
- function Gi(n) {
3877
- return se(Vi, n.config.apiKey, n.name);
3895
+ function Yi(n) {
3896
+ return oe(Bi, n.config.apiKey, n.name);
3878
3897
  }
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();
3898
+ async function Xi(n, e, t = !1) {
3899
+ if (E(n.app))
3900
+ return Promise.reject(M(n));
3901
+ const i = ge(n), r = $i(i, e), o = await new zi(i, r, t).execute();
3883
3902
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3884
3903
  }
3885
3904
  /**
@@ -3898,8 +3917,8 @@ async function Bi(n, e, t = !1) {
3898
3917
  * See the License for the specific language governing permissions and
3899
3918
  * limitations under the License.
3900
3919
  */
3901
- const qi = 10 * 60 * 1e3;
3902
- class zi {
3920
+ const Qi = 10 * 60 * 1e3;
3921
+ class Zi {
3903
3922
  constructor(e) {
3904
3923
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3905
3924
  }
@@ -3915,13 +3934,13 @@ class zi {
3915
3934
  let t = !1;
3916
3935
  return this.consumers.forEach((i) => {
3917
3936
  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;
3937
+ }), this.hasHandledPotentialRedirect || !er(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3919
3938
  }
3920
3939
  sendToConsumer(e, t) {
3921
3940
  var i;
3922
- if (e.error && !zt(e)) {
3941
+ if (e.error && !Xt(e)) {
3923
3942
  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));
3943
+ t.onError(y(this.auth, r));
3925
3944
  } else
3926
3945
  t.onAuthEvent(e);
3927
3946
  }
@@ -3930,26 +3949,26 @@ class zi {
3930
3949
  return t.filter.includes(e.type) && i;
3931
3950
  }
3932
3951
  hasEventBeenHandled(e) {
3933
- return Date.now() - this.lastProcessedEventTime >= qi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
3952
+ return Date.now() - this.lastProcessedEventTime >= Qi && this.cachedEventUids.clear(), this.cachedEventUids.has(ot(e));
3934
3953
  }
3935
3954
  saveEventToCache(e) {
3936
- this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
3955
+ this.cachedEventUids.add(ot(e)), this.lastProcessedEventTime = Date.now();
3937
3956
  }
3938
3957
  }
3939
- function nt(n) {
3958
+ function ot(n) {
3940
3959
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3941
3960
  }
3942
- function zt({ type: n, error: e }) {
3961
+ function Xt({ type: n, error: e }) {
3943
3962
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3944
3963
  }
3945
- function Ki(n) {
3964
+ function er(n) {
3946
3965
  switch (n.type) {
3947
3966
  case "signInViaRedirect":
3948
3967
  case "linkViaRedirect":
3949
3968
  case "reauthViaRedirect":
3950
3969
  return !0;
3951
3970
  case "unknown":
3952
- return zt(n);
3971
+ return Xt(n);
3953
3972
  default:
3954
3973
  return !1;
3955
3974
  }
@@ -3970,7 +3989,7 @@ function Ki(n) {
3970
3989
  * See the License for the specific language governing permissions and
3971
3990
  * limitations under the License.
3972
3991
  */
3973
- async function Ji(n, e = {}) {
3992
+ async function tr(n, e = {}) {
3974
3993
  return G(n, "GET", "/v1/projects", e);
3975
3994
  }
3976
3995
  /**
@@ -3989,32 +4008,32 @@ async function Ji(n, e = {}) {
3989
4008
  * See the License for the specific language governing permissions and
3990
4009
  * limitations under the License.
3991
4010
  */
3992
- const Yi = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Xi = /^https?/;
3993
- async function Qi(n) {
4011
+ const nr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, ir = /^https?/;
4012
+ async function rr(n) {
3994
4013
  if (n.config.emulator)
3995
4014
  return;
3996
- const { authorizedDomains: e } = await Ji(n);
4015
+ const { authorizedDomains: e } = await tr(n);
3997
4016
  for (const t of e)
3998
4017
  try {
3999
- if (Zi(t))
4018
+ if (sr(t))
4000
4019
  return;
4001
4020
  } catch {
4002
4021
  }
4003
- b(
4022
+ R(
4004
4023
  n,
4005
4024
  "unauthorized-domain"
4006
4025
  /* AuthErrorCode.INVALID_ORIGIN */
4007
4026
  );
4008
4027
  }
4009
- function Zi(n) {
4010
- const e = Ee(), { protocol: t, hostname: i } = new URL(e);
4028
+ function sr(n) {
4029
+ const e = Ae(), { protocol: t, hostname: i } = new URL(e);
4011
4030
  if (n.startsWith("chrome-extension://")) {
4012
4031
  const o = new URL(n);
4013
4032
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4014
4033
  }
4015
- if (!Xi.test(t))
4034
+ if (!ir.test(t))
4016
4035
  return !1;
4017
- if (Yi.test(n))
4036
+ if (nr.test(n))
4018
4037
  return i === n;
4019
4038
  const r = n.replace(/\./g, "\\.");
4020
4039
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4035,9 +4054,9 @@ function Zi(n) {
4035
4054
  * See the License for the specific language governing permissions and
4036
4055
  * limitations under the License.
4037
4056
  */
4038
- const er = new X(3e4, 6e4);
4039
- function it() {
4040
- const n = T().___jsl;
4057
+ const or = new Z(3e4, 6e4);
4058
+ function at() {
4059
+ const n = w().___jsl;
4041
4060
  if (n != null && n.H) {
4042
4061
  for (const e of Object.keys(n.H))
4043
4062
  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 +4064,45 @@ function it() {
4045
4064
  n.CP[t] = null;
4046
4065
  }
4047
4066
  }
4048
- function tr(n) {
4067
+ function ar(n) {
4049
4068
  return new Promise((e, t) => {
4050
4069
  var i, r, s;
4051
4070
  function o() {
4052
- it(), gapi.load("gapi.iframes", {
4071
+ at(), gapi.load("gapi.iframes", {
4053
4072
  callback: () => {
4054
4073
  e(gapi.iframes.getContext());
4055
4074
  },
4056
4075
  ontimeout: () => {
4057
- it(), t(I(
4076
+ at(), t(y(
4058
4077
  n,
4059
4078
  "network-request-failed"
4060
4079
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4061
4080
  ));
4062
4081
  },
4063
- timeout: er.get()
4082
+ timeout: or.get()
4064
4083
  });
4065
4084
  }
4066
- if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4085
+ if (!((r = (i = w().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4067
4086
  e(gapi.iframes.getContext());
4068
- else if (!((s = T().gapi) === null || s === void 0) && s.load)
4087
+ else if (!((s = w().gapi) === null || s === void 0) && s.load)
4069
4088
  o();
4070
4089
  else {
4071
- const c = ri("iframefcb");
4072
- return T()[c] = () => {
4073
- gapi.load ? o() : t(I(
4090
+ const c = ui("iframefcb");
4091
+ return w()[c] = () => {
4092
+ gapi.load ? o() : t(y(
4074
4093
  n,
4075
4094
  "network-request-failed"
4076
4095
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4077
4096
  ));
4078
- }, ni(`${ii()}?onload=${c}`).catch((a) => t(a));
4097
+ }, ci(`${li()}?onload=${c}`).catch((a) => t(a));
4079
4098
  }
4080
4099
  }).catch((e) => {
4081
- throw ae = null, e;
4100
+ throw ce = null, e;
4082
4101
  });
4083
4102
  }
4084
- let ae = null;
4085
- function nr(n) {
4086
- return ae = ae || tr(n), ae;
4103
+ let ce = null;
4104
+ function cr(n) {
4105
+ return ce = ce || ar(n), ce;
4087
4106
  }
4088
4107
  /**
4089
4108
  * @license
@@ -4101,7 +4120,7 @@ function nr(n) {
4101
4120
  * See the License for the specific language governing permissions and
4102
4121
  * limitations under the License.
4103
4122
  */
4104
- const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe", or = {
4123
+ const lr = new Z(5e3, 15e3), ur = "__/auth/iframe", dr = "emulator/auth/iframe", hr = {
4105
4124
  style: {
4106
4125
  position: "absolute",
4107
4126
  top: "-100px",
@@ -4110,56 +4129,56 @@ const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe",
4110
4129
  },
4111
4130
  "aria-hidden": "true",
4112
4131
  tabindex: "-1"
4113
- }, ar = /* @__PURE__ */ new Map([
4132
+ }, fr = /* @__PURE__ */ new Map([
4114
4133
  ["identitytoolkit.googleapis.com", "p"],
4115
4134
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4116
4135
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4117
4136
  // test
4118
4137
  ]);
4119
- function cr(n) {
4138
+ function pr(n) {
4120
4139
  const e = n.config;
4121
- u(
4140
+ l(
4122
4141
  e.authDomain,
4123
4142
  n,
4124
4143
  "auth-domain-config-required"
4125
4144
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4126
4145
  );
4127
- const t = e.emulator ? Ce(e, sr) : `https://${n.config.authDomain}/${rr}`, i = {
4146
+ const t = e.emulator ? Ue(e, dr) : `https://${n.config.authDomain}/${ur}`, i = {
4128
4147
  apiKey: e.apiKey,
4129
4148
  appName: n.name,
4130
- v: J
4131
- }, r = ar.get(n.config.apiHost);
4149
+ v: X
4150
+ }, r = fr.get(n.config.apiHost);
4132
4151
  r && (i.eid = r);
4133
4152
  const s = n._getFrameworks();
4134
- return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4153
+ return s.length && (i.fw = s.join(",")), `${t}?${Q(i).slice(1)}`;
4135
4154
  }
4136
- async function lr(n) {
4137
- const e = await nr(n), t = T().gapi;
4138
- return u(
4155
+ async function mr(n) {
4156
+ const e = await cr(n), t = w().gapi;
4157
+ return l(
4139
4158
  t,
4140
4159
  n,
4141
4160
  "internal-error"
4142
4161
  /* AuthErrorCode.INTERNAL_ERROR */
4143
4162
  ), e.open({
4144
4163
  where: document.body,
4145
- url: cr(n),
4164
+ url: pr(n),
4146
4165
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4147
- attributes: or,
4166
+ attributes: hr,
4148
4167
  dontclear: !0
4149
4168
  }, (i) => new Promise(async (r, s) => {
4150
4169
  await i.restyle({
4151
4170
  // Prevent iframe from closing on mouse out.
4152
4171
  setHideOnLeave: !1
4153
4172
  });
4154
- const o = I(
4173
+ const o = y(
4155
4174
  n,
4156
4175
  "network-request-failed"
4157
4176
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4158
- ), c = T().setTimeout(() => {
4177
+ ), c = w().setTimeout(() => {
4159
4178
  s(o);
4160
- }, ir.get());
4179
+ }, lr.get());
4161
4180
  function a() {
4162
- T().clearTimeout(c), r(i);
4181
+ w().clearTimeout(c), r(i);
4163
4182
  }
4164
4183
  i.ping(a).then(a, () => {
4165
4184
  s(o);
@@ -4182,13 +4201,13 @@ async function lr(n) {
4182
4201
  * See the License for the specific language governing permissions and
4183
4202
  * limitations under the License.
4184
4203
  */
4185
- const ur = {
4204
+ const gr = {
4186
4205
  location: "yes",
4187
4206
  resizable: "yes",
4188
4207
  statusbar: "yes",
4189
4208
  toolbar: "no"
4190
- }, dr = 500, hr = 600, fr = "_blank", pr = "http://localhost";
4191
- class rt {
4209
+ }, _r = 500, vr = 600, Ir = "_blank", Tr = "http://localhost";
4210
+ class ct {
4192
4211
  constructor(e) {
4193
4212
  this.window = e, this.associatedEvent = null;
4194
4213
  }
@@ -4200,33 +4219,33 @@ class rt {
4200
4219
  }
4201
4220
  }
4202
4221
  }
4203
- function mr(n, e, t, i = dr, r = hr) {
4222
+ function yr(n, e, t, i = _r, r = vr) {
4204
4223
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4205
4224
  let c = "";
4206
- const a = Object.assign(Object.assign({}, ur), {
4225
+ const a = Object.assign(Object.assign({}, gr), {
4207
4226
  width: i.toString(),
4208
4227
  height: r.toString(),
4209
4228
  top: s,
4210
4229
  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);
4217
- u(
4218
- f,
4230
+ }), u = _().toLowerCase();
4231
+ t && (c = Ot(u) ? Ir : t), Ct(u) && (e = e || Tr, a.scrollbars = "yes");
4232
+ const d = Object.entries(a).reduce((p, [I, x]) => `${p}${I}=${x},`, "");
4233
+ if (Zn(u) && c !== "_self")
4234
+ return wr(e || "", c), new ct(null);
4235
+ const h = window.open(e || "", c, d);
4236
+ l(
4237
+ h,
4219
4238
  n,
4220
4239
  "popup-blocked"
4221
4240
  /* AuthErrorCode.POPUP_BLOCKED */
4222
4241
  );
4223
4242
  try {
4224
- f.focus();
4243
+ h.focus();
4225
4244
  } catch {
4226
4245
  }
4227
- return new rt(f);
4246
+ return new ct(h);
4228
4247
  }
4229
- function gr(n, e) {
4248
+ function wr(n, e) {
4230
4249
  const t = document.createElement("a");
4231
4250
  t.href = n, t.target = e;
4232
4251
  const i = document.createEvent("MouseEvent");
@@ -4248,14 +4267,14 @@ function gr(n, e) {
4248
4267
  * See the License for the specific language governing permissions and
4249
4268
  * limitations under the License.
4250
4269
  */
4251
- const _r = "__/auth/handler", vr = "emulator/auth/handler", Ir = encodeURIComponent("fac");
4252
- async function st(n, e, t, i, r, s) {
4253
- u(
4270
+ const Er = "__/auth/handler", kr = "emulator/auth/handler", br = encodeURIComponent("fac");
4271
+ async function lt(n, e, t, i, r, s) {
4272
+ l(
4254
4273
  n.config.authDomain,
4255
4274
  n,
4256
4275
  "auth-domain-config-required"
4257
4276
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4258
- ), u(
4277
+ ), l(
4259
4278
  n.config.apiKey,
4260
4279
  n,
4261
4280
  "invalid-api-key"
@@ -4266,27 +4285,27 @@ async function st(n, e, t, i, r, s) {
4266
4285
  appName: n.name,
4267
4286
  authType: t,
4268
4287
  redirectUrl: i,
4269
- v: J,
4288
+ v: X,
4270
4289
  eventId: r
4271
4290
  };
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;
4291
+ if (e instanceof $t) {
4292
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Rn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4293
+ for (const [d, h] of Object.entries({}))
4294
+ o[d] = h;
4276
4295
  }
4277
- if (e instanceof Q) {
4278
- const d = e.getScopes().filter((f) => f !== "");
4296
+ if (e instanceof ee) {
4297
+ const d = e.getScopes().filter((h) => h !== "");
4279
4298
  d.length > 0 && (o.scopes = d.join(","));
4280
4299
  }
4281
4300
  n.tenantId && (o.tid = n.tenantId);
4282
4301
  const c = o;
4283
4302
  for (const d of Object.keys(c))
4284
4303
  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}`;
4304
+ const a = await n._getAppCheckToken(), u = a ? `#${br}=${encodeURIComponent(a)}` : "";
4305
+ return `${Sr(n)}?${Q(c).slice(1)}${u}`;
4287
4306
  }
4288
- function Tr({ config: n }) {
4289
- return n.emulator ? Ce(n, vr) : `https://${n.authDomain}/${_r}`;
4307
+ function Sr({ config: n }) {
4308
+ return n.emulator ? Ue(n, kr) : `https://${n.authDomain}/${Er}`;
4290
4309
  }
4291
4310
  /**
4292
4311
  * @license
@@ -4304,30 +4323,30 @@ function Tr({ config: n }) {
4304
4323
  * See the License for the specific language governing permissions and
4305
4324
  * limitations under the License.
4306
4325
  */
4307
- const we = "webStorageSupport";
4308
- class wr {
4326
+ const Ee = "webStorageSupport";
4327
+ class Rr {
4309
4328
  constructor() {
4310
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Ht, this._completeRedirectFn = Bi, this._overrideRedirectResult = Wi;
4329
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Bt, this._completeRedirectFn = Xi, this._overrideRedirectResult = Ki;
4311
4330
  }
4312
4331
  // Wrapping in async even though we don't await anywhere in order
4313
4332
  // to make sure errors are raised as promise rejections
4314
4333
  async _openPopup(e, t, i, r) {
4315
4334
  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());
4335
+ A((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4336
+ const o = await lt(e, t, i, Ae(), r);
4337
+ return yr(e, o, Ve());
4319
4338
  }
4320
4339
  async _openRedirect(e, t, i, r) {
4321
4340
  await this._originValidation(e);
4322
- const s = await st(e, t, i, Ee(), r);
4323
- return ki(s), new Promise(() => {
4341
+ const s = await lt(e, t, i, Ae(), r);
4342
+ return Ci(s), new Promise(() => {
4324
4343
  });
4325
4344
  }
4326
4345
  _initialize(e) {
4327
4346
  const t = e._key();
4328
4347
  if (this.eventManagers[t]) {
4329
4348
  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);
4349
+ return r ? Promise.resolve(r) : (A(s, "If manager is not set, promise should be"), s);
4331
4350
  }
4332
4351
  const i = this.initAndGetManager(e);
4333
4352
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4335,8 +4354,8 @@ class wr {
4335
4354
  }), i;
4336
4355
  }
4337
4356
  async initAndGetManager(e) {
4338
- const t = await lr(e), i = new zi(e);
4339
- return t.register("authEvent", (r) => (u(
4357
+ const t = await mr(e), i = new Zi(e);
4358
+ return t.register("authEvent", (r) => (l(
4340
4359
  r == null ? void 0 : r.authEvent,
4341
4360
  e,
4342
4361
  "invalid-auth-event"
@@ -4347,10 +4366,10 @@ class wr {
4347
4366
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: i }, this.iframes[e._key()] = t, i;
4348
4367
  }
4349
4368
  _isIframeWebStorageSupported(e, t) {
4350
- this.iframes[e._key()].send(we, { type: we }, (r) => {
4369
+ this.iframes[e._key()].send(Ee, { type: Ee }, (r) => {
4351
4370
  var s;
4352
- const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4353
- o !== void 0 && t(!!o), b(
4371
+ const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ee];
4372
+ o !== void 0 && t(!!o), R(
4354
4373
  e,
4355
4374
  "internal-error"
4356
4375
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4359,14 +4378,14 @@ class wr {
4359
4378
  }
4360
4379
  _originValidation(e) {
4361
4380
  const t = e._key();
4362
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = Qi(e)), this.originValidationPromises[t];
4381
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = rr(e)), this.originValidationPromises[t];
4363
4382
  }
4364
4383
  get _shouldInitProactively() {
4365
- return Nt() || Ne() || pe();
4384
+ return Dt() || Fe() || me();
4366
4385
  }
4367
4386
  }
4368
- const yr = wr;
4369
- var ot = "@firebase/auth", at = "1.7.5";
4387
+ const Ar = Rr;
4388
+ var ut = "@firebase/auth", dt = "1.7.5";
4370
4389
  /**
4371
4390
  * @license
4372
4391
  * Copyright 2020 Google LLC
@@ -4383,7 +4402,7 @@ var ot = "@firebase/auth", at = "1.7.5";
4383
4402
  * See the License for the specific language governing permissions and
4384
4403
  * limitations under the License.
4385
4404
  */
4386
- class Er {
4405
+ class Pr {
4387
4406
  constructor(e) {
4388
4407
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4389
4408
  }
@@ -4408,7 +4427,7 @@ class Er {
4408
4427
  t && (this.internalListeners.delete(e), t(), this.updateProactiveRefresh());
4409
4428
  }
4410
4429
  assertAuthConfigured() {
4411
- u(
4430
+ l(
4412
4431
  this.auth._initializationPromise,
4413
4432
  "dependent-sdk-initialized-before-auth"
4414
4433
  /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */
@@ -4434,7 +4453,7 @@ class Er {
4434
4453
  * See the License for the specific language governing permissions and
4435
4454
  * limitations under the License.
4436
4455
  */
4437
- function kr(n) {
4456
+ function Cr(n) {
4438
4457
  switch (n) {
4439
4458
  case "Node":
4440
4459
  return "node";
@@ -4450,12 +4469,12 @@ function kr(n) {
4450
4469
  return;
4451
4470
  }
4452
4471
  }
4453
- function br(n) {
4454
- je(new Ge(
4472
+ function Or(n) {
4473
+ qe(new Ke(
4455
4474
  "auth",
4456
4475
  (e, { options: t }) => {
4457
4476
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
4458
- u(o && !o.includes(":"), "invalid-api-key", { appName: i.name });
4477
+ l(o && !o.includes(":"), "invalid-api-key", { appName: i.name });
4459
4478
  const a = {
4460
4479
  apiKey: o,
4461
4480
  authDomain: c,
@@ -4463,9 +4482,9 @@ function br(n) {
4463
4482
  apiHost: "identitytoolkit.googleapis.com",
4464
4483
  tokenApiHost: "securetoken.googleapis.com",
4465
4484
  apiScheme: "https",
4466
- sdkClientVersion: Lt(n)
4467
- }, l = new ei(i, r, s, a);
4468
- return oi(l, t), l;
4485
+ sdkClientVersion: Ft(n)
4486
+ }, u = new oi(i, r, s, a);
4487
+ return hi(u, t), u;
4469
4488
  },
4470
4489
  "PUBLIC"
4471
4490
  /* ComponentType.PUBLIC */
@@ -4477,21 +4496,21 @@ function br(n) {
4477
4496
  "auth-internal"
4478
4497
  /* _ComponentName.AUTH_INTERNAL */
4479
4498
  ).initialize();
4480
- })), je(new Ge(
4499
+ })), qe(new Ke(
4481
4500
  "auth-internal",
4482
4501
  (e) => {
4483
- const t = me(e.getProvider(
4502
+ const t = ge(e.getProvider(
4484
4503
  "auth"
4485
4504
  /* _ComponentName.AUTH */
4486
4505
  ).getImmediate());
4487
- return ((i) => new Er(i))(t);
4506
+ return ((i) => new Pr(i))(t);
4488
4507
  },
4489
4508
  "PRIVATE"
4490
4509
  /* ComponentType.PRIVATE */
4491
4510
  ).setInstantiationMode(
4492
4511
  "EXPLICIT"
4493
4512
  /* InstantiationMode.EXPLICIT */
4494
- )), ye(ot, at, kr(n)), ye(ot, at, "esm2017");
4513
+ )), Re(ut, dt, Cr(n)), Re(ut, dt, "esm2017");
4495
4514
  }
4496
4515
  /**
4497
4516
  * @license
@@ -4509,124 +4528,118 @@ function br(n) {
4509
4528
  * See the License for the specific language governing permissions and
4510
4529
  * limitations under the License.
4511
4530
  */
4512
- const Sr = 5 * 60, Rr = ft("authIdTokenMaxAge") || Sr;
4513
- let ct = null;
4514
- const Pr = (n) => async (e) => {
4531
+ const Nr = 5 * 60, Lr = _t("authIdTokenMaxAge") || Nr;
4532
+ let ht = null;
4533
+ const Mr = (n) => async (e) => {
4515
4534
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4516
- if (i && i > Rr)
4535
+ if (i && i > Lr)
4517
4536
  return;
4518
4537
  const r = t == null ? void 0 : t.token;
4519
- ct !== r && (ct = r, await fetch(n, {
4538
+ ht !== r && (ht = r, await fetch(n, {
4520
4539
  method: r ? "POST" : "DELETE",
4521
4540
  headers: r ? {
4522
4541
  Authorization: `Bearer ${r}`
4523
4542
  } : {}
4524
4543
  }));
4525
4544
  };
4526
- function Ar(n = vn()) {
4527
- const e = pt(n, "auth");
4545
+ function Ur(n = En()) {
4546
+ const e = vt(n, "auth");
4528
4547
  if (e.isInitialized())
4529
4548
  return e.getImmediate();
4530
- const t = si(n, {
4531
- popupRedirectResolver: yr,
4549
+ const t = di(n, {
4550
+ popupRedirectResolver: Ar,
4532
4551
  persistence: [
4533
- Li,
4534
- wi,
4535
- Ht
4552
+ Vi,
4553
+ Ri,
4554
+ Bt
4536
4555
  ]
4537
- }), i = ft("authTokenSyncURL");
4556
+ }), i = _t("authTokenSyncURL");
4538
4557
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4539
4558
  const s = new URL(i, location.origin);
4540
4559
  if (location.origin === s.origin) {
4541
- const o = Pr(s.toString());
4542
- _i(t, o, () => o(t.currentUser)), gi(t, (c) => o(c));
4560
+ const o = Mr(s.toString());
4561
+ Ei(t, o, () => o(t.currentUser)), wi(t, (c) => o(c));
4543
4562
  }
4544
4563
  }
4545
- const r = _n("auth");
4546
- return r && ai(t, `http://${r}`), t;
4564
+ const r = wn("auth");
4565
+ return r && fi(t, `http://${r}`), t;
4547
4566
  }
4548
- function Cr() {
4567
+ function Dr() {
4549
4568
  var n, e;
4550
4569
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4551
4570
  }
4552
- ti({
4571
+ ai({
4553
4572
  loadJS(n) {
4554
4573
  return new Promise((e, t) => {
4555
4574
  const i = document.createElement("script");
4556
4575
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4557
- const s = I(
4576
+ const s = y(
4558
4577
  "internal-error"
4559
4578
  /* AuthErrorCode.INTERNAL_ERROR */
4560
4579
  );
4561
4580
  s.customData = r, t(s);
4562
- }, i.type = "text/javascript", i.charset = "UTF-8", Cr().appendChild(i);
4581
+ }, i.type = "text/javascript", i.charset = "UTF-8", Dr().appendChild(i);
4563
4582
  });
4564
4583
  },
4565
4584
  gapiScript: "https://apis.google.com/js/api.js",
4566
4585
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4567
4586
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4568
4587
  });
4569
- br(
4588
+ Or(
4570
4589
  "Browser"
4571
4590
  /* ClientPlatform.BROWSER */
4572
4591
  );
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 = {
4592
+ var Fr = { 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" }, xr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4593
+ const Vr = {
4575
4594
  key: 1,
4576
4595
  class: "h-full w-full"
4577
- }, Ur = ["src"], Yr = /* @__PURE__ */ lt({
4596
+ }, $r = ["src"], is = /* @__PURE__ */ ft({
4578
4597
  __name: "App",
4579
4598
  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}`;
4599
+ const e = Se(), t = cn(), i = ln(), r = un(), s = dn(), o = gt(), c = ie(o.query.showHeader !== "false"), a = ie(!1), u = gn(), { currentBusiness: d } = Se(), h = ie(!1), p = ke(() => i.version), I = ke(() => {
4600
+ const m = e.currentCountry.value || "MY", g = Je.getIdToken(), T = d.value._id;
4601
+ return `${xr.marketingV1Portal}/b/${T}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4583
4602
  });
4584
4603
  async function x() {
4585
- if (En().length) {
4604
+ if (An().length) {
4586
4605
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4587
4606
  return;
4588
4607
  }
4589
- const p = kn(Or.firebase), m = await sn.getCustomToken(), v = Ar();
4590
- await mi(v, m), bn(p), console.log("initFirebase", p);
4608
+ const m = Pn(Fr.firebase), g = await an.getCustomToken(), T = Ur();
4609
+ await yi(T, g), Cn(m), console.log("initFirebase", m);
4591
4610
  }
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;
4611
+ const B = async () => {
4612
+ h.value = !1, await rn(), console.log("forceRerender"), Je.setBusinessId(d.value._id), await i.readPremium(), !a.value && p.value === "v2" ? e.registerSidebarComponent(Mn) : e.hideSidebarToggle(!0), await x(), a.value = !0, h.value = !0;
4594
4613
  };
4595
- 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"
4600
- });
4601
- }
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);
4614
+ return tn(() => {
4615
+ if (On.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4616
+ const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], T = document.getElementsByClassName("app-container")[0], U = document.getElementsByTagName("main")[0];
4617
+ m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), U == null || U.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4606
4618
  }
4607
- l.value != null && (console.log("App mounted, forceRerender"), M()), ee();
4608
- }), ut(
4619
+ d.value != null && (console.log("App mounted, forceRerender"), B());
4620
+ }), pt(
4609
4621
  () => 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());
4622
+ async (m, g) => {
4623
+ console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), B());
4612
4624
  }
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(_) }
4625
+ ), (m, g) => (K(), be(nn, null, [
4626
+ v(h) && v(p) === "v2" ? (K(), Be(v(on), { key: 0 })) : ye("", !0),
4627
+ v(h) && v(p) !== "v2" ? (K(), be("div", Vr, [
4628
+ mt(pn, {
4629
+ json: { url: v(I) }
4618
4630
  }, null, 8, ["json"]),
4619
- en("iframe", {
4631
+ re("iframe", {
4620
4632
  allow: "clipboard-read; clipboard-write",
4621
4633
  frameBorder: "0",
4622
4634
  height: "100%",
4623
4635
  width: "100%",
4624
- src: P(_)
4625
- }, null, 8, Ur)
4626
- ])) : He("", !0)
4636
+ src: v(I)
4637
+ }, null, 8, $r)
4638
+ ])) : ye("", !0),
4639
+ v(u).dialogShowing ? (K(), Be(v(mn), { key: 2 })) : ye("", !0)
4627
4640
  ], 64));
4628
4641
  }
4629
4642
  });
4630
4643
  export {
4631
- Yr as default
4644
+ is as default
4632
4645
  };