@feedmepos/mf-connect 0.1.0-prod → 0.1.2-prod
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-D1vIDmhJ.js → Analytic-AqWU_lJy.js} +7 -7
- package/dist/{App-DHrfWG8l.js → App-CRTD0U-N.js} +205 -205
- package/dist/{Broadcast-B2rxZAZi.js → Broadcast-utWSrzP9.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5zUv0Zx.js} +8 -8
- package/dist/{Card-Dr6pTTM0.js → Card-x6qnEaIt.js} +57 -58
- package/dist/{Collections-0tbg0MFt.js → Collections-BgbWoLWI.js} +11 -12
- package/dist/{Credit-KbB_7Jq-.js → Credit-CojzmUnh.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C137bE1q.js} +36 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js → EffectSheet.vue_vue_type_style_index_0_lang-8l3Dt_Lo.js} +5 -5
- package/dist/{Experience-C_Q9Iml8.js → Experience-CPjovKWF.js} +7 -7
- package/dist/{Game-BwODw7M6.js → Game-DWcjPfZP.js} +7 -7
- package/dist/{Marketing-QOKTAS_T.js → Marketing-CwoI0pFF.js} +4 -4
- package/dist/{Member-d7RIGRm1.js → Member-oRcVGr20.js} +3 -3
- package/dist/MemberList-ISy05wGZ.js +1040 -0
- package/dist/{MemberTransactions-D-pnlXiP.js → MemberTransactions-CXvhJngX.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js → MessageInput.vue_vue_type_script_setup_true_lang-Ca1LO__F.js} +2 -2
- package/dist/{Mission-BAKDm4VZ.js → Mission-Y8s5MQIC.js} +7 -7
- package/dist/{Point-Puu0jKz0.js → Point-0Fw3qLIW.js} +7 -7
- package/dist/{Promotion-DRIaUvJi.js → Promotion-vqM23NPX.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js → RuleGroup.vue_vue_type_script_setup_true_lang-D1eQ3i5D.js} +86 -77
- package/dist/Segment-lgzMRCyd.js +564 -0
- package/dist/{Setting-DLB2ywCp.js → Setting-CFGB53S0.js} +7 -7
- package/dist/Store-fJlew3HJ.js +1533 -0
- package/dist/{StoreRewards-DZfqUeYR.js → StoreRewards-DWq34E4p.js} +10 -10
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js → StoreTransactions.vue_vue_type_script_setup_true_lang-nhS5Dhhk.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DWlpmE56.js} +1 -1
- package/dist/{Tier-BnQRujpX.js → Tier-DLrOmrnK.js} +13 -13
- package/dist/{Title-BPf1tUFx.js → Title-MHQuel7h.js} +13 -13
- package/dist/{Transaction-ese0oNrz.js → Transaction-CYqMFEzc.js} +1 -1
- package/dist/{Voucher--gtOZQx1.js → Voucher-B0QCX_nG.js} +10 -10
- package/dist/{app-DHE61XdR.js → app-BjOpRVdv.js} +1 -1
- package/dist/{app-Bt59niI-.js → app-SOHUUM08.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{business-BSo7EPan.js → business-DveMDDHY.js} +1 -1
- package/dist/{campaign-CsOje3Ap.js → campaign-CMb05XLt.js} +2 -2
- package/dist/{collection.fn-BYQfFJOr.js → collection.fn-BjaBPYMU.js} +2 -2
- package/dist/{dto-CfEXSCq6.js → dto-CY7JrHkZ.js} +8 -8
- package/dist/{effect-Bn_ofYS3.js → effect-CxAdSlyD.js} +1 -1
- package/dist/email-addresses-Dtr5OALQ.js +705 -0
- package/dist/{export-CMR243CF.js → export-DuBekrcg.js} +3 -3
- package/dist/{helper-BqOQRtvW.js → helper-DL6hnmtJ.js} +1 -1
- package/dist/{index-CHO4_zsT.js → index-BBBytzpn.js} +1 -1
- package/dist/{index-DbP04yeg.js → index-BMxu_XL-.js} +1 -1
- package/dist/index-BSIUoSG3.js +28997 -0
- package/dist/{index-BaBNmzUb.js → index-BZAlqAaJ.js} +1 -1
- package/dist/{index-D_f2lmK2.js → index-CAQpU5Rv.js} +319 -304
- package/dist/{index-BWnFs-Cb.js → index-CGHNWhkM.js} +5 -5
- package/dist/{index-Boo5np6l.js → index-CgPlJqkX.js} +1 -1
- package/dist/{index-DtPe-TEm.js → index-Cibwzgac.js} +3 -3
- package/dist/{index-DEZsrQ2f.js → index-DISwCnfH.js} +3 -3
- package/dist/{index-CC1GV8OW.js → index-Dx4pkNRc.js} +1 -1
- package/dist/{index-Da142OER.js → index-gcsOy_cD.js} +34 -33
- package/dist/{index-FvlaxwGB.js → index-raYm7Ew2.js} +2 -2
- package/dist/{index.esm2017-ePm--Atp.js → index.esm2017-Bs9CWbrs.js} +1 -1
- package/dist/{loading-KNmEMBUB.js → loading-Dj5bx8fg.js} +4 -4
- package/dist/{membership-DKoVIS1a.js → membership-B2avlZoN.js} +3 -3
- package/dist/{money-CkD3zl5C.js → money-CNSWtAf-.js} +1 -1
- package/dist/{number-BDsGpOXm.js → number-BA58pjU6.js} +1 -1
- package/dist/{rule-CzamI50_.js → rule-BWazFYuZ.js} +179 -177
- package/dist/{rule-builder-DHf6wfaQ.js → rule-builder-RIloDQBn.js} +1 -1
- package/dist/{template-CFAIPoD7.js → template-u01r84LY.js} +4 -4
- package/dist/{xlsx-BDJMaozs.js → usePagination--B6Wt7C1.js} +3246 -3025
- package/package.json +2 -2
- package/dist/MemberList-CK9629ew.js +0 -1737
- package/dist/Segment-DpBxGuuu.js +0 -435
- package/dist/Store-8DO6ITWc.js +0 -1513
- package/dist/index-BLDYTxnc.js +0 -28058
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -2,15 +2,15 @@ import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent
|
|
|
2
2
|
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
3
|
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as an } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as an } from "./business-DveMDDHY.js";
|
|
6
|
+
import "./index-BMxu_XL-.js";
|
|
7
7
|
import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
-
import { R as f } from "./app-
|
|
8
|
+
import { R as f } from "./app-SOHUUM08.js";
|
|
9
9
|
import { J as un } from "./JsonViewer-v8_C7l5N.js";
|
|
10
|
-
import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-
|
|
10
|
+
import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-Bs9CWbrs.js";
|
|
11
11
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
12
|
-
import { S as Be } from "./index-
|
|
13
|
-
const
|
|
12
|
+
import { S as Be, c as Sn } from "./index-BSIUoSG3.js";
|
|
13
|
+
const bn = /* @__PURE__ */ lt({
|
|
14
14
|
__name: "NavigationTab",
|
|
15
15
|
setup(n) {
|
|
16
16
|
const e = te(), t = [
|
|
@@ -132,7 +132,7 @@ const Sn = /* @__PURE__ */ lt({
|
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
|
-
var
|
|
135
|
+
var Rn = "firebase", Pn = "10.12.4";
|
|
136
136
|
/**
|
|
137
137
|
* @license
|
|
138
138
|
* Copyright 2020 Google LLC
|
|
@@ -149,13 +149,13 @@ var bn = "firebase", Rn = "10.12.4";
|
|
|
149
149
|
* See the License for the specific language governing permissions and
|
|
150
150
|
* limitations under the License.
|
|
151
151
|
*/
|
|
152
|
-
ye(
|
|
152
|
+
ye(Rn, Pn, "app");
|
|
153
153
|
function gt() {
|
|
154
154
|
return {
|
|
155
155
|
"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."
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const An = gt, _t = new be("auth", "Firebase", gt());
|
|
159
159
|
/**
|
|
160
160
|
* @license
|
|
161
161
|
* Copyright 2020 Google LLC
|
|
@@ -173,7 +173,7 @@ const Pn = gt, _t = new be("auth", "Firebase", gt());
|
|
|
173
173
|
* limitations under the License.
|
|
174
174
|
*/
|
|
175
175
|
const ae = new dn("@firebase/auth");
|
|
176
|
-
function
|
|
176
|
+
function Cn(n, ...e) {
|
|
177
177
|
ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
|
|
178
178
|
}
|
|
179
179
|
function ie(n, ...e) {
|
|
@@ -202,7 +202,7 @@ function I(n, ...e) {
|
|
|
202
202
|
return Ae(n, ...e);
|
|
203
203
|
}
|
|
204
204
|
function vt(n, e, t) {
|
|
205
|
-
const i = Object.assign(Object.assign({},
|
|
205
|
+
const i = Object.assign(Object.assign({}, An()), { [e]: t });
|
|
206
206
|
return new be("auth", "Firebase", i).create(e, {
|
|
207
207
|
appName: n.name
|
|
208
208
|
});
|
|
@@ -248,7 +248,7 @@ function Ee() {
|
|
|
248
248
|
var n;
|
|
249
249
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function On() {
|
|
252
252
|
return qe() === "http:" || qe() === "https:";
|
|
253
253
|
}
|
|
254
254
|
function qe() {
|
|
@@ -271,15 +271,15 @@ function qe() {
|
|
|
271
271
|
* See the License for the specific language governing permissions and
|
|
272
272
|
* limitations under the License.
|
|
273
273
|
*/
|
|
274
|
-
function
|
|
274
|
+
function Nn() {
|
|
275
275
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
276
276
|
// This is especially true for Cordova apps which have unreliable
|
|
277
277
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
278
278
|
// installed which overwrites the native navigator.onLine value and
|
|
279
279
|
// defines navigator.connection.
|
|
280
|
-
(
|
|
280
|
+
(On() || pn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Ln() {
|
|
283
283
|
if (typeof navigator > "u")
|
|
284
284
|
return null;
|
|
285
285
|
const n = navigator;
|
|
@@ -312,7 +312,7 @@ class J {
|
|
|
312
312
|
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = hn() || fn();
|
|
313
313
|
}
|
|
314
314
|
get() {
|
|
315
|
-
return
|
|
315
|
+
return Nn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
@@ -406,7 +406,7 @@ class It {
|
|
|
406
406
|
* See the License for the specific language governing permissions and
|
|
407
407
|
* limitations under the License.
|
|
408
408
|
*/
|
|
409
|
-
const
|
|
409
|
+
const Mn = {
|
|
410
410
|
// Custom token errors.
|
|
411
411
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
412
412
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -497,7 +497,7 @@ const Ln = {
|
|
|
497
497
|
* See the License for the specific language governing permissions and
|
|
498
498
|
* limitations under the License.
|
|
499
499
|
*/
|
|
500
|
-
const
|
|
500
|
+
const Un = new J(3e4, 6e4);
|
|
501
501
|
function he(n, e) {
|
|
502
502
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
503
503
|
}
|
|
@@ -523,9 +523,9 @@ async function G(n, e, t, i, r = {}) {
|
|
|
523
523
|
}
|
|
524
524
|
async function Tt(n, e, t) {
|
|
525
525
|
n._canInitEmulator = !1;
|
|
526
|
-
const i = Object.assign(Object.assign({},
|
|
526
|
+
const i = Object.assign(Object.assign({}, Mn), e);
|
|
527
527
|
try {
|
|
528
|
-
const r = new
|
|
528
|
+
const r = new Dn(n), s = await Promise.race([
|
|
529
529
|
t(),
|
|
530
530
|
r.promise
|
|
531
531
|
]);
|
|
@@ -564,14 +564,14 @@ function yt(n, e, t, i) {
|
|
|
564
564
|
const r = `${e}${t}?${i}`;
|
|
565
565
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
566
566
|
}
|
|
567
|
-
class
|
|
567
|
+
class Dn {
|
|
568
568
|
constructor(e) {
|
|
569
569
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
570
570
|
this.timer = setTimeout(() => i(I(
|
|
571
571
|
this.auth,
|
|
572
572
|
"network-request-failed"
|
|
573
573
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
574
|
-
)),
|
|
574
|
+
)), Un.get());
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
577
|
clearNetworkTimeout() {
|
|
@@ -602,7 +602,7 @@ function ee(n, e, t) {
|
|
|
602
602
|
* See the License for the specific language governing permissions and
|
|
603
603
|
* limitations under the License.
|
|
604
604
|
*/
|
|
605
|
-
async function
|
|
605
|
+
async function Fn(n, e) {
|
|
606
606
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
607
607
|
}
|
|
608
608
|
async function Et(n, e) {
|
|
@@ -633,7 +633,7 @@ function B(n) {
|
|
|
633
633
|
} catch {
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
async function
|
|
636
|
+
async function xn(n, e = !1) {
|
|
637
637
|
const t = j(n), i = await t.getIdToken(e), r = Oe(i);
|
|
638
638
|
u(
|
|
639
639
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -704,10 +704,10 @@ async function q(n, e, t = !1) {
|
|
|
704
704
|
try {
|
|
705
705
|
return await e;
|
|
706
706
|
} catch (i) {
|
|
707
|
-
throw i instanceof Re &&
|
|
707
|
+
throw i instanceof Re && Vn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Vn({ code: n }) {
|
|
711
711
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
712
712
|
}
|
|
713
713
|
/**
|
|
@@ -726,7 +726,7 @@ function xn({ code: n }) {
|
|
|
726
726
|
* See the License for the specific language governing permissions and
|
|
727
727
|
* limitations under the License.
|
|
728
728
|
*/
|
|
729
|
-
class
|
|
729
|
+
class Hn {
|
|
730
730
|
constructor(e) {
|
|
731
731
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
732
732
|
}
|
|
@@ -832,7 +832,7 @@ async function ce(n) {
|
|
|
832
832
|
);
|
|
833
833
|
const s = r.users[0];
|
|
834
834
|
n._notifyReloadListener(s);
|
|
835
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c =
|
|
835
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = Wn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
836
836
|
uid: s.localId,
|
|
837
837
|
displayName: s.displayName || null,
|
|
838
838
|
photoURL: s.photoUrl || null,
|
|
@@ -846,11 +846,11 @@ async function ce(n) {
|
|
|
846
846
|
};
|
|
847
847
|
Object.assign(n, h);
|
|
848
848
|
}
|
|
849
|
-
async function
|
|
849
|
+
async function $n(n) {
|
|
850
850
|
const e = j(n);
|
|
851
851
|
await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Wn(n, e) {
|
|
854
854
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
855
855
|
}
|
|
856
856
|
function kt(n) {
|
|
@@ -882,7 +882,7 @@ function kt(n) {
|
|
|
882
882
|
* See the License for the specific language governing permissions and
|
|
883
883
|
* limitations under the License.
|
|
884
884
|
*/
|
|
885
|
-
async function
|
|
885
|
+
async function jn(n, e) {
|
|
886
886
|
const t = await Tt(n, {}, async () => {
|
|
887
887
|
const i = K({
|
|
888
888
|
grant_type: "refresh_token",
|
|
@@ -903,7 +903,7 @@ async function Wn(n, e) {
|
|
|
903
903
|
refreshToken: t.refresh_token
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
async function
|
|
906
|
+
async function Gn(n, e) {
|
|
907
907
|
return G(n, "POST", "/v2/accounts:revokeToken", he(n, e));
|
|
908
908
|
}
|
|
909
909
|
/**
|
|
@@ -967,7 +967,7 @@ class H {
|
|
|
967
967
|
this.refreshToken = null;
|
|
968
968
|
}
|
|
969
969
|
async refresh(e, t) {
|
|
970
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
970
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await jn(e, t);
|
|
971
971
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
972
972
|
}
|
|
973
973
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1022,7 +1022,7 @@ function R(n, e) {
|
|
|
1022
1022
|
class E {
|
|
1023
1023
|
constructor(e) {
|
|
1024
1024
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
|
|
1025
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1025
|
+
this.providerId = "firebase", this.proactiveRefresh = new Hn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new ke(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1026
1026
|
}
|
|
1027
1027
|
async getIdToken(e) {
|
|
1028
1028
|
const t = await q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1034,10 +1034,10 @@ class E {
|
|
|
1034
1034
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1035
1035
|
}
|
|
1036
1036
|
getIdTokenResult(e) {
|
|
1037
|
-
return
|
|
1037
|
+
return xn(this, e);
|
|
1038
1038
|
}
|
|
1039
1039
|
reload() {
|
|
1040
|
-
return
|
|
1040
|
+
return $n(this);
|
|
1041
1041
|
}
|
|
1042
1042
|
_assign(e) {
|
|
1043
1043
|
this !== e && (u(
|
|
@@ -1076,7 +1076,7 @@ class E {
|
|
|
1076
1076
|
if (w(this.auth.app))
|
|
1077
1077
|
return Promise.reject(L(this.auth));
|
|
1078
1078
|
const e = await this.getIdToken();
|
|
1079
|
-
return await q(this,
|
|
1079
|
+
return await q(this, Fn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1080
1080
|
}
|
|
1081
1081
|
toJSON() {
|
|
1082
1082
|
return Object.assign(Object.assign({
|
|
@@ -1406,17 +1406,17 @@ function Ot(n = g()) {
|
|
|
1406
1406
|
function fe(n = g()) {
|
|
1407
1407
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function Bn(n = g()) {
|
|
1410
1410
|
var e;
|
|
1411
1411
|
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function qn() {
|
|
1414
1414
|
return Tn() && document.documentMode === 10;
|
|
1415
1415
|
}
|
|
1416
1416
|
function Nt(n = g()) {
|
|
1417
1417
|
return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function zn() {
|
|
1420
1420
|
try {
|
|
1421
1421
|
return !!(window && window !== window.top);
|
|
1422
1422
|
} catch {
|
|
@@ -1470,7 +1470,7 @@ function Lt(n, e = []) {
|
|
|
1470
1470
|
* See the License for the specific language governing permissions and
|
|
1471
1471
|
* limitations under the License.
|
|
1472
1472
|
*/
|
|
1473
|
-
class
|
|
1473
|
+
class Kn {
|
|
1474
1474
|
constructor(e) {
|
|
1475
1475
|
this.auth = e, this.queue = [];
|
|
1476
1476
|
}
|
|
@@ -1525,7 +1525,7 @@ class zn {
|
|
|
1525
1525
|
* See the License for the specific language governing permissions and
|
|
1526
1526
|
* limitations under the License.
|
|
1527
1527
|
*/
|
|
1528
|
-
async function
|
|
1528
|
+
async function Jn(n, e = {}) {
|
|
1529
1529
|
return G(n, "GET", "/v2/passwordPolicy", he(n, e));
|
|
1530
1530
|
}
|
|
1531
1531
|
/**
|
|
@@ -1544,12 +1544,12 @@ async function Kn(n, e = {}) {
|
|
|
1544
1544
|
* See the License for the specific language governing permissions and
|
|
1545
1545
|
* limitations under the License.
|
|
1546
1546
|
*/
|
|
1547
|
-
const
|
|
1548
|
-
class
|
|
1547
|
+
const Yn = 6;
|
|
1548
|
+
class Xn {
|
|
1549
1549
|
constructor(e) {
|
|
1550
1550
|
var t, i, r, s;
|
|
1551
1551
|
const o = e.customStrengthOptions;
|
|
1552
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1552
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Yn, 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;
|
|
1553
1553
|
}
|
|
1554
1554
|
validatePassword(e) {
|
|
1555
1555
|
var t, i, r, s, o, c;
|
|
@@ -1632,9 +1632,9 @@ class Yn {
|
|
|
1632
1632
|
* See the License for the specific language governing permissions and
|
|
1633
1633
|
* limitations under the License.
|
|
1634
1634
|
*/
|
|
1635
|
-
class
|
|
1635
|
+
class Qn {
|
|
1636
1636
|
constructor(e, t, i, r) {
|
|
1637
|
-
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
|
|
1637
|
+
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 Kn(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;
|
|
1638
1638
|
}
|
|
1639
1639
|
_initializeWithPersistence(e, t) {
|
|
1640
1640
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1728,7 +1728,7 @@ class Xn {
|
|
|
1728
1728
|
return this.directlySetCurrentUser(e);
|
|
1729
1729
|
}
|
|
1730
1730
|
useDeviceLanguage() {
|
|
1731
|
-
this.languageCode =
|
|
1731
|
+
this.languageCode = Ln();
|
|
1732
1732
|
}
|
|
1733
1733
|
async _delete() {
|
|
1734
1734
|
this._deleted = !0;
|
|
@@ -1779,7 +1779,7 @@ class Xn {
|
|
|
1779
1779
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1780
1780
|
}
|
|
1781
1781
|
async _updatePasswordPolicy() {
|
|
1782
|
-
const e = await
|
|
1782
|
+
const e = await Jn(this), t = new Xn(e);
|
|
1783
1783
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1784
1784
|
}
|
|
1785
1785
|
_getPersistence() {
|
|
@@ -1819,7 +1819,7 @@ class Xn {
|
|
|
1819
1819
|
token: e,
|
|
1820
1820
|
idToken: t
|
|
1821
1821
|
};
|
|
1822
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1822
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Gn(this, i);
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
1825
|
toJSON() {
|
|
@@ -1962,7 +1962,7 @@ class Xn {
|
|
|
1962
1962
|
async _getAppCheckToken() {
|
|
1963
1963
|
var e;
|
|
1964
1964
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1965
|
-
return t != null && t.error &&
|
|
1965
|
+
return t != null && t.error && Cn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
function pe(n) {
|
|
@@ -2005,16 +2005,16 @@ let Le = {
|
|
|
2005
2005
|
recaptchaEnterpriseScript: "",
|
|
2006
2006
|
gapiScript: ""
|
|
2007
2007
|
};
|
|
2008
|
-
function
|
|
2008
|
+
function Zn(n) {
|
|
2009
2009
|
Le = n;
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function ei(n) {
|
|
2012
2012
|
return Le.loadJS(n);
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2014
|
+
function ti() {
|
|
2015
2015
|
return Le.gapiScript;
|
|
2016
2016
|
}
|
|
2017
|
-
function
|
|
2017
|
+
function ni(n) {
|
|
2018
2018
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2019
2019
|
}
|
|
2020
2020
|
/**
|
|
@@ -2033,7 +2033,7 @@ function ti(n) {
|
|
|
2033
2033
|
* See the License for the specific language governing permissions and
|
|
2034
2034
|
* limitations under the License.
|
|
2035
2035
|
*/
|
|
2036
|
-
function
|
|
2036
|
+
function ii(n, e) {
|
|
2037
2037
|
const t = pt(n, "auth");
|
|
2038
2038
|
if (t.isInitialized()) {
|
|
2039
2039
|
const r = t.getImmediate(), s = t.getOptions();
|
|
@@ -2047,11 +2047,11 @@ function ni(n, e) {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
return t.initialize({ options: e });
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2050
|
+
function ri(n, e) {
|
|
2051
2051
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
|
|
2052
2052
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2053
2053
|
}
|
|
2054
|
-
function
|
|
2054
|
+
function si(n, e, t) {
|
|
2055
2055
|
const i = pe(n);
|
|
2056
2056
|
u(
|
|
2057
2057
|
i._canInitEmulator,
|
|
@@ -2064,19 +2064,19 @@ function ri(n, e, t) {
|
|
|
2064
2064
|
"invalid-emulator-scheme"
|
|
2065
2065
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2066
2066
|
);
|
|
2067
|
-
const r = !1, s = Mt(e), { host: o, port: c } =
|
|
2067
|
+
const r = !1, s = Mt(e), { host: o, port: c } = oi(e), a = c === null ? "" : `:${c}`;
|
|
2068
2068
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2069
2069
|
host: o,
|
|
2070
2070
|
port: c,
|
|
2071
2071
|
protocol: s.replace(":", ""),
|
|
2072
2072
|
options: Object.freeze({ disableWarnings: r })
|
|
2073
|
-
}),
|
|
2073
|
+
}), ai();
|
|
2074
2074
|
}
|
|
2075
2075
|
function Mt(n) {
|
|
2076
2076
|
const e = n.indexOf(":");
|
|
2077
2077
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function oi(n) {
|
|
2080
2080
|
const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2081
2081
|
if (!t)
|
|
2082
2082
|
return { host: "", port: null };
|
|
@@ -2095,7 +2095,7 @@ function Qe(n) {
|
|
|
2095
2095
|
const e = Number(n);
|
|
2096
2096
|
return isNaN(e) ? null : e;
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2098
|
+
function ai() {
|
|
2099
2099
|
function n() {
|
|
2100
2100
|
const e = document.createElement("p"), t = e.style;
|
|
2101
2101
|
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);
|
|
@@ -2179,7 +2179,7 @@ async function W(n, e) {
|
|
|
2179
2179
|
* See the License for the specific language governing permissions and
|
|
2180
2180
|
* limitations under the License.
|
|
2181
2181
|
*/
|
|
2182
|
-
const
|
|
2182
|
+
const ci = "http://localhost";
|
|
2183
2183
|
class U extends Ut {
|
|
2184
2184
|
constructor() {
|
|
2185
2185
|
super(...arguments), this.pendingToken = null;
|
|
@@ -2237,7 +2237,7 @@ class U extends Ut {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
buildRequest() {
|
|
2239
2239
|
const e = {
|
|
2240
|
-
requestUri:
|
|
2240
|
+
requestUri: ci,
|
|
2241
2241
|
returnSecureToken: !0
|
|
2242
2242
|
};
|
|
2243
2243
|
if (this.pendingToken)
|
|
@@ -2699,7 +2699,7 @@ function Ft(n, e, t, i) {
|
|
|
2699
2699
|
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2700
2700
|
});
|
|
2701
2701
|
}
|
|
2702
|
-
async function
|
|
2702
|
+
async function li(n, e, t = !1) {
|
|
2703
2703
|
const i = await q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2704
2704
|
return D._forOperation(n, "link", i);
|
|
2705
2705
|
}
|
|
@@ -2719,7 +2719,7 @@ async function ci(n, e, t = !1) {
|
|
|
2719
2719
|
* See the License for the specific language governing permissions and
|
|
2720
2720
|
* limitations under the License.
|
|
2721
2721
|
*/
|
|
2722
|
-
async function
|
|
2722
|
+
async function ui(n, e, t = !1) {
|
|
2723
2723
|
const { auth: i } = n;
|
|
2724
2724
|
if (w(i.app))
|
|
2725
2725
|
return Promise.reject(L(i));
|
|
@@ -2770,7 +2770,7 @@ async function li(n, e, t = !1) {
|
|
|
2770
2770
|
* See the License for the specific language governing permissions and
|
|
2771
2771
|
* limitations under the License.
|
|
2772
2772
|
*/
|
|
2773
|
-
async function
|
|
2773
|
+
async function di(n, e, t = !1) {
|
|
2774
2774
|
if (w(n.app))
|
|
2775
2775
|
return Promise.reject(L(n));
|
|
2776
2776
|
const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
@@ -2792,7 +2792,7 @@ async function ui(n, e, t = !1) {
|
|
|
2792
2792
|
* See the License for the specific language governing permissions and
|
|
2793
2793
|
* limitations under the License.
|
|
2794
2794
|
*/
|
|
2795
|
-
async function
|
|
2795
|
+
async function hi(n, e) {
|
|
2796
2796
|
return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2797
2797
|
}
|
|
2798
2798
|
/**
|
|
@@ -2811,19 +2811,19 @@ async function di(n, e) {
|
|
|
2811
2811
|
* See the License for the specific language governing permissions and
|
|
2812
2812
|
* limitations under the License.
|
|
2813
2813
|
*/
|
|
2814
|
-
async function
|
|
2814
|
+
async function fi(n, e) {
|
|
2815
2815
|
if (w(n.app))
|
|
2816
2816
|
return Promise.reject(L(n));
|
|
2817
|
-
const t = pe(n), i = await
|
|
2817
|
+
const t = pe(n), i = await hi(t, {
|
|
2818
2818
|
token: e,
|
|
2819
2819
|
returnSecureToken: !0
|
|
2820
2820
|
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2821
2821
|
return await t._updateCurrentUser(r.user), r;
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2823
|
+
function pi(n, e, t, i) {
|
|
2824
2824
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2825
2825
|
}
|
|
2826
|
-
function
|
|
2826
|
+
function mi(n, e, t) {
|
|
2827
2827
|
return j(n).beforeAuthStateChanged(e, t);
|
|
2828
2828
|
}
|
|
2829
2829
|
const ue = "__sak";
|
|
@@ -2884,18 +2884,18 @@ class xt {
|
|
|
2884
2884
|
* See the License for the specific language governing permissions and
|
|
2885
2885
|
* limitations under the License.
|
|
2886
2886
|
*/
|
|
2887
|
-
function
|
|
2887
|
+
function gi() {
|
|
2888
2888
|
const n = g();
|
|
2889
2889
|
return Ne(n) || fe(n);
|
|
2890
2890
|
}
|
|
2891
|
-
const
|
|
2891
|
+
const _i = 1e3, vi = 10;
|
|
2892
2892
|
class Vt extends xt {
|
|
2893
2893
|
constructor() {
|
|
2894
2894
|
super(
|
|
2895
2895
|
() => window.localStorage,
|
|
2896
2896
|
"LOCAL"
|
|
2897
2897
|
/* PersistenceType.LOCAL */
|
|
2898
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2898
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = gi() && zn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
|
|
2899
2899
|
}
|
|
2900
2900
|
forAllChangedKeys(e) {
|
|
2901
2901
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2922,7 +2922,7 @@ class Vt extends xt {
|
|
|
2922
2922
|
const o = this.storage.getItem(i);
|
|
2923
2923
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2924
2924
|
}, s = this.storage.getItem(i);
|
|
2925
|
-
|
|
2925
|
+
qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, vi) : r();
|
|
2926
2926
|
}
|
|
2927
2927
|
notifyListeners(e, t) {
|
|
2928
2928
|
this.localCache[e] = t;
|
|
@@ -2944,7 +2944,7 @@ class Vt extends xt {
|
|
|
2944
2944
|
!0
|
|
2945
2945
|
);
|
|
2946
2946
|
});
|
|
2947
|
-
},
|
|
2947
|
+
}, _i);
|
|
2948
2948
|
}
|
|
2949
2949
|
stopPolling() {
|
|
2950
2950
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2974,7 +2974,7 @@ class Vt extends xt {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
2976
|
Vt.type = "LOCAL";
|
|
2977
|
-
const
|
|
2977
|
+
const Ii = Vt;
|
|
2978
2978
|
/**
|
|
2979
2979
|
* @license
|
|
2980
2980
|
* Copyright 2020 Google LLC
|
|
@@ -3022,7 +3022,7 @@ const $t = Ht;
|
|
|
3022
3022
|
* See the License for the specific language governing permissions and
|
|
3023
3023
|
* limitations under the License.
|
|
3024
3024
|
*/
|
|
3025
|
-
function
|
|
3025
|
+
function Ti(n) {
|
|
3026
3026
|
return Promise.all(n.map(async (e) => {
|
|
3027
3027
|
try {
|
|
3028
3028
|
return {
|
|
@@ -3092,7 +3092,7 @@ class me {
|
|
|
3092
3092
|
eventId: i,
|
|
3093
3093
|
eventType: r
|
|
3094
3094
|
});
|
|
3095
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3095
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ti(c);
|
|
3096
3096
|
t.ports[0].postMessage({
|
|
3097
3097
|
status: "done",
|
|
3098
3098
|
eventId: i,
|
|
@@ -3160,7 +3160,7 @@ function Me(n = "", e = 10) {
|
|
|
3160
3160
|
* See the License for the specific language governing permissions and
|
|
3161
3161
|
* limitations under the License.
|
|
3162
3162
|
*/
|
|
3163
|
-
class
|
|
3163
|
+
class wi {
|
|
3164
3164
|
constructor(e) {
|
|
3165
3165
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3166
3166
|
}
|
|
@@ -3260,7 +3260,7 @@ class Ti {
|
|
|
3260
3260
|
function T() {
|
|
3261
3261
|
return window;
|
|
3262
3262
|
}
|
|
3263
|
-
function
|
|
3263
|
+
function yi(n) {
|
|
3264
3264
|
T().location.href = n;
|
|
3265
3265
|
}
|
|
3266
3266
|
/**
|
|
@@ -3282,7 +3282,7 @@ function wi(n) {
|
|
|
3282
3282
|
function Wt() {
|
|
3283
3283
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3284
3284
|
}
|
|
3285
|
-
async function
|
|
3285
|
+
async function Ei() {
|
|
3286
3286
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3287
3287
|
return null;
|
|
3288
3288
|
try {
|
|
@@ -3291,11 +3291,11 @@ async function yi() {
|
|
|
3291
3291
|
return null;
|
|
3292
3292
|
}
|
|
3293
3293
|
}
|
|
3294
|
-
function
|
|
3294
|
+
function ki() {
|
|
3295
3295
|
var n;
|
|
3296
3296
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3297
3297
|
}
|
|
3298
|
-
function
|
|
3298
|
+
function Si() {
|
|
3299
3299
|
return Wt() ? self : null;
|
|
3300
3300
|
}
|
|
3301
3301
|
/**
|
|
@@ -3314,7 +3314,7 @@ function ki() {
|
|
|
3314
3314
|
* See the License for the specific language governing permissions and
|
|
3315
3315
|
* limitations under the License.
|
|
3316
3316
|
*/
|
|
3317
|
-
const jt = "firebaseLocalStorageDb",
|
|
3317
|
+
const jt = "firebaseLocalStorageDb", bi = 1, de = "firebaseLocalStorage", Gt = "fbase_key";
|
|
3318
3318
|
class X {
|
|
3319
3319
|
constructor(e) {
|
|
3320
3320
|
this.request = e;
|
|
@@ -3332,12 +3332,12 @@ class X {
|
|
|
3332
3332
|
function ge(n, e) {
|
|
3333
3333
|
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3334
3334
|
}
|
|
3335
|
-
function
|
|
3335
|
+
function Ri() {
|
|
3336
3336
|
const n = indexedDB.deleteDatabase(jt);
|
|
3337
3337
|
return new X(n).toPromise();
|
|
3338
3338
|
}
|
|
3339
3339
|
function Se() {
|
|
3340
|
-
const n = indexedDB.open(jt,
|
|
3340
|
+
const n = indexedDB.open(jt, bi);
|
|
3341
3341
|
return new Promise((e, t) => {
|
|
3342
3342
|
n.addEventListener("error", () => {
|
|
3343
3343
|
t(n.error);
|
|
@@ -3350,7 +3350,7 @@ function Se() {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
}), n.addEventListener("success", async () => {
|
|
3352
3352
|
const i = n.result;
|
|
3353
|
-
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await
|
|
3353
|
+
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await Ri(), e(await Se()));
|
|
3354
3354
|
});
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
@@ -3361,7 +3361,7 @@ async function et(n, e, t) {
|
|
|
3361
3361
|
});
|
|
3362
3362
|
return new X(i).toPromise();
|
|
3363
3363
|
}
|
|
3364
|
-
async function
|
|
3364
|
+
async function Pi(n, e) {
|
|
3365
3365
|
const t = ge(n, !1).get(e), i = await new X(t).toPromise();
|
|
3366
3366
|
return i === void 0 ? null : i.value;
|
|
3367
3367
|
}
|
|
@@ -3369,7 +3369,7 @@ function tt(n, e) {
|
|
|
3369
3369
|
const t = ge(n, !0).delete(e);
|
|
3370
3370
|
return new X(t).toPromise();
|
|
3371
3371
|
}
|
|
3372
|
-
const
|
|
3372
|
+
const Ai = 800, Ci = 3;
|
|
3373
3373
|
class Bt {
|
|
3374
3374
|
constructor() {
|
|
3375
3375
|
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(() => {
|
|
@@ -3386,7 +3386,7 @@ class Bt {
|
|
|
3386
3386
|
const i = await this._openDb();
|
|
3387
3387
|
return await e(i);
|
|
3388
3388
|
} catch (i) {
|
|
3389
|
-
if (t++ >
|
|
3389
|
+
if (t++ > Ci)
|
|
3390
3390
|
throw i;
|
|
3391
3391
|
this.db && (this.db.close(), this.db = void 0);
|
|
3392
3392
|
}
|
|
@@ -3402,7 +3402,7 @@ class Bt {
|
|
|
3402
3402
|
* As the worker we should listen to events from the main window.
|
|
3403
3403
|
*/
|
|
3404
3404
|
async initializeReceiver() {
|
|
3405
|
-
this.receiver = me._getInstance(
|
|
3405
|
+
this.receiver = me._getInstance(Si()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3406
3406
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3407
3407
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3408
3408
|
"keyChanged"
|
|
@@ -3418,9 +3418,9 @@ class Bt {
|
|
|
3418
3418
|
*/
|
|
3419
3419
|
async initializeSender() {
|
|
3420
3420
|
var e, t;
|
|
3421
|
-
if (this.activeServiceWorker = await
|
|
3421
|
+
if (this.activeServiceWorker = await Ei(), !this.activeServiceWorker)
|
|
3422
3422
|
return;
|
|
3423
|
-
this.sender = new
|
|
3423
|
+
this.sender = new wi(this.activeServiceWorker);
|
|
3424
3424
|
const i = await this.sender._send(
|
|
3425
3425
|
"ping",
|
|
3426
3426
|
{},
|
|
@@ -3442,7 +3442,7 @@ class Bt {
|
|
|
3442
3442
|
* @param key - Storage key which changed.
|
|
3443
3443
|
*/
|
|
3444
3444
|
async notifyServiceWorker(e) {
|
|
3445
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3445
|
+
if (!(!this.sender || !this.activeServiceWorker || ki() !== this.activeServiceWorker))
|
|
3446
3446
|
try {
|
|
3447
3447
|
await this.sender._send(
|
|
3448
3448
|
"keyChanged",
|
|
@@ -3476,7 +3476,7 @@ class Bt {
|
|
|
3476
3476
|
return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3477
3477
|
}
|
|
3478
3478
|
async _get(e) {
|
|
3479
|
-
const t = await this._withRetries((i) =>
|
|
3479
|
+
const t = await this._withRetries((i) => Pi(i, e));
|
|
3480
3480
|
return this.localCache[e] = t, t;
|
|
3481
3481
|
}
|
|
3482
3482
|
async _remove(e) {
|
|
@@ -3507,7 +3507,7 @@ class Bt {
|
|
|
3507
3507
|
r(t);
|
|
3508
3508
|
}
|
|
3509
3509
|
startPolling() {
|
|
3510
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3510
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ai);
|
|
3511
3511
|
}
|
|
3512
3512
|
stopPolling() {
|
|
3513
3513
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3520,7 +3520,7 @@ class Bt {
|
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
3522
|
Bt.type = "LOCAL";
|
|
3523
|
-
const
|
|
3523
|
+
const Oi = Bt;
|
|
3524
3524
|
new J(3e4, 6e4);
|
|
3525
3525
|
/**
|
|
3526
3526
|
* @license
|
|
@@ -3538,7 +3538,7 @@ new J(3e4, 6e4);
|
|
|
3538
3538
|
* See the License for the specific language governing permissions and
|
|
3539
3539
|
* limitations under the License.
|
|
3540
3540
|
*/
|
|
3541
|
-
function
|
|
3541
|
+
function Ni(n, e) {
|
|
3542
3542
|
return e ? k(e) : (u(
|
|
3543
3543
|
n._popupRedirectResolver,
|
|
3544
3544
|
n,
|
|
@@ -3592,26 +3592,26 @@ class Ue extends Ut {
|
|
|
3592
3592
|
return e && (t.idToken = e), t;
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
|
-
function Ni(n) {
|
|
3596
|
-
return ui(n.auth, new Ue(n), n.bypassAuthState);
|
|
3597
|
-
}
|
|
3598
3595
|
function Li(n) {
|
|
3596
|
+
return di(n.auth, new Ue(n), n.bypassAuthState);
|
|
3597
|
+
}
|
|
3598
|
+
function Mi(n) {
|
|
3599
3599
|
const { auth: e, user: t } = n;
|
|
3600
3600
|
return u(
|
|
3601
3601
|
t,
|
|
3602
3602
|
e,
|
|
3603
3603
|
"internal-error"
|
|
3604
3604
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3605
|
-
),
|
|
3605
|
+
), ui(t, new Ue(n), n.bypassAuthState);
|
|
3606
3606
|
}
|
|
3607
|
-
async function
|
|
3607
|
+
async function Ui(n) {
|
|
3608
3608
|
const { auth: e, user: t } = n;
|
|
3609
3609
|
return u(
|
|
3610
3610
|
t,
|
|
3611
3611
|
e,
|
|
3612
3612
|
"internal-error"
|
|
3613
3613
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3614
|
-
),
|
|
3614
|
+
), li(t, new Ue(n), n.bypassAuthState);
|
|
3615
3615
|
}
|
|
3616
3616
|
/**
|
|
3617
3617
|
* @license
|
|
@@ -3671,13 +3671,13 @@ class qt {
|
|
|
3671
3671
|
switch (e) {
|
|
3672
3672
|
case "signInViaPopup":
|
|
3673
3673
|
case "signInViaRedirect":
|
|
3674
|
-
return
|
|
3674
|
+
return Li;
|
|
3675
3675
|
case "linkViaPopup":
|
|
3676
3676
|
case "linkViaRedirect":
|
|
3677
|
-
return
|
|
3677
|
+
return Ui;
|
|
3678
3678
|
case "reauthViaPopup":
|
|
3679
3679
|
case "reauthViaRedirect":
|
|
3680
|
-
return
|
|
3680
|
+
return Mi;
|
|
3681
3681
|
default:
|
|
3682
3682
|
S(
|
|
3683
3683
|
this.auth,
|
|
@@ -3712,7 +3712,7 @@ class qt {
|
|
|
3712
3712
|
* See the License for the specific language governing permissions and
|
|
3713
3713
|
* limitations under the License.
|
|
3714
3714
|
*/
|
|
3715
|
-
const
|
|
3715
|
+
const Di = new J(2e3, 1e4);
|
|
3716
3716
|
class V extends qt {
|
|
3717
3717
|
constructor(e, t, i, r, s) {
|
|
3718
3718
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3776,7 +3776,7 @@ class V extends qt {
|
|
|
3776
3776
|
);
|
|
3777
3777
|
return;
|
|
3778
3778
|
}
|
|
3779
|
-
this.pollId = window.setTimeout(e,
|
|
3779
|
+
this.pollId = window.setTimeout(e, Di.get());
|
|
3780
3780
|
};
|
|
3781
3781
|
e();
|
|
3782
3782
|
}
|
|
@@ -3798,8 +3798,8 @@ V.currentPopupAction = null;
|
|
|
3798
3798
|
* See the License for the specific language governing permissions and
|
|
3799
3799
|
* limitations under the License.
|
|
3800
3800
|
*/
|
|
3801
|
-
const
|
|
3802
|
-
class
|
|
3801
|
+
const Fi = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3802
|
+
class xi extends qt {
|
|
3803
3803
|
constructor(e, t, i = !1) {
|
|
3804
3804
|
super(e, [
|
|
3805
3805
|
"signInViaRedirect",
|
|
@@ -3817,7 +3817,7 @@ class Fi extends qt {
|
|
|
3817
3817
|
let e = se.get(this.auth._key());
|
|
3818
3818
|
if (!e) {
|
|
3819
3819
|
try {
|
|
3820
|
-
const i = await
|
|
3820
|
+
const i = await Vi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3821
3821
|
e = () => Promise.resolve(i);
|
|
3822
3822
|
} catch (t) {
|
|
3823
3823
|
e = () => Promise.reject(t);
|
|
@@ -3845,26 +3845,26 @@ class Fi extends qt {
|
|
|
3845
3845
|
cleanUp() {
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
async function
|
|
3849
|
-
const t =
|
|
3848
|
+
async function Vi(n, e) {
|
|
3849
|
+
const t = Wi(e), i = $i(n);
|
|
3850
3850
|
if (!await i._isAvailable())
|
|
3851
3851
|
return !1;
|
|
3852
3852
|
const r = await i._get(t) === "true";
|
|
3853
3853
|
return await i._remove(t), r;
|
|
3854
3854
|
}
|
|
3855
|
-
function
|
|
3855
|
+
function Hi(n, e) {
|
|
3856
3856
|
se.set(n._key(), e);
|
|
3857
3857
|
}
|
|
3858
|
-
function
|
|
3858
|
+
function $i(n) {
|
|
3859
3859
|
return k(n._redirectPersistence);
|
|
3860
3860
|
}
|
|
3861
|
-
function
|
|
3862
|
-
return re(
|
|
3861
|
+
function Wi(n) {
|
|
3862
|
+
return re(Fi, n.config.apiKey, n.name);
|
|
3863
3863
|
}
|
|
3864
|
-
async function
|
|
3864
|
+
async function ji(n, e, t = !1) {
|
|
3865
3865
|
if (w(n.app))
|
|
3866
3866
|
return Promise.reject(L(n));
|
|
3867
|
-
const i = pe(n), r =
|
|
3867
|
+
const i = pe(n), r = Ni(i, e), o = await new xi(i, r, t).execute();
|
|
3868
3868
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3869
3869
|
}
|
|
3870
3870
|
/**
|
|
@@ -3883,8 +3883,8 @@ async function Wi(n, e, t = !1) {
|
|
|
3883
3883
|
* See the License for the specific language governing permissions and
|
|
3884
3884
|
* limitations under the License.
|
|
3885
3885
|
*/
|
|
3886
|
-
const
|
|
3887
|
-
class
|
|
3886
|
+
const Gi = 10 * 60 * 1e3;
|
|
3887
|
+
class Bi {
|
|
3888
3888
|
constructor(e) {
|
|
3889
3889
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3890
3890
|
}
|
|
@@ -3900,7 +3900,7 @@ class Gi {
|
|
|
3900
3900
|
let t = !1;
|
|
3901
3901
|
return this.consumers.forEach((i) => {
|
|
3902
3902
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3903
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3903
|
+
}), this.hasHandledPotentialRedirect || !qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3904
3904
|
}
|
|
3905
3905
|
sendToConsumer(e, t) {
|
|
3906
3906
|
var i;
|
|
@@ -3915,7 +3915,7 @@ class Gi {
|
|
|
3915
3915
|
return t.filter.includes(e.type) && i;
|
|
3916
3916
|
}
|
|
3917
3917
|
hasEventBeenHandled(e) {
|
|
3918
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3918
|
+
return Date.now() - this.lastProcessedEventTime >= Gi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
|
|
3919
3919
|
}
|
|
3920
3920
|
saveEventToCache(e) {
|
|
3921
3921
|
this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -3927,7 +3927,7 @@ function nt(n) {
|
|
|
3927
3927
|
function zt({ type: n, error: e }) {
|
|
3928
3928
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3929
3929
|
}
|
|
3930
|
-
function
|
|
3930
|
+
function qi(n) {
|
|
3931
3931
|
switch (n.type) {
|
|
3932
3932
|
case "signInViaRedirect":
|
|
3933
3933
|
case "linkViaRedirect":
|
|
@@ -3955,7 +3955,7 @@ function Bi(n) {
|
|
|
3955
3955
|
* See the License for the specific language governing permissions and
|
|
3956
3956
|
* limitations under the License.
|
|
3957
3957
|
*/
|
|
3958
|
-
async function
|
|
3958
|
+
async function zi(n, e = {}) {
|
|
3959
3959
|
return G(n, "GET", "/v1/projects", e);
|
|
3960
3960
|
}
|
|
3961
3961
|
/**
|
|
@@ -3974,14 +3974,14 @@ async function qi(n, e = {}) {
|
|
|
3974
3974
|
* See the License for the specific language governing permissions and
|
|
3975
3975
|
* limitations under the License.
|
|
3976
3976
|
*/
|
|
3977
|
-
const
|
|
3978
|
-
async function
|
|
3977
|
+
const Ki = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ji = /^https?/;
|
|
3978
|
+
async function Yi(n) {
|
|
3979
3979
|
if (n.config.emulator)
|
|
3980
3980
|
return;
|
|
3981
|
-
const { authorizedDomains: e } = await
|
|
3981
|
+
const { authorizedDomains: e } = await zi(n);
|
|
3982
3982
|
for (const t of e)
|
|
3983
3983
|
try {
|
|
3984
|
-
if (
|
|
3984
|
+
if (Xi(t))
|
|
3985
3985
|
return;
|
|
3986
3986
|
} catch {
|
|
3987
3987
|
}
|
|
@@ -3991,15 +3991,15 @@ async function Ji(n) {
|
|
|
3991
3991
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
3992
3992
|
);
|
|
3993
3993
|
}
|
|
3994
|
-
function
|
|
3994
|
+
function Xi(n) {
|
|
3995
3995
|
const e = Ee(), { protocol: t, hostname: i } = new URL(e);
|
|
3996
3996
|
if (n.startsWith("chrome-extension://")) {
|
|
3997
3997
|
const o = new URL(n);
|
|
3998
3998
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
3999
3999
|
}
|
|
4000
|
-
if (!
|
|
4000
|
+
if (!Ji.test(t))
|
|
4001
4001
|
return !1;
|
|
4002
|
-
if (
|
|
4002
|
+
if (Ki.test(n))
|
|
4003
4003
|
return i === n;
|
|
4004
4004
|
const r = n.replace(/\./g, "\\.");
|
|
4005
4005
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4020,7 +4020,7 @@ function Yi(n) {
|
|
|
4020
4020
|
* See the License for the specific language governing permissions and
|
|
4021
4021
|
* limitations under the License.
|
|
4022
4022
|
*/
|
|
4023
|
-
const
|
|
4023
|
+
const Qi = new J(3e4, 6e4);
|
|
4024
4024
|
function it() {
|
|
4025
4025
|
const n = T().___jsl;
|
|
4026
4026
|
if (n != null && n.H) {
|
|
@@ -4030,7 +4030,7 @@ function it() {
|
|
|
4030
4030
|
n.CP[t] = null;
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
|
-
function
|
|
4033
|
+
function Zi(n) {
|
|
4034
4034
|
return new Promise((e, t) => {
|
|
4035
4035
|
var i, r, s;
|
|
4036
4036
|
function o() {
|
|
@@ -4045,7 +4045,7 @@ function Qi(n) {
|
|
|
4045
4045
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4046
4046
|
));
|
|
4047
4047
|
},
|
|
4048
|
-
timeout:
|
|
4048
|
+
timeout: Qi.get()
|
|
4049
4049
|
});
|
|
4050
4050
|
}
|
|
4051
4051
|
if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4053,22 +4053,22 @@ function Qi(n) {
|
|
|
4053
4053
|
else if (!((s = T().gapi) === null || s === void 0) && s.load)
|
|
4054
4054
|
o();
|
|
4055
4055
|
else {
|
|
4056
|
-
const c =
|
|
4056
|
+
const c = ni("iframefcb");
|
|
4057
4057
|
return T()[c] = () => {
|
|
4058
4058
|
gapi.load ? o() : t(I(
|
|
4059
4059
|
n,
|
|
4060
4060
|
"network-request-failed"
|
|
4061
4061
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4062
4062
|
));
|
|
4063
|
-
},
|
|
4063
|
+
}, ei(`${ti()}?onload=${c}`).catch((a) => t(a));
|
|
4064
4064
|
}
|
|
4065
4065
|
}).catch((e) => {
|
|
4066
4066
|
throw oe = null, e;
|
|
4067
4067
|
});
|
|
4068
4068
|
}
|
|
4069
4069
|
let oe = null;
|
|
4070
|
-
function
|
|
4071
|
-
return oe = oe ||
|
|
4070
|
+
function er(n) {
|
|
4071
|
+
return oe = oe || Zi(n), oe;
|
|
4072
4072
|
}
|
|
4073
4073
|
/**
|
|
4074
4074
|
* @license
|
|
@@ -4086,7 +4086,7 @@ function Zi(n) {
|
|
|
4086
4086
|
* See the License for the specific language governing permissions and
|
|
4087
4087
|
* limitations under the License.
|
|
4088
4088
|
*/
|
|
4089
|
-
const
|
|
4089
|
+
const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe", rr = {
|
|
4090
4090
|
style: {
|
|
4091
4091
|
position: "absolute",
|
|
4092
4092
|
top: "-100px",
|
|
@@ -4095,13 +4095,13 @@ const er = new J(5e3, 15e3), tr = "__/auth/iframe", nr = "emulator/auth/iframe",
|
|
|
4095
4095
|
},
|
|
4096
4096
|
"aria-hidden": "true",
|
|
4097
4097
|
tabindex: "-1"
|
|
4098
|
-
},
|
|
4098
|
+
}, sr = /* @__PURE__ */ new Map([
|
|
4099
4099
|
["identitytoolkit.googleapis.com", "p"],
|
|
4100
4100
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4101
4101
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4102
4102
|
// test
|
|
4103
4103
|
]);
|
|
4104
|
-
function
|
|
4104
|
+
function or(n) {
|
|
4105
4105
|
const e = n.config;
|
|
4106
4106
|
u(
|
|
4107
4107
|
e.authDomain,
|
|
@@ -4109,17 +4109,17 @@ function sr(n) {
|
|
|
4109
4109
|
"auth-domain-config-required"
|
|
4110
4110
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4111
4111
|
);
|
|
4112
|
-
const t = e.emulator ? Ce(e,
|
|
4112
|
+
const t = e.emulator ? Ce(e, ir) : `https://${n.config.authDomain}/${nr}`, i = {
|
|
4113
4113
|
apiKey: e.apiKey,
|
|
4114
4114
|
appName: n.name,
|
|
4115
4115
|
v: z
|
|
4116
|
-
}, r =
|
|
4116
|
+
}, r = sr.get(n.config.apiHost);
|
|
4117
4117
|
r && (i.eid = r);
|
|
4118
4118
|
const s = n._getFrameworks();
|
|
4119
4119
|
return s.length && (i.fw = s.join(",")), `${t}?${K(i).slice(1)}`;
|
|
4120
4120
|
}
|
|
4121
|
-
async function
|
|
4122
|
-
const e = await
|
|
4121
|
+
async function ar(n) {
|
|
4122
|
+
const e = await er(n), t = T().gapi;
|
|
4123
4123
|
return u(
|
|
4124
4124
|
t,
|
|
4125
4125
|
n,
|
|
@@ -4127,9 +4127,9 @@ async function or(n) {
|
|
|
4127
4127
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4128
4128
|
), e.open({
|
|
4129
4129
|
where: document.body,
|
|
4130
|
-
url:
|
|
4130
|
+
url: or(n),
|
|
4131
4131
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4132
|
-
attributes:
|
|
4132
|
+
attributes: rr,
|
|
4133
4133
|
dontclear: !0
|
|
4134
4134
|
}, (i) => new Promise(async (r, s) => {
|
|
4135
4135
|
await i.restyle({
|
|
@@ -4142,7 +4142,7 @@ async function or(n) {
|
|
|
4142
4142
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4143
4143
|
), c = T().setTimeout(() => {
|
|
4144
4144
|
s(o);
|
|
4145
|
-
},
|
|
4145
|
+
}, tr.get());
|
|
4146
4146
|
function a() {
|
|
4147
4147
|
T().clearTimeout(c), r(i);
|
|
4148
4148
|
}
|
|
@@ -4167,12 +4167,12 @@ async function or(n) {
|
|
|
4167
4167
|
* See the License for the specific language governing permissions and
|
|
4168
4168
|
* limitations under the License.
|
|
4169
4169
|
*/
|
|
4170
|
-
const
|
|
4170
|
+
const cr = {
|
|
4171
4171
|
location: "yes",
|
|
4172
4172
|
resizable: "yes",
|
|
4173
4173
|
statusbar: "yes",
|
|
4174
4174
|
toolbar: "no"
|
|
4175
|
-
},
|
|
4175
|
+
}, lr = 500, ur = 600, dr = "_blank", hr = "http://localhost";
|
|
4176
4176
|
class rt {
|
|
4177
4177
|
constructor(e) {
|
|
4178
4178
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4185,19 +4185,19 @@ class rt {
|
|
|
4185
4185
|
}
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
|
-
function
|
|
4188
|
+
function fr(n, e, t, i = lr, r = ur) {
|
|
4189
4189
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4190
4190
|
let c = "";
|
|
4191
|
-
const a = Object.assign(Object.assign({},
|
|
4191
|
+
const a = Object.assign(Object.assign({}, cr), {
|
|
4192
4192
|
width: i.toString(),
|
|
4193
4193
|
height: r.toString(),
|
|
4194
4194
|
top: s,
|
|
4195
4195
|
left: o
|
|
4196
4196
|
}), l = g().toLowerCase();
|
|
4197
|
-
t && (c = Rt(l) ?
|
|
4197
|
+
t && (c = Rt(l) ? dr : t), bt(l) && (e = e || hr, a.scrollbars = "yes");
|
|
4198
4198
|
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4199
|
-
if (
|
|
4200
|
-
return
|
|
4199
|
+
if (Bn(l) && c !== "_self")
|
|
4200
|
+
return pr(e || "", c), new rt(null);
|
|
4201
4201
|
const h = window.open(e || "", c, d);
|
|
4202
4202
|
u(
|
|
4203
4203
|
h,
|
|
@@ -4211,7 +4211,7 @@ function hr(n, e, t, i = cr, r = lr) {
|
|
|
4211
4211
|
}
|
|
4212
4212
|
return new rt(h);
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4214
|
+
function pr(n, e) {
|
|
4215
4215
|
const t = document.createElement("a");
|
|
4216
4216
|
t.href = n, t.target = e;
|
|
4217
4217
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4233,7 +4233,7 @@ function fr(n, e) {
|
|
|
4233
4233
|
* See the License for the specific language governing permissions and
|
|
4234
4234
|
* limitations under the License.
|
|
4235
4235
|
*/
|
|
4236
|
-
const
|
|
4236
|
+
const mr = "__/auth/handler", gr = "emulator/auth/handler", _r = encodeURIComponent("fac");
|
|
4237
4237
|
async function st(n, e, t, i, r, s) {
|
|
4238
4238
|
u(
|
|
4239
4239
|
n.config.authDomain,
|
|
@@ -4267,11 +4267,11 @@ async function st(n, e, t, i, r, s) {
|
|
|
4267
4267
|
const c = o;
|
|
4268
4268
|
for (const d of Object.keys(c))
|
|
4269
4269
|
c[d] === void 0 && delete c[d];
|
|
4270
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4271
|
-
return `${
|
|
4270
|
+
const a = await n._getAppCheckToken(), l = a ? `#${_r}=${encodeURIComponent(a)}` : "";
|
|
4271
|
+
return `${vr(n)}?${K(c).slice(1)}${l}`;
|
|
4272
4272
|
}
|
|
4273
|
-
function
|
|
4274
|
-
return n.emulator ? Ce(n,
|
|
4273
|
+
function vr({ config: n }) {
|
|
4274
|
+
return n.emulator ? Ce(n, gr) : `https://${n.authDomain}/${mr}`;
|
|
4275
4275
|
}
|
|
4276
4276
|
/**
|
|
4277
4277
|
* @license
|
|
@@ -4290,9 +4290,9 @@ function _r({ config: n }) {
|
|
|
4290
4290
|
* limitations under the License.
|
|
4291
4291
|
*/
|
|
4292
4292
|
const we = "webStorageSupport";
|
|
4293
|
-
class
|
|
4293
|
+
class Ir {
|
|
4294
4294
|
constructor() {
|
|
4295
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn =
|
|
4295
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn = ji, this._overrideRedirectResult = Hi;
|
|
4296
4296
|
}
|
|
4297
4297
|
// Wrapping in async even though we don't await anywhere in order
|
|
4298
4298
|
// to make sure errors are raised as promise rejections
|
|
@@ -4300,12 +4300,12 @@ class vr {
|
|
|
4300
4300
|
var s;
|
|
4301
4301
|
b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4302
4302
|
const o = await st(e, t, i, Ee(), r);
|
|
4303
|
-
return
|
|
4303
|
+
return fr(e, o, Me());
|
|
4304
4304
|
}
|
|
4305
4305
|
async _openRedirect(e, t, i, r) {
|
|
4306
4306
|
await this._originValidation(e);
|
|
4307
4307
|
const s = await st(e, t, i, Ee(), r);
|
|
4308
|
-
return
|
|
4308
|
+
return yi(s), new Promise(() => {
|
|
4309
4309
|
});
|
|
4310
4310
|
}
|
|
4311
4311
|
_initialize(e) {
|
|
@@ -4320,7 +4320,7 @@ class vr {
|
|
|
4320
4320
|
}), i;
|
|
4321
4321
|
}
|
|
4322
4322
|
async initAndGetManager(e) {
|
|
4323
|
-
const t = await
|
|
4323
|
+
const t = await ar(e), i = new Bi(e);
|
|
4324
4324
|
return t.register("authEvent", (r) => (u(
|
|
4325
4325
|
r == null ? void 0 : r.authEvent,
|
|
4326
4326
|
e,
|
|
@@ -4344,13 +4344,13 @@ class vr {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
_originValidation(e) {
|
|
4346
4346
|
const t = e._key();
|
|
4347
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4347
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Yi(e)), this.originValidationPromises[t];
|
|
4348
4348
|
}
|
|
4349
4349
|
get _shouldInitProactively() {
|
|
4350
4350
|
return Nt() || Ne() || fe();
|
|
4351
4351
|
}
|
|
4352
4352
|
}
|
|
4353
|
-
const
|
|
4353
|
+
const Tr = Ir;
|
|
4354
4354
|
var ot = "@firebase/auth", at = "1.7.5";
|
|
4355
4355
|
/**
|
|
4356
4356
|
* @license
|
|
@@ -4368,7 +4368,7 @@ var ot = "@firebase/auth", at = "1.7.5";
|
|
|
4368
4368
|
* See the License for the specific language governing permissions and
|
|
4369
4369
|
* limitations under the License.
|
|
4370
4370
|
*/
|
|
4371
|
-
class
|
|
4371
|
+
class wr {
|
|
4372
4372
|
constructor(e) {
|
|
4373
4373
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4374
4374
|
}
|
|
@@ -4419,7 +4419,7 @@ class Tr {
|
|
|
4419
4419
|
* See the License for the specific language governing permissions and
|
|
4420
4420
|
* limitations under the License.
|
|
4421
4421
|
*/
|
|
4422
|
-
function
|
|
4422
|
+
function yr(n) {
|
|
4423
4423
|
switch (n) {
|
|
4424
4424
|
case "Node":
|
|
4425
4425
|
return "node";
|
|
@@ -4435,7 +4435,7 @@ function wr(n) {
|
|
|
4435
4435
|
return;
|
|
4436
4436
|
}
|
|
4437
4437
|
}
|
|
4438
|
-
function
|
|
4438
|
+
function Er(n) {
|
|
4439
4439
|
je(new Ge(
|
|
4440
4440
|
"auth",
|
|
4441
4441
|
(e, { options: t }) => {
|
|
@@ -4449,8 +4449,8 @@ function yr(n) {
|
|
|
4449
4449
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4450
4450
|
apiScheme: "https",
|
|
4451
4451
|
sdkClientVersion: Lt(n)
|
|
4452
|
-
}, l = new
|
|
4453
|
-
return
|
|
4452
|
+
}, l = new Qn(i, r, s, a);
|
|
4453
|
+
return ri(l, t), l;
|
|
4454
4454
|
},
|
|
4455
4455
|
"PUBLIC"
|
|
4456
4456
|
/* ComponentType.PUBLIC */
|
|
@@ -4469,14 +4469,14 @@ function yr(n) {
|
|
|
4469
4469
|
"auth"
|
|
4470
4470
|
/* _ComponentName.AUTH */
|
|
4471
4471
|
).getImmediate());
|
|
4472
|
-
return ((i) => new
|
|
4472
|
+
return ((i) => new wr(i))(t);
|
|
4473
4473
|
},
|
|
4474
4474
|
"PRIVATE"
|
|
4475
4475
|
/* ComponentType.PRIVATE */
|
|
4476
4476
|
).setInstantiationMode(
|
|
4477
4477
|
"EXPLICIT"
|
|
4478
4478
|
/* InstantiationMode.EXPLICIT */
|
|
4479
|
-
)), ye(ot, at,
|
|
4479
|
+
)), ye(ot, at, yr(n)), ye(ot, at, "esm2017");
|
|
4480
4480
|
}
|
|
4481
4481
|
/**
|
|
4482
4482
|
* @license
|
|
@@ -4494,11 +4494,11 @@ function yr(n) {
|
|
|
4494
4494
|
* See the License for the specific language governing permissions and
|
|
4495
4495
|
* limitations under the License.
|
|
4496
4496
|
*/
|
|
4497
|
-
const
|
|
4497
|
+
const kr = 5 * 60, Sr = ft("authIdTokenMaxAge") || kr;
|
|
4498
4498
|
let ct = null;
|
|
4499
|
-
const
|
|
4499
|
+
const br = (n) => async (e) => {
|
|
4500
4500
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4501
|
-
if (i && i >
|
|
4501
|
+
if (i && i > Sr)
|
|
4502
4502
|
return;
|
|
4503
4503
|
const r = t == null ? void 0 : t.token;
|
|
4504
4504
|
ct !== r && (ct = r, await fetch(n, {
|
|
@@ -4508,33 +4508,33 @@ const Sr = (n) => async (e) => {
|
|
|
4508
4508
|
} : {}
|
|
4509
4509
|
}));
|
|
4510
4510
|
};
|
|
4511
|
-
function
|
|
4511
|
+
function Rr(n = _n()) {
|
|
4512
4512
|
const e = pt(n, "auth");
|
|
4513
4513
|
if (e.isInitialized())
|
|
4514
4514
|
return e.getImmediate();
|
|
4515
|
-
const t =
|
|
4516
|
-
popupRedirectResolver:
|
|
4515
|
+
const t = ii(n, {
|
|
4516
|
+
popupRedirectResolver: Tr,
|
|
4517
4517
|
persistence: [
|
|
4518
|
-
|
|
4519
|
-
|
|
4518
|
+
Oi,
|
|
4519
|
+
Ii,
|
|
4520
4520
|
$t
|
|
4521
4521
|
]
|
|
4522
4522
|
}), i = ft("authTokenSyncURL");
|
|
4523
4523
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4524
4524
|
const s = new URL(i, location.origin);
|
|
4525
4525
|
if (location.origin === s.origin) {
|
|
4526
|
-
const o =
|
|
4527
|
-
|
|
4526
|
+
const o = br(s.toString());
|
|
4527
|
+
mi(t, o, () => o(t.currentUser)), pi(t, (c) => o(c));
|
|
4528
4528
|
}
|
|
4529
4529
|
}
|
|
4530
4530
|
const r = gn("auth");
|
|
4531
|
-
return r &&
|
|
4531
|
+
return r && si(t, `http://${r}`), t;
|
|
4532
4532
|
}
|
|
4533
|
-
function
|
|
4533
|
+
function Pr() {
|
|
4534
4534
|
var n, e;
|
|
4535
4535
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4536
4536
|
}
|
|
4537
|
-
|
|
4537
|
+
Zn({
|
|
4538
4538
|
loadJS(n) {
|
|
4539
4539
|
return new Promise((e, t) => {
|
|
4540
4540
|
const i = document.createElement("script");
|
|
@@ -4544,41 +4544,41 @@ Qn({
|
|
|
4544
4544
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4545
4545
|
);
|
|
4546
4546
|
s.customData = r, t(s);
|
|
4547
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4547
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Pr().appendChild(i);
|
|
4548
4548
|
});
|
|
4549
4549
|
},
|
|
4550
4550
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4551
4551
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4552
4552
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4553
4553
|
});
|
|
4554
|
-
|
|
4554
|
+
Er(
|
|
4555
4555
|
"Browser"
|
|
4556
4556
|
/* ClientPlatform.BROWSER */
|
|
4557
4557
|
);
|
|
4558
|
-
var
|
|
4559
|
-
const
|
|
4558
|
+
var Ar = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" }, Cr = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
4559
|
+
const Or = {
|
|
4560
4560
|
key: 1,
|
|
4561
4561
|
class: "h-full w-full"
|
|
4562
|
-
},
|
|
4562
|
+
}, Nr = ["src"], Br = /* @__PURE__ */ lt({
|
|
4563
4563
|
__name: "App",
|
|
4564
4564
|
setup(n) {
|
|
4565
4565
|
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(() => {
|
|
4566
4566
|
const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
|
|
4567
|
-
return `${
|
|
4567
|
+
return `${Cr.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
|
|
4568
4568
|
});
|
|
4569
4569
|
async function F() {
|
|
4570
4570
|
if (yn().length) {
|
|
4571
4571
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4572
4572
|
return;
|
|
4573
4573
|
}
|
|
4574
|
-
const p = En(
|
|
4575
|
-
await
|
|
4574
|
+
const p = En(Ar.firebase), m = await sn.getCustomToken(), v = Rr();
|
|
4575
|
+
await fi(v, m), kn(p), console.log("initFirebase", p);
|
|
4576
4576
|
}
|
|
4577
4577
|
const M = async () => {
|
|
4578
|
-
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(
|
|
4578
|
+
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(bn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
|
|
4579
4579
|
};
|
|
4580
4580
|
return Xt(() => {
|
|
4581
|
-
if (t.initProvider(r, s), !c.value) {
|
|
4581
|
+
if (Sn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4582
4582
|
const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4583
4583
|
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);
|
|
4584
4584
|
}
|
|
@@ -4590,7 +4590,7 @@ const Cr = {
|
|
|
4590
4590
|
}
|
|
4591
4591
|
), (p, m) => (ne(), He(Qt, null, [
|
|
4592
4592
|
P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
|
|
4593
|
-
P(d) && P(h) !== "v2" ? (ne(), He("div",
|
|
4593
|
+
P(d) && P(h) !== "v2" ? (ne(), He("div", Or, [
|
|
4594
4594
|
Zt(un, {
|
|
4595
4595
|
json: { url: P(_) }
|
|
4596
4596
|
}, null, 8, ["json"]),
|
|
@@ -4600,11 +4600,11 @@ const Cr = {
|
|
|
4600
4600
|
height: "100%",
|
|
4601
4601
|
width: "100%",
|
|
4602
4602
|
src: P(_)
|
|
4603
|
-
}, null, 8,
|
|
4603
|
+
}, null, 8, Nr)
|
|
4604
4604
|
])) : $e("", !0)
|
|
4605
4605
|
], 64));
|
|
4606
4606
|
}
|
|
4607
4607
|
});
|
|
4608
4608
|
export {
|
|
4609
|
-
|
|
4609
|
+
Br as default
|
|
4610
4610
|
};
|