@feedmepos/mf-payment 1.8.4 → 1.8.6-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/{Actions.vue_vue_type_script_setup_true_lang-lNOdkVcz.js → Actions.vue_vue_type_script_setup_true_lang-bFCBTzI5.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CNX1bokz.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DJhZ930J.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CQ2ydJUt.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-B9_rq-fq.js} +2 -2
- package/dist/{Chargeback-Cl9cFk4m.js → Chargeback-eF_MfNB7.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DYqHZ8jn.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DByI68Y0.js} +1 -1
- package/dist/{OnboardForm-dUc5JYDl.js → OnboardForm-CgVlJEWP.js} +6 -6
- package/dist/{OnboardForm-C9Ikpj6k.js → OnboardForm-OqVz2dnj.js} +6 -6
- package/dist/{OnboardSubmission-DYgD_fWE.js → OnboardSubmission-BeWkvADJ.js} +6 -6
- package/dist/{OnboardSubmission-D3qYK4wt.js → OnboardSubmission-CmcuvrEy.js} +3 -3
- package/dist/{PayoutAccount-Cz-Yvtg-.js → PayoutAccount-BU-bT1wE.js} +5 -5
- package/dist/{PayoutAccount-BJk10tma.js → PayoutAccount-Q0bzSdXR.js} +7 -7
- package/dist/{PayoutAccountSetting-CnEVXCzQ.js → PayoutAccountSetting-CZqZdZyS.js} +679 -609
- package/dist/{Restaurant-XDkNMCEV.js → Restaurant-BLLbK64j.js} +4 -4
- package/dist/{RestaurantSetting-CSSu_pmO.js → RestaurantSetting-BC_sm9bJ.js} +156 -81
- package/dist/{Settlement-xM2zJdLL.js → Settlement-B7dzQTAr.js} +196 -195
- package/dist/{Settlement-Cx6mSYtF.js → Settlement-CphuhaDs.js} +3 -3
- package/dist/{SettlementTransactions-BJEyi8N3.js → SettlementTransactions-CTFl-1pu.js} +5 -5
- package/dist/{SettlementTransactions-sCqDBpq8.js → SettlementTransactions-oCyokbLZ.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BQhM9D7v.js → Status.vue_vue_type_script_setup_true_lang-DZH1tqmy.js} +1 -1
- package/dist/{Terminal-a1vFnh71.js → Terminal-ubk78mmt.js} +5 -5
- package/dist/{TerminalSetting-DlpyxmPZ.js → TerminalSetting-CqS9pECq.js} +472 -461
- package/dist/{Transaction-CciNueUl.js → Transaction-BgLMHX2L.js} +11 -11
- package/dist/{Transaction-gHds2t4D.js → Transaction-BxNWr_TR.js} +10 -10
- package/dist/{TransactionOld-DAvbB2N2.js → TransactionOld-jrctGUYY.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-CqQ39DVI.js → TransactionStatus.vue_vue_type_script_setup_true_lang-Hribmsrm.js} +1 -1
- package/dist/{app-DMXdWBYv.js → app-GiML6ZLl.js} +579 -567
- package/dist/app.js +1 -1
- package/dist/assets-8qJRwo68.js +93 -0
- package/dist/{grafana-BCbh4s3Y.js → grafana-B9Tf8La5.js} +1 -1
- package/dist/{index-BGi14kEc.js → index-B5NyE5Fd.js} +1 -1
- package/dist/{index-CcXMdy2s.js → index-BAva71bK.js} +1 -1
- package/dist/{index-dnlq9Rbs.js → index-BfYobGKt.js} +2820 -2771
- package/dist/{index-eXJ4j7ru.js → index-CVTjXEZI.js} +1 -1
- package/dist/{index-BDyYIYYk.js → index-CxK7NPc7.js} +1 -1
- package/dist/{index-DMreuDeg.js → index-D1EHLc-D.js} +1 -1
- package/dist/{index-ySAjUgNy.js → index-DNBtefZH.js} +1 -1
- package/dist/{index-4IomR9Vx.js → index-PCquuCgs.js} +1 -1
- package/dist/{index-C3986zP_.js → index-XzGHDL9B.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-Z8PY2COh.js → index.vue_vue_type_script_setup_true_lang-3kFL7AhX.js} +1 -1
- package/dist/{onboard-submission-Cs4z91ud.js → onboard-submission-y3QA70dW.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DvjKt4Yk.js → payout-account-BtaeptEJ.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +44 -32
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +12 -12
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +12 -12
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +12 -12
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +44 -32
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +48 -36
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +48 -36
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +44 -32
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +44 -32
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +48 -36
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +41 -0
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +48 -0
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +30 -30
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +88 -64
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +49 -49
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +24 -24
- package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
- package/package.json +2 -2
- package/dist/assets-yLnQhwn5.js +0 -92
|
@@ -3,7 +3,7 @@ var rr = (t) => {
|
|
|
3
3
|
};
|
|
4
4
|
var dn = (t, e, n) => e.has(t) || rr("Cannot " + n);
|
|
5
5
|
var h = (t, e, n) => (dn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), G = (t, e, n) => e.has(t) ? rr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), D = (t, e, n, r) => (dn(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), z = (t, e, n) => (dn(t, e, "access private method"), n);
|
|
6
|
-
var
|
|
6
|
+
var xt = (t, e, n, r) => ({
|
|
7
7
|
set _(s) {
|
|
8
8
|
D(t, e, s, n);
|
|
9
9
|
},
|
|
@@ -12,9 +12,9 @@ var Vt = (t, e, n, r) => ({
|
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
import { routes as Ri, i18nMessages as qi } from "@feedmepos/mf-financing";
|
|
15
|
-
import { isRef as qn, ref as
|
|
15
|
+
import { isRef as qn, ref as St, shallowRef as Ni, watchEffect as Hi, computed as Nn, h as vn, defineComponent as tn, unref as ge, openBlock as nn, createBlock as Hn, renderSlot as Qi, createCommentVNode as Xi, createElementBlock as Si, createElementVNode as Ke, toDisplayString as sr, nextTick as Ui, defineAsyncComponent as _r, watch as $r, resolveComponent as es, provide as Wi, onMounted as zi, onBeforeMount as Zi, onUnmounted as Li } from "vue";
|
|
16
16
|
import { useRoute as ts, createRouter as Ki, createWebHistory as Ji, useRouter as _i } from "vue-router";
|
|
17
|
-
import { useCoreStore as
|
|
17
|
+
import { useCoreStore as rn, useI18n as ns } from "@feedmepos/mf-common";
|
|
18
18
|
import { defineStore as $i } from "pinia";
|
|
19
19
|
import { components as ea } from "@feedmepos/ui-library";
|
|
20
20
|
const ta = {
|
|
@@ -45,6 +45,7 @@ const ta = {
|
|
|
45
45
|
created_at: "Created At",
|
|
46
46
|
sales_amount: "Sales Amount",
|
|
47
47
|
fee: "Fee",
|
|
48
|
+
refund: "Refund",
|
|
48
49
|
settlement_amount: "Settlement Amount",
|
|
49
50
|
invoice_status: "Invoice Status"
|
|
50
51
|
},
|
|
@@ -452,6 +453,7 @@ const ta = {
|
|
|
452
453
|
account: "เลขที่บัญชี",
|
|
453
454
|
created_at: "วันที่สร้าง",
|
|
454
455
|
sales_amount: "ยอดขาย",
|
|
456
|
+
refund: "จำนวนเงินคืน",
|
|
455
457
|
fee: "ค่าธรรมเนียม",
|
|
456
458
|
settlement_amount: "ยอดโอนเงิน",
|
|
457
459
|
invoice_status: "สถานะใบแจ้งหนี้"
|
|
@@ -858,6 +860,7 @@ const ta = {
|
|
|
858
860
|
account: "账户号码",
|
|
859
861
|
created_at: "结算时间",
|
|
860
862
|
sales_amount: "营业金额",
|
|
863
|
+
refund: "退款金额",
|
|
861
864
|
fee: "服务费用",
|
|
862
865
|
settlement_amount: "结算金额",
|
|
863
866
|
invoice_status: "发票状态"
|
|
@@ -1252,28 +1255,28 @@ function ca(t, e, n) {
|
|
|
1252
1255
|
evaluating: i = void 0,
|
|
1253
1256
|
shallow: a = !0,
|
|
1254
1257
|
onError: c = oa
|
|
1255
|
-
} = r, l =
|
|
1256
|
-
let
|
|
1258
|
+
} = r, l = St(!s), A = a ? Ni(e) : St(e);
|
|
1259
|
+
let m = 0;
|
|
1257
1260
|
return Hi(async (p) => {
|
|
1258
1261
|
if (!l.value)
|
|
1259
1262
|
return;
|
|
1260
|
-
|
|
1261
|
-
const B =
|
|
1262
|
-
let
|
|
1263
|
+
m++;
|
|
1264
|
+
const B = m;
|
|
1265
|
+
let w = !1;
|
|
1263
1266
|
i && Promise.resolve().then(() => {
|
|
1264
1267
|
i.value = !0;
|
|
1265
1268
|
});
|
|
1266
1269
|
try {
|
|
1267
1270
|
const O = await t((I) => {
|
|
1268
1271
|
p(() => {
|
|
1269
|
-
i && (i.value = !1),
|
|
1272
|
+
i && (i.value = !1), w || I();
|
|
1270
1273
|
});
|
|
1271
1274
|
});
|
|
1272
|
-
B ===
|
|
1275
|
+
B === m && (A.value = O);
|
|
1273
1276
|
} catch (O) {
|
|
1274
1277
|
c(O);
|
|
1275
1278
|
} finally {
|
|
1276
|
-
i && B ===
|
|
1279
|
+
i && B === m && (i.value = !1), w = !0;
|
|
1277
1280
|
}
|
|
1278
1281
|
}), s ? Nn(() => (l.value = !0, A.value)) : A;
|
|
1279
1282
|
}
|
|
@@ -1345,16 +1348,16 @@ var rs = { exports: {} };
|
|
|
1345
1348
|
},
|
|
1346
1349
|
function(n, r, s) {
|
|
1347
1350
|
function i(u) {
|
|
1348
|
-
return (i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
1349
|
-
return typeof
|
|
1350
|
-
} : function(
|
|
1351
|
-
return
|
|
1351
|
+
return (i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) {
|
|
1352
|
+
return typeof f;
|
|
1353
|
+
} : function(f) {
|
|
1354
|
+
return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f;
|
|
1352
1355
|
})(u);
|
|
1353
1356
|
}
|
|
1354
1357
|
function a(u) {
|
|
1355
|
-
var
|
|
1358
|
+
var f = "[object " + u + "]";
|
|
1356
1359
|
return function(g) {
|
|
1357
|
-
return Object.prototype.toString.call(g) ===
|
|
1360
|
+
return Object.prototype.toString.call(g) === f;
|
|
1358
1361
|
};
|
|
1359
1362
|
}
|
|
1360
1363
|
s.r(r), s.d(r, "default", function() {
|
|
@@ -1365,99 +1368,99 @@ var rs = { exports: {} };
|
|
|
1365
1368
|
return q;
|
|
1366
1369
|
});
|
|
1367
1370
|
var c = a("Array"), l = a("Object"), A = a("Function");
|
|
1368
|
-
function
|
|
1369
|
-
return A(u.get) ? u.get(
|
|
1371
|
+
function m(u, f) {
|
|
1372
|
+
return A(u.get) ? u.get(f) : u[f];
|
|
1370
1373
|
}
|
|
1371
1374
|
function p(u) {
|
|
1372
|
-
return function(
|
|
1373
|
-
if (!c(g) || !g.length) return u(
|
|
1375
|
+
return function(f, g) {
|
|
1376
|
+
if (!c(g) || !g.length) return u(f, g);
|
|
1374
1377
|
for (var y = 0, b = g.length; y < b; y++)
|
|
1375
|
-
if (u(
|
|
1378
|
+
if (u(f, m(g, y))) return !0;
|
|
1376
1379
|
return !1;
|
|
1377
1380
|
};
|
|
1378
1381
|
}
|
|
1379
1382
|
function B(u) {
|
|
1380
|
-
return function(
|
|
1381
|
-
if (!c(g) || !g.length) return u(
|
|
1383
|
+
return function(f, g) {
|
|
1384
|
+
if (!c(g) || !g.length) return u(f, g);
|
|
1382
1385
|
for (var y = 0, b = g.length; y < b; y++)
|
|
1383
|
-
if (!u(
|
|
1386
|
+
if (!u(f, m(g, y))) return !1;
|
|
1384
1387
|
return !0;
|
|
1385
1388
|
};
|
|
1386
1389
|
}
|
|
1387
|
-
function
|
|
1388
|
-
return u.validate(u.options,
|
|
1390
|
+
function w(u, f, g, y) {
|
|
1391
|
+
return u.validate(u.options, f, g, y);
|
|
1389
1392
|
}
|
|
1390
1393
|
var O = {
|
|
1391
|
-
$eq: p(function(u,
|
|
1392
|
-
return u(
|
|
1394
|
+
$eq: p(function(u, f) {
|
|
1395
|
+
return u(f);
|
|
1393
1396
|
}),
|
|
1394
|
-
$ne: B(function(u,
|
|
1395
|
-
return u(
|
|
1397
|
+
$ne: B(function(u, f) {
|
|
1398
|
+
return u(f);
|
|
1396
1399
|
}),
|
|
1397
|
-
$gt: p(function(u,
|
|
1398
|
-
return u(
|
|
1400
|
+
$gt: p(function(u, f) {
|
|
1401
|
+
return u(f);
|
|
1399
1402
|
}),
|
|
1400
|
-
$gte: p(function(u,
|
|
1401
|
-
return u(
|
|
1403
|
+
$gte: p(function(u, f) {
|
|
1404
|
+
return u(f);
|
|
1402
1405
|
}),
|
|
1403
|
-
$lt: p(function(u,
|
|
1404
|
-
return u(
|
|
1406
|
+
$lt: p(function(u, f) {
|
|
1407
|
+
return u(f);
|
|
1405
1408
|
}),
|
|
1406
|
-
$lte: p(function(u,
|
|
1407
|
-
return u(
|
|
1409
|
+
$lte: p(function(u, f) {
|
|
1410
|
+
return u(f);
|
|
1408
1411
|
}),
|
|
1409
|
-
$mod: p(function(u,
|
|
1410
|
-
return u(
|
|
1412
|
+
$mod: p(function(u, f) {
|
|
1413
|
+
return u(f);
|
|
1411
1414
|
}),
|
|
1412
|
-
$in: function(u,
|
|
1413
|
-
return u(
|
|
1415
|
+
$in: function(u, f) {
|
|
1416
|
+
return u(f);
|
|
1414
1417
|
},
|
|
1415
|
-
$nin: function(u,
|
|
1416
|
-
return u(
|
|
1418
|
+
$nin: function(u, f) {
|
|
1419
|
+
return u(f);
|
|
1417
1420
|
},
|
|
1418
|
-
$not: function(u,
|
|
1419
|
-
return u(
|
|
1421
|
+
$not: function(u, f, g, y) {
|
|
1422
|
+
return u(f, g, y);
|
|
1420
1423
|
},
|
|
1421
|
-
$type: function(u,
|
|
1422
|
-
return u(
|
|
1424
|
+
$type: function(u, f) {
|
|
1425
|
+
return u(f);
|
|
1423
1426
|
},
|
|
1424
|
-
$all: function(u,
|
|
1425
|
-
return O.$and(u,
|
|
1427
|
+
$all: function(u, f, g, y) {
|
|
1428
|
+
return O.$and(u, f, g, y);
|
|
1426
1429
|
},
|
|
1427
|
-
$size: function(u,
|
|
1428
|
-
return !!
|
|
1430
|
+
$size: function(u, f) {
|
|
1431
|
+
return !!f && u === f.length;
|
|
1429
1432
|
},
|
|
1430
|
-
$or: function(u,
|
|
1433
|
+
$or: function(u, f, g, y) {
|
|
1431
1434
|
for (var b = 0, E = u.length; b < E; b++)
|
|
1432
|
-
if (
|
|
1435
|
+
if (w(m(u, b), f, g, y)) return !0;
|
|
1433
1436
|
return !1;
|
|
1434
1437
|
},
|
|
1435
|
-
$nor: function(u,
|
|
1436
|
-
return !O.$or(u,
|
|
1438
|
+
$nor: function(u, f, g, y) {
|
|
1439
|
+
return !O.$or(u, f, g, y);
|
|
1437
1440
|
},
|
|
1438
|
-
$and: function(u,
|
|
1441
|
+
$and: function(u, f, g, y) {
|
|
1439
1442
|
for (var b = 0, E = u.length; b < E; b++)
|
|
1440
|
-
if (!
|
|
1443
|
+
if (!w(m(u, b), f, g, y)) return !1;
|
|
1441
1444
|
return !0;
|
|
1442
1445
|
},
|
|
1443
|
-
$regex: p(function(u,
|
|
1444
|
-
return typeof
|
|
1446
|
+
$regex: p(function(u, f) {
|
|
1447
|
+
return typeof f == "string" && u.test(f);
|
|
1445
1448
|
}),
|
|
1446
|
-
$where: function(u,
|
|
1447
|
-
return u.call(
|
|
1449
|
+
$where: function(u, f, g, y) {
|
|
1450
|
+
return u.call(f, f, g, y);
|
|
1448
1451
|
},
|
|
1449
|
-
$elemMatch: function(u,
|
|
1450
|
-
return c(
|
|
1452
|
+
$elemMatch: function(u, f, g, y) {
|
|
1453
|
+
return c(f) ? !!~function(b, E) {
|
|
1451
1454
|
for (var P = 0; P < b.length; P++)
|
|
1452
|
-
if (
|
|
1455
|
+
if (m(b, P), w(E, m(b, P))) return P;
|
|
1453
1456
|
return -1;
|
|
1454
|
-
}(
|
|
1457
|
+
}(f, u) : w(u, f, g, y);
|
|
1455
1458
|
},
|
|
1456
|
-
$exists: function(u,
|
|
1459
|
+
$exists: function(u, f, g, y) {
|
|
1457
1460
|
return y.hasOwnProperty(g) === u;
|
|
1458
1461
|
}
|
|
1459
1462
|
}, I = {
|
|
1460
|
-
$eq: function(u,
|
|
1463
|
+
$eq: function(u, f, g) {
|
|
1461
1464
|
var y = g.comparable, b = g.compare;
|
|
1462
1465
|
return u instanceof RegExp ? p(function(E) {
|
|
1463
1466
|
return typeof E == "string" && u.test(E);
|
|
@@ -1471,31 +1474,31 @@ var rs = { exports: {} };
|
|
|
1471
1474
|
}
|
|
1472
1475
|
);
|
|
1473
1476
|
},
|
|
1474
|
-
$gt: function(u,
|
|
1477
|
+
$gt: function(u, f, g) {
|
|
1475
1478
|
var y = g.comparable, b = g.compare;
|
|
1476
1479
|
return function(E) {
|
|
1477
1480
|
return b(y(E), y(u)) > 0;
|
|
1478
1481
|
};
|
|
1479
1482
|
},
|
|
1480
|
-
$gte: function(u,
|
|
1483
|
+
$gte: function(u, f, g) {
|
|
1481
1484
|
var y = g.comparable, b = g.compare;
|
|
1482
1485
|
return function(E) {
|
|
1483
1486
|
return b(y(E), y(u)) >= 0;
|
|
1484
1487
|
};
|
|
1485
1488
|
},
|
|
1486
|
-
$lt: function(u,
|
|
1489
|
+
$lt: function(u, f, g) {
|
|
1487
1490
|
var y = g.comparable, b = g.compare;
|
|
1488
1491
|
return function(E) {
|
|
1489
1492
|
return b(y(E), y(u)) < 0;
|
|
1490
1493
|
};
|
|
1491
1494
|
},
|
|
1492
|
-
$lte: function(u,
|
|
1495
|
+
$lte: function(u, f, g) {
|
|
1493
1496
|
var y = g.comparable, b = g.compare;
|
|
1494
1497
|
return function(E) {
|
|
1495
1498
|
return b(y(E), y(u)) <= 0;
|
|
1496
1499
|
};
|
|
1497
1500
|
},
|
|
1498
|
-
$in: function(u,
|
|
1501
|
+
$in: function(u, f, g) {
|
|
1499
1502
|
var y = g.comparable;
|
|
1500
1503
|
return function(b) {
|
|
1501
1504
|
if (!(b instanceof Array)) {
|
|
@@ -1509,59 +1512,59 @@ var rs = { exports: {} };
|
|
|
1509
1512
|
for (j = u.length; j--; ) if (u[j] == null) return !0;
|
|
1510
1513
|
}
|
|
1511
1514
|
for (j = u.length; j--; ) {
|
|
1512
|
-
var P =
|
|
1515
|
+
var P = w(H(m(u, j), g), E, j, u);
|
|
1513
1516
|
if (P && String(P) !== "[object Object]" && String(E) !== "[object Object]")
|
|
1514
1517
|
return !0;
|
|
1515
1518
|
}
|
|
1516
1519
|
return !!~u.indexOf(E);
|
|
1517
1520
|
}
|
|
1518
1521
|
for (var j = b.length; j--; )
|
|
1519
|
-
if (~u.indexOf(y(
|
|
1522
|
+
if (~u.indexOf(y(m(b, j)))) return !0;
|
|
1520
1523
|
return !1;
|
|
1521
1524
|
};
|
|
1522
1525
|
},
|
|
1523
|
-
$nin: function(u,
|
|
1524
|
-
var y = I.$in(u,
|
|
1526
|
+
$nin: function(u, f, g) {
|
|
1527
|
+
var y = I.$in(u, f, g);
|
|
1525
1528
|
return function(b, E, P, j) {
|
|
1526
1529
|
return !y(b, E, P, j);
|
|
1527
1530
|
};
|
|
1528
1531
|
},
|
|
1529
1532
|
$mod: function(u) {
|
|
1530
|
-
return function(
|
|
1531
|
-
return
|
|
1533
|
+
return function(f) {
|
|
1534
|
+
return f % u[0] == u[1];
|
|
1532
1535
|
};
|
|
1533
1536
|
},
|
|
1534
|
-
$ne: function(u,
|
|
1535
|
-
var y = I.$eq(u,
|
|
1537
|
+
$ne: function(u, f, g) {
|
|
1538
|
+
var y = I.$eq(u, f, g);
|
|
1536
1539
|
return B(function(b, E, P, j) {
|
|
1537
1540
|
return !y(b, E, P, j);
|
|
1538
1541
|
});
|
|
1539
1542
|
},
|
|
1540
|
-
$and: function(u,
|
|
1543
|
+
$and: function(u, f, g) {
|
|
1541
1544
|
return u.map(Y(g));
|
|
1542
1545
|
},
|
|
1543
|
-
$all: function(u,
|
|
1544
|
-
return I.$and(u,
|
|
1546
|
+
$all: function(u, f, g) {
|
|
1547
|
+
return I.$and(u, f, g);
|
|
1545
1548
|
},
|
|
1546
|
-
$or: function(u,
|
|
1549
|
+
$or: function(u, f, g) {
|
|
1547
1550
|
return u.map(Y(g));
|
|
1548
1551
|
},
|
|
1549
|
-
$nor: function(u,
|
|
1552
|
+
$nor: function(u, f, g) {
|
|
1550
1553
|
return u.map(Y(g));
|
|
1551
1554
|
},
|
|
1552
|
-
$not: function(u,
|
|
1555
|
+
$not: function(u, f, g) {
|
|
1553
1556
|
var y = Y(g)(u);
|
|
1554
1557
|
return function(b, E, P) {
|
|
1555
|
-
return !
|
|
1558
|
+
return !w(y, b, E, P);
|
|
1556
1559
|
};
|
|
1557
1560
|
},
|
|
1558
1561
|
$type: function(u) {
|
|
1559
|
-
return function(
|
|
1560
|
-
return
|
|
1562
|
+
return function(f, g, y) {
|
|
1563
|
+
return f != null && (f instanceof u || f.constructor == u);
|
|
1561
1564
|
};
|
|
1562
1565
|
},
|
|
1563
|
-
$regex: function(u,
|
|
1564
|
-
return new RegExp(u,
|
|
1566
|
+
$regex: function(u, f) {
|
|
1567
|
+
return new RegExp(u, f.$options);
|
|
1565
1568
|
},
|
|
1566
1569
|
$where: function(u) {
|
|
1567
1570
|
if (typeof u == "function") return u;
|
|
@@ -1569,55 +1572,55 @@ var rs = { exports: {} };
|
|
|
1569
1572
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
1570
1573
|
);
|
|
1571
1574
|
},
|
|
1572
|
-
$elemMatch: function(u,
|
|
1575
|
+
$elemMatch: function(u, f, g) {
|
|
1573
1576
|
return Y(g)(u);
|
|
1574
1577
|
},
|
|
1575
1578
|
$exists: function(u) {
|
|
1576
1579
|
return !!u;
|
|
1577
1580
|
}
|
|
1578
1581
|
};
|
|
1579
|
-
function V(u,
|
|
1580
|
-
return { options: u, validate:
|
|
1582
|
+
function V(u, f) {
|
|
1583
|
+
return { options: u, validate: f };
|
|
1581
1584
|
}
|
|
1582
|
-
function R(u,
|
|
1585
|
+
function R(u, f) {
|
|
1583
1586
|
var g = u.keyPath, y = u.child, b = u.query, E = [];
|
|
1584
|
-
if (function tr(Ce,
|
|
1585
|
-
if (gt ===
|
|
1586
|
-
return void ln.push([Ce,
|
|
1587
|
-
var nr =
|
|
1587
|
+
if (function tr(Ce, mt, gt, Fi, ln) {
|
|
1588
|
+
if (gt === mt.length || Ce == null)
|
|
1589
|
+
return void ln.push([Ce, mt[gt - 1], Fi]);
|
|
1590
|
+
var nr = m(mt, gt);
|
|
1588
1591
|
if (c(Ce) && isNaN(Number(nr)))
|
|
1589
|
-
for (var An = 0, ki = Ce.length; An < ki; An++) tr(
|
|
1590
|
-
else tr(
|
|
1591
|
-
}(
|
|
1592
|
+
for (var An = 0, ki = Ce.length; An < ki; An++) tr(m(Ce, An), mt, gt, Ce, ln);
|
|
1593
|
+
else tr(m(Ce, nr), mt, gt + 1, Ce, ln);
|
|
1594
|
+
}(f, g, 0, f, E), E.length === 1) {
|
|
1592
1595
|
var P = E[0];
|
|
1593
|
-
return
|
|
1596
|
+
return w(y, P[0], P[1], P[2]);
|
|
1594
1597
|
}
|
|
1595
1598
|
for (var j = b && b.$ne !== void 0, W = j, _ = 0; _ < E.length; _++) {
|
|
1596
|
-
var he = E[_],
|
|
1597
|
-
j ? W &=
|
|
1599
|
+
var he = E[_], Vt = w(y, he[0], he[1], he[2]);
|
|
1600
|
+
j ? W &= Vt : W |= Vt;
|
|
1598
1601
|
}
|
|
1599
1602
|
return W;
|
|
1600
1603
|
}
|
|
1601
|
-
function Q(u,
|
|
1602
|
-
return V({ keyPath: u, child:
|
|
1604
|
+
function Q(u, f, g) {
|
|
1605
|
+
return V({ keyPath: u, child: f, query: g }, R);
|
|
1603
1606
|
}
|
|
1604
1607
|
function Y(u) {
|
|
1605
|
-
var
|
|
1608
|
+
var f = u.comparable, g = u.expressions, y = function(P) {
|
|
1606
1609
|
var j;
|
|
1607
1610
|
return (!P || !(j = P) || j.constructor !== Object && j.constructor !== Array && j.constructor.toString() !== "function Object() { [native code] }" && j.constructor.toString() !== "function Array() { [native code] }" || j.toJSON) && (P = { $eq: P }), P;
|
|
1608
1611
|
}, b = function(P) {
|
|
1609
|
-
P =
|
|
1612
|
+
P = f(P);
|
|
1610
1613
|
var j = [];
|
|
1611
1614
|
for (var W in P) {
|
|
1612
1615
|
var _ = P[W];
|
|
1613
1616
|
if (W !== "$options") {
|
|
1614
1617
|
var he = O[W] || u && g && g[W];
|
|
1615
|
-
if (he) I[W] && (_ = I[W](_, P, u)), j.push(V(
|
|
1618
|
+
if (he) I[W] && (_ = I[W](_, P, u)), j.push(V(f(_), he));
|
|
1616
1619
|
else {
|
|
1617
1620
|
if (W.charCodeAt(0) === 36)
|
|
1618
1621
|
throw new Error("Unknown operation " + W);
|
|
1619
|
-
var
|
|
1620
|
-
j.push(Q(
|
|
1622
|
+
var Vt = W.split(".");
|
|
1623
|
+
j.push(Q(Vt, E(_), _));
|
|
1621
1624
|
}
|
|
1622
1625
|
}
|
|
1623
1626
|
}
|
|
@@ -1627,48 +1630,48 @@ var rs = { exports: {} };
|
|
|
1627
1630
|
if (!l(W)) return _;
|
|
1628
1631
|
for (var he in W) _.push(he), j(W[he], _);
|
|
1629
1632
|
return _;
|
|
1630
|
-
}(P, []).join(",").search(/[$.]/) === -1 ? V(P,
|
|
1633
|
+
}(P, []).join(",").search(/[$.]/) === -1 ? V(P, v) : b(P);
|
|
1631
1634
|
};
|
|
1632
1635
|
return function(P) {
|
|
1633
1636
|
return b(y(P));
|
|
1634
1637
|
};
|
|
1635
1638
|
}
|
|
1636
|
-
function
|
|
1637
|
-
if (Object.prototype.toString.call(u) !== Object.prototype.toString.call(
|
|
1639
|
+
function v(u, f) {
|
|
1640
|
+
if (Object.prototype.toString.call(u) !== Object.prototype.toString.call(f))
|
|
1638
1641
|
return !1;
|
|
1639
1642
|
if (l(u)) {
|
|
1640
|
-
if (Object.keys(u).length !== Object.keys(
|
|
1641
|
-
for (var g in u) if (!
|
|
1643
|
+
if (Object.keys(u).length !== Object.keys(f).length) return !1;
|
|
1644
|
+
for (var g in u) if (!v(u[g], f[g])) return !1;
|
|
1642
1645
|
return !0;
|
|
1643
1646
|
}
|
|
1644
1647
|
if (c(u)) {
|
|
1645
|
-
if (u.length !==
|
|
1648
|
+
if (u.length !== f.length) return !1;
|
|
1646
1649
|
for (var y = 0, b = u.length; y < b; y++)
|
|
1647
|
-
if (!
|
|
1650
|
+
if (!v(u[y], f[y])) return !1;
|
|
1648
1651
|
return !0;
|
|
1649
1652
|
}
|
|
1650
|
-
return u ===
|
|
1653
|
+
return u === f;
|
|
1651
1654
|
}
|
|
1652
|
-
function H(u,
|
|
1653
|
-
var g = Y(
|
|
1654
|
-
return
|
|
1655
|
+
function H(u, f) {
|
|
1656
|
+
var g = Y(f)(u);
|
|
1657
|
+
return f && f.select && (g = {
|
|
1655
1658
|
options: g,
|
|
1656
1659
|
validate: function(y, b, E, P) {
|
|
1657
|
-
return
|
|
1660
|
+
return w(y, b && f.select(b), E, P);
|
|
1658
1661
|
}
|
|
1659
1662
|
}), g;
|
|
1660
1663
|
}
|
|
1661
|
-
function U(u,
|
|
1662
|
-
var g = H(u,
|
|
1664
|
+
function U(u, f) {
|
|
1665
|
+
var g = H(u, f = Object.assign({ compare: ee, comparable: q }, f));
|
|
1663
1666
|
return function(y, b, E) {
|
|
1664
|
-
return
|
|
1667
|
+
return w(g, y, b, E);
|
|
1665
1668
|
};
|
|
1666
1669
|
}
|
|
1667
|
-
function ee(u,
|
|
1668
|
-
if (
|
|
1669
|
-
if (i(u) === i(
|
|
1670
|
-
if (u >
|
|
1671
|
-
if (u <
|
|
1670
|
+
function ee(u, f) {
|
|
1671
|
+
if (v(u, f)) return 0;
|
|
1672
|
+
if (i(u) === i(f)) {
|
|
1673
|
+
if (u > f) return 1;
|
|
1674
|
+
if (u < f) return -1;
|
|
1672
1675
|
}
|
|
1673
1676
|
}
|
|
1674
1677
|
function q(u) {
|
|
@@ -1686,21 +1689,21 @@ function ha(t, e) {
|
|
|
1686
1689
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
1687
1690
|
}
|
|
1688
1691
|
}
|
|
1689
|
-
function
|
|
1692
|
+
function fa(t, e, n) {
|
|
1690
1693
|
return e && ha(t.prototype, e), t;
|
|
1691
1694
|
}
|
|
1692
|
-
function
|
|
1695
|
+
function ma(t, e) {
|
|
1693
1696
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
|
|
1694
1697
|
}
|
|
1695
|
-
function
|
|
1696
|
-
return
|
|
1698
|
+
function wn(t) {
|
|
1699
|
+
return wn = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
|
|
1697
1700
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
1698
|
-
},
|
|
1701
|
+
}, wn(t);
|
|
1699
1702
|
}
|
|
1700
|
-
function
|
|
1701
|
-
return
|
|
1703
|
+
function Ut(t, e) {
|
|
1704
|
+
return Ut = Object.setPrototypeOf || function(r, s) {
|
|
1702
1705
|
return r.__proto__ = s, r;
|
|
1703
|
-
},
|
|
1706
|
+
}, Ut(t, e);
|
|
1704
1707
|
}
|
|
1705
1708
|
function ga() {
|
|
1706
1709
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
@@ -1712,13 +1715,13 @@ function ga() {
|
|
|
1712
1715
|
return !1;
|
|
1713
1716
|
}
|
|
1714
1717
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return ga() ?
|
|
1718
|
+
function qt(t, e, n) {
|
|
1719
|
+
return ga() ? qt = Reflect.construct : qt = function(s, i, a) {
|
|
1717
1720
|
var c = [null];
|
|
1718
1721
|
c.push.apply(c, i);
|
|
1719
1722
|
var l = Function.bind.apply(s, c), A = new l();
|
|
1720
|
-
return a &&
|
|
1721
|
-
},
|
|
1723
|
+
return a && Ut(A, a.prototype), A;
|
|
1724
|
+
}, qt.apply(null, arguments);
|
|
1722
1725
|
}
|
|
1723
1726
|
function pa(t) {
|
|
1724
1727
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
@@ -1734,7 +1737,7 @@ function Bn(t) {
|
|
|
1734
1737
|
e.set(r, s);
|
|
1735
1738
|
}
|
|
1736
1739
|
function s() {
|
|
1737
|
-
return
|
|
1740
|
+
return qt(r, arguments, wn(this).constructor);
|
|
1738
1741
|
}
|
|
1739
1742
|
return s.prototype = Object.create(r.prototype, {
|
|
1740
1743
|
constructor: {
|
|
@@ -1743,7 +1746,7 @@ function Bn(t) {
|
|
|
1743
1746
|
writable: !0,
|
|
1744
1747
|
configurable: !0
|
|
1745
1748
|
}
|
|
1746
|
-
}),
|
|
1749
|
+
}), Ut(s, r);
|
|
1747
1750
|
}, Bn(t);
|
|
1748
1751
|
}
|
|
1749
1752
|
function ir(t) {
|
|
@@ -1753,9 +1756,9 @@ function ir(t) {
|
|
|
1753
1756
|
}
|
|
1754
1757
|
var ss = function(e) {
|
|
1755
1758
|
return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
|
|
1756
|
-
},
|
|
1757
|
-
|
|
1758
|
-
s === null ?
|
|
1759
|
+
}, Ft = ss, ya = /* @__PURE__ */ function(t) {
|
|
1760
|
+
ma(e, t), e.setDefaultMessage = function(s) {
|
|
1761
|
+
s === null ? Ft = ss : Ft = typeof s == "string" ? function() {
|
|
1759
1762
|
return s;
|
|
1760
1763
|
} : s;
|
|
1761
1764
|
}, e.from = function(s) {
|
|
@@ -1766,7 +1769,7 @@ var ss = function(e) {
|
|
|
1766
1769
|
};
|
|
1767
1770
|
function e(r, s) {
|
|
1768
1771
|
var i;
|
|
1769
|
-
return s === void 0 && (s = {}), i = t.call(this, r) || this, i._setMetadata(s), i.message = r ||
|
|
1772
|
+
return s === void 0 && (s = {}), i = t.call(this, r) || this, i._setMetadata(s), i.message = r || Ft(ir(i)), i._customMessage = null, typeof Error.captureStackTrace == "function" && (i.name = i.constructor.name, Error.captureStackTrace(ir(i), i.constructor)), i;
|
|
1770
1773
|
}
|
|
1771
1774
|
var n = e.prototype;
|
|
1772
1775
|
return n.setMessage = function(s) {
|
|
@@ -1783,7 +1786,7 @@ var ss = function(e) {
|
|
|
1783
1786
|
subjectName: this.ability.subjectName(i)
|
|
1784
1787
|
});
|
|
1785
1788
|
var l = c ? c.reason : "";
|
|
1786
|
-
throw this.message = this._customMessage || l ||
|
|
1789
|
+
throw this.message = this._customMessage || l || Ft(this), this;
|
|
1787
1790
|
}
|
|
1788
1791
|
}, n._setMetadata = function(s) {
|
|
1789
1792
|
this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
|
|
@@ -1798,10 +1801,10 @@ function ba(t) {
|
|
|
1798
1801
|
var e = typeof t == "object" ? t.constructor : t;
|
|
1799
1802
|
return e.modelName || e.name;
|
|
1800
1803
|
}
|
|
1801
|
-
function
|
|
1804
|
+
function va(t) {
|
|
1802
1805
|
return JSON.parse(JSON.stringify(t));
|
|
1803
1806
|
}
|
|
1804
|
-
var
|
|
1807
|
+
var wa = /[-/\\^$+?.()|[\]{}]/g, Ba = /\.?\*+\.?/g, Da = /\*+/, Ca = /\./g;
|
|
1805
1808
|
function Ea(t, e, n) {
|
|
1806
1809
|
var r = n[0] === "*" || t[0] === "." && t[t.length - 1] === "." ? "+" : "*", s = t.indexOf("**") === -1 ? "[^.]" : ".", i = t.replace(Ca, "\\$&").replace(Da, s + r);
|
|
1807
1810
|
return e + t.length === n.length ? "(?:" + i + ")?" : i;
|
|
@@ -1811,7 +1814,7 @@ function Ma(t, e, n) {
|
|
|
1811
1814
|
}
|
|
1812
1815
|
function Ia(t) {
|
|
1813
1816
|
var e = t.map(function(r) {
|
|
1814
|
-
return r.replace(
|
|
1817
|
+
return r.replace(wa, Ma).replace(Ba, Ea);
|
|
1815
1818
|
}), n = e.length > 1 ? "(?:" + e.join("|") + ")" : e[0];
|
|
1816
1819
|
return new RegExp("^" + n + "$");
|
|
1817
1820
|
}
|
|
@@ -1856,7 +1859,7 @@ var Oa = /* @__PURE__ */ function() {
|
|
|
1856
1859
|
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
1857
1860
|
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
1858
1861
|
events: {},
|
|
1859
|
-
aliases:
|
|
1862
|
+
aliases: va(ar)
|
|
1860
1863
|
}, this.update(n);
|
|
1861
1864
|
}
|
|
1862
1865
|
var e = t.prototype;
|
|
@@ -1872,13 +1875,13 @@ var Oa = /* @__PURE__ */ function() {
|
|
|
1872
1875
|
return process.env.NODE_ENV !== "production" && i.isAllInverted && r.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[te].indexedRules = i.rules, this[te].hasPerFieldRules = i.hasPerFieldRules, this.emit("updated", s), this;
|
|
1873
1876
|
}, e.buildIndexFor = function(r) {
|
|
1874
1877
|
for (var s = /* @__PURE__ */ Object.create(null), i = this[te].RuleType, a = !0, c = !1, l = 0; l < r.length; l++) {
|
|
1875
|
-
var A = new i(r[l]),
|
|
1878
|
+
var A = new i(r[l]), m = this.expandActions(A.actions), p = Dn(A.subject), B = r.length - l - 1;
|
|
1876
1879
|
a = !!(a && A.inverted), !c && A.fields && (c = !0);
|
|
1877
|
-
for (var
|
|
1878
|
-
var O = p[
|
|
1880
|
+
for (var w = 0; w < p.length; w++) {
|
|
1881
|
+
var O = p[w];
|
|
1879
1882
|
s[O] = s[O] || /* @__PURE__ */ Object.create(null);
|
|
1880
|
-
for (var I = 0; I <
|
|
1881
|
-
var V =
|
|
1883
|
+
for (var I = 0; I < m.length; I++) {
|
|
1884
|
+
var V = m[I];
|
|
1882
1885
|
s[O][V] = s[O][V] || /* @__PURE__ */ Object.create(null), s[O][V][B] = A;
|
|
1883
1886
|
}
|
|
1884
1887
|
}
|
|
@@ -1939,7 +1942,7 @@ var Oa = /* @__PURE__ */ function() {
|
|
|
1939
1942
|
i && i.slice(0).forEach(function(a) {
|
|
1940
1943
|
return a(s);
|
|
1941
1944
|
});
|
|
1942
|
-
},
|
|
1945
|
+
}, fa(t, [{
|
|
1943
1946
|
key: "rules",
|
|
1944
1947
|
get: function() {
|
|
1945
1948
|
return this[te].originalRules;
|
|
@@ -1979,9 +1982,9 @@ function Va(t) {
|
|
|
1979
1982
|
return new Oa(Ya(t));
|
|
1980
1983
|
}
|
|
1981
1984
|
function xa(t, e, n) {
|
|
1982
|
-
const r = Array.isArray(t) ? t : [t], s = Va(e), i = (
|
|
1985
|
+
const r = Array.isArray(t) ? t : [t], s = Va(e), i = (m) => m.subject, a = (m) => s.can(m.action, i(m), m.field) ? !0 : m.coverSubject !== void 0 ? s.can(m.action, m.coverSubject, m.field) : !1, c = r.find((m) => !a(m));
|
|
1983
1986
|
if (c) {
|
|
1984
|
-
const
|
|
1987
|
+
const m = s.relevantRuleFor(
|
|
1985
1988
|
c.action,
|
|
1986
1989
|
i(c),
|
|
1987
1990
|
c.field
|
|
@@ -1989,7 +1992,7 @@ function xa(t, e, n) {
|
|
|
1989
1992
|
return {
|
|
1990
1993
|
granted: !1,
|
|
1991
1994
|
decisivePermission: c,
|
|
1992
|
-
decisiveRule:
|
|
1995
|
+
decisiveRule: m ?? null
|
|
1993
1996
|
};
|
|
1994
1997
|
}
|
|
1995
1998
|
const l = r[0], A = s.relevantRuleFor(l.action, i(l), l.field);
|
|
@@ -2039,7 +2042,7 @@ async function ka(t, e) {
|
|
|
2039
2042
|
}
|
|
2040
2043
|
var Cn = /* @__PURE__ */ ((t) => (t.Loading = "loading", t.Allowed = "allowed", t.Denied = "denied", t))(Cn || {});
|
|
2041
2044
|
function Ra() {
|
|
2042
|
-
const t = ts(), { sessionUser: e } =
|
|
2045
|
+
const t = ts(), { sessionUser: e } = rn();
|
|
2043
2046
|
return ca(
|
|
2044
2047
|
async () => {
|
|
2045
2048
|
t.matched;
|
|
@@ -2078,7 +2081,7 @@ const qa = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
2078
2081
|
subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
|
|
2079
2082
|
}, za = {
|
|
2080
2083
|
noPermission: Wa
|
|
2081
|
-
}, Za = { class: "w-full h-full flex justify-center items-center" }, La = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Ka = { class: "w-[300px] h-[300px]" }, Ja = ["src"], _a = { class: "text-2xl" }, $a = { class: "text-xl" }, eo = /* @__PURE__ */
|
|
2084
|
+
}, Za = { class: "w-full h-full flex justify-center items-center" }, La = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Ka = { class: "w-[300px] h-[300px]" }, Ja = ["src"], _a = { class: "text-2xl" }, $a = { class: "text-xl" }, eo = /* @__PURE__ */ tn({
|
|
2082
2085
|
__name: "NoPermission",
|
|
2083
2086
|
setup(t) {
|
|
2084
2087
|
const { t: e } = ns({
|
|
@@ -2089,7 +2092,7 @@ const qa = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
2089
2092
|
"th-TH": za
|
|
2090
2093
|
}
|
|
2091
2094
|
});
|
|
2092
|
-
return (n, r) => (
|
|
2095
|
+
return (n, r) => (nn(), Si("div", Za, [
|
|
2093
2096
|
Ke("div", La, [
|
|
2094
2097
|
Ke("div", Ka, [
|
|
2095
2098
|
Ke("img", {
|
|
@@ -2104,18 +2107,18 @@ const qa = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
2104
2107
|
])
|
|
2105
2108
|
]));
|
|
2106
2109
|
}
|
|
2107
|
-
}), to = /* @__PURE__ */
|
|
2110
|
+
}), to = /* @__PURE__ */ tn({
|
|
2108
2111
|
__name: "PermissionWrapper",
|
|
2109
2112
|
setup(t) {
|
|
2110
2113
|
const e = Ra();
|
|
2111
|
-
return (n, r) => ge(e) === ge(Cn).Denied ? (
|
|
2114
|
+
return (n, r) => ge(e) === ge(Cn).Denied ? (nn(), Hn(eo, { key: 0 })) : ge(e) === ge(Cn).Allowed ? Qi(n.$slots, "default", { key: 1 }) : Xi("", !0);
|
|
2112
2115
|
}
|
|
2113
2116
|
});
|
|
2114
2117
|
function os(t) {
|
|
2115
2118
|
return {
|
|
2116
2119
|
inheritAttrs: !1,
|
|
2117
2120
|
setup(e, { attrs: n }) {
|
|
2118
|
-
return () =>
|
|
2121
|
+
return () => vn(to, {}, { default: () => vn(t, n) });
|
|
2119
2122
|
}
|
|
2120
2123
|
};
|
|
2121
2124
|
}
|
|
@@ -2309,7 +2312,7 @@ const k = [
|
|
|
2309
2312
|
o.delete
|
|
2310
2313
|
]
|
|
2311
2314
|
}
|
|
2312
|
-
],
|
|
2315
|
+
], fo = [
|
|
2313
2316
|
...k,
|
|
2314
2317
|
{
|
|
2315
2318
|
label: "Credit",
|
|
@@ -2321,7 +2324,7 @@ const k = [
|
|
|
2321
2324
|
o.delete
|
|
2322
2325
|
]
|
|
2323
2326
|
}
|
|
2324
|
-
],
|
|
2327
|
+
], mo = [
|
|
2325
2328
|
...k,
|
|
2326
2329
|
{
|
|
2327
2330
|
label: "Experience",
|
|
@@ -2381,7 +2384,7 @@ const k = [
|
|
|
2381
2384
|
o.delete
|
|
2382
2385
|
]
|
|
2383
2386
|
}
|
|
2384
|
-
],
|
|
2387
|
+
], fs = [
|
|
2385
2388
|
...k,
|
|
2386
2389
|
{
|
|
2387
2390
|
label: "Loyalty Card",
|
|
@@ -2393,7 +2396,7 @@ const k = [
|
|
|
2393
2396
|
o.delete
|
|
2394
2397
|
]
|
|
2395
2398
|
}
|
|
2396
|
-
],
|
|
2399
|
+
], ms = [
|
|
2397
2400
|
...k,
|
|
2398
2401
|
{
|
|
2399
2402
|
label: "Bin",
|
|
@@ -2412,12 +2415,12 @@ const k = [
|
|
|
2412
2415
|
), bs = $(
|
|
2413
2416
|
se,
|
|
2414
2417
|
ho
|
|
2415
|
-
), ws = $(
|
|
2416
|
-
se,
|
|
2417
|
-
mo
|
|
2418
2418
|
), vs = $(
|
|
2419
2419
|
se,
|
|
2420
2420
|
fo
|
|
2421
|
+
), ws = $(
|
|
2422
|
+
se,
|
|
2423
|
+
mo
|
|
2421
2424
|
), Bs = $(
|
|
2422
2425
|
se,
|
|
2423
2426
|
go
|
|
@@ -2442,7 +2445,7 @@ const k = [
|
|
|
2442
2445
|
o.delete
|
|
2443
2446
|
]
|
|
2444
2447
|
}
|
|
2445
|
-
],
|
|
2448
|
+
], vo = [
|
|
2446
2449
|
...k,
|
|
2447
2450
|
{
|
|
2448
2451
|
label: "Membership",
|
|
@@ -2454,7 +2457,7 @@ const k = [
|
|
|
2454
2457
|
o.delete
|
|
2455
2458
|
]
|
|
2456
2459
|
}
|
|
2457
|
-
],
|
|
2460
|
+
], wo = $(
|
|
2458
2461
|
no,
|
|
2459
2462
|
ro,
|
|
2460
2463
|
cs,
|
|
@@ -2468,14 +2471,14 @@ const k = [
|
|
|
2468
2471
|
ps,
|
|
2469
2472
|
ys,
|
|
2470
2473
|
bs,
|
|
2471
|
-
ws,
|
|
2472
2474
|
vs,
|
|
2475
|
+
ws,
|
|
2473
2476
|
Bs,
|
|
2474
2477
|
Ds,
|
|
2475
2478
|
ds,
|
|
2476
2479
|
hs,
|
|
2477
|
-
|
|
2478
|
-
|
|
2480
|
+
fs,
|
|
2481
|
+
ms
|
|
2479
2482
|
), Bo = $(
|
|
2480
2483
|
se,
|
|
2481
2484
|
ls,
|
|
@@ -2483,11 +2486,11 @@ const k = [
|
|
|
2483
2486
|
), Do = $(
|
|
2484
2487
|
se,
|
|
2485
2488
|
bo
|
|
2486
|
-
), Co = $(
|
|
2489
|
+
), Co = $(vo), Eo = {
|
|
2487
2490
|
[`set_${d.crm}`]: {
|
|
2488
2491
|
key: "sys:crm:access",
|
|
2489
2492
|
name: "CRM Access",
|
|
2490
|
-
permissions:
|
|
2493
|
+
permissions: wo
|
|
2491
2494
|
},
|
|
2492
2495
|
[`set_${d.crm_promotion}`]: {
|
|
2493
2496
|
key: "sys:crm:promotion",
|
|
@@ -2532,12 +2535,12 @@ const k = [
|
|
|
2532
2535
|
[`set_${d.crm_credit}`]: {
|
|
2533
2536
|
key: "sys:crm:credit",
|
|
2534
2537
|
name: "CRM Credit",
|
|
2535
|
-
permissions:
|
|
2538
|
+
permissions: vs
|
|
2536
2539
|
},
|
|
2537
2540
|
[`set_${d.crm_experience}`]: {
|
|
2538
2541
|
key: "sys:crm:experience",
|
|
2539
2542
|
name: "CRM Experience",
|
|
2540
|
-
permissions:
|
|
2543
|
+
permissions: ws
|
|
2541
2544
|
},
|
|
2542
2545
|
[`set_${d.crm_game}`]: {
|
|
2543
2546
|
key: "sys:crm:game",
|
|
@@ -2562,7 +2565,7 @@ const k = [
|
|
|
2562
2565
|
[`set_${d.crm_loyaltyCard}`]: {
|
|
2563
2566
|
key: "sys:crm:loyaltyCard",
|
|
2564
2567
|
name: "CRM Loyalty Card",
|
|
2565
|
-
permissions:
|
|
2568
|
+
permissions: fs
|
|
2566
2569
|
},
|
|
2567
2570
|
[`set_${d.crm_referral}`]: {
|
|
2568
2571
|
key: "sys:crm:referral",
|
|
@@ -2587,7 +2590,7 @@ const k = [
|
|
|
2587
2590
|
[`set_${d.crm_bin}`]: {
|
|
2588
2591
|
key: "sys:crm:bin",
|
|
2589
2592
|
name: "CRM Bin",
|
|
2590
|
-
permissions:
|
|
2593
|
+
permissions: ms
|
|
2591
2594
|
}
|
|
2592
2595
|
};
|
|
2593
2596
|
var C = /* @__PURE__ */ ((t) => (t.inventory = "inventory", t.inventory_stock = "inventory::stock", t.inventory_stockAdjustment = "inventory::stockAdjustment", t.inventory_stockRecalculation = "inventory::stockRecalculation", t.inventory_unitCostHistory = "inventory::unitCostHistory", t.inventory_wastageTemplate = "inventory::wastageTemplate", t.inventory_closing = "inventory::closing", t.inventory_closingDraft = "inventory::closingDraft", t.inventory_closingTemplate = "inventory::closingTemplate", t.inventory_ingredient = "inventory::ingredient", t.inventory_ingredientGroup = "inventory::ingredientGroup", t.inventory_recipe = "inventory::recipe", t.inventory_unit = "inventory::unit", t.inventory_orderTemplate = "inventory::orderTemplate", t.inventory_orderDraft = "inventory::orderDraft", t.inventory_printTemplate = "inventory::printTemplate", t.inventory_purchaseOrder = "inventory::purchaseOrder", t.inventory_transferOutApproval = "inventory::transferOutApproval", t.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", t.inventory_surcharge = "inventory::surcharge", t.inventory_supplier = "inventory::supplier", t.inventory_warehouse = "inventory::warehouse", t.inventory_publish = "inventory::publish", t.inventory_integration = "inventory::integration", t.inventory_deliveryOrder = "inventory::deliveryOrder", t.inventory_shipment = "inventory::shipment", t.inventory_orderDraftApproval = "inventory::orderDraftApproval", t))(C || {});
|
|
@@ -3160,7 +3163,7 @@ const Ho = () => ({
|
|
|
3160
3163
|
sidebarDisplay: "Restaurants",
|
|
3161
3164
|
section: "payment-gateway"
|
|
3162
3165
|
},
|
|
3163
|
-
component: () => import("./Restaurant-
|
|
3166
|
+
component: () => import("./Restaurant-BLLbK64j.js")
|
|
3164
3167
|
},
|
|
3165
3168
|
{
|
|
3166
3169
|
path: "/admin/restaurants/:restaurantId",
|
|
@@ -3169,7 +3172,7 @@ const Ho = () => ({
|
|
|
3169
3172
|
meta: {
|
|
3170
3173
|
parent: "mf-payment-admin.restaurant"
|
|
3171
3174
|
},
|
|
3172
|
-
component: () => import("./RestaurantSetting-
|
|
3175
|
+
component: () => import("./RestaurantSetting-BC_sm9bJ.js")
|
|
3173
3176
|
},
|
|
3174
3177
|
{
|
|
3175
3178
|
path: "/admin/payout-accounts",
|
|
@@ -3178,7 +3181,7 @@ const Ho = () => ({
|
|
|
3178
3181
|
sidebarDisplay: "Payout Accounts",
|
|
3179
3182
|
section: "payment-gateway"
|
|
3180
3183
|
},
|
|
3181
|
-
component: () => import("./PayoutAccount-
|
|
3184
|
+
component: () => import("./PayoutAccount-Q0bzSdXR.js")
|
|
3182
3185
|
},
|
|
3183
3186
|
{
|
|
3184
3187
|
path: "/admin/payout-accounts/:accountId",
|
|
@@ -3187,7 +3190,7 @@ const Ho = () => ({
|
|
|
3187
3190
|
meta: {
|
|
3188
3191
|
parent: "mf-payment-admin.payout-account"
|
|
3189
3192
|
},
|
|
3190
|
-
component: () => import("./PayoutAccountSetting-
|
|
3193
|
+
component: () => import("./PayoutAccountSetting-CZqZdZyS.js")
|
|
3191
3194
|
},
|
|
3192
3195
|
{
|
|
3193
3196
|
path: "/admin/onboarding",
|
|
@@ -3196,7 +3199,7 @@ const Ho = () => ({
|
|
|
3196
3199
|
sidebarDisplay: "Payment Onboarding",
|
|
3197
3200
|
section: "payment-gateway"
|
|
3198
3201
|
},
|
|
3199
|
-
component: () => import("./OnboardSubmission-
|
|
3202
|
+
component: () => import("./OnboardSubmission-BeWkvADJ.js")
|
|
3200
3203
|
},
|
|
3201
3204
|
{
|
|
3202
3205
|
path: "/admin/onboarding/:submissionId",
|
|
@@ -3205,7 +3208,7 @@ const Ho = () => ({
|
|
|
3205
3208
|
meta: {
|
|
3206
3209
|
parent: "mf-payment-admin.onboard-submission"
|
|
3207
3210
|
},
|
|
3208
|
-
component: () => import("./OnboardForm-
|
|
3211
|
+
component: () => import("./OnboardForm-OqVz2dnj.js")
|
|
3209
3212
|
},
|
|
3210
3213
|
{
|
|
3211
3214
|
path: "/admin/terminal/pos",
|
|
@@ -3214,7 +3217,7 @@ const Ho = () => ({
|
|
|
3214
3217
|
sidebarDisplay: "POS",
|
|
3215
3218
|
section: "device"
|
|
3216
3219
|
},
|
|
3217
|
-
component: () => import("./Terminal-
|
|
3220
|
+
component: () => import("./Terminal-ubk78mmt.js"),
|
|
3218
3221
|
props: {
|
|
3219
3222
|
type: "POS"
|
|
3220
3223
|
}
|
|
@@ -3226,7 +3229,7 @@ const Ho = () => ({
|
|
|
3226
3229
|
sidebarDisplay: "Kiosks",
|
|
3227
3230
|
section: "device"
|
|
3228
3231
|
},
|
|
3229
|
-
component: () => import("./Terminal-
|
|
3232
|
+
component: () => import("./Terminal-ubk78mmt.js"),
|
|
3230
3233
|
props: {
|
|
3231
3234
|
type: "KIOSK"
|
|
3232
3235
|
}
|
|
@@ -3238,7 +3241,7 @@ const Ho = () => ({
|
|
|
3238
3241
|
sidebarDisplay: "Terminals",
|
|
3239
3242
|
section: "device"
|
|
3240
3243
|
},
|
|
3241
|
-
component: () => import("./Terminal-
|
|
3244
|
+
component: () => import("./Terminal-ubk78mmt.js"),
|
|
3242
3245
|
props: {
|
|
3243
3246
|
type: "TERMINAL"
|
|
3244
3247
|
}
|
|
@@ -3250,7 +3253,7 @@ const Ho = () => ({
|
|
|
3250
3253
|
meta: {
|
|
3251
3254
|
parent: "mf-payment-admin.pos"
|
|
3252
3255
|
},
|
|
3253
|
-
component: () => import("./TerminalSetting-
|
|
3256
|
+
component: () => import("./TerminalSetting-CqS9pECq.js")
|
|
3254
3257
|
},
|
|
3255
3258
|
{
|
|
3256
3259
|
path: "/admin/terminal/kiosk/:terminalId",
|
|
@@ -3259,7 +3262,7 @@ const Ho = () => ({
|
|
|
3259
3262
|
meta: {
|
|
3260
3263
|
parent: "mf-payment-admin.kiosk"
|
|
3261
3264
|
},
|
|
3262
|
-
component: () => import("./TerminalSetting-
|
|
3265
|
+
component: () => import("./TerminalSetting-CqS9pECq.js")
|
|
3263
3266
|
},
|
|
3264
3267
|
{
|
|
3265
3268
|
path: "/admin/terminal/terminal/:terminalId",
|
|
@@ -3268,7 +3271,7 @@ const Ho = () => ({
|
|
|
3268
3271
|
meta: {
|
|
3269
3272
|
parent: "mf-payment-admin.terminal"
|
|
3270
3273
|
},
|
|
3271
|
-
component: () => import("./TerminalSetting-
|
|
3274
|
+
component: () => import("./TerminalSetting-CqS9pECq.js")
|
|
3272
3275
|
},
|
|
3273
3276
|
{
|
|
3274
3277
|
path: "/admin/transaction",
|
|
@@ -3276,7 +3279,7 @@ const Ho = () => ({
|
|
|
3276
3279
|
meta: {
|
|
3277
3280
|
sidebarDisplay: "Transactions"
|
|
3278
3281
|
},
|
|
3279
|
-
component: () => import("./Transaction-
|
|
3282
|
+
component: () => import("./Transaction-BgLMHX2L.js")
|
|
3280
3283
|
},
|
|
3281
3284
|
{
|
|
3282
3285
|
path: "/admin/chargeback",
|
|
@@ -3284,7 +3287,7 @@ const Ho = () => ({
|
|
|
3284
3287
|
meta: {
|
|
3285
3288
|
sidebarDisplay: "Chargebacks"
|
|
3286
3289
|
},
|
|
3287
|
-
component: () => import("./Chargeback-
|
|
3290
|
+
component: () => import("./Chargeback-eF_MfNB7.js")
|
|
3288
3291
|
},
|
|
3289
3292
|
{
|
|
3290
3293
|
path: "/admin/settlement",
|
|
@@ -3292,7 +3295,7 @@ const Ho = () => ({
|
|
|
3292
3295
|
meta: {
|
|
3293
3296
|
sidebarDisplay: "Settlements"
|
|
3294
3297
|
},
|
|
3295
|
-
component: () => import("./Settlement-
|
|
3298
|
+
component: () => import("./Settlement-CphuhaDs.js")
|
|
3296
3299
|
},
|
|
3297
3300
|
{
|
|
3298
3301
|
path: "/admin/settlement/:settlementId",
|
|
@@ -3301,7 +3304,7 @@ const Ho = () => ({
|
|
|
3301
3304
|
meta: {
|
|
3302
3305
|
parent: "mf-payment-admin.settlement"
|
|
3303
3306
|
},
|
|
3304
|
-
component: () => import("./SettlementTransactions-
|
|
3307
|
+
component: () => import("./SettlementTransactions-oCyokbLZ.js")
|
|
3305
3308
|
}
|
|
3306
3309
|
].map((t) => ({
|
|
3307
3310
|
...t,
|
|
@@ -3309,7 +3312,7 @@ const Ho = () => ({
|
|
|
3309
3312
|
...t.meta,
|
|
3310
3313
|
...Ho()
|
|
3311
3314
|
}
|
|
3312
|
-
})),
|
|
3315
|
+
})), bt = [
|
|
3313
3316
|
{
|
|
3314
3317
|
path: "",
|
|
3315
3318
|
redirect: { name: "mf-payment-payout-account" }
|
|
@@ -3317,7 +3320,7 @@ const Ho = () => ({
|
|
|
3317
3320
|
{
|
|
3318
3321
|
path: "/payout-account",
|
|
3319
3322
|
name: "mf-payment-payout-account",
|
|
3320
|
-
component: () => import("./PayoutAccount-
|
|
3323
|
+
component: () => import("./PayoutAccount-BU-bT1wE.js"),
|
|
3321
3324
|
meta: {
|
|
3322
3325
|
sidebarDisplay: "i18n:payment.routes.payout_account",
|
|
3323
3326
|
region: { MY: !0 },
|
|
@@ -3334,7 +3337,7 @@ const Ho = () => ({
|
|
|
3334
3337
|
{
|
|
3335
3338
|
path: "/onboard-submission",
|
|
3336
3339
|
name: "mf-payment-onboard-submission",
|
|
3337
|
-
component: () => import("./OnboardSubmission-
|
|
3340
|
+
component: () => import("./OnboardSubmission-CmcuvrEy.js"),
|
|
3338
3341
|
meta: {
|
|
3339
3342
|
sidebarDisplay: "i18n:payment.routes.onboard_submission",
|
|
3340
3343
|
region: { MY: !0, TH: !0, AU: !0 },
|
|
@@ -3352,7 +3355,7 @@ const Ho = () => ({
|
|
|
3352
3355
|
path: "/onboard-submission/restaurant/:restaurantId/:type/:submission?",
|
|
3353
3356
|
name: "mf-payment-onboard-submission-form",
|
|
3354
3357
|
props: !0,
|
|
3355
|
-
component: () => import("./OnboardForm-
|
|
3358
|
+
component: () => import("./OnboardForm-CgVlJEWP.js"),
|
|
3356
3359
|
meta: {
|
|
3357
3360
|
parent: "mf-payment-onboard-submission",
|
|
3358
3361
|
validationManifest: {
|
|
@@ -3368,7 +3371,7 @@ const Ho = () => ({
|
|
|
3368
3371
|
{
|
|
3369
3372
|
path: "/transaction-old",
|
|
3370
3373
|
name: "mf-payment-old-transaction",
|
|
3371
|
-
component: () => import("./TransactionOld-
|
|
3374
|
+
component: () => import("./TransactionOld-jrctGUYY.js"),
|
|
3372
3375
|
meta: {
|
|
3373
3376
|
sidebarDisplay: "i18n:payment.routes.transaction",
|
|
3374
3377
|
validationManifest: {
|
|
@@ -3384,7 +3387,7 @@ const Ho = () => ({
|
|
|
3384
3387
|
{
|
|
3385
3388
|
path: "/transaction",
|
|
3386
3389
|
name: "mf-payment-transaction",
|
|
3387
|
-
component: () => import("./Transaction-
|
|
3390
|
+
component: () => import("./Transaction-BxNWr_TR.js"),
|
|
3388
3391
|
meta: {
|
|
3389
3392
|
sidebarDisplay: "i18n:payment.routes.transaction_new",
|
|
3390
3393
|
sidebarNew: !0,
|
|
@@ -3401,7 +3404,7 @@ const Ho = () => ({
|
|
|
3401
3404
|
{
|
|
3402
3405
|
path: "/settlement",
|
|
3403
3406
|
name: "mf-payment-settlement",
|
|
3404
|
-
component: () => import("./Settlement-
|
|
3407
|
+
component: () => import("./Settlement-B7dzQTAr.js"),
|
|
3405
3408
|
meta: {
|
|
3406
3409
|
sidebarDisplay: "i18n:payment.routes.settlement",
|
|
3407
3410
|
region: { MY: !0, SG: !0 },
|
|
@@ -3419,7 +3422,7 @@ const Ho = () => ({
|
|
|
3419
3422
|
path: "/settlement/:settlementId",
|
|
3420
3423
|
name: "mf-payment-settlement-transaction",
|
|
3421
3424
|
props: !0,
|
|
3422
|
-
component: () => import("./SettlementTransactions-
|
|
3425
|
+
component: () => import("./SettlementTransactions-CTFl-1pu.js"),
|
|
3423
3426
|
meta: {
|
|
3424
3427
|
parent: "mf-payment-settlement",
|
|
3425
3428
|
validationManifest: {
|
|
@@ -3586,9 +3589,9 @@ const Vs = function(t) {
|
|
|
3586
3589
|
this.init_();
|
|
3587
3590
|
const n = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
|
3588
3591
|
for (let s = 0; s < t.length; s += 3) {
|
|
3589
|
-
const i = t[s], a = s + 1 < t.length, c = a ? t[s + 1] : 0, l = s + 2 < t.length, A = l ? t[s + 2] : 0,
|
|
3590
|
-
let B = (c & 15) << 2 | A >> 6,
|
|
3591
|
-
l || (
|
|
3592
|
+
const i = t[s], a = s + 1 < t.length, c = a ? t[s + 1] : 0, l = s + 2 < t.length, A = l ? t[s + 2] : 0, m = i >> 2, p = (i & 3) << 4 | c >> 4;
|
|
3593
|
+
let B = (c & 15) << 2 | A >> 6, w = A & 63;
|
|
3594
|
+
l || (w = 64, a || (B = 64)), r.push(n[m], n[p], n[B], n[w]);
|
|
3592
3595
|
}
|
|
3593
3596
|
return r.join("");
|
|
3594
3597
|
},
|
|
@@ -3642,8 +3645,8 @@ const Vs = function(t) {
|
|
|
3642
3645
|
throw new So();
|
|
3643
3646
|
const B = i << 2 | c >> 4;
|
|
3644
3647
|
if (r.push(B), A !== 64) {
|
|
3645
|
-
const
|
|
3646
|
-
if (r.push(
|
|
3648
|
+
const w = c << 4 & 240 | A >> 2;
|
|
3649
|
+
if (r.push(w), p !== 64) {
|
|
3647
3650
|
const O = A << 6 & 192 | p;
|
|
3648
3651
|
r.push(O);
|
|
3649
3652
|
}
|
|
@@ -3875,10 +3878,10 @@ function sc() {
|
|
|
3875
3878
|
const ic = "FirebaseError";
|
|
3876
3879
|
class qe extends Error {
|
|
3877
3880
|
constructor(e, n, r) {
|
|
3878
|
-
super(n), this.code = e, this.customData = r, this.name = ic, Object.setPrototypeOf(this, qe.prototype), Error.captureStackTrace && Error.captureStackTrace(this,
|
|
3881
|
+
super(n), this.code = e, this.customData = r, this.name = ic, Object.setPrototypeOf(this, qe.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Pt.prototype.create);
|
|
3879
3882
|
}
|
|
3880
3883
|
}
|
|
3881
|
-
class
|
|
3884
|
+
class Pt {
|
|
3882
3885
|
constructor(e, n, r) {
|
|
3883
3886
|
this.service = e, this.serviceName = n, this.errors = r;
|
|
3884
3887
|
}
|
|
@@ -3900,7 +3903,7 @@ function cc(t) {
|
|
|
3900
3903
|
return !1;
|
|
3901
3904
|
return !0;
|
|
3902
3905
|
}
|
|
3903
|
-
function
|
|
3906
|
+
function Wt(t, e) {
|
|
3904
3907
|
if (t === e)
|
|
3905
3908
|
return !0;
|
|
3906
3909
|
const n = Object.keys(t), r = Object.keys(e);
|
|
@@ -3909,7 +3912,7 @@ function Ut(t, e) {
|
|
|
3909
3912
|
return !1;
|
|
3910
3913
|
const i = t[s], a = e[s];
|
|
3911
3914
|
if (ur(i) && ur(a)) {
|
|
3912
|
-
if (!
|
|
3915
|
+
if (!Wt(i, a))
|
|
3913
3916
|
return !1;
|
|
3914
3917
|
} else if (i !== a)
|
|
3915
3918
|
return !1;
|
|
@@ -3938,7 +3941,7 @@ function ur(t) {
|
|
|
3938
3941
|
* See the License for the specific language governing permissions and
|
|
3939
3942
|
* limitations under the License.
|
|
3940
3943
|
*/
|
|
3941
|
-
function
|
|
3944
|
+
function Ot(t) {
|
|
3942
3945
|
const e = [];
|
|
3943
3946
|
for (const [n, r] of Object.entries(t))
|
|
3944
3947
|
Array.isArray(r) ? r.forEach((s) => {
|
|
@@ -4170,7 +4173,7 @@ class dc {
|
|
|
4170
4173
|
if (this.component)
|
|
4171
4174
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
4172
4175
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
4173
|
-
if (
|
|
4176
|
+
if (fc(e))
|
|
4174
4177
|
try {
|
|
4175
4178
|
this.getOrInitializeService({ instanceIdentifier: Ne });
|
|
4176
4179
|
} catch {
|
|
@@ -4276,7 +4279,7 @@ class dc {
|
|
|
4276
4279
|
function hc(t) {
|
|
4277
4280
|
return t === Ne ? void 0 : t;
|
|
4278
4281
|
}
|
|
4279
|
-
function
|
|
4282
|
+
function fc(t) {
|
|
4280
4283
|
return t.instantiationMode === "EAGER";
|
|
4281
4284
|
}
|
|
4282
4285
|
/**
|
|
@@ -4295,7 +4298,7 @@ function mc(t) {
|
|
|
4295
4298
|
* See the License for the specific language governing permissions and
|
|
4296
4299
|
* limitations under the License.
|
|
4297
4300
|
*/
|
|
4298
|
-
class
|
|
4301
|
+
class mc {
|
|
4299
4302
|
constructor(e) {
|
|
4300
4303
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
4301
4304
|
}
|
|
@@ -4431,9 +4434,9 @@ class Ns {
|
|
|
4431
4434
|
this._userLogHandler && this._userLogHandler(this, F.ERROR, ...e), this._logHandler(this, F.ERROR, ...e);
|
|
4432
4435
|
}
|
|
4433
4436
|
}
|
|
4434
|
-
const
|
|
4437
|
+
const vc = (t, e) => e.some((n) => t instanceof n);
|
|
4435
4438
|
let lr, Ar;
|
|
4436
|
-
function
|
|
4439
|
+
function wc() {
|
|
4437
4440
|
return lr || (lr = [
|
|
4438
4441
|
IDBDatabase,
|
|
4439
4442
|
IDBObjectStore,
|
|
@@ -4449,7 +4452,7 @@ function Bc() {
|
|
|
4449
4452
|
IDBCursor.prototype.continuePrimaryKey
|
|
4450
4453
|
]);
|
|
4451
4454
|
}
|
|
4452
|
-
const Hs = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakMap(),
|
|
4455
|
+
const Hs = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap();
|
|
4453
4456
|
function Dc(t) {
|
|
4454
4457
|
const e = new Promise((n, r) => {
|
|
4455
4458
|
const s = () => {
|
|
@@ -4505,26 +4508,26 @@ function Ec(t) {
|
|
|
4505
4508
|
}
|
|
4506
4509
|
function Mc(t) {
|
|
4507
4510
|
return t === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...n) {
|
|
4508
|
-
const r = t.call(
|
|
4511
|
+
const r = t.call(mn(this), e, ...n);
|
|
4509
4512
|
return Qs.set(r, e.sort ? e.sort() : [e]), Fe(r);
|
|
4510
4513
|
} : Bc().includes(t) ? function(...e) {
|
|
4511
|
-
return t.apply(
|
|
4514
|
+
return t.apply(mn(this), e), Fe(Hs.get(this));
|
|
4512
4515
|
} : function(...e) {
|
|
4513
|
-
return Fe(t.apply(
|
|
4516
|
+
return Fe(t.apply(mn(this), e));
|
|
4514
4517
|
};
|
|
4515
4518
|
}
|
|
4516
4519
|
function Ic(t) {
|
|
4517
|
-
return typeof t == "function" ? Mc(t) : (t instanceof IDBTransaction && Cc(t),
|
|
4520
|
+
return typeof t == "function" ? Mc(t) : (t instanceof IDBTransaction && Cc(t), vc(t, wc()) ? new Proxy(t, Mn) : t);
|
|
4518
4521
|
}
|
|
4519
4522
|
function Fe(t) {
|
|
4520
4523
|
if (t instanceof IDBRequest)
|
|
4521
4524
|
return Dc(t);
|
|
4522
|
-
if (
|
|
4523
|
-
return
|
|
4525
|
+
if (fn.has(t))
|
|
4526
|
+
return fn.get(t);
|
|
4524
4527
|
const e = Ic(t);
|
|
4525
|
-
return e !== t && (
|
|
4528
|
+
return e !== t && (fn.set(t, e), Un.set(e, t)), e;
|
|
4526
4529
|
}
|
|
4527
|
-
const
|
|
4530
|
+
const mn = (t) => Un.get(t);
|
|
4528
4531
|
function Pc(t, e, { blocked: n, upgrade: r, blocking: s, terminated: i } = {}) {
|
|
4529
4532
|
const a = indexedDB.open(t, e), c = Fe(a);
|
|
4530
4533
|
return r && a.addEventListener("upgradeneeded", (l) => {
|
|
@@ -4619,7 +4622,7 @@ const In = "@firebase/app", hr = "0.10.13";
|
|
|
4619
4622
|
* See the License for the specific language governing permissions and
|
|
4620
4623
|
* limitations under the License.
|
|
4621
4624
|
*/
|
|
4622
|
-
const
|
|
4625
|
+
const we = new Ns("@firebase/app"), Yc = "@firebase/app-compat", Vc = "@firebase/analytics-compat", xc = "@firebase/analytics", Fc = "@firebase/app-check-compat", kc = "@firebase/app-check", Rc = "@firebase/auth", qc = "@firebase/auth-compat", Nc = "@firebase/database", Hc = "@firebase/data-connect", Qc = "@firebase/database-compat", Xc = "@firebase/functions", Sc = "@firebase/functions-compat", Uc = "@firebase/installations", Wc = "@firebase/installations-compat", zc = "@firebase/messaging", Zc = "@firebase/messaging-compat", Lc = "@firebase/performance", Kc = "@firebase/performance-compat", Jc = "@firebase/remote-config", _c = "@firebase/remote-config-compat", $c = "@firebase/storage", eu = "@firebase/storage-compat", tu = "@firebase/firestore", nu = "@firebase/vertexai-preview", ru = "@firebase/firestore-compat", su = "firebase", iu = "10.14.1";
|
|
4623
4626
|
/**
|
|
4624
4627
|
* @license
|
|
4625
4628
|
* Copyright 2019 Google LLC
|
|
@@ -4682,23 +4685,23 @@ const Pn = "[DEFAULT]", au = {
|
|
|
4682
4685
|
* See the License for the specific language governing permissions and
|
|
4683
4686
|
* limitations under the License.
|
|
4684
4687
|
*/
|
|
4685
|
-
const
|
|
4686
|
-
function
|
|
4688
|
+
const zt = /* @__PURE__ */ new Map(), ou = /* @__PURE__ */ new Map(), On = /* @__PURE__ */ new Map();
|
|
4689
|
+
function fr(t, e) {
|
|
4687
4690
|
try {
|
|
4688
4691
|
t.container.addComponent(e);
|
|
4689
4692
|
} catch (n) {
|
|
4690
|
-
|
|
4693
|
+
we.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`, n);
|
|
4691
4694
|
}
|
|
4692
4695
|
}
|
|
4693
|
-
function
|
|
4696
|
+
function vt(t) {
|
|
4694
4697
|
const e = t.name;
|
|
4695
4698
|
if (On.has(e))
|
|
4696
|
-
return
|
|
4699
|
+
return we.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
4697
4700
|
On.set(e, t);
|
|
4698
|
-
for (const n of
|
|
4699
|
-
|
|
4701
|
+
for (const n of zt.values())
|
|
4702
|
+
fr(n, t);
|
|
4700
4703
|
for (const n of ou.values())
|
|
4701
|
-
|
|
4704
|
+
fr(n, t);
|
|
4702
4705
|
return !0;
|
|
4703
4706
|
}
|
|
4704
4707
|
function Xs(t, e) {
|
|
@@ -4739,7 +4742,7 @@ const cu = {
|
|
|
4739
4742
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
4740
4743
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
|
4741
4744
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
|
4742
|
-
}, ke = new
|
|
4745
|
+
}, ke = new Pt("app", "Firebase", cu);
|
|
4743
4746
|
/**
|
|
4744
4747
|
* @license
|
|
4745
4748
|
* Copyright 2019 Google LLC
|
|
@@ -4814,7 +4817,7 @@ class uu {
|
|
|
4814
4817
|
* See the License for the specific language governing permissions and
|
|
4815
4818
|
* limitations under the License.
|
|
4816
4819
|
*/
|
|
4817
|
-
const
|
|
4820
|
+
const Tt = iu;
|
|
4818
4821
|
function Ss(t, e = {}) {
|
|
4819
4822
|
let n = t;
|
|
4820
4823
|
typeof e != "object" && (e = { name: e });
|
|
@@ -4828,20 +4831,20 @@ function Ss(t, e = {}) {
|
|
|
4828
4831
|
"no-options"
|
|
4829
4832
|
/* AppError.NO_OPTIONS */
|
|
4830
4833
|
);
|
|
4831
|
-
const i =
|
|
4834
|
+
const i = zt.get(s);
|
|
4832
4835
|
if (i) {
|
|
4833
|
-
if (
|
|
4836
|
+
if (Wt(n, i.options) && Wt(r, i.config))
|
|
4834
4837
|
return i;
|
|
4835
4838
|
throw ke.create("duplicate-app", { appName: s });
|
|
4836
4839
|
}
|
|
4837
|
-
const a = new
|
|
4840
|
+
const a = new mc(s);
|
|
4838
4841
|
for (const l of On.values())
|
|
4839
4842
|
a.addComponent(l);
|
|
4840
4843
|
const c = new uu(n, r, a);
|
|
4841
|
-
return
|
|
4844
|
+
return zt.set(s, c), c;
|
|
4842
4845
|
}
|
|
4843
4846
|
function lu(t = Pn) {
|
|
4844
|
-
const e =
|
|
4847
|
+
const e = zt.get(t);
|
|
4845
4848
|
if (!e && t === Pn && Rs())
|
|
4846
4849
|
return Ss();
|
|
4847
4850
|
if (!e)
|
|
@@ -4857,10 +4860,10 @@ function $e(t, e, n) {
|
|
|
4857
4860
|
const c = [
|
|
4858
4861
|
`Unable to register library "${s}" with version "${e}":`
|
|
4859
4862
|
];
|
|
4860
|
-
i && c.push(`library name "${s}" contains illegal characters (whitespace or "/")`), i && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`),
|
|
4863
|
+
i && c.push(`library name "${s}" contains illegal characters (whitespace or "/")`), i && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), we.warn(c.join(" "));
|
|
4861
4864
|
return;
|
|
4862
4865
|
}
|
|
4863
|
-
|
|
4866
|
+
vt(new dt(
|
|
4864
4867
|
`${s}-version`,
|
|
4865
4868
|
() => ({ library: s, version: e }),
|
|
4866
4869
|
"VERSION"
|
|
@@ -4909,27 +4912,27 @@ async function hu(t) {
|
|
|
4909
4912
|
return await n.done, r;
|
|
4910
4913
|
} catch (e) {
|
|
4911
4914
|
if (e instanceof qe)
|
|
4912
|
-
|
|
4915
|
+
we.warn(e.message);
|
|
4913
4916
|
else {
|
|
4914
4917
|
const n = ke.create("idb-get", {
|
|
4915
4918
|
originalErrorMessage: e == null ? void 0 : e.message
|
|
4916
4919
|
});
|
|
4917
|
-
|
|
4920
|
+
we.warn(n.message);
|
|
4918
4921
|
}
|
|
4919
4922
|
}
|
|
4920
4923
|
}
|
|
4921
|
-
async function
|
|
4924
|
+
async function mr(t, e) {
|
|
4922
4925
|
try {
|
|
4923
4926
|
const r = (await Us()).transaction(wt, "readwrite");
|
|
4924
4927
|
await r.objectStore(wt).put(e, Ws(t)), await r.done;
|
|
4925
4928
|
} catch (n) {
|
|
4926
4929
|
if (n instanceof qe)
|
|
4927
|
-
|
|
4930
|
+
we.warn(n.message);
|
|
4928
4931
|
else {
|
|
4929
4932
|
const r = ke.create("idb-set", {
|
|
4930
4933
|
originalErrorMessage: n == null ? void 0 : n.message
|
|
4931
4934
|
});
|
|
4932
|
-
|
|
4935
|
+
we.warn(r.message);
|
|
4933
4936
|
}
|
|
4934
4937
|
}
|
|
4935
4938
|
}
|
|
@@ -4952,7 +4955,7 @@ function Ws(t) {
|
|
|
4952
4955
|
* See the License for the specific language governing permissions and
|
|
4953
4956
|
* limitations under the License.
|
|
4954
4957
|
*/
|
|
4955
|
-
const
|
|
4958
|
+
const fu = 1024, mu = 30 * 24 * 60 * 60 * 1e3;
|
|
4956
4959
|
class gu {
|
|
4957
4960
|
constructor(e) {
|
|
4958
4961
|
this.container = e, this._heartbeatsCache = null;
|
|
@@ -4972,10 +4975,10 @@ class gu {
|
|
|
4972
4975
|
const s = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), i = gr();
|
|
4973
4976
|
return ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((n = this._heartbeatsCache) === null || n === void 0 ? void 0 : n.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === i || this._heartbeatsCache.heartbeats.some((a) => a.date === i) ? void 0 : (this._heartbeatsCache.heartbeats.push({ date: i, agent: s }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((a) => {
|
|
4974
4977
|
const c = new Date(a.date).valueOf();
|
|
4975
|
-
return Date.now() - c <=
|
|
4978
|
+
return Date.now() - c <= mu;
|
|
4976
4979
|
}), this._storage.overwrite(this._heartbeatsCache));
|
|
4977
4980
|
} catch (r) {
|
|
4978
|
-
|
|
4981
|
+
we.warn(r);
|
|
4979
4982
|
}
|
|
4980
4983
|
}
|
|
4981
4984
|
/**
|
|
@@ -4993,14 +4996,14 @@ class gu {
|
|
|
4993
4996
|
const n = gr(), { heartbeatsToSend: r, unsentEntries: s } = pu(this._heartbeatsCache.heartbeats), i = Fs(JSON.stringify({ version: 2, heartbeats: r }));
|
|
4994
4997
|
return this._heartbeatsCache.lastSentHeartbeatDate = n, s.length > 0 ? (this._heartbeatsCache.heartbeats = s, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), i;
|
|
4995
4998
|
} catch (n) {
|
|
4996
|
-
return
|
|
4999
|
+
return we.warn(n), "";
|
|
4997
5000
|
}
|
|
4998
5001
|
}
|
|
4999
5002
|
}
|
|
5000
5003
|
function gr() {
|
|
5001
5004
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
5002
5005
|
}
|
|
5003
|
-
function pu(t, e =
|
|
5006
|
+
function pu(t, e = fu) {
|
|
5004
5007
|
const n = [];
|
|
5005
5008
|
let r = t.slice();
|
|
5006
5009
|
for (const s of t) {
|
|
@@ -5046,7 +5049,7 @@ class yu {
|
|
|
5046
5049
|
var n;
|
|
5047
5050
|
if (await this._canUseIndexedDBPromise) {
|
|
5048
5051
|
const s = await this.read();
|
|
5049
|
-
return
|
|
5052
|
+
return mr(this.app, {
|
|
5050
5053
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
5051
5054
|
heartbeats: e.heartbeats
|
|
5052
5055
|
});
|
|
@@ -5058,7 +5061,7 @@ class yu {
|
|
|
5058
5061
|
var n;
|
|
5059
5062
|
if (await this._canUseIndexedDBPromise) {
|
|
5060
5063
|
const s = await this.read();
|
|
5061
|
-
return
|
|
5064
|
+
return mr(this.app, {
|
|
5062
5065
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
5063
5066
|
heartbeats: [
|
|
5064
5067
|
...s.heartbeats,
|
|
@@ -5092,12 +5095,12 @@ function pr(t) {
|
|
|
5092
5095
|
* limitations under the License.
|
|
5093
5096
|
*/
|
|
5094
5097
|
function bu(t) {
|
|
5095
|
-
|
|
5098
|
+
vt(new dt(
|
|
5096
5099
|
"platform-logger",
|
|
5097
5100
|
(e) => new Gc(e),
|
|
5098
5101
|
"PRIVATE"
|
|
5099
5102
|
/* ComponentType.PRIVATE */
|
|
5100
|
-
)),
|
|
5103
|
+
)), vt(new dt(
|
|
5101
5104
|
"heartbeat",
|
|
5102
5105
|
(e) => new gu(e),
|
|
5103
5106
|
"PRIVATE"
|
|
@@ -5105,7 +5108,7 @@ function bu(t) {
|
|
|
5105
5108
|
)), $e(In, hr, t), $e(In, hr, "esm2017"), $e("fire-js", "");
|
|
5106
5109
|
}
|
|
5107
5110
|
bu("");
|
|
5108
|
-
var
|
|
5111
|
+
var vu = "firebase", wu = "10.14.1";
|
|
5109
5112
|
/**
|
|
5110
5113
|
* @license
|
|
5111
5114
|
* Copyright 2020 Google LLC
|
|
@@ -5122,7 +5125,7 @@ var wu = "firebase", vu = "10.14.1";
|
|
|
5122
5125
|
* See the License for the specific language governing permissions and
|
|
5123
5126
|
* limitations under the License.
|
|
5124
5127
|
*/
|
|
5125
|
-
$e(
|
|
5128
|
+
$e(vu, wu, "app");
|
|
5126
5129
|
var yr = function() {
|
|
5127
5130
|
return yr = Object.assign || function(e) {
|
|
5128
5131
|
for (var n, r = 1, s = arguments.length; r < s; r++) {
|
|
@@ -5145,7 +5148,7 @@ function zs() {
|
|
|
5145
5148
|
"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."
|
|
5146
5149
|
};
|
|
5147
5150
|
}
|
|
5148
|
-
const Bu = zs, Zs = new
|
|
5151
|
+
const Bu = zs, Zs = new Pt("auth", "Firebase", zs());
|
|
5149
5152
|
/**
|
|
5150
5153
|
* @license
|
|
5151
5154
|
* Copyright 2020 Google LLC
|
|
@@ -5162,12 +5165,12 @@ const Bu = zs, Zs = new It("auth", "Firebase", zs());
|
|
|
5162
5165
|
* See the License for the specific language governing permissions and
|
|
5163
5166
|
* limitations under the License.
|
|
5164
5167
|
*/
|
|
5165
|
-
const
|
|
5168
|
+
const Zt = new Ns("@firebase/auth");
|
|
5166
5169
|
function Du(t, ...e) {
|
|
5167
|
-
|
|
5170
|
+
Zt.logLevel <= F.WARN && Zt.warn(`Auth (${Tt}): ${t}`, ...e);
|
|
5168
5171
|
}
|
|
5169
|
-
function
|
|
5170
|
-
|
|
5172
|
+
function Nt(t, ...e) {
|
|
5173
|
+
Zt.logLevel <= F.ERROR && Zt.error(`Auth (${Tt}): ${t}`, ...e);
|
|
5171
5174
|
}
|
|
5172
5175
|
/**
|
|
5173
5176
|
* @license
|
|
@@ -5193,7 +5196,7 @@ function Ae(t, ...e) {
|
|
|
5193
5196
|
}
|
|
5194
5197
|
function Ls(t, e, n) {
|
|
5195
5198
|
const r = Object.assign(Object.assign({}, Bu()), { [e]: n });
|
|
5196
|
-
return new
|
|
5199
|
+
return new Pt("auth", "Firebase", r).create(e, {
|
|
5197
5200
|
appName: t.name
|
|
5198
5201
|
});
|
|
5199
5202
|
}
|
|
@@ -5213,7 +5216,7 @@ function M(t, e, ...n) {
|
|
|
5213
5216
|
}
|
|
5214
5217
|
function ye(t) {
|
|
5215
5218
|
const e = "INTERNAL ASSERTION FAILED: " + t;
|
|
5216
|
-
throw
|
|
5219
|
+
throw Nt(e), new Error(e);
|
|
5217
5220
|
}
|
|
5218
5221
|
function De(t, e) {
|
|
5219
5222
|
t || ye(e);
|
|
@@ -5297,7 +5300,7 @@ function Mu() {
|
|
|
5297
5300
|
* See the License for the specific language governing permissions and
|
|
5298
5301
|
* limitations under the License.
|
|
5299
5302
|
*/
|
|
5300
|
-
class
|
|
5303
|
+
class Gt {
|
|
5301
5304
|
constructor(e, n) {
|
|
5302
5305
|
this.shortDelay = e, this.longDelay = n, De(n > e, "Short delay should be less than long delay!"), this.isMobile = _o() || tc();
|
|
5303
5306
|
}
|
|
@@ -5487,17 +5490,17 @@ const Iu = {
|
|
|
5487
5490
|
* See the License for the specific language governing permissions and
|
|
5488
5491
|
* limitations under the License.
|
|
5489
5492
|
*/
|
|
5490
|
-
const Pu = new
|
|
5493
|
+
const Pu = new Gt(3e4, 6e4);
|
|
5491
5494
|
function sn(t, e) {
|
|
5492
5495
|
return t.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: t.tenantId }) : e;
|
|
5493
5496
|
}
|
|
5494
|
-
async function
|
|
5497
|
+
async function ft(t, e, n, r, s = {}) {
|
|
5495
5498
|
return Js(t, s, async () => {
|
|
5496
5499
|
let i = {}, a = {};
|
|
5497
5500
|
r && (e === "GET" ? a = r : i = {
|
|
5498
5501
|
body: JSON.stringify(r)
|
|
5499
5502
|
});
|
|
5500
|
-
const c =
|
|
5503
|
+
const c = Ot(Object.assign({ key: t.config.apiKey }, a)).slice(1), l = await t._getAdditionalHeaders();
|
|
5501
5504
|
l[
|
|
5502
5505
|
"Content-Type"
|
|
5503
5506
|
/* HttpHeader.CONTENT_TYPE */
|
|
@@ -5523,21 +5526,21 @@ async function Js(t, e, n) {
|
|
|
5523
5526
|
s.clearNetworkTimeout();
|
|
5524
5527
|
const a = await i.json();
|
|
5525
5528
|
if ("needConfirmation" in a)
|
|
5526
|
-
throw
|
|
5529
|
+
throw kt(t, "account-exists-with-different-credential", a);
|
|
5527
5530
|
if (i.ok && !("errorMessage" in a))
|
|
5528
5531
|
return a;
|
|
5529
5532
|
{
|
|
5530
5533
|
const c = i.ok ? a.errorMessage : a.error.message, [l, A] = c.split(" : ");
|
|
5531
5534
|
if (l === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
5532
|
-
throw
|
|
5535
|
+
throw kt(t, "credential-already-in-use", a);
|
|
5533
5536
|
if (l === "EMAIL_EXISTS")
|
|
5534
|
-
throw
|
|
5537
|
+
throw kt(t, "email-already-in-use", a);
|
|
5535
5538
|
if (l === "USER_DISABLED")
|
|
5536
|
-
throw
|
|
5537
|
-
const
|
|
5539
|
+
throw kt(t, "user-disabled", a);
|
|
5540
|
+
const m = r[l] || l.toLowerCase().replace(/[_\s]+/g, "-");
|
|
5538
5541
|
if (A)
|
|
5539
|
-
throw Ls(t,
|
|
5540
|
-
Be(t,
|
|
5542
|
+
throw Ls(t, m, A);
|
|
5543
|
+
Be(t, m);
|
|
5541
5544
|
}
|
|
5542
5545
|
} catch (s) {
|
|
5543
5546
|
if (s instanceof qe)
|
|
@@ -5546,7 +5549,7 @@ async function Js(t, e, n) {
|
|
|
5546
5549
|
}
|
|
5547
5550
|
}
|
|
5548
5551
|
async function _s(t, e, n, r, s = {}) {
|
|
5549
|
-
const i = await
|
|
5552
|
+
const i = await ft(t, e, n, r, s);
|
|
5550
5553
|
return "mfaPendingCredential" in i && Be(t, "multi-factor-auth-required", {
|
|
5551
5554
|
_serverResponse: i
|
|
5552
5555
|
}), i;
|
|
@@ -5569,7 +5572,7 @@ class Ou {
|
|
|
5569
5572
|
clearTimeout(this.timer);
|
|
5570
5573
|
}
|
|
5571
5574
|
}
|
|
5572
|
-
function
|
|
5575
|
+
function kt(t, e, n) {
|
|
5573
5576
|
const r = {
|
|
5574
5577
|
appName: t.name
|
|
5575
5578
|
};
|
|
@@ -5594,10 +5597,10 @@ function Ft(t, e, n) {
|
|
|
5594
5597
|
* limitations under the License.
|
|
5595
5598
|
*/
|
|
5596
5599
|
async function Tu(t, e) {
|
|
5597
|
-
return
|
|
5600
|
+
return ft(t, "POST", "/v1/accounts:delete", e);
|
|
5598
5601
|
}
|
|
5599
5602
|
async function ei(t, e) {
|
|
5600
|
-
return
|
|
5603
|
+
return ft(t, "POST", "/v1/accounts:lookup", e);
|
|
5601
5604
|
}
|
|
5602
5605
|
/**
|
|
5603
5606
|
* @license
|
|
@@ -5649,15 +5652,15 @@ function yn(t) {
|
|
|
5649
5652
|
function Ln(t) {
|
|
5650
5653
|
const [e, n, r] = t.split(".");
|
|
5651
5654
|
if (e === void 0 || n === void 0 || r === void 0)
|
|
5652
|
-
return
|
|
5655
|
+
return Nt("JWT malformed, contained fewer than 3 sections"), null;
|
|
5653
5656
|
try {
|
|
5654
5657
|
const s = ks(n);
|
|
5655
|
-
return s ? JSON.parse(s) : (
|
|
5658
|
+
return s ? JSON.parse(s) : (Nt("Failed to decode base64 JWT payload"), null);
|
|
5656
5659
|
} catch (s) {
|
|
5657
|
-
return
|
|
5660
|
+
return Nt("Caught error parsing JWT payload as JSON", s == null ? void 0 : s.toString()), null;
|
|
5658
5661
|
}
|
|
5659
5662
|
}
|
|
5660
|
-
function
|
|
5663
|
+
function vr(t) {
|
|
5661
5664
|
const e = Ln(t);
|
|
5662
5665
|
return M(
|
|
5663
5666
|
e,
|
|
@@ -5689,7 +5692,7 @@ function wr(t) {
|
|
|
5689
5692
|
* See the License for the specific language governing permissions and
|
|
5690
5693
|
* limitations under the License.
|
|
5691
5694
|
*/
|
|
5692
|
-
async function
|
|
5695
|
+
async function Bt(t, e, n = !1) {
|
|
5693
5696
|
if (n)
|
|
5694
5697
|
return e;
|
|
5695
5698
|
try {
|
|
@@ -5812,9 +5815,9 @@ class Gn {
|
|
|
5812
5815
|
* See the License for the specific language governing permissions and
|
|
5813
5816
|
* limitations under the License.
|
|
5814
5817
|
*/
|
|
5815
|
-
async function
|
|
5818
|
+
async function Lt(t) {
|
|
5816
5819
|
var e;
|
|
5817
|
-
const n = t.auth, r = await t.getIdToken(), s = await
|
|
5820
|
+
const n = t.auth, r = await t.getIdToken(), s = await Bt(t, ei(n, { idToken: r }));
|
|
5818
5821
|
M(
|
|
5819
5822
|
s == null ? void 0 : s.users.length,
|
|
5820
5823
|
n,
|
|
@@ -5823,7 +5826,7 @@ async function Zt(t) {
|
|
|
5823
5826
|
);
|
|
5824
5827
|
const i = s.users[0];
|
|
5825
5828
|
t._notifyReloadListener(i);
|
|
5826
|
-
const a = !((e = i.providerUserInfo) === null || e === void 0) && e.length ? ti(i.providerUserInfo) : [], c = xu(t.providerData, a), l = t.isAnonymous, A = !(t.email && i.passwordHash) && !(c != null && c.length),
|
|
5829
|
+
const a = !((e = i.providerUserInfo) === null || e === void 0) && e.length ? ti(i.providerUserInfo) : [], c = xu(t.providerData, a), l = t.isAnonymous, A = !(t.email && i.passwordHash) && !(c != null && c.length), m = l ? A : !1, p = {
|
|
5827
5830
|
uid: i.localId,
|
|
5828
5831
|
displayName: i.displayName || null,
|
|
5829
5832
|
photoURL: i.photoUrl || null,
|
|
@@ -5833,13 +5836,13 @@ async function Zt(t) {
|
|
|
5833
5836
|
tenantId: i.tenantId || null,
|
|
5834
5837
|
providerData: c,
|
|
5835
5838
|
metadata: new Gn(i.createdAt, i.lastLoginAt),
|
|
5836
|
-
isAnonymous:
|
|
5839
|
+
isAnonymous: m
|
|
5837
5840
|
};
|
|
5838
5841
|
Object.assign(t, p);
|
|
5839
5842
|
}
|
|
5840
5843
|
async function Vu(t) {
|
|
5841
5844
|
const e = ht(t);
|
|
5842
|
-
await
|
|
5845
|
+
await Lt(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
5843
5846
|
}
|
|
5844
5847
|
function xu(t, e) {
|
|
5845
5848
|
return [...t.filter((r) => !e.some((s) => s.providerId === r.providerId)), ...e];
|
|
@@ -5875,7 +5878,7 @@ function ti(t) {
|
|
|
5875
5878
|
*/
|
|
5876
5879
|
async function Fu(t, e) {
|
|
5877
5880
|
const n = await Js(t, {}, async () => {
|
|
5878
|
-
const r =
|
|
5881
|
+
const r = Ot({
|
|
5879
5882
|
grant_type: "refresh_token",
|
|
5880
5883
|
refresh_token: e
|
|
5881
5884
|
}).slice(1), { tokenApiHost: s, apiKey: i } = t.config, a = $s(t, s, "/v1/token", `key=${i}`), c = await t._getAdditionalHeaders();
|
|
@@ -5895,7 +5898,7 @@ async function Fu(t, e) {
|
|
|
5895
5898
|
};
|
|
5896
5899
|
}
|
|
5897
5900
|
async function ku(t, e) {
|
|
5898
|
-
return
|
|
5901
|
+
return ft(t, "POST", "/v2/accounts:revokeToken", sn(t, e));
|
|
5899
5902
|
}
|
|
5900
5903
|
/**
|
|
5901
5904
|
* @license
|
|
@@ -5934,7 +5937,7 @@ class et {
|
|
|
5934
5937
|
"internal-error"
|
|
5935
5938
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5936
5939
|
);
|
|
5937
|
-
const n = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) :
|
|
5940
|
+
const n = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : vr(e.idToken);
|
|
5938
5941
|
this.updateTokensAndExpiration(e.idToken, e.refreshToken, n);
|
|
5939
5942
|
}
|
|
5940
5943
|
updateFromIdToken(e) {
|
|
@@ -5943,7 +5946,7 @@ class et {
|
|
|
5943
5946
|
"internal-error"
|
|
5944
5947
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5945
5948
|
);
|
|
5946
|
-
const n =
|
|
5949
|
+
const n = vr(e);
|
|
5947
5950
|
this.updateTokensAndExpiration(e, null, n);
|
|
5948
5951
|
}
|
|
5949
5952
|
async getToken(e, n = !1) {
|
|
@@ -6016,7 +6019,7 @@ class be {
|
|
|
6016
6019
|
this.providerId = "firebase", this.proactiveRefresh = new Yu(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = n, this.auth = r, this.stsTokenManager = s, this.accessToken = s.accessToken, this.displayName = i.displayName || null, this.email = i.email || null, this.emailVerified = i.emailVerified || !1, this.phoneNumber = i.phoneNumber || null, this.photoURL = i.photoURL || null, this.isAnonymous = i.isAnonymous || !1, this.tenantId = i.tenantId || null, this.providerData = i.providerData ? [...i.providerData] : [], this.metadata = new Gn(i.createdAt || void 0, i.lastLoginAt || void 0);
|
|
6017
6020
|
}
|
|
6018
6021
|
async getIdToken(e) {
|
|
6019
|
-
const n = await
|
|
6022
|
+
const n = await Bt(this, this.stsTokenManager.getToken(this.auth, e));
|
|
6020
6023
|
return M(
|
|
6021
6024
|
n,
|
|
6022
6025
|
this.auth,
|
|
@@ -6061,13 +6064,13 @@ class be {
|
|
|
6061
6064
|
}
|
|
6062
6065
|
async _updateTokensIfNecessary(e, n = !1) {
|
|
6063
6066
|
let r = !1;
|
|
6064
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), n && await
|
|
6067
|
+
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), n && await Lt(this), await this.auth._persistUserIfCurrent(this), r && this.auth._notifyListenersIfCurrent(this);
|
|
6065
6068
|
}
|
|
6066
6069
|
async delete() {
|
|
6067
6070
|
if (pe(this.auth.app))
|
|
6068
6071
|
return Promise.reject(Re(this.auth));
|
|
6069
6072
|
const e = await this.getIdToken();
|
|
6070
|
-
return await
|
|
6073
|
+
return await Bt(this, Tu(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
6071
6074
|
}
|
|
6072
6075
|
toJSON() {
|
|
6073
6076
|
return Object.assign(Object.assign({
|
|
@@ -6094,8 +6097,8 @@ class be {
|
|
|
6094
6097
|
return this.stsTokenManager.refreshToken || "";
|
|
6095
6098
|
}
|
|
6096
6099
|
static _fromJSON(e, n) {
|
|
6097
|
-
var r, s, i, a, c, l, A,
|
|
6098
|
-
const p = (r = n.displayName) !== null && r !== void 0 ? r : void 0, B = (s = n.email) !== null && s !== void 0 ? s : void 0,
|
|
6100
|
+
var r, s, i, a, c, l, A, m;
|
|
6101
|
+
const p = (r = n.displayName) !== null && r !== void 0 ? r : void 0, B = (s = n.email) !== null && s !== void 0 ? s : void 0, w = (i = n.phoneNumber) !== null && i !== void 0 ? i : void 0, O = (a = n.photoURL) !== null && a !== void 0 ? a : void 0, I = (c = n.tenantId) !== null && c !== void 0 ? c : void 0, V = (l = n._redirectEventId) !== null && l !== void 0 ? l : void 0, R = (A = n.createdAt) !== null && A !== void 0 ? A : void 0, Q = (m = n.lastLoginAt) !== null && m !== void 0 ? m : void 0, { uid: Y, emailVerified: v, isAnonymous: H, providerData: U, stsTokenManager: ee } = n;
|
|
6099
6102
|
M(
|
|
6100
6103
|
Y && ee,
|
|
6101
6104
|
e,
|
|
@@ -6109,7 +6112,7 @@ class be {
|
|
|
6109
6112
|
"internal-error"
|
|
6110
6113
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6111
6114
|
), Ee(p, e.name), Ee(B, e.name), M(
|
|
6112
|
-
typeof
|
|
6115
|
+
typeof v == "boolean",
|
|
6113
6116
|
e,
|
|
6114
6117
|
"internal-error"
|
|
6115
6118
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -6118,22 +6121,22 @@ class be {
|
|
|
6118
6121
|
e,
|
|
6119
6122
|
"internal-error"
|
|
6120
6123
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6121
|
-
), Ee(
|
|
6124
|
+
), Ee(w, e.name), Ee(O, e.name), Ee(I, e.name), Ee(V, e.name), Ee(R, e.name), Ee(Q, e.name);
|
|
6122
6125
|
const u = new be({
|
|
6123
6126
|
uid: Y,
|
|
6124
6127
|
auth: e,
|
|
6125
6128
|
email: B,
|
|
6126
|
-
emailVerified:
|
|
6129
|
+
emailVerified: v,
|
|
6127
6130
|
displayName: p,
|
|
6128
6131
|
isAnonymous: H,
|
|
6129
6132
|
photoURL: O,
|
|
6130
|
-
phoneNumber:
|
|
6133
|
+
phoneNumber: w,
|
|
6131
6134
|
tenantId: I,
|
|
6132
6135
|
stsTokenManager: q,
|
|
6133
6136
|
createdAt: R,
|
|
6134
6137
|
lastLoginAt: Q
|
|
6135
6138
|
});
|
|
6136
|
-
return U && Array.isArray(U) && (u.providerData = U.map((
|
|
6139
|
+
return U && Array.isArray(U) && (u.providerData = U.map((f) => Object.assign({}, f))), V && (u._redirectEventId = V), u;
|
|
6137
6140
|
}
|
|
6138
6141
|
/**
|
|
6139
6142
|
* Initialize a User from an idToken server response
|
|
@@ -6149,7 +6152,7 @@ class be {
|
|
|
6149
6152
|
stsTokenManager: s,
|
|
6150
6153
|
isAnonymous: r
|
|
6151
6154
|
});
|
|
6152
|
-
return await
|
|
6155
|
+
return await Lt(i), i;
|
|
6153
6156
|
}
|
|
6154
6157
|
/**
|
|
6155
6158
|
* Initialize a User from an idToken server response
|
|
@@ -6201,11 +6204,11 @@ class be {
|
|
|
6201
6204
|
* See the License for the specific language governing permissions and
|
|
6202
6205
|
* limitations under the License.
|
|
6203
6206
|
*/
|
|
6204
|
-
const
|
|
6205
|
-
function
|
|
6207
|
+
const wr = /* @__PURE__ */ new Map();
|
|
6208
|
+
function ve(t) {
|
|
6206
6209
|
De(t instanceof Function, "Expected a class definition");
|
|
6207
|
-
let e =
|
|
6208
|
-
return e ? (De(e instanceof t, "Instance stored in cache mismatched with class"), e) : (e = new t(),
|
|
6210
|
+
let e = wr.get(t);
|
|
6211
|
+
return e ? (De(e instanceof t, "Instance stored in cache mismatched with class"), e) : (e = new t(), wr.set(t, e), e);
|
|
6209
6212
|
}
|
|
6210
6213
|
/**
|
|
6211
6214
|
* @license
|
|
@@ -6263,14 +6266,14 @@ const Br = ni;
|
|
|
6263
6266
|
* See the License for the specific language governing permissions and
|
|
6264
6267
|
* limitations under the License.
|
|
6265
6268
|
*/
|
|
6266
|
-
function
|
|
6269
|
+
function Ht(t, e, n) {
|
|
6267
6270
|
return `firebase:${t}:${e}:${n}`;
|
|
6268
6271
|
}
|
|
6269
6272
|
class tt {
|
|
6270
6273
|
constructor(e, n, r) {
|
|
6271
6274
|
this.persistence = e, this.auth = n, this.userKey = r;
|
|
6272
6275
|
const { config: s, name: i } = this.auth;
|
|
6273
|
-
this.fullUserKey =
|
|
6276
|
+
this.fullUserKey = Ht(this.userKey, s.apiKey, i), this.fullPersistenceKey = Ht("persistence", s.apiKey, i), this.boundEventHandler = n._onStorageEvent.bind(n), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
|
|
6274
6277
|
}
|
|
6275
6278
|
setCurrentUser(e) {
|
|
6276
6279
|
return this.persistence._set(this.fullUserKey, e.toJSON());
|
|
@@ -6297,19 +6300,19 @@ class tt {
|
|
|
6297
6300
|
}
|
|
6298
6301
|
static async create(e, n, r = "authUser") {
|
|
6299
6302
|
if (!n.length)
|
|
6300
|
-
return new tt(
|
|
6303
|
+
return new tt(ve(Br), e, r);
|
|
6301
6304
|
const s = (await Promise.all(n.map(async (A) => {
|
|
6302
6305
|
if (await A._isAvailable())
|
|
6303
6306
|
return A;
|
|
6304
6307
|
}))).filter((A) => A);
|
|
6305
|
-
let i = s[0] ||
|
|
6306
|
-
const a =
|
|
6308
|
+
let i = s[0] || ve(Br);
|
|
6309
|
+
const a = Ht(r, e.config.apiKey, e.name);
|
|
6307
6310
|
let c = null;
|
|
6308
6311
|
for (const A of n)
|
|
6309
6312
|
try {
|
|
6310
|
-
const
|
|
6311
|
-
if (
|
|
6312
|
-
const p = be._fromJSON(e,
|
|
6313
|
+
const m = await A._get(a);
|
|
6314
|
+
if (m) {
|
|
6315
|
+
const p = be._fromJSON(e, m);
|
|
6313
6316
|
A !== i && (c = p), i = A;
|
|
6314
6317
|
break;
|
|
6315
6318
|
}
|
|
@@ -6436,7 +6439,7 @@ function Ai(t, e = []) {
|
|
|
6436
6439
|
n = t;
|
|
6437
6440
|
}
|
|
6438
6441
|
const r = e.length ? e.join(",") : "FirebaseCore-web";
|
|
6439
|
-
return `${n}/JsCore/${
|
|
6442
|
+
return `${n}/JsCore/${Tt}/${r}`;
|
|
6440
6443
|
}
|
|
6441
6444
|
/**
|
|
6442
6445
|
* @license
|
|
@@ -6510,7 +6513,7 @@ class Nu {
|
|
|
6510
6513
|
* limitations under the License.
|
|
6511
6514
|
*/
|
|
6512
6515
|
async function Hu(t, e = {}) {
|
|
6513
|
-
return
|
|
6516
|
+
return ft(t, "GET", "/v2/passwordPolicy", sn(t, e));
|
|
6514
6517
|
}
|
|
6515
6518
|
/**
|
|
6516
6519
|
* @license
|
|
@@ -6621,7 +6624,7 @@ class Su {
|
|
|
6621
6624
|
this.app = e, this.heartbeatServiceProvider = n, this.appCheckServiceProvider = r, this.config = s, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Cr(this), this.idTokenSubscription = new Cr(this), this.beforeStateQueue = new Nu(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 = Zs, 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 = s.sdkClientVersion;
|
|
6622
6625
|
}
|
|
6623
6626
|
_initializeWithPersistence(e, n) {
|
|
6624
|
-
return n && (this._popupRedirectResolver =
|
|
6627
|
+
return n && (this._popupRedirectResolver = ve(n)), this._initializationPromise = this.queue(async () => {
|
|
6625
6628
|
var r, s;
|
|
6626
6629
|
if (!this._deleted && (this.persistenceManager = await tt.create(this, e), !this._deleted)) {
|
|
6627
6630
|
if (!((r = this._popupRedirectResolver) === null || r === void 0) && r._shouldInitProactively)
|
|
@@ -6704,7 +6707,7 @@ class Su {
|
|
|
6704
6707
|
}
|
|
6705
6708
|
async reloadAndSetCurrentUserOrClear(e) {
|
|
6706
6709
|
try {
|
|
6707
|
-
await
|
|
6710
|
+
await Lt(e);
|
|
6708
6711
|
} catch (n) {
|
|
6709
6712
|
if ((n == null ? void 0 : n.code) !== "auth/network-request-failed")
|
|
6710
6713
|
return this.directlySetCurrentUser(null);
|
|
@@ -6748,7 +6751,7 @@ class Su {
|
|
|
6748
6751
|
}
|
|
6749
6752
|
setPersistence(e) {
|
|
6750
6753
|
return pe(this.app) ? Promise.reject(Re(this)) : this.queue(async () => {
|
|
6751
|
-
await this.assertedPersistence.setPersistence(
|
|
6754
|
+
await this.assertedPersistence.setPersistence(ve(e));
|
|
6752
6755
|
});
|
|
6753
6756
|
}
|
|
6754
6757
|
_getRecaptchaConfig() {
|
|
@@ -6770,7 +6773,7 @@ class Su {
|
|
|
6770
6773
|
return this.assertedPersistence.persistence.type;
|
|
6771
6774
|
}
|
|
6772
6775
|
_updateErrorMap(e) {
|
|
6773
|
-
this._errorFactory = new
|
|
6776
|
+
this._errorFactory = new Pt("auth", "Firebase", e());
|
|
6774
6777
|
}
|
|
6775
6778
|
onAuthStateChanged(e, n, r) {
|
|
6776
6779
|
return this.registerStateListener(this.authStateSubscription, e, n, r);
|
|
@@ -6821,7 +6824,7 @@ class Su {
|
|
|
6821
6824
|
}
|
|
6822
6825
|
async getOrInitRedirectPersistenceManager(e) {
|
|
6823
6826
|
if (!this.redirectPersistenceManager) {
|
|
6824
|
-
const n = e &&
|
|
6827
|
+
const n = e && ve(e) || this._popupRedirectResolver;
|
|
6825
6828
|
M(
|
|
6826
6829
|
n,
|
|
6827
6830
|
this,
|
|
@@ -6829,7 +6832,7 @@ class Su {
|
|
|
6829
6832
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
6830
6833
|
), this.redirectPersistenceManager = await tt.create(
|
|
6831
6834
|
this,
|
|
6832
|
-
[
|
|
6835
|
+
[ve(n._redirectPersistence)],
|
|
6833
6836
|
"redirectUser"
|
|
6834
6837
|
/* KeyName.REDIRECT_USER */
|
|
6835
6838
|
), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
|
|
@@ -7021,7 +7024,7 @@ function Lu(t, e) {
|
|
|
7021
7024
|
const n = Xs(t, "auth");
|
|
7022
7025
|
if (n.isInitialized()) {
|
|
7023
7026
|
const s = n.getImmediate(), i = n.getOptions();
|
|
7024
|
-
if (
|
|
7027
|
+
if (Wt(i, e ?? {}))
|
|
7025
7028
|
return s;
|
|
7026
7029
|
Be(
|
|
7027
7030
|
s,
|
|
@@ -7032,7 +7035,7 @@ function Lu(t, e) {
|
|
|
7032
7035
|
return n.initialize({ options: e });
|
|
7033
7036
|
}
|
|
7034
7037
|
function Ku(t, e) {
|
|
7035
|
-
const n = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(n) ? n : [n]).map(
|
|
7038
|
+
const n = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(n) ? n : [n]).map(ve);
|
|
7036
7039
|
e != null && e.errorMap && t._updateErrorMap(e.errorMap), t._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
|
7037
7040
|
}
|
|
7038
7041
|
function Ju(t, e, n) {
|
|
@@ -7228,7 +7231,7 @@ class Ze extends hi {
|
|
|
7228
7231
|
e.pendingToken = this.pendingToken;
|
|
7229
7232
|
else {
|
|
7230
7233
|
const n = {};
|
|
7231
|
-
this.idToken && (n.id_token = this.idToken), this.accessToken && (n.access_token = this.accessToken), this.secret && (n.oauth_token_secret = this.secret), n.providerId = this.providerId, this.nonce && !this.pendingToken && (n.nonce = this.nonce), e.postBody =
|
|
7234
|
+
this.idToken && (n.id_token = this.idToken), this.accessToken && (n.access_token = this.accessToken), this.secret && (n.oauth_token_secret = this.secret), n.providerId = this.providerId, this.nonce && !this.pendingToken && (n.nonce = this.nonce), e.postBody = Ot(n);
|
|
7232
7235
|
}
|
|
7233
7236
|
return e;
|
|
7234
7237
|
}
|
|
@@ -7249,7 +7252,7 @@ class Ze extends hi {
|
|
|
7249
7252
|
* See the License for the specific language governing permissions and
|
|
7250
7253
|
* limitations under the License.
|
|
7251
7254
|
*/
|
|
7252
|
-
class
|
|
7255
|
+
class fi {
|
|
7253
7256
|
/**
|
|
7254
7257
|
* Constructor for generic OAuth providers.
|
|
7255
7258
|
*
|
|
@@ -7302,7 +7305,7 @@ class mi {
|
|
|
7302
7305
|
* See the License for the specific language governing permissions and
|
|
7303
7306
|
* limitations under the License.
|
|
7304
7307
|
*/
|
|
7305
|
-
class
|
|
7308
|
+
class jt extends fi {
|
|
7306
7309
|
constructor() {
|
|
7307
7310
|
super(...arguments), this.scopes = [];
|
|
7308
7311
|
}
|
|
@@ -7337,7 +7340,7 @@ class Gt extends mi {
|
|
|
7337
7340
|
* See the License for the specific language governing permissions and
|
|
7338
7341
|
* limitations under the License.
|
|
7339
7342
|
*/
|
|
7340
|
-
class Ie extends
|
|
7343
|
+
class Ie extends jt {
|
|
7341
7344
|
constructor() {
|
|
7342
7345
|
super(
|
|
7343
7346
|
"facebook.com"
|
|
@@ -7408,7 +7411,7 @@ Ie.PROVIDER_ID = "facebook.com";
|
|
|
7408
7411
|
* See the License for the specific language governing permissions and
|
|
7409
7412
|
* limitations under the License.
|
|
7410
7413
|
*/
|
|
7411
|
-
class Pe extends
|
|
7414
|
+
class Pe extends jt {
|
|
7412
7415
|
constructor() {
|
|
7413
7416
|
super(
|
|
7414
7417
|
"google.com"
|
|
@@ -7484,7 +7487,7 @@ Pe.PROVIDER_ID = "google.com";
|
|
|
7484
7487
|
* See the License for the specific language governing permissions and
|
|
7485
7488
|
* limitations under the License.
|
|
7486
7489
|
*/
|
|
7487
|
-
class Oe extends
|
|
7490
|
+
class Oe extends jt {
|
|
7488
7491
|
constructor() {
|
|
7489
7492
|
super(
|
|
7490
7493
|
"github.com"
|
|
@@ -7548,7 +7551,7 @@ Oe.PROVIDER_ID = "github.com";
|
|
|
7548
7551
|
* See the License for the specific language governing permissions and
|
|
7549
7552
|
* limitations under the License.
|
|
7550
7553
|
*/
|
|
7551
|
-
class Te extends
|
|
7554
|
+
class Te extends jt {
|
|
7552
7555
|
constructor() {
|
|
7553
7556
|
super(
|
|
7554
7557
|
"twitter.com"
|
|
@@ -7664,10 +7667,10 @@ function Mr(t) {
|
|
|
7664
7667
|
* See the License for the specific language governing permissions and
|
|
7665
7668
|
* limitations under the License.
|
|
7666
7669
|
*/
|
|
7667
|
-
class
|
|
7670
|
+
class Kt extends qe {
|
|
7668
7671
|
constructor(e, n, r, s) {
|
|
7669
7672
|
var i;
|
|
7670
|
-
super(n.code, n.message), this.operationType = r, this.user = s, Object.setPrototypeOf(this,
|
|
7673
|
+
super(n.code, n.message), this.operationType = r, this.user = s, Object.setPrototypeOf(this, Kt.prototype), this.customData = {
|
|
7671
7674
|
appName: e.name,
|
|
7672
7675
|
tenantId: (i = e.tenantId) !== null && i !== void 0 ? i : void 0,
|
|
7673
7676
|
_serverResponse: n.customData._serverResponse,
|
|
@@ -7675,16 +7678,16 @@ class Lt extends qe {
|
|
|
7675
7678
|
};
|
|
7676
7679
|
}
|
|
7677
7680
|
static _fromErrorAndOperation(e, n, r, s) {
|
|
7678
|
-
return new
|
|
7681
|
+
return new Kt(e, n, r, s);
|
|
7679
7682
|
}
|
|
7680
7683
|
}
|
|
7681
|
-
function
|
|
7684
|
+
function mi(t, e, n, r) {
|
|
7682
7685
|
return (e === "reauthenticate" ? n._getReauthenticationResolver(t) : n._getIdTokenResponse(t)).catch((i) => {
|
|
7683
|
-
throw i.code === "auth/multi-factor-auth-required" ?
|
|
7686
|
+
throw i.code === "auth/multi-factor-auth-required" ? Kt._fromErrorAndOperation(t, i, e, r) : i;
|
|
7684
7687
|
});
|
|
7685
7688
|
}
|
|
7686
7689
|
async function tl(t, e, n = !1) {
|
|
7687
|
-
const r = await
|
|
7690
|
+
const r = await Bt(t, e._linkToIdToken(t.auth, await t.getIdToken()), n);
|
|
7688
7691
|
return Le._forOperation(t, "link", r);
|
|
7689
7692
|
}
|
|
7690
7693
|
/**
|
|
@@ -7709,7 +7712,7 @@ async function nl(t, e, n = !1) {
|
|
|
7709
7712
|
return Promise.reject(Re(r));
|
|
7710
7713
|
const s = "reauthenticate";
|
|
7711
7714
|
try {
|
|
7712
|
-
const i = await
|
|
7715
|
+
const i = await Bt(t, mi(r, s, e, t), n);
|
|
7713
7716
|
M(
|
|
7714
7717
|
i.idToken,
|
|
7715
7718
|
r,
|
|
@@ -7757,7 +7760,7 @@ async function nl(t, e, n = !1) {
|
|
|
7757
7760
|
async function rl(t, e, n = !1) {
|
|
7758
7761
|
if (pe(t.app))
|
|
7759
7762
|
return Promise.reject(Re(t));
|
|
7760
|
-
const r = "signIn", s = await
|
|
7763
|
+
const r = "signIn", s = await mi(t, r, e), i = await Le._fromIdTokenResponse(t, r, s);
|
|
7761
7764
|
return n || await t._updateCurrentUser(i.user), i;
|
|
7762
7765
|
}
|
|
7763
7766
|
/**
|
|
@@ -7810,7 +7813,7 @@ function al(t, e, n, r) {
|
|
|
7810
7813
|
function ol(t, e, n) {
|
|
7811
7814
|
return ht(t).beforeAuthStateChanged(e, n);
|
|
7812
7815
|
}
|
|
7813
|
-
const
|
|
7816
|
+
const Jt = "__sak";
|
|
7814
7817
|
/**
|
|
7815
7818
|
* @license
|
|
7816
7819
|
* Copyright 2019 Google LLC
|
|
@@ -7833,7 +7836,7 @@ class gi {
|
|
|
7833
7836
|
}
|
|
7834
7837
|
_isAvailable() {
|
|
7835
7838
|
try {
|
|
7836
|
-
return this.storage ? (this.storage.setItem(
|
|
7839
|
+
return this.storage ? (this.storage.setItem(Jt, "1"), this.storage.removeItem(Jt), Promise.resolve(!0)) : Promise.resolve(!1);
|
|
7837
7840
|
} catch {
|
|
7838
7841
|
return Promise.resolve(!1);
|
|
7839
7842
|
}
|
|
@@ -8170,7 +8173,7 @@ class dl {
|
|
|
8170
8173
|
return new Promise((c, l) => {
|
|
8171
8174
|
const A = _n("", 20);
|
|
8172
8175
|
s.port1.start();
|
|
8173
|
-
const
|
|
8176
|
+
const m = setTimeout(() => {
|
|
8174
8177
|
l(new Error(
|
|
8175
8178
|
"unsupported_event"
|
|
8176
8179
|
/* _MessageError.UNSUPPORTED_EVENT */
|
|
@@ -8183,7 +8186,7 @@ class dl {
|
|
|
8183
8186
|
if (B.data.eventId === A)
|
|
8184
8187
|
switch (B.data.status) {
|
|
8185
8188
|
case "ack":
|
|
8186
|
-
clearTimeout(
|
|
8189
|
+
clearTimeout(m), i = setTimeout(
|
|
8187
8190
|
() => {
|
|
8188
8191
|
l(new Error(
|
|
8189
8192
|
"timeout"
|
|
@@ -8198,7 +8201,7 @@ class dl {
|
|
|
8198
8201
|
clearTimeout(i), c(B.data.response);
|
|
8199
8202
|
break;
|
|
8200
8203
|
default:
|
|
8201
|
-
clearTimeout(
|
|
8204
|
+
clearTimeout(m), clearTimeout(i), l(new Error(
|
|
8202
8205
|
"invalid_response"
|
|
8203
8206
|
/* _MessageError.INVALID_RESPONSE */
|
|
8204
8207
|
));
|
|
@@ -8253,10 +8256,10 @@ function hl(t) {
|
|
|
8253
8256
|
* See the License for the specific language governing permissions and
|
|
8254
8257
|
* limitations under the License.
|
|
8255
8258
|
*/
|
|
8256
|
-
function
|
|
8259
|
+
function vi() {
|
|
8257
8260
|
return typeof de().WorkerGlobalScope < "u" && typeof de().importScripts == "function";
|
|
8258
8261
|
}
|
|
8259
|
-
async function
|
|
8262
|
+
async function fl() {
|
|
8260
8263
|
if (!(navigator != null && navigator.serviceWorker))
|
|
8261
8264
|
return null;
|
|
8262
8265
|
try {
|
|
@@ -8265,12 +8268,12 @@ async function ml() {
|
|
|
8265
8268
|
return null;
|
|
8266
8269
|
}
|
|
8267
8270
|
}
|
|
8268
|
-
function
|
|
8271
|
+
function ml() {
|
|
8269
8272
|
var t;
|
|
8270
8273
|
return ((t = navigator == null ? void 0 : navigator.serviceWorker) === null || t === void 0 ? void 0 : t.controller) || null;
|
|
8271
8274
|
}
|
|
8272
8275
|
function gl() {
|
|
8273
|
-
return
|
|
8276
|
+
return vi() ? self : null;
|
|
8274
8277
|
}
|
|
8275
8278
|
/**
|
|
8276
8279
|
* @license
|
|
@@ -8288,8 +8291,8 @@ function gl() {
|
|
|
8288
8291
|
* See the License for the specific language governing permissions and
|
|
8289
8292
|
* limitations under the License.
|
|
8290
8293
|
*/
|
|
8291
|
-
const
|
|
8292
|
-
class
|
|
8294
|
+
const wi = "firebaseLocalStorageDb", pl = 1, _t = "firebaseLocalStorage", Bi = "fbase_key";
|
|
8295
|
+
class Yt {
|
|
8293
8296
|
constructor(e) {
|
|
8294
8297
|
this.request = e;
|
|
8295
8298
|
}
|
|
@@ -8304,27 +8307,27 @@ class jt {
|
|
|
8304
8307
|
}
|
|
8305
8308
|
}
|
|
8306
8309
|
function cn(t, e) {
|
|
8307
|
-
return t.transaction([
|
|
8310
|
+
return t.transaction([_t], e ? "readwrite" : "readonly").objectStore(_t);
|
|
8308
8311
|
}
|
|
8309
8312
|
function yl() {
|
|
8310
|
-
const t = indexedDB.deleteDatabase(
|
|
8311
|
-
return new
|
|
8313
|
+
const t = indexedDB.deleteDatabase(wi);
|
|
8314
|
+
return new Yt(t).toPromise();
|
|
8312
8315
|
}
|
|
8313
8316
|
function jn() {
|
|
8314
|
-
const t = indexedDB.open(
|
|
8317
|
+
const t = indexedDB.open(wi, pl);
|
|
8315
8318
|
return new Promise((e, n) => {
|
|
8316
8319
|
t.addEventListener("error", () => {
|
|
8317
8320
|
n(t.error);
|
|
8318
8321
|
}), t.addEventListener("upgradeneeded", () => {
|
|
8319
8322
|
const r = t.result;
|
|
8320
8323
|
try {
|
|
8321
|
-
r.createObjectStore(
|
|
8324
|
+
r.createObjectStore(_t, { keyPath: Bi });
|
|
8322
8325
|
} catch (s) {
|
|
8323
8326
|
n(s);
|
|
8324
8327
|
}
|
|
8325
8328
|
}), t.addEventListener("success", async () => {
|
|
8326
8329
|
const r = t.result;
|
|
8327
|
-
r.objectStoreNames.contains(
|
|
8330
|
+
r.objectStoreNames.contains(_t) ? e(r) : (r.close(), await yl(), e(await jn()));
|
|
8328
8331
|
});
|
|
8329
8332
|
});
|
|
8330
8333
|
}
|
|
@@ -8333,17 +8336,17 @@ async function Ir(t, e, n) {
|
|
|
8333
8336
|
[Bi]: e,
|
|
8334
8337
|
value: n
|
|
8335
8338
|
});
|
|
8336
|
-
return new
|
|
8339
|
+
return new Yt(r).toPromise();
|
|
8337
8340
|
}
|
|
8338
8341
|
async function bl(t, e) {
|
|
8339
|
-
const n = cn(t, !1).get(e), r = await new
|
|
8342
|
+
const n = cn(t, !1).get(e), r = await new Yt(n).toPromise();
|
|
8340
8343
|
return r === void 0 ? null : r.value;
|
|
8341
8344
|
}
|
|
8342
8345
|
function Pr(t, e) {
|
|
8343
8346
|
const n = cn(t, !0).delete(e);
|
|
8344
|
-
return new
|
|
8347
|
+
return new Yt(n).toPromise();
|
|
8345
8348
|
}
|
|
8346
|
-
const
|
|
8349
|
+
const vl = 800, wl = 3;
|
|
8347
8350
|
class Di {
|
|
8348
8351
|
constructor() {
|
|
8349
8352
|
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(() => {
|
|
@@ -8360,7 +8363,7 @@ class Di {
|
|
|
8360
8363
|
const r = await this._openDb();
|
|
8361
8364
|
return await e(r);
|
|
8362
8365
|
} catch (r) {
|
|
8363
|
-
if (n++ >
|
|
8366
|
+
if (n++ > wl)
|
|
8364
8367
|
throw r;
|
|
8365
8368
|
this.db && (this.db.close(), this.db = void 0);
|
|
8366
8369
|
}
|
|
@@ -8370,7 +8373,7 @@ class Di {
|
|
|
8370
8373
|
* postMessage interface to send these events to the worker ourselves.
|
|
8371
8374
|
*/
|
|
8372
8375
|
async initializeServiceWorkerMessaging() {
|
|
8373
|
-
return
|
|
8376
|
+
return vi() ? this.initializeReceiver() : this.initializeSender();
|
|
8374
8377
|
}
|
|
8375
8378
|
/**
|
|
8376
8379
|
* As the worker we should listen to events from the main window.
|
|
@@ -8392,7 +8395,7 @@ class Di {
|
|
|
8392
8395
|
*/
|
|
8393
8396
|
async initializeSender() {
|
|
8394
8397
|
var e, n;
|
|
8395
|
-
if (this.activeServiceWorker = await
|
|
8398
|
+
if (this.activeServiceWorker = await fl(), !this.activeServiceWorker)
|
|
8396
8399
|
return;
|
|
8397
8400
|
this.sender = new dl(this.activeServiceWorker);
|
|
8398
8401
|
const r = await this.sender._send(
|
|
@@ -8416,7 +8419,7 @@ class Di {
|
|
|
8416
8419
|
* @param key - Storage key which changed.
|
|
8417
8420
|
*/
|
|
8418
8421
|
async notifyServiceWorker(e) {
|
|
8419
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
8422
|
+
if (!(!this.sender || !this.activeServiceWorker || ml() !== this.activeServiceWorker))
|
|
8420
8423
|
try {
|
|
8421
8424
|
await this.sender._send(
|
|
8422
8425
|
"keyChanged",
|
|
@@ -8433,7 +8436,7 @@ class Di {
|
|
|
8433
8436
|
if (!indexedDB)
|
|
8434
8437
|
return !1;
|
|
8435
8438
|
const e = await jn();
|
|
8436
|
-
return await Ir(e,
|
|
8439
|
+
return await Ir(e, Jt, "1"), await Pr(e, Jt), !0;
|
|
8437
8440
|
} catch {
|
|
8438
8441
|
}
|
|
8439
8442
|
return !1;
|
|
@@ -8459,7 +8462,7 @@ class Di {
|
|
|
8459
8462
|
async _poll() {
|
|
8460
8463
|
const e = await this._withRetries((s) => {
|
|
8461
8464
|
const i = cn(s, !1).getAll();
|
|
8462
|
-
return new
|
|
8465
|
+
return new Yt(i).toPromise();
|
|
8463
8466
|
});
|
|
8464
8467
|
if (!e)
|
|
8465
8468
|
return [];
|
|
@@ -8481,7 +8484,7 @@ class Di {
|
|
|
8481
8484
|
s(n);
|
|
8482
8485
|
}
|
|
8483
8486
|
startPolling() {
|
|
8484
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
8487
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), vl);
|
|
8485
8488
|
}
|
|
8486
8489
|
stopPolling() {
|
|
8487
8490
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -8495,7 +8498,7 @@ class Di {
|
|
|
8495
8498
|
}
|
|
8496
8499
|
Di.type = "LOCAL";
|
|
8497
8500
|
const Bl = Di;
|
|
8498
|
-
new
|
|
8501
|
+
new Gt(3e4, 6e4);
|
|
8499
8502
|
/**
|
|
8500
8503
|
* @license
|
|
8501
8504
|
* Copyright 2021 Google LLC
|
|
@@ -8513,7 +8516,7 @@ new Tt(3e4, 6e4);
|
|
|
8513
8516
|
* limitations under the License.
|
|
8514
8517
|
*/
|
|
8515
8518
|
function Dl(t, e) {
|
|
8516
|
-
return e ?
|
|
8519
|
+
return e ? ve(e) : (M(
|
|
8517
8520
|
t._popupRedirectResolver,
|
|
8518
8521
|
t,
|
|
8519
8522
|
"argument-error"
|
|
@@ -8686,7 +8689,7 @@ class Ci {
|
|
|
8686
8689
|
* See the License for the specific language governing permissions and
|
|
8687
8690
|
* limitations under the License.
|
|
8688
8691
|
*/
|
|
8689
|
-
const Il = new
|
|
8692
|
+
const Il = new Gt(2e3, 1e4);
|
|
8690
8693
|
class _e extends Ci {
|
|
8691
8694
|
constructor(e, n, r, s, i) {
|
|
8692
8695
|
super(e, n, s, i), this.provider = r, this.authWindow = null, this.pollId = null, _e.currentPopupAction && _e.currentPopupAction.cancel(), _e.currentPopupAction = this;
|
|
@@ -8772,7 +8775,7 @@ _e.currentPopupAction = null;
|
|
|
8772
8775
|
* See the License for the specific language governing permissions and
|
|
8773
8776
|
* limitations under the License.
|
|
8774
8777
|
*/
|
|
8775
|
-
const Pl = "pendingRedirect",
|
|
8778
|
+
const Pl = "pendingRedirect", Qt = /* @__PURE__ */ new Map();
|
|
8776
8779
|
class Ol extends Ci {
|
|
8777
8780
|
constructor(e, n, r = !1) {
|
|
8778
8781
|
super(e, [
|
|
@@ -8788,7 +8791,7 @@ class Ol extends Ci {
|
|
|
8788
8791
|
* just return it.
|
|
8789
8792
|
*/
|
|
8790
8793
|
async execute() {
|
|
8791
|
-
let e =
|
|
8794
|
+
let e = Qt.get(this.auth._key());
|
|
8792
8795
|
if (!e) {
|
|
8793
8796
|
try {
|
|
8794
8797
|
const r = await Tl(this.resolver, this.auth) ? await super.execute() : null;
|
|
@@ -8796,9 +8799,9 @@ class Ol extends Ci {
|
|
|
8796
8799
|
} catch (n) {
|
|
8797
8800
|
e = () => Promise.reject(n);
|
|
8798
8801
|
}
|
|
8799
|
-
|
|
8802
|
+
Qt.set(this.auth._key(), e);
|
|
8800
8803
|
}
|
|
8801
|
-
return this.bypassAuthState ||
|
|
8804
|
+
return this.bypassAuthState || Qt.set(this.auth._key(), () => Promise.resolve(null)), e();
|
|
8802
8805
|
}
|
|
8803
8806
|
async onAuthEvent(e) {
|
|
8804
8807
|
if (e.type === "signInViaRedirect")
|
|
@@ -8827,13 +8830,13 @@ async function Tl(t, e) {
|
|
|
8827
8830
|
return await r._remove(n), s;
|
|
8828
8831
|
}
|
|
8829
8832
|
function Gl(t, e) {
|
|
8830
|
-
|
|
8833
|
+
Qt.set(t._key(), e);
|
|
8831
8834
|
}
|
|
8832
8835
|
function jl(t) {
|
|
8833
|
-
return
|
|
8836
|
+
return ve(t._redirectPersistence);
|
|
8834
8837
|
}
|
|
8835
8838
|
function Yl(t) {
|
|
8836
|
-
return
|
|
8839
|
+
return Ht(Pl, t.config.apiKey, t.name);
|
|
8837
8840
|
}
|
|
8838
8841
|
async function Vl(t, e, n = !1) {
|
|
8839
8842
|
if (pe(t.app))
|
|
@@ -8930,7 +8933,7 @@ function kl(t) {
|
|
|
8930
8933
|
* limitations under the License.
|
|
8931
8934
|
*/
|
|
8932
8935
|
async function Rl(t, e = {}) {
|
|
8933
|
-
return
|
|
8936
|
+
return ft(t, "GET", "/v1/projects", e);
|
|
8934
8937
|
}
|
|
8935
8938
|
/**
|
|
8936
8939
|
* @license
|
|
@@ -8994,7 +8997,7 @@ function Ql(t) {
|
|
|
8994
8997
|
* See the License for the specific language governing permissions and
|
|
8995
8998
|
* limitations under the License.
|
|
8996
8999
|
*/
|
|
8997
|
-
const Xl = new
|
|
9000
|
+
const Xl = new Gt(3e4, 6e4);
|
|
8998
9001
|
function Tr() {
|
|
8999
9002
|
const t = de().___jsl;
|
|
9000
9003
|
if (t != null && t.H) {
|
|
@@ -9037,12 +9040,12 @@ function Sl(t) {
|
|
|
9037
9040
|
}, Wu(`${zu()}?onload=${c}`).catch((l) => n(l));
|
|
9038
9041
|
}
|
|
9039
9042
|
}).catch((e) => {
|
|
9040
|
-
throw
|
|
9043
|
+
throw Xt = null, e;
|
|
9041
9044
|
});
|
|
9042
9045
|
}
|
|
9043
|
-
let
|
|
9046
|
+
let Xt = null;
|
|
9044
9047
|
function Ul(t) {
|
|
9045
|
-
return
|
|
9048
|
+
return Xt = Xt || Sl(t), Xt;
|
|
9046
9049
|
}
|
|
9047
9050
|
/**
|
|
9048
9051
|
* @license
|
|
@@ -9060,7 +9063,7 @@ function Ul(t) {
|
|
|
9060
9063
|
* See the License for the specific language governing permissions and
|
|
9061
9064
|
* limitations under the License.
|
|
9062
9065
|
*/
|
|
9063
|
-
const Wl = new
|
|
9066
|
+
const Wl = new Gt(5e3, 15e3), zl = "__/auth/iframe", Zl = "emulator/auth/iframe", Ll = {
|
|
9064
9067
|
style: {
|
|
9065
9068
|
position: "absolute",
|
|
9066
9069
|
top: "-100px",
|
|
@@ -9086,11 +9089,11 @@ function Jl(t) {
|
|
|
9086
9089
|
const n = e.emulator ? Zn(e, Zl) : `https://${t.config.authDomain}/${zl}`, r = {
|
|
9087
9090
|
apiKey: e.apiKey,
|
|
9088
9091
|
appName: t.name,
|
|
9089
|
-
v:
|
|
9092
|
+
v: Tt
|
|
9090
9093
|
}, s = Kl.get(t.config.apiHost);
|
|
9091
9094
|
s && (r.eid = s);
|
|
9092
9095
|
const i = t._getFrameworks();
|
|
9093
|
-
return i.length && (r.fw = i.join(",")), `${n}?${
|
|
9096
|
+
return i.length && (r.fw = i.join(",")), `${n}?${Ot(r).slice(1)}`;
|
|
9094
9097
|
}
|
|
9095
9098
|
async function _l(t) {
|
|
9096
9099
|
const e = await Ul(t), n = de().gapi;
|
|
@@ -9169,10 +9172,10 @@ function sA(t, e, n, r = eA, s = tA) {
|
|
|
9169
9172
|
left: a
|
|
9170
9173
|
}), A = K().toLowerCase();
|
|
9171
9174
|
n && (c = ii(A) ? nA : n), ri(A) && (e = e || rA, l.scrollbars = "yes");
|
|
9172
|
-
const
|
|
9175
|
+
const m = Object.entries(l).reduce((B, [w, O]) => `${B}${w}=${O},`, "");
|
|
9173
9176
|
if (Ru(A) && c !== "_self")
|
|
9174
9177
|
return iA(e || "", c), new Gr(null);
|
|
9175
|
-
const p = window.open(e || "", c,
|
|
9178
|
+
const p = window.open(e || "", c, m);
|
|
9176
9179
|
M(
|
|
9177
9180
|
p,
|
|
9178
9181
|
t,
|
|
@@ -9225,24 +9228,24 @@ async function jr(t, e, n, r, s, i) {
|
|
|
9225
9228
|
appName: t.name,
|
|
9226
9229
|
authType: n,
|
|
9227
9230
|
redirectUrl: r,
|
|
9228
|
-
v:
|
|
9231
|
+
v: Tt,
|
|
9229
9232
|
eventId: s
|
|
9230
9233
|
};
|
|
9231
|
-
if (e instanceof
|
|
9234
|
+
if (e instanceof fi) {
|
|
9232
9235
|
e.setDefaultLanguage(t.languageCode), a.providerId = e.providerId || "", cc(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
9233
|
-
for (const [
|
|
9234
|
-
a[
|
|
9236
|
+
for (const [m, p] of Object.entries({}))
|
|
9237
|
+
a[m] = p;
|
|
9235
9238
|
}
|
|
9236
|
-
if (e instanceof
|
|
9237
|
-
const
|
|
9238
|
-
|
|
9239
|
+
if (e instanceof jt) {
|
|
9240
|
+
const m = e.getScopes().filter((p) => p !== "");
|
|
9241
|
+
m.length > 0 && (a.scopes = m.join(","));
|
|
9239
9242
|
}
|
|
9240
9243
|
t.tenantId && (a.tid = t.tenantId);
|
|
9241
9244
|
const c = a;
|
|
9242
|
-
for (const
|
|
9243
|
-
c[
|
|
9245
|
+
for (const m of Object.keys(c))
|
|
9246
|
+
c[m] === void 0 && delete c[m];
|
|
9244
9247
|
const l = await t._getAppCheckToken(), A = l ? `#${cA}=${encodeURIComponent(l)}` : "";
|
|
9245
|
-
return `${uA(t)}?${
|
|
9248
|
+
return `${uA(t)}?${Ot(c).slice(1)}${A}`;
|
|
9246
9249
|
}
|
|
9247
9250
|
function uA({ config: t }) {
|
|
9248
9251
|
return t.emulator ? Zn(t, oA) : `https://${t.authDomain}/${aA}`;
|
|
@@ -9409,8 +9412,8 @@ function hA(t) {
|
|
|
9409
9412
|
return;
|
|
9410
9413
|
}
|
|
9411
9414
|
}
|
|
9412
|
-
function
|
|
9413
|
-
|
|
9415
|
+
function fA(t) {
|
|
9416
|
+
vt(new dt(
|
|
9414
9417
|
"auth",
|
|
9415
9418
|
(e, { options: n }) => {
|
|
9416
9419
|
const r = e.getProvider("app").getImmediate(), s = e.getProvider("heartbeat"), i = e.getProvider("app-check-internal"), { apiKey: a, authDomain: c } = r.options;
|
|
@@ -9436,7 +9439,7 @@ function mA(t) {
|
|
|
9436
9439
|
"auth-internal"
|
|
9437
9440
|
/* _ComponentName.AUTH_INTERNAL */
|
|
9438
9441
|
).initialize();
|
|
9439
|
-
})),
|
|
9442
|
+
})), vt(new dt(
|
|
9440
9443
|
"auth-internal",
|
|
9441
9444
|
(e) => {
|
|
9442
9445
|
const n = an(e.getProvider(
|
|
@@ -9468,7 +9471,7 @@ function mA(t) {
|
|
|
9468
9471
|
* See the License for the specific language governing permissions and
|
|
9469
9472
|
* limitations under the License.
|
|
9470
9473
|
*/
|
|
9471
|
-
const
|
|
9474
|
+
const mA = 5 * 60, gA = qs("authIdTokenMaxAge") || mA;
|
|
9472
9475
|
let xr = null;
|
|
9473
9476
|
const pA = (t) => async (e) => {
|
|
9474
9477
|
const n = e && await e.getIdTokenResult(), r = n && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(n.issuedAtTime)) / 1e3;
|
|
@@ -9525,7 +9528,7 @@ Uu({
|
|
|
9525
9528
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
9526
9529
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
9527
9530
|
});
|
|
9528
|
-
|
|
9531
|
+
fA(
|
|
9529
9532
|
"Browser"
|
|
9530
9533
|
/* ClientPlatform.BROWSER */
|
|
9531
9534
|
);
|
|
@@ -9545,7 +9548,7 @@ var un = class {
|
|
|
9545
9548
|
}
|
|
9546
9549
|
onUnsubscribe() {
|
|
9547
9550
|
}
|
|
9548
|
-
}, He, Ge, rt, Xr,
|
|
9551
|
+
}, He, Ge, rt, Xr, vA = (Xr = class extends un {
|
|
9549
9552
|
constructor() {
|
|
9550
9553
|
super();
|
|
9551
9554
|
G(this, He);
|
|
@@ -9586,7 +9589,7 @@ var un = class {
|
|
|
9586
9589
|
var e;
|
|
9587
9590
|
return typeof h(this, He) == "boolean" ? h(this, He) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
9588
9591
|
}
|
|
9589
|
-
}, He = new WeakMap(), Ge = new WeakMap(), rt = new WeakMap(), Xr), Mi = new
|
|
9592
|
+
}, He = new WeakMap(), Ge = new WeakMap(), rt = new WeakMap(), Xr), Mi = new vA(), wA = {
|
|
9590
9593
|
// We need the wrapper function syntax below instead of direct references to
|
|
9591
9594
|
// global setTimeout etc.
|
|
9592
9595
|
//
|
|
@@ -9610,7 +9613,7 @@ var un = class {
|
|
|
9610
9613
|
//
|
|
9611
9614
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
9612
9615
|
// this class is unsafe internally to allow for extension.
|
|
9613
|
-
G(this, oe,
|
|
9616
|
+
G(this, oe, wA);
|
|
9614
9617
|
G(this, Qe, !1);
|
|
9615
9618
|
}
|
|
9616
9619
|
setTimeoutProvider(t) {
|
|
@@ -9666,7 +9669,7 @@ function Fr(t, e) {
|
|
|
9666
9669
|
if (r) {
|
|
9667
9670
|
if (e.queryHash !== er(a, e.options))
|
|
9668
9671
|
return !1;
|
|
9669
|
-
} else if (!
|
|
9672
|
+
} else if (!Ct(e.queryKey, a))
|
|
9670
9673
|
return !1;
|
|
9671
9674
|
}
|
|
9672
9675
|
if (n !== "all") {
|
|
@@ -9682,24 +9685,24 @@ function kr(t, e) {
|
|
|
9682
9685
|
if (!e.options.mutationKey)
|
|
9683
9686
|
return !1;
|
|
9684
9687
|
if (n) {
|
|
9685
|
-
if (
|
|
9688
|
+
if (Dt(e.options.mutationKey) !== Dt(i))
|
|
9686
9689
|
return !1;
|
|
9687
|
-
} else if (!
|
|
9690
|
+
} else if (!Ct(e.options.mutationKey, i))
|
|
9688
9691
|
return !1;
|
|
9689
9692
|
}
|
|
9690
9693
|
return !(r && e.state.status !== r || s && !s(e));
|
|
9691
9694
|
}
|
|
9692
9695
|
function er(t, e) {
|
|
9693
|
-
return ((e == null ? void 0 : e.queryKeyHashFn) ||
|
|
9696
|
+
return ((e == null ? void 0 : e.queryKeyHashFn) || Dt)(t);
|
|
9694
9697
|
}
|
|
9695
|
-
function
|
|
9698
|
+
function Dt(t) {
|
|
9696
9699
|
return JSON.stringify(
|
|
9697
9700
|
t,
|
|
9698
9701
|
(e, n) => Fn(n) ? Object.keys(n).sort().reduce((r, s) => (r[s] = n[s], r), {}) : n
|
|
9699
9702
|
);
|
|
9700
9703
|
}
|
|
9701
|
-
function
|
|
9702
|
-
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((n) =>
|
|
9704
|
+
function Ct(t, e) {
|
|
9705
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((n) => Ct(t[n], e[n])) : !1;
|
|
9703
9706
|
}
|
|
9704
9707
|
var OA = Object.prototype.hasOwnProperty;
|
|
9705
9708
|
function xn(t, e, n = 0) {
|
|
@@ -9710,17 +9713,17 @@ function xn(t, e, n = 0) {
|
|
|
9710
9713
|
if (!r && !(Fn(t) && Fn(e))) return e;
|
|
9711
9714
|
const i = (r ? t : Object.keys(t)).length, a = r ? e : Object.keys(e), c = a.length, l = r ? new Array(c) : {};
|
|
9712
9715
|
let A = 0;
|
|
9713
|
-
for (let
|
|
9714
|
-
const p = r ?
|
|
9715
|
-
if (B ===
|
|
9716
|
-
l[p] = B, (r ?
|
|
9716
|
+
for (let m = 0; m < c; m++) {
|
|
9717
|
+
const p = r ? m : a[m], B = t[p], w = e[p];
|
|
9718
|
+
if (B === w) {
|
|
9719
|
+
l[p] = B, (r ? m < i : OA.call(t, p)) && A++;
|
|
9717
9720
|
continue;
|
|
9718
9721
|
}
|
|
9719
|
-
if (B === null ||
|
|
9720
|
-
l[p] =
|
|
9722
|
+
if (B === null || w === null || typeof B != "object" || typeof w != "object") {
|
|
9723
|
+
l[p] = w;
|
|
9721
9724
|
continue;
|
|
9722
9725
|
}
|
|
9723
|
-
const O = xn(B,
|
|
9726
|
+
const O = xn(B, w, n + 1);
|
|
9724
9727
|
l[p] = O, O === B && A++;
|
|
9725
9728
|
}
|
|
9726
9729
|
return i === c && A === i ? t : l;
|
|
@@ -9780,11 +9783,11 @@ function YA(t, e, n = 0) {
|
|
|
9780
9783
|
const r = [e, ...t];
|
|
9781
9784
|
return n && r.length > n ? r.slice(0, -1) : r;
|
|
9782
9785
|
}
|
|
9783
|
-
var
|
|
9786
|
+
var $t = /* @__PURE__ */ Symbol();
|
|
9784
9787
|
function Ii(t, e) {
|
|
9785
|
-
return process.env.NODE_ENV !== "production" && t.queryFn ===
|
|
9788
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === $t && console.error(
|
|
9786
9789
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
9787
|
-
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn ===
|
|
9790
|
+
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === $t ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
9788
9791
|
}
|
|
9789
9792
|
function hd(t, e) {
|
|
9790
9793
|
return typeof t == "function" ? t(...e) : !!t;
|
|
@@ -9929,12 +9932,12 @@ var L = kA(), st, je, it, Ur, RA = (Ur = class extends un {
|
|
|
9929
9932
|
isOnline() {
|
|
9930
9933
|
return h(this, st);
|
|
9931
9934
|
}
|
|
9932
|
-
}, st = new WeakMap(), je = new WeakMap(), it = new WeakMap(), Ur),
|
|
9935
|
+
}, st = new WeakMap(), je = new WeakMap(), it = new WeakMap(), Ur), en = new RA();
|
|
9933
9936
|
function qA(t) {
|
|
9934
9937
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
9935
9938
|
}
|
|
9936
9939
|
function Oi(t) {
|
|
9937
|
-
return (t ?? "online") === "online" ?
|
|
9940
|
+
return (t ?? "online") === "online" ? en.isOnline() : !0;
|
|
9938
9941
|
}
|
|
9939
9942
|
var kn = class extends Error {
|
|
9940
9943
|
constructor(t) {
|
|
@@ -9953,11 +9956,11 @@ function Ti(t) {
|
|
|
9953
9956
|
e = !0;
|
|
9954
9957
|
}, l = () => {
|
|
9955
9958
|
e = !1;
|
|
9956
|
-
}, A = () => Mi.isFocused() && (t.networkMode === "always" ||
|
|
9959
|
+
}, A = () => Mi.isFocused() && (t.networkMode === "always" || en.isOnline()) && t.canRun(), m = () => Oi(t.networkMode) && t.canRun(), p = (I) => {
|
|
9957
9960
|
i() || (r == null || r(), s.resolve(I));
|
|
9958
9961
|
}, B = (I) => {
|
|
9959
9962
|
i() || (r == null || r(), s.reject(I));
|
|
9960
|
-
},
|
|
9963
|
+
}, w = () => new Promise((I) => {
|
|
9961
9964
|
var V;
|
|
9962
9965
|
r = (R) => {
|
|
9963
9966
|
(i() || A()) && I(R);
|
|
@@ -9979,12 +9982,12 @@ function Ti(t) {
|
|
|
9979
9982
|
var U;
|
|
9980
9983
|
if (i())
|
|
9981
9984
|
return;
|
|
9982
|
-
const Q = t.retry ?? (Pi.isServer() ? 0 : 3), Y = t.retryDelay ?? qA,
|
|
9985
|
+
const Q = t.retry ?? (Pi.isServer() ? 0 : 3), Y = t.retryDelay ?? qA, v = typeof Y == "function" ? Y(n, R) : Y, H = Q === !0 || typeof Q == "number" && n < Q || typeof Q == "function" && Q(n, R);
|
|
9983
9986
|
if (e || !H) {
|
|
9984
9987
|
B(R);
|
|
9985
9988
|
return;
|
|
9986
9989
|
}
|
|
9987
|
-
n++, (U = t.onFail) == null || U.call(t, n, R), TA(
|
|
9990
|
+
n++, (U = t.onFail) == null || U.call(t, n, R), TA(v).then(() => A() ? void 0 : w()).then(() => {
|
|
9988
9991
|
e ? B(R) : O();
|
|
9989
9992
|
});
|
|
9990
9993
|
});
|
|
@@ -9996,8 +9999,8 @@ function Ti(t) {
|
|
|
9996
9999
|
continue: () => (r == null || r(), s),
|
|
9997
10000
|
cancelRetry: c,
|
|
9998
10001
|
continueRetry: l,
|
|
9999
|
-
canStart:
|
|
10000
|
-
start: () => (
|
|
10002
|
+
canStart: m,
|
|
10003
|
+
start: () => (m() ? O() : w().then(O), s)
|
|
10001
10004
|
};
|
|
10002
10005
|
}
|
|
10003
10006
|
var Xe, Wr, Gi = (Wr = class {
|
|
@@ -10025,8 +10028,8 @@ var Xe, Wr, Gi = (Wr = class {
|
|
|
10025
10028
|
function NA(t) {
|
|
10026
10029
|
return {
|
|
10027
10030
|
onFetch: (e, n) => {
|
|
10028
|
-
var
|
|
10029
|
-
const r = e.options, s = (B = (p = (
|
|
10031
|
+
var m, p, B, w, O;
|
|
10032
|
+
const r = e.options, s = (B = (p = (m = e.fetchOptions) == null ? void 0 : m.meta) == null ? void 0 : p.fetchMore) == null ? void 0 : B.direction, i = ((w = e.state.data) == null ? void 0 : w.pages) || [], a = ((O = e.state.data) == null ? void 0 : O.pageParams) || [];
|
|
10030
10033
|
let c = { pages: [], pageParams: [] }, l = 0;
|
|
10031
10034
|
const A = async () => {
|
|
10032
10035
|
let I = !1;
|
|
@@ -10036,39 +10039,39 @@ function NA(t) {
|
|
|
10036
10039
|
() => e.signal,
|
|
10037
10040
|
() => I = !0
|
|
10038
10041
|
);
|
|
10039
|
-
}, R = Ii(e.options, e.fetchOptions), Q = async (Y,
|
|
10042
|
+
}, R = Ii(e.options, e.fetchOptions), Q = async (Y, v, H) => {
|
|
10040
10043
|
if (I)
|
|
10041
10044
|
return Promise.reject(e.signal.reason);
|
|
10042
|
-
if (
|
|
10045
|
+
if (v == null && Y.pages.length)
|
|
10043
10046
|
return Promise.resolve(Y);
|
|
10044
10047
|
const ee = (() => {
|
|
10045
10048
|
const g = {
|
|
10046
10049
|
client: e.client,
|
|
10047
10050
|
queryKey: e.queryKey,
|
|
10048
|
-
pageParam:
|
|
10051
|
+
pageParam: v,
|
|
10049
10052
|
direction: H ? "backward" : "forward",
|
|
10050
10053
|
meta: e.options.meta
|
|
10051
10054
|
};
|
|
10052
10055
|
return V(g), g;
|
|
10053
|
-
})(), q = await R(ee), { maxPages: u } = e.options,
|
|
10056
|
+
})(), q = await R(ee), { maxPages: u } = e.options, f = H ? YA : jA;
|
|
10054
10057
|
return {
|
|
10055
|
-
pages:
|
|
10056
|
-
pageParams:
|
|
10058
|
+
pages: f(Y.pages, q, u),
|
|
10059
|
+
pageParams: f(Y.pageParams, v, u)
|
|
10057
10060
|
};
|
|
10058
10061
|
};
|
|
10059
10062
|
if (s && i.length) {
|
|
10060
|
-
const Y = s === "backward",
|
|
10063
|
+
const Y = s === "backward", v = Y ? HA : Nr, H = {
|
|
10061
10064
|
pages: i,
|
|
10062
10065
|
pageParams: a
|
|
10063
|
-
}, U =
|
|
10066
|
+
}, U = v(r, H);
|
|
10064
10067
|
c = await Q(H, U, Y);
|
|
10065
10068
|
} else {
|
|
10066
10069
|
const Y = t ?? i.length;
|
|
10067
10070
|
do {
|
|
10068
|
-
const
|
|
10069
|
-
if (l > 0 &&
|
|
10071
|
+
const v = l === 0 ? a[0] ?? r.initialPageParam : Nr(r, c);
|
|
10072
|
+
if (l > 0 && v == null)
|
|
10070
10073
|
break;
|
|
10071
|
-
c = await Q(c,
|
|
10074
|
+
c = await Q(c, v), l++;
|
|
10072
10075
|
} while (l < Y);
|
|
10073
10076
|
}
|
|
10074
10077
|
return c;
|
|
@@ -10103,7 +10106,7 @@ function HA(t, { pages: e, pageParams: n }) {
|
|
|
10103
10106
|
var r;
|
|
10104
10107
|
return e.length > 0 ? (r = t.getPreviousPageParam) == null ? void 0 : r.call(t, e[0], e, n[0], n) : void 0;
|
|
10105
10108
|
}
|
|
10106
|
-
var at, Se, ot, re, Ue, S,
|
|
10109
|
+
var at, Se, ot, re, Ue, S, Et, We, ne, ji, fe, zr, QA = (zr = class extends Gi {
|
|
10107
10110
|
constructor(e) {
|
|
10108
10111
|
super();
|
|
10109
10112
|
G(this, ne);
|
|
@@ -10113,9 +10116,9 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10113
10116
|
G(this, re);
|
|
10114
10117
|
G(this, Ue);
|
|
10115
10118
|
G(this, S);
|
|
10116
|
-
G(this,
|
|
10119
|
+
G(this, Et);
|
|
10117
10120
|
G(this, We);
|
|
10118
|
-
D(this, We, !1), D(this,
|
|
10121
|
+
D(this, We, !1), D(this, Et, e.defaultOptions), this.setOptions(e.options), this.observers = [], D(this, Ue, e.client), D(this, re, h(this, Ue).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, D(this, Se, Qr(this.options)), this.state = e.state ?? h(this, Se), this.scheduleGc();
|
|
10119
10122
|
}
|
|
10120
10123
|
get meta() {
|
|
10121
10124
|
return this.options.meta;
|
|
@@ -10128,7 +10131,7 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10128
10131
|
return (e = h(this, S)) == null ? void 0 : e.promise;
|
|
10129
10132
|
}
|
|
10130
10133
|
setOptions(e) {
|
|
10131
|
-
if (this.options = { ...h(this,
|
|
10134
|
+
if (this.options = { ...h(this, Et), ...e }, e != null && e._type && D(this, at, e._type), this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
10132
10135
|
const n = Qr(this.options);
|
|
10133
10136
|
n.data !== void 0 && (this.setState(
|
|
10134
10137
|
Hr(n.data, n.dataUpdatedAt)
|
|
@@ -10140,7 +10143,7 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10140
10143
|
}
|
|
10141
10144
|
setData(e, n) {
|
|
10142
10145
|
const r = GA(this.state.data, e, this.options);
|
|
10143
|
-
return z(this, ne,
|
|
10146
|
+
return z(this, ne, fe).call(this, {
|
|
10144
10147
|
data: r,
|
|
10145
10148
|
type: "success",
|
|
10146
10149
|
dataUpdatedAt: n == null ? void 0 : n.updatedAt,
|
|
@@ -10148,7 +10151,7 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10148
10151
|
}), r;
|
|
10149
10152
|
}
|
|
10150
10153
|
setState(e) {
|
|
10151
|
-
z(this, ne,
|
|
10154
|
+
z(this, ne, fe).call(this, { type: "setState", state: e });
|
|
10152
10155
|
}
|
|
10153
10156
|
cancel(e) {
|
|
10154
10157
|
var r, s;
|
|
@@ -10170,7 +10173,7 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10170
10173
|
);
|
|
10171
10174
|
}
|
|
10172
10175
|
isDisabled() {
|
|
10173
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
10176
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === $t || !this.isFetched();
|
|
10174
10177
|
}
|
|
10175
10178
|
isFetched() {
|
|
10176
10179
|
return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
|
|
@@ -10208,10 +10211,10 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10208
10211
|
return this.observers.length;
|
|
10209
10212
|
}
|
|
10210
10213
|
invalidate() {
|
|
10211
|
-
this.state.isInvalidated || z(this, ne,
|
|
10214
|
+
this.state.isInvalidated || z(this, ne, fe).call(this, { type: "invalidate" });
|
|
10212
10215
|
}
|
|
10213
10216
|
async fetch(e, n) {
|
|
10214
|
-
var A,
|
|
10217
|
+
var A, m, p, B, w, O, I, V, R, Q, Y;
|
|
10215
10218
|
if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
|
|
10216
10219
|
// re-start the fetch; there is a chance that the query is still in a
|
|
10217
10220
|
// pending state when that happens
|
|
@@ -10222,19 +10225,19 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10222
10225
|
return h(this, S).continueRetry(), h(this, S).promise;
|
|
10223
10226
|
}
|
|
10224
10227
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
10225
|
-
const
|
|
10226
|
-
|
|
10228
|
+
const v = this.observers.find((H) => H.options.queryFn);
|
|
10229
|
+
v && this.setOptions(v.options);
|
|
10227
10230
|
}
|
|
10228
10231
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
10229
10232
|
"As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
|
|
10230
10233
|
));
|
|
10231
|
-
const r = new AbortController(), s = (
|
|
10232
|
-
Object.defineProperty(
|
|
10234
|
+
const r = new AbortController(), s = (v) => {
|
|
10235
|
+
Object.defineProperty(v, "signal", {
|
|
10233
10236
|
enumerable: !0,
|
|
10234
10237
|
get: () => (D(this, We, !0), r.signal)
|
|
10235
10238
|
});
|
|
10236
10239
|
}, i = () => {
|
|
10237
|
-
const
|
|
10240
|
+
const v = Ii(this.options, n), U = (() => {
|
|
10238
10241
|
const ee = {
|
|
10239
10242
|
client: h(this, Ue),
|
|
10240
10243
|
queryKey: this.queryKey,
|
|
@@ -10243,12 +10246,12 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10243
10246
|
return s(ee), ee;
|
|
10244
10247
|
})();
|
|
10245
10248
|
return D(this, We, !1), this.options.persister ? this.options.persister(
|
|
10246
|
-
|
|
10249
|
+
v,
|
|
10247
10250
|
U,
|
|
10248
10251
|
this
|
|
10249
|
-
) :
|
|
10252
|
+
) : v(U);
|
|
10250
10253
|
}, c = (() => {
|
|
10251
|
-
const
|
|
10254
|
+
const v = {
|
|
10252
10255
|
fetchOptions: n,
|
|
10253
10256
|
options: this.options,
|
|
10254
10257
|
queryKey: this.queryKey,
|
|
@@ -10256,27 +10259,27 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10256
10259
|
state: this.state,
|
|
10257
10260
|
fetchFn: i
|
|
10258
10261
|
};
|
|
10259
|
-
return s(
|
|
10262
|
+
return s(v), v;
|
|
10260
10263
|
})(), l = h(this, at) === "infinite" ? NA(
|
|
10261
10264
|
this.options.pages
|
|
10262
10265
|
) : this.options.behavior;
|
|
10263
|
-
l == null || l.onFetch(c, this), D(this, ot, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((
|
|
10266
|
+
l == null || l.onFetch(c, this), D(this, ot, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = c.fetchOptions) == null ? void 0 : m.meta)) && z(this, ne, fe).call(this, { type: "fetch", meta: (p = c.fetchOptions) == null ? void 0 : p.meta }), D(this, S, Ti({
|
|
10264
10267
|
initialPromise: n == null ? void 0 : n.initialPromise,
|
|
10265
10268
|
fn: c.fetchFn,
|
|
10266
|
-
onCancel: (
|
|
10267
|
-
|
|
10269
|
+
onCancel: (v) => {
|
|
10270
|
+
v instanceof kn && v.revert && this.setState({
|
|
10268
10271
|
...h(this, ot),
|
|
10269
10272
|
fetchStatus: "idle"
|
|
10270
10273
|
}), r.abort();
|
|
10271
10274
|
},
|
|
10272
|
-
onFail: (
|
|
10273
|
-
z(this, ne,
|
|
10275
|
+
onFail: (v, H) => {
|
|
10276
|
+
z(this, ne, fe).call(this, { type: "failed", failureCount: v, error: H });
|
|
10274
10277
|
},
|
|
10275
10278
|
onPause: () => {
|
|
10276
|
-
z(this, ne,
|
|
10279
|
+
z(this, ne, fe).call(this, { type: "pause" });
|
|
10277
10280
|
},
|
|
10278
10281
|
onContinue: () => {
|
|
10279
|
-
z(this, ne,
|
|
10282
|
+
z(this, ne, fe).call(this, { type: "continue" });
|
|
10280
10283
|
},
|
|
10281
10284
|
retry: c.options.retry,
|
|
10282
10285
|
retryDelay: c.options.retryDelay,
|
|
@@ -10284,47 +10287,47 @@ var at, Se, ot, re, Ue, S, Ct, We, ne, ji, me, zr, QA = (zr = class extends Gi {
|
|
|
10284
10287
|
canRun: () => !0
|
|
10285
10288
|
}));
|
|
10286
10289
|
try {
|
|
10287
|
-
const
|
|
10288
|
-
if (
|
|
10290
|
+
const v = await h(this, S).start();
|
|
10291
|
+
if (v === void 0)
|
|
10289
10292
|
throw process.env.NODE_ENV !== "production" && console.error(
|
|
10290
10293
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
10291
10294
|
), new Error(`${this.queryHash} data is undefined`);
|
|
10292
|
-
return this.setData(
|
|
10295
|
+
return this.setData(v), (w = (B = h(this, re).config).onSuccess) == null || w.call(B, v, this), (I = (O = h(this, re).config).onSettled) == null || I.call(
|
|
10293
10296
|
O,
|
|
10294
|
-
|
|
10297
|
+
v,
|
|
10295
10298
|
this.state.error,
|
|
10296
10299
|
this
|
|
10297
|
-
),
|
|
10298
|
-
} catch (
|
|
10299
|
-
if (
|
|
10300
|
-
if (
|
|
10300
|
+
), v;
|
|
10301
|
+
} catch (v) {
|
|
10302
|
+
if (v instanceof kn) {
|
|
10303
|
+
if (v.silent)
|
|
10301
10304
|
return h(this, S).promise;
|
|
10302
|
-
if (
|
|
10305
|
+
if (v.revert) {
|
|
10303
10306
|
if (this.state.data === void 0)
|
|
10304
|
-
throw
|
|
10307
|
+
throw v;
|
|
10305
10308
|
return this.state.data;
|
|
10306
10309
|
}
|
|
10307
10310
|
}
|
|
10308
|
-
throw z(this, ne,
|
|
10311
|
+
throw z(this, ne, fe).call(this, {
|
|
10309
10312
|
type: "error",
|
|
10310
|
-
error:
|
|
10313
|
+
error: v
|
|
10311
10314
|
}), (R = (V = h(this, re).config).onError) == null || R.call(
|
|
10312
10315
|
V,
|
|
10313
|
-
|
|
10316
|
+
v,
|
|
10314
10317
|
this
|
|
10315
10318
|
), (Y = (Q = h(this, re).config).onSettled) == null || Y.call(
|
|
10316
10319
|
Q,
|
|
10317
10320
|
this.state.data,
|
|
10318
|
-
|
|
10321
|
+
v,
|
|
10319
10322
|
this
|
|
10320
|
-
),
|
|
10323
|
+
), v;
|
|
10321
10324
|
} finally {
|
|
10322
10325
|
this.scheduleGc();
|
|
10323
10326
|
}
|
|
10324
10327
|
}
|
|
10325
|
-
}, at = new WeakMap(), Se = new WeakMap(), ot = new WeakMap(), re = new WeakMap(), Ue = new WeakMap(), S = new WeakMap(),
|
|
10328
|
+
}, at = new WeakMap(), Se = new WeakMap(), ot = new WeakMap(), re = new WeakMap(), Ue = new WeakMap(), S = new WeakMap(), Et = new WeakMap(), We = new WeakMap(), ne = new WeakSet(), ji = function() {
|
|
10326
10329
|
return this.state.fetchStatus === "paused" && this.state.status === "pending";
|
|
10327
|
-
},
|
|
10330
|
+
}, fe = function(e) {
|
|
10328
10331
|
const n = (r) => {
|
|
10329
10332
|
switch (e.type) {
|
|
10330
10333
|
case "failed":
|
|
@@ -10431,15 +10434,15 @@ function Qr(t) {
|
|
|
10431
10434
|
fetchStatus: "idle"
|
|
10432
10435
|
};
|
|
10433
10436
|
}
|
|
10434
|
-
var
|
|
10437
|
+
var Mt, ce, Z, ze, ue, Me, Zr, SA = (Zr = class extends Gi {
|
|
10435
10438
|
constructor(e) {
|
|
10436
10439
|
super();
|
|
10437
10440
|
G(this, ue);
|
|
10438
|
-
G(this,
|
|
10441
|
+
G(this, Mt);
|
|
10439
10442
|
G(this, ce);
|
|
10440
10443
|
G(this, Z);
|
|
10441
10444
|
G(this, ze);
|
|
10442
|
-
D(this,
|
|
10445
|
+
D(this, Mt, e.client), this.mutationId = e.mutationId, D(this, Z, e.mutationCache), D(this, ce, []), this.state = e.state || UA(), this.setOptions(e.options), this.scheduleGc();
|
|
10443
10446
|
}
|
|
10444
10447
|
setOptions(e) {
|
|
10445
10448
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -10470,11 +10473,11 @@ var Et, ce, Z, ze, ue, Me, Zr, SA = (Zr = class extends Gi {
|
|
|
10470
10473
|
this.execute(this.state.variables);
|
|
10471
10474
|
}
|
|
10472
10475
|
async execute(e) {
|
|
10473
|
-
var a, c, l, A,
|
|
10476
|
+
var a, c, l, A, m, p, B, w, O, I, V, R, Q, Y, v, H, U, ee;
|
|
10474
10477
|
const n = () => {
|
|
10475
10478
|
z(this, ue, Me).call(this, { type: "continue" });
|
|
10476
10479
|
}, r = {
|
|
10477
|
-
client: h(this,
|
|
10480
|
+
client: h(this, Mt),
|
|
10478
10481
|
meta: this.options.meta,
|
|
10479
10482
|
mutationKey: this.options.mutationKey
|
|
10480
10483
|
};
|
|
@@ -10522,13 +10525,13 @@ var Et, ce, Z, ze, ue, Me, Zr, SA = (Zr = class extends Gi {
|
|
|
10522
10525
|
this.state.context,
|
|
10523
10526
|
this,
|
|
10524
10527
|
r
|
|
10525
|
-
)), await ((p = (
|
|
10526
|
-
|
|
10528
|
+
)), await ((p = (m = this.options).onSuccess) == null ? void 0 : p.call(
|
|
10529
|
+
m,
|
|
10527
10530
|
q,
|
|
10528
10531
|
e,
|
|
10529
10532
|
this.state.context,
|
|
10530
10533
|
r
|
|
10531
|
-
)), await ((
|
|
10534
|
+
)), await ((w = (B = h(this, Z).config).onSettled) == null ? void 0 : w.call(
|
|
10532
10535
|
B,
|
|
10533
10536
|
q,
|
|
10534
10537
|
null,
|
|
@@ -10569,8 +10572,8 @@ var Et, ce, Z, ze, ue, Me, Zr, SA = (Zr = class extends Gi {
|
|
|
10569
10572
|
Promise.reject(u);
|
|
10570
10573
|
}
|
|
10571
10574
|
try {
|
|
10572
|
-
await ((H = (
|
|
10573
|
-
|
|
10575
|
+
await ((H = (v = h(this, Z).config).onSettled) == null ? void 0 : H.call(
|
|
10576
|
+
v,
|
|
10574
10577
|
void 0,
|
|
10575
10578
|
q,
|
|
10576
10579
|
this.state.variables,
|
|
@@ -10598,7 +10601,7 @@ var Et, ce, Z, ze, ue, Me, Zr, SA = (Zr = class extends Gi {
|
|
|
10598
10601
|
h(this, Z).runNext(this);
|
|
10599
10602
|
}
|
|
10600
10603
|
}
|
|
10601
|
-
},
|
|
10604
|
+
}, Mt = new WeakMap(), ce = new WeakMap(), Z = new WeakMap(), ze = new WeakMap(), ue = new WeakSet(), Me = function(e) {
|
|
10602
10605
|
const n = (r) => {
|
|
10603
10606
|
switch (e.type) {
|
|
10604
10607
|
case "failed":
|
|
@@ -10675,27 +10678,27 @@ function UA() {
|
|
|
10675
10678
|
submittedAt: 0
|
|
10676
10679
|
};
|
|
10677
10680
|
}
|
|
10678
|
-
var
|
|
10681
|
+
var me, ae, It, Lr, Yi = (Lr = class extends un {
|
|
10679
10682
|
constructor(n = {}) {
|
|
10680
10683
|
super();
|
|
10681
|
-
G(this,
|
|
10684
|
+
G(this, me);
|
|
10682
10685
|
G(this, ae);
|
|
10683
|
-
G(this,
|
|
10684
|
-
this.config = n, D(this,
|
|
10686
|
+
G(this, It);
|
|
10687
|
+
this.config = n, D(this, me, /* @__PURE__ */ new Set()), D(this, ae, /* @__PURE__ */ new Map()), D(this, It, 0);
|
|
10685
10688
|
}
|
|
10686
10689
|
build(n, r, s) {
|
|
10687
10690
|
const i = new SA({
|
|
10688
10691
|
client: n,
|
|
10689
10692
|
mutationCache: this,
|
|
10690
|
-
mutationId: ++
|
|
10693
|
+
mutationId: ++xt(this, It)._,
|
|
10691
10694
|
options: n.defaultMutationOptions(r),
|
|
10692
10695
|
state: s
|
|
10693
10696
|
});
|
|
10694
10697
|
return this.add(i), i;
|
|
10695
10698
|
}
|
|
10696
10699
|
add(n) {
|
|
10697
|
-
h(this,
|
|
10698
|
-
const r =
|
|
10700
|
+
h(this, me).add(n);
|
|
10701
|
+
const r = Rt(n);
|
|
10699
10702
|
if (typeof r == "string") {
|
|
10700
10703
|
const s = h(this, ae).get(r);
|
|
10701
10704
|
s ? s.push(n) : h(this, ae).set(r, [n]);
|
|
@@ -10703,8 +10706,8 @@ var fe, ae, Mt, Lr, Yi = (Lr = class extends un {
|
|
|
10703
10706
|
this.notify({ type: "added", mutation: n });
|
|
10704
10707
|
}
|
|
10705
10708
|
remove(n) {
|
|
10706
|
-
if (h(this,
|
|
10707
|
-
const r =
|
|
10709
|
+
if (h(this, me).delete(n)) {
|
|
10710
|
+
const r = Rt(n);
|
|
10708
10711
|
if (typeof r == "string") {
|
|
10709
10712
|
const s = h(this, ae).get(r);
|
|
10710
10713
|
if (s)
|
|
@@ -10717,7 +10720,7 @@ var fe, ae, Mt, Lr, Yi = (Lr = class extends un {
|
|
|
10717
10720
|
this.notify({ type: "removed", mutation: n });
|
|
10718
10721
|
}
|
|
10719
10722
|
canRun(n) {
|
|
10720
|
-
const r =
|
|
10723
|
+
const r = Rt(n);
|
|
10721
10724
|
if (typeof r == "string") {
|
|
10722
10725
|
const s = h(this, ae).get(r), i = s == null ? void 0 : s.find(
|
|
10723
10726
|
(a) => a.state.status === "pending"
|
|
@@ -10728,7 +10731,7 @@ var fe, ae, Mt, Lr, Yi = (Lr = class extends un {
|
|
|
10728
10731
|
}
|
|
10729
10732
|
runNext(n) {
|
|
10730
10733
|
var s;
|
|
10731
|
-
const r =
|
|
10734
|
+
const r = Rt(n);
|
|
10732
10735
|
if (typeof r == "string") {
|
|
10733
10736
|
const i = (s = h(this, ae).get(r)) == null ? void 0 : s.find((a) => a !== n && a.state.isPaused);
|
|
10734
10737
|
return (i == null ? void 0 : i.continue()) ?? Promise.resolve();
|
|
@@ -10737,13 +10740,13 @@ var fe, ae, Mt, Lr, Yi = (Lr = class extends un {
|
|
|
10737
10740
|
}
|
|
10738
10741
|
clear() {
|
|
10739
10742
|
L.batch(() => {
|
|
10740
|
-
h(this,
|
|
10743
|
+
h(this, me).forEach((n) => {
|
|
10741
10744
|
this.notify({ type: "removed", mutation: n });
|
|
10742
|
-
}), h(this,
|
|
10745
|
+
}), h(this, me).clear(), h(this, ae).clear();
|
|
10743
10746
|
});
|
|
10744
10747
|
}
|
|
10745
10748
|
getAll() {
|
|
10746
|
-
return Array.from(h(this,
|
|
10749
|
+
return Array.from(h(this, me));
|
|
10747
10750
|
}
|
|
10748
10751
|
find(n) {
|
|
10749
10752
|
const r = { exact: !0, ...n };
|
|
@@ -10769,8 +10772,8 @@ var fe, ae, Mt, Lr, Yi = (Lr = class extends un {
|
|
|
10769
10772
|
)
|
|
10770
10773
|
);
|
|
10771
10774
|
}
|
|
10772
|
-
},
|
|
10773
|
-
function
|
|
10775
|
+
}, me = new WeakMap(), ae = new WeakMap(), It = new WeakMap(), Lr);
|
|
10776
|
+
function Rt(t) {
|
|
10774
10777
|
var e;
|
|
10775
10778
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
10776
10779
|
}
|
|
@@ -10859,15 +10862,15 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
10859
10862
|
D(this, N, e.queryCache || new Vi()), D(this, Ye, e.mutationCache || new Yi()), D(this, Ve, e.defaultOptions || {}), D(this, ct, /* @__PURE__ */ new Map()), D(this, ut, /* @__PURE__ */ new Map()), D(this, xe, 0);
|
|
10860
10863
|
}
|
|
10861
10864
|
mount() {
|
|
10862
|
-
|
|
10865
|
+
xt(this, xe)._++, h(this, xe) === 1 && (D(this, lt, Mi.subscribe(async (e) => {
|
|
10863
10866
|
e && (await this.resumePausedMutations(), h(this, N).onFocus());
|
|
10864
|
-
})), D(this, At,
|
|
10867
|
+
})), D(this, At, en.subscribe(async (e) => {
|
|
10865
10868
|
e && (await this.resumePausedMutations(), h(this, N).onOnline());
|
|
10866
10869
|
})));
|
|
10867
10870
|
}
|
|
10868
10871
|
unmount() {
|
|
10869
10872
|
var e, n;
|
|
10870
|
-
|
|
10873
|
+
xt(this, xe)._--, h(this, xe) === 0 && ((e = h(this, lt)) == null || e.call(this), D(this, lt, void 0), (n = h(this, At)) == null || n.call(this), D(this, At, void 0));
|
|
10871
10874
|
}
|
|
10872
10875
|
isFetching(e) {
|
|
10873
10876
|
return h(this, N).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
@@ -10989,7 +10992,7 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
10989
10992
|
return e._type = "infinite", this.ensureQueryData(e);
|
|
10990
10993
|
}
|
|
10991
10994
|
resumePausedMutations() {
|
|
10992
|
-
return
|
|
10995
|
+
return en.isOnline() ? h(this, Ye).resumePausedMutations() : Promise.resolve();
|
|
10993
10996
|
}
|
|
10994
10997
|
getQueryCache() {
|
|
10995
10998
|
return h(this, N);
|
|
@@ -11004,7 +11007,7 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
11004
11007
|
D(this, Ve, e);
|
|
11005
11008
|
}
|
|
11006
11009
|
setQueryDefaults(e, n) {
|
|
11007
|
-
h(this, ct).set(
|
|
11010
|
+
h(this, ct).set(Dt(e), {
|
|
11008
11011
|
queryKey: e,
|
|
11009
11012
|
defaultOptions: n
|
|
11010
11013
|
});
|
|
@@ -11012,11 +11015,11 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
11012
11015
|
getQueryDefaults(e) {
|
|
11013
11016
|
const n = [...h(this, ct).values()], r = {};
|
|
11014
11017
|
return n.forEach((s) => {
|
|
11015
|
-
|
|
11018
|
+
Ct(e, s.queryKey) && Object.assign(r, s.defaultOptions);
|
|
11016
11019
|
}), r;
|
|
11017
11020
|
}
|
|
11018
11021
|
setMutationDefaults(e, n) {
|
|
11019
|
-
h(this, ut).set(
|
|
11022
|
+
h(this, ut).set(Dt(e), {
|
|
11020
11023
|
mutationKey: e,
|
|
11021
11024
|
defaultOptions: n
|
|
11022
11025
|
});
|
|
@@ -11024,7 +11027,7 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
11024
11027
|
getMutationDefaults(e) {
|
|
11025
11028
|
const n = [...h(this, ut).values()], r = {};
|
|
11026
11029
|
return n.forEach((s) => {
|
|
11027
|
-
|
|
11030
|
+
Ct(e, s.mutationKey) && Object.assign(r, s.defaultOptions);
|
|
11028
11031
|
}), r;
|
|
11029
11032
|
}
|
|
11030
11033
|
defaultQueryOptions(e) {
|
|
@@ -11039,7 +11042,7 @@ var le, Kr, Vi = (Kr = class extends un {
|
|
|
11039
11042
|
return n.queryHash || (n.queryHash = er(
|
|
11040
11043
|
n.queryKey,
|
|
11041
11044
|
n
|
|
11042
|
-
)), n.refetchOnReconnect === void 0 && (n.refetchOnReconnect = n.networkMode !== "always"), n.throwOnError === void 0 && (n.throwOnError = !!n.suspense), !n.networkMode && n.persister && (n.networkMode = "offlineFirst"), n.queryFn ===
|
|
11045
|
+
)), n.refetchOnReconnect === void 0 && (n.refetchOnReconnect = n.networkMode !== "always"), n.throwOnError === void 0 && (n.throwOnError = !!n.suspense), !n.networkMode && n.persister && (n.networkMode = "offlineFirst"), n.queryFn === $t && (n.enabled = !1), n;
|
|
11043
11046
|
}
|
|
11044
11047
|
defaultMutationOptions(e) {
|
|
11045
11048
|
return e != null && e._defaulted ? e : {
|
|
@@ -11124,7 +11127,7 @@ var KA = class extends Vi {
|
|
|
11124
11127
|
queryCache: t.queryCache || new KA(),
|
|
11125
11128
|
mutationCache: t.mutationCache || new JA()
|
|
11126
11129
|
};
|
|
11127
|
-
super(e), this.isRestoring =
|
|
11130
|
+
super(e), this.isRestoring = St(!1);
|
|
11128
11131
|
}
|
|
11129
11132
|
isFetching(t = {}) {
|
|
11130
11133
|
return super.isFetching(T(t));
|
|
@@ -11223,7 +11226,7 @@ var KA = class extends Vi {
|
|
|
11223
11226
|
};
|
|
11224
11227
|
const $A = Ki({
|
|
11225
11228
|
history: Ji(),
|
|
11226
|
-
routes: [...
|
|
11229
|
+
routes: [...bt, ...pt].map((t) => ({
|
|
11227
11230
|
...t,
|
|
11228
11231
|
component: os(
|
|
11229
11232
|
_r({
|
|
@@ -11234,10 +11237,10 @@ const $A = Ki({
|
|
|
11234
11237
|
});
|
|
11235
11238
|
$A.beforeEach((t) => {
|
|
11236
11239
|
var r;
|
|
11237
|
-
const { currentCountry: e } =
|
|
11240
|
+
const { currentCountry: e } = rn(), n = e.value;
|
|
11238
11241
|
if (!n) return !0;
|
|
11239
11242
|
if ((r = t.meta) != null && r.region && !t.meta.region[n]) {
|
|
11240
|
-
const s =
|
|
11243
|
+
const s = bt.find(
|
|
11241
11244
|
(i) => {
|
|
11242
11245
|
var a;
|
|
11243
11246
|
return ((a = i.meta) == null ? void 0 : a.sidebarDisplay) && (!i.meta.region || i.meta.region[n]);
|
|
@@ -11247,32 +11250,32 @@ $A.beforeEach((t) => {
|
|
|
11247
11250
|
}
|
|
11248
11251
|
return !0;
|
|
11249
11252
|
});
|
|
11250
|
-
const ed = (t) => t ? t.role.isAdmin || t.role.isStaff : !1, td = /* @__PURE__ */
|
|
11253
|
+
const ed = (t) => t ? t.role.isAdmin || t.role.isStaff : !1, td = /* @__PURE__ */ tn({
|
|
11251
11254
|
__name: "AppSidebar",
|
|
11252
11255
|
setup(t) {
|
|
11253
|
-
const e =
|
|
11256
|
+
const e = rn(), n = _i(), { t: r } = ns(), s = St(n.currentRoute.value.name);
|
|
11254
11257
|
$r(n.currentRoute, () => {
|
|
11255
11258
|
let A = n.currentRoute.value.name;
|
|
11256
11259
|
n.currentRoute.value.meta.parent && (A = n.currentRoute.value.meta.parent), s.value = A;
|
|
11257
11260
|
});
|
|
11258
|
-
const i =
|
|
11259
|
-
var B,
|
|
11260
|
-
if (!((B = A.meta) != null && B.sidebarDisplay) || A.meta.region && !((
|
|
11261
|
+
const i = bt.map((A) => {
|
|
11262
|
+
var B, w;
|
|
11263
|
+
if (!((B = A.meta) != null && B.sidebarDisplay) || A.meta.region && !((w = A.meta.region) != null && w[e.currentCountry.value]) || A.meta.section)
|
|
11261
11264
|
return;
|
|
11262
|
-
const
|
|
11263
|
-
label:
|
|
11265
|
+
const m = A.meta.sidebarDisplay, p = {
|
|
11266
|
+
label: m.startsWith("i18n:") ? r(m.replaceAll("i18n:", "")) : m,
|
|
11264
11267
|
value: A.name,
|
|
11265
11268
|
action: () => {
|
|
11266
11269
|
if (n.currentRoute.value.name !== A.name)
|
|
11267
11270
|
return n.push({ name: A.name });
|
|
11268
11271
|
}
|
|
11269
11272
|
};
|
|
11270
|
-
return A.meta.sidebarNew && (p.badge = () =>
|
|
11273
|
+
return A.meta.sidebarNew && (p.badge = () => vn(ea.FmPill, { label: "New" })), p;
|
|
11271
11274
|
}).filter((A) => !!A);
|
|
11272
|
-
function a(A,
|
|
11275
|
+
function a(A, m) {
|
|
11273
11276
|
return A.map((p) => {
|
|
11274
|
-
var B,
|
|
11275
|
-
return (B = p.meta) != null && B.useChildrenRoutes ? a(p.children || [],
|
|
11277
|
+
var B, w;
|
|
11278
|
+
return (B = p.meta) != null && B.useChildrenRoutes ? a(p.children || [], m) : (w = p.meta) != null && w.sidebarDisplay ? p.meta.section !== m ? [] : [
|
|
11276
11279
|
{
|
|
11277
11280
|
label: p.meta.sidebarDisplay.startsWith("i18n:") ? r(p.meta.sidebarDisplay.replaceAll("i18n:", "")) : p.meta.sidebarDisplay,
|
|
11278
11281
|
value: p.name,
|
|
@@ -11285,8 +11288,8 @@ const ed = (t) => t ? t.role.isAdmin || t.role.isStaff : !1, td = /* @__PURE__ *
|
|
|
11285
11288
|
}).flat().filter((p) => !!p);
|
|
11286
11289
|
}
|
|
11287
11290
|
const c = pt.map((A) => {
|
|
11288
|
-
var
|
|
11289
|
-
if ((
|
|
11291
|
+
var m;
|
|
11292
|
+
if ((m = A.meta) != null && m.sidebarDisplay && !A.meta.section)
|
|
11290
11293
|
return {
|
|
11291
11294
|
label: A.meta.sidebarDisplay.startsWith("i18n:") ? r(A.meta.sidebarDisplay.replaceAll("i18n:", "")) : A.meta.sidebarDisplay,
|
|
11292
11295
|
value: A.name,
|
|
@@ -11297,7 +11300,16 @@ const ed = (t) => t ? t.role.isAdmin || t.role.isStaff : !1, td = /* @__PURE__ *
|
|
|
11297
11300
|
};
|
|
11298
11301
|
}).filter((A) => !!A), l = Nn(() => {
|
|
11299
11302
|
const A = [...i];
|
|
11300
|
-
return
|
|
11303
|
+
return A.push({
|
|
11304
|
+
label: "",
|
|
11305
|
+
value: "divider",
|
|
11306
|
+
disabled: !0
|
|
11307
|
+
}), A.push({
|
|
11308
|
+
label: r("financing.title"),
|
|
11309
|
+
icon: "credit_score",
|
|
11310
|
+
value: "divider",
|
|
11311
|
+
disabled: !0
|
|
11312
|
+
}), A.push(...a(bt, "financing")), ed(e.sessionUser.value) && (A.push({
|
|
11301
11313
|
label: "",
|
|
11302
11314
|
value: "divider",
|
|
11303
11315
|
disabled: !0
|
|
@@ -11326,22 +11338,22 @@ const ed = (t) => t ? t.role.isAdmin || t.role.isStaff : !1, td = /* @__PURE__ *
|
|
|
11326
11338
|
disabled: !0
|
|
11327
11339
|
}), A.push(...c)), A;
|
|
11328
11340
|
});
|
|
11329
|
-
return (A,
|
|
11341
|
+
return (A, m) => {
|
|
11330
11342
|
const p = es("FmCollapsibleTabs");
|
|
11331
|
-
return
|
|
11343
|
+
return nn(), Hn(p, {
|
|
11332
11344
|
modelValue: s.value,
|
|
11333
|
-
"onUpdate:modelValue":
|
|
11345
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => s.value = B),
|
|
11334
11346
|
items: l.value,
|
|
11335
11347
|
class: "py-16 px-8 w-[240px]"
|
|
11336
11348
|
}, null, 8, ["modelValue", "items"]);
|
|
11337
11349
|
};
|
|
11338
11350
|
}
|
|
11339
11351
|
});
|
|
11340
|
-
var nd = { firebase: { apiKey: "
|
|
11341
|
-
const bd = /* @__PURE__ */
|
|
11352
|
+
var nd = { 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" } };
|
|
11353
|
+
const bd = /* @__PURE__ */ tn({
|
|
11342
11354
|
__name: "App",
|
|
11343
11355
|
setup(t) {
|
|
11344
|
-
const { state: e } = Qo(), n =
|
|
11356
|
+
const { state: e } = Qo(), n = rn(), r = ts(), s = new _A();
|
|
11345
11357
|
Wi(xi, s);
|
|
11346
11358
|
const i = Ss(nd.firebase);
|
|
11347
11359
|
async function a() {
|
|
@@ -11358,12 +11370,12 @@ const bd = /* @__PURE__ */ en({
|
|
|
11358
11370
|
s.unmount();
|
|
11359
11371
|
}), (c, l) => {
|
|
11360
11372
|
const A = es("RouterView");
|
|
11361
|
-
return
|
|
11373
|
+
return nn(), Hn(A, {
|
|
11362
11374
|
key: ge(r).path
|
|
11363
11375
|
});
|
|
11364
11376
|
};
|
|
11365
11377
|
}
|
|
11366
|
-
}),
|
|
11378
|
+
}), vd = () => {
|
|
11367
11379
|
const t = [
|
|
11368
11380
|
{ "en-US": na, "th-TH": sa, "zh-CN": aa },
|
|
11369
11381
|
qi
|
|
@@ -11380,7 +11392,7 @@ const bd = /* @__PURE__ */ en({
|
|
|
11380
11392
|
},
|
|
11381
11393
|
{}
|
|
11382
11394
|
);
|
|
11383
|
-
},
|
|
11395
|
+
}, wd = [...pt, ...bt].map((t) => ({
|
|
11384
11396
|
...t,
|
|
11385
11397
|
component: os(
|
|
11386
11398
|
_r({ loader: t.component })
|
|
@@ -11388,7 +11400,7 @@ const bd = /* @__PURE__ */ en({
|
|
|
11388
11400
|
}));
|
|
11389
11401
|
export {
|
|
11390
11402
|
xa as A,
|
|
11391
|
-
|
|
11403
|
+
wd as B,
|
|
11392
11404
|
un as S,
|
|
11393
11405
|
yr as _,
|
|
11394
11406
|
Vn as a,
|
|
@@ -11416,5 +11428,5 @@ export {
|
|
|
11416
11428
|
ua as w,
|
|
11417
11429
|
ld as x,
|
|
11418
11430
|
bd as y,
|
|
11419
|
-
|
|
11431
|
+
vd as z
|
|
11420
11432
|
};
|