@feedmepos/mf-connect 0.1.123-prod → 0.1.124-dev
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-BOQIQ8Jz.js → App-C7BnLHSt.js} +502 -493
- package/dist/AuditLogs-BPKQdFga.js +2016 -0
- package/dist/{Bin-BethwelP.js → Bin-Bq7yY0I2.js} +8 -8
- package/dist/{Broadcast-CHIXRBHf.js → Broadcast-D52rPmVl.js} +22 -21
- package/dist/{CampaignAnalytic-BaEeAhnr.js → CampaignAnalytic-DpiWtzIp.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYo7Rpes.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1eAAN64.js} +8 -9
- package/dist/{Card-C075nS85.js → Card-BQc7vud2.js} +22 -22
- package/dist/{Collections-BsQ_kcoJ.js → Collections--VzkneGp.js} +197 -185
- package/dist/{Credit-BsZlyp-x.js → Credit-DhfAcw-p.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CcytVckH.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2Csdg-3.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Da4snauu.js → EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js} +16 -16
- package/dist/{Experience-B9iubxQ5.js → Experience-CUwbHfo5.js} +32 -31
- package/dist/{FileSaver.min-1XYUiJrd.js → FileSaver.min-DvZpiwMd.js} +1 -1
- package/dist/{Game-B3ZTJcjj.js → Game-CI5-y0JJ.js} +19 -18
- package/dist/{GiftCardSetup-DpLDBOS2.js → GiftCardSetup-CGacqQ0j.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-hNbexVdE.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B6POxDLJ.js} +7 -7
- package/dist/{Goals--dysejOz.js → Goals-fqJY9iMx.js} +4 -4
- package/dist/Grab-CAx1cCE4.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI1EQciE.js → ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js} +1 -1
- package/dist/{Index-v2J17JTP.js → Index-CT1Gnjsv.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B1vTvUTW.js → LocationPicker.vue_vue_type_script_setup_true_lang-BRQ12Yum.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dz0VI7PT.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BRzuWJ1Y.js} +1 -1
- package/dist/{LoyaltyDashboard-BI_khH0P.js → LoyaltyDashboard-IJIDEBWf.js} +15 -15
- package/dist/{MainLayout-On2p0hEA.js → MainLayout-BMghr-wf.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DSdJORyW.js → MainLayout.vue_vue_type_script_setup_true_lang-BitJKgvd.js} +3 -3
- package/dist/{Marketing-Pqa4USnd.js → Marketing-Ckr9cp3w.js} +4 -4
- package/dist/{MarketingMaterialEdit-IRRsEF8W.js → MarketingMaterialEdit-BIZnE8CY.js} +214 -211
- package/dist/{Member-p1zyrY20.js → Member-d1nPxr74.js} +7 -7
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DI4XM_rJ.js +1281 -0
- package/dist/{MemberImportHistory-BwkJJj_u.js → MemberImportHistory-CxX9iYhV.js} +7 -7
- package/dist/{MemberList-Ci8K7HI4.js → MemberList-DUzYpxhj.js} +103 -105
- package/dist/{MemberTransactions-D8xLWGcw.js → MemberTransactions-BFM3ybeo.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CvCuVDR-.js → MessageInput.vue_vue_type_script_setup_true_lang-B5j0YBix.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DzrAjDGZ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsSHSbBB.js} +1 -1
- package/dist/{Mission-JpI-0kHJ.js → Mission-De9BF5wb.js} +22 -21
- package/dist/{Overview-92S0hiOS.js → Overview-DeHo3gef.js} +145 -144
- package/dist/{Overview-BXCQnl4x.js → Overview-Pmxqv6qp.js} +20 -20
- package/dist/{Point-krrZWESo.js → Point-DE_Cc85N.js} +22 -21
- package/dist/{Promotion-BjlFWrMI.js → Promotion-cZDzgho4.js} +137 -131
- package/dist/{Queue-FW3I2guh.js → Queue-DmDbrtTk.js} +45 -45
- package/dist/{Record-Hj3_FQp6.js → Record-uxNNOvmK.js} +9 -9
- package/dist/{Review-CBL5Wga7.js → Review-CIIn_Bdx.js} +2 -2
- package/dist/ReviewFacebookCallback-CO6FxHzc.js +225 -0
- package/dist/{ReviewGoogleCallback-CAqc1gmT.js → ReviewGoogleCallback-B7kmGwb_.js} +5 -5
- package/dist/{Reward-UN-LYZPR.js → Reward-Bj1snFu8.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C4deW4H6.js → RewardGroup.vue_vue_type_script_setup_true_lang-BO-36dE4.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-b7ZEMd4s.js +1923 -0
- package/dist/{Segment-D9ehFadR.js → Segment-BgJgWa6C.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D7PbDKI7.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D2TDoZgQ.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DWXfOk-I.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEBH11hR.js} +4 -4
- package/dist/Setting-DpEI72mW.js +574 -0
- package/dist/{SettingAdvertisements-BNWTSQ14.js → SettingAdvertisements-vdUtIXwC.js} +12 -12
- package/dist/Settings-C6yJ1WEB.js +286 -0
- package/dist/{Store-vRzLqmIu.js → Store-DgltT0RA.js} +28 -28
- package/dist/{StoreRewards-DitATf4s.js → StoreRewards-BXH_5cYL.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DqlluwMB.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js +7007 -0
- package/dist/{Tier-B0JGxXei.js → Tier-CqfHGUX0.js} +2575 -687
- package/dist/{Title-DBLK191p.js → Title-B5VnUNiS.js} +95 -94
- package/dist/{Transaction-CUthGjH1.js → Transaction-BZh1Q9Lj.js} +2 -2
- package/dist/Upselling-Cf24ub-9.js +1055 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CUCR6aEY.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Buj7CRlQ.js} +26 -26
- package/dist/{Voucher-DsyOteEs.js → Voucher-CZJdV2Ok.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Ddbutv4Y.js → VoucherEditor.vue_vue_type_script_setup_true_lang-65x2VrpD.js} +12 -12
- package/dist/{WhatsappAccount-PWKWg15w.js → WhatsappAccount-DsRilNC5.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-HUSiUfoc.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js} +1 -1
- package/dist/{WhatsappBot-CMFcJj1b.js → WhatsappBot-CpzMaTss.js} +6 -6
- package/dist/{WhatsappBotLogs-CVOw3VxD.js → WhatsappBotLogs-DRF8VufQ.js} +6 -6
- package/dist/{WhatsappBotSettings-ouG9rSoI.js → WhatsappBotSettings-DSUPGC-p.js} +4 -4
- package/dist/{WhatsappLayout-CHtKQYog.js → WhatsappLayout-BCWYcQmD.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-B0tpwJ9B.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CEytppMm.js → ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js} +2 -2
- package/dist/{app-CZGZKKye.js → app-BQeODViN.js} +14861 -15017
- package/dist/app.js +4 -3
- package/dist/{base.export-Cxm_LrqA.js → base.export-kSFLDDoC.js} +2 -2
- package/dist/{business-CieIljvm.js → business-EP-Do3Ew.js} +1 -1
- package/dist/{campaign-DhN6zKES.js → campaign-BjnUPowX.js} +34 -28
- package/dist/{campaign-DWClF3jI.js → campaign-C8GgaCub.js} +121 -94
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-DQ--gL4B.js +776 -0
- package/dist/{collection.fn-Cep8tuk5.js → collection.fn-BhXecwh5.js} +2 -2
- package/dist/{currency-DhwsYY32.js → currency-CGMNh1Q_.js} +1 -1
- package/dist/duplicateCampaign-icqF8Na9.js +51 -0
- package/dist/{effect-BwOOpJRh.js → effect-Bc6oGIWd.js} +1 -1
- package/dist/{email-addresses-DZB2oj9y.js → email-addresses-B3KWfUMk.js} +25 -25
- package/dist/{feature-flag-BSpbhSMn.js → feature-flag-HhjvSuDm.js} +171 -185
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-D_4T4gbM.js → helper-D1BYvcED.js} +1 -1
- package/dist/{index-DgCpTG1m.js → index-BIBcfAw5.js} +1 -1
- package/dist/{index-BpnjNIh1.js → index-BkevK_Hp.js} +1 -1
- package/dist/{index-D5OOlgos.js → index-Br2SLVsn.js} +608 -251
- package/dist/{index-BYipoHQc.js → index-Bunp1bt_.js} +1 -1
- package/dist/{index-BDKVZZR0.js → index-C-46QHFh.js} +380 -234
- package/dist/{index-MCyDYhZI.js → index-C3MK8Twg.js} +1 -1
- package/dist/{index-DVir0ptH.js → index-CsYTLmPa.js} +4 -4
- package/dist/{index-Dh815w-7.js → index-D2TnjKPP.js} +23 -23
- package/dist/{index-CyYV4eem.js → index-DCC3pLug.js} +19 -6
- package/dist/{index-X5Gzu80O.js → index-DOSuhtdE.js} +1 -1
- package/dist/{index-FrOuWhLi.js → index-DeqpfWLa.js} +3 -3
- package/dist/{index-Df4ox2zj.js → index-DiCgGQoC.js} +2 -2
- package/dist/{index-tUxF4g8G.js → index-GQv1_jaJ.js} +2 -2
- package/dist/{index-rcMo_-nr.js → index-Ptcqv0W6.js} +2 -2
- package/dist/{index-CY88cQHU.js → index-VLFerh-X.js} +10 -10
- package/dist/{index-DcTRgcug.js → index-VyoufKYY.js} +1 -1
- package/dist/{index-BtN3vRvA.js → index-Yw4M7v7m.js} +2699 -2614
- package/dist/{index-DcO1O6fl.js → index-cPPWotJe.js} +10 -10
- package/dist/{index-FKxe6jKI.js → index-gMrtUwSD.js} +316 -316
- package/dist/{index-CIJKKs_J.js → index-oIo5Cful.js} +533 -462
- package/dist/{index.esm2017-DSF7lxrn.js → index.esm2017-DUZpLdEB.js} +93 -93
- package/dist/{loading-B4qq_74t.js → loading-DhpcQgdj.js} +1 -1
- package/dist/{lodash-BuScZ_TM.js → lodash-r4AR7GJC.js} +1 -1
- package/dist/{member-import-DyM1Xskc.js → member-import-CogEef9H.js} +1 -1
- package/dist/{membership-C77S6FIb.js → membership-BQFkjRjs.js} +2 -2
- package/dist/{money-Dcr44NhN.js → money-Ifqd4pyC.js} +1 -1
- package/dist/{number-C2u_79r4.js → number-C9Tw_Ncm.js} +1 -1
- package/dist/objectid-D7dqM1a3.js +145 -0
- package/dist/{onboarding-Chxkor1U.js → onboarding-D4dm_rxU.js} +36 -36
- package/dist/{onboardingSetup-BvL9lW9U.js → onboardingSetup-DtNZUoRr.js} +2 -2
- package/dist/{plugins-dnLWrrhC.js → plugins-DGI9Fkiu.js} +3 -3
- package/dist/{reward-DVHKTXQL.js → reward-DTtejZqM.js} +1 -1
- package/dist/{rule-IYgreBdC.js → rule-C4N3ce3c.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-YhWRyNGp.js +227 -0
- package/dist/{timezone-Cdp7cU32.js → timezone-5rYhX7XZ.js} +1 -1
- package/dist/{transaction.fn-kl4EZybB.js → transaction.fn-Ba_U7HdT.js} +2 -2
- package/dist/{trigger-C1m8eupI.js → trigger-B8I1aO6Y.js} +9 -9
- package/dist/{useMarketingMaterialActions-m5OLWGoL.js → useMarketingMaterialActions-CTOFHmlL.js} +4 -4
- package/dist/{usePagination-DX82vEDi.js → usePagination-3wAPVCOp.js} +1 -1
- package/dist/{user-DBndrlMY.js → user-Ds4DW_-Y.js} +1 -1
- package/dist/vue-i18n-Bqlt_-jA.js +2365 -0
- package/dist/{xlsx-ColLmoRB.js → xlsx-xlOCvuAq.js} +166 -166
- package/dist/{zod-CHmP8TTi.js → zod-GVNjvrpT.js} +1 -1
- package/package.json +6 -2
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-qX_uFelR.js +0 -3493
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DyvEDRBE.js +0 -1308
- package/dist/ReviewFacebookCallback-31bFMGu3.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BbzRH7BF.js +0 -1884
- package/dist/Setting-DGoNxCsO.js +0 -578
- package/dist/Settings-CQ67orRm.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DEP0FuoM.js +0 -1297
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DndMZr1k.js +0 -142
- package/dist/Upselling-CZLmpsdx.js +0 -200
- package/dist/campaign.fn-CKTsVS5U.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-nYLSIO_I.js +0 -145
- package/dist/rule-builder-QC_xPC4L.js +0 -102
- package/dist/template-COvkfF2w.js +0 -275
- package/dist/vue-i18n-FBUIkfn5.js +0 -2365
|
@@ -1,133 +1,144 @@
|
|
|
1
|
-
import { defineComponent as xe, ref as te, h as U, Comment as cn, computed as
|
|
1
|
+
import { defineComponent as xe, ref as te, h as U, Comment as cn, computed as Y, watch as ie, resolveComponent as ee, openBlock as j, createElementBlock as me, createVNode as S, unref as _, createElementVNode as I, toDisplayString as R, createBlock as Oe, withCtx as Z, Fragment as It, renderList as ln, onMounted as un, createCommentVNode as Pe, nextTick as dn } from "vue";
|
|
2
2
|
import { useRouter as yt, useRoute as wt, RouterView as hn } from "vue-router";
|
|
3
3
|
import { useCoreStore as ge, FeedMeAuth as fn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as pn } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as mn } from "./business-
|
|
6
|
-
import { u as gn, l as _n } from "./feature-flag-
|
|
7
|
-
import "./index-
|
|
8
|
-
import { components as
|
|
9
|
-
import { u as Tt } from "./vue-i18n-
|
|
10
|
-
import { m as yn } from "./index-
|
|
11
|
-
import { C as Xe } from "./timezone-
|
|
12
|
-
import { u as wn } from "./onboarding-
|
|
13
|
-
import { R as
|
|
14
|
-
import { J as
|
|
15
|
-
import { r as Le, L as
|
|
5
|
+
import { u as mn } from "./business-EP-Do3Ew.js";
|
|
6
|
+
import { u as gn, l as _n } from "./feature-flag-HhjvSuDm.js";
|
|
7
|
+
import "./index-BkevK_Hp.js";
|
|
8
|
+
import { components as W, useSnackbar as vn, useDialog as In } from "@feedmepos/ui-library";
|
|
9
|
+
import { u as Tt } from "./vue-i18n-Bqlt_-jA.js";
|
|
10
|
+
import { m as yn } from "./index-C3MK8Twg.js";
|
|
11
|
+
import { C as Xe } from "./timezone-5rYhX7XZ.js";
|
|
12
|
+
import { u as wn } from "./onboarding-D4dm_rxU.js";
|
|
13
|
+
import { R as f, A as Tn, a as Qe } from "./app-BQeODViN.js";
|
|
14
|
+
import { J as kn } from "./JsonViewer-v8_C7l5N.js";
|
|
15
|
+
import { r as Le, L as bn, g as kt, i as En, a as Sn, _ as Ze, C as et, b as Rn, S as se, c as A, d as X, E as Fe, e as An, f as bt, h as Pn, j as Cn, k as Et, l as w, m as Nn, F as Ve, n as On, q as oe, o as Ln, p as Mn, s as Un, t as Dn, u as xn } from "./index.esm2017-DUZpLdEB.js";
|
|
16
16
|
import { _ as $e } from "./tslib.es6-BCqqvLQ_.js";
|
|
17
|
-
import { S as tt, c as
|
|
18
|
-
const
|
|
17
|
+
import { S as tt, c as Fn } from "./index-cPPWotJe.js";
|
|
18
|
+
const Vn = { class: "flex flex-col h-full justify-between py-16" }, $n = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Hn = /* @__PURE__ */ xe({
|
|
19
19
|
__name: "NavigationTab",
|
|
20
20
|
setup(n) {
|
|
21
21
|
const { t: e, locale: t } = Tt(), i = wn(), r = gn(), s = te(), o = [
|
|
22
22
|
{
|
|
23
23
|
label: e("connect.navigation.analytic"),
|
|
24
|
-
value:
|
|
24
|
+
value: f["$connect-ANALYTIC"]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: e("connect.navigation.upselling"),
|
|
28
|
+
value: f["$connect-UPSELLING"]
|
|
25
29
|
},
|
|
26
|
-
{ label: "Upselling", value: p["$connect-UPSELLING"] },
|
|
27
30
|
{
|
|
28
31
|
label: e("connect.navigation.campaign"),
|
|
29
|
-
value:
|
|
32
|
+
value: f["$connect-CAMPAIGN"],
|
|
30
33
|
children: [
|
|
31
34
|
{
|
|
32
35
|
label: e("connect.navigation.promotion"),
|
|
33
|
-
value:
|
|
36
|
+
value: f["$connect-CAMPAIGN_PROMOTION"]
|
|
34
37
|
},
|
|
35
38
|
{
|
|
36
39
|
label: e("connect.navigation.voucher"),
|
|
37
|
-
value:
|
|
40
|
+
value: f["$connect-CAMPAIGN_VOUCHER"]
|
|
38
41
|
},
|
|
39
42
|
{
|
|
40
43
|
label: e("connect.navigation.broadcast"),
|
|
41
|
-
value:
|
|
44
|
+
value: f["$connect-CAMPAIGN_BROADCAST"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: e("connect.navigation.grab"),
|
|
48
|
+
value: f["$connect-CAMPAIGN_GRAB"]
|
|
42
49
|
}
|
|
43
50
|
]
|
|
44
51
|
},
|
|
45
52
|
{
|
|
46
53
|
label: e("connect.navigation.program"),
|
|
47
|
-
value:
|
|
54
|
+
value: f["$connect-PROGRAM"],
|
|
48
55
|
children: [
|
|
49
56
|
{
|
|
50
57
|
label: e("connect.navigation.tier"),
|
|
51
|
-
value:
|
|
58
|
+
value: f["$connect-PROGRAM_TIER"]
|
|
52
59
|
},
|
|
53
60
|
{
|
|
54
61
|
label: e("connect.navigation.title"),
|
|
55
|
-
value:
|
|
62
|
+
value: f["$connect-PROGRAM_TITLE"]
|
|
56
63
|
},
|
|
57
64
|
{
|
|
58
65
|
label: e("connect.navigation.experience"),
|
|
59
|
-
value:
|
|
66
|
+
value: f["$connect-PROGRAM_EXPERIENCE"]
|
|
60
67
|
},
|
|
61
68
|
{
|
|
62
69
|
label: e("connect.navigation.point"),
|
|
63
|
-
value:
|
|
64
|
-
badge: () => U(
|
|
70
|
+
value: f["$connect-PROGRAM_POINT"],
|
|
71
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
65
72
|
},
|
|
66
73
|
{
|
|
67
74
|
label: e("connect.navigation.credit"),
|
|
68
|
-
value:
|
|
75
|
+
value: f["$connect-PROGRAM_CREDIT"]
|
|
69
76
|
},
|
|
70
77
|
{
|
|
71
78
|
label: e("connect.navigation.game"),
|
|
72
|
-
value:
|
|
73
|
-
badge: () => U(
|
|
79
|
+
value: f["$connect-PROGRAM_GAME"],
|
|
80
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
74
81
|
},
|
|
75
82
|
{
|
|
76
83
|
label: "Mission",
|
|
77
|
-
value:
|
|
84
|
+
value: f["$connect-PROGRAM_MISSION"]
|
|
78
85
|
}
|
|
79
86
|
]
|
|
80
87
|
},
|
|
81
88
|
{
|
|
82
89
|
label: e("connect.navigation.loyalty"),
|
|
83
|
-
value:
|
|
90
|
+
value: f["$connect-LOYALTY"],
|
|
84
91
|
children: [
|
|
85
92
|
{
|
|
86
93
|
label: e("connect.navigation.member"),
|
|
87
|
-
value:
|
|
94
|
+
value: f["$connect-LOYALTY_MEMBER_LIST"]
|
|
88
95
|
},
|
|
89
96
|
{
|
|
90
97
|
label: e("connect.navigation.segments"),
|
|
91
|
-
value:
|
|
92
|
-
badge: () => U(
|
|
98
|
+
value: f["$connect-LOYALTY_SEGMENT"],
|
|
99
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
93
100
|
},
|
|
94
101
|
{
|
|
95
102
|
label: e("connect.navigation.card"),
|
|
96
|
-
value:
|
|
97
|
-
badge: () => U(
|
|
103
|
+
value: f["$connect-LOYALTY_CARD"],
|
|
104
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
98
105
|
}
|
|
99
106
|
]
|
|
100
107
|
},
|
|
101
108
|
{
|
|
102
109
|
label: e("connect.navigation.whatsappBot"),
|
|
103
|
-
value:
|
|
104
|
-
badge: () => U(
|
|
110
|
+
value: f["$connect-WHATSAPP"],
|
|
111
|
+
badge: () => U(W.FmPill, { variant: "beta" })
|
|
105
112
|
},
|
|
106
113
|
{
|
|
107
114
|
label: e("connect.navigation.referral"),
|
|
108
|
-
value:
|
|
109
|
-
badge: () => U(
|
|
115
|
+
value: f["$connect-REFERRAL"],
|
|
116
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
110
117
|
},
|
|
111
118
|
{
|
|
112
119
|
label: e("connect.navigation.store"),
|
|
113
|
-
value:
|
|
120
|
+
value: f["$connect-STORE"]
|
|
114
121
|
},
|
|
115
122
|
{
|
|
116
123
|
label: e("connect.navigation.transaction"),
|
|
117
|
-
value:
|
|
124
|
+
value: f["$connect-TRANSACTION"]
|
|
118
125
|
},
|
|
119
126
|
{
|
|
120
127
|
label: e("connect.navigation.marketingMaterials"),
|
|
121
|
-
value:
|
|
128
|
+
value: f["$connect-MARKETING"]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: e("connect.navigation.auditLogs"),
|
|
132
|
+
value: f["$connect-AUDIT_LOGS"]
|
|
122
133
|
},
|
|
123
134
|
{
|
|
124
135
|
label: e("connect.navigation.review"),
|
|
125
|
-
value:
|
|
136
|
+
value: f["$connect-REVIEW"]
|
|
126
137
|
},
|
|
127
138
|
{
|
|
128
139
|
label: e("connect.navigation.goals"),
|
|
129
|
-
value:
|
|
130
|
-
badge: () => i.goalsRemaining > 0 ? U(
|
|
140
|
+
value: f["$connect-GOALS"],
|
|
141
|
+
badge: () => i.goalsRemaining > 0 ? U(W.FmBadge, {
|
|
131
142
|
variant: "numeric",
|
|
132
143
|
inline: !0,
|
|
133
144
|
value: i.goalsRemaining
|
|
@@ -135,56 +146,56 @@ const $n = { class: "flex flex-col h-full justify-between py-16" }, Hn = { class
|
|
|
135
146
|
},
|
|
136
147
|
{
|
|
137
148
|
label: e("connect.navigation.setting"),
|
|
138
|
-
value:
|
|
149
|
+
value: f["$connect-SETTING"]
|
|
139
150
|
},
|
|
140
151
|
{
|
|
141
152
|
label: e("connect.navigation.bin"),
|
|
142
|
-
value:
|
|
153
|
+
value: f["$connect-BIN"]
|
|
143
154
|
}
|
|
144
|
-
], c =
|
|
155
|
+
], c = Y(
|
|
145
156
|
() => o.filter(
|
|
146
|
-
(
|
|
157
|
+
(h) => (h.value !== f["$connect-WHATSAPP"] || r() === "on") && (h.value !== f["$connect-UPSELLING"] || m.namespace.value === "dev" && m.currentCountry.value === "MY")
|
|
147
158
|
)
|
|
148
|
-
), a = yt(), l = wt(), d = o.reduce((
|
|
149
|
-
const
|
|
150
|
-
return console.log(`[MF] Timezone set to: ${Xe[
|
|
159
|
+
), a = yt(), l = wt(), d = o.reduce((h, p) => [...(p.children ?? []).map((g) => g.value), ...h, p.value], []), m = ge(), y = Y(() => {
|
|
160
|
+
const h = m.currentCountry.value || "MY";
|
|
161
|
+
return console.log(`[MF] Timezone set to: ${Xe[h]}`), Xe[h];
|
|
151
162
|
});
|
|
152
163
|
ie(
|
|
153
164
|
// Watch `route.matched`, not `route`: `useRoute()` returns a reactive object
|
|
154
165
|
// whose identity never changes, so watching it directly fired once via
|
|
155
166
|
// `immediate` and the highlight then stayed on whatever page loaded first.
|
|
156
167
|
() => l.matched,
|
|
157
|
-
(
|
|
158
|
-
const
|
|
159
|
-
|
|
168
|
+
(h) => {
|
|
169
|
+
const g = h.map((v) => v.name).reverse().find((v) => d.includes(v));
|
|
170
|
+
g && (s.value = g);
|
|
160
171
|
},
|
|
161
172
|
{ immediate: !0 }
|
|
162
173
|
), ie(
|
|
163
174
|
[() => {
|
|
164
|
-
var
|
|
165
|
-
return (
|
|
175
|
+
var h;
|
|
176
|
+
return (h = m.currentBusiness.value) == null ? void 0 : h._id;
|
|
166
177
|
}, () => l.name, t],
|
|
167
|
-
([
|
|
168
|
-
|
|
178
|
+
([h]) => {
|
|
179
|
+
h && i.read(t.value, h);
|
|
169
180
|
},
|
|
170
181
|
{ immediate: !0 }
|
|
171
182
|
);
|
|
172
|
-
async function
|
|
173
|
-
await a.push({ name:
|
|
183
|
+
async function T(h) {
|
|
184
|
+
await a.push({ name: h });
|
|
174
185
|
}
|
|
175
|
-
return (
|
|
176
|
-
var
|
|
177
|
-
const
|
|
178
|
-
return
|
|
179
|
-
|
|
186
|
+
return (h, p) => {
|
|
187
|
+
var v;
|
|
188
|
+
const g = ee("FmCollapsibleTabs");
|
|
189
|
+
return j(), me("div", Vn, [
|
|
190
|
+
S(g, {
|
|
180
191
|
class: "border-fm-color-neutral-gray-100 border-r px-4",
|
|
181
|
-
"model-value": (
|
|
182
|
-
items:
|
|
183
|
-
"onUpdate:modelValue":
|
|
192
|
+
"model-value": (v = _(s)) == null ? void 0 : v.toString(),
|
|
193
|
+
items: _(c),
|
|
194
|
+
"onUpdate:modelValue": T
|
|
184
195
|
}, null, 8, ["model-value", "items"]),
|
|
185
|
-
I("div",
|
|
186
|
-
I("div", null, "Timezone: " +
|
|
187
|
-
I("div", null, "(UTC" +
|
|
196
|
+
I("div", $n, [
|
|
197
|
+
I("div", null, "Timezone: " + R(_(y).split("/")[1].replace("_", " ")), 1),
|
|
198
|
+
I("div", null, "(UTC" + R(_(yn).tz(_(y)).format("Z")) + ")", 1)
|
|
188
199
|
])
|
|
189
200
|
]);
|
|
190
201
|
};
|
|
@@ -197,13 +208,13 @@ function Wn() {
|
|
|
197
208
|
return !1;
|
|
198
209
|
}
|
|
199
210
|
}
|
|
200
|
-
function
|
|
211
|
+
function jn() {
|
|
201
212
|
try {
|
|
202
213
|
localStorage.setItem(St, (/* @__PURE__ */ new Date()).toISOString());
|
|
203
214
|
} catch {
|
|
204
215
|
}
|
|
205
216
|
}
|
|
206
|
-
const Gn = { class: "flex flex-col gap-12" },
|
|
217
|
+
const Gn = { class: "flex flex-col gap-12" }, Bn = { class: "fm-corner-radius-xxl bg-fm-color-primary-oats flex items-start gap-4 self-start px-12 py-4" }, zn = { class: "fm-typo-en-body-sm-600 text-fm-color-primary" }, qn = { class: "fm-typo-en-title-sm-800 max-w-[560px] leading-[42px]" }, Kn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary max-w-[600px]" }, Jn = { class: "flex flex-col gap-24 pb-8" }, Yn = { class: "grid grid-cols-1 gap-16 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3" }, Xn = { class: "fm-corner-radius-sm bg-fm-color-primary-oats flex h-40 w-40 shrink-0 items-center justify-center" }, Qn = { class: "fm-typo-en-body-lg-600" }, Zn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ei = { class: "shrink-0" }, ti = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ni = { class: "flex w-full flex-col gap-12 px-[16px]" }, ii = { class: "flex flex-wrap items-center gap-12" }, ri = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, si = /* @__PURE__ */ xe({
|
|
207
218
|
__name: "AiMarketingPromoDialog",
|
|
208
219
|
setup(n) {
|
|
209
220
|
let e = !1;
|
|
@@ -211,40 +222,40 @@ const Gn = { class: "flex flex-col gap-12" }, zn = { class: "fm-corner-radius-xx
|
|
|
211
222
|
{ key: "completeContent", icon: "layers" },
|
|
212
223
|
{ key: "realContext", icon: "storefront" },
|
|
213
224
|
{ key: "socialFormat", icon: "aspect_ratio" }
|
|
214
|
-
], a =
|
|
215
|
-
var
|
|
216
|
-
const
|
|
217
|
-
return
|
|
225
|
+
], a = Y(() => {
|
|
226
|
+
var h;
|
|
227
|
+
const T = ((h = r.value) == null ? void 0 : h.permissions) ?? [];
|
|
228
|
+
return Tn(
|
|
218
229
|
[
|
|
219
230
|
{
|
|
220
231
|
action: Qe.Action.manage,
|
|
221
232
|
subject: Qe.Subject.Business.crm_marketingMaterial
|
|
222
233
|
}
|
|
223
234
|
],
|
|
224
|
-
|
|
235
|
+
T
|
|
225
236
|
).granted;
|
|
226
|
-
}), l =
|
|
237
|
+
}), l = Y(
|
|
227
238
|
() => s.value === "MY" && a.value
|
|
228
239
|
);
|
|
229
240
|
let d = !1;
|
|
230
241
|
ie(
|
|
231
242
|
l,
|
|
232
|
-
(
|
|
233
|
-
d || !
|
|
243
|
+
(T) => {
|
|
244
|
+
d || !T || (d = !0, !(Wn() || e) && (e = !0, o.value = !0));
|
|
234
245
|
},
|
|
235
246
|
{ immediate: !0 }
|
|
236
247
|
);
|
|
237
248
|
async function m() {
|
|
238
|
-
o.value = !1, await i.push({ name:
|
|
249
|
+
o.value = !1, await i.push({ name: f["$connect-MARKETING"] });
|
|
239
250
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
251
|
+
function y() {
|
|
252
|
+
jn(), o.value = !1;
|
|
242
253
|
}
|
|
243
|
-
return (
|
|
244
|
-
const
|
|
245
|
-
return
|
|
254
|
+
return (T, h) => {
|
|
255
|
+
const p = ee("FmIcon"), g = ee("FmCard"), v = ee("FmButton"), M = ee("FmDialog");
|
|
256
|
+
return j(), Oe(M, {
|
|
246
257
|
modelValue: o.value,
|
|
247
|
-
"onUpdate:modelValue":
|
|
258
|
+
"onUpdate:modelValue": h[0] || (h[0] = (k) => o.value = k),
|
|
248
259
|
"min-width": "min(500px, calc(100% - 48px))",
|
|
249
260
|
"max-width": "min(860px, calc(100% - 48px))",
|
|
250
261
|
"max-height": "90vh",
|
|
@@ -252,75 +263,75 @@ const Gn = { class: "flex flex-col gap-12" }, zn = { class: "fm-corner-radius-xx
|
|
|
252
263
|
}, {
|
|
253
264
|
"dialog-header": Z(() => [
|
|
254
265
|
I("div", Gn, [
|
|
255
|
-
I("div",
|
|
256
|
-
|
|
266
|
+
I("div", Bn, [
|
|
267
|
+
S(p, {
|
|
257
268
|
name: "auto_awesome",
|
|
258
269
|
size: "sm",
|
|
259
270
|
color: "primary"
|
|
260
271
|
}),
|
|
261
|
-
I("span",
|
|
272
|
+
I("span", zn, R(_(t)("connect.marketing.whatsNew.badge")), 1)
|
|
262
273
|
]),
|
|
263
|
-
I("h1",
|
|
264
|
-
I("p",
|
|
274
|
+
I("h1", qn, R(_(t)("connect.marketing.whatsNew.title")), 1),
|
|
275
|
+
I("p", Kn, R(_(t)("connect.marketing.whatsNew.subtitle")), 1)
|
|
265
276
|
])
|
|
266
277
|
]),
|
|
267
278
|
"dialog-footer": Z(() => [
|
|
268
|
-
I("div",
|
|
269
|
-
I("div",
|
|
270
|
-
|
|
279
|
+
I("div", ni, [
|
|
280
|
+
I("div", ii, [
|
|
281
|
+
S(v, {
|
|
271
282
|
variant: "primary",
|
|
272
283
|
size: "lg",
|
|
273
|
-
label:
|
|
284
|
+
label: _(t)("connect.marketing.whatsNew.cta"),
|
|
274
285
|
"append-icon": "arrow_forward",
|
|
275
286
|
onClick: m
|
|
276
287
|
}, null, 8, ["label"]),
|
|
277
|
-
|
|
288
|
+
S(v, {
|
|
278
289
|
variant: "tertiary",
|
|
279
290
|
size: "lg",
|
|
280
|
-
label:
|
|
281
|
-
onClick:
|
|
291
|
+
label: _(t)("connect.marketing.whatsNew.dismiss"),
|
|
292
|
+
onClick: y
|
|
282
293
|
}, null, 8, ["label"])
|
|
283
294
|
]),
|
|
284
|
-
I("div",
|
|
295
|
+
I("div", ri, R(_(t)("connect.marketing.whatsNew.footnote")), 1)
|
|
285
296
|
])
|
|
286
297
|
]),
|
|
287
298
|
default: Z(() => [
|
|
288
|
-
I("div",
|
|
289
|
-
I("div",
|
|
290
|
-
(
|
|
291
|
-
key:
|
|
299
|
+
I("div", Jn, [
|
|
300
|
+
I("div", Yn, [
|
|
301
|
+
(j(), me(It, null, ln(c, (k) => S(g, {
|
|
302
|
+
key: k.key,
|
|
292
303
|
variant: "outlined",
|
|
293
304
|
class: "!h-full flex flex-col gap-8 p-16"
|
|
294
305
|
}, {
|
|
295
306
|
default: Z(() => [
|
|
296
|
-
I("div",
|
|
297
|
-
|
|
298
|
-
name:
|
|
307
|
+
I("div", Xn, [
|
|
308
|
+
S(p, {
|
|
309
|
+
name: k.icon,
|
|
299
310
|
size: "md",
|
|
300
311
|
color: "primary"
|
|
301
312
|
}, null, 8, ["name"])
|
|
302
313
|
]),
|
|
303
|
-
I("div",
|
|
304
|
-
I("div",
|
|
305
|
-
`connect.marketing.whatsNew.benefits.${
|
|
314
|
+
I("div", Qn, R(_(t)(`connect.marketing.whatsNew.benefits.${k.key}.title`)), 1),
|
|
315
|
+
I("div", Zn, R(_(t)(
|
|
316
|
+
`connect.marketing.whatsNew.benefits.${k.key}.description`
|
|
306
317
|
)), 1)
|
|
307
318
|
]),
|
|
308
319
|
_: 2
|
|
309
320
|
}, 1024)), 64))
|
|
310
321
|
]),
|
|
311
|
-
|
|
322
|
+
S(g, {
|
|
312
323
|
variant: "outlined",
|
|
313
324
|
class: "flex items-start gap-12 p-16"
|
|
314
325
|
}, {
|
|
315
326
|
default: Z(() => [
|
|
316
|
-
I("div",
|
|
317
|
-
|
|
327
|
+
I("div", ei, [
|
|
328
|
+
S(p, {
|
|
318
329
|
name: "lightbulb",
|
|
319
330
|
size: "md",
|
|
320
331
|
color: "primary"
|
|
321
332
|
})
|
|
322
333
|
]),
|
|
323
|
-
I("p",
|
|
334
|
+
I("p", ti, R(_(t)("connect.marketing.whatsNew.callout")), 1)
|
|
324
335
|
]),
|
|
325
336
|
_: 1
|
|
326
337
|
})
|
|
@@ -331,7 +342,7 @@ const Gn = { class: "flex flex-col gap-12" }, zn = { class: "fm-corner-radius-xx
|
|
|
331
342
|
};
|
|
332
343
|
}
|
|
333
344
|
});
|
|
334
|
-
var
|
|
345
|
+
var oi = "firebase", ai = "10.12.4";
|
|
335
346
|
/**
|
|
336
347
|
* @license
|
|
337
348
|
* Copyright 2020 Google LLC
|
|
@@ -348,13 +359,13 @@ var ai = "firebase", ci = "10.12.4";
|
|
|
348
359
|
* See the License for the specific language governing permissions and
|
|
349
360
|
* limitations under the License.
|
|
350
361
|
*/
|
|
351
|
-
Le(
|
|
362
|
+
Le(oi, ai, "app");
|
|
352
363
|
function Rt() {
|
|
353
364
|
return {
|
|
354
365
|
"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."
|
|
355
366
|
};
|
|
356
367
|
}
|
|
357
|
-
const
|
|
368
|
+
const ci = Rt, At = new Fe("auth", "Firebase", Rt());
|
|
358
369
|
/**
|
|
359
370
|
* @license
|
|
360
371
|
* Copyright 2020 Google LLC
|
|
@@ -371,8 +382,8 @@ const li = Rt, Pt = new Fe("auth", "Firebase", Rt());
|
|
|
371
382
|
* See the License for the specific language governing permissions and
|
|
372
383
|
* limitations under the License.
|
|
373
384
|
*/
|
|
374
|
-
const _e = new
|
|
375
|
-
function
|
|
385
|
+
const _e = new bn("@firebase/auth");
|
|
386
|
+
function li(n, ...e) {
|
|
376
387
|
_e.logLevel <= Et.WARN && _e.warn(`Auth (${se}): ${n}`, ...e);
|
|
377
388
|
}
|
|
378
389
|
function de(n, ...e) {
|
|
@@ -394,38 +405,38 @@ function de(n, ...e) {
|
|
|
394
405
|
* See the License for the specific language governing permissions and
|
|
395
406
|
* limitations under the License.
|
|
396
407
|
*/
|
|
397
|
-
function
|
|
408
|
+
function O(n, ...e) {
|
|
398
409
|
throw He(n, ...e);
|
|
399
410
|
}
|
|
400
|
-
function
|
|
411
|
+
function b(n, ...e) {
|
|
401
412
|
return He(n, ...e);
|
|
402
413
|
}
|
|
403
|
-
function
|
|
404
|
-
const i = Object.assign(Object.assign({},
|
|
414
|
+
function Pt(n, e, t) {
|
|
415
|
+
const i = Object.assign(Object.assign({}, ci()), { [e]: t });
|
|
405
416
|
return new Fe("auth", "Firebase", i).create(e, {
|
|
406
417
|
appName: n.name
|
|
407
418
|
});
|
|
408
419
|
}
|
|
409
420
|
function H(n) {
|
|
410
|
-
return
|
|
421
|
+
return Pt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
411
422
|
}
|
|
412
423
|
function He(n, ...e) {
|
|
413
424
|
if (typeof n != "string") {
|
|
414
425
|
const t = e[0], i = [...e.slice(1)];
|
|
415
426
|
return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
|
|
416
427
|
}
|
|
417
|
-
return
|
|
428
|
+
return At.create(n, ...e);
|
|
418
429
|
}
|
|
419
430
|
function u(n, e, ...t) {
|
|
420
431
|
if (!n)
|
|
421
432
|
throw He(e, ...t);
|
|
422
433
|
}
|
|
423
|
-
function
|
|
434
|
+
function P(n) {
|
|
424
435
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
425
436
|
throw de(e), new Error(e);
|
|
426
437
|
}
|
|
427
|
-
function
|
|
428
|
-
n ||
|
|
438
|
+
function L(n, e) {
|
|
439
|
+
n || P(e);
|
|
429
440
|
}
|
|
430
441
|
/**
|
|
431
442
|
* @license
|
|
@@ -447,7 +458,7 @@ function Me() {
|
|
|
447
458
|
var n;
|
|
448
459
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
449
460
|
}
|
|
450
|
-
function
|
|
461
|
+
function ui() {
|
|
451
462
|
return nt() === "http:" || nt() === "https:";
|
|
452
463
|
}
|
|
453
464
|
function nt() {
|
|
@@ -470,15 +481,15 @@ function nt() {
|
|
|
470
481
|
* See the License for the specific language governing permissions and
|
|
471
482
|
* limitations under the License.
|
|
472
483
|
*/
|
|
473
|
-
function
|
|
484
|
+
function di() {
|
|
474
485
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
475
486
|
// This is especially true for Cordova apps which have unreliable
|
|
476
487
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
477
488
|
// installed which overwrites the native navigator.onLine value and
|
|
478
489
|
// defines navigator.connection.
|
|
479
|
-
(
|
|
490
|
+
(ui() || Rn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
480
491
|
}
|
|
481
|
-
function
|
|
492
|
+
function hi() {
|
|
482
493
|
if (typeof navigator > "u")
|
|
483
494
|
return null;
|
|
484
495
|
const n = navigator;
|
|
@@ -508,10 +519,10 @@ function fi() {
|
|
|
508
519
|
*/
|
|
509
520
|
class ae {
|
|
510
521
|
constructor(e, t) {
|
|
511
|
-
this.shortDelay = e, this.longDelay = t,
|
|
522
|
+
this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile = En() || Sn();
|
|
512
523
|
}
|
|
513
524
|
get() {
|
|
514
|
-
return
|
|
525
|
+
return di() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
515
526
|
}
|
|
516
527
|
}
|
|
517
528
|
/**
|
|
@@ -530,8 +541,8 @@ class ae {
|
|
|
530
541
|
* See the License for the specific language governing permissions and
|
|
531
542
|
* limitations under the License.
|
|
532
543
|
*/
|
|
533
|
-
function
|
|
534
|
-
|
|
544
|
+
function We(n, e) {
|
|
545
|
+
L(n.emulator, "Emulator should always be set here");
|
|
535
546
|
const { url: t } = n.emulator;
|
|
536
547
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
|
537
548
|
}
|
|
@@ -564,7 +575,7 @@ class Ct {
|
|
|
564
575
|
return globalThis.fetch;
|
|
565
576
|
if (typeof fetch < "u")
|
|
566
577
|
return fetch;
|
|
567
|
-
|
|
578
|
+
P("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
568
579
|
}
|
|
569
580
|
static headers() {
|
|
570
581
|
if (this.headersImpl)
|
|
@@ -575,7 +586,7 @@ class Ct {
|
|
|
575
586
|
return globalThis.Headers;
|
|
576
587
|
if (typeof Headers < "u")
|
|
577
588
|
return Headers;
|
|
578
|
-
|
|
589
|
+
P("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
579
590
|
}
|
|
580
591
|
static response() {
|
|
581
592
|
if (this.responseImpl)
|
|
@@ -586,7 +597,7 @@ class Ct {
|
|
|
586
597
|
return globalThis.Response;
|
|
587
598
|
if (typeof Response < "u")
|
|
588
599
|
return Response;
|
|
589
|
-
|
|
600
|
+
P("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
590
601
|
}
|
|
591
602
|
}
|
|
592
603
|
/**
|
|
@@ -605,7 +616,7 @@ class Ct {
|
|
|
605
616
|
* See the License for the specific language governing permissions and
|
|
606
617
|
* limitations under the License.
|
|
607
618
|
*/
|
|
608
|
-
const
|
|
619
|
+
const fi = {
|
|
609
620
|
// Custom token errors.
|
|
610
621
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
611
622
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -696,7 +707,7 @@ const pi = {
|
|
|
696
707
|
* See the License for the specific language governing permissions and
|
|
697
708
|
* limitations under the License.
|
|
698
709
|
*/
|
|
699
|
-
const
|
|
710
|
+
const pi = new ae(3e4, 6e4);
|
|
700
711
|
function Te(n, e) {
|
|
701
712
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
702
713
|
}
|
|
@@ -722,9 +733,9 @@ async function Q(n, e, t, i, r = {}) {
|
|
|
722
733
|
}
|
|
723
734
|
async function Nt(n, e, t) {
|
|
724
735
|
n._canInitEmulator = !1;
|
|
725
|
-
const i = Object.assign(Object.assign({},
|
|
736
|
+
const i = Object.assign(Object.assign({}, fi), e);
|
|
726
737
|
try {
|
|
727
|
-
const r = new
|
|
738
|
+
const r = new mi(n), s = await Promise.race([
|
|
728
739
|
t(),
|
|
729
740
|
r.promise
|
|
730
741
|
]);
|
|
@@ -744,33 +755,33 @@ async function Nt(n, e, t) {
|
|
|
744
755
|
throw ue(n, "user-disabled", o);
|
|
745
756
|
const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
746
757
|
if (l)
|
|
747
|
-
throw
|
|
748
|
-
|
|
758
|
+
throw Pt(n, d, l);
|
|
759
|
+
O(n, d);
|
|
749
760
|
}
|
|
750
761
|
} catch (r) {
|
|
751
762
|
if (r instanceof Ve)
|
|
752
763
|
throw r;
|
|
753
|
-
|
|
764
|
+
O(n, "network-request-failed", { message: String(r) });
|
|
754
765
|
}
|
|
755
766
|
}
|
|
756
767
|
async function Ot(n, e, t, i, r = {}) {
|
|
757
768
|
const s = await Q(n, e, t, i, r);
|
|
758
|
-
return "mfaPendingCredential" in s &&
|
|
769
|
+
return "mfaPendingCredential" in s && O(n, "multi-factor-auth-required", {
|
|
759
770
|
_serverResponse: s
|
|
760
771
|
}), s;
|
|
761
772
|
}
|
|
762
773
|
function Lt(n, e, t, i) {
|
|
763
774
|
const r = `${e}${t}?${i}`;
|
|
764
|
-
return n.config.emulator ?
|
|
775
|
+
return n.config.emulator ? We(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
765
776
|
}
|
|
766
|
-
class
|
|
777
|
+
class mi {
|
|
767
778
|
constructor(e) {
|
|
768
779
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
769
|
-
this.timer = setTimeout(() => i(
|
|
780
|
+
this.timer = setTimeout(() => i(b(
|
|
770
781
|
this.auth,
|
|
771
782
|
"network-request-failed"
|
|
772
783
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
773
|
-
)),
|
|
784
|
+
)), pi.get());
|
|
774
785
|
});
|
|
775
786
|
}
|
|
776
787
|
clearNetworkTimeout() {
|
|
@@ -782,7 +793,7 @@ function ue(n, e, t) {
|
|
|
782
793
|
appName: n.name
|
|
783
794
|
};
|
|
784
795
|
t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
|
|
785
|
-
const r =
|
|
796
|
+
const r = b(n, e, i);
|
|
786
797
|
return r.customData._tokenResponse = t, r;
|
|
787
798
|
}
|
|
788
799
|
/**
|
|
@@ -801,7 +812,7 @@ function ue(n, e, t) {
|
|
|
801
812
|
* See the License for the specific language governing permissions and
|
|
802
813
|
* limitations under the License.
|
|
803
814
|
*/
|
|
804
|
-
async function
|
|
815
|
+
async function gi(n, e) {
|
|
805
816
|
return Q(n, "POST", "/v1/accounts:delete", e);
|
|
806
817
|
}
|
|
807
818
|
async function Mt(n, e) {
|
|
@@ -832,8 +843,8 @@ function ne(n) {
|
|
|
832
843
|
} catch {
|
|
833
844
|
}
|
|
834
845
|
}
|
|
835
|
-
async function
|
|
836
|
-
const t = X(n), i = await t.getIdToken(e), r =
|
|
846
|
+
async function _i(n, e = !1) {
|
|
847
|
+
const t = X(n), i = await t.getIdToken(e), r = je(i);
|
|
837
848
|
u(
|
|
838
849
|
r && r.exp && r.auth_time && r.iat,
|
|
839
850
|
t.auth,
|
|
@@ -854,19 +865,19 @@ async function vi(n, e = !1) {
|
|
|
854
865
|
function Ce(n) {
|
|
855
866
|
return Number(n) * 1e3;
|
|
856
867
|
}
|
|
857
|
-
function
|
|
868
|
+
function je(n) {
|
|
858
869
|
const [e, t, i] = n.split(".");
|
|
859
870
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
860
871
|
return de("JWT malformed, contained fewer than 3 sections"), null;
|
|
861
872
|
try {
|
|
862
|
-
const r =
|
|
873
|
+
const r = On(t);
|
|
863
874
|
return r ? JSON.parse(r) : (de("Failed to decode base64 JWT payload"), null);
|
|
864
875
|
} catch (r) {
|
|
865
876
|
return de("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
866
877
|
}
|
|
867
878
|
}
|
|
868
879
|
function it(n) {
|
|
869
|
-
const e =
|
|
880
|
+
const e = je(n);
|
|
870
881
|
return u(
|
|
871
882
|
e,
|
|
872
883
|
"internal-error"
|
|
@@ -903,10 +914,10 @@ async function re(n, e, t = !1) {
|
|
|
903
914
|
try {
|
|
904
915
|
return await e;
|
|
905
916
|
} catch (i) {
|
|
906
|
-
throw i instanceof Ve &&
|
|
917
|
+
throw i instanceof Ve && vi(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
907
918
|
}
|
|
908
919
|
}
|
|
909
|
-
function
|
|
920
|
+
function vi({ code: n }) {
|
|
910
921
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
911
922
|
}
|
|
912
923
|
/**
|
|
@@ -925,7 +936,7 @@ function Ii({ code: n }) {
|
|
|
925
936
|
* See the License for the specific language governing permissions and
|
|
926
937
|
* limitations under the License.
|
|
927
938
|
*/
|
|
928
|
-
class
|
|
939
|
+
class Ii {
|
|
929
940
|
constructor(e) {
|
|
930
941
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
931
942
|
}
|
|
@@ -1031,7 +1042,7 @@ async function ve(n) {
|
|
|
1031
1042
|
);
|
|
1032
1043
|
const s = r.users[0];
|
|
1033
1044
|
n._notifyReloadListener(s);
|
|
1034
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c =
|
|
1045
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c = wi(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, m = {
|
|
1035
1046
|
uid: s.localId,
|
|
1036
1047
|
displayName: s.displayName || null,
|
|
1037
1048
|
photoURL: s.photoUrl || null,
|
|
@@ -1045,11 +1056,11 @@ async function ve(n) {
|
|
|
1045
1056
|
};
|
|
1046
1057
|
Object.assign(n, m);
|
|
1047
1058
|
}
|
|
1048
|
-
async function
|
|
1059
|
+
async function yi(n) {
|
|
1049
1060
|
const e = X(n);
|
|
1050
1061
|
await ve(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
1051
1062
|
}
|
|
1052
|
-
function
|
|
1063
|
+
function wi(n, e) {
|
|
1053
1064
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
1054
1065
|
}
|
|
1055
1066
|
function Ut(n) {
|
|
@@ -1081,7 +1092,7 @@ function Ut(n) {
|
|
|
1081
1092
|
* See the License for the specific language governing permissions and
|
|
1082
1093
|
* limitations under the License.
|
|
1083
1094
|
*/
|
|
1084
|
-
async function
|
|
1095
|
+
async function Ti(n, e) {
|
|
1085
1096
|
const t = await Nt(n, {}, async () => {
|
|
1086
1097
|
const i = oe({
|
|
1087
1098
|
grant_type: "refresh_token",
|
|
@@ -1102,7 +1113,7 @@ async function ki(n, e) {
|
|
|
1102
1113
|
refreshToken: t.refresh_token
|
|
1103
1114
|
};
|
|
1104
1115
|
}
|
|
1105
|
-
async function
|
|
1116
|
+
async function ki(n, e) {
|
|
1106
1117
|
return Q(n, "POST", "/v2/accounts:revokeToken", Te(n, e));
|
|
1107
1118
|
}
|
|
1108
1119
|
/**
|
|
@@ -1121,7 +1132,7 @@ async function bi(n, e) {
|
|
|
1121
1132
|
* See the License for the specific language governing permissions and
|
|
1122
1133
|
* limitations under the License.
|
|
1123
1134
|
*/
|
|
1124
|
-
class
|
|
1135
|
+
class q {
|
|
1125
1136
|
constructor() {
|
|
1126
1137
|
this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
|
|
1127
1138
|
}
|
|
@@ -1166,14 +1177,14 @@ class K {
|
|
|
1166
1177
|
this.refreshToken = null;
|
|
1167
1178
|
}
|
|
1168
1179
|
async refresh(e, t) {
|
|
1169
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
1180
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await Ti(e, t);
|
|
1170
1181
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
1171
1182
|
}
|
|
1172
1183
|
updateTokensAndExpiration(e, t, i) {
|
|
1173
1184
|
this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + i * 1e3;
|
|
1174
1185
|
}
|
|
1175
1186
|
static fromJSON(e, t) {
|
|
1176
|
-
const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new
|
|
1187
|
+
const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new q();
|
|
1177
1188
|
return i && (u(typeof i == "string", "internal-error", {
|
|
1178
1189
|
appName: e
|
|
1179
1190
|
}), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
|
|
@@ -1193,10 +1204,10 @@ class K {
|
|
|
1193
1204
|
this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
|
|
1194
1205
|
}
|
|
1195
1206
|
_clone() {
|
|
1196
|
-
return Object.assign(new
|
|
1207
|
+
return Object.assign(new q(), this.toJSON());
|
|
1197
1208
|
}
|
|
1198
1209
|
_performRefresh() {
|
|
1199
|
-
return
|
|
1210
|
+
return P("not implemented");
|
|
1200
1211
|
}
|
|
1201
1212
|
}
|
|
1202
1213
|
/**
|
|
@@ -1218,10 +1229,10 @@ class K {
|
|
|
1218
1229
|
function D(n, e) {
|
|
1219
1230
|
u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
|
1220
1231
|
}
|
|
1221
|
-
class
|
|
1232
|
+
class C {
|
|
1222
1233
|
constructor(e) {
|
|
1223
1234
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
|
|
1224
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1235
|
+
this.providerId = "firebase", this.proactiveRefresh = new Ii(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 Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1225
1236
|
}
|
|
1226
1237
|
async getIdToken(e) {
|
|
1227
1238
|
const t = await re(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1233,10 +1244,10 @@ class N {
|
|
|
1233
1244
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1234
1245
|
}
|
|
1235
1246
|
getIdTokenResult(e) {
|
|
1236
|
-
return
|
|
1247
|
+
return _i(this, e);
|
|
1237
1248
|
}
|
|
1238
1249
|
reload() {
|
|
1239
|
-
return
|
|
1250
|
+
return yi(this);
|
|
1240
1251
|
}
|
|
1241
1252
|
_assign(e) {
|
|
1242
1253
|
this !== e && (u(
|
|
@@ -1247,7 +1258,7 @@ class N {
|
|
|
1247
1258
|
), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
|
|
1248
1259
|
}
|
|
1249
1260
|
_clone(e) {
|
|
1250
|
-
const t = new
|
|
1261
|
+
const t = new C(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
|
|
1251
1262
|
return t.metadata._copy(this.metadata), t;
|
|
1252
1263
|
}
|
|
1253
1264
|
_onReload(e) {
|
|
@@ -1275,7 +1286,7 @@ class N {
|
|
|
1275
1286
|
if (A(this.auth.app))
|
|
1276
1287
|
return Promise.reject(H(this.auth));
|
|
1277
1288
|
const e = await this.getIdToken();
|
|
1278
|
-
return await re(this,
|
|
1289
|
+
return await re(this, gi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1279
1290
|
}
|
|
1280
1291
|
toJSON() {
|
|
1281
1292
|
return Object.assign(Object.assign({
|
|
@@ -1303,20 +1314,20 @@ class N {
|
|
|
1303
1314
|
}
|
|
1304
1315
|
static _fromJSON(e, t) {
|
|
1305
1316
|
var i, r, s, o, c, a, l, d;
|
|
1306
|
-
const m = (i = t.displayName) !== null && i !== void 0 ? i : void 0,
|
|
1317
|
+
const m = (i = t.displayName) !== null && i !== void 0 ? i : void 0, y = (r = t.email) !== null && r !== void 0 ? r : void 0, T = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, h = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, p = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, v = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, M = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: k, emailVerified: Ke, isAnonymous: Je, providerData: Re, stsTokenManager: Ye } = t;
|
|
1307
1318
|
u(
|
|
1308
|
-
|
|
1319
|
+
k && Ye,
|
|
1309
1320
|
e,
|
|
1310
1321
|
"internal-error"
|
|
1311
1322
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1312
1323
|
);
|
|
1313
|
-
const on =
|
|
1324
|
+
const on = q.fromJSON(this.name, Ye);
|
|
1314
1325
|
u(
|
|
1315
|
-
typeof
|
|
1326
|
+
typeof k == "string",
|
|
1316
1327
|
e,
|
|
1317
1328
|
"internal-error"
|
|
1318
1329
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1319
|
-
), D(m, e.name), D(
|
|
1330
|
+
), D(m, e.name), D(y, e.name), u(
|
|
1320
1331
|
typeof Ke == "boolean",
|
|
1321
1332
|
e,
|
|
1322
1333
|
"internal-error"
|
|
@@ -1326,22 +1337,22 @@ class N {
|
|
|
1326
1337
|
e,
|
|
1327
1338
|
"internal-error"
|
|
1328
1339
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1329
|
-
), D(
|
|
1330
|
-
const
|
|
1331
|
-
uid:
|
|
1340
|
+
), D(T, e.name), D(h, e.name), D(p, e.name), D(g, e.name), D(v, e.name), D(M, e.name);
|
|
1341
|
+
const Ae = new C({
|
|
1342
|
+
uid: k,
|
|
1332
1343
|
auth: e,
|
|
1333
|
-
email:
|
|
1344
|
+
email: y,
|
|
1334
1345
|
emailVerified: Ke,
|
|
1335
1346
|
displayName: m,
|
|
1336
1347
|
isAnonymous: Je,
|
|
1337
|
-
photoURL:
|
|
1338
|
-
phoneNumber:
|
|
1339
|
-
tenantId:
|
|
1348
|
+
photoURL: h,
|
|
1349
|
+
phoneNumber: T,
|
|
1350
|
+
tenantId: p,
|
|
1340
1351
|
stsTokenManager: on,
|
|
1341
|
-
createdAt:
|
|
1342
|
-
lastLoginAt:
|
|
1352
|
+
createdAt: v,
|
|
1353
|
+
lastLoginAt: M
|
|
1343
1354
|
});
|
|
1344
|
-
return Re && Array.isArray(Re) && (
|
|
1355
|
+
return Re && Array.isArray(Re) && (Ae.providerData = Re.map((an) => Object.assign({}, an))), g && (Ae._redirectEventId = g), Ae;
|
|
1345
1356
|
}
|
|
1346
1357
|
/**
|
|
1347
1358
|
* Initialize a User from an idToken server response
|
|
@@ -1349,9 +1360,9 @@ class N {
|
|
|
1349
1360
|
* @param idTokenResponse
|
|
1350
1361
|
*/
|
|
1351
1362
|
static async _fromIdTokenResponse(e, t, i = !1) {
|
|
1352
|
-
const r = new
|
|
1363
|
+
const r = new q();
|
|
1353
1364
|
r.updateFromServerResponse(t);
|
|
1354
|
-
const s = new
|
|
1365
|
+
const s = new C({
|
|
1355
1366
|
uid: t.localId,
|
|
1356
1367
|
auth: e,
|
|
1357
1368
|
stsTokenManager: r,
|
|
@@ -1371,9 +1382,9 @@ class N {
|
|
|
1371
1382
|
"internal-error"
|
|
1372
1383
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1373
1384
|
);
|
|
1374
|
-
const s = r.providerUserInfo !== void 0 ? Ut(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new
|
|
1385
|
+
const s = r.providerUserInfo !== void 0 ? Ut(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new q();
|
|
1375
1386
|
c.updateFromIdToken(i);
|
|
1376
|
-
const a = new
|
|
1387
|
+
const a = new C({
|
|
1377
1388
|
uid: r.localId,
|
|
1378
1389
|
auth: e,
|
|
1379
1390
|
stsTokenManager: c,
|
|
@@ -1410,10 +1421,10 @@ class N {
|
|
|
1410
1421
|
* limitations under the License.
|
|
1411
1422
|
*/
|
|
1412
1423
|
const rt = /* @__PURE__ */ new Map();
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1424
|
+
function N(n) {
|
|
1425
|
+
L(n instanceof Function, "Expected a class definition");
|
|
1415
1426
|
let e = rt.get(n);
|
|
1416
|
-
return e ? (
|
|
1427
|
+
return e ? (L(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), rt.set(n, e), e);
|
|
1417
1428
|
}
|
|
1418
1429
|
/**
|
|
1419
1430
|
* @license
|
|
@@ -1474,7 +1485,7 @@ const st = Dt;
|
|
|
1474
1485
|
function he(n, e, t) {
|
|
1475
1486
|
return `firebase:${n}:${e}:${t}`;
|
|
1476
1487
|
}
|
|
1477
|
-
class
|
|
1488
|
+
class K {
|
|
1478
1489
|
constructor(e, t, i) {
|
|
1479
1490
|
this.persistence = e, this.auth = t, this.userKey = i;
|
|
1480
1491
|
const { config: r, name: s } = this.auth;
|
|
@@ -1485,7 +1496,7 @@ class J {
|
|
|
1485
1496
|
}
|
|
1486
1497
|
async getCurrentUser() {
|
|
1487
1498
|
const e = await this.persistence._get(this.fullUserKey);
|
|
1488
|
-
return e ?
|
|
1499
|
+
return e ? C._fromJSON(this.auth, e) : null;
|
|
1489
1500
|
}
|
|
1490
1501
|
removeCurrentUser() {
|
|
1491
1502
|
return this.persistence._remove(this.fullUserKey);
|
|
@@ -1505,32 +1516,32 @@ class J {
|
|
|
1505
1516
|
}
|
|
1506
1517
|
static async create(e, t, i = "authUser") {
|
|
1507
1518
|
if (!t.length)
|
|
1508
|
-
return new
|
|
1519
|
+
return new K(N(st), e, i);
|
|
1509
1520
|
const r = (await Promise.all(t.map(async (l) => {
|
|
1510
1521
|
if (await l._isAvailable())
|
|
1511
1522
|
return l;
|
|
1512
1523
|
}))).filter((l) => l);
|
|
1513
|
-
let s = r[0] ||
|
|
1524
|
+
let s = r[0] || N(st);
|
|
1514
1525
|
const o = he(i, e.config.apiKey, e.name);
|
|
1515
1526
|
let c = null;
|
|
1516
1527
|
for (const l of t)
|
|
1517
1528
|
try {
|
|
1518
1529
|
const d = await l._get(o);
|
|
1519
1530
|
if (d) {
|
|
1520
|
-
const m =
|
|
1531
|
+
const m = C._fromJSON(e, d);
|
|
1521
1532
|
l !== s && (c = m), s = l;
|
|
1522
1533
|
break;
|
|
1523
1534
|
}
|
|
1524
1535
|
} catch {
|
|
1525
1536
|
}
|
|
1526
1537
|
const a = r.filter((l) => l._shouldAllowMigration);
|
|
1527
|
-
return !s._shouldAllowMigration || !a.length ? new
|
|
1538
|
+
return !s._shouldAllowMigration || !a.length ? new K(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
|
|
1528
1539
|
if (l !== s)
|
|
1529
1540
|
try {
|
|
1530
1541
|
await l._remove(o);
|
|
1531
1542
|
} catch {
|
|
1532
1543
|
}
|
|
1533
|
-
})), new
|
|
1544
|
+
})), new K(s, e, i));
|
|
1534
1545
|
}
|
|
1535
1546
|
}
|
|
1536
1547
|
/**
|
|
@@ -1565,9 +1576,9 @@ function ot(n) {
|
|
|
1565
1576
|
return "Silk";
|
|
1566
1577
|
if (Ht(e))
|
|
1567
1578
|
return "Blackberry";
|
|
1568
|
-
if (
|
|
1579
|
+
if (Wt(e))
|
|
1569
1580
|
return "Webos";
|
|
1570
|
-
if (
|
|
1581
|
+
if (Ge(e))
|
|
1571
1582
|
return "Safari";
|
|
1572
1583
|
if ((e.includes("chrome/") || Ft(e)) && !e.includes("edge/"))
|
|
1573
1584
|
return "Chrome";
|
|
@@ -1580,42 +1591,42 @@ function ot(n) {
|
|
|
1580
1591
|
}
|
|
1581
1592
|
return "Other";
|
|
1582
1593
|
}
|
|
1583
|
-
function xt(n =
|
|
1594
|
+
function xt(n = w()) {
|
|
1584
1595
|
return /firefox\//i.test(n);
|
|
1585
1596
|
}
|
|
1586
|
-
function
|
|
1597
|
+
function Ge(n = w()) {
|
|
1587
1598
|
const e = n.toLowerCase();
|
|
1588
1599
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
|
1589
1600
|
}
|
|
1590
|
-
function Ft(n =
|
|
1601
|
+
function Ft(n = w()) {
|
|
1591
1602
|
return /crios\//i.test(n);
|
|
1592
1603
|
}
|
|
1593
|
-
function Vt(n =
|
|
1604
|
+
function Vt(n = w()) {
|
|
1594
1605
|
return /iemobile/i.test(n);
|
|
1595
1606
|
}
|
|
1596
|
-
function $t(n =
|
|
1607
|
+
function $t(n = w()) {
|
|
1597
1608
|
return /android/i.test(n);
|
|
1598
1609
|
}
|
|
1599
|
-
function Ht(n =
|
|
1610
|
+
function Ht(n = w()) {
|
|
1600
1611
|
return /blackberry/i.test(n);
|
|
1601
1612
|
}
|
|
1602
|
-
function
|
|
1613
|
+
function Wt(n = w()) {
|
|
1603
1614
|
return /webos/i.test(n);
|
|
1604
1615
|
}
|
|
1605
|
-
function ke(n =
|
|
1616
|
+
function ke(n = w()) {
|
|
1606
1617
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1607
1618
|
}
|
|
1608
|
-
function
|
|
1619
|
+
function bi(n = w()) {
|
|
1609
1620
|
var e;
|
|
1610
1621
|
return ke(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1611
1622
|
}
|
|
1612
|
-
function
|
|
1613
|
-
return
|
|
1623
|
+
function Ei() {
|
|
1624
|
+
return Ln() && document.documentMode === 10;
|
|
1614
1625
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return ke(n) || $t(n) ||
|
|
1626
|
+
function jt(n = w()) {
|
|
1627
|
+
return ke(n) || $t(n) || Wt(n) || Ht(n) || /windows phone/i.test(n) || Vt(n);
|
|
1617
1628
|
}
|
|
1618
|
-
function
|
|
1629
|
+
function Si() {
|
|
1619
1630
|
try {
|
|
1620
1631
|
return !!(window && window !== window.top);
|
|
1621
1632
|
} catch {
|
|
@@ -1638,14 +1649,14 @@ function Ri() {
|
|
|
1638
1649
|
* See the License for the specific language governing permissions and
|
|
1639
1650
|
* limitations under the License.
|
|
1640
1651
|
*/
|
|
1641
|
-
function
|
|
1652
|
+
function Gt(n, e = []) {
|
|
1642
1653
|
let t;
|
|
1643
1654
|
switch (n) {
|
|
1644
1655
|
case "Browser":
|
|
1645
|
-
t = ot(
|
|
1656
|
+
t = ot(w());
|
|
1646
1657
|
break;
|
|
1647
1658
|
case "Worker":
|
|
1648
|
-
t = `${ot(
|
|
1659
|
+
t = `${ot(w())}-${n}`;
|
|
1649
1660
|
break;
|
|
1650
1661
|
default:
|
|
1651
1662
|
t = n;
|
|
@@ -1669,7 +1680,7 @@ function Bt(n, e = []) {
|
|
|
1669
1680
|
* See the License for the specific language governing permissions and
|
|
1670
1681
|
* limitations under the License.
|
|
1671
1682
|
*/
|
|
1672
|
-
class
|
|
1683
|
+
class Ri {
|
|
1673
1684
|
constructor(e) {
|
|
1674
1685
|
this.auth = e, this.queue = [];
|
|
1675
1686
|
}
|
|
@@ -1743,12 +1754,12 @@ async function Ai(n, e = {}) {
|
|
|
1743
1754
|
* See the License for the specific language governing permissions and
|
|
1744
1755
|
* limitations under the License.
|
|
1745
1756
|
*/
|
|
1746
|
-
const
|
|
1747
|
-
class
|
|
1757
|
+
const Pi = 6;
|
|
1758
|
+
class Ci {
|
|
1748
1759
|
constructor(e) {
|
|
1749
1760
|
var t, i, r, s;
|
|
1750
1761
|
const o = e.customStrengthOptions;
|
|
1751
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1762
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Pi, 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;
|
|
1752
1763
|
}
|
|
1753
1764
|
validatePassword(e) {
|
|
1754
1765
|
var t, i, r, s, o, c;
|
|
@@ -1831,14 +1842,14 @@ class Ni {
|
|
|
1831
1842
|
* See the License for the specific language governing permissions and
|
|
1832
1843
|
* limitations under the License.
|
|
1833
1844
|
*/
|
|
1834
|
-
class
|
|
1845
|
+
class Ni {
|
|
1835
1846
|
constructor(e, t, i, r) {
|
|
1836
|
-
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 at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new
|
|
1847
|
+
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 at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new Ri(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 = At, 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;
|
|
1837
1848
|
}
|
|
1838
1849
|
_initializeWithPersistence(e, t) {
|
|
1839
|
-
return t && (this._popupRedirectResolver =
|
|
1850
|
+
return t && (this._popupRedirectResolver = N(t)), this._initializationPromise = this.queue(async () => {
|
|
1840
1851
|
var i, r;
|
|
1841
|
-
if (!this._deleted && (this.persistenceManager = await
|
|
1852
|
+
if (!this._deleted && (this.persistenceManager = await K.create(this, e), !this._deleted)) {
|
|
1842
1853
|
if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
|
|
1843
1854
|
try {
|
|
1844
1855
|
await this._popupRedirectResolver._initialize(this);
|
|
@@ -1869,7 +1880,7 @@ class Oi {
|
|
|
1869
1880
|
}
|
|
1870
1881
|
async initializeCurrentUserFromIdToken(e) {
|
|
1871
1882
|
try {
|
|
1872
|
-
const t = await Mt(this, { idToken: e }), i = await
|
|
1883
|
+
const t = await Mt(this, { idToken: e }), i = await C._fromGetAccountInfoResponse(this, t, e);
|
|
1873
1884
|
await this.directlySetCurrentUser(i);
|
|
1874
1885
|
} catch (t) {
|
|
1875
1886
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
|
@@ -1927,7 +1938,7 @@ class Oi {
|
|
|
1927
1938
|
return this.directlySetCurrentUser(e);
|
|
1928
1939
|
}
|
|
1929
1940
|
useDeviceLanguage() {
|
|
1930
|
-
this.languageCode =
|
|
1941
|
+
this.languageCode = hi();
|
|
1931
1942
|
}
|
|
1932
1943
|
async _delete() {
|
|
1933
1944
|
this._deleted = !0;
|
|
@@ -1963,7 +1974,7 @@ class Oi {
|
|
|
1963
1974
|
}
|
|
1964
1975
|
setPersistence(e) {
|
|
1965
1976
|
return A(this.app) ? Promise.reject(H(this)) : this.queue(async () => {
|
|
1966
|
-
await this.assertedPersistence.setPersistence(
|
|
1977
|
+
await this.assertedPersistence.setPersistence(N(e));
|
|
1967
1978
|
});
|
|
1968
1979
|
}
|
|
1969
1980
|
_getRecaptchaConfig() {
|
|
@@ -1978,7 +1989,7 @@ class Oi {
|
|
|
1978
1989
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1979
1990
|
}
|
|
1980
1991
|
async _updatePasswordPolicy() {
|
|
1981
|
-
const e = await Ai(this), t = new
|
|
1992
|
+
const e = await Ai(this), t = new Ci(e);
|
|
1982
1993
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1983
1994
|
}
|
|
1984
1995
|
_getPersistence() {
|
|
@@ -2018,7 +2029,7 @@ class Oi {
|
|
|
2018
2029
|
token: e,
|
|
2019
2030
|
idToken: t
|
|
2020
2031
|
};
|
|
2021
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
2032
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await ki(this, i);
|
|
2022
2033
|
}
|
|
2023
2034
|
}
|
|
2024
2035
|
toJSON() {
|
|
@@ -2036,15 +2047,15 @@ class Oi {
|
|
|
2036
2047
|
}
|
|
2037
2048
|
async getOrInitRedirectPersistenceManager(e) {
|
|
2038
2049
|
if (!this.redirectPersistenceManager) {
|
|
2039
|
-
const t = e &&
|
|
2050
|
+
const t = e && N(e) || this._popupRedirectResolver;
|
|
2040
2051
|
u(
|
|
2041
2052
|
t,
|
|
2042
2053
|
this,
|
|
2043
2054
|
"argument-error"
|
|
2044
2055
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
2045
|
-
), this.redirectPersistenceManager = await
|
|
2056
|
+
), this.redirectPersistenceManager = await K.create(
|
|
2046
2057
|
this,
|
|
2047
|
-
[
|
|
2058
|
+
[N(t._redirectPersistence)],
|
|
2048
2059
|
"redirectUser"
|
|
2049
2060
|
/* KeyName.REDIRECT_USER */
|
|
2050
2061
|
), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
|
|
@@ -2131,7 +2142,7 @@ class Oi {
|
|
|
2131
2142
|
), this.persistenceManager;
|
|
2132
2143
|
}
|
|
2133
2144
|
_logFramework(e) {
|
|
2134
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
|
2145
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Gt(this.config.clientPlatform, this._getFrameworks()));
|
|
2135
2146
|
}
|
|
2136
2147
|
_getFrameworks() {
|
|
2137
2148
|
return this.frameworks;
|
|
@@ -2161,7 +2172,7 @@ class Oi {
|
|
|
2161
2172
|
async _getAppCheckToken() {
|
|
2162
2173
|
var e;
|
|
2163
2174
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
2164
|
-
return t != null && t.error &&
|
|
2175
|
+
return t != null && t.error && li(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
2165
2176
|
}
|
|
2166
2177
|
}
|
|
2167
2178
|
function be(n) {
|
|
@@ -2196,7 +2207,7 @@ class at {
|
|
|
2196
2207
|
* See the License for the specific language governing permissions and
|
|
2197
2208
|
* limitations under the License.
|
|
2198
2209
|
*/
|
|
2199
|
-
let
|
|
2210
|
+
let Be = {
|
|
2200
2211
|
async loadJS() {
|
|
2201
2212
|
throw new Error("Unable to load external scripts");
|
|
2202
2213
|
},
|
|
@@ -2204,16 +2215,16 @@ let Ge = {
|
|
|
2204
2215
|
recaptchaEnterpriseScript: "",
|
|
2205
2216
|
gapiScript: ""
|
|
2206
2217
|
};
|
|
2207
|
-
function
|
|
2208
|
-
|
|
2218
|
+
function Oi(n) {
|
|
2219
|
+
Be = n;
|
|
2209
2220
|
}
|
|
2210
|
-
function
|
|
2211
|
-
return
|
|
2221
|
+
function Li(n) {
|
|
2222
|
+
return Be.loadJS(n);
|
|
2212
2223
|
}
|
|
2213
|
-
function
|
|
2214
|
-
return
|
|
2224
|
+
function Mi() {
|
|
2225
|
+
return Be.gapiScript;
|
|
2215
2226
|
}
|
|
2216
|
-
function
|
|
2227
|
+
function Ui(n) {
|
|
2217
2228
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2218
2229
|
}
|
|
2219
2230
|
/**
|
|
@@ -2232,13 +2243,13 @@ function Di(n) {
|
|
|
2232
2243
|
* See the License for the specific language governing permissions and
|
|
2233
2244
|
* limitations under the License.
|
|
2234
2245
|
*/
|
|
2235
|
-
function
|
|
2246
|
+
function Di(n, e) {
|
|
2236
2247
|
const t = bt(n, "auth");
|
|
2237
2248
|
if (t.isInitialized()) {
|
|
2238
2249
|
const r = t.getImmediate(), s = t.getOptions();
|
|
2239
|
-
if (
|
|
2250
|
+
if (Nn(s, e ?? {}))
|
|
2240
2251
|
return r;
|
|
2241
|
-
|
|
2252
|
+
O(
|
|
2242
2253
|
r,
|
|
2243
2254
|
"already-initialized"
|
|
2244
2255
|
/* AuthErrorCode.ALREADY_INITIALIZED */
|
|
@@ -2246,11 +2257,11 @@ function xi(n, e) {
|
|
|
2246
2257
|
}
|
|
2247
2258
|
return t.initialize({ options: e });
|
|
2248
2259
|
}
|
|
2249
|
-
function
|
|
2250
|
-
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(
|
|
2260
|
+
function xi(n, e) {
|
|
2261
|
+
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(N);
|
|
2251
2262
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2252
2263
|
}
|
|
2253
|
-
function
|
|
2264
|
+
function Fi(n, e, t) {
|
|
2254
2265
|
const i = be(n);
|
|
2255
2266
|
u(
|
|
2256
2267
|
i._canInitEmulator,
|
|
@@ -2263,20 +2274,20 @@ function Vi(n, e, t) {
|
|
|
2263
2274
|
"invalid-emulator-scheme"
|
|
2264
2275
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2265
2276
|
);
|
|
2266
|
-
const r = !1, s =
|
|
2277
|
+
const r = !1, s = Bt(e), { host: o, port: c } = Vi(e), a = c === null ? "" : `:${c}`;
|
|
2267
2278
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2268
2279
|
host: o,
|
|
2269
2280
|
port: c,
|
|
2270
2281
|
protocol: s.replace(":", ""),
|
|
2271
2282
|
options: Object.freeze({ disableWarnings: r })
|
|
2272
|
-
}),
|
|
2283
|
+
}), $i();
|
|
2273
2284
|
}
|
|
2274
|
-
function
|
|
2285
|
+
function Bt(n) {
|
|
2275
2286
|
const e = n.indexOf(":");
|
|
2276
2287
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2277
2288
|
}
|
|
2278
|
-
function
|
|
2279
|
-
const e =
|
|
2289
|
+
function Vi(n) {
|
|
2290
|
+
const e = Bt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2280
2291
|
if (!t)
|
|
2281
2292
|
return { host: "", port: null };
|
|
2282
2293
|
const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
|
|
@@ -2294,7 +2305,7 @@ function ct(n) {
|
|
|
2294
2305
|
const e = Number(n);
|
|
2295
2306
|
return isNaN(e) ? null : e;
|
|
2296
2307
|
}
|
|
2297
|
-
function
|
|
2308
|
+
function $i() {
|
|
2298
2309
|
function n() {
|
|
2299
2310
|
const e = document.createElement("p"), t = e.style;
|
|
2300
2311
|
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);
|
|
@@ -2328,19 +2339,19 @@ class zt {
|
|
|
2328
2339
|
* @returns a JSON-serializable representation of this object.
|
|
2329
2340
|
*/
|
|
2330
2341
|
toJSON() {
|
|
2331
|
-
return
|
|
2342
|
+
return P("not implemented");
|
|
2332
2343
|
}
|
|
2333
2344
|
/** @internal */
|
|
2334
2345
|
_getIdTokenResponse(e) {
|
|
2335
|
-
return
|
|
2346
|
+
return P("not implemented");
|
|
2336
2347
|
}
|
|
2337
2348
|
/** @internal */
|
|
2338
2349
|
_linkToIdToken(e, t) {
|
|
2339
|
-
return
|
|
2350
|
+
return P("not implemented");
|
|
2340
2351
|
}
|
|
2341
2352
|
/** @internal */
|
|
2342
2353
|
_getReauthenticationResolver(e) {
|
|
2343
|
-
return
|
|
2354
|
+
return P("not implemented");
|
|
2344
2355
|
}
|
|
2345
2356
|
}
|
|
2346
2357
|
/**
|
|
@@ -2359,7 +2370,7 @@ class zt {
|
|
|
2359
2370
|
* See the License for the specific language governing permissions and
|
|
2360
2371
|
* limitations under the License.
|
|
2361
2372
|
*/
|
|
2362
|
-
async function
|
|
2373
|
+
async function J(n, e) {
|
|
2363
2374
|
return Ot(n, "POST", "/v1/accounts:signInWithIdp", Te(n, e));
|
|
2364
2375
|
}
|
|
2365
2376
|
/**
|
|
@@ -2378,7 +2389,7 @@ async function Y(n, e) {
|
|
|
2378
2389
|
* See the License for the specific language governing permissions and
|
|
2379
2390
|
* limitations under the License.
|
|
2380
2391
|
*/
|
|
2381
|
-
const
|
|
2392
|
+
const Hi = "http://localhost";
|
|
2382
2393
|
class G extends zt {
|
|
2383
2394
|
constructor() {
|
|
2384
2395
|
super(...arguments), this.pendingToken = null;
|
|
@@ -2386,7 +2397,7 @@ class G extends zt {
|
|
|
2386
2397
|
/** @internal */
|
|
2387
2398
|
static _fromParams(e) {
|
|
2388
2399
|
const t = new G(e.providerId, e.signInMethod);
|
|
2389
|
-
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) :
|
|
2400
|
+
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : O(
|
|
2390
2401
|
"argument-error"
|
|
2391
2402
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
2392
2403
|
), t;
|
|
@@ -2422,21 +2433,21 @@ class G extends zt {
|
|
|
2422
2433
|
/** @internal */
|
|
2423
2434
|
_getIdTokenResponse(e) {
|
|
2424
2435
|
const t = this.buildRequest();
|
|
2425
|
-
return
|
|
2436
|
+
return J(e, t);
|
|
2426
2437
|
}
|
|
2427
2438
|
/** @internal */
|
|
2428
2439
|
_linkToIdToken(e, t) {
|
|
2429
2440
|
const i = this.buildRequest();
|
|
2430
|
-
return i.idToken = t,
|
|
2441
|
+
return i.idToken = t, J(e, i);
|
|
2431
2442
|
}
|
|
2432
2443
|
/** @internal */
|
|
2433
2444
|
_getReauthenticationResolver(e) {
|
|
2434
2445
|
const t = this.buildRequest();
|
|
2435
|
-
return t.autoCreate = !1,
|
|
2446
|
+
return t.autoCreate = !1, J(e, t);
|
|
2436
2447
|
}
|
|
2437
2448
|
buildRequest() {
|
|
2438
2449
|
const e = {
|
|
2439
|
-
requestUri:
|
|
2450
|
+
requestUri: Hi,
|
|
2440
2451
|
returnSecureToken: !0
|
|
2441
2452
|
};
|
|
2442
2453
|
if (this.pendingToken)
|
|
@@ -2832,13 +2843,13 @@ $.PROVIDER_ID = "twitter.com";
|
|
|
2832
2843
|
* See the License for the specific language governing permissions and
|
|
2833
2844
|
* limitations under the License.
|
|
2834
2845
|
*/
|
|
2835
|
-
class
|
|
2846
|
+
class B {
|
|
2836
2847
|
constructor(e) {
|
|
2837
2848
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2838
2849
|
}
|
|
2839
2850
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2840
|
-
const s = await
|
|
2841
|
-
return new
|
|
2851
|
+
const s = await C._fromIdTokenResponse(e, i, r), o = lt(i);
|
|
2852
|
+
return new B({
|
|
2842
2853
|
user: s,
|
|
2843
2854
|
providerId: o,
|
|
2844
2855
|
_tokenResponse: i,
|
|
@@ -2852,7 +2863,7 @@ class z {
|
|
|
2852
2863
|
!0
|
|
2853
2864
|
);
|
|
2854
2865
|
const r = lt(i);
|
|
2855
|
-
return new
|
|
2866
|
+
return new B({
|
|
2856
2867
|
user: e,
|
|
2857
2868
|
providerId: r,
|
|
2858
2869
|
_tokenResponse: i,
|
|
@@ -2900,7 +2911,7 @@ function Kt(n, e, t, i) {
|
|
|
2900
2911
|
}
|
|
2901
2912
|
async function Wi(n, e, t = !1) {
|
|
2902
2913
|
const i = await re(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2903
|
-
return
|
|
2914
|
+
return B._forOperation(n, "link", i);
|
|
2904
2915
|
}
|
|
2905
2916
|
/**
|
|
2906
2917
|
* @license
|
|
@@ -2918,7 +2929,7 @@ async function Wi(n, e, t = !1) {
|
|
|
2918
2929
|
* See the License for the specific language governing permissions and
|
|
2919
2930
|
* limitations under the License.
|
|
2920
2931
|
*/
|
|
2921
|
-
async function
|
|
2932
|
+
async function ji(n, e, t = !1) {
|
|
2922
2933
|
const { auth: i } = n;
|
|
2923
2934
|
if (A(i.app))
|
|
2924
2935
|
return Promise.reject(H(i));
|
|
@@ -2931,7 +2942,7 @@ async function Bi(n, e, t = !1) {
|
|
|
2931
2942
|
"internal-error"
|
|
2932
2943
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2933
2944
|
);
|
|
2934
|
-
const o =
|
|
2945
|
+
const o = je(s.idToken);
|
|
2935
2946
|
u(
|
|
2936
2947
|
o,
|
|
2937
2948
|
i,
|
|
@@ -2944,9 +2955,9 @@ async function Bi(n, e, t = !1) {
|
|
|
2944
2955
|
i,
|
|
2945
2956
|
"user-mismatch"
|
|
2946
2957
|
/* AuthErrorCode.USER_MISMATCH */
|
|
2947
|
-
),
|
|
2958
|
+
), B._forOperation(n, r, s);
|
|
2948
2959
|
} catch (s) {
|
|
2949
|
-
throw (s == null ? void 0 : s.code) === "auth/user-not-found" &&
|
|
2960
|
+
throw (s == null ? void 0 : s.code) === "auth/user-not-found" && O(
|
|
2950
2961
|
i,
|
|
2951
2962
|
"user-mismatch"
|
|
2952
2963
|
/* AuthErrorCode.USER_MISMATCH */
|
|
@@ -2972,7 +2983,7 @@ async function Bi(n, e, t = !1) {
|
|
|
2972
2983
|
async function Gi(n, e, t = !1) {
|
|
2973
2984
|
if (A(n.app))
|
|
2974
2985
|
return Promise.reject(H(n));
|
|
2975
|
-
const i = "signIn", r = await Kt(n, i, e), s = await
|
|
2986
|
+
const i = "signIn", r = await Kt(n, i, e), s = await B._fromIdTokenResponse(n, i, r);
|
|
2976
2987
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2977
2988
|
}
|
|
2978
2989
|
/**
|
|
@@ -2991,7 +3002,7 @@ async function Gi(n, e, t = !1) {
|
|
|
2991
3002
|
* See the License for the specific language governing permissions and
|
|
2992
3003
|
* limitations under the License.
|
|
2993
3004
|
*/
|
|
2994
|
-
async function
|
|
3005
|
+
async function Bi(n, e) {
|
|
2995
3006
|
return Ot(n, "POST", "/v1/accounts:signInWithCustomToken", Te(n, e));
|
|
2996
3007
|
}
|
|
2997
3008
|
/**
|
|
@@ -3010,19 +3021,19 @@ async function zi(n, e) {
|
|
|
3010
3021
|
* See the License for the specific language governing permissions and
|
|
3011
3022
|
* limitations under the License.
|
|
3012
3023
|
*/
|
|
3013
|
-
async function
|
|
3024
|
+
async function zi(n, e) {
|
|
3014
3025
|
if (A(n.app))
|
|
3015
3026
|
return Promise.reject(H(n));
|
|
3016
|
-
const t = be(n), i = await
|
|
3027
|
+
const t = be(n), i = await Bi(t, {
|
|
3017
3028
|
token: e,
|
|
3018
3029
|
returnSecureToken: !0
|
|
3019
|
-
}), r = await
|
|
3030
|
+
}), r = await B._fromIdTokenResponse(t, "signIn", i);
|
|
3020
3031
|
return await t._updateCurrentUser(r.user), r;
|
|
3021
3032
|
}
|
|
3022
|
-
function
|
|
3033
|
+
function qi(n, e, t, i) {
|
|
3023
3034
|
return X(n).onIdTokenChanged(e, t, i);
|
|
3024
3035
|
}
|
|
3025
|
-
function
|
|
3036
|
+
function Ki(n, e, t) {
|
|
3026
3037
|
return X(n).beforeAuthStateChanged(e, t);
|
|
3027
3038
|
}
|
|
3028
3039
|
const ye = "__sak";
|
|
@@ -3083,18 +3094,18 @@ class Jt {
|
|
|
3083
3094
|
* See the License for the specific language governing permissions and
|
|
3084
3095
|
* limitations under the License.
|
|
3085
3096
|
*/
|
|
3086
|
-
function
|
|
3087
|
-
const n =
|
|
3088
|
-
return
|
|
3097
|
+
function Ji() {
|
|
3098
|
+
const n = w();
|
|
3099
|
+
return Ge(n) || ke(n);
|
|
3089
3100
|
}
|
|
3090
|
-
const
|
|
3101
|
+
const Yi = 1e3, Xi = 10;
|
|
3091
3102
|
class Yt extends Jt {
|
|
3092
3103
|
constructor() {
|
|
3093
3104
|
super(
|
|
3094
3105
|
() => window.localStorage,
|
|
3095
3106
|
"LOCAL"
|
|
3096
3107
|
/* PersistenceType.LOCAL */
|
|
3097
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
3108
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Ji() && Si(), this.fallbackToPolling = jt(), this._shouldAllowMigration = !0;
|
|
3098
3109
|
}
|
|
3099
3110
|
forAllChangedKeys(e) {
|
|
3100
3111
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -3121,7 +3132,7 @@ class Yt extends Jt {
|
|
|
3121
3132
|
const o = this.storage.getItem(i);
|
|
3122
3133
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
3123
3134
|
}, s = this.storage.getItem(i);
|
|
3124
|
-
|
|
3135
|
+
Ei() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Xi) : r();
|
|
3125
3136
|
}
|
|
3126
3137
|
notifyListeners(e, t) {
|
|
3127
3138
|
this.localCache[e] = t;
|
|
@@ -3143,7 +3154,7 @@ class Yt extends Jt {
|
|
|
3143
3154
|
!0
|
|
3144
3155
|
);
|
|
3145
3156
|
});
|
|
3146
|
-
},
|
|
3157
|
+
}, Yi);
|
|
3147
3158
|
}
|
|
3148
3159
|
stopPolling() {
|
|
3149
3160
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3173,7 +3184,7 @@ class Yt extends Jt {
|
|
|
3173
3184
|
}
|
|
3174
3185
|
}
|
|
3175
3186
|
Yt.type = "LOCAL";
|
|
3176
|
-
const
|
|
3187
|
+
const Qi = Yt;
|
|
3177
3188
|
/**
|
|
3178
3189
|
* @license
|
|
3179
3190
|
* Copyright 2020 Google LLC
|
|
@@ -3221,7 +3232,7 @@ const Qt = Xt;
|
|
|
3221
3232
|
* See the License for the specific language governing permissions and
|
|
3222
3233
|
* limitations under the License.
|
|
3223
3234
|
*/
|
|
3224
|
-
function
|
|
3235
|
+
function Zi(n) {
|
|
3225
3236
|
return Promise.all(n.map(async (e) => {
|
|
3226
3237
|
try {
|
|
3227
3238
|
return {
|
|
@@ -3291,7 +3302,7 @@ class Ee {
|
|
|
3291
3302
|
eventId: i,
|
|
3292
3303
|
eventType: r
|
|
3293
3304
|
});
|
|
3294
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3305
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Zi(c);
|
|
3295
3306
|
t.ports[0].postMessage({
|
|
3296
3307
|
status: "done",
|
|
3297
3308
|
eventId: i,
|
|
@@ -3359,7 +3370,7 @@ function ze(n = "", e = 10) {
|
|
|
3359
3370
|
* See the License for the specific language governing permissions and
|
|
3360
3371
|
* limitations under the License.
|
|
3361
3372
|
*/
|
|
3362
|
-
class
|
|
3373
|
+
class er {
|
|
3363
3374
|
constructor(e) {
|
|
3364
3375
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3365
3376
|
}
|
|
@@ -3404,9 +3415,9 @@ class tr {
|
|
|
3404
3415
|
o = {
|
|
3405
3416
|
messageChannel: r,
|
|
3406
3417
|
onMessage(m) {
|
|
3407
|
-
const
|
|
3408
|
-
if (
|
|
3409
|
-
switch (
|
|
3418
|
+
const y = m;
|
|
3419
|
+
if (y.data.eventId === l)
|
|
3420
|
+
switch (y.data.status) {
|
|
3410
3421
|
case "ack":
|
|
3411
3422
|
clearTimeout(d), s = setTimeout(
|
|
3412
3423
|
() => {
|
|
@@ -3420,7 +3431,7 @@ class tr {
|
|
|
3420
3431
|
);
|
|
3421
3432
|
break;
|
|
3422
3433
|
case "done":
|
|
3423
|
-
clearTimeout(s), c(
|
|
3434
|
+
clearTimeout(s), c(y.data.response);
|
|
3424
3435
|
break;
|
|
3425
3436
|
default:
|
|
3426
3437
|
clearTimeout(d), clearTimeout(s), a(new Error(
|
|
@@ -3456,11 +3467,11 @@ class tr {
|
|
|
3456
3467
|
* See the License for the specific language governing permissions and
|
|
3457
3468
|
* limitations under the License.
|
|
3458
3469
|
*/
|
|
3459
|
-
function
|
|
3470
|
+
function E() {
|
|
3460
3471
|
return window;
|
|
3461
3472
|
}
|
|
3462
|
-
function
|
|
3463
|
-
|
|
3473
|
+
function tr(n) {
|
|
3474
|
+
E().location.href = n;
|
|
3464
3475
|
}
|
|
3465
3476
|
/**
|
|
3466
3477
|
* @license
|
|
@@ -3479,9 +3490,9 @@ function nr(n) {
|
|
|
3479
3490
|
* limitations under the License.
|
|
3480
3491
|
*/
|
|
3481
3492
|
function Zt() {
|
|
3482
|
-
return typeof
|
|
3493
|
+
return typeof E().WorkerGlobalScope < "u" && typeof E().importScripts == "function";
|
|
3483
3494
|
}
|
|
3484
|
-
async function
|
|
3495
|
+
async function nr() {
|
|
3485
3496
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3486
3497
|
return null;
|
|
3487
3498
|
try {
|
|
@@ -3490,11 +3501,11 @@ async function ir() {
|
|
|
3490
3501
|
return null;
|
|
3491
3502
|
}
|
|
3492
3503
|
}
|
|
3493
|
-
function
|
|
3504
|
+
function ir() {
|
|
3494
3505
|
var n;
|
|
3495
3506
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3496
3507
|
}
|
|
3497
|
-
function
|
|
3508
|
+
function rr() {
|
|
3498
3509
|
return Zt() ? self : null;
|
|
3499
3510
|
}
|
|
3500
3511
|
/**
|
|
@@ -3513,7 +3524,7 @@ function sr() {
|
|
|
3513
3524
|
* See the License for the specific language governing permissions and
|
|
3514
3525
|
* limitations under the License.
|
|
3515
3526
|
*/
|
|
3516
|
-
const en = "firebaseLocalStorageDb",
|
|
3527
|
+
const en = "firebaseLocalStorageDb", sr = 1, we = "firebaseLocalStorage", tn = "fbase_key";
|
|
3517
3528
|
class le {
|
|
3518
3529
|
constructor(e) {
|
|
3519
3530
|
this.request = e;
|
|
@@ -3531,12 +3542,12 @@ class le {
|
|
|
3531
3542
|
function Se(n, e) {
|
|
3532
3543
|
return n.transaction([we], e ? "readwrite" : "readonly").objectStore(we);
|
|
3533
3544
|
}
|
|
3534
|
-
function
|
|
3545
|
+
function or() {
|
|
3535
3546
|
const n = indexedDB.deleteDatabase(en);
|
|
3536
3547
|
return new le(n).toPromise();
|
|
3537
3548
|
}
|
|
3538
3549
|
function De() {
|
|
3539
|
-
const n = indexedDB.open(en,
|
|
3550
|
+
const n = indexedDB.open(en, sr);
|
|
3540
3551
|
return new Promise((e, t) => {
|
|
3541
3552
|
n.addEventListener("error", () => {
|
|
3542
3553
|
t(n.error);
|
|
@@ -3549,7 +3560,7 @@ function De() {
|
|
|
3549
3560
|
}
|
|
3550
3561
|
}), n.addEventListener("success", async () => {
|
|
3551
3562
|
const i = n.result;
|
|
3552
|
-
i.objectStoreNames.contains(we) ? e(i) : (i.close(), await
|
|
3563
|
+
i.objectStoreNames.contains(we) ? e(i) : (i.close(), await or(), e(await De()));
|
|
3553
3564
|
});
|
|
3554
3565
|
});
|
|
3555
3566
|
}
|
|
@@ -3560,7 +3571,7 @@ async function ut(n, e, t) {
|
|
|
3560
3571
|
});
|
|
3561
3572
|
return new le(i).toPromise();
|
|
3562
3573
|
}
|
|
3563
|
-
async function
|
|
3574
|
+
async function ar(n, e) {
|
|
3564
3575
|
const t = Se(n, !1).get(e), i = await new le(t).toPromise();
|
|
3565
3576
|
return i === void 0 ? null : i.value;
|
|
3566
3577
|
}
|
|
@@ -3568,7 +3579,7 @@ function dt(n, e) {
|
|
|
3568
3579
|
const t = Se(n, !0).delete(e);
|
|
3569
3580
|
return new le(t).toPromise();
|
|
3570
3581
|
}
|
|
3571
|
-
const
|
|
3582
|
+
const cr = 800, lr = 3;
|
|
3572
3583
|
class nn {
|
|
3573
3584
|
constructor() {
|
|
3574
3585
|
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(() => {
|
|
@@ -3585,7 +3596,7 @@ class nn {
|
|
|
3585
3596
|
const i = await this._openDb();
|
|
3586
3597
|
return await e(i);
|
|
3587
3598
|
} catch (i) {
|
|
3588
|
-
if (t++ >
|
|
3599
|
+
if (t++ > lr)
|
|
3589
3600
|
throw i;
|
|
3590
3601
|
this.db && (this.db.close(), this.db = void 0);
|
|
3591
3602
|
}
|
|
@@ -3601,7 +3612,7 @@ class nn {
|
|
|
3601
3612
|
* As the worker we should listen to events from the main window.
|
|
3602
3613
|
*/
|
|
3603
3614
|
async initializeReceiver() {
|
|
3604
|
-
this.receiver = Ee._getInstance(
|
|
3615
|
+
this.receiver = Ee._getInstance(rr()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3605
3616
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3606
3617
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3607
3618
|
"keyChanged"
|
|
@@ -3617,9 +3628,9 @@ class nn {
|
|
|
3617
3628
|
*/
|
|
3618
3629
|
async initializeSender() {
|
|
3619
3630
|
var e, t;
|
|
3620
|
-
if (this.activeServiceWorker = await
|
|
3631
|
+
if (this.activeServiceWorker = await nr(), !this.activeServiceWorker)
|
|
3621
3632
|
return;
|
|
3622
|
-
this.sender = new
|
|
3633
|
+
this.sender = new er(this.activeServiceWorker);
|
|
3623
3634
|
const i = await this.sender._send(
|
|
3624
3635
|
"ping",
|
|
3625
3636
|
{},
|
|
@@ -3641,7 +3652,7 @@ class nn {
|
|
|
3641
3652
|
* @param key - Storage key which changed.
|
|
3642
3653
|
*/
|
|
3643
3654
|
async notifyServiceWorker(e) {
|
|
3644
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3655
|
+
if (!(!this.sender || !this.activeServiceWorker || ir() !== this.activeServiceWorker))
|
|
3645
3656
|
try {
|
|
3646
3657
|
await this.sender._send(
|
|
3647
3658
|
"keyChanged",
|
|
@@ -3675,7 +3686,7 @@ class nn {
|
|
|
3675
3686
|
return this._withPendingWrite(async () => (await this._withRetries((i) => ut(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3676
3687
|
}
|
|
3677
3688
|
async _get(e) {
|
|
3678
|
-
const t = await this._withRetries((i) =>
|
|
3689
|
+
const t = await this._withRetries((i) => ar(i, e));
|
|
3679
3690
|
return this.localCache[e] = t, t;
|
|
3680
3691
|
}
|
|
3681
3692
|
async _remove(e) {
|
|
@@ -3706,7 +3717,7 @@ class nn {
|
|
|
3706
3717
|
r(t);
|
|
3707
3718
|
}
|
|
3708
3719
|
startPolling() {
|
|
3709
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3720
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), cr);
|
|
3710
3721
|
}
|
|
3711
3722
|
stopPolling() {
|
|
3712
3723
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3719,7 +3730,7 @@ class nn {
|
|
|
3719
3730
|
}
|
|
3720
3731
|
}
|
|
3721
3732
|
nn.type = "LOCAL";
|
|
3722
|
-
const
|
|
3733
|
+
const ur = nn;
|
|
3723
3734
|
new ae(3e4, 6e4);
|
|
3724
3735
|
/**
|
|
3725
3736
|
* @license
|
|
@@ -3737,8 +3748,8 @@ new ae(3e4, 6e4);
|
|
|
3737
3748
|
* See the License for the specific language governing permissions and
|
|
3738
3749
|
* limitations under the License.
|
|
3739
3750
|
*/
|
|
3740
|
-
function
|
|
3741
|
-
return e ?
|
|
3751
|
+
function dr(n, e) {
|
|
3752
|
+
return e ? N(e) : (u(
|
|
3742
3753
|
n._popupRedirectResolver,
|
|
3743
3754
|
n,
|
|
3744
3755
|
"argument-error"
|
|
@@ -3770,13 +3781,13 @@ class qe extends zt {
|
|
|
3770
3781
|
), this.params = e;
|
|
3771
3782
|
}
|
|
3772
3783
|
_getIdTokenResponse(e) {
|
|
3773
|
-
return
|
|
3784
|
+
return J(e, this._buildIdpRequest());
|
|
3774
3785
|
}
|
|
3775
3786
|
_linkToIdToken(e, t) {
|
|
3776
|
-
return
|
|
3787
|
+
return J(e, this._buildIdpRequest(t));
|
|
3777
3788
|
}
|
|
3778
3789
|
_getReauthenticationResolver(e) {
|
|
3779
|
-
return
|
|
3790
|
+
return J(e, this._buildIdpRequest());
|
|
3780
3791
|
}
|
|
3781
3792
|
_buildIdpRequest(e) {
|
|
3782
3793
|
const t = {
|
|
@@ -3791,19 +3802,19 @@ class qe extends zt {
|
|
|
3791
3802
|
return e && (t.idToken = e), t;
|
|
3792
3803
|
}
|
|
3793
3804
|
}
|
|
3794
|
-
function
|
|
3805
|
+
function hr(n) {
|
|
3795
3806
|
return Gi(n.auth, new qe(n), n.bypassAuthState);
|
|
3796
3807
|
}
|
|
3797
|
-
function
|
|
3808
|
+
function fr(n) {
|
|
3798
3809
|
const { auth: e, user: t } = n;
|
|
3799
3810
|
return u(
|
|
3800
3811
|
t,
|
|
3801
3812
|
e,
|
|
3802
3813
|
"internal-error"
|
|
3803
3814
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3804
|
-
),
|
|
3815
|
+
), ji(t, new qe(n), n.bypassAuthState);
|
|
3805
3816
|
}
|
|
3806
|
-
async function
|
|
3817
|
+
async function pr(n) {
|
|
3807
3818
|
const { auth: e, user: t } = n;
|
|
3808
3819
|
return u(
|
|
3809
3820
|
t,
|
|
@@ -3870,15 +3881,15 @@ class rn {
|
|
|
3870
3881
|
switch (e) {
|
|
3871
3882
|
case "signInViaPopup":
|
|
3872
3883
|
case "signInViaRedirect":
|
|
3873
|
-
return
|
|
3884
|
+
return hr;
|
|
3874
3885
|
case "linkViaPopup":
|
|
3875
3886
|
case "linkViaRedirect":
|
|
3876
|
-
return
|
|
3887
|
+
return pr;
|
|
3877
3888
|
case "reauthViaPopup":
|
|
3878
3889
|
case "reauthViaRedirect":
|
|
3879
|
-
return
|
|
3890
|
+
return fr;
|
|
3880
3891
|
default:
|
|
3881
|
-
|
|
3892
|
+
O(
|
|
3882
3893
|
this.auth,
|
|
3883
3894
|
"internal-error"
|
|
3884
3895
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -3886,10 +3897,10 @@ class rn {
|
|
|
3886
3897
|
}
|
|
3887
3898
|
}
|
|
3888
3899
|
resolve(e) {
|
|
3889
|
-
|
|
3900
|
+
L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
|
|
3890
3901
|
}
|
|
3891
3902
|
reject(e) {
|
|
3892
|
-
|
|
3903
|
+
L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
|
|
3893
3904
|
}
|
|
3894
3905
|
unregisterAndCleanUp() {
|
|
3895
3906
|
this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
|
|
@@ -3911,10 +3922,10 @@ class rn {
|
|
|
3911
3922
|
* See the License for the specific language governing permissions and
|
|
3912
3923
|
* limitations under the License.
|
|
3913
3924
|
*/
|
|
3914
|
-
const
|
|
3915
|
-
class
|
|
3925
|
+
const mr = new ae(2e3, 1e4);
|
|
3926
|
+
class z extends rn {
|
|
3916
3927
|
constructor(e, t, i, r, s) {
|
|
3917
|
-
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null,
|
|
3928
|
+
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, z.currentPopupAction && z.currentPopupAction.cancel(), z.currentPopupAction = this;
|
|
3918
3929
|
}
|
|
3919
3930
|
async executeNotNull() {
|
|
3920
3931
|
const e = await this.execute();
|
|
@@ -3926,7 +3937,7 @@ class q extends rn {
|
|
|
3926
3937
|
), e;
|
|
3927
3938
|
}
|
|
3928
3939
|
async onExecution() {
|
|
3929
|
-
|
|
3940
|
+
L(this.filter.length === 1, "Popup operations only handle one event");
|
|
3930
3941
|
const e = ze();
|
|
3931
3942
|
this.authWindow = await this.resolver._openPopup(
|
|
3932
3943
|
this.auth,
|
|
@@ -3937,7 +3948,7 @@ class q extends rn {
|
|
|
3937
3948
|
), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
|
|
3938
3949
|
this.reject(t);
|
|
3939
3950
|
}), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
|
|
3940
|
-
t || this.reject(
|
|
3951
|
+
t || this.reject(b(
|
|
3941
3952
|
this.auth,
|
|
3942
3953
|
"web-storage-unsupported"
|
|
3943
3954
|
/* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
|
|
@@ -3949,14 +3960,14 @@ class q extends rn {
|
|
|
3949
3960
|
return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
|
|
3950
3961
|
}
|
|
3951
3962
|
cancel() {
|
|
3952
|
-
this.reject(
|
|
3963
|
+
this.reject(b(
|
|
3953
3964
|
this.auth,
|
|
3954
3965
|
"cancelled-popup-request"
|
|
3955
3966
|
/* AuthErrorCode.EXPIRED_POPUP_REQUEST */
|
|
3956
3967
|
));
|
|
3957
3968
|
}
|
|
3958
3969
|
cleanUp() {
|
|
3959
|
-
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null,
|
|
3970
|
+
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, z.currentPopupAction = null;
|
|
3960
3971
|
}
|
|
3961
3972
|
pollUserCancellation() {
|
|
3962
3973
|
const e = () => {
|
|
@@ -3964,7 +3975,7 @@ class q extends rn {
|
|
|
3964
3975
|
if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
|
|
3965
3976
|
this.pollId = window.setTimeout(
|
|
3966
3977
|
() => {
|
|
3967
|
-
this.pollId = null, this.reject(
|
|
3978
|
+
this.pollId = null, this.reject(b(
|
|
3968
3979
|
this.auth,
|
|
3969
3980
|
"popup-closed-by-user"
|
|
3970
3981
|
/* AuthErrorCode.POPUP_CLOSED_BY_USER */
|
|
@@ -3975,12 +3986,12 @@ class q extends rn {
|
|
|
3975
3986
|
);
|
|
3976
3987
|
return;
|
|
3977
3988
|
}
|
|
3978
|
-
this.pollId = window.setTimeout(e,
|
|
3989
|
+
this.pollId = window.setTimeout(e, mr.get());
|
|
3979
3990
|
};
|
|
3980
3991
|
e();
|
|
3981
3992
|
}
|
|
3982
3993
|
}
|
|
3983
|
-
|
|
3994
|
+
z.currentPopupAction = null;
|
|
3984
3995
|
/**
|
|
3985
3996
|
* @license
|
|
3986
3997
|
* Copyright 2020 Google LLC
|
|
@@ -3997,8 +4008,8 @@ q.currentPopupAction = null;
|
|
|
3997
4008
|
* See the License for the specific language governing permissions and
|
|
3998
4009
|
* limitations under the License.
|
|
3999
4010
|
*/
|
|
4000
|
-
const
|
|
4001
|
-
class
|
|
4011
|
+
const gr = "pendingRedirect", fe = /* @__PURE__ */ new Map();
|
|
4012
|
+
class _r extends rn {
|
|
4002
4013
|
constructor(e, t, i = !1) {
|
|
4003
4014
|
super(e, [
|
|
4004
4015
|
"signInViaRedirect",
|
|
@@ -4016,7 +4027,7 @@ class vr extends rn {
|
|
|
4016
4027
|
let e = fe.get(this.auth._key());
|
|
4017
4028
|
if (!e) {
|
|
4018
4029
|
try {
|
|
4019
|
-
const i = await
|
|
4030
|
+
const i = await vr(this.resolver, this.auth) ? await super.execute() : null;
|
|
4020
4031
|
e = () => Promise.resolve(i);
|
|
4021
4032
|
} catch (t) {
|
|
4022
4033
|
e = () => Promise.reject(t);
|
|
@@ -4044,26 +4055,26 @@ class vr extends rn {
|
|
|
4044
4055
|
cleanUp() {
|
|
4045
4056
|
}
|
|
4046
4057
|
}
|
|
4047
|
-
async function
|
|
4048
|
-
const t =
|
|
4058
|
+
async function vr(n, e) {
|
|
4059
|
+
const t = wr(e), i = yr(n);
|
|
4049
4060
|
if (!await i._isAvailable())
|
|
4050
4061
|
return !1;
|
|
4051
4062
|
const r = await i._get(t) === "true";
|
|
4052
4063
|
return await i._remove(t), r;
|
|
4053
4064
|
}
|
|
4054
|
-
function
|
|
4065
|
+
function Ir(n, e) {
|
|
4055
4066
|
fe.set(n._key(), e);
|
|
4056
4067
|
}
|
|
4057
|
-
function
|
|
4058
|
-
return
|
|
4068
|
+
function yr(n) {
|
|
4069
|
+
return N(n._redirectPersistence);
|
|
4059
4070
|
}
|
|
4060
|
-
function
|
|
4061
|
-
return he(
|
|
4071
|
+
function wr(n) {
|
|
4072
|
+
return he(gr, n.config.apiKey, n.name);
|
|
4062
4073
|
}
|
|
4063
|
-
async function
|
|
4074
|
+
async function Tr(n, e, t = !1) {
|
|
4064
4075
|
if (A(n.app))
|
|
4065
4076
|
return Promise.reject(H(n));
|
|
4066
|
-
const i = be(n), r =
|
|
4077
|
+
const i = be(n), r = dr(i, e), o = await new _r(i, r, t).execute();
|
|
4067
4078
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
4068
4079
|
}
|
|
4069
4080
|
/**
|
|
@@ -4082,8 +4093,8 @@ async function kr(n, e, t = !1) {
|
|
|
4082
4093
|
* See the License for the specific language governing permissions and
|
|
4083
4094
|
* limitations under the License.
|
|
4084
4095
|
*/
|
|
4085
|
-
const
|
|
4086
|
-
class
|
|
4096
|
+
const kr = 10 * 60 * 1e3;
|
|
4097
|
+
class br {
|
|
4087
4098
|
constructor(e) {
|
|
4088
4099
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
4089
4100
|
}
|
|
@@ -4099,13 +4110,13 @@ class Er {
|
|
|
4099
4110
|
let t = !1;
|
|
4100
4111
|
return this.consumers.forEach((i) => {
|
|
4101
4112
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
4102
|
-
}), this.hasHandledPotentialRedirect || !
|
|
4113
|
+
}), this.hasHandledPotentialRedirect || !Er(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
4103
4114
|
}
|
|
4104
4115
|
sendToConsumer(e, t) {
|
|
4105
4116
|
var i;
|
|
4106
4117
|
if (e.error && !sn(e)) {
|
|
4107
4118
|
const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
|
|
4108
|
-
t.onError(
|
|
4119
|
+
t.onError(b(this.auth, r));
|
|
4109
4120
|
} else
|
|
4110
4121
|
t.onAuthEvent(e);
|
|
4111
4122
|
}
|
|
@@ -4114,7 +4125,7 @@ class Er {
|
|
|
4114
4125
|
return t.filter.includes(e.type) && i;
|
|
4115
4126
|
}
|
|
4116
4127
|
hasEventBeenHandled(e) {
|
|
4117
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
4128
|
+
return Date.now() - this.lastProcessedEventTime >= kr && this.cachedEventUids.clear(), this.cachedEventUids.has(ht(e));
|
|
4118
4129
|
}
|
|
4119
4130
|
saveEventToCache(e) {
|
|
4120
4131
|
this.cachedEventUids.add(ht(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -4126,7 +4137,7 @@ function ht(n) {
|
|
|
4126
4137
|
function sn({ type: n, error: e }) {
|
|
4127
4138
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
4128
4139
|
}
|
|
4129
|
-
function
|
|
4140
|
+
function Er(n) {
|
|
4130
4141
|
switch (n.type) {
|
|
4131
4142
|
case "signInViaRedirect":
|
|
4132
4143
|
case "linkViaRedirect":
|
|
@@ -4154,7 +4165,7 @@ function Sr(n) {
|
|
|
4154
4165
|
* See the License for the specific language governing permissions and
|
|
4155
4166
|
* limitations under the License.
|
|
4156
4167
|
*/
|
|
4157
|
-
async function
|
|
4168
|
+
async function Sr(n, e = {}) {
|
|
4158
4169
|
return Q(n, "GET", "/v1/projects", e);
|
|
4159
4170
|
}
|
|
4160
4171
|
/**
|
|
@@ -4173,24 +4184,24 @@ async function Rr(n, e = {}) {
|
|
|
4173
4184
|
* See the License for the specific language governing permissions and
|
|
4174
4185
|
* limitations under the License.
|
|
4175
4186
|
*/
|
|
4176
|
-
const
|
|
4177
|
-
async function
|
|
4187
|
+
const Rr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ar = /^https?/;
|
|
4188
|
+
async function Pr(n) {
|
|
4178
4189
|
if (n.config.emulator)
|
|
4179
4190
|
return;
|
|
4180
|
-
const { authorizedDomains: e } = await
|
|
4191
|
+
const { authorizedDomains: e } = await Sr(n);
|
|
4181
4192
|
for (const t of e)
|
|
4182
4193
|
try {
|
|
4183
|
-
if (
|
|
4194
|
+
if (Cr(t))
|
|
4184
4195
|
return;
|
|
4185
4196
|
} catch {
|
|
4186
4197
|
}
|
|
4187
|
-
|
|
4198
|
+
O(
|
|
4188
4199
|
n,
|
|
4189
4200
|
"unauthorized-domain"
|
|
4190
4201
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
4191
4202
|
);
|
|
4192
4203
|
}
|
|
4193
|
-
function
|
|
4204
|
+
function Cr(n) {
|
|
4194
4205
|
const e = Me(), { protocol: t, hostname: i } = new URL(e);
|
|
4195
4206
|
if (n.startsWith("chrome-extension://")) {
|
|
4196
4207
|
const o = new URL(n);
|
|
@@ -4198,7 +4209,7 @@ function Nr(n) {
|
|
|
4198
4209
|
}
|
|
4199
4210
|
if (!Ar.test(t))
|
|
4200
4211
|
return !1;
|
|
4201
|
-
if (
|
|
4212
|
+
if (Rr.test(n))
|
|
4202
4213
|
return i === n;
|
|
4203
4214
|
const r = n.replace(/\./g, "\\.");
|
|
4204
4215
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4219,9 +4230,9 @@ function Nr(n) {
|
|
|
4219
4230
|
* See the License for the specific language governing permissions and
|
|
4220
4231
|
* limitations under the License.
|
|
4221
4232
|
*/
|
|
4222
|
-
const
|
|
4233
|
+
const Nr = new ae(3e4, 6e4);
|
|
4223
4234
|
function ft() {
|
|
4224
|
-
const n =
|
|
4235
|
+
const n = E().___jsl;
|
|
4225
4236
|
if (n != null && n.H) {
|
|
4226
4237
|
for (const e of Object.keys(n.H))
|
|
4227
4238
|
if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
|
|
@@ -4229,7 +4240,7 @@ function ft() {
|
|
|
4229
4240
|
n.CP[t] = null;
|
|
4230
4241
|
}
|
|
4231
4242
|
}
|
|
4232
|
-
function
|
|
4243
|
+
function Or(n) {
|
|
4233
4244
|
return new Promise((e, t) => {
|
|
4234
4245
|
var i, r, s;
|
|
4235
4246
|
function o() {
|
|
@@ -4238,36 +4249,36 @@ function Lr(n) {
|
|
|
4238
4249
|
e(gapi.iframes.getContext());
|
|
4239
4250
|
},
|
|
4240
4251
|
ontimeout: () => {
|
|
4241
|
-
ft(), t(
|
|
4252
|
+
ft(), t(b(
|
|
4242
4253
|
n,
|
|
4243
4254
|
"network-request-failed"
|
|
4244
4255
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4245
4256
|
));
|
|
4246
4257
|
},
|
|
4247
|
-
timeout:
|
|
4258
|
+
timeout: Nr.get()
|
|
4248
4259
|
});
|
|
4249
4260
|
}
|
|
4250
|
-
if (!((r = (i =
|
|
4261
|
+
if (!((r = (i = E().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
4251
4262
|
e(gapi.iframes.getContext());
|
|
4252
|
-
else if (!((s =
|
|
4263
|
+
else if (!((s = E().gapi) === null || s === void 0) && s.load)
|
|
4253
4264
|
o();
|
|
4254
4265
|
else {
|
|
4255
|
-
const c =
|
|
4256
|
-
return
|
|
4257
|
-
gapi.load ? o() : t(
|
|
4266
|
+
const c = Ui("iframefcb");
|
|
4267
|
+
return E()[c] = () => {
|
|
4268
|
+
gapi.load ? o() : t(b(
|
|
4258
4269
|
n,
|
|
4259
4270
|
"network-request-failed"
|
|
4260
4271
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4261
4272
|
));
|
|
4262
|
-
},
|
|
4273
|
+
}, Li(`${Mi()}?onload=${c}`).catch((a) => t(a));
|
|
4263
4274
|
}
|
|
4264
4275
|
}).catch((e) => {
|
|
4265
4276
|
throw pe = null, e;
|
|
4266
4277
|
});
|
|
4267
4278
|
}
|
|
4268
4279
|
let pe = null;
|
|
4269
|
-
function
|
|
4270
|
-
return pe = pe ||
|
|
4280
|
+
function Lr(n) {
|
|
4281
|
+
return pe = pe || Or(n), pe;
|
|
4271
4282
|
}
|
|
4272
4283
|
/**
|
|
4273
4284
|
* @license
|
|
@@ -4285,7 +4296,7 @@ function Mr(n) {
|
|
|
4285
4296
|
* See the License for the specific language governing permissions and
|
|
4286
4297
|
* limitations under the License.
|
|
4287
4298
|
*/
|
|
4288
|
-
const
|
|
4299
|
+
const Mr = new ae(5e3, 15e3), Ur = "__/auth/iframe", Dr = "emulator/auth/iframe", xr = {
|
|
4289
4300
|
style: {
|
|
4290
4301
|
position: "absolute",
|
|
4291
4302
|
top: "-100px",
|
|
@@ -4294,13 +4305,13 @@ const Ur = new ae(5e3, 15e3), Dr = "__/auth/iframe", xr = "emulator/auth/iframe"
|
|
|
4294
4305
|
},
|
|
4295
4306
|
"aria-hidden": "true",
|
|
4296
4307
|
tabindex: "-1"
|
|
4297
|
-
},
|
|
4308
|
+
}, Fr = /* @__PURE__ */ new Map([
|
|
4298
4309
|
["identitytoolkit.googleapis.com", "p"],
|
|
4299
4310
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4300
4311
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4301
4312
|
// test
|
|
4302
4313
|
]);
|
|
4303
|
-
function
|
|
4314
|
+
function Vr(n) {
|
|
4304
4315
|
const e = n.config;
|
|
4305
4316
|
u(
|
|
4306
4317
|
e.authDomain,
|
|
@@ -4308,17 +4319,17 @@ function $r(n) {
|
|
|
4308
4319
|
"auth-domain-config-required"
|
|
4309
4320
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4310
4321
|
);
|
|
4311
|
-
const t = e.emulator ?
|
|
4322
|
+
const t = e.emulator ? We(e, Dr) : `https://${n.config.authDomain}/${Ur}`, i = {
|
|
4312
4323
|
apiKey: e.apiKey,
|
|
4313
4324
|
appName: n.name,
|
|
4314
4325
|
v: se
|
|
4315
|
-
}, r =
|
|
4326
|
+
}, r = Fr.get(n.config.apiHost);
|
|
4316
4327
|
r && (i.eid = r);
|
|
4317
4328
|
const s = n._getFrameworks();
|
|
4318
4329
|
return s.length && (i.fw = s.join(",")), `${t}?${oe(i).slice(1)}`;
|
|
4319
4330
|
}
|
|
4320
|
-
async function
|
|
4321
|
-
const e = await
|
|
4331
|
+
async function $r(n) {
|
|
4332
|
+
const e = await Lr(n), t = E().gapi;
|
|
4322
4333
|
return u(
|
|
4323
4334
|
t,
|
|
4324
4335
|
n,
|
|
@@ -4326,24 +4337,24 @@ async function Hr(n) {
|
|
|
4326
4337
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4327
4338
|
), e.open({
|
|
4328
4339
|
where: document.body,
|
|
4329
|
-
url:
|
|
4340
|
+
url: Vr(n),
|
|
4330
4341
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4331
|
-
attributes:
|
|
4342
|
+
attributes: xr,
|
|
4332
4343
|
dontclear: !0
|
|
4333
4344
|
}, (i) => new Promise(async (r, s) => {
|
|
4334
4345
|
await i.restyle({
|
|
4335
4346
|
// Prevent iframe from closing on mouse out.
|
|
4336
4347
|
setHideOnLeave: !1
|
|
4337
4348
|
});
|
|
4338
|
-
const o =
|
|
4349
|
+
const o = b(
|
|
4339
4350
|
n,
|
|
4340
4351
|
"network-request-failed"
|
|
4341
4352
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4342
|
-
), c =
|
|
4353
|
+
), c = E().setTimeout(() => {
|
|
4343
4354
|
s(o);
|
|
4344
|
-
},
|
|
4355
|
+
}, Mr.get());
|
|
4345
4356
|
function a() {
|
|
4346
|
-
|
|
4357
|
+
E().clearTimeout(c), r(i);
|
|
4347
4358
|
}
|
|
4348
4359
|
i.ping(a).then(a, () => {
|
|
4349
4360
|
s(o);
|
|
@@ -4366,12 +4377,12 @@ async function Hr(n) {
|
|
|
4366
4377
|
* See the License for the specific language governing permissions and
|
|
4367
4378
|
* limitations under the License.
|
|
4368
4379
|
*/
|
|
4369
|
-
const
|
|
4380
|
+
const Hr = {
|
|
4370
4381
|
location: "yes",
|
|
4371
4382
|
resizable: "yes",
|
|
4372
4383
|
statusbar: "yes",
|
|
4373
4384
|
toolbar: "no"
|
|
4374
|
-
}, Wr = 500,
|
|
4385
|
+
}, Wr = 500, jr = 600, Gr = "_blank", Br = "http://localhost";
|
|
4375
4386
|
class pt {
|
|
4376
4387
|
constructor(e) {
|
|
4377
4388
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4384,19 +4395,19 @@ class pt {
|
|
|
4384
4395
|
}
|
|
4385
4396
|
}
|
|
4386
4397
|
}
|
|
4387
|
-
function
|
|
4398
|
+
function zr(n, e, t, i = Wr, r = jr) {
|
|
4388
4399
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4389
4400
|
let c = "";
|
|
4390
|
-
const a = Object.assign(Object.assign({},
|
|
4401
|
+
const a = Object.assign(Object.assign({}, Hr), {
|
|
4391
4402
|
width: i.toString(),
|
|
4392
4403
|
height: r.toString(),
|
|
4393
4404
|
top: s,
|
|
4394
4405
|
left: o
|
|
4395
|
-
}), l =
|
|
4396
|
-
t && (c = Ft(l) ? Gr : t), xt(l) && (e = e ||
|
|
4397
|
-
const d = Object.entries(a).reduce((
|
|
4398
|
-
if (
|
|
4399
|
-
return
|
|
4406
|
+
}), l = w().toLowerCase();
|
|
4407
|
+
t && (c = Ft(l) ? Gr : t), xt(l) && (e = e || Br, a.scrollbars = "yes");
|
|
4408
|
+
const d = Object.entries(a).reduce((y, [T, h]) => `${y}${T}=${h},`, "");
|
|
4409
|
+
if (bi(l) && c !== "_self")
|
|
4410
|
+
return qr(e || "", c), new pt(null);
|
|
4400
4411
|
const m = window.open(e || "", c, d);
|
|
4401
4412
|
u(
|
|
4402
4413
|
m,
|
|
@@ -4410,7 +4421,7 @@ function qr(n, e, t, i = Wr, r = Br) {
|
|
|
4410
4421
|
}
|
|
4411
4422
|
return new pt(m);
|
|
4412
4423
|
}
|
|
4413
|
-
function
|
|
4424
|
+
function qr(n, e) {
|
|
4414
4425
|
const t = document.createElement("a");
|
|
4415
4426
|
t.href = n, t.target = e;
|
|
4416
4427
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4432,7 +4443,7 @@ function Kr(n, e) {
|
|
|
4432
4443
|
* See the License for the specific language governing permissions and
|
|
4433
4444
|
* limitations under the License.
|
|
4434
4445
|
*/
|
|
4435
|
-
const
|
|
4446
|
+
const Kr = "__/auth/handler", Jr = "emulator/auth/handler", Yr = encodeURIComponent("fac");
|
|
4436
4447
|
async function mt(n, e, t, i, r, s) {
|
|
4437
4448
|
u(
|
|
4438
4449
|
n.config.authDomain,
|
|
@@ -4454,7 +4465,7 @@ async function mt(n, e, t, i, r, s) {
|
|
|
4454
4465
|
eventId: r
|
|
4455
4466
|
};
|
|
4456
4467
|
if (e instanceof qt) {
|
|
4457
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
4468
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Mn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4458
4469
|
for (const [d, m] of Object.entries({}))
|
|
4459
4470
|
o[d] = m;
|
|
4460
4471
|
}
|
|
@@ -4466,11 +4477,11 @@ async function mt(n, e, t, i, r, s) {
|
|
|
4466
4477
|
const c = o;
|
|
4467
4478
|
for (const d of Object.keys(c))
|
|
4468
4479
|
c[d] === void 0 && delete c[d];
|
|
4469
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4470
|
-
return `${
|
|
4480
|
+
const a = await n._getAppCheckToken(), l = a ? `#${Yr}=${encodeURIComponent(a)}` : "";
|
|
4481
|
+
return `${Xr(n)}?${oe(c).slice(1)}${l}`;
|
|
4471
4482
|
}
|
|
4472
|
-
function
|
|
4473
|
-
return n.emulator ?
|
|
4483
|
+
function Xr({ config: n }) {
|
|
4484
|
+
return n.emulator ? We(n, Jr) : `https://${n.authDomain}/${Kr}`;
|
|
4474
4485
|
}
|
|
4475
4486
|
/**
|
|
4476
4487
|
* @license
|
|
@@ -4489,29 +4500,29 @@ function Qr({ config: n }) {
|
|
|
4489
4500
|
* limitations under the License.
|
|
4490
4501
|
*/
|
|
4491
4502
|
const Ne = "webStorageSupport";
|
|
4492
|
-
class
|
|
4503
|
+
class Qr {
|
|
4493
4504
|
constructor() {
|
|
4494
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn =
|
|
4505
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn = Tr, this._overrideRedirectResult = Ir;
|
|
4495
4506
|
}
|
|
4496
4507
|
// Wrapping in async even though we don't await anywhere in order
|
|
4497
4508
|
// to make sure errors are raised as promise rejections
|
|
4498
4509
|
async _openPopup(e, t, i, r) {
|
|
4499
4510
|
var s;
|
|
4500
|
-
|
|
4511
|
+
L((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4501
4512
|
const o = await mt(e, t, i, Me(), r);
|
|
4502
|
-
return
|
|
4513
|
+
return zr(e, o, ze());
|
|
4503
4514
|
}
|
|
4504
4515
|
async _openRedirect(e, t, i, r) {
|
|
4505
4516
|
await this._originValidation(e);
|
|
4506
4517
|
const s = await mt(e, t, i, Me(), r);
|
|
4507
|
-
return
|
|
4518
|
+
return tr(s), new Promise(() => {
|
|
4508
4519
|
});
|
|
4509
4520
|
}
|
|
4510
4521
|
_initialize(e) {
|
|
4511
4522
|
const t = e._key();
|
|
4512
4523
|
if (this.eventManagers[t]) {
|
|
4513
4524
|
const { manager: r, promise: s } = this.eventManagers[t];
|
|
4514
|
-
return r ? Promise.resolve(r) : (
|
|
4525
|
+
return r ? Promise.resolve(r) : (L(s, "If manager is not set, promise should be"), s);
|
|
4515
4526
|
}
|
|
4516
4527
|
const i = this.initAndGetManager(e);
|
|
4517
4528
|
return this.eventManagers[t] = { promise: i }, i.catch(() => {
|
|
@@ -4519,7 +4530,7 @@ class Zr {
|
|
|
4519
4530
|
}), i;
|
|
4520
4531
|
}
|
|
4521
4532
|
async initAndGetManager(e) {
|
|
4522
|
-
const t = await
|
|
4533
|
+
const t = await $r(e), i = new br(e);
|
|
4523
4534
|
return t.register("authEvent", (r) => (u(
|
|
4524
4535
|
r == null ? void 0 : r.authEvent,
|
|
4525
4536
|
e,
|
|
@@ -4534,7 +4545,7 @@ class Zr {
|
|
|
4534
4545
|
this.iframes[e._key()].send(Ne, { type: Ne }, (r) => {
|
|
4535
4546
|
var s;
|
|
4536
4547
|
const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ne];
|
|
4537
|
-
o !== void 0 && t(!!o),
|
|
4548
|
+
o !== void 0 && t(!!o), O(
|
|
4538
4549
|
e,
|
|
4539
4550
|
"internal-error"
|
|
4540
4551
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -4543,13 +4554,13 @@ class Zr {
|
|
|
4543
4554
|
}
|
|
4544
4555
|
_originValidation(e) {
|
|
4545
4556
|
const t = e._key();
|
|
4546
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4557
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Pr(e)), this.originValidationPromises[t];
|
|
4547
4558
|
}
|
|
4548
4559
|
get _shouldInitProactively() {
|
|
4549
|
-
return
|
|
4560
|
+
return jt() || Ge() || ke();
|
|
4550
4561
|
}
|
|
4551
4562
|
}
|
|
4552
|
-
const
|
|
4563
|
+
const Zr = Qr;
|
|
4553
4564
|
var gt = "@firebase/auth", _t = "1.7.5";
|
|
4554
4565
|
/**
|
|
4555
4566
|
* @license
|
|
@@ -4567,7 +4578,7 @@ var gt = "@firebase/auth", _t = "1.7.5";
|
|
|
4567
4578
|
* See the License for the specific language governing permissions and
|
|
4568
4579
|
* limitations under the License.
|
|
4569
4580
|
*/
|
|
4570
|
-
class
|
|
4581
|
+
class es {
|
|
4571
4582
|
constructor(e) {
|
|
4572
4583
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4573
4584
|
}
|
|
@@ -4618,7 +4629,7 @@ class ts {
|
|
|
4618
4629
|
* See the License for the specific language governing permissions and
|
|
4619
4630
|
* limitations under the License.
|
|
4620
4631
|
*/
|
|
4621
|
-
function
|
|
4632
|
+
function ts(n) {
|
|
4622
4633
|
switch (n) {
|
|
4623
4634
|
case "Node":
|
|
4624
4635
|
return "node";
|
|
@@ -4634,7 +4645,7 @@ function ns(n) {
|
|
|
4634
4645
|
return;
|
|
4635
4646
|
}
|
|
4636
4647
|
}
|
|
4637
|
-
function
|
|
4648
|
+
function ns(n) {
|
|
4638
4649
|
Ze(new et(
|
|
4639
4650
|
"auth",
|
|
4640
4651
|
(e, { options: t }) => {
|
|
@@ -4647,9 +4658,9 @@ function is(n) {
|
|
|
4647
4658
|
apiHost: "identitytoolkit.googleapis.com",
|
|
4648
4659
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4649
4660
|
apiScheme: "https",
|
|
4650
|
-
sdkClientVersion:
|
|
4651
|
-
}, l = new
|
|
4652
|
-
return
|
|
4661
|
+
sdkClientVersion: Gt(n)
|
|
4662
|
+
}, l = new Ni(i, r, s, a);
|
|
4663
|
+
return xi(l, t), l;
|
|
4653
4664
|
},
|
|
4654
4665
|
"PUBLIC"
|
|
4655
4666
|
/* ComponentType.PUBLIC */
|
|
@@ -4668,14 +4679,14 @@ function is(n) {
|
|
|
4668
4679
|
"auth"
|
|
4669
4680
|
/* _ComponentName.AUTH */
|
|
4670
4681
|
).getImmediate());
|
|
4671
|
-
return ((i) => new
|
|
4682
|
+
return ((i) => new es(i))(t);
|
|
4672
4683
|
},
|
|
4673
4684
|
"PRIVATE"
|
|
4674
4685
|
/* ComponentType.PRIVATE */
|
|
4675
4686
|
).setInstantiationMode(
|
|
4676
4687
|
"EXPLICIT"
|
|
4677
4688
|
/* InstantiationMode.EXPLICIT */
|
|
4678
|
-
)), Le(gt, _t,
|
|
4689
|
+
)), Le(gt, _t, ts(n)), Le(gt, _t, "esm2017");
|
|
4679
4690
|
}
|
|
4680
4691
|
/**
|
|
4681
4692
|
* @license
|
|
@@ -4693,11 +4704,11 @@ function is(n) {
|
|
|
4693
4704
|
* See the License for the specific language governing permissions and
|
|
4694
4705
|
* limitations under the License.
|
|
4695
4706
|
*/
|
|
4696
|
-
const
|
|
4707
|
+
const is = 5 * 60, rs = kt("authIdTokenMaxAge") || is;
|
|
4697
4708
|
let vt = null;
|
|
4698
|
-
const
|
|
4709
|
+
const ss = (n) => async (e) => {
|
|
4699
4710
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4700
|
-
if (i && i >
|
|
4711
|
+
if (i && i > rs)
|
|
4701
4712
|
return;
|
|
4702
4713
|
const r = t == null ? void 0 : t.token;
|
|
4703
4714
|
vt !== r && (vt = r, await fetch(n, {
|
|
@@ -4707,117 +4718,115 @@ const os = (n) => async (e) => {
|
|
|
4707
4718
|
} : {}
|
|
4708
4719
|
}));
|
|
4709
4720
|
};
|
|
4710
|
-
function
|
|
4721
|
+
function os(n = Cn()) {
|
|
4711
4722
|
const e = bt(n, "auth");
|
|
4712
4723
|
if (e.isInitialized())
|
|
4713
4724
|
return e.getImmediate();
|
|
4714
|
-
const t =
|
|
4715
|
-
popupRedirectResolver:
|
|
4725
|
+
const t = Di(n, {
|
|
4726
|
+
popupRedirectResolver: Zr,
|
|
4716
4727
|
persistence: [
|
|
4717
|
-
|
|
4718
|
-
|
|
4728
|
+
ur,
|
|
4729
|
+
Qi,
|
|
4719
4730
|
Qt
|
|
4720
4731
|
]
|
|
4721
4732
|
}), i = kt("authTokenSyncURL");
|
|
4722
4733
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4723
4734
|
const s = new URL(i, location.origin);
|
|
4724
4735
|
if (location.origin === s.origin) {
|
|
4725
|
-
const o =
|
|
4726
|
-
|
|
4736
|
+
const o = ss(s.toString());
|
|
4737
|
+
Ki(t, o, () => o(t.currentUser)), qi(t, (c) => o(c));
|
|
4727
4738
|
}
|
|
4728
4739
|
}
|
|
4729
|
-
const r =
|
|
4730
|
-
return r &&
|
|
4740
|
+
const r = Pn("auth");
|
|
4741
|
+
return r && Fi(t, `http://${r}`), t;
|
|
4731
4742
|
}
|
|
4732
|
-
function
|
|
4743
|
+
function as() {
|
|
4733
4744
|
var n, e;
|
|
4734
4745
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4735
4746
|
}
|
|
4736
|
-
|
|
4747
|
+
Oi({
|
|
4737
4748
|
loadJS(n) {
|
|
4738
4749
|
return new Promise((e, t) => {
|
|
4739
4750
|
const i = document.createElement("script");
|
|
4740
4751
|
i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
|
|
4741
|
-
const s =
|
|
4752
|
+
const s = b(
|
|
4742
4753
|
"internal-error"
|
|
4743
4754
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4744
4755
|
);
|
|
4745
4756
|
s.customData = r, t(s);
|
|
4746
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4757
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", as().appendChild(i);
|
|
4747
4758
|
});
|
|
4748
4759
|
},
|
|
4749
4760
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4750
4761
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4751
4762
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4752
4763
|
});
|
|
4753
|
-
|
|
4764
|
+
ns(
|
|
4754
4765
|
"Browser"
|
|
4755
4766
|
/* ClientPlatform.BROWSER */
|
|
4756
4767
|
);
|
|
4757
|
-
var
|
|
4758
|
-
const
|
|
4768
|
+
var cs = { 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", featureFlagApiKey: "MaGoXrEWuEJNpWgKTqseee" }, ls = { 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/" };
|
|
4769
|
+
const us = {
|
|
4759
4770
|
key: 2,
|
|
4760
4771
|
class: "h-full w-full"
|
|
4761
|
-
},
|
|
4772
|
+
}, ds = ["src"], Ps = /* @__PURE__ */ xe({
|
|
4762
4773
|
__name: "App",
|
|
4763
4774
|
setup(n) {
|
|
4764
|
-
const e = ge(), t = pn(), i = mn(), r = vn(), s = In(), o = wt(), c =
|
|
4765
|
-
() => o.name === p["$connect-UPSELLING"]
|
|
4766
|
-
), a = te(o.query.showHeader !== "false"), l = te(!1), { currentBusiness: d } = ge();
|
|
4775
|
+
const e = ge(), t = pn(), i = mn(), r = vn(), s = In(), o = wt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = ge();
|
|
4767
4776
|
ie(
|
|
4768
4777
|
() => {
|
|
4769
|
-
var
|
|
4770
|
-
return (
|
|
4778
|
+
var p;
|
|
4779
|
+
return (p = l.value) == null ? void 0 : p._id;
|
|
4771
4780
|
},
|
|
4772
|
-
(
|
|
4773
|
-
|
|
4781
|
+
(p) => {
|
|
4782
|
+
p && _n(p);
|
|
4774
4783
|
},
|
|
4775
4784
|
{ immediate: !0 }
|
|
4776
4785
|
);
|
|
4777
|
-
const
|
|
4778
|
-
const
|
|
4779
|
-
return `${
|
|
4786
|
+
const d = te(!1), m = Y(() => i.version), y = Y(() => {
|
|
4787
|
+
const p = e.currentCountry.value || "MY", g = tt.getIdToken(), v = l.value._id;
|
|
4788
|
+
return `${ls.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${g}`;
|
|
4780
4789
|
});
|
|
4781
|
-
async function
|
|
4782
|
-
if (
|
|
4790
|
+
async function T() {
|
|
4791
|
+
if (Un().length) {
|
|
4783
4792
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4784
4793
|
return;
|
|
4785
4794
|
}
|
|
4786
|
-
const
|
|
4787
|
-
await
|
|
4795
|
+
const p = Dn(cs.firebase), g = await fn.getCustomToken(), v = os();
|
|
4796
|
+
await zi(v, g), xn(p), console.log("initFirebase", p);
|
|
4788
4797
|
}
|
|
4789
|
-
const
|
|
4790
|
-
|
|
4798
|
+
const h = async () => {
|
|
4799
|
+
d.value = !1, await dn(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && m.value === "v2" ? e.registerSidebarComponent(Hn) : e.hideSidebarToggle(!0), await T(), a.value = !0, d.value = !0;
|
|
4791
4800
|
};
|
|
4792
4801
|
return un(() => {
|
|
4793
|
-
if (
|
|
4794
|
-
const
|
|
4795
|
-
|
|
4802
|
+
if (Fn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4803
|
+
const p = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], M = document.getElementsByTagName("main")[0];
|
|
4804
|
+
p == null || p.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), M == null || M.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4796
4805
|
}
|
|
4797
|
-
|
|
4806
|
+
l.value != null && (console.log("App mounted, forceRerender"), h());
|
|
4798
4807
|
}), ie(
|
|
4799
4808
|
() => e.currentBusiness.value,
|
|
4800
|
-
async (
|
|
4801
|
-
console.log("Current business changed"),
|
|
4809
|
+
async (p, g) => {
|
|
4810
|
+
console.log("Current business changed"), p != null && p._id != g._id && (console.log("forceRerender when business changes", p, g), h());
|
|
4802
4811
|
}
|
|
4803
|
-
), (
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
json: { url:
|
|
4812
|
+
), (p, g) => (j(), me(It, null, [
|
|
4813
|
+
_(d) && _(m) === "v2" ? (j(), Oe(_(hn), { key: 0 })) : Pe("", !0),
|
|
4814
|
+
_(d) && _(m) === "v2" && _(c) ? (j(), Oe(si, { key: 1 })) : Pe("", !0),
|
|
4815
|
+
_(d) && _(m) !== "v2" ? (j(), me("div", us, [
|
|
4816
|
+
S(kn, {
|
|
4817
|
+
json: { url: _(y) }
|
|
4809
4818
|
}, null, 8, ["json"]),
|
|
4810
4819
|
I("iframe", {
|
|
4811
4820
|
allow: "clipboard-read; clipboard-write",
|
|
4812
4821
|
frameBorder: "0",
|
|
4813
4822
|
height: "100%",
|
|
4814
4823
|
width: "100%",
|
|
4815
|
-
src:
|
|
4816
|
-
}, null, 8,
|
|
4817
|
-
])) :
|
|
4824
|
+
src: _(y)
|
|
4825
|
+
}, null, 8, ds)
|
|
4826
|
+
])) : Pe("", !0)
|
|
4818
4827
|
], 64));
|
|
4819
4828
|
}
|
|
4820
4829
|
});
|
|
4821
4830
|
export {
|
|
4822
|
-
|
|
4831
|
+
Ps as default
|
|
4823
4832
|
};
|