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