@feedmepos/mf-connect 0.1.0-beta.11 → 0.1.0-beta.13
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-IpLNFnjo.js → Analytic-hvE4B2NP.js} +9 -9
- package/dist/{App-D9Bi7WTi.js → App-GwIOv-m-.js} +201 -201
- package/dist/{Broadcast-3BNGmPyG.js → Broadcast-Bdwj5qA3.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CnVZZnAO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DY4xs9ra.js} +8 -8
- package/dist/{Card-CpE7eylY.js → Card-FzeDxGpd.js} +126 -126
- package/dist/{Collections-DFZ_McBC.js → Collections-DnltkOji.js} +4 -4
- package/dist/{Credit-Beml9hZH.js → Credit-BjOs1-SV.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-XZtq7qUh.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B_Si_AQ1.js} +66 -63
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CrViguLt.js → EffectSheet.vue_vue_type_style_index_0_lang-B2flXsB2.js} +6 -6
- package/dist/{Experience-HYyi__Wf.js → Experience-C4DvTIRT.js} +8 -8
- package/dist/{Game-Dtn11CP_.js → Game-CH9nOj1Y.js} +8 -8
- package/dist/{Marketing-BYMpQugE.js → Marketing-COgP0cW-.js} +5 -5
- package/dist/{Member-BP5W6ocI.js → Member-D9UOCOnD.js} +4 -4
- package/dist/MemberList-BiqQuhWx.js +1040 -0
- package/dist/{MemberTransactions-BDuQ2poX.js → MemberTransactions-B6DqB6mk.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-hkK13pIu.js → MessageInput.vue_vue_type_script_setup_true_lang-Dkn6ic59.js} +2 -2
- package/dist/{Mission-CVPfpXqE.js → Mission-65OFi1cJ.js} +8 -8
- package/dist/{Point-CNq0UR3i.js → Point-8HmgJRmV.js} +8 -8
- package/dist/{Promotion-DDGkSEq4.js → Promotion-NN9iJfPq.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CAmHafWG.js → RuleGroup.vue_vue_type_script_setup_true_lang-D4f7298N.js} +226 -217
- package/dist/{Segment-BTChC1dG.js → Segment-CnLQiZ3g.js} +13 -13
- package/dist/{Setting-v3mUUrpu.js → Setting-DmZU3gAP.js} +8 -8
- package/dist/{Store-C0yfrePX.js → Store-BkUj4woF.js} +13 -13
- package/dist/{StoreRewards-D5iGadfW.js → StoreRewards-D49SIccs.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-kfT1Myf8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-ClY5DLPQ.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CSYS1qZG.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BS4PXh2q.js} +1 -1
- package/dist/{Tier-Dm78VvDR.js → Tier-rRoE4M3e.js} +15 -15
- package/dist/{Title-DBFXMOFn.js → Title-ByHAW7J5.js} +15 -15
- package/dist/{Transaction-BqxS-rpt.js → Transaction-daG9-W0y.js} +2 -2
- package/dist/{Voucher-DSe_1GCt.js → Voucher-B9xf0e6x.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-iV7RhMM0.js → ZodTextField.vue_vue_type_script_setup_true_lang-T3nC1YZf.js} +1 -1
- package/dist/{app-CnclNehS.js → app-BNcCsLJ1.js} +24 -24
- package/dist/{app-BKZTSa3I.js → app-CO5FtQ_v.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BhDQlLuP.js → business-BhQb-hkF.js} +1 -1
- package/dist/{campaign-CQ9Nt5aw.js → campaign-26brACND.js} +2 -2
- package/dist/{collection.fn-CCFKWzrd.js → collection.fn-yhoNFXoc.js} +2 -2
- package/dist/{dto-C9p4nlpM.js → dto-Ha-7No98.js} +9 -9
- package/dist/{effect-BW2ndqNC.js → effect-BMN_DZq2.js} +1 -1
- package/dist/{email-addresses-f6Qi69T4.js → email-addresses-CiIGkdZd.js} +1 -1
- package/dist/{export-BTF1th7Q.js → export-DqdobYQ9.js} +3 -3
- package/dist/{helper-AHY68CPn.js → helper-CxKVaS7J.js} +1 -1
- package/dist/{index-DtGPRAq2.js → index-BggU-YHH.js} +319 -304
- package/dist/{index-Cg9npkzC.js → index-CICZWUs_.js} +5 -5
- package/dist/{index-t3RW39Z7.js → index-CKzehlZH.js} +1 -1
- package/dist/{index-D6XbU0Qa.js → index-CM_02sYD.js} +3 -3
- package/dist/{index-tkSRs4ZW.js → index-CNk82BB9.js} +3 -3
- package/dist/{index-DuLGLnDF.js → index-CvCUq_ma.js} +1 -1
- package/dist/{index-DX0qEaPU.js → index-D6wN6YpG.js} +1 -1
- package/dist/{index-WbzCjhRU.js → index-DYTBka1k.js} +1 -1
- package/dist/{index-Cc2nUHpJ.js → index-Du0pfy3X.js} +1 -1
- package/dist/{index-BElfYwE6.js → index-LPxuEkQA.js} +34 -33
- package/dist/{index-CsC5CEEX.js → index-ko44g5Wh.js} +2 -2
- package/dist/{index-BD3B1WsX.js → index-x7P8HJ9i.js} +2 -2
- package/dist/{index.esm2017-D_SvBpjK.js → index.esm2017-BJmoEKbU.js} +1 -1
- package/dist/{loading-DYgnbsuc.js → loading-sqn4egKz.js} +4 -4
- package/dist/{membership-DD0hHJl3.js → membership-CFgp0Gr1.js} +3 -3
- package/dist/{money-Cgrz-BtT.js → money-BIslIi4C.js} +1 -1
- package/dist/{number-DnNIyLAO.js → number-CmUbTbIe.js} +1 -1
- package/dist/{rule-builder-CtABwqc_.js → rule-builder-CZqF05r6.js} +1 -1
- package/dist/{rule-BtuowduB.js → rule-xgVE9qkb.js} +179 -177
- package/dist/{template-DLkN8BDg.js → template-BC7H5E09.js} +4 -4
- package/dist/{usePagination-Dt34_eYZ.js → usePagination-DSH2zVJ_.js} +1 -1
- package/dist/{vue-i18n-Bzlk0Afk.js → vue-i18n-ClNna7Hi.js} +2 -2
- package/package.json +1 -1
- package/dist/MemberList-CBHldoAX.js +0 -1036
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { useCoreStore as We, FeedMeAuth as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import "./index-
|
|
7
|
-
import { components as Z, useSnackbar as
|
|
8
|
-
import { u as
|
|
9
|
-
import { R as f } from "./app-
|
|
10
|
-
import { J as
|
|
11
|
-
import { r as ye, L as
|
|
1
|
+
import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent as Yt, openBlock as ne, createBlock as dt, unref as P, computed as Ve, onMounted as Xt, createElementBlock as He, Fragment as Qt, createCommentVNode as $e, createVNode as Zt, createElementVNode as en, nextTick as tn } from "vue";
|
|
2
|
+
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
|
+
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
+
import { u as an } from "./business-BhQb-hkF.js";
|
|
6
|
+
import "./index-DYTBka1k.js";
|
|
7
|
+
import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as un } from "./vue-i18n-ClNna7Hi.js";
|
|
9
|
+
import { R as f } from "./app-BNcCsLJ1.js";
|
|
10
|
+
import { J as dn } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
+
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-BJmoEKbU.js";
|
|
12
12
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
13
|
-
import { S as Be, c as
|
|
14
|
-
const Rn = /* @__PURE__ */
|
|
13
|
+
import { S as Be, c as bn } from "./index-CNk82BB9.js";
|
|
14
|
+
const Rn = /* @__PURE__ */ lt({
|
|
15
15
|
__name: "NavigationTab",
|
|
16
16
|
setup(n) {
|
|
17
|
-
const { t: e } =
|
|
17
|
+
const { t: e } = un(), t = te(), i = [
|
|
18
18
|
{
|
|
19
19
|
label: e("connect.navigation.analytic"),
|
|
20
20
|
value: f["$connect-ANALYTIC"]
|
|
@@ -109,8 +109,8 @@ const Rn = /* @__PURE__ */ ut({
|
|
|
109
109
|
label: e("connect.navigation.setting"),
|
|
110
110
|
value: f["$connect-SETTING"]
|
|
111
111
|
}
|
|
112
|
-
], r =
|
|
113
|
-
|
|
112
|
+
], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
|
|
113
|
+
ut(
|
|
114
114
|
() => s,
|
|
115
115
|
(a) => {
|
|
116
116
|
const l = a.matched.map((d) => d.name).reverse();
|
|
@@ -123,8 +123,8 @@ const Rn = /* @__PURE__ */ ut({
|
|
|
123
123
|
}
|
|
124
124
|
return (a, l) => {
|
|
125
125
|
var h;
|
|
126
|
-
const d =
|
|
127
|
-
return ne(),
|
|
126
|
+
const d = Yt("FmCollapsibleTabs");
|
|
127
|
+
return ne(), dt(d, {
|
|
128
128
|
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
129
129
|
"model-value": (h = P(t)) == null ? void 0 : h.toString(),
|
|
130
130
|
items: i,
|
|
@@ -151,12 +151,12 @@ var Pn = "firebase", An = "10.12.4";
|
|
|
151
151
|
* limitations under the License.
|
|
152
152
|
*/
|
|
153
153
|
ye(Pn, An, "app");
|
|
154
|
-
function
|
|
154
|
+
function gt() {
|
|
155
155
|
return {
|
|
156
156
|
"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."
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const Cn =
|
|
159
|
+
const Cn = gt, _t = new be("auth", "Firebase", gt());
|
|
160
160
|
/**
|
|
161
161
|
* @license
|
|
162
162
|
* Copyright 2020 Google LLC
|
|
@@ -173,7 +173,7 @@ const Cn = _t, vt = new be("auth", "Firebase", _t());
|
|
|
173
173
|
* See the License for the specific language governing permissions and
|
|
174
174
|
* limitations under the License.
|
|
175
175
|
*/
|
|
176
|
-
const ae = new
|
|
176
|
+
const ae = new hn("@firebase/auth");
|
|
177
177
|
function On(n, ...e) {
|
|
178
178
|
ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
|
|
179
179
|
}
|
|
@@ -202,21 +202,21 @@ function S(n, ...e) {
|
|
|
202
202
|
function I(n, ...e) {
|
|
203
203
|
return Ae(n, ...e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function vt(n, e, t) {
|
|
206
206
|
const i = Object.assign(Object.assign({}, Cn()), { [e]: t });
|
|
207
207
|
return new be("auth", "Firebase", i).create(e, {
|
|
208
208
|
appName: n.name
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
function L(n) {
|
|
212
|
-
return
|
|
212
|
+
return vt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
213
213
|
}
|
|
214
214
|
function Ae(n, ...e) {
|
|
215
215
|
if (typeof n != "string") {
|
|
216
216
|
const t = e[0], i = [...e.slice(1)];
|
|
217
217
|
return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
|
|
218
218
|
}
|
|
219
|
-
return
|
|
219
|
+
return _t.create(n, ...e);
|
|
220
220
|
}
|
|
221
221
|
function u(n, e, ...t) {
|
|
222
222
|
if (!n)
|
|
@@ -250,9 +250,9 @@ function Ee() {
|
|
|
250
250
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
251
251
|
}
|
|
252
252
|
function Nn() {
|
|
253
|
-
return
|
|
253
|
+
return qe() === "http:" || qe() === "https:";
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function qe() {
|
|
256
256
|
var n;
|
|
257
257
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
|
|
258
258
|
}
|
|
@@ -310,7 +310,7 @@ function Mn() {
|
|
|
310
310
|
*/
|
|
311
311
|
class J {
|
|
312
312
|
constructor(e, t) {
|
|
313
|
-
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
313
|
+
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
|
|
314
314
|
}
|
|
315
315
|
get() {
|
|
316
316
|
return Ln() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
@@ -353,7 +353,7 @@ function Ce(n, e) {
|
|
|
353
353
|
* See the License for the specific language governing permissions and
|
|
354
354
|
* limitations under the License.
|
|
355
355
|
*/
|
|
356
|
-
class
|
|
356
|
+
class It {
|
|
357
357
|
static initialize(e, t, i) {
|
|
358
358
|
this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
|
|
359
359
|
}
|
|
@@ -503,7 +503,7 @@ function he(n, e) {
|
|
|
503
503
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
504
504
|
}
|
|
505
505
|
async function G(n, e, t, i, r = {}) {
|
|
506
|
-
return
|
|
506
|
+
return Tt(n, r, async () => {
|
|
507
507
|
let s = {}, o = {};
|
|
508
508
|
i && (e === "GET" ? o = i : s = {
|
|
509
509
|
body: JSON.stringify(i)
|
|
@@ -515,14 +515,14 @@ async function G(n, e, t, i, r = {}) {
|
|
|
515
515
|
] = "application/json", n.languageCode && (a[
|
|
516
516
|
"X-Firebase-Locale"
|
|
517
517
|
/* HttpHeader.X_FIREBASE_LOCALE */
|
|
518
|
-
] = n.languageCode),
|
|
518
|
+
] = n.languageCode), It.fetch()(yt(n, n.config.apiHost, t, c), Object.assign({
|
|
519
519
|
method: e,
|
|
520
520
|
headers: a,
|
|
521
521
|
referrerPolicy: "no-referrer"
|
|
522
522
|
}, s));
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
525
|
+
async function Tt(n, e, t) {
|
|
526
526
|
n._canInitEmulator = !1;
|
|
527
527
|
const i = Object.assign(Object.assign({}, Un), e);
|
|
528
528
|
try {
|
|
@@ -546,7 +546,7 @@ async function wt(n, e, t) {
|
|
|
546
546
|
throw ee(n, "user-disabled", o);
|
|
547
547
|
const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
548
548
|
if (l)
|
|
549
|
-
throw
|
|
549
|
+
throw vt(n, d, l);
|
|
550
550
|
S(n, d);
|
|
551
551
|
}
|
|
552
552
|
} catch (r) {
|
|
@@ -555,13 +555,13 @@ async function wt(n, e, t) {
|
|
|
555
555
|
S(n, "network-request-failed", { message: String(r) });
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
async function
|
|
558
|
+
async function wt(n, e, t, i, r = {}) {
|
|
559
559
|
const s = await G(n, e, t, i, r);
|
|
560
560
|
return "mfaPendingCredential" in s && S(n, "multi-factor-auth-required", {
|
|
561
561
|
_serverResponse: s
|
|
562
562
|
}), s;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function yt(n, e, t, i) {
|
|
565
565
|
const r = `${e}${t}?${i}`;
|
|
566
566
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
567
567
|
}
|
|
@@ -606,7 +606,7 @@ function ee(n, e, t) {
|
|
|
606
606
|
async function xn(n, e) {
|
|
607
607
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
608
608
|
}
|
|
609
|
-
async function
|
|
609
|
+
async function Et(n, e) {
|
|
610
610
|
return G(n, "POST", "/v1/accounts:lookup", e);
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
@@ -661,13 +661,13 @@ function Oe(n) {
|
|
|
661
661
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
662
662
|
return ie("JWT malformed, contained fewer than 3 sections"), null;
|
|
663
663
|
try {
|
|
664
|
-
const r =
|
|
664
|
+
const r = Tn(t);
|
|
665
665
|
return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
|
|
666
666
|
} catch (r) {
|
|
667
667
|
return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function ze(n) {
|
|
671
671
|
const e = Oe(n);
|
|
672
672
|
return u(
|
|
673
673
|
e,
|
|
@@ -824,7 +824,7 @@ class ke {
|
|
|
824
824
|
*/
|
|
825
825
|
async function ce(n) {
|
|
826
826
|
var e;
|
|
827
|
-
const t = n.auth, i = await n.getIdToken(), r = await q(n,
|
|
827
|
+
const t = n.auth, i = await n.getIdToken(), r = await q(n, Et(t, { idToken: i }));
|
|
828
828
|
u(
|
|
829
829
|
r == null ? void 0 : r.users.length,
|
|
830
830
|
t,
|
|
@@ -833,7 +833,7 @@ async function ce(n) {
|
|
|
833
833
|
);
|
|
834
834
|
const s = r.users[0];
|
|
835
835
|
n._notifyReloadListener(s);
|
|
836
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ?
|
|
836
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = jn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
837
837
|
uid: s.localId,
|
|
838
838
|
displayName: s.displayName || null,
|
|
839
839
|
photoURL: s.photoUrl || null,
|
|
@@ -854,7 +854,7 @@ async function Wn(n) {
|
|
|
854
854
|
function jn(n, e) {
|
|
855
855
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function kt(n) {
|
|
858
858
|
return n.map((e) => {
|
|
859
859
|
var { providerId: t } = e, i = Pe(e, ["providerId"]);
|
|
860
860
|
return {
|
|
@@ -884,15 +884,15 @@ function St(n) {
|
|
|
884
884
|
* limitations under the License.
|
|
885
885
|
*/
|
|
886
886
|
async function Gn(n, e) {
|
|
887
|
-
const t = await
|
|
887
|
+
const t = await Tt(n, {}, async () => {
|
|
888
888
|
const i = K({
|
|
889
889
|
grant_type: "refresh_token",
|
|
890
890
|
refresh_token: e
|
|
891
|
-
}).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o =
|
|
891
|
+
}).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = yt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
|
|
892
892
|
return c[
|
|
893
893
|
"Content-Type"
|
|
894
894
|
/* HttpHeader.CONTENT_TYPE */
|
|
895
|
-
] = "application/x-www-form-urlencoded",
|
|
895
|
+
] = "application/x-www-form-urlencoded", It.fetch()(o, {
|
|
896
896
|
method: "POST",
|
|
897
897
|
headers: c,
|
|
898
898
|
body: i
|
|
@@ -944,7 +944,7 @@ class H {
|
|
|
944
944
|
"internal-error"
|
|
945
945
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
946
946
|
);
|
|
947
|
-
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) :
|
|
947
|
+
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : ze(e.idToken);
|
|
948
948
|
this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
|
|
949
949
|
}
|
|
950
950
|
updateFromIdToken(e) {
|
|
@@ -953,7 +953,7 @@ class H {
|
|
|
953
953
|
"internal-error"
|
|
954
954
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
955
955
|
);
|
|
956
|
-
const t =
|
|
956
|
+
const t = ze(e);
|
|
957
957
|
this.updateTokensAndExpiration(e, null, t);
|
|
958
958
|
}
|
|
959
959
|
async getToken(e, t = !1) {
|
|
@@ -1105,14 +1105,14 @@ class E {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
static _fromJSON(e, t) {
|
|
1107
1107
|
var i, r, s, o, c, a, l, d;
|
|
1108
|
-
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, F = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, p = (c = t.tenantId) !== null && c !== void 0 ? c : void 0,
|
|
1108
|
+
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, F = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, p = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, v = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: _e, emailVerified: De, isAnonymous: Fe, providerData: ve, stsTokenManager: xe } = t;
|
|
1109
1109
|
u(
|
|
1110
1110
|
_e && xe,
|
|
1111
1111
|
e,
|
|
1112
1112
|
"internal-error"
|
|
1113
1113
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1114
1114
|
);
|
|
1115
|
-
const
|
|
1115
|
+
const Kt = H.fromJSON(this.name, xe);
|
|
1116
1116
|
u(
|
|
1117
1117
|
typeof _e == "string",
|
|
1118
1118
|
e,
|
|
@@ -1128,7 +1128,7 @@ class E {
|
|
|
1128
1128
|
e,
|
|
1129
1129
|
"internal-error"
|
|
1130
1130
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1131
|
-
), R(F, e.name), R(M, e.name), R(p, e.name), R(
|
|
1131
|
+
), R(F, e.name), R(M, e.name), R(p, e.name), R(m, e.name), R(v, e.name), R(x, e.name);
|
|
1132
1132
|
const Ie = new E({
|
|
1133
1133
|
uid: _e,
|
|
1134
1134
|
auth: e,
|
|
@@ -1139,11 +1139,11 @@ class E {
|
|
|
1139
1139
|
photoURL: M,
|
|
1140
1140
|
phoneNumber: F,
|
|
1141
1141
|
tenantId: p,
|
|
1142
|
-
stsTokenManager:
|
|
1142
|
+
stsTokenManager: Kt,
|
|
1143
1143
|
createdAt: v,
|
|
1144
1144
|
lastLoginAt: x
|
|
1145
1145
|
});
|
|
1146
|
-
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((
|
|
1146
|
+
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), m && (Ie._redirectEventId = m), Ie;
|
|
1147
1147
|
}
|
|
1148
1148
|
/**
|
|
1149
1149
|
* Initialize a User from an idToken server response
|
|
@@ -1173,7 +1173,7 @@ class E {
|
|
|
1173
1173
|
"internal-error"
|
|
1174
1174
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1175
1175
|
);
|
|
1176
|
-
const s = r.providerUserInfo !== void 0 ?
|
|
1176
|
+
const s = r.providerUserInfo !== void 0 ? kt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new H();
|
|
1177
1177
|
c.updateFromIdToken(i);
|
|
1178
1178
|
const a = new E({
|
|
1179
1179
|
uid: r.localId,
|
|
@@ -1211,11 +1211,11 @@ class E {
|
|
|
1211
1211
|
* See the License for the specific language governing permissions and
|
|
1212
1212
|
* limitations under the License.
|
|
1213
1213
|
*/
|
|
1214
|
-
const
|
|
1214
|
+
const Ke = /* @__PURE__ */ new Map();
|
|
1215
1215
|
function k(n) {
|
|
1216
1216
|
b(n instanceof Function, "Expected a class definition");
|
|
1217
|
-
let e =
|
|
1218
|
-
return e ? (b(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(),
|
|
1217
|
+
let e = Ke.get(n);
|
|
1218
|
+
return e ? (b(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Ke.set(n, e), e);
|
|
1219
1219
|
}
|
|
1220
1220
|
/**
|
|
1221
1221
|
* @license
|
|
@@ -1233,7 +1233,7 @@ function k(n) {
|
|
|
1233
1233
|
* See the License for the specific language governing permissions and
|
|
1234
1234
|
* limitations under the License.
|
|
1235
1235
|
*/
|
|
1236
|
-
class
|
|
1236
|
+
class St {
|
|
1237
1237
|
constructor() {
|
|
1238
1238
|
this.type = "NONE", this.storage = {};
|
|
1239
1239
|
}
|
|
@@ -1255,8 +1255,8 @@ class bt {
|
|
|
1255
1255
|
_removeListener(e, t) {
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1258
|
+
St.type = "NONE";
|
|
1259
|
+
const Je = St;
|
|
1260
1260
|
/**
|
|
1261
1261
|
* @license
|
|
1262
1262
|
* Copyright 2019 Google LLC
|
|
@@ -1307,12 +1307,12 @@ class $ {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
static async create(e, t, i = "authUser") {
|
|
1309
1309
|
if (!t.length)
|
|
1310
|
-
return new $(k(
|
|
1310
|
+
return new $(k(Je), e, i);
|
|
1311
1311
|
const r = (await Promise.all(t.map(async (l) => {
|
|
1312
1312
|
if (await l._isAvailable())
|
|
1313
1313
|
return l;
|
|
1314
1314
|
}))).filter((l) => l);
|
|
1315
|
-
let s = r[0] || k(
|
|
1315
|
+
let s = r[0] || k(Je);
|
|
1316
1316
|
const o = re(i, e.config.apiKey, e.name);
|
|
1317
1317
|
let c = null;
|
|
1318
1318
|
for (const l of t)
|
|
@@ -1351,29 +1351,29 @@ class $ {
|
|
|
1351
1351
|
* See the License for the specific language governing permissions and
|
|
1352
1352
|
* limitations under the License.
|
|
1353
1353
|
*/
|
|
1354
|
-
function
|
|
1354
|
+
function Ye(n) {
|
|
1355
1355
|
const e = n.toLowerCase();
|
|
1356
1356
|
if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
|
|
1357
1357
|
return "Opera";
|
|
1358
|
-
if (
|
|
1358
|
+
if (Pt(e))
|
|
1359
1359
|
return "IEMobile";
|
|
1360
1360
|
if (e.includes("msie") || e.includes("trident/"))
|
|
1361
1361
|
return "IE";
|
|
1362
1362
|
if (e.includes("edge/"))
|
|
1363
1363
|
return "Edge";
|
|
1364
|
-
if (
|
|
1364
|
+
if (bt(e))
|
|
1365
1365
|
return "Firefox";
|
|
1366
1366
|
if (e.includes("silk/"))
|
|
1367
1367
|
return "Silk";
|
|
1368
|
-
if (
|
|
1368
|
+
if (Ct(e))
|
|
1369
1369
|
return "Blackberry";
|
|
1370
|
-
if (
|
|
1370
|
+
if (Ot(e))
|
|
1371
1371
|
return "Webos";
|
|
1372
1372
|
if (Ne(e))
|
|
1373
1373
|
return "Safari";
|
|
1374
|
-
if ((e.includes("chrome/") ||
|
|
1374
|
+
if ((e.includes("chrome/") || Rt(e)) && !e.includes("edge/"))
|
|
1375
1375
|
return "Chrome";
|
|
1376
|
-
if (
|
|
1376
|
+
if (At(e))
|
|
1377
1377
|
return "Android";
|
|
1378
1378
|
{
|
|
1379
1379
|
const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
|
|
@@ -1382,40 +1382,40 @@ function Xe(n) {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
return "Other";
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function bt(n = g()) {
|
|
1386
1386
|
return /firefox\//i.test(n);
|
|
1387
1387
|
}
|
|
1388
|
-
function Ne(n =
|
|
1388
|
+
function Ne(n = g()) {
|
|
1389
1389
|
const e = n.toLowerCase();
|
|
1390
1390
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function Rt(n = g()) {
|
|
1393
1393
|
return /crios\//i.test(n);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function Pt(n = g()) {
|
|
1396
1396
|
return /iemobile/i.test(n);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function At(n = g()) {
|
|
1399
1399
|
return /android/i.test(n);
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Ct(n = g()) {
|
|
1402
1402
|
return /blackberry/i.test(n);
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function Ot(n = g()) {
|
|
1405
1405
|
return /webos/i.test(n);
|
|
1406
1406
|
}
|
|
1407
|
-
function fe(n =
|
|
1407
|
+
function fe(n = g()) {
|
|
1408
1408
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1409
1409
|
}
|
|
1410
|
-
function qn(n =
|
|
1410
|
+
function qn(n = g()) {
|
|
1411
1411
|
var e;
|
|
1412
1412
|
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1413
1413
|
}
|
|
1414
1414
|
function zn() {
|
|
1415
|
-
return
|
|
1415
|
+
return wn() && document.documentMode === 10;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return fe(n) ||
|
|
1417
|
+
function Nt(n = g()) {
|
|
1418
|
+
return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
|
|
1419
1419
|
}
|
|
1420
1420
|
function Kn() {
|
|
1421
1421
|
try {
|
|
@@ -1440,14 +1440,14 @@ function Kn() {
|
|
|
1440
1440
|
* See the License for the specific language governing permissions and
|
|
1441
1441
|
* limitations under the License.
|
|
1442
1442
|
*/
|
|
1443
|
-
function
|
|
1443
|
+
function Lt(n, e = []) {
|
|
1444
1444
|
let t;
|
|
1445
1445
|
switch (n) {
|
|
1446
1446
|
case "Browser":
|
|
1447
|
-
t =
|
|
1447
|
+
t = Ye(g());
|
|
1448
1448
|
break;
|
|
1449
1449
|
case "Worker":
|
|
1450
|
-
t = `${
|
|
1450
|
+
t = `${Ye(g())}-${n}`;
|
|
1451
1451
|
break;
|
|
1452
1452
|
default:
|
|
1453
1453
|
t = n;
|
|
@@ -1635,7 +1635,7 @@ class Qn {
|
|
|
1635
1635
|
*/
|
|
1636
1636
|
class Zn {
|
|
1637
1637
|
constructor(e, t, i, r) {
|
|
1638
|
-
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
|
|
1638
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Jn(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = _t, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
|
|
1639
1639
|
}
|
|
1640
1640
|
_initializeWithPersistence(e, t) {
|
|
1641
1641
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1671,7 +1671,7 @@ class Zn {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
async initializeCurrentUserFromIdToken(e) {
|
|
1673
1673
|
try {
|
|
1674
|
-
const t = await
|
|
1674
|
+
const t = await Et(this, { idToken: e }), i = await E._fromGetAccountInfoResponse(this, t, e);
|
|
1675
1675
|
await this.directlySetCurrentUser(i);
|
|
1676
1676
|
} catch (t) {
|
|
1677
1677
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
|
@@ -1933,7 +1933,7 @@ class Zn {
|
|
|
1933
1933
|
), this.persistenceManager;
|
|
1934
1934
|
}
|
|
1935
1935
|
_logFramework(e) {
|
|
1936
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
|
1936
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Lt(this.config.clientPlatform, this._getFrameworks()));
|
|
1937
1937
|
}
|
|
1938
1938
|
_getFrameworks() {
|
|
1939
1939
|
return this.frameworks;
|
|
@@ -1969,9 +1969,9 @@ class Zn {
|
|
|
1969
1969
|
function pe(n) {
|
|
1970
1970
|
return j(n);
|
|
1971
1971
|
}
|
|
1972
|
-
class
|
|
1972
|
+
class Xe {
|
|
1973
1973
|
constructor(e) {
|
|
1974
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
1974
|
+
this.auth = e, this.observer = null, this.addObserver = gn((t) => this.observer = t);
|
|
1975
1975
|
}
|
|
1976
1976
|
get next() {
|
|
1977
1977
|
return u(
|
|
@@ -2035,10 +2035,10 @@ function ii(n) {
|
|
|
2035
2035
|
* limitations under the License.
|
|
2036
2036
|
*/
|
|
2037
2037
|
function ri(n, e) {
|
|
2038
|
-
const t =
|
|
2038
|
+
const t = pt(n, "auth");
|
|
2039
2039
|
if (t.isInitialized()) {
|
|
2040
2040
|
const r = t.getImmediate(), s = t.getOptions();
|
|
2041
|
-
if (
|
|
2041
|
+
if (In(s, e ?? {}))
|
|
2042
2042
|
return r;
|
|
2043
2043
|
S(
|
|
2044
2044
|
r,
|
|
@@ -2065,7 +2065,7 @@ function oi(n, e, t) {
|
|
|
2065
2065
|
"invalid-emulator-scheme"
|
|
2066
2066
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2067
2067
|
);
|
|
2068
|
-
const r = !1, s =
|
|
2068
|
+
const r = !1, s = Mt(e), { host: o, port: c } = ai(e), a = c === null ? "" : `:${c}`;
|
|
2069
2069
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2070
2070
|
host: o,
|
|
2071
2071
|
port: c,
|
|
@@ -2073,24 +2073,24 @@ function oi(n, e, t) {
|
|
|
2073
2073
|
options: Object.freeze({ disableWarnings: r })
|
|
2074
2074
|
}), ci();
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function Mt(n) {
|
|
2077
2077
|
const e = n.indexOf(":");
|
|
2078
2078
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2079
2079
|
}
|
|
2080
2080
|
function ai(n) {
|
|
2081
|
-
const e =
|
|
2081
|
+
const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2082
2082
|
if (!t)
|
|
2083
2083
|
return { host: "", port: null };
|
|
2084
2084
|
const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
|
|
2085
2085
|
if (r) {
|
|
2086
2086
|
const s = r[1];
|
|
2087
|
-
return { host: s, port:
|
|
2087
|
+
return { host: s, port: Qe(i.substr(s.length + 1)) };
|
|
2088
2088
|
} else {
|
|
2089
2089
|
const [s, o] = i.split(":");
|
|
2090
|
-
return { host: s, port:
|
|
2090
|
+
return { host: s, port: Qe(o) };
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function Qe(n) {
|
|
2094
2094
|
if (!n)
|
|
2095
2095
|
return null;
|
|
2096
2096
|
const e = Number(n);
|
|
@@ -2119,7 +2119,7 @@ function ci() {
|
|
|
2119
2119
|
* See the License for the specific language governing permissions and
|
|
2120
2120
|
* limitations under the License.
|
|
2121
2121
|
*/
|
|
2122
|
-
class
|
|
2122
|
+
class Ut {
|
|
2123
2123
|
/** @internal */
|
|
2124
2124
|
constructor(e, t) {
|
|
2125
2125
|
this.providerId = e, this.signInMethod = t;
|
|
@@ -2162,7 +2162,7 @@ class Dt {
|
|
|
2162
2162
|
* limitations under the License.
|
|
2163
2163
|
*/
|
|
2164
2164
|
async function W(n, e) {
|
|
2165
|
-
return
|
|
2165
|
+
return wt(n, "POST", "/v1/accounts:signInWithIdp", he(n, e));
|
|
2166
2166
|
}
|
|
2167
2167
|
/**
|
|
2168
2168
|
* @license
|
|
@@ -2181,7 +2181,7 @@ async function W(n, e) {
|
|
|
2181
2181
|
* limitations under the License.
|
|
2182
2182
|
*/
|
|
2183
2183
|
const li = "http://localhost";
|
|
2184
|
-
class U extends
|
|
2184
|
+
class U extends Ut {
|
|
2185
2185
|
constructor() {
|
|
2186
2186
|
super(...arguments), this.pendingToken = null;
|
|
2187
2187
|
}
|
|
@@ -2266,7 +2266,7 @@ class U extends Dt {
|
|
|
2266
2266
|
* See the License for the specific language governing permissions and
|
|
2267
2267
|
* limitations under the License.
|
|
2268
2268
|
*/
|
|
2269
|
-
class
|
|
2269
|
+
class Dt {
|
|
2270
2270
|
/**
|
|
2271
2271
|
* Constructor for generic OAuth providers.
|
|
2272
2272
|
*
|
|
@@ -2319,7 +2319,7 @@ class Ft {
|
|
|
2319
2319
|
* See the License for the specific language governing permissions and
|
|
2320
2320
|
* limitations under the License.
|
|
2321
2321
|
*/
|
|
2322
|
-
class Y extends
|
|
2322
|
+
class Y extends Dt {
|
|
2323
2323
|
constructor() {
|
|
2324
2324
|
super(...arguments), this.scopes = [];
|
|
2325
2325
|
}
|
|
@@ -2639,7 +2639,7 @@ class D {
|
|
|
2639
2639
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2640
2640
|
}
|
|
2641
2641
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2642
|
-
const s = await E._fromIdTokenResponse(e, i, r), o =
|
|
2642
|
+
const s = await E._fromIdTokenResponse(e, i, r), o = Ze(i);
|
|
2643
2643
|
return new D({
|
|
2644
2644
|
user: s,
|
|
2645
2645
|
providerId: o,
|
|
@@ -2653,7 +2653,7 @@ class D {
|
|
|
2653
2653
|
/* reload */
|
|
2654
2654
|
!0
|
|
2655
2655
|
);
|
|
2656
|
-
const r =
|
|
2656
|
+
const r = Ze(i);
|
|
2657
2657
|
return new D({
|
|
2658
2658
|
user: e,
|
|
2659
2659
|
providerId: r,
|
|
@@ -2662,7 +2662,7 @@ class D {
|
|
|
2662
2662
|
});
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
|
-
function
|
|
2665
|
+
function Ze(n) {
|
|
2666
2666
|
return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
|
|
2667
2667
|
}
|
|
2668
2668
|
/**
|
|
@@ -2695,7 +2695,7 @@ class le extends Re {
|
|
|
2695
2695
|
return new le(e, t, i, r);
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
|
-
function
|
|
2698
|
+
function Ft(n, e, t, i) {
|
|
2699
2699
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2700
2700
|
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2701
2701
|
});
|
|
@@ -2726,7 +2726,7 @@ async function di(n, e, t = !1) {
|
|
|
2726
2726
|
return Promise.reject(L(i));
|
|
2727
2727
|
const r = "reauthenticate";
|
|
2728
2728
|
try {
|
|
2729
|
-
const s = await q(n,
|
|
2729
|
+
const s = await q(n, Ft(i, r, e, n), t);
|
|
2730
2730
|
u(
|
|
2731
2731
|
s.idToken,
|
|
2732
2732
|
i,
|
|
@@ -2774,7 +2774,7 @@ async function di(n, e, t = !1) {
|
|
|
2774
2774
|
async function hi(n, e, t = !1) {
|
|
2775
2775
|
if (w(n.app))
|
|
2776
2776
|
return Promise.reject(L(n));
|
|
2777
|
-
const i = "signIn", r = await
|
|
2777
|
+
const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
2778
2778
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2779
2779
|
}
|
|
2780
2780
|
/**
|
|
@@ -2794,7 +2794,7 @@ async function hi(n, e, t = !1) {
|
|
|
2794
2794
|
* limitations under the License.
|
|
2795
2795
|
*/
|
|
2796
2796
|
async function fi(n, e) {
|
|
2797
|
-
return
|
|
2797
|
+
return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2798
2798
|
}
|
|
2799
2799
|
/**
|
|
2800
2800
|
* @license
|
|
@@ -2821,10 +2821,10 @@ async function pi(n, e) {
|
|
|
2821
2821
|
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2822
2822
|
return await t._updateCurrentUser(r.user), r;
|
|
2823
2823
|
}
|
|
2824
|
-
function
|
|
2824
|
+
function mi(n, e, t, i) {
|
|
2825
2825
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2827
|
+
function gi(n, e, t) {
|
|
2828
2828
|
return j(n).beforeAuthStateChanged(e, t);
|
|
2829
2829
|
}
|
|
2830
2830
|
const ue = "__sak";
|
|
@@ -2844,7 +2844,7 @@ const ue = "__sak";
|
|
|
2844
2844
|
* See the License for the specific language governing permissions and
|
|
2845
2845
|
* limitations under the License.
|
|
2846
2846
|
*/
|
|
2847
|
-
class
|
|
2847
|
+
class xt {
|
|
2848
2848
|
constructor(e, t) {
|
|
2849
2849
|
this.storageRetriever = e, this.type = t;
|
|
2850
2850
|
}
|
|
@@ -2886,17 +2886,17 @@ class Vt {
|
|
|
2886
2886
|
* limitations under the License.
|
|
2887
2887
|
*/
|
|
2888
2888
|
function _i() {
|
|
2889
|
-
const n =
|
|
2889
|
+
const n = g();
|
|
2890
2890
|
return Ne(n) || fe(n);
|
|
2891
2891
|
}
|
|
2892
2892
|
const vi = 1e3, Ii = 10;
|
|
2893
|
-
class
|
|
2893
|
+
class Vt extends xt {
|
|
2894
2894
|
constructor() {
|
|
2895
2895
|
super(
|
|
2896
2896
|
() => window.localStorage,
|
|
2897
2897
|
"LOCAL"
|
|
2898
2898
|
/* PersistenceType.LOCAL */
|
|
2899
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _i() && Kn(), this.fallbackToPolling =
|
|
2899
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _i() && Kn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
|
|
2900
2900
|
}
|
|
2901
2901
|
forAllChangedKeys(e) {
|
|
2902
2902
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2974,8 +2974,8 @@ class Ht extends Vt {
|
|
|
2974
2974
|
await super._remove(e), delete this.localCache[e];
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
|
|
2978
|
-
const Ti =
|
|
2977
|
+
Vt.type = "LOCAL";
|
|
2978
|
+
const Ti = Vt;
|
|
2979
2979
|
/**
|
|
2980
2980
|
* @license
|
|
2981
2981
|
* Copyright 2020 Google LLC
|
|
@@ -2992,7 +2992,7 @@ const Ti = Ht;
|
|
|
2992
2992
|
* See the License for the specific language governing permissions and
|
|
2993
2993
|
* limitations under the License.
|
|
2994
2994
|
*/
|
|
2995
|
-
class
|
|
2995
|
+
class Ht extends xt {
|
|
2996
2996
|
constructor() {
|
|
2997
2997
|
super(
|
|
2998
2998
|
() => window.sessionStorage,
|
|
@@ -3005,8 +3005,8 @@ class $t extends Vt {
|
|
|
3005
3005
|
_removeListener(e, t) {
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
|
|
3009
|
-
const
|
|
3008
|
+
Ht.type = "SESSION";
|
|
3009
|
+
const $t = Ht;
|
|
3010
3010
|
/**
|
|
3011
3011
|
* @license
|
|
3012
3012
|
* Copyright 2019 Google LLC
|
|
@@ -3054,7 +3054,7 @@ function wi(n) {
|
|
|
3054
3054
|
* See the License for the specific language governing permissions and
|
|
3055
3055
|
* limitations under the License.
|
|
3056
3056
|
*/
|
|
3057
|
-
class
|
|
3057
|
+
class me {
|
|
3058
3058
|
constructor(e) {
|
|
3059
3059
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
3060
3060
|
}
|
|
@@ -3068,7 +3068,7 @@ class ge {
|
|
|
3068
3068
|
const t = this.receivers.find((r) => r.isListeningto(e));
|
|
3069
3069
|
if (t)
|
|
3070
3070
|
return t;
|
|
3071
|
-
const i = new
|
|
3071
|
+
const i = new me(e);
|
|
3072
3072
|
return this.receivers.push(i), i;
|
|
3073
3073
|
}
|
|
3074
3074
|
isListeningto(e) {
|
|
@@ -3122,7 +3122,7 @@ class ge {
|
|
|
3122
3122
|
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);
|
|
3123
3123
|
}
|
|
3124
3124
|
}
|
|
3125
|
-
|
|
3125
|
+
me.receivers = [];
|
|
3126
3126
|
/**
|
|
3127
3127
|
* @license
|
|
3128
3128
|
* Copyright 2020 Google LLC
|
|
@@ -3280,7 +3280,7 @@ function Ei(n) {
|
|
|
3280
3280
|
* See the License for the specific language governing permissions and
|
|
3281
3281
|
* limitations under the License.
|
|
3282
3282
|
*/
|
|
3283
|
-
function
|
|
3283
|
+
function Wt() {
|
|
3284
3284
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3285
3285
|
}
|
|
3286
3286
|
async function ki() {
|
|
@@ -3297,7 +3297,7 @@ function Si() {
|
|
|
3297
3297
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3298
3298
|
}
|
|
3299
3299
|
function bi() {
|
|
3300
|
-
return
|
|
3300
|
+
return Wt() ? self : null;
|
|
3301
3301
|
}
|
|
3302
3302
|
/**
|
|
3303
3303
|
* @license
|
|
@@ -3315,7 +3315,7 @@ function bi() {
|
|
|
3315
3315
|
* See the License for the specific language governing permissions and
|
|
3316
3316
|
* limitations under the License.
|
|
3317
3317
|
*/
|
|
3318
|
-
const
|
|
3318
|
+
const jt = "firebaseLocalStorageDb", Ri = 1, de = "firebaseLocalStorage", Gt = "fbase_key";
|
|
3319
3319
|
class X {
|
|
3320
3320
|
constructor(e) {
|
|
3321
3321
|
this.request = e;
|
|
@@ -3330,22 +3330,22 @@ class X {
|
|
|
3330
3330
|
});
|
|
3331
3331
|
}
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function ge(n, e) {
|
|
3334
3334
|
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3335
3335
|
}
|
|
3336
3336
|
function Pi() {
|
|
3337
|
-
const n = indexedDB.deleteDatabase(
|
|
3337
|
+
const n = indexedDB.deleteDatabase(jt);
|
|
3338
3338
|
return new X(n).toPromise();
|
|
3339
3339
|
}
|
|
3340
3340
|
function Se() {
|
|
3341
|
-
const n = indexedDB.open(
|
|
3341
|
+
const n = indexedDB.open(jt, Ri);
|
|
3342
3342
|
return new Promise((e, t) => {
|
|
3343
3343
|
n.addEventListener("error", () => {
|
|
3344
3344
|
t(n.error);
|
|
3345
3345
|
}), n.addEventListener("upgradeneeded", () => {
|
|
3346
3346
|
const i = n.result;
|
|
3347
3347
|
try {
|
|
3348
|
-
i.createObjectStore(de, { keyPath:
|
|
3348
|
+
i.createObjectStore(de, { keyPath: Gt });
|
|
3349
3349
|
} catch (r) {
|
|
3350
3350
|
t(r);
|
|
3351
3351
|
}
|
|
@@ -3355,23 +3355,23 @@ function Se() {
|
|
|
3355
3355
|
});
|
|
3356
3356
|
});
|
|
3357
3357
|
}
|
|
3358
|
-
async function
|
|
3359
|
-
const i =
|
|
3360
|
-
[
|
|
3358
|
+
async function et(n, e, t) {
|
|
3359
|
+
const i = ge(n, !0).put({
|
|
3360
|
+
[Gt]: e,
|
|
3361
3361
|
value: t
|
|
3362
3362
|
});
|
|
3363
3363
|
return new X(i).toPromise();
|
|
3364
3364
|
}
|
|
3365
3365
|
async function Ai(n, e) {
|
|
3366
|
-
const t =
|
|
3366
|
+
const t = ge(n, !1).get(e), i = await new X(t).toPromise();
|
|
3367
3367
|
return i === void 0 ? null : i.value;
|
|
3368
3368
|
}
|
|
3369
|
-
function
|
|
3370
|
-
const t =
|
|
3369
|
+
function tt(n, e) {
|
|
3370
|
+
const t = ge(n, !0).delete(e);
|
|
3371
3371
|
return new X(t).toPromise();
|
|
3372
3372
|
}
|
|
3373
3373
|
const Ci = 800, Oi = 3;
|
|
3374
|
-
class
|
|
3374
|
+
class Bt {
|
|
3375
3375
|
constructor() {
|
|
3376
3376
|
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(() => {
|
|
3377
3377
|
}, () => {
|
|
@@ -3397,13 +3397,13 @@ class qt {
|
|
|
3397
3397
|
* postMessage interface to send these events to the worker ourselves.
|
|
3398
3398
|
*/
|
|
3399
3399
|
async initializeServiceWorkerMessaging() {
|
|
3400
|
-
return
|
|
3400
|
+
return Wt() ? this.initializeReceiver() : this.initializeSender();
|
|
3401
3401
|
}
|
|
3402
3402
|
/**
|
|
3403
3403
|
* As the worker we should listen to events from the main window.
|
|
3404
3404
|
*/
|
|
3405
3405
|
async initializeReceiver() {
|
|
3406
|
-
this.receiver =
|
|
3406
|
+
this.receiver = me._getInstance(bi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3407
3407
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3408
3408
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3409
3409
|
"keyChanged"
|
|
@@ -3460,7 +3460,7 @@ class qt {
|
|
|
3460
3460
|
if (!indexedDB)
|
|
3461
3461
|
return !1;
|
|
3462
3462
|
const e = await Se();
|
|
3463
|
-
return await
|
|
3463
|
+
return await et(e, ue, "1"), await tt(e, ue), !0;
|
|
3464
3464
|
} catch {
|
|
3465
3465
|
}
|
|
3466
3466
|
return !1;
|
|
@@ -3474,18 +3474,18 @@ class qt {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
3476
|
async _set(e, t) {
|
|
3477
|
-
return this._withPendingWrite(async () => (await this._withRetries((i) =>
|
|
3477
|
+
return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3478
3478
|
}
|
|
3479
3479
|
async _get(e) {
|
|
3480
3480
|
const t = await this._withRetries((i) => Ai(i, e));
|
|
3481
3481
|
return this.localCache[e] = t, t;
|
|
3482
3482
|
}
|
|
3483
3483
|
async _remove(e) {
|
|
3484
|
-
return this._withPendingWrite(async () => (await this._withRetries((t) =>
|
|
3484
|
+
return this._withPendingWrite(async () => (await this._withRetries((t) => tt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
|
|
3485
3485
|
}
|
|
3486
3486
|
async _poll() {
|
|
3487
3487
|
const e = await this._withRetries((r) => {
|
|
3488
|
-
const s =
|
|
3488
|
+
const s = ge(r, !1).getAll();
|
|
3489
3489
|
return new X(s).toPromise();
|
|
3490
3490
|
});
|
|
3491
3491
|
if (!e)
|
|
@@ -3520,8 +3520,8 @@ class qt {
|
|
|
3520
3520
|
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();
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
|
-
|
|
3524
|
-
const Ni =
|
|
3523
|
+
Bt.type = "LOCAL";
|
|
3524
|
+
const Ni = Bt;
|
|
3525
3525
|
new J(3e4, 6e4);
|
|
3526
3526
|
/**
|
|
3527
3527
|
* @license
|
|
@@ -3563,7 +3563,7 @@ function Li(n, e) {
|
|
|
3563
3563
|
* See the License for the specific language governing permissions and
|
|
3564
3564
|
* limitations under the License.
|
|
3565
3565
|
*/
|
|
3566
|
-
class Ue extends
|
|
3566
|
+
class Ue extends Ut {
|
|
3567
3567
|
constructor(e) {
|
|
3568
3568
|
super(
|
|
3569
3569
|
"custom",
|
|
@@ -3630,7 +3630,7 @@ async function Di(n) {
|
|
|
3630
3630
|
* See the License for the specific language governing permissions and
|
|
3631
3631
|
* limitations under the License.
|
|
3632
3632
|
*/
|
|
3633
|
-
class
|
|
3633
|
+
class qt {
|
|
3634
3634
|
constructor(e, t, i, r, s = !1) {
|
|
3635
3635
|
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];
|
|
3636
3636
|
}
|
|
@@ -3714,7 +3714,7 @@ class zt {
|
|
|
3714
3714
|
* limitations under the License.
|
|
3715
3715
|
*/
|
|
3716
3716
|
const Fi = new J(2e3, 1e4);
|
|
3717
|
-
class V extends
|
|
3717
|
+
class V extends qt {
|
|
3718
3718
|
constructor(e, t, i, r, s) {
|
|
3719
3719
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
3720
3720
|
}
|
|
@@ -3800,7 +3800,7 @@ V.currentPopupAction = null;
|
|
|
3800
3800
|
* limitations under the License.
|
|
3801
3801
|
*/
|
|
3802
3802
|
const xi = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3803
|
-
class Vi extends
|
|
3803
|
+
class Vi extends qt {
|
|
3804
3804
|
constructor(e, t, i = !1) {
|
|
3805
3805
|
super(e, [
|
|
3806
3806
|
"signInViaRedirect",
|
|
@@ -3905,7 +3905,7 @@ class qi {
|
|
|
3905
3905
|
}
|
|
3906
3906
|
sendToConsumer(e, t) {
|
|
3907
3907
|
var i;
|
|
3908
|
-
if (e.error && !
|
|
3908
|
+
if (e.error && !zt(e)) {
|
|
3909
3909
|
const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
|
|
3910
3910
|
t.onError(I(this.auth, r));
|
|
3911
3911
|
} else
|
|
@@ -3916,16 +3916,16 @@ class qi {
|
|
|
3916
3916
|
return t.filter.includes(e.type) && i;
|
|
3917
3917
|
}
|
|
3918
3918
|
hasEventBeenHandled(e) {
|
|
3919
|
-
return Date.now() - this.lastProcessedEventTime >= Bi && this.cachedEventUids.clear(), this.cachedEventUids.has(
|
|
3919
|
+
return Date.now() - this.lastProcessedEventTime >= Bi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
|
|
3920
3920
|
}
|
|
3921
3921
|
saveEventToCache(e) {
|
|
3922
|
-
this.cachedEventUids.add(
|
|
3922
|
+
this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3925
|
+
function nt(n) {
|
|
3926
3926
|
return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
|
|
3927
3927
|
}
|
|
3928
|
-
function
|
|
3928
|
+
function zt({ type: n, error: e }) {
|
|
3929
3929
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3930
3930
|
}
|
|
3931
3931
|
function zi(n) {
|
|
@@ -3935,7 +3935,7 @@ function zi(n) {
|
|
|
3935
3935
|
case "reauthViaRedirect":
|
|
3936
3936
|
return !0;
|
|
3937
3937
|
case "unknown":
|
|
3938
|
-
return
|
|
3938
|
+
return zt(n);
|
|
3939
3939
|
default:
|
|
3940
3940
|
return !1;
|
|
3941
3941
|
}
|
|
@@ -4022,7 +4022,7 @@ function Qi(n) {
|
|
|
4022
4022
|
* limitations under the License.
|
|
4023
4023
|
*/
|
|
4024
4024
|
const Zi = new J(3e4, 6e4);
|
|
4025
|
-
function
|
|
4025
|
+
function it() {
|
|
4026
4026
|
const n = T().___jsl;
|
|
4027
4027
|
if (n != null && n.H) {
|
|
4028
4028
|
for (const e of Object.keys(n.H))
|
|
@@ -4035,12 +4035,12 @@ function er(n) {
|
|
|
4035
4035
|
return new Promise((e, t) => {
|
|
4036
4036
|
var i, r, s;
|
|
4037
4037
|
function o() {
|
|
4038
|
-
|
|
4038
|
+
it(), gapi.load("gapi.iframes", {
|
|
4039
4039
|
callback: () => {
|
|
4040
4040
|
e(gapi.iframes.getContext());
|
|
4041
4041
|
},
|
|
4042
4042
|
ontimeout: () => {
|
|
4043
|
-
|
|
4043
|
+
it(), t(I(
|
|
4044
4044
|
n,
|
|
4045
4045
|
"network-request-failed"
|
|
4046
4046
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
@@ -4174,7 +4174,7 @@ const lr = {
|
|
|
4174
4174
|
statusbar: "yes",
|
|
4175
4175
|
toolbar: "no"
|
|
4176
4176
|
}, ur = 500, dr = 600, hr = "_blank", fr = "http://localhost";
|
|
4177
|
-
class
|
|
4177
|
+
class rt {
|
|
4178
4178
|
constructor(e) {
|
|
4179
4179
|
this.window = e, this.associatedEvent = null;
|
|
4180
4180
|
}
|
|
@@ -4194,11 +4194,11 @@ function pr(n, e, t, i = ur, r = dr) {
|
|
|
4194
4194
|
height: r.toString(),
|
|
4195
4195
|
top: s,
|
|
4196
4196
|
left: o
|
|
4197
|
-
}), l =
|
|
4198
|
-
t && (c =
|
|
4197
|
+
}), l = g().toLowerCase();
|
|
4198
|
+
t && (c = Rt(l) ? hr : t), bt(l) && (e = e || fr, a.scrollbars = "yes");
|
|
4199
4199
|
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4200
4200
|
if (qn(l) && c !== "_self")
|
|
4201
|
-
return
|
|
4201
|
+
return mr(e || "", c), new rt(null);
|
|
4202
4202
|
const h = window.open(e || "", c, d);
|
|
4203
4203
|
u(
|
|
4204
4204
|
h,
|
|
@@ -4210,9 +4210,9 @@ function pr(n, e, t, i = ur, r = dr) {
|
|
|
4210
4210
|
h.focus();
|
|
4211
4211
|
} catch {
|
|
4212
4212
|
}
|
|
4213
|
-
return new
|
|
4213
|
+
return new rt(h);
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4215
|
+
function mr(n, e) {
|
|
4216
4216
|
const t = document.createElement("a");
|
|
4217
4217
|
t.href = n, t.target = e;
|
|
4218
4218
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4234,8 +4234,8 @@ function gr(n, e) {
|
|
|
4234
4234
|
* See the License for the specific language governing permissions and
|
|
4235
4235
|
* limitations under the License.
|
|
4236
4236
|
*/
|
|
4237
|
-
const
|
|
4238
|
-
async function
|
|
4237
|
+
const gr = "__/auth/handler", _r = "emulator/auth/handler", vr = encodeURIComponent("fac");
|
|
4238
|
+
async function st(n, e, t, i, r, s) {
|
|
4239
4239
|
u(
|
|
4240
4240
|
n.config.authDomain,
|
|
4241
4241
|
n,
|
|
@@ -4255,8 +4255,8 @@ async function ot(n, e, t, i, r, s) {
|
|
|
4255
4255
|
v: z,
|
|
4256
4256
|
eventId: r
|
|
4257
4257
|
};
|
|
4258
|
-
if (e instanceof
|
|
4259
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
4258
|
+
if (e instanceof Dt) {
|
|
4259
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", yn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4260
4260
|
for (const [d, h] of Object.entries({}))
|
|
4261
4261
|
o[d] = h;
|
|
4262
4262
|
}
|
|
@@ -4272,7 +4272,7 @@ async function ot(n, e, t, i, r, s) {
|
|
|
4272
4272
|
return `${Ir(n)}?${K(c).slice(1)}${l}`;
|
|
4273
4273
|
}
|
|
4274
4274
|
function Ir({ config: n }) {
|
|
4275
|
-
return n.emulator ? Ce(n, _r) : `https://${n.authDomain}/${
|
|
4275
|
+
return n.emulator ? Ce(n, _r) : `https://${n.authDomain}/${gr}`;
|
|
4276
4276
|
}
|
|
4277
4277
|
/**
|
|
4278
4278
|
* @license
|
|
@@ -4293,19 +4293,19 @@ function Ir({ config: n }) {
|
|
|
4293
4293
|
const we = "webStorageSupport";
|
|
4294
4294
|
class Tr {
|
|
4295
4295
|
constructor() {
|
|
4296
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence =
|
|
4296
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn = Gi, this._overrideRedirectResult = $i;
|
|
4297
4297
|
}
|
|
4298
4298
|
// Wrapping in async even though we don't await anywhere in order
|
|
4299
4299
|
// to make sure errors are raised as promise rejections
|
|
4300
4300
|
async _openPopup(e, t, i, r) {
|
|
4301
4301
|
var s;
|
|
4302
4302
|
b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4303
|
-
const o = await
|
|
4303
|
+
const o = await st(e, t, i, Ee(), r);
|
|
4304
4304
|
return pr(e, o, Me());
|
|
4305
4305
|
}
|
|
4306
4306
|
async _openRedirect(e, t, i, r) {
|
|
4307
4307
|
await this._originValidation(e);
|
|
4308
|
-
const s = await
|
|
4308
|
+
const s = await st(e, t, i, Ee(), r);
|
|
4309
4309
|
return Ei(s), new Promise(() => {
|
|
4310
4310
|
});
|
|
4311
4311
|
}
|
|
@@ -4348,11 +4348,11 @@ class Tr {
|
|
|
4348
4348
|
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xi(e)), this.originValidationPromises[t];
|
|
4349
4349
|
}
|
|
4350
4350
|
get _shouldInitProactively() {
|
|
4351
|
-
return
|
|
4351
|
+
return Nt() || Ne() || fe();
|
|
4352
4352
|
}
|
|
4353
4353
|
}
|
|
4354
4354
|
const wr = Tr;
|
|
4355
|
-
var
|
|
4355
|
+
var ot = "@firebase/auth", at = "1.7.5";
|
|
4356
4356
|
/**
|
|
4357
4357
|
* @license
|
|
4358
4358
|
* Copyright 2020 Google LLC
|
|
@@ -4449,7 +4449,7 @@ function kr(n) {
|
|
|
4449
4449
|
apiHost: "identitytoolkit.googleapis.com",
|
|
4450
4450
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4451
4451
|
apiScheme: "https",
|
|
4452
|
-
sdkClientVersion:
|
|
4452
|
+
sdkClientVersion: Lt(n)
|
|
4453
4453
|
}, l = new Zn(i, r, s, a);
|
|
4454
4454
|
return si(l, t), l;
|
|
4455
4455
|
},
|
|
@@ -4477,7 +4477,7 @@ function kr(n) {
|
|
|
4477
4477
|
).setInstantiationMode(
|
|
4478
4478
|
"EXPLICIT"
|
|
4479
4479
|
/* InstantiationMode.EXPLICIT */
|
|
4480
|
-
)), ye(
|
|
4480
|
+
)), ye(ot, at, Er(n)), ye(ot, at, "esm2017");
|
|
4481
4481
|
}
|
|
4482
4482
|
/**
|
|
4483
4483
|
* @license
|
|
@@ -4495,22 +4495,22 @@ function kr(n) {
|
|
|
4495
4495
|
* See the License for the specific language governing permissions and
|
|
4496
4496
|
* limitations under the License.
|
|
4497
4497
|
*/
|
|
4498
|
-
const Sr = 5 * 60, br =
|
|
4499
|
-
let
|
|
4498
|
+
const Sr = 5 * 60, br = ft("authIdTokenMaxAge") || Sr;
|
|
4499
|
+
let ct = null;
|
|
4500
4500
|
const Rr = (n) => async (e) => {
|
|
4501
4501
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4502
4502
|
if (i && i > br)
|
|
4503
4503
|
return;
|
|
4504
4504
|
const r = t == null ? void 0 : t.token;
|
|
4505
|
-
|
|
4505
|
+
ct !== r && (ct = r, await fetch(n, {
|
|
4506
4506
|
method: r ? "POST" : "DELETE",
|
|
4507
4507
|
headers: r ? {
|
|
4508
4508
|
Authorization: `Bearer ${r}`
|
|
4509
4509
|
} : {}
|
|
4510
4510
|
}));
|
|
4511
4511
|
};
|
|
4512
|
-
function Pr(n =
|
|
4513
|
-
const e =
|
|
4512
|
+
function Pr(n = vn()) {
|
|
4513
|
+
const e = pt(n, "auth");
|
|
4514
4514
|
if (e.isInitialized())
|
|
4515
4515
|
return e.getImmediate();
|
|
4516
4516
|
const t = ri(n, {
|
|
@@ -4518,17 +4518,17 @@ function Pr(n = In()) {
|
|
|
4518
4518
|
persistence: [
|
|
4519
4519
|
Ni,
|
|
4520
4520
|
Ti,
|
|
4521
|
-
|
|
4521
|
+
$t
|
|
4522
4522
|
]
|
|
4523
|
-
}), i =
|
|
4523
|
+
}), i = ft("authTokenSyncURL");
|
|
4524
4524
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4525
4525
|
const s = new URL(i, location.origin);
|
|
4526
4526
|
if (location.origin === s.origin) {
|
|
4527
4527
|
const o = Rr(s.toString());
|
|
4528
|
-
|
|
4528
|
+
gi(t, o, () => o(t.currentUser)), mi(t, (c) => o(c));
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
|
-
const r =
|
|
4531
|
+
const r = _n("auth");
|
|
4532
4532
|
return r && oi(t, `http://${r}`), t;
|
|
4533
4533
|
}
|
|
4534
4534
|
function Ar() {
|
|
@@ -4560,42 +4560,42 @@ var Cr = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDo
|
|
|
4560
4560
|
const Nr = {
|
|
4561
4561
|
key: 1,
|
|
4562
4562
|
class: "h-full w-full"
|
|
4563
|
-
}, Lr = ["src"], zr = /* @__PURE__ */
|
|
4563
|
+
}, Lr = ["src"], zr = /* @__PURE__ */ lt({
|
|
4564
4564
|
__name: "App",
|
|
4565
4565
|
setup(n) {
|
|
4566
|
-
const e = We(), t =
|
|
4567
|
-
const p = e.currentCountry.value || "MY",
|
|
4568
|
-
return `${Or.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${
|
|
4566
|
+
const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
|
|
4567
|
+
const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
|
|
4568
|
+
return `${Or.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
|
|
4569
4569
|
});
|
|
4570
4570
|
async function F() {
|
|
4571
|
-
if (
|
|
4571
|
+
if (En().length) {
|
|
4572
4572
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4573
4573
|
return;
|
|
4574
4574
|
}
|
|
4575
|
-
const p =
|
|
4576
|
-
await pi(v,
|
|
4575
|
+
const p = kn(Cr.firebase), m = await sn.getCustomToken(), v = Pr();
|
|
4576
|
+
await pi(v, m), Sn(p), console.log("initFirebase", p);
|
|
4577
4577
|
}
|
|
4578
4578
|
const M = async () => {
|
|
4579
|
-
d.value = !1, await
|
|
4579
|
+
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Rn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
|
|
4580
4580
|
};
|
|
4581
|
-
return
|
|
4582
|
-
if (t.initProvider(r, s), !c.value) {
|
|
4583
|
-
const p = document.getElementsByClassName("app-header")[0],
|
|
4584
|
-
p == null || p.classList.add("!hidden"),
|
|
4581
|
+
return Xt(() => {
|
|
4582
|
+
if (bn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4583
|
+
const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4584
|
+
p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4585
4585
|
}
|
|
4586
4586
|
l.value != null && (console.log("App mounted, forceRerender"), M());
|
|
4587
|
-
}),
|
|
4587
|
+
}), ut(
|
|
4588
4588
|
() => e.currentBusiness.value,
|
|
4589
|
-
async (p,
|
|
4590
|
-
console.log("Current business changed"), p != null && p._id !=
|
|
4589
|
+
async (p, m) => {
|
|
4590
|
+
console.log("Current business changed"), p != null && p._id != m._id && (console.log("forceRerender when business changes", p, m), M());
|
|
4591
4591
|
}
|
|
4592
|
-
), (p,
|
|
4593
|
-
P(d) && P(h) === "v2" ? (ne(),
|
|
4592
|
+
), (p, m) => (ne(), He(Qt, null, [
|
|
4593
|
+
P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
|
|
4594
4594
|
P(d) && P(h) !== "v2" ? (ne(), He("div", Nr, [
|
|
4595
|
-
|
|
4595
|
+
Zt(dn, {
|
|
4596
4596
|
json: { url: P(_) }
|
|
4597
4597
|
}, null, 8, ["json"]),
|
|
4598
|
-
|
|
4598
|
+
en("iframe", {
|
|
4599
4599
|
allow: "clipboard-read; clipboard-write",
|
|
4600
4600
|
frameBorder: "0",
|
|
4601
4601
|
height: "100%",
|