@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2
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/{App-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
- package/dist/AuditLogs-CWVUX5o0.js +2013 -0
- package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
- package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
- package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
- package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
- package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
- package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
- package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
- package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
- package/dist/Grab-L1h7bHD7.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
- package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
- package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
- package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
- package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
- package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
- package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
- package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
- package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
- package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
- package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
- package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
- package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
- package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
- package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
- package/dist/Review-CVBJlwGK.js +959 -0
- package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
- package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
- package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
- package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
- package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
- package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
- package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
- package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
- package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
- package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
- package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
- package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
- package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
- package/dist/app.js +4 -3
- package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
- package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
- package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
- package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
- package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
- package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
- package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
- package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
- package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
- package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
- package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
- package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
- package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
- package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
- package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
- package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
- package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
- package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
- package/dist/index-DW4-mTTG.js +52 -0
- package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
- package/dist/index-IPOrNVQw.js +67 -0
- package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
- package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
- package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
- package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
- package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
- package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
- package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
- package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
- package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
- package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-BM2Ygj-U.js +145 -0
- package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
- package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
- package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-tDq12e1p.js +188 -0
- package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
- package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
- package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
- package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
- package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
- package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
- package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-Ccb5IKBy.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
- package/dist/collection.fn-BqDPyvUe.js +0 -26
- package/dist/dto-CstKk_3g.js +0 -216
- package/dist/index-_KlH62Ed.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-CVxLIQ5K.js +0 -145
- package/dist/rule-builder-CIkRKgap.js +0 -102
- package/dist/template-wZEVj8lZ.js +0 -236
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as ht, ref as te, h as
|
|
1
|
+
import { defineComponent as ht, ref as te, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ne, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as ie, toDisplayString as je, onMounted as en, Fragment as tn, createBlock as nn, createCommentVNode as Ge, nextTick as rn } from "vue";
|
|
2
2
|
import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
|
|
3
3
|
import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as cn } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as ln } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as ln } from "./business-BSe9C-xG.js";
|
|
6
|
+
import "./index-DDp0nMys.js";
|
|
7
7
|
import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as hn } from "./vue-i18n-
|
|
9
|
-
import { C as
|
|
10
|
-
import { R as f } from "./app-
|
|
8
|
+
import { u as hn } from "./vue-i18n-B-92uhPn.js";
|
|
9
|
+
import { C as Be, m as fn } from "./index-DdCPfF8x.js";
|
|
10
|
+
import { R as f } from "./app-DlECkPwT.js";
|
|
11
11
|
import { J as pn } from "./JsonViewer-v8_C7l5N.js";
|
|
12
|
-
import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as
|
|
12
|
+
import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as j, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as An } from "./index.esm2017-CgR02aQB.js";
|
|
13
13
|
import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
|
|
14
|
-
import { S as Ke, c as
|
|
14
|
+
import { S as Ke, c as Pn } from "./index-0BNEvaYc.js";
|
|
15
15
|
const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
|
|
16
16
|
__name: "NavigationTab",
|
|
17
17
|
setup(n) {
|
|
@@ -35,6 +35,10 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
35
35
|
{
|
|
36
36
|
label: e("connect.navigation.broadcast"),
|
|
37
37
|
value: f["$connect-CAMPAIGN_BROADCAST"]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: e("connect.navigation.grab"),
|
|
41
|
+
value: f["$connect-CAMPAIGN_GRAB"]
|
|
38
42
|
}
|
|
39
43
|
]
|
|
40
44
|
},
|
|
@@ -57,7 +61,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
57
61
|
{
|
|
58
62
|
label: e("connect.navigation.point"),
|
|
59
63
|
value: f["$connect-PROGRAM_POINT"],
|
|
60
|
-
badge: () =>
|
|
64
|
+
badge: () => B(z.FmPill, { variant: "premium" })
|
|
61
65
|
},
|
|
62
66
|
{
|
|
63
67
|
label: e("connect.navigation.credit"),
|
|
@@ -66,7 +70,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
66
70
|
{
|
|
67
71
|
label: e("connect.navigation.game"),
|
|
68
72
|
value: f["$connect-PROGRAM_GAME"],
|
|
69
|
-
badge: () =>
|
|
73
|
+
badge: () => B(z.FmPill, { variant: "premium" })
|
|
70
74
|
},
|
|
71
75
|
{
|
|
72
76
|
label: "Mission",
|
|
@@ -85,19 +89,19 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
85
89
|
{
|
|
86
90
|
label: e("connect.navigation.segments"),
|
|
87
91
|
value: f["$connect-LOYALTY_SEGMENT"],
|
|
88
|
-
badge: () =>
|
|
92
|
+
badge: () => B(z.FmPill, { variant: "premium" })
|
|
89
93
|
},
|
|
90
94
|
{
|
|
91
95
|
label: e("connect.navigation.card"),
|
|
92
96
|
value: f["$connect-LOYALTY_CARD"],
|
|
93
|
-
badge: () =>
|
|
97
|
+
badge: () => B(z.FmPill, { variant: "premium" })
|
|
94
98
|
}
|
|
95
99
|
]
|
|
96
100
|
},
|
|
97
101
|
{
|
|
98
102
|
label: e("connect.navigation.referral"),
|
|
99
103
|
value: f["$connect-REFERRAL"],
|
|
100
|
-
badge: () =>
|
|
104
|
+
badge: () => B(z.FmPill, { variant: "premium" })
|
|
101
105
|
},
|
|
102
106
|
{
|
|
103
107
|
label: e("connect.navigation.store"),
|
|
@@ -111,6 +115,14 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
111
115
|
label: e("connect.navigation.marketingMaterials"),
|
|
112
116
|
value: f["$connect-MARKETING"]
|
|
113
117
|
},
|
|
118
|
+
{
|
|
119
|
+
label: e("connect.navigation.auditLogs"),
|
|
120
|
+
value: f["$connect-AUDIT_LOGS"]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: e("connect.navigation.review"),
|
|
124
|
+
value: f["$connect-REVIEW"]
|
|
125
|
+
},
|
|
114
126
|
{
|
|
115
127
|
label: e("connect.navigation.setting"),
|
|
116
128
|
value: f["$connect-SETTING"]
|
|
@@ -121,7 +133,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
121
133
|
}
|
|
122
134
|
], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
|
|
123
135
|
const d = c.currentCountry.value || "MY";
|
|
124
|
-
return console.log(`[MF] Timezone set to: ${
|
|
136
|
+
return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
|
|
125
137
|
});
|
|
126
138
|
ft(
|
|
127
139
|
() => s,
|
|
@@ -145,8 +157,8 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
|
|
|
145
157
|
"onUpdate:modelValue": l
|
|
146
158
|
}, null, 8, ["model-value"]),
|
|
147
159
|
ie("div", On, [
|
|
148
|
-
ie("div", null, "Timezone: " +
|
|
149
|
-
ie("div", null, "(UTC" +
|
|
160
|
+
ie("div", null, "Timezone: " + je(v(a).split("/")[1].replace("_", " ")), 1),
|
|
161
|
+
ie("div", null, "(UTC" + je(v(fn).tz(v(a)).format("Z")) + ")", 1)
|
|
150
162
|
])
|
|
151
163
|
]);
|
|
152
164
|
};
|
|
@@ -245,7 +257,7 @@ function k(n) {
|
|
|
245
257
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
246
258
|
throw re(e), new Error(e);
|
|
247
259
|
}
|
|
248
|
-
function
|
|
260
|
+
function A(n, e) {
|
|
249
261
|
n || k(e);
|
|
250
262
|
}
|
|
251
263
|
/**
|
|
@@ -329,7 +341,7 @@ function Vn() {
|
|
|
329
341
|
*/
|
|
330
342
|
class X {
|
|
331
343
|
constructor(e, t) {
|
|
332
|
-
this.shortDelay = e, this.longDelay = t,
|
|
344
|
+
this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
|
|
333
345
|
}
|
|
334
346
|
get() {
|
|
335
347
|
return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
@@ -352,7 +364,7 @@ class X {
|
|
|
352
364
|
* limitations under the License.
|
|
353
365
|
*/
|
|
354
366
|
function Me(n, e) {
|
|
355
|
-
|
|
367
|
+
A(n.emulator, "Emulator should always be set here");
|
|
356
368
|
const { url: t } = n.emulator;
|
|
357
369
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
|
358
370
|
}
|
|
@@ -521,7 +533,7 @@ const Hn = new X(3e4, 6e4);
|
|
|
521
533
|
function fe(n, e) {
|
|
522
534
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
523
535
|
}
|
|
524
|
-
async function
|
|
536
|
+
async function G(n, e, t, i, r = {}) {
|
|
525
537
|
return Et(n, r, async () => {
|
|
526
538
|
let s = {}, o = {};
|
|
527
539
|
i && (e === "GET" ? o = i : s = {
|
|
@@ -545,7 +557,7 @@ async function Et(n, e, t) {
|
|
|
545
557
|
n._canInitEmulator = !1;
|
|
546
558
|
const i = Object.assign(Object.assign({}, $n), e);
|
|
547
559
|
try {
|
|
548
|
-
const r = new
|
|
560
|
+
const r = new Wn(n), s = await Promise.race([
|
|
549
561
|
t(),
|
|
550
562
|
r.promise
|
|
551
563
|
]);
|
|
@@ -575,7 +587,7 @@ async function Et(n, e, t) {
|
|
|
575
587
|
}
|
|
576
588
|
}
|
|
577
589
|
async function kt(n, e, t, i, r = {}) {
|
|
578
|
-
const s = await
|
|
590
|
+
const s = await G(n, e, t, i, r);
|
|
579
591
|
return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
|
|
580
592
|
_serverResponse: s
|
|
581
593
|
}), s;
|
|
@@ -584,7 +596,7 @@ function bt(n, e, t, i) {
|
|
|
584
596
|
const r = `${e}${t}?${i}`;
|
|
585
597
|
return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
586
598
|
}
|
|
587
|
-
class
|
|
599
|
+
class Wn {
|
|
588
600
|
constructor(e) {
|
|
589
601
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
590
602
|
this.timer = setTimeout(() => i(T(
|
|
@@ -622,11 +634,11 @@ function ee(n, e, t) {
|
|
|
622
634
|
* See the License for the specific language governing permissions and
|
|
623
635
|
* limitations under the License.
|
|
624
636
|
*/
|
|
625
|
-
async function
|
|
626
|
-
return
|
|
637
|
+
async function jn(n, e) {
|
|
638
|
+
return G(n, "POST", "/v1/accounts:delete", e);
|
|
627
639
|
}
|
|
628
640
|
async function St(n, e) {
|
|
629
|
-
return
|
|
641
|
+
return G(n, "POST", "/v1/accounts:lookup", e);
|
|
630
642
|
}
|
|
631
643
|
/**
|
|
632
644
|
* @license
|
|
@@ -653,8 +665,8 @@ function q(n) {
|
|
|
653
665
|
} catch {
|
|
654
666
|
}
|
|
655
667
|
}
|
|
656
|
-
async function
|
|
657
|
-
const t =
|
|
668
|
+
async function Gn(n, e = !1) {
|
|
669
|
+
const t = j(n), i = await t.getIdToken(e), r = Ue(i);
|
|
658
670
|
u(
|
|
659
671
|
r && r.exp && r.auth_time && r.iat,
|
|
660
672
|
t.auth,
|
|
@@ -724,10 +736,10 @@ async function K(n, e, t = !1) {
|
|
|
724
736
|
try {
|
|
725
737
|
return await e;
|
|
726
738
|
} catch (i) {
|
|
727
|
-
throw i instanceof Oe &&
|
|
739
|
+
throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
728
740
|
}
|
|
729
741
|
}
|
|
730
|
-
function
|
|
742
|
+
function Bn({ code: n }) {
|
|
731
743
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
732
744
|
}
|
|
733
745
|
/**
|
|
@@ -808,7 +820,7 @@ class zn {
|
|
|
808
820
|
* See the License for the specific language governing permissions and
|
|
809
821
|
* limitations under the License.
|
|
810
822
|
*/
|
|
811
|
-
class
|
|
823
|
+
class Ae {
|
|
812
824
|
constructor(e, t) {
|
|
813
825
|
this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
|
|
814
826
|
}
|
|
@@ -861,13 +873,13 @@ async function le(n) {
|
|
|
861
873
|
phoneNumber: s.phoneNumber || null,
|
|
862
874
|
tenantId: s.tenantId || null,
|
|
863
875
|
providerData: c,
|
|
864
|
-
metadata: new
|
|
876
|
+
metadata: new Ae(s.createdAt, s.lastLoginAt),
|
|
865
877
|
isAnonymous: d
|
|
866
878
|
};
|
|
867
879
|
Object.assign(n, h);
|
|
868
880
|
}
|
|
869
881
|
async function qn(n) {
|
|
870
|
-
const e =
|
|
882
|
+
const e = j(n);
|
|
871
883
|
await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
872
884
|
}
|
|
873
885
|
function Kn(n, e) {
|
|
@@ -924,7 +936,7 @@ async function Jn(n, e) {
|
|
|
924
936
|
};
|
|
925
937
|
}
|
|
926
938
|
async function Yn(n, e) {
|
|
927
|
-
return
|
|
939
|
+
return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
|
|
928
940
|
}
|
|
929
941
|
/**
|
|
930
942
|
* @license
|
|
@@ -1036,13 +1048,13 @@ class $ {
|
|
|
1036
1048
|
* See the License for the specific language governing permissions and
|
|
1037
1049
|
* limitations under the License.
|
|
1038
1050
|
*/
|
|
1039
|
-
function
|
|
1051
|
+
function P(n, e) {
|
|
1040
1052
|
u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
|
1041
1053
|
}
|
|
1042
1054
|
class b {
|
|
1043
1055
|
constructor(e) {
|
|
1044
1056
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
|
|
1045
|
-
this.providerId = "firebase", this.proactiveRefresh = new zn(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
|
|
1057
|
+
this.providerId = "firebase", this.proactiveRefresh = new zn(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 Ae(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1046
1058
|
}
|
|
1047
1059
|
async getIdToken(e) {
|
|
1048
1060
|
const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1054,7 +1066,7 @@ class b {
|
|
|
1054
1066
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1055
1067
|
}
|
|
1056
1068
|
getIdTokenResult(e) {
|
|
1057
|
-
return
|
|
1069
|
+
return Gn(this, e);
|
|
1058
1070
|
}
|
|
1059
1071
|
reload() {
|
|
1060
1072
|
return qn(this);
|
|
@@ -1096,7 +1108,7 @@ class b {
|
|
|
1096
1108
|
if (E(this.auth.app))
|
|
1097
1109
|
return Promise.reject(M(this.auth));
|
|
1098
1110
|
const e = await this.getIdToken();
|
|
1099
|
-
return await K(this,
|
|
1111
|
+
return await K(this, jn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1100
1112
|
}
|
|
1101
1113
|
toJSON() {
|
|
1102
1114
|
return Object.assign(Object.assign({
|
|
@@ -1124,20 +1136,20 @@ class b {
|
|
|
1124
1136
|
}
|
|
1125
1137
|
static _fromJSON(e, t) {
|
|
1126
1138
|
var i, r, s, o, c, a, l, d;
|
|
1127
|
-
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager:
|
|
1139
|
+
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: We } = t;
|
|
1128
1140
|
u(
|
|
1129
|
-
ve &&
|
|
1141
|
+
ve && We,
|
|
1130
1142
|
e,
|
|
1131
1143
|
"internal-error"
|
|
1132
1144
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1133
1145
|
);
|
|
1134
|
-
const Xt = $.fromJSON(this.name,
|
|
1146
|
+
const Xt = $.fromJSON(this.name, We);
|
|
1135
1147
|
u(
|
|
1136
1148
|
typeof ve == "string",
|
|
1137
1149
|
e,
|
|
1138
1150
|
"internal-error"
|
|
1139
1151
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1140
|
-
),
|
|
1152
|
+
), P(h, e.name), P(p, e.name), u(
|
|
1141
1153
|
typeof $e == "boolean",
|
|
1142
1154
|
e,
|
|
1143
1155
|
"internal-error"
|
|
@@ -1147,7 +1159,7 @@ class b {
|
|
|
1147
1159
|
e,
|
|
1148
1160
|
"internal-error"
|
|
1149
1161
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1150
|
-
),
|
|
1162
|
+
), P(w, e.name), P(U, e.name), P(m, e.name), P(g, e.name), P(I, e.name), P(x, e.name);
|
|
1151
1163
|
const Te = new b({
|
|
1152
1164
|
uid: ve,
|
|
1153
1165
|
auth: e,
|
|
@@ -1208,7 +1220,7 @@ class b {
|
|
|
1208
1220
|
phoneNumber: r.phoneNumber || null,
|
|
1209
1221
|
tenantId: r.tenantId || null,
|
|
1210
1222
|
providerData: s,
|
|
1211
|
-
metadata: new
|
|
1223
|
+
metadata: new Ae(r.createdAt, r.lastLoginAt),
|
|
1212
1224
|
isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
|
|
1213
1225
|
};
|
|
1214
1226
|
return Object.assign(a, l), a;
|
|
@@ -1232,9 +1244,9 @@ class b {
|
|
|
1232
1244
|
*/
|
|
1233
1245
|
const Xe = /* @__PURE__ */ new Map();
|
|
1234
1246
|
function S(n) {
|
|
1235
|
-
|
|
1247
|
+
A(n instanceof Function, "Expected a class definition");
|
|
1236
1248
|
let e = Xe.get(n);
|
|
1237
|
-
return e ? (
|
|
1249
|
+
return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Xe.set(n, e), e);
|
|
1238
1250
|
}
|
|
1239
1251
|
/**
|
|
1240
1252
|
* @license
|
|
@@ -1252,7 +1264,7 @@ function S(n) {
|
|
|
1252
1264
|
* See the License for the specific language governing permissions and
|
|
1253
1265
|
* limitations under the License.
|
|
1254
1266
|
*/
|
|
1255
|
-
class
|
|
1267
|
+
class At {
|
|
1256
1268
|
constructor() {
|
|
1257
1269
|
this.type = "NONE", this.storage = {};
|
|
1258
1270
|
}
|
|
@@ -1274,8 +1286,8 @@ class Pt {
|
|
|
1274
1286
|
_removeListener(e, t) {
|
|
1275
1287
|
}
|
|
1276
1288
|
}
|
|
1277
|
-
|
|
1278
|
-
const Qe =
|
|
1289
|
+
At.type = "NONE";
|
|
1290
|
+
const Qe = At;
|
|
1279
1291
|
/**
|
|
1280
1292
|
* @license
|
|
1281
1293
|
* Copyright 2019 Google LLC
|
|
@@ -1380,7 +1392,7 @@ function Ze(n) {
|
|
|
1380
1392
|
return "IE";
|
|
1381
1393
|
if (e.includes("edge/"))
|
|
1382
1394
|
return "Edge";
|
|
1383
|
-
if (
|
|
1395
|
+
if (Pt(e))
|
|
1384
1396
|
return "Firefox";
|
|
1385
1397
|
if (e.includes("silk/"))
|
|
1386
1398
|
return "Silk";
|
|
@@ -1401,7 +1413,7 @@ function Ze(n) {
|
|
|
1401
1413
|
}
|
|
1402
1414
|
return "Other";
|
|
1403
1415
|
}
|
|
1404
|
-
function
|
|
1416
|
+
function Pt(n = _()) {
|
|
1405
1417
|
return /firefox\//i.test(n);
|
|
1406
1418
|
}
|
|
1407
1419
|
function De(n = _()) {
|
|
@@ -1546,7 +1558,7 @@ class ei {
|
|
|
1546
1558
|
* limitations under the License.
|
|
1547
1559
|
*/
|
|
1548
1560
|
async function ti(n, e = {}) {
|
|
1549
|
-
return
|
|
1561
|
+
return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
|
|
1550
1562
|
}
|
|
1551
1563
|
/**
|
|
1552
1564
|
* @license
|
|
@@ -1756,7 +1768,7 @@ class ri {
|
|
|
1756
1768
|
async updateCurrentUser(e) {
|
|
1757
1769
|
if (E(this.app))
|
|
1758
1770
|
return Promise.reject(M(this));
|
|
1759
|
-
const t = e ?
|
|
1771
|
+
const t = e ? j(e) : null;
|
|
1760
1772
|
return t && u(
|
|
1761
1773
|
t.auth.config.apiKey === this.config.apiKey,
|
|
1762
1774
|
this,
|
|
@@ -1986,7 +1998,7 @@ class ri {
|
|
|
1986
1998
|
}
|
|
1987
1999
|
}
|
|
1988
2000
|
function me(n) {
|
|
1989
|
-
return
|
|
2001
|
+
return j(n);
|
|
1990
2002
|
}
|
|
1991
2003
|
class et {
|
|
1992
2004
|
constructor(e) {
|
|
@@ -2180,7 +2192,7 @@ class xt {
|
|
|
2180
2192
|
* See the License for the specific language governing permissions and
|
|
2181
2193
|
* limitations under the License.
|
|
2182
2194
|
*/
|
|
2183
|
-
async function
|
|
2195
|
+
async function W(n, e) {
|
|
2184
2196
|
return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
|
|
2185
2197
|
}
|
|
2186
2198
|
/**
|
|
@@ -2243,17 +2255,17 @@ class D extends xt {
|
|
|
2243
2255
|
/** @internal */
|
|
2244
2256
|
_getIdTokenResponse(e) {
|
|
2245
2257
|
const t = this.buildRequest();
|
|
2246
|
-
return
|
|
2258
|
+
return W(e, t);
|
|
2247
2259
|
}
|
|
2248
2260
|
/** @internal */
|
|
2249
2261
|
_linkToIdToken(e, t) {
|
|
2250
2262
|
const i = this.buildRequest();
|
|
2251
|
-
return i.idToken = t,
|
|
2263
|
+
return i.idToken = t, W(e, i);
|
|
2252
2264
|
}
|
|
2253
2265
|
/** @internal */
|
|
2254
2266
|
_getReauthenticationResolver(e) {
|
|
2255
2267
|
const t = this.buildRequest();
|
|
2256
|
-
return t.autoCreate = !1,
|
|
2268
|
+
return t.autoCreate = !1, W(e, t);
|
|
2257
2269
|
}
|
|
2258
2270
|
buildRequest() {
|
|
2259
2271
|
const e = {
|
|
@@ -2841,10 +2853,10 @@ async function Ii(n, e) {
|
|
|
2841
2853
|
return await t._updateCurrentUser(r.user), r;
|
|
2842
2854
|
}
|
|
2843
2855
|
function Ti(n, e, t, i) {
|
|
2844
|
-
return
|
|
2856
|
+
return j(n).onIdTokenChanged(e, t, i);
|
|
2845
2857
|
}
|
|
2846
2858
|
function yi(n, e, t) {
|
|
2847
|
-
return
|
|
2859
|
+
return j(n).beforeAuthStateChanged(e, t);
|
|
2848
2860
|
}
|
|
2849
2861
|
const de = "__sak";
|
|
2850
2862
|
/**
|
|
@@ -2909,7 +2921,7 @@ function wi() {
|
|
|
2909
2921
|
return De(n) || pe(n);
|
|
2910
2922
|
}
|
|
2911
2923
|
const Ei = 1e3, ki = 10;
|
|
2912
|
-
class
|
|
2924
|
+
class Wt extends Ht {
|
|
2913
2925
|
constructor() {
|
|
2914
2926
|
super(
|
|
2915
2927
|
() => window.localStorage,
|
|
@@ -2993,8 +3005,8 @@ class jt extends Ht {
|
|
|
2993
3005
|
await super._remove(e), delete this.localCache[e];
|
|
2994
3006
|
}
|
|
2995
3007
|
}
|
|
2996
|
-
|
|
2997
|
-
const bi =
|
|
3008
|
+
Wt.type = "LOCAL";
|
|
3009
|
+
const bi = Wt;
|
|
2998
3010
|
/**
|
|
2999
3011
|
* @license
|
|
3000
3012
|
* Copyright 2020 Google LLC
|
|
@@ -3011,7 +3023,7 @@ const bi = jt;
|
|
|
3011
3023
|
* See the License for the specific language governing permissions and
|
|
3012
3024
|
* limitations under the License.
|
|
3013
3025
|
*/
|
|
3014
|
-
class
|
|
3026
|
+
class jt extends Ht {
|
|
3015
3027
|
constructor() {
|
|
3016
3028
|
super(
|
|
3017
3029
|
() => window.sessionStorage,
|
|
@@ -3024,8 +3036,8 @@ class Wt extends Ht {
|
|
|
3024
3036
|
_removeListener(e, t) {
|
|
3025
3037
|
}
|
|
3026
3038
|
}
|
|
3027
|
-
|
|
3028
|
-
const
|
|
3039
|
+
jt.type = "SESSION";
|
|
3040
|
+
const Gt = jt;
|
|
3029
3041
|
/**
|
|
3030
3042
|
* @license
|
|
3031
3043
|
* Copyright 2019 Google LLC
|
|
@@ -3280,7 +3292,7 @@ class Ri {
|
|
|
3280
3292
|
function y() {
|
|
3281
3293
|
return window;
|
|
3282
3294
|
}
|
|
3283
|
-
function
|
|
3295
|
+
function Ai(n) {
|
|
3284
3296
|
y().location.href = n;
|
|
3285
3297
|
}
|
|
3286
3298
|
/**
|
|
@@ -3299,10 +3311,10 @@ function Pi(n) {
|
|
|
3299
3311
|
* See the License for the specific language governing permissions and
|
|
3300
3312
|
* limitations under the License.
|
|
3301
3313
|
*/
|
|
3302
|
-
function
|
|
3314
|
+
function Bt() {
|
|
3303
3315
|
return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
|
|
3304
3316
|
}
|
|
3305
|
-
async function
|
|
3317
|
+
async function Pi() {
|
|
3306
3318
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3307
3319
|
return null;
|
|
3308
3320
|
try {
|
|
@@ -3316,7 +3328,7 @@ function Ci() {
|
|
|
3316
3328
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3317
3329
|
}
|
|
3318
3330
|
function Oi() {
|
|
3319
|
-
return
|
|
3331
|
+
return Bt() ? self : null;
|
|
3320
3332
|
}
|
|
3321
3333
|
/**
|
|
3322
3334
|
* @license
|
|
@@ -3356,7 +3368,7 @@ function Li() {
|
|
|
3356
3368
|
const n = indexedDB.deleteDatabase(zt);
|
|
3357
3369
|
return new Z(n).toPromise();
|
|
3358
3370
|
}
|
|
3359
|
-
function
|
|
3371
|
+
function Pe() {
|
|
3360
3372
|
const n = indexedDB.open(zt, Ni);
|
|
3361
3373
|
return new Promise((e, t) => {
|
|
3362
3374
|
n.addEventListener("error", () => {
|
|
@@ -3370,7 +3382,7 @@ function Ae() {
|
|
|
3370
3382
|
}
|
|
3371
3383
|
}), n.addEventListener("success", async () => {
|
|
3372
3384
|
const i = n.result;
|
|
3373
|
-
i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await
|
|
3385
|
+
i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Pe()));
|
|
3374
3386
|
});
|
|
3375
3387
|
});
|
|
3376
3388
|
}
|
|
@@ -3397,7 +3409,7 @@ class Kt {
|
|
|
3397
3409
|
});
|
|
3398
3410
|
}
|
|
3399
3411
|
async _openDb() {
|
|
3400
|
-
return this.db ? this.db : (this.db = await
|
|
3412
|
+
return this.db ? this.db : (this.db = await Pe(), this.db);
|
|
3401
3413
|
}
|
|
3402
3414
|
async _withRetries(e) {
|
|
3403
3415
|
let t = 0;
|
|
@@ -3416,7 +3428,7 @@ class Kt {
|
|
|
3416
3428
|
* postMessage interface to send these events to the worker ourselves.
|
|
3417
3429
|
*/
|
|
3418
3430
|
async initializeServiceWorkerMessaging() {
|
|
3419
|
-
return
|
|
3431
|
+
return Bt() ? this.initializeReceiver() : this.initializeSender();
|
|
3420
3432
|
}
|
|
3421
3433
|
/**
|
|
3422
3434
|
* As the worker we should listen to events from the main window.
|
|
@@ -3438,7 +3450,7 @@ class Kt {
|
|
|
3438
3450
|
*/
|
|
3439
3451
|
async initializeSender() {
|
|
3440
3452
|
var e, t;
|
|
3441
|
-
if (this.activeServiceWorker = await
|
|
3453
|
+
if (this.activeServiceWorker = await Pi(), !this.activeServiceWorker)
|
|
3442
3454
|
return;
|
|
3443
3455
|
this.sender = new Ri(this.activeServiceWorker);
|
|
3444
3456
|
const i = await this.sender._send(
|
|
@@ -3478,7 +3490,7 @@ class Kt {
|
|
|
3478
3490
|
try {
|
|
3479
3491
|
if (!indexedDB)
|
|
3480
3492
|
return !1;
|
|
3481
|
-
const e = await
|
|
3493
|
+
const e = await Pe();
|
|
3482
3494
|
return await it(e, de, "1"), await rt(e, de), !0;
|
|
3483
3495
|
} catch {
|
|
3484
3496
|
}
|
|
@@ -3591,13 +3603,13 @@ class Ve extends xt {
|
|
|
3591
3603
|
), this.params = e;
|
|
3592
3604
|
}
|
|
3593
3605
|
_getIdTokenResponse(e) {
|
|
3594
|
-
return
|
|
3606
|
+
return W(e, this._buildIdpRequest());
|
|
3595
3607
|
}
|
|
3596
3608
|
_linkToIdToken(e, t) {
|
|
3597
|
-
return
|
|
3609
|
+
return W(e, this._buildIdpRequest(t));
|
|
3598
3610
|
}
|
|
3599
3611
|
_getReauthenticationResolver(e) {
|
|
3600
|
-
return
|
|
3612
|
+
return W(e, this._buildIdpRequest());
|
|
3601
3613
|
}
|
|
3602
3614
|
_buildIdpRequest(e) {
|
|
3603
3615
|
const t = {
|
|
@@ -3707,10 +3719,10 @@ class Jt {
|
|
|
3707
3719
|
}
|
|
3708
3720
|
}
|
|
3709
3721
|
resolve(e) {
|
|
3710
|
-
|
|
3722
|
+
A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
|
|
3711
3723
|
}
|
|
3712
3724
|
reject(e) {
|
|
3713
|
-
|
|
3725
|
+
A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
|
|
3714
3726
|
}
|
|
3715
3727
|
unregisterAndCleanUp() {
|
|
3716
3728
|
this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
|
|
@@ -3732,7 +3744,7 @@ class Jt {
|
|
|
3732
3744
|
* See the License for the specific language governing permissions and
|
|
3733
3745
|
* limitations under the License.
|
|
3734
3746
|
*/
|
|
3735
|
-
const
|
|
3747
|
+
const Wi = new X(2e3, 1e4);
|
|
3736
3748
|
class V extends Jt {
|
|
3737
3749
|
constructor(e, t, i, r, s) {
|
|
3738
3750
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3747,7 +3759,7 @@ class V extends Jt {
|
|
|
3747
3759
|
), e;
|
|
3748
3760
|
}
|
|
3749
3761
|
async onExecution() {
|
|
3750
|
-
|
|
3762
|
+
A(this.filter.length === 1, "Popup operations only handle one event");
|
|
3751
3763
|
const e = xe();
|
|
3752
3764
|
this.authWindow = await this.resolver._openPopup(
|
|
3753
3765
|
this.auth,
|
|
@@ -3796,7 +3808,7 @@ class V extends Jt {
|
|
|
3796
3808
|
);
|
|
3797
3809
|
return;
|
|
3798
3810
|
}
|
|
3799
|
-
this.pollId = window.setTimeout(e,
|
|
3811
|
+
this.pollId = window.setTimeout(e, Wi.get());
|
|
3800
3812
|
};
|
|
3801
3813
|
e();
|
|
3802
3814
|
}
|
|
@@ -3818,8 +3830,8 @@ V.currentPopupAction = null;
|
|
|
3818
3830
|
* See the License for the specific language governing permissions and
|
|
3819
3831
|
* limitations under the License.
|
|
3820
3832
|
*/
|
|
3821
|
-
const
|
|
3822
|
-
class
|
|
3833
|
+
const ji = "pendingRedirect", oe = /* @__PURE__ */ new Map();
|
|
3834
|
+
class Gi extends Jt {
|
|
3823
3835
|
constructor(e, t, i = !1) {
|
|
3824
3836
|
super(e, [
|
|
3825
3837
|
"signInViaRedirect",
|
|
@@ -3837,7 +3849,7 @@ class Bi extends Jt {
|
|
|
3837
3849
|
let e = oe.get(this.auth._key());
|
|
3838
3850
|
if (!e) {
|
|
3839
3851
|
try {
|
|
3840
|
-
const i = await
|
|
3852
|
+
const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3841
3853
|
e = () => Promise.resolve(i);
|
|
3842
3854
|
} catch (t) {
|
|
3843
3855
|
e = () => Promise.reject(t);
|
|
@@ -3865,7 +3877,7 @@ class Bi extends Jt {
|
|
|
3865
3877
|
cleanUp() {
|
|
3866
3878
|
}
|
|
3867
3879
|
}
|
|
3868
|
-
async function
|
|
3880
|
+
async function Bi(n, e) {
|
|
3869
3881
|
const t = Ki(e), i = qi(n);
|
|
3870
3882
|
if (!await i._isAvailable())
|
|
3871
3883
|
return !1;
|
|
@@ -3879,12 +3891,12 @@ function qi(n) {
|
|
|
3879
3891
|
return S(n._redirectPersistence);
|
|
3880
3892
|
}
|
|
3881
3893
|
function Ki(n) {
|
|
3882
|
-
return se(
|
|
3894
|
+
return se(ji, n.config.apiKey, n.name);
|
|
3883
3895
|
}
|
|
3884
3896
|
async function Ji(n, e, t = !1) {
|
|
3885
3897
|
if (E(n.app))
|
|
3886
3898
|
return Promise.reject(M(n));
|
|
3887
|
-
const i = me(n), r = xi(i, e), o = await new
|
|
3899
|
+
const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
|
|
3888
3900
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3889
3901
|
}
|
|
3890
3902
|
/**
|
|
@@ -3976,7 +3988,7 @@ function Qi(n) {
|
|
|
3976
3988
|
* limitations under the License.
|
|
3977
3989
|
*/
|
|
3978
3990
|
async function Zi(n, e = {}) {
|
|
3979
|
-
return
|
|
3991
|
+
return G(n, "GET", "/v1/projects", e);
|
|
3980
3992
|
}
|
|
3981
3993
|
/**
|
|
3982
3994
|
* @license
|
|
@@ -4214,7 +4226,7 @@ function Ir(n, e, t, i = mr, r = gr) {
|
|
|
4214
4226
|
top: s,
|
|
4215
4227
|
left: o
|
|
4216
4228
|
}), l = _().toLowerCase();
|
|
4217
|
-
t && (c = Ct(l) ? _r : t),
|
|
4229
|
+
t && (c = Ct(l) ? _r : t), Pt(l) && (e = e || vr, a.scrollbars = "yes");
|
|
4218
4230
|
const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
|
|
4219
4231
|
if (Xn(l) && c !== "_self")
|
|
4220
4232
|
return Tr(e || "", c), new at(null);
|
|
@@ -4312,27 +4324,27 @@ function kr({ config: n }) {
|
|
|
4312
4324
|
const we = "webStorageSupport";
|
|
4313
4325
|
class br {
|
|
4314
4326
|
constructor() {
|
|
4315
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence =
|
|
4327
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
|
|
4316
4328
|
}
|
|
4317
4329
|
// Wrapping in async even though we don't await anywhere in order
|
|
4318
4330
|
// to make sure errors are raised as promise rejections
|
|
4319
4331
|
async _openPopup(e, t, i, r) {
|
|
4320
4332
|
var s;
|
|
4321
|
-
|
|
4333
|
+
A((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4322
4334
|
const o = await ct(e, t, i, Re(), r);
|
|
4323
4335
|
return Ir(e, o, xe());
|
|
4324
4336
|
}
|
|
4325
4337
|
async _openRedirect(e, t, i, r) {
|
|
4326
4338
|
await this._originValidation(e);
|
|
4327
4339
|
const s = await ct(e, t, i, Re(), r);
|
|
4328
|
-
return
|
|
4340
|
+
return Ai(s), new Promise(() => {
|
|
4329
4341
|
});
|
|
4330
4342
|
}
|
|
4331
4343
|
_initialize(e) {
|
|
4332
4344
|
const t = e._key();
|
|
4333
4345
|
if (this.eventManagers[t]) {
|
|
4334
4346
|
const { manager: r, promise: s } = this.eventManagers[t];
|
|
4335
|
-
return r ? Promise.resolve(r) : (
|
|
4347
|
+
return r ? Promise.resolve(r) : (A(s, "If manager is not set, promise should be"), s);
|
|
4336
4348
|
}
|
|
4337
4349
|
const i = this.initAndGetManager(e);
|
|
4338
4350
|
return this.eventManagers[t] = { promise: i }, i.catch(() => {
|
|
@@ -4439,7 +4451,7 @@ class Rr {
|
|
|
4439
4451
|
* See the License for the specific language governing permissions and
|
|
4440
4452
|
* limitations under the License.
|
|
4441
4453
|
*/
|
|
4442
|
-
function
|
|
4454
|
+
function Ar(n) {
|
|
4443
4455
|
switch (n) {
|
|
4444
4456
|
case "Node":
|
|
4445
4457
|
return "node";
|
|
@@ -4455,7 +4467,7 @@ function Pr(n) {
|
|
|
4455
4467
|
return;
|
|
4456
4468
|
}
|
|
4457
4469
|
}
|
|
4458
|
-
function
|
|
4470
|
+
function Pr(n) {
|
|
4459
4471
|
ze(new qe(
|
|
4460
4472
|
"auth",
|
|
4461
4473
|
(e, { options: t }) => {
|
|
@@ -4496,7 +4508,7 @@ function Ar(n) {
|
|
|
4496
4508
|
).setInstantiationMode(
|
|
4497
4509
|
"EXPLICIT"
|
|
4498
4510
|
/* InstantiationMode.EXPLICIT */
|
|
4499
|
-
)), Se(lt, ut,
|
|
4511
|
+
)), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
|
|
4500
4512
|
}
|
|
4501
4513
|
/**
|
|
4502
4514
|
* @license
|
|
@@ -4537,7 +4549,7 @@ function Lr(n = yn()) {
|
|
|
4537
4549
|
persistence: [
|
|
4538
4550
|
Fi,
|
|
4539
4551
|
bi,
|
|
4540
|
-
|
|
4552
|
+
Gt
|
|
4541
4553
|
]
|
|
4542
4554
|
}), i = gt("authTokenSyncURL");
|
|
4543
4555
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
@@ -4571,11 +4583,11 @@ si({
|
|
|
4571
4583
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4572
4584
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4573
4585
|
});
|
|
4574
|
-
|
|
4586
|
+
Pr(
|
|
4575
4587
|
"Browser"
|
|
4576
4588
|
/* ClientPlatform.BROWSER */
|
|
4577
4589
|
);
|
|
4578
|
-
var Ur = { firebase: { apiKey: "
|
|
4590
|
+
var Ur = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Dr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
4579
4591
|
const Fr = {
|
|
4580
4592
|
key: 1,
|
|
4581
4593
|
class: "h-full w-full"
|
|
@@ -4592,13 +4604,13 @@ const Fr = {
|
|
|
4592
4604
|
return;
|
|
4593
4605
|
}
|
|
4594
4606
|
const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
|
|
4595
|
-
await Ii(I, g),
|
|
4607
|
+
await Ii(I, g), An(m), console.log("initFirebase", m);
|
|
4596
4608
|
}
|
|
4597
4609
|
const U = async () => {
|
|
4598
4610
|
d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Nn) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
|
|
4599
4611
|
};
|
|
4600
4612
|
return en(() => {
|
|
4601
|
-
if (
|
|
4613
|
+
if (Pn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4602
4614
|
const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4603
4615
|
m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4604
4616
|
}
|
|
@@ -4609,7 +4621,7 @@ const Fr = {
|
|
|
4609
4621
|
console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
|
|
4610
4622
|
}
|
|
4611
4623
|
), (m, g) => (ne(), ke(tn, null, [
|
|
4612
|
-
v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) :
|
|
4624
|
+
v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) : Ge("", !0),
|
|
4613
4625
|
v(d) && v(h) !== "v2" ? (ne(), ke("div", Fr, [
|
|
4614
4626
|
pt(pn, {
|
|
4615
4627
|
json: { url: v(p) }
|
|
@@ -4621,7 +4633,7 @@ const Fr = {
|
|
|
4621
4633
|
width: "100%",
|
|
4622
4634
|
src: v(p)
|
|
4623
4635
|
}, null, 8, xr)
|
|
4624
|
-
])) :
|
|
4636
|
+
])) : Ge("", !0)
|
|
4625
4637
|
], 64));
|
|
4626
4638
|
}
|
|
4627
4639
|
});
|