@feedmepos/mf-hrm-portal 2.2.0-dev → 2.2.1-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/{ApprovalCodeList-Cwy-Rn90.js → ApprovalCodeList-BgPrC2H1.js} +2 -2
- package/dist/AuditLogList-B9k56ux1.js +1611 -0
- package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-BTDBRB1-.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-BKxQPhjZ.js} +2 -2
- package/dist/{EmployeeList-DJrCBYvi.js → EmployeeList-f05XEwMS.js} +8 -7
- package/dist/{GrantUserList-UgQBjh54.js → GrantUserList-Db4_e87R.js} +3 -3
- package/dist/{Main-B5YknOhi.js → Main-C83-6ZYQ.js} +9 -9
- package/dist/{Main-DQXiP6Io.js → Main-CZoUt9IM.js} +2 -2
- package/dist/{Main-BnWK_GkW.js → Main-DPmBwatV.js} +5 -5
- package/dist/{PermissionSetList-CfPZPmfV.js → PermissionSetList-CqcbzdXp.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CPk4KJUW.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DMS04nsd.js} +912 -912
- package/dist/{RoleList-CHnu2j25.js → RoleList-DsINcxpz.js} +7 -7
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
- package/dist/{TeamMemberList-DprMQ_8g.js → TeamMemberList-DuP1QWAS.js} +22 -21
- package/dist/{TimesheetList-D5G1dJfp.js → TimesheetList-D_Xq4ESR.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DFfYiBBf.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-O2_M0Ktw.js} +2 -2
- package/dist/{app-BhF0Kk5X.js → app-3bHRu-TD.js} +780 -484
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Do1gXFxN.js → dayjs.min-BjrK6J3b.js} +1 -1
- package/dist/{employee-BRCSs9t_.js → employee-Ck_DJyl9.js} +3 -3
- package/dist/{iteration-C2XLVxL1.js → iteration-Bl07BT2c.js} +1 -1
- package/dist/{lodash-eudyY8-f.js → lodash-CwAowwGK.js} +1 -1
- package/dist/{role-CSL6Qv8l.js → role-Z1BT4HFT.js} +1 -1
- package/dist/{rule-D3DPWTm1.js → rule-DYmHm3nE.js} +2 -2
- package/dist/src/api/audit-log/index.d.ts +6 -0
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/views/audit-log/event-line.d.ts +13 -0
- package/dist/src/views/audit-log/locales/index.d.ts +296 -0
- package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useDebounce-B8ZPVS5C.js +15 -0
- package/dist/{useReportPermissions-CSdIiY_7.js → useReportPermissions-DCF1U1Us.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-CfDEZ6Z-.js +0 -1149
- package/dist/useDebounce-CWb5QR9G.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Rn = Object.defineProperty;
|
|
2
2
|
var Xn = (e, t, s) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var xt = (e, t, s) => Xn(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as
|
|
4
|
+
import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as zs, defineComponent as it, createBlock as zt, renderSlot as cr, createCommentVNode as Tn, unref as Ue, openBlock as ct, createElementBlock as lr, createElementVNode as Ze, toDisplayString as Ws, watch as Nn, nextTick as Sn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as Un, resolveComponent as Fs, withCtx as zn, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
|
|
5
5
|
import { useBreakpoints as Kn } from "@feedmepos/ui-library";
|
|
6
6
|
import { useRoute as Jn, useRouter as _n } from "vue-router";
|
|
7
7
|
import { useCoreStore as Ar, useI18n as dr } from "@feedmepos/mf-common";
|
|
@@ -169,7 +169,7 @@ class qe extends Error {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
qe.create = (e) => new qe(e);
|
|
172
|
-
const
|
|
172
|
+
const wt = (e, t) => {
|
|
173
173
|
let s;
|
|
174
174
|
switch (e.code) {
|
|
175
175
|
case C.invalid_type:
|
|
@@ -222,7 +222,7 @@ const Bt = (e, t) => {
|
|
|
222
222
|
}
|
|
223
223
|
return { message: s };
|
|
224
224
|
};
|
|
225
|
-
let gr =
|
|
225
|
+
let gr = wt;
|
|
226
226
|
function ta(e) {
|
|
227
227
|
gr = e;
|
|
228
228
|
}
|
|
@@ -244,7 +244,7 @@ const Ot = (e) => {
|
|
|
244
244
|
message: n.message || l
|
|
245
245
|
};
|
|
246
246
|
}, sa = [];
|
|
247
|
-
function
|
|
247
|
+
function P(e, t) {
|
|
248
248
|
const s = Ot({
|
|
249
249
|
issueData: t,
|
|
250
250
|
data: e.data,
|
|
@@ -253,7 +253,7 @@ function Y(e, t) {
|
|
|
253
253
|
e.common.contextualErrorMap,
|
|
254
254
|
e.schemaErrorMap,
|
|
255
255
|
Vt(),
|
|
256
|
-
|
|
256
|
+
wt
|
|
257
257
|
].filter((r) => !!r)
|
|
258
258
|
});
|
|
259
259
|
e.common.issues.push(s);
|
|
@@ -299,12 +299,12 @@ class ae {
|
|
|
299
299
|
}
|
|
300
300
|
const H = Object.freeze({
|
|
301
301
|
status: "aborted"
|
|
302
|
-
}), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }),
|
|
302
|
+
}), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }), ws = (e) => e.status === "aborted", Bs = (e) => e.status === "dirty", Ft = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
303
303
|
var T;
|
|
304
304
|
(function(e) {
|
|
305
305
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
306
306
|
})(T || (T = {}));
|
|
307
|
-
class
|
|
307
|
+
class Pe {
|
|
308
308
|
constructor(t, s, r, n) {
|
|
309
309
|
this.parent = t, this.data = s, this._path = r, this._key = n;
|
|
310
310
|
}
|
|
@@ -443,13 +443,13 @@ class X {
|
|
|
443
443
|
return this.optional().nullable();
|
|
444
444
|
}
|
|
445
445
|
array() {
|
|
446
|
-
return
|
|
446
|
+
return Ye.create(this);
|
|
447
447
|
}
|
|
448
448
|
promise() {
|
|
449
449
|
return ot.create(this);
|
|
450
450
|
}
|
|
451
451
|
or(t) {
|
|
452
|
-
return
|
|
452
|
+
return Bt.create([this, t]);
|
|
453
453
|
}
|
|
454
454
|
and(t) {
|
|
455
455
|
return Mt.create(this, t);
|
|
@@ -498,7 +498,7 @@ class ke extends X {
|
|
|
498
498
|
_parse(t) {
|
|
499
499
|
if (this._getType(t) !== x.string) {
|
|
500
500
|
const a = this._getOrReturnCtx(t);
|
|
501
|
-
return
|
|
501
|
+
return P(
|
|
502
502
|
a,
|
|
503
503
|
{
|
|
504
504
|
code: C.invalid_type,
|
|
@@ -512,7 +512,7 @@ class ke extends X {
|
|
|
512
512
|
let n;
|
|
513
513
|
for (const a of this._def.checks)
|
|
514
514
|
if (a.kind === "min")
|
|
515
|
-
t.data.length < a.value && (n = this._getOrReturnCtx(t, n),
|
|
515
|
+
t.data.length < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
|
|
516
516
|
code: C.too_small,
|
|
517
517
|
minimum: a.value,
|
|
518
518
|
type: "string",
|
|
@@ -520,7 +520,7 @@ class ke extends X {
|
|
|
520
520
|
message: a.message
|
|
521
521
|
}), r.dirty());
|
|
522
522
|
else if (a.kind === "max")
|
|
523
|
-
t.data.length > a.value && (n = this._getOrReturnCtx(t, n),
|
|
523
|
+
t.data.length > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
|
|
524
524
|
code: C.too_big,
|
|
525
525
|
maximum: a.value,
|
|
526
526
|
type: "string",
|
|
@@ -528,19 +528,19 @@ class ke extends X {
|
|
|
528
528
|
message: a.message
|
|
529
529
|
}), r.dirty());
|
|
530
530
|
else if (a.kind === "email")
|
|
531
|
-
oa.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
531
|
+
oa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
532
532
|
validation: "email",
|
|
533
533
|
code: C.invalid_string,
|
|
534
534
|
message: a.message
|
|
535
535
|
}), r.dirty());
|
|
536
536
|
else if (a.kind === "uuid")
|
|
537
|
-
aa.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
537
|
+
aa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
538
538
|
validation: "uuid",
|
|
539
539
|
code: C.invalid_string,
|
|
540
540
|
message: a.message
|
|
541
541
|
}), r.dirty());
|
|
542
542
|
else if (a.kind === "cuid")
|
|
543
|
-
na.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
543
|
+
na.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
544
544
|
validation: "cuid",
|
|
545
545
|
code: C.invalid_string,
|
|
546
546
|
message: a.message
|
|
@@ -549,21 +549,21 @@ class ke extends X {
|
|
|
549
549
|
try {
|
|
550
550
|
new URL(t.data);
|
|
551
551
|
} catch {
|
|
552
|
-
n = this._getOrReturnCtx(t, n),
|
|
552
|
+
n = this._getOrReturnCtx(t, n), P(n, {
|
|
553
553
|
validation: "url",
|
|
554
554
|
code: C.invalid_string,
|
|
555
555
|
message: a.message
|
|
556
556
|
}), r.dirty();
|
|
557
557
|
}
|
|
558
|
-
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
558
|
+
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
559
559
|
validation: "regex",
|
|
560
560
|
code: C.invalid_string,
|
|
561
561
|
message: a.message
|
|
562
|
-
}), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n),
|
|
562
|
+
}), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
563
563
|
code: C.invalid_string,
|
|
564
564
|
validation: { startsWith: a.value },
|
|
565
565
|
message: a.message
|
|
566
|
-
}), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n),
|
|
566
|
+
}), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
567
567
|
code: C.invalid_string,
|
|
568
568
|
validation: { endsWith: a.value },
|
|
569
569
|
message: a.message
|
|
@@ -660,14 +660,14 @@ function ia(e, t) {
|
|
|
660
660
|
const s = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, n = s > r ? s : r, a = parseInt(e.toFixed(n).replace(".", "")), c = parseInt(t.toFixed(n).replace(".", ""));
|
|
661
661
|
return a % c / Math.pow(10, n);
|
|
662
662
|
}
|
|
663
|
-
class
|
|
663
|
+
class ze extends X {
|
|
664
664
|
constructor() {
|
|
665
665
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
666
666
|
}
|
|
667
667
|
_parse(t) {
|
|
668
668
|
if (this._getType(t) !== x.number) {
|
|
669
669
|
const a = this._getOrReturnCtx(t);
|
|
670
|
-
return
|
|
670
|
+
return P(a, {
|
|
671
671
|
code: C.invalid_type,
|
|
672
672
|
expected: x.number,
|
|
673
673
|
received: a.parsedType
|
|
@@ -676,24 +676,24 @@ class Ue extends X {
|
|
|
676
676
|
let r;
|
|
677
677
|
const n = new ae();
|
|
678
678
|
for (const a of this._def.checks)
|
|
679
|
-
a.kind === "int" ? S.isInteger(t.data) || (r = this._getOrReturnCtx(t, r),
|
|
679
|
+
a.kind === "int" ? S.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), P(r, {
|
|
680
680
|
code: C.invalid_type,
|
|
681
681
|
expected: "integer",
|
|
682
682
|
received: "float",
|
|
683
683
|
message: a.message
|
|
684
|
-
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
684
|
+
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
|
|
685
685
|
code: C.too_small,
|
|
686
686
|
minimum: a.value,
|
|
687
687
|
type: "number",
|
|
688
688
|
inclusive: a.inclusive,
|
|
689
689
|
message: a.message
|
|
690
|
-
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
690
|
+
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
|
|
691
691
|
code: C.too_big,
|
|
692
692
|
maximum: a.value,
|
|
693
693
|
type: "number",
|
|
694
694
|
inclusive: a.inclusive,
|
|
695
695
|
message: a.message
|
|
696
|
-
}), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r),
|
|
696
|
+
}), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), P(r, {
|
|
697
697
|
code: C.not_multiple_of,
|
|
698
698
|
multipleOf: a.value,
|
|
699
699
|
message: a.message
|
|
@@ -713,7 +713,7 @@ class Ue extends X {
|
|
|
713
713
|
return this.setLimit("max", t, !1, T.toString(s));
|
|
714
714
|
}
|
|
715
715
|
setLimit(t, s, r, n) {
|
|
716
|
-
return new
|
|
716
|
+
return new ze({
|
|
717
717
|
...this._def,
|
|
718
718
|
checks: [
|
|
719
719
|
...this._def.checks,
|
|
@@ -727,7 +727,7 @@ class Ue extends X {
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
_addCheck(t) {
|
|
730
|
-
return new
|
|
730
|
+
return new ze({
|
|
731
731
|
...this._def,
|
|
732
732
|
checks: [...this._def.checks, t]
|
|
733
733
|
});
|
|
@@ -793,7 +793,7 @@ class Ue extends X {
|
|
|
793
793
|
return !!this._def.checks.find((t) => t.kind === "int");
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
ze.create = (e) => new ze({
|
|
797
797
|
checks: [],
|
|
798
798
|
typeName: I.ZodNumber,
|
|
799
799
|
...Q(e)
|
|
@@ -802,7 +802,7 @@ class qt extends X {
|
|
|
802
802
|
_parse(t) {
|
|
803
803
|
if (this._getType(t) !== x.bigint) {
|
|
804
804
|
const r = this._getOrReturnCtx(t);
|
|
805
|
-
return
|
|
805
|
+
return P(r, {
|
|
806
806
|
code: C.invalid_type,
|
|
807
807
|
expected: x.bigint,
|
|
808
808
|
received: r.parsedType
|
|
@@ -819,7 +819,7 @@ class It extends X {
|
|
|
819
819
|
_parse(t) {
|
|
820
820
|
if (this._getType(t) !== x.boolean) {
|
|
821
821
|
const r = this._getOrReturnCtx(t);
|
|
822
|
-
return
|
|
822
|
+
return P(r, {
|
|
823
823
|
code: C.invalid_type,
|
|
824
824
|
expected: x.boolean,
|
|
825
825
|
received: r.parsedType
|
|
@@ -836,7 +836,7 @@ class nt extends X {
|
|
|
836
836
|
_parse(t) {
|
|
837
837
|
if (this._getType(t) !== x.date) {
|
|
838
838
|
const a = this._getOrReturnCtx(t);
|
|
839
|
-
return
|
|
839
|
+
return P(a, {
|
|
840
840
|
code: C.invalid_type,
|
|
841
841
|
expected: x.date,
|
|
842
842
|
received: a.parsedType
|
|
@@ -844,20 +844,20 @@ class nt extends X {
|
|
|
844
844
|
}
|
|
845
845
|
if (isNaN(t.data.getTime())) {
|
|
846
846
|
const a = this._getOrReturnCtx(t);
|
|
847
|
-
return
|
|
847
|
+
return P(a, {
|
|
848
848
|
code: C.invalid_date
|
|
849
849
|
}), H;
|
|
850
850
|
}
|
|
851
851
|
const r = new ae();
|
|
852
852
|
let n;
|
|
853
853
|
for (const a of this._def.checks)
|
|
854
|
-
a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n),
|
|
854
|
+
a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
|
|
855
855
|
code: C.too_small,
|
|
856
856
|
message: a.message,
|
|
857
857
|
inclusive: !0,
|
|
858
858
|
minimum: a.value,
|
|
859
859
|
type: "date"
|
|
860
|
-
}), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n),
|
|
860
|
+
}), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
|
|
861
861
|
code: C.too_big,
|
|
862
862
|
message: a.message,
|
|
863
863
|
inclusive: !0,
|
|
@@ -911,7 +911,7 @@ class Ht extends X {
|
|
|
911
911
|
_parse(t) {
|
|
912
912
|
if (this._getType(t) !== x.undefined) {
|
|
913
913
|
const r = this._getOrReturnCtx(t);
|
|
914
|
-
return
|
|
914
|
+
return P(r, {
|
|
915
915
|
code: C.invalid_type,
|
|
916
916
|
expected: x.undefined,
|
|
917
917
|
received: r.parsedType
|
|
@@ -928,7 +928,7 @@ class Rt extends X {
|
|
|
928
928
|
_parse(t) {
|
|
929
929
|
if (this._getType(t) !== x.null) {
|
|
930
930
|
const r = this._getOrReturnCtx(t);
|
|
931
|
-
return
|
|
931
|
+
return P(r, {
|
|
932
932
|
code: C.invalid_type,
|
|
933
933
|
expected: x.null,
|
|
934
934
|
received: r.parsedType
|
|
@@ -968,7 +968,7 @@ Xe.create = (e) => new Xe({
|
|
|
968
968
|
class Te extends X {
|
|
969
969
|
_parse(t) {
|
|
970
970
|
const s = this._getOrReturnCtx(t);
|
|
971
|
-
return
|
|
971
|
+
return P(s, {
|
|
972
972
|
code: C.invalid_type,
|
|
973
973
|
expected: x.never,
|
|
974
974
|
received: s.parsedType
|
|
@@ -983,7 +983,7 @@ class Xt extends X {
|
|
|
983
983
|
_parse(t) {
|
|
984
984
|
if (this._getType(t) !== x.undefined) {
|
|
985
985
|
const r = this._getOrReturnCtx(t);
|
|
986
|
-
return
|
|
986
|
+
return P(r, {
|
|
987
987
|
code: C.invalid_type,
|
|
988
988
|
expected: x.void,
|
|
989
989
|
received: r.parsedType
|
|
@@ -996,43 +996,43 @@ Xt.create = (e) => new Xt({
|
|
|
996
996
|
typeName: I.ZodVoid,
|
|
997
997
|
...Q(e)
|
|
998
998
|
});
|
|
999
|
-
class
|
|
999
|
+
class Ye extends X {
|
|
1000
1000
|
_parse(t) {
|
|
1001
1001
|
const { ctx: s, status: r } = this._processInputParams(t), n = this._def;
|
|
1002
1002
|
if (s.parsedType !== x.array)
|
|
1003
|
-
return
|
|
1003
|
+
return P(s, {
|
|
1004
1004
|
code: C.invalid_type,
|
|
1005
1005
|
expected: x.array,
|
|
1006
1006
|
received: s.parsedType
|
|
1007
1007
|
}), H;
|
|
1008
|
-
if (n.minLength !== null && s.data.length < n.minLength.value && (
|
|
1008
|
+
if (n.minLength !== null && s.data.length < n.minLength.value && (P(s, {
|
|
1009
1009
|
code: C.too_small,
|
|
1010
1010
|
minimum: n.minLength.value,
|
|
1011
1011
|
type: "array",
|
|
1012
1012
|
inclusive: !0,
|
|
1013
1013
|
message: n.minLength.message
|
|
1014
|
-
}), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (
|
|
1014
|
+
}), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (P(s, {
|
|
1015
1015
|
code: C.too_big,
|
|
1016
1016
|
maximum: n.maxLength.value,
|
|
1017
1017
|
type: "array",
|
|
1018
1018
|
inclusive: !0,
|
|
1019
1019
|
message: n.maxLength.message
|
|
1020
1020
|
}), r.dirty()), s.common.async)
|
|
1021
|
-
return Promise.all(s.data.map((c, l) => n.type._parseAsync(new
|
|
1022
|
-
const a = s.data.map((c, l) => n.type._parseSync(new
|
|
1021
|
+
return Promise.all(s.data.map((c, l) => n.type._parseAsync(new Pe(s, c, s.path, l)))).then((c) => ae.mergeArray(r, c));
|
|
1022
|
+
const a = s.data.map((c, l) => n.type._parseSync(new Pe(s, c, s.path, l)));
|
|
1023
1023
|
return ae.mergeArray(r, a);
|
|
1024
1024
|
}
|
|
1025
1025
|
get element() {
|
|
1026
1026
|
return this._def.type;
|
|
1027
1027
|
}
|
|
1028
1028
|
min(t, s) {
|
|
1029
|
-
return new
|
|
1029
|
+
return new Ye({
|
|
1030
1030
|
...this._def,
|
|
1031
1031
|
minLength: { value: t, message: T.toString(s) }
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
max(t, s) {
|
|
1035
|
-
return new
|
|
1035
|
+
return new Ye({
|
|
1036
1036
|
...this._def,
|
|
1037
1037
|
maxLength: { value: t, message: T.toString(s) }
|
|
1038
1038
|
});
|
|
@@ -1044,7 +1044,7 @@ class Ge extends X {
|
|
|
1044
1044
|
return this.min(1, t);
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
|
-
|
|
1047
|
+
Ye.create = (e, t) => new Ye({
|
|
1048
1048
|
type: e,
|
|
1049
1049
|
minLength: null,
|
|
1050
1050
|
maxLength: null,
|
|
@@ -1076,7 +1076,7 @@ function rt(e) {
|
|
|
1076
1076
|
...e._def,
|
|
1077
1077
|
shape: () => t
|
|
1078
1078
|
});
|
|
1079
|
-
} else return e instanceof
|
|
1079
|
+
} else return e instanceof Ye ? Ye.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Ke ? Ke.create(rt(e.unwrap())) : e instanceof Ge ? Ge.create(e.items.map((t) => rt(t))) : e;
|
|
1080
1080
|
}
|
|
1081
1081
|
class J extends X {
|
|
1082
1082
|
constructor() {
|
|
@@ -1091,7 +1091,7 @@ class J extends X {
|
|
|
1091
1091
|
_parse(t) {
|
|
1092
1092
|
if (this._getType(t) !== x.object) {
|
|
1093
1093
|
const h = this._getOrReturnCtx(t);
|
|
1094
|
-
return
|
|
1094
|
+
return P(h, {
|
|
1095
1095
|
code: C.invalid_type,
|
|
1096
1096
|
expected: x.object,
|
|
1097
1097
|
received: h.parsedType
|
|
@@ -1102,49 +1102,49 @@ class J extends X {
|
|
|
1102
1102
|
c.includes(h) || l.push(h);
|
|
1103
1103
|
const y = [];
|
|
1104
1104
|
for (const h of c) {
|
|
1105
|
-
const
|
|
1105
|
+
const w = a[h], O = n.data[h];
|
|
1106
1106
|
y.push({
|
|
1107
1107
|
key: { status: "valid", value: h },
|
|
1108
|
-
value:
|
|
1108
|
+
value: w._parse(new Pe(n, O, n.path, h)),
|
|
1109
1109
|
alwaysSet: h in n.data
|
|
1110
1110
|
});
|
|
1111
1111
|
}
|
|
1112
1112
|
if (this._def.catchall instanceof Te) {
|
|
1113
1113
|
const h = this._def.unknownKeys;
|
|
1114
1114
|
if (h === "passthrough")
|
|
1115
|
-
for (const
|
|
1115
|
+
for (const w of l)
|
|
1116
1116
|
y.push({
|
|
1117
|
-
key: { status: "valid", value:
|
|
1118
|
-
value: { status: "valid", value: n.data[
|
|
1117
|
+
key: { status: "valid", value: w },
|
|
1118
|
+
value: { status: "valid", value: n.data[w] }
|
|
1119
1119
|
});
|
|
1120
1120
|
else if (h === "strict")
|
|
1121
|
-
l.length > 0 && (
|
|
1121
|
+
l.length > 0 && (P(n, {
|
|
1122
1122
|
code: C.unrecognized_keys,
|
|
1123
1123
|
keys: l
|
|
1124
1124
|
}), r.dirty());
|
|
1125
1125
|
else if (h !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1126
1126
|
} else {
|
|
1127
1127
|
const h = this._def.catchall;
|
|
1128
|
-
for (const
|
|
1129
|
-
const O = n.data[
|
|
1128
|
+
for (const w of l) {
|
|
1129
|
+
const O = n.data[w];
|
|
1130
1130
|
y.push({
|
|
1131
|
-
key: { status: "valid", value:
|
|
1131
|
+
key: { status: "valid", value: w },
|
|
1132
1132
|
value: h._parse(
|
|
1133
|
-
new
|
|
1133
|
+
new Pe(n, O, n.path, w)
|
|
1134
1134
|
//, ctx.child(key), value, getParsedType(value)
|
|
1135
1135
|
),
|
|
1136
|
-
alwaysSet:
|
|
1136
|
+
alwaysSet: w in n.data
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
return n.common.async ? Promise.resolve().then(async () => {
|
|
1141
1141
|
const h = [];
|
|
1142
|
-
for (const
|
|
1143
|
-
const O = await
|
|
1142
|
+
for (const w of y) {
|
|
1143
|
+
const O = await w.key;
|
|
1144
1144
|
h.push({
|
|
1145
1145
|
key: O,
|
|
1146
|
-
value: await
|
|
1147
|
-
alwaysSet:
|
|
1146
|
+
value: await w.value,
|
|
1147
|
+
alwaysSet: w.alwaysSet
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
return h;
|
|
@@ -1281,7 +1281,7 @@ J.lazycreate = (e, t) => new J({
|
|
|
1281
1281
|
typeName: I.ZodObject,
|
|
1282
1282
|
...Q(t)
|
|
1283
1283
|
});
|
|
1284
|
-
class
|
|
1284
|
+
class Bt extends X {
|
|
1285
1285
|
_parse(t) {
|
|
1286
1286
|
const { ctx: s } = this._processInputParams(t), r = this._def.options;
|
|
1287
1287
|
function n(a) {
|
|
@@ -1292,7 +1292,7 @@ class wt extends X {
|
|
|
1292
1292
|
if (l.result.status === "dirty")
|
|
1293
1293
|
return s.common.issues.push(...l.ctx.common.issues), l.result;
|
|
1294
1294
|
const c = a.map((l) => new qe(l.ctx.common.issues));
|
|
1295
|
-
return
|
|
1295
|
+
return P(s, {
|
|
1296
1296
|
code: C.invalid_union,
|
|
1297
1297
|
unionErrors: c
|
|
1298
1298
|
}), H;
|
|
@@ -1327,19 +1327,19 @@ class wt extends X {
|
|
|
1327
1327
|
issues: []
|
|
1328
1328
|
},
|
|
1329
1329
|
parent: null
|
|
1330
|
-
},
|
|
1330
|
+
}, w = y._parseSync({
|
|
1331
1331
|
data: s.data,
|
|
1332
1332
|
path: s.path,
|
|
1333
1333
|
parent: h
|
|
1334
1334
|
});
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
|
|
1335
|
+
if (w.status === "valid")
|
|
1336
|
+
return w;
|
|
1337
|
+
w.status === "dirty" && !a && (a = { result: w, ctx: h }), h.common.issues.length && c.push(h.common.issues);
|
|
1338
1338
|
}
|
|
1339
1339
|
if (a)
|
|
1340
1340
|
return s.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1341
1341
|
const l = c.map((y) => new qe(y));
|
|
1342
|
-
return
|
|
1342
|
+
return P(s, {
|
|
1343
1343
|
code: C.invalid_union,
|
|
1344
1344
|
unionErrors: l
|
|
1345
1345
|
}), H;
|
|
@@ -1349,7 +1349,7 @@ class wt extends X {
|
|
|
1349
1349
|
return this._def.options;
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
|
|
1352
|
+
Bt.create = (e, t) => new Bt({
|
|
1353
1353
|
options: e,
|
|
1354
1354
|
typeName: I.ZodUnion,
|
|
1355
1355
|
...Q(t)
|
|
@@ -1358,7 +1358,7 @@ class Wt extends X {
|
|
|
1358
1358
|
_parse(t) {
|
|
1359
1359
|
const { ctx: s } = this._processInputParams(t);
|
|
1360
1360
|
if (s.parsedType !== x.object)
|
|
1361
|
-
return
|
|
1361
|
+
return P(s, {
|
|
1362
1362
|
code: C.invalid_type,
|
|
1363
1363
|
expected: x.object,
|
|
1364
1364
|
received: s.parsedType
|
|
@@ -1372,7 +1372,7 @@ class Wt extends X {
|
|
|
1372
1372
|
data: s.data,
|
|
1373
1373
|
path: s.path,
|
|
1374
1374
|
parent: s
|
|
1375
|
-
}) : (
|
|
1375
|
+
}) : (P(s, {
|
|
1376
1376
|
code: C.invalid_union_discriminator,
|
|
1377
1377
|
options: this.validDiscriminatorValues,
|
|
1378
1378
|
path: [r]
|
|
@@ -1444,10 +1444,10 @@ function Cs(e, t) {
|
|
|
1444
1444
|
class Mt extends X {
|
|
1445
1445
|
_parse(t) {
|
|
1446
1446
|
const { status: s, ctx: r } = this._processInputParams(t), n = (a, c) => {
|
|
1447
|
-
if (
|
|
1447
|
+
if (ws(a) || ws(c))
|
|
1448
1448
|
return H;
|
|
1449
1449
|
const l = Cs(a.value, c.value);
|
|
1450
|
-
return l.valid ? ((
|
|
1450
|
+
return l.valid ? ((Bs(a) || Bs(c)) && s.dirty(), { status: s.value, value: l.data }) : (P(r, {
|
|
1451
1451
|
code: C.invalid_intersection_types
|
|
1452
1452
|
}), H);
|
|
1453
1453
|
};
|
|
@@ -1479,23 +1479,23 @@ Mt.create = (e, t, s) => new Mt({
|
|
|
1479
1479
|
typeName: I.ZodIntersection,
|
|
1480
1480
|
...Q(s)
|
|
1481
1481
|
});
|
|
1482
|
-
class
|
|
1482
|
+
class Ge extends X {
|
|
1483
1483
|
_parse(t) {
|
|
1484
1484
|
const { status: s, ctx: r } = this._processInputParams(t);
|
|
1485
1485
|
if (r.parsedType !== x.array)
|
|
1486
|
-
return
|
|
1486
|
+
return P(r, {
|
|
1487
1487
|
code: C.invalid_type,
|
|
1488
1488
|
expected: x.array,
|
|
1489
1489
|
received: r.parsedType
|
|
1490
1490
|
}), H;
|
|
1491
1491
|
if (r.data.length < this._def.items.length)
|
|
1492
|
-
return
|
|
1492
|
+
return P(r, {
|
|
1493
1493
|
code: C.too_small,
|
|
1494
1494
|
minimum: this._def.items.length,
|
|
1495
1495
|
inclusive: !0,
|
|
1496
1496
|
type: "array"
|
|
1497
1497
|
}), H;
|
|
1498
|
-
!this._def.rest && r.data.length > this._def.items.length && (
|
|
1498
|
+
!this._def.rest && r.data.length > this._def.items.length && (P(r, {
|
|
1499
1499
|
code: C.too_big,
|
|
1500
1500
|
maximum: this._def.items.length,
|
|
1501
1501
|
inclusive: !0,
|
|
@@ -1503,7 +1503,7 @@ class Pe extends X {
|
|
|
1503
1503
|
}), s.dirty());
|
|
1504
1504
|
const a = r.data.map((c, l) => {
|
|
1505
1505
|
const y = this._def.items[l] || this._def.rest;
|
|
1506
|
-
return y ? y._parse(new
|
|
1506
|
+
return y ? y._parse(new Pe(r, c, r.path, l)) : null;
|
|
1507
1507
|
}).filter((c) => !!c);
|
|
1508
1508
|
return r.common.async ? Promise.all(a).then((c) => ae.mergeArray(s, c)) : ae.mergeArray(s, a);
|
|
1509
1509
|
}
|
|
@@ -1511,13 +1511,13 @@ class Pe extends X {
|
|
|
1511
1511
|
return this._def.items;
|
|
1512
1512
|
}
|
|
1513
1513
|
rest(t) {
|
|
1514
|
-
return new
|
|
1514
|
+
return new Ge({
|
|
1515
1515
|
...this._def,
|
|
1516
1516
|
rest: t
|
|
1517
1517
|
});
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
|
|
1520
|
+
Ge.create = (e, t) => new Ge({
|
|
1521
1521
|
items: e,
|
|
1522
1522
|
typeName: I.ZodTuple,
|
|
1523
1523
|
rest: null,
|
|
@@ -1533,7 +1533,7 @@ class Ct extends X {
|
|
|
1533
1533
|
_parse(t) {
|
|
1534
1534
|
const { status: s, ctx: r } = this._processInputParams(t);
|
|
1535
1535
|
if (r.parsedType !== x.object)
|
|
1536
|
-
return
|
|
1536
|
+
return P(r, {
|
|
1537
1537
|
code: C.invalid_type,
|
|
1538
1538
|
expected: x.object,
|
|
1539
1539
|
received: r.parsedType
|
|
@@ -1541,8 +1541,8 @@ class Ct extends X {
|
|
|
1541
1541
|
const n = [], a = this._def.keyType, c = this._def.valueType;
|
|
1542
1542
|
for (const l in r.data)
|
|
1543
1543
|
n.push({
|
|
1544
|
-
key: a._parse(new
|
|
1545
|
-
value: c._parse(new
|
|
1544
|
+
key: a._parse(new Pe(r, l, r.path, l)),
|
|
1545
|
+
value: c._parse(new Pe(r, r.data[l], r.path, l))
|
|
1546
1546
|
});
|
|
1547
1547
|
return r.common.async ? ae.mergeObjectAsync(s, n) : ae.mergeObjectSync(s, n);
|
|
1548
1548
|
}
|
|
@@ -1567,33 +1567,33 @@ class kt extends X {
|
|
|
1567
1567
|
_parse(t) {
|
|
1568
1568
|
const { status: s, ctx: r } = this._processInputParams(t);
|
|
1569
1569
|
if (r.parsedType !== x.map)
|
|
1570
|
-
return
|
|
1570
|
+
return P(r, {
|
|
1571
1571
|
code: C.invalid_type,
|
|
1572
1572
|
expected: x.map,
|
|
1573
1573
|
received: r.parsedType
|
|
1574
1574
|
}), H;
|
|
1575
1575
|
const n = this._def.keyType, a = this._def.valueType, c = [...r.data.entries()].map(([l, y], h) => ({
|
|
1576
|
-
key: n._parse(new
|
|
1577
|
-
value: a._parse(new
|
|
1576
|
+
key: n._parse(new Pe(r, l, r.path, [h, "key"])),
|
|
1577
|
+
value: a._parse(new Pe(r, y, r.path, [h, "value"]))
|
|
1578
1578
|
}));
|
|
1579
1579
|
if (r.common.async) {
|
|
1580
1580
|
const l = /* @__PURE__ */ new Map();
|
|
1581
1581
|
return Promise.resolve().then(async () => {
|
|
1582
1582
|
for (const y of c) {
|
|
1583
|
-
const h = await y.key,
|
|
1584
|
-
if (h.status === "aborted" ||
|
|
1583
|
+
const h = await y.key, w = await y.value;
|
|
1584
|
+
if (h.status === "aborted" || w.status === "aborted")
|
|
1585
1585
|
return H;
|
|
1586
|
-
(h.status === "dirty" ||
|
|
1586
|
+
(h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
|
|
1587
1587
|
}
|
|
1588
1588
|
return { status: s.value, value: l };
|
|
1589
1589
|
});
|
|
1590
1590
|
} else {
|
|
1591
1591
|
const l = /* @__PURE__ */ new Map();
|
|
1592
1592
|
for (const y of c) {
|
|
1593
|
-
const h = y.key,
|
|
1594
|
-
if (h.status === "aborted" ||
|
|
1593
|
+
const h = y.key, w = y.value;
|
|
1594
|
+
if (h.status === "aborted" || w.status === "aborted")
|
|
1595
1595
|
return H;
|
|
1596
|
-
(h.status === "dirty" ||
|
|
1596
|
+
(h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
|
|
1597
1597
|
}
|
|
1598
1598
|
return { status: s.value, value: l };
|
|
1599
1599
|
}
|
|
@@ -1609,19 +1609,19 @@ class We extends X {
|
|
|
1609
1609
|
_parse(t) {
|
|
1610
1610
|
const { status: s, ctx: r } = this._processInputParams(t);
|
|
1611
1611
|
if (r.parsedType !== x.set)
|
|
1612
|
-
return
|
|
1612
|
+
return P(r, {
|
|
1613
1613
|
code: C.invalid_type,
|
|
1614
1614
|
expected: x.set,
|
|
1615
1615
|
received: r.parsedType
|
|
1616
1616
|
}), H;
|
|
1617
1617
|
const n = this._def;
|
|
1618
|
-
n.minSize !== null && r.data.size < n.minSize.value && (
|
|
1618
|
+
n.minSize !== null && r.data.size < n.minSize.value && (P(r, {
|
|
1619
1619
|
code: C.too_small,
|
|
1620
1620
|
minimum: n.minSize.value,
|
|
1621
1621
|
type: "set",
|
|
1622
1622
|
inclusive: !0,
|
|
1623
1623
|
message: n.minSize.message
|
|
1624
|
-
}), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (
|
|
1624
|
+
}), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (P(r, {
|
|
1625
1625
|
code: C.too_big,
|
|
1626
1626
|
maximum: n.maxSize.value,
|
|
1627
1627
|
type: "set",
|
|
@@ -1631,14 +1631,14 @@ class We extends X {
|
|
|
1631
1631
|
const a = this._def.valueType;
|
|
1632
1632
|
function c(y) {
|
|
1633
1633
|
const h = /* @__PURE__ */ new Set();
|
|
1634
|
-
for (const
|
|
1635
|
-
if (
|
|
1634
|
+
for (const w of y) {
|
|
1635
|
+
if (w.status === "aborted")
|
|
1636
1636
|
return H;
|
|
1637
|
-
|
|
1637
|
+
w.status === "dirty" && s.dirty(), h.add(w.value);
|
|
1638
1638
|
}
|
|
1639
1639
|
return { status: s.value, value: h };
|
|
1640
1640
|
}
|
|
1641
|
-
const l = [...r.data.values()].map((y, h) => a._parse(new
|
|
1641
|
+
const l = [...r.data.values()].map((y, h) => a._parse(new Pe(r, y, r.path, h)));
|
|
1642
1642
|
return r.common.async ? Promise.all(l).then((y) => c(y)) : c(l);
|
|
1643
1643
|
}
|
|
1644
1644
|
min(t, s) {
|
|
@@ -1674,7 +1674,7 @@ class Le extends X {
|
|
|
1674
1674
|
_parse(t) {
|
|
1675
1675
|
const { ctx: s } = this._processInputParams(t);
|
|
1676
1676
|
if (s.parsedType !== x.function)
|
|
1677
|
-
return
|
|
1677
|
+
return P(s, {
|
|
1678
1678
|
code: C.invalid_type,
|
|
1679
1679
|
expected: x.function,
|
|
1680
1680
|
received: s.parsedType
|
|
@@ -1687,7 +1687,7 @@ class Le extends X {
|
|
|
1687
1687
|
s.common.contextualErrorMap,
|
|
1688
1688
|
s.schemaErrorMap,
|
|
1689
1689
|
Vt(),
|
|
1690
|
-
|
|
1690
|
+
wt
|
|
1691
1691
|
].filter((h) => !!h),
|
|
1692
1692
|
issueData: {
|
|
1693
1693
|
code: C.invalid_arguments,
|
|
@@ -1703,7 +1703,7 @@ class Le extends X {
|
|
|
1703
1703
|
s.common.contextualErrorMap,
|
|
1704
1704
|
s.schemaErrorMap,
|
|
1705
1705
|
Vt(),
|
|
1706
|
-
|
|
1706
|
+
wt
|
|
1707
1707
|
].filter((h) => !!h),
|
|
1708
1708
|
issueData: {
|
|
1709
1709
|
code: C.invalid_return_type,
|
|
@@ -1715,18 +1715,18 @@ class Le extends X {
|
|
|
1715
1715
|
return this._def.returns instanceof ot ? oe(async (...l) => {
|
|
1716
1716
|
const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((N) => {
|
|
1717
1717
|
throw y.addIssue(r(l, N)), y;
|
|
1718
|
-
}),
|
|
1719
|
-
return await this._def.returns._def.type.parseAsync(
|
|
1720
|
-
throw y.addIssue(n(
|
|
1718
|
+
}), w = await c(...h);
|
|
1719
|
+
return await this._def.returns._def.type.parseAsync(w, a).catch((N) => {
|
|
1720
|
+
throw y.addIssue(n(w, N)), y;
|
|
1721
1721
|
});
|
|
1722
1722
|
}) : oe((...l) => {
|
|
1723
1723
|
const y = this._def.args.safeParse(l, a);
|
|
1724
1724
|
if (!y.success)
|
|
1725
1725
|
throw new qe([r(l, y.error)]);
|
|
1726
|
-
const h = c(...y.data),
|
|
1727
|
-
if (!
|
|
1728
|
-
throw new qe([n(h,
|
|
1729
|
-
return
|
|
1726
|
+
const h = c(...y.data), w = this._def.returns.safeParse(h, a);
|
|
1727
|
+
if (!w.success)
|
|
1728
|
+
throw new qe([n(h, w.error)]);
|
|
1729
|
+
return w.data;
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
1732
|
parameters() {
|
|
@@ -1738,7 +1738,7 @@ class Le extends X {
|
|
|
1738
1738
|
args(...t) {
|
|
1739
1739
|
return new Le({
|
|
1740
1740
|
...this._def,
|
|
1741
|
-
args:
|
|
1741
|
+
args: Ge.create(t).rest(Xe.create())
|
|
1742
1742
|
});
|
|
1743
1743
|
}
|
|
1744
1744
|
returns(t) {
|
|
@@ -1755,7 +1755,7 @@ class Le extends X {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
Le.create = (e, t, s) => new Le({
|
|
1758
|
-
args: e ? e.rest(Xe.create()) :
|
|
1758
|
+
args: e ? e.rest(Xe.create()) : Ge.create([]).rest(Xe.create()),
|
|
1759
1759
|
returns: t || Xe.create(),
|
|
1760
1760
|
typeName: I.ZodFunction,
|
|
1761
1761
|
...Q(s)
|
|
@@ -1778,7 +1778,7 @@ class Nt extends X {
|
|
|
1778
1778
|
_parse(t) {
|
|
1779
1779
|
if (t.data !== this._def.value) {
|
|
1780
1780
|
const s = this._getOrReturnCtx(t);
|
|
1781
|
-
return
|
|
1781
|
+
return P(s, {
|
|
1782
1782
|
code: C.invalid_literal,
|
|
1783
1783
|
expected: this._def.value
|
|
1784
1784
|
}), H;
|
|
@@ -1805,7 +1805,7 @@ class Lt extends X {
|
|
|
1805
1805
|
_parse(t) {
|
|
1806
1806
|
if (typeof t.data != "string") {
|
|
1807
1807
|
const s = this._getOrReturnCtx(t), r = this._def.values;
|
|
1808
|
-
return
|
|
1808
|
+
return P(s, {
|
|
1809
1809
|
expected: S.joinValues(r),
|
|
1810
1810
|
received: s.parsedType,
|
|
1811
1811
|
code: C.invalid_type
|
|
@@ -1813,7 +1813,7 @@ class Lt extends X {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
if (this._def.values.indexOf(t.data) === -1) {
|
|
1815
1815
|
const s = this._getOrReturnCtx(t), r = this._def.values;
|
|
1816
|
-
return
|
|
1816
|
+
return P(s, {
|
|
1817
1817
|
received: s.data,
|
|
1818
1818
|
code: C.invalid_enum_value,
|
|
1819
1819
|
options: r
|
|
@@ -1849,7 +1849,7 @@ class St extends X {
|
|
|
1849
1849
|
const s = S.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
|
|
1850
1850
|
if (r.parsedType !== x.string && r.parsedType !== x.number) {
|
|
1851
1851
|
const n = S.objectValues(s);
|
|
1852
|
-
return
|
|
1852
|
+
return P(r, {
|
|
1853
1853
|
expected: S.joinValues(n),
|
|
1854
1854
|
received: r.parsedType,
|
|
1855
1855
|
code: C.invalid_type
|
|
@@ -1857,7 +1857,7 @@ class St extends X {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
if (s.indexOf(t.data) === -1) {
|
|
1859
1859
|
const n = S.objectValues(s);
|
|
1860
|
-
return
|
|
1860
|
+
return P(r, {
|
|
1861
1861
|
received: r.data,
|
|
1862
1862
|
code: C.invalid_enum_value,
|
|
1863
1863
|
options: n
|
|
@@ -1878,7 +1878,7 @@ class ot extends X {
|
|
|
1878
1878
|
_parse(t) {
|
|
1879
1879
|
const { ctx: s } = this._processInputParams(t);
|
|
1880
1880
|
if (s.parsedType !== x.promise && s.common.async === !1)
|
|
1881
|
-
return
|
|
1881
|
+
return P(s, {
|
|
1882
1882
|
code: C.invalid_type,
|
|
1883
1883
|
expected: x.promise,
|
|
1884
1884
|
received: s.parsedType
|
|
@@ -1915,7 +1915,7 @@ class Ve extends X {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
const a = {
|
|
1917
1917
|
addIssue: (c) => {
|
|
1918
|
-
|
|
1918
|
+
P(r, c), c.fatal ? s.abort() : s.dirty();
|
|
1919
1919
|
},
|
|
1920
1920
|
get path() {
|
|
1921
1921
|
return r.path;
|
|
@@ -2019,7 +2019,7 @@ class Zt extends X {
|
|
|
2019
2019
|
_parse(t) {
|
|
2020
2020
|
if (this._getType(t) !== x.nan) {
|
|
2021
2021
|
const r = this._getOrReturnCtx(t);
|
|
2022
|
-
return
|
|
2022
|
+
return P(r, {
|
|
2023
2023
|
code: C.invalid_type,
|
|
2024
2024
|
expected: x.nan,
|
|
2025
2025
|
received: r.parsedType
|
|
@@ -2046,26 +2046,26 @@ var I;
|
|
|
2046
2046
|
})(I || (I = {}));
|
|
2047
2047
|
const la = (e, t = {
|
|
2048
2048
|
message: `Input not instance of ${e.name}`
|
|
2049
|
-
}) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr =
|
|
2049
|
+
}) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = ze.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Ye.create, va = J.create, wa = J.strictCreate, Ba = Bt.create, Ma = Wt.create, Ca = Mt.create, Da = Ge.create, xa = Ct.create, ja = kt.create, Ea = We.create, Pa = Le.create, Ya = Tt.create, Ga = Nt.create, Va = Lt.create, Oa = St.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Ke.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
|
|
2050
2050
|
var ft = /* @__PURE__ */ Object.freeze({
|
|
2051
2051
|
__proto__: null,
|
|
2052
2052
|
getParsedType: Re,
|
|
2053
2053
|
ZodParsedType: x,
|
|
2054
2054
|
makeIssue: Ot,
|
|
2055
2055
|
EMPTY_PATH: sa,
|
|
2056
|
-
addIssueToContext:
|
|
2056
|
+
addIssueToContext: P,
|
|
2057
2057
|
ParseStatus: ae,
|
|
2058
2058
|
INVALID: H,
|
|
2059
2059
|
DIRTY: ra,
|
|
2060
2060
|
OK: oe,
|
|
2061
|
-
isAborted:
|
|
2062
|
-
isDirty:
|
|
2061
|
+
isAborted: ws,
|
|
2062
|
+
isDirty: Bs,
|
|
2063
2063
|
isValid: Ft,
|
|
2064
2064
|
isAsync: Ms,
|
|
2065
2065
|
jsonStringifyReplacer: qs,
|
|
2066
2066
|
ZodType: X,
|
|
2067
2067
|
ZodString: ke,
|
|
2068
|
-
ZodNumber:
|
|
2068
|
+
ZodNumber: ze,
|
|
2069
2069
|
ZodBigInt: qt,
|
|
2070
2070
|
ZodBoolean: It,
|
|
2071
2071
|
ZodDate: nt,
|
|
@@ -2075,15 +2075,15 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2075
2075
|
ZodUnknown: Xe,
|
|
2076
2076
|
ZodNever: Te,
|
|
2077
2077
|
ZodVoid: Xt,
|
|
2078
|
-
ZodArray:
|
|
2078
|
+
ZodArray: Ye,
|
|
2079
2079
|
get objectUtil() {
|
|
2080
2080
|
return Qt;
|
|
2081
2081
|
},
|
|
2082
2082
|
ZodObject: J,
|
|
2083
|
-
ZodUnion:
|
|
2083
|
+
ZodUnion: Bt,
|
|
2084
2084
|
ZodDiscriminatedUnion: Wt,
|
|
2085
2085
|
ZodIntersection: Mt,
|
|
2086
|
-
ZodTuple:
|
|
2086
|
+
ZodTuple: Ge,
|
|
2087
2087
|
ZodRecord: Ct,
|
|
2088
2088
|
ZodMap: kt,
|
|
2089
2089
|
ZodSet: We,
|
|
@@ -2114,11 +2114,11 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2114
2114
|
discriminatedUnion: Ma,
|
|
2115
2115
|
effect: Js,
|
|
2116
2116
|
enum: Va,
|
|
2117
|
-
function:
|
|
2117
|
+
function: Pa,
|
|
2118
2118
|
instanceof: la,
|
|
2119
2119
|
intersection: Ca,
|
|
2120
|
-
lazy:
|
|
2121
|
-
literal:
|
|
2120
|
+
lazy: Ya,
|
|
2121
|
+
literal: Ga,
|
|
2122
2122
|
map: ja,
|
|
2123
2123
|
nan: ua,
|
|
2124
2124
|
nativeEnum: Oa,
|
|
@@ -2135,18 +2135,18 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2135
2135
|
promise: Fa,
|
|
2136
2136
|
record: xa,
|
|
2137
2137
|
set: Ea,
|
|
2138
|
-
strictObject:
|
|
2138
|
+
strictObject: wa,
|
|
2139
2139
|
string: hr,
|
|
2140
2140
|
transformer: Js,
|
|
2141
2141
|
tuple: Da,
|
|
2142
2142
|
undefined: ma,
|
|
2143
|
-
union:
|
|
2143
|
+
union: Ba,
|
|
2144
2144
|
unknown: fa,
|
|
2145
2145
|
void: ya,
|
|
2146
2146
|
ZodIssueCode: C,
|
|
2147
2147
|
quotelessJson: ea,
|
|
2148
2148
|
ZodError: qe,
|
|
2149
|
-
defaultErrorMap:
|
|
2149
|
+
defaultErrorMap: wt,
|
|
2150
2150
|
setErrorMap: ta,
|
|
2151
2151
|
getErrorMap: Vt
|
|
2152
2152
|
});
|
|
@@ -2231,16 +2231,16 @@ function Za(e, t) {
|
|
|
2231
2231
|
const r = t[s.field];
|
|
2232
2232
|
return "eq" in s ? r === s.eq : s.in ? s.in.includes(r) : !0;
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function Ua(e, t) {
|
|
2235
2235
|
return e.fields.filter((s) => Za(s, t));
|
|
2236
2236
|
}
|
|
2237
2237
|
function El(e, t) {
|
|
2238
2238
|
const s = { ...t };
|
|
2239
|
-
for (const r of
|
|
2239
|
+
for (const r of Ua(e, s))
|
|
2240
2240
|
(s[r.key] === void 0 || s[r.key] === null) && r.default !== void 0 && (s[r.key] = r.default);
|
|
2241
2241
|
return s;
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2243
|
+
function za(e) {
|
|
2244
2244
|
if (Sa(e.form)) {
|
|
2245
2245
|
const s = new Set(e.form.fields.map((r) => r.key));
|
|
2246
2246
|
for (const r of e.form.fields)
|
|
@@ -2267,7 +2267,7 @@ function Wa(e) {
|
|
|
2267
2267
|
const t = e == null ? void 0 : e.shape;
|
|
2268
2268
|
return t ? Object.keys(t) : void 0;
|
|
2269
2269
|
}
|
|
2270
|
-
const
|
|
2270
|
+
const wr = /* @__PURE__ */ new Map(), Yt = [], La = /* @__PURE__ */ new Map(), _s = "prefix:";
|
|
2271
2271
|
function Ka(e) {
|
|
2272
2272
|
for (const [t, s] of Object.entries(e))
|
|
2273
2273
|
Ja([t], s);
|
|
@@ -2278,10 +2278,10 @@ function Ja(e, t) {
|
|
|
2278
2278
|
for (const r of s) La.set(r.builderKey, r);
|
|
2279
2279
|
for (const r of e)
|
|
2280
2280
|
if (r.startsWith(_s)) {
|
|
2281
|
-
const n = r.slice(_s.length), a =
|
|
2282
|
-
a >= 0 ?
|
|
2281
|
+
const n = r.slice(_s.length), a = Yt.findIndex((c) => c.prefix === n);
|
|
2282
|
+
a >= 0 ? Yt[a] = { prefix: n, builders: s } : Yt.push({ prefix: n, builders: s });
|
|
2283
2283
|
} else
|
|
2284
|
-
|
|
2284
|
+
wr.set(r, s);
|
|
2285
2285
|
}
|
|
2286
2286
|
function _a(e, t) {
|
|
2287
2287
|
const s = /* @__PURE__ */ new Map();
|
|
@@ -2300,10 +2300,10 @@ function _a(e, t) {
|
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
2302
|
function $a(e) {
|
|
2303
|
-
const t =
|
|
2303
|
+
const t = wr.get(e);
|
|
2304
2304
|
if (t) return t;
|
|
2305
2305
|
let s;
|
|
2306
|
-
for (const r of
|
|
2306
|
+
for (const r of Yt)
|
|
2307
2307
|
e.startsWith(r.prefix) && (!s || r.prefix.length > s.prefix.length) && (s = r);
|
|
2308
2308
|
return (s == null ? void 0 : s.builders) ?? [];
|
|
2309
2309
|
}
|
|
@@ -2438,7 +2438,7 @@ const Ao = {
|
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
2440
|
]
|
|
2441
|
-
}, mo =
|
|
2441
|
+
}, mo = za({
|
|
2442
2442
|
version: 1,
|
|
2443
2443
|
builderKey: io,
|
|
2444
2444
|
contextSchema: to,
|
|
@@ -2485,7 +2485,7 @@ const Ao = {
|
|
|
2485
2485
|
report: tt
|
|
2486
2486
|
};
|
|
2487
2487
|
Ka(go);
|
|
2488
|
-
function
|
|
2488
|
+
function Pl(e, t) {
|
|
2489
2489
|
if (!e) return {};
|
|
2490
2490
|
const s = new Set(t.ownedFields);
|
|
2491
2491
|
return Object.fromEntries(Object.entries(e).filter(([r]) => s.has(r)));
|
|
@@ -2495,7 +2495,7 @@ function po(e, t) {
|
|
|
2495
2495
|
const s = new Set(t.flatMap((r) => r.ownedFields));
|
|
2496
2496
|
return Object.fromEntries(Object.entries(e).filter(([r]) => !s.has(r)));
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function Yl(e, t) {
|
|
2499
2499
|
return Object.assign(
|
|
2500
2500
|
po(
|
|
2501
2501
|
e,
|
|
@@ -2504,7 +2504,7 @@ function Gl(e, t) {
|
|
|
2504
2504
|
...t.map((s) => s.builder.toCondition(s.formValue))
|
|
2505
2505
|
);
|
|
2506
2506
|
}
|
|
2507
|
-
const
|
|
2507
|
+
const Br = {
|
|
2508
2508
|
mode: "Access window",
|
|
2509
2509
|
unrestricted: "No restriction",
|
|
2510
2510
|
since: "Since date",
|
|
@@ -2520,11 +2520,11 @@ const wr = {
|
|
|
2520
2520
|
inheritedLastMonths: "last {amount} months",
|
|
2521
2521
|
inheritedLastYears: "last {amount} years"
|
|
2522
2522
|
}, fo = {
|
|
2523
|
-
reportAccessWindow:
|
|
2523
|
+
reportAccessWindow: Br
|
|
2524
2524
|
}, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2525
2525
|
__proto__: null,
|
|
2526
2526
|
default: fo,
|
|
2527
|
-
reportAccessWindow:
|
|
2527
|
+
reportAccessWindow: Br
|
|
2528
2528
|
}, Symbol.toStringTag, { value: "Module" })), Mr = {
|
|
2529
2529
|
mode: "访问期限",
|
|
2530
2530
|
unrestricted: "无限制",
|
|
@@ -2563,7 +2563,7 @@ const wr = {
|
|
|
2563
2563
|
inheritedLastYears: "最近 {amount} 年"
|
|
2564
2564
|
}, vo = {
|
|
2565
2565
|
reportAccessWindow: Cr
|
|
2566
|
-
},
|
|
2566
|
+
}, wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2567
2567
|
__proto__: null,
|
|
2568
2568
|
default: vo,
|
|
2569
2569
|
reportAccessWindow: Cr
|
|
@@ -2582,16 +2582,16 @@ const wr = {
|
|
|
2582
2582
|
inheritedLastDays: "ล่าสุด {amount} วัน",
|
|
2583
2583
|
inheritedLastMonths: "ล่าสุด {amount} เดือน",
|
|
2584
2584
|
inheritedLastYears: "ล่าสุด {amount} ปี"
|
|
2585
|
-
},
|
|
2585
|
+
}, Bo = {
|
|
2586
2586
|
reportAccessWindow: Dr
|
|
2587
2587
|
}, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2588
2588
|
__proto__: null,
|
|
2589
|
-
default:
|
|
2589
|
+
default: Bo,
|
|
2590
2590
|
reportAccessWindow: Dr
|
|
2591
2591
|
}, Symbol.toStringTag, { value: "Module" })), Co = {
|
|
2592
2592
|
"en-US": { conditionBuilder: { ...ho } },
|
|
2593
2593
|
"zh-CN": { conditionBuilder: { ...bo } },
|
|
2594
|
-
"zh-Hant": { conditionBuilder: { ...
|
|
2594
|
+
"zh-Hant": { conditionBuilder: { ...wo } },
|
|
2595
2595
|
"th-TH": { conditionBuilder: { ...Mo } }
|
|
2596
2596
|
}, xr = {
|
|
2597
2597
|
predefinedRanges: {
|
|
@@ -2609,6 +2609,9 @@ const wr = {
|
|
|
2609
2609
|
dateRange: {
|
|
2610
2610
|
placeholder: "Select date range"
|
|
2611
2611
|
},
|
|
2612
|
+
search: {
|
|
2613
|
+
placeholder: "Search user, event, or record"
|
|
2614
|
+
},
|
|
2612
2615
|
user: {
|
|
2613
2616
|
feedmeAdmin: "FeedMe Admin"
|
|
2614
2617
|
},
|
|
@@ -2723,6 +2726,77 @@ const wr = {
|
|
|
2723
2726
|
requestMethod: "Request Method",
|
|
2724
2727
|
requestPath: "Request Path",
|
|
2725
2728
|
requestBody: "Request Body"
|
|
2729
|
+
},
|
|
2730
|
+
operation: {
|
|
2731
|
+
toggle: "Toggle operations",
|
|
2732
|
+
rowHint: "Operation",
|
|
2733
|
+
unlabeled: "Operation",
|
|
2734
|
+
badge: "{count} ops",
|
|
2735
|
+
sheetHeader: "Operation Detail",
|
|
2736
|
+
entity: "Entity",
|
|
2737
|
+
duration: "Duration",
|
|
2738
|
+
durationValue: "{ms} ms",
|
|
2739
|
+
error: "Error",
|
|
2740
|
+
changes: "Changes",
|
|
2741
|
+
showData: "Show data",
|
|
2742
|
+
added: "Added",
|
|
2743
|
+
removed: "Removed",
|
|
2744
|
+
updated: "Updated",
|
|
2745
|
+
before: "Before",
|
|
2746
|
+
after: "After",
|
|
2747
|
+
noChanges: "No changes recorded for this operation.",
|
|
2748
|
+
wholeValue: "Value"
|
|
2749
|
+
},
|
|
2750
|
+
event: {
|
|
2751
|
+
sentence: {
|
|
2752
|
+
"audit-log": {
|
|
2753
|
+
view: "Viewed audit logs"
|
|
2754
|
+
},
|
|
2755
|
+
restaurant: {
|
|
2756
|
+
list: "Listed restaurants"
|
|
2757
|
+
},
|
|
2758
|
+
"permission-assignment": {
|
|
2759
|
+
manage: "Managed permission assignments",
|
|
2760
|
+
list: "Listed permission assignments",
|
|
2761
|
+
view: "Viewed permission assignment {id}"
|
|
2762
|
+
},
|
|
2763
|
+
"permission-set": {
|
|
2764
|
+
manage: "Managed permission sets",
|
|
2765
|
+
list: "Listed permission sets",
|
|
2766
|
+
view: "Viewed permission set {id}"
|
|
2767
|
+
},
|
|
2768
|
+
"portal-user": {
|
|
2769
|
+
list: "Listed team members",
|
|
2770
|
+
"list-page": "Listed team members",
|
|
2771
|
+
view: "Viewed team member {id}",
|
|
2772
|
+
create: "Added team member {name}",
|
|
2773
|
+
update: "Updated team member {name}",
|
|
2774
|
+
delete: "Removed team member {name}"
|
|
2775
|
+
},
|
|
2776
|
+
"pos-user": {
|
|
2777
|
+
list: "Listed employees",
|
|
2778
|
+
"list-page": "Listed employees",
|
|
2779
|
+
create: "Added employee {name}",
|
|
2780
|
+
"sync-meta": "Synced employee data",
|
|
2781
|
+
update: "Updated employee {id}",
|
|
2782
|
+
migrate: "Migrated employee {id}",
|
|
2783
|
+
"generate-passcode": "Generated employee passcode"
|
|
2784
|
+
},
|
|
2785
|
+
"pos-master-user": {
|
|
2786
|
+
create: "Added POS master employee {name}",
|
|
2787
|
+
update: "Updated POS master employee {name}",
|
|
2788
|
+
delete: "Removed POS master employee {name}"
|
|
2789
|
+
},
|
|
2790
|
+
"pos-role": {
|
|
2791
|
+
list: "Listed employee roles",
|
|
2792
|
+
create: "Added employee role {name}",
|
|
2793
|
+
update: "Updated employee role {name}"
|
|
2794
|
+
},
|
|
2795
|
+
timesheet: {
|
|
2796
|
+
view: "Viewed timesheets",
|
|
2797
|
+
update: "Updated timesheet"
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2726
2800
|
}
|
|
2727
2801
|
}, Do = {
|
|
2728
2802
|
date: xr,
|
|
@@ -2742,12 +2816,15 @@ const wr = {
|
|
|
2742
2816
|
thisMonth: "เดือนนี้",
|
|
2743
2817
|
lastMonth: "เดือนที่แล้ว"
|
|
2744
2818
|
}
|
|
2745
|
-
},
|
|
2819
|
+
}, Pr = {
|
|
2746
2820
|
title: "ประวัติการใช้งาน",
|
|
2747
2821
|
export: "ส่งออก",
|
|
2748
2822
|
dateRange: {
|
|
2749
2823
|
placeholder: "เลือกช่วงวันที่"
|
|
2750
2824
|
},
|
|
2825
|
+
search: {
|
|
2826
|
+
placeholder: "ค้นหาผู้ใช้ เหตุการณ์ หรือรายการ"
|
|
2827
|
+
},
|
|
2751
2828
|
user: {
|
|
2752
2829
|
feedmeAdmin: "ผู้ดูแล FeedMe"
|
|
2753
2830
|
},
|
|
@@ -2863,16 +2940,87 @@ const wr = {
|
|
|
2863
2940
|
requestMethod: "วิธีการเข้าถึง",
|
|
2864
2941
|
requestPath: "URL ที่เข้าถึง",
|
|
2865
2942
|
requestBody: "เนื้อหาคำขอ"
|
|
2943
|
+
},
|
|
2944
|
+
operation: {
|
|
2945
|
+
toggle: "แสดง/ซ่อนการดำเนินการ",
|
|
2946
|
+
rowHint: "การดำเนินการ",
|
|
2947
|
+
unlabeled: "การดำเนินการ",
|
|
2948
|
+
badge: "{count} รายการ",
|
|
2949
|
+
sheetHeader: "รายละเอียดการดำเนินการ",
|
|
2950
|
+
entity: "ข้อมูลที่เกี่ยวข้อง",
|
|
2951
|
+
duration: "ระยะเวลา",
|
|
2952
|
+
durationValue: "{ms} มิลลิวินาที",
|
|
2953
|
+
error: "ข้อผิดพลาด",
|
|
2954
|
+
changes: "การเปลี่ยนแปลง",
|
|
2955
|
+
showData: "แสดงข้อมูล",
|
|
2956
|
+
added: "เพิ่ม",
|
|
2957
|
+
removed: "ลบ",
|
|
2958
|
+
updated: "อัปเดต",
|
|
2959
|
+
before: "ก่อนหน้า",
|
|
2960
|
+
after: "หลังจาก",
|
|
2961
|
+
noChanges: "ไม่มีการเปลี่ยนแปลงที่บันทึกไว้สำหรับการดำเนินการนี้",
|
|
2962
|
+
wholeValue: "ค่า"
|
|
2963
|
+
},
|
|
2964
|
+
event: {
|
|
2965
|
+
sentence: {
|
|
2966
|
+
"audit-log": {
|
|
2967
|
+
view: "ดูบันทึกการตรวจสอบ"
|
|
2968
|
+
},
|
|
2969
|
+
restaurant: {
|
|
2970
|
+
list: "ดูรายการร้านอาหาร"
|
|
2971
|
+
},
|
|
2972
|
+
"permission-assignment": {
|
|
2973
|
+
manage: "จัดการการกำหนดสิทธิ์",
|
|
2974
|
+
list: "ดูรายการการกำหนดสิทธิ์",
|
|
2975
|
+
view: "ดูการกำหนดสิทธิ์ {id}"
|
|
2976
|
+
},
|
|
2977
|
+
"permission-set": {
|
|
2978
|
+
manage: "จัดการกลุ่มสิทธิ์",
|
|
2979
|
+
list: "ดูรายการกลุ่มสิทธิ์",
|
|
2980
|
+
view: "ดูกลุ่มสิทธิ์ {id}"
|
|
2981
|
+
},
|
|
2982
|
+
"portal-user": {
|
|
2983
|
+
list: "ดูรายการสมาชิกทีม",
|
|
2984
|
+
"list-page": "ดูรายการสมาชิกทีม",
|
|
2985
|
+
view: "ดูสมาชิกทีม {id}",
|
|
2986
|
+
create: "เพิ่มสมาชิกทีม {name}",
|
|
2987
|
+
update: "อัปเดตสมาชิกทีม {name}",
|
|
2988
|
+
delete: "ลบสมาชิกทีม {name}"
|
|
2989
|
+
},
|
|
2990
|
+
"pos-user": {
|
|
2991
|
+
list: "ดูรายการพนักงาน",
|
|
2992
|
+
"list-page": "ดูรายการพนักงาน",
|
|
2993
|
+
create: "เพิ่มพนักงาน {name}",
|
|
2994
|
+
"sync-meta": "ซิงค์ข้อมูลพนักงาน",
|
|
2995
|
+
update: "อัปเดตพนักงาน {id}",
|
|
2996
|
+
migrate: "ย้ายพนักงาน {id}",
|
|
2997
|
+
"generate-passcode": "สร้างรหัสผ่านพนักงาน"
|
|
2998
|
+
},
|
|
2999
|
+
"pos-master-user": {
|
|
3000
|
+
create: "เพิ่มพนักงานหลัก POS {name}",
|
|
3001
|
+
update: "อัปเดตพนักงานหลัก POS {name}",
|
|
3002
|
+
delete: "ลบพนักงานหลัก POS {name}"
|
|
3003
|
+
},
|
|
3004
|
+
"pos-role": {
|
|
3005
|
+
list: "ดูรายการบทบาทพนักงาน",
|
|
3006
|
+
create: "เพิ่มบทบาทพนักงาน {name}",
|
|
3007
|
+
update: "อัปเดตบทบาทพนักงาน {name}"
|
|
3008
|
+
},
|
|
3009
|
+
timesheet: {
|
|
3010
|
+
view: "ดูใบบันทึกเวลา",
|
|
3011
|
+
update: "อัปเดตใบบันทึกเวลา"
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
2866
3014
|
}
|
|
2867
3015
|
}, jo = {
|
|
2868
3016
|
date: Er,
|
|
2869
|
-
auditLog:
|
|
3017
|
+
auditLog: Pr
|
|
2870
3018
|
}, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2871
3019
|
__proto__: null,
|
|
2872
|
-
auditLog:
|
|
3020
|
+
auditLog: Pr,
|
|
2873
3021
|
date: Er,
|
|
2874
3022
|
default: jo
|
|
2875
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3023
|
+
}, Symbol.toStringTag, { value: "Module" })), Yr = {
|
|
2876
3024
|
predefinedRanges: {
|
|
2877
3025
|
today: "今天",
|
|
2878
3026
|
yesterday: "昨天",
|
|
@@ -2882,12 +3030,15 @@ const wr = {
|
|
|
2882
3030
|
thisMonth: "本月",
|
|
2883
3031
|
lastMonth: "上月"
|
|
2884
3032
|
}
|
|
2885
|
-
},
|
|
3033
|
+
}, Gr = {
|
|
2886
3034
|
title: "审计日志",
|
|
2887
3035
|
export: "导出",
|
|
2888
3036
|
dateRange: {
|
|
2889
3037
|
placeholder: "选择日期范围"
|
|
2890
3038
|
},
|
|
3039
|
+
search: {
|
|
3040
|
+
placeholder: "搜索用户、事件或记录"
|
|
3041
|
+
},
|
|
2891
3042
|
user: {
|
|
2892
3043
|
feedmeAdmin: "FeedMe 管理员"
|
|
2893
3044
|
},
|
|
@@ -3003,15 +3154,86 @@ const wr = {
|
|
|
3003
3154
|
requestMethod: "请求方法",
|
|
3004
3155
|
requestPath: "请求路径",
|
|
3005
3156
|
requestBody: "请求内容"
|
|
3157
|
+
},
|
|
3158
|
+
operation: {
|
|
3159
|
+
toggle: "展开/收起操作",
|
|
3160
|
+
rowHint: "操作",
|
|
3161
|
+
unlabeled: "操作",
|
|
3162
|
+
badge: "{count} 项操作",
|
|
3163
|
+
sheetHeader: "操作详情",
|
|
3164
|
+
entity: "对象",
|
|
3165
|
+
duration: "耗时",
|
|
3166
|
+
durationValue: "{ms} 毫秒",
|
|
3167
|
+
error: "错误",
|
|
3168
|
+
changes: "变更内容",
|
|
3169
|
+
showData: "显示数据",
|
|
3170
|
+
added: "已添加",
|
|
3171
|
+
removed: "已移除",
|
|
3172
|
+
updated: "已更新",
|
|
3173
|
+
before: "变更前",
|
|
3174
|
+
after: "变更后",
|
|
3175
|
+
noChanges: "此操作未记录任何变更。",
|
|
3176
|
+
wholeValue: "值"
|
|
3177
|
+
},
|
|
3178
|
+
event: {
|
|
3179
|
+
sentence: {
|
|
3180
|
+
"audit-log": {
|
|
3181
|
+
view: "查看了审计日志"
|
|
3182
|
+
},
|
|
3183
|
+
restaurant: {
|
|
3184
|
+
list: "查看了餐厅列表"
|
|
3185
|
+
},
|
|
3186
|
+
"permission-assignment": {
|
|
3187
|
+
manage: "管理了权限分配",
|
|
3188
|
+
list: "查看了权限分配列表",
|
|
3189
|
+
view: "查看了权限分配 {id}"
|
|
3190
|
+
},
|
|
3191
|
+
"permission-set": {
|
|
3192
|
+
manage: "管理了权限集",
|
|
3193
|
+
list: "查看了权限集列表",
|
|
3194
|
+
view: "查看了权限集 {id}"
|
|
3195
|
+
},
|
|
3196
|
+
"portal-user": {
|
|
3197
|
+
list: "查看了团队成员列表",
|
|
3198
|
+
"list-page": "查看了团队成员列表",
|
|
3199
|
+
view: "查看了团队成员 {id}",
|
|
3200
|
+
create: "添加了团队成员 {name}",
|
|
3201
|
+
update: "更新了团队成员 {name}",
|
|
3202
|
+
delete: "移除了团队成员 {name}"
|
|
3203
|
+
},
|
|
3204
|
+
"pos-user": {
|
|
3205
|
+
list: "查看了员工列表",
|
|
3206
|
+
"list-page": "查看了员工列表",
|
|
3207
|
+
create: "添加了员工 {name}",
|
|
3208
|
+
"sync-meta": "同步了员工数据",
|
|
3209
|
+
update: "更新了员工 {id}",
|
|
3210
|
+
migrate: "迁移了员工 {id}",
|
|
3211
|
+
"generate-passcode": "生成了员工密码"
|
|
3212
|
+
},
|
|
3213
|
+
"pos-master-user": {
|
|
3214
|
+
create: "添加了 POS 主员工 {name}",
|
|
3215
|
+
update: "更新了 POS 主员工 {name}",
|
|
3216
|
+
delete: "移除了 POS 主员工 {name}"
|
|
3217
|
+
},
|
|
3218
|
+
"pos-role": {
|
|
3219
|
+
list: "查看了员工角色列表",
|
|
3220
|
+
create: "添加了员工角色 {name}",
|
|
3221
|
+
update: "更新了员工角色 {name}"
|
|
3222
|
+
},
|
|
3223
|
+
timesheet: {
|
|
3224
|
+
view: "查看了工时表",
|
|
3225
|
+
update: "更新了工时表"
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3006
3228
|
}
|
|
3007
|
-
},
|
|
3008
|
-
date:
|
|
3009
|
-
auditLog:
|
|
3010
|
-
},
|
|
3229
|
+
}, Po = {
|
|
3230
|
+
date: Yr,
|
|
3231
|
+
auditLog: Gr
|
|
3232
|
+
}, Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3011
3233
|
__proto__: null,
|
|
3012
|
-
auditLog:
|
|
3013
|
-
date:
|
|
3014
|
-
default:
|
|
3234
|
+
auditLog: Gr,
|
|
3235
|
+
date: Yr,
|
|
3236
|
+
default: Po
|
|
3015
3237
|
}, Symbol.toStringTag, { value: "Module" })), Vr = {
|
|
3016
3238
|
predefinedRanges: {
|
|
3017
3239
|
today: "今天",
|
|
@@ -3028,6 +3250,9 @@ const wr = {
|
|
|
3028
3250
|
dateRange: {
|
|
3029
3251
|
placeholder: "選擇日期範圍"
|
|
3030
3252
|
},
|
|
3253
|
+
search: {
|
|
3254
|
+
placeholder: "搜尋使用者、事件或記錄"
|
|
3255
|
+
},
|
|
3031
3256
|
user: {
|
|
3032
3257
|
feedmeAdmin: "FeedMe 管理員"
|
|
3033
3258
|
},
|
|
@@ -3143,18 +3368,89 @@ const wr = {
|
|
|
3143
3368
|
requestMethod: "請求方法",
|
|
3144
3369
|
requestPath: "請求路徑",
|
|
3145
3370
|
requestBody: "請求內容"
|
|
3371
|
+
},
|
|
3372
|
+
operation: {
|
|
3373
|
+
toggle: "展開/收起操作",
|
|
3374
|
+
rowHint: "操作",
|
|
3375
|
+
unlabeled: "操作",
|
|
3376
|
+
badge: "{count} 項操作",
|
|
3377
|
+
sheetHeader: "操作詳情",
|
|
3378
|
+
entity: "對象",
|
|
3379
|
+
duration: "耗時",
|
|
3380
|
+
durationValue: "{ms} 毫秒",
|
|
3381
|
+
error: "錯誤",
|
|
3382
|
+
changes: "變更內容",
|
|
3383
|
+
showData: "顯示資料",
|
|
3384
|
+
added: "已新增",
|
|
3385
|
+
removed: "已移除",
|
|
3386
|
+
updated: "已更新",
|
|
3387
|
+
before: "變更前",
|
|
3388
|
+
after: "變更後",
|
|
3389
|
+
noChanges: "此操作未記錄任何變更。",
|
|
3390
|
+
wholeValue: "值"
|
|
3391
|
+
},
|
|
3392
|
+
event: {
|
|
3393
|
+
sentence: {
|
|
3394
|
+
"audit-log": {
|
|
3395
|
+
view: "查看了稽核紀錄"
|
|
3396
|
+
},
|
|
3397
|
+
restaurant: {
|
|
3398
|
+
list: "查看了餐廳列表"
|
|
3399
|
+
},
|
|
3400
|
+
"permission-assignment": {
|
|
3401
|
+
manage: "管理了權限指派",
|
|
3402
|
+
list: "查看了權限指派列表",
|
|
3403
|
+
view: "查看了權限指派 {id}"
|
|
3404
|
+
},
|
|
3405
|
+
"permission-set": {
|
|
3406
|
+
manage: "管理了權限集",
|
|
3407
|
+
list: "查看了權限集列表",
|
|
3408
|
+
view: "查看了權限集 {id}"
|
|
3409
|
+
},
|
|
3410
|
+
"portal-user": {
|
|
3411
|
+
list: "查看了團隊成員列表",
|
|
3412
|
+
"list-page": "查看了團隊成員列表",
|
|
3413
|
+
view: "查看了團隊成員 {id}",
|
|
3414
|
+
create: "新增了團隊成員 {name}",
|
|
3415
|
+
update: "更新了團隊成員 {name}",
|
|
3416
|
+
delete: "移除了團隊成員 {name}"
|
|
3417
|
+
},
|
|
3418
|
+
"pos-user": {
|
|
3419
|
+
list: "查看了員工列表",
|
|
3420
|
+
"list-page": "查看了員工列表",
|
|
3421
|
+
create: "新增了員工 {name}",
|
|
3422
|
+
"sync-meta": "同步了員工資料",
|
|
3423
|
+
update: "更新了員工 {id}",
|
|
3424
|
+
migrate: "移轉了員工 {id}",
|
|
3425
|
+
"generate-passcode": "產生了員工密碼"
|
|
3426
|
+
},
|
|
3427
|
+
"pos-master-user": {
|
|
3428
|
+
create: "新增了 POS 主員工 {name}",
|
|
3429
|
+
update: "更新了 POS 主員工 {name}",
|
|
3430
|
+
delete: "移除了 POS 主員工 {name}"
|
|
3431
|
+
},
|
|
3432
|
+
"pos-role": {
|
|
3433
|
+
list: "查看了員工角色列表",
|
|
3434
|
+
create: "新增了員工角色 {name}",
|
|
3435
|
+
update: "更新了員工角色 {name}"
|
|
3436
|
+
},
|
|
3437
|
+
timesheet: {
|
|
3438
|
+
view: "查看了工時表",
|
|
3439
|
+
update: "更新了工時表"
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3146
3442
|
}
|
|
3147
|
-
},
|
|
3443
|
+
}, Go = {
|
|
3148
3444
|
date: Vr,
|
|
3149
3445
|
auditLog: Or
|
|
3150
3446
|
}, Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3151
3447
|
__proto__: null,
|
|
3152
3448
|
auditLog: Or,
|
|
3153
3449
|
date: Vr,
|
|
3154
|
-
default:
|
|
3450
|
+
default: Go
|
|
3155
3451
|
}, Symbol.toStringTag, { value: "Module" })), Oo = {
|
|
3156
3452
|
"en-US": xo,
|
|
3157
|
-
"zh-CN":
|
|
3453
|
+
"zh-CN": Yo,
|
|
3158
3454
|
"th-TH": Eo,
|
|
3159
3455
|
"zh-Hant": Vo
|
|
3160
3456
|
}, Fr = {
|
|
@@ -4493,7 +4789,7 @@ const wr = {
|
|
|
4493
4789
|
}, Zo = {
|
|
4494
4790
|
team: Qr,
|
|
4495
4791
|
permissionSet: kr
|
|
4496
|
-
},
|
|
4792
|
+
}, Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4497
4793
|
__proto__: null,
|
|
4498
4794
|
default: Zo,
|
|
4499
4795
|
permissionSet: kr,
|
|
@@ -4745,12 +5041,12 @@ const wr = {
|
|
|
4745
5041
|
permissions: "权限"
|
|
4746
5042
|
}
|
|
4747
5043
|
}
|
|
4748
|
-
},
|
|
5044
|
+
}, zo = {
|
|
4749
5045
|
team: Tr,
|
|
4750
5046
|
permissionSet: Nr
|
|
4751
5047
|
}, Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4752
5048
|
__proto__: null,
|
|
4753
|
-
default:
|
|
5049
|
+
default: zo,
|
|
4754
5050
|
permissionSet: Nr,
|
|
4755
5051
|
team: Tr
|
|
4756
5052
|
}, Symbol.toStringTag, { value: "Module" })), Sr = {
|
|
@@ -5018,9 +5314,9 @@ const wr = {
|
|
|
5018
5314
|
}, Symbol.toStringTag, { value: "Module" })), Jo = {
|
|
5019
5315
|
"en-US": So,
|
|
5020
5316
|
"zh-CN": Wo,
|
|
5021
|
-
"th-TH":
|
|
5317
|
+
"th-TH": Uo,
|
|
5022
5318
|
"zh-Hant": Ko
|
|
5023
|
-
},
|
|
5319
|
+
}, Ur = {
|
|
5024
5320
|
title: "POS Grant",
|
|
5025
5321
|
actions: {
|
|
5026
5322
|
create: "Create Passcode",
|
|
@@ -5075,12 +5371,12 @@ const wr = {
|
|
|
5075
5371
|
copied: "Passcode copied"
|
|
5076
5372
|
}
|
|
5077
5373
|
}, _o = {
|
|
5078
|
-
grantUser:
|
|
5374
|
+
grantUser: Ur
|
|
5079
5375
|
}, $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5080
5376
|
__proto__: null,
|
|
5081
5377
|
default: _o,
|
|
5082
|
-
grantUser:
|
|
5083
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5378
|
+
grantUser: Ur
|
|
5379
|
+
}, Symbol.toStringTag, { value: "Module" })), zr = {
|
|
5084
5380
|
title: "POS Grant",
|
|
5085
5381
|
actions: {
|
|
5086
5382
|
create: "สร้างรหัสผ่าน",
|
|
@@ -5135,11 +5431,11 @@ const wr = {
|
|
|
5135
5431
|
copied: "คัดลอกรหัสผ่านแล้ว"
|
|
5136
5432
|
}
|
|
5137
5433
|
}, ei = {
|
|
5138
|
-
grantUser:
|
|
5434
|
+
grantUser: zr
|
|
5139
5435
|
}, ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5140
5436
|
__proto__: null,
|
|
5141
5437
|
default: ei,
|
|
5142
|
-
grantUser:
|
|
5438
|
+
grantUser: zr
|
|
5143
5439
|
}, Symbol.toStringTag, { value: "Module" })), Wr = {
|
|
5144
5440
|
title: "POS 授予",
|
|
5145
5441
|
actions: {
|
|
@@ -5668,7 +5964,7 @@ const wr = {
|
|
|
5668
5964
|
}
|
|
5669
5965
|
}, vi = {
|
|
5670
5966
|
posAccess: sn
|
|
5671
|
-
},
|
|
5967
|
+
}, wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5672
5968
|
__proto__: null,
|
|
5673
5969
|
default: vi,
|
|
5674
5970
|
posAccess: sn
|
|
@@ -5680,15 +5976,15 @@ const wr = {
|
|
|
5680
5976
|
codes: "授權碼",
|
|
5681
5977
|
codesDescription: "產生一次性授權碼,用於核准退款、作廢等敏感操作。"
|
|
5682
5978
|
}
|
|
5683
|
-
},
|
|
5979
|
+
}, Bi = {
|
|
5684
5980
|
posAccess: rn
|
|
5685
5981
|
}, Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5686
5982
|
__proto__: null,
|
|
5687
|
-
default:
|
|
5983
|
+
default: Bi,
|
|
5688
5984
|
posAccess: rn
|
|
5689
5985
|
}, Symbol.toStringTag, { value: "Module" })), Ci = {
|
|
5690
5986
|
"en-US": hi,
|
|
5691
|
-
"zh-CN":
|
|
5987
|
+
"zh-CN": wi,
|
|
5692
5988
|
"th-TH": bi,
|
|
5693
5989
|
"zh-Hant": Mi
|
|
5694
5990
|
}, yt = {
|
|
@@ -5715,7 +6011,7 @@ const wr = {
|
|
|
5715
6011
|
[ee.integration]: d.inventory_integration,
|
|
5716
6012
|
[ee.orderDraft]: d.inventory_orderDraftApproval,
|
|
5717
6013
|
[ee.unitCostHistory]: d.inventory_unitCostHistory
|
|
5718
|
-
},
|
|
6014
|
+
}, Gl = {
|
|
5719
6015
|
// General
|
|
5720
6016
|
restaurant: {
|
|
5721
6017
|
label: "Restaurant Owner",
|
|
@@ -6441,14 +6737,14 @@ const L = [
|
|
|
6441
6737
|
o.delete
|
|
6442
6738
|
]
|
|
6443
6739
|
}
|
|
6444
|
-
],
|
|
6740
|
+
], Pi = [
|
|
6445
6741
|
...L,
|
|
6446
6742
|
{
|
|
6447
6743
|
label: "Setting",
|
|
6448
6744
|
subject: Z.crm_setting,
|
|
6449
6745
|
actions: [o.read, o.update]
|
|
6450
6746
|
}
|
|
6451
|
-
],
|
|
6747
|
+
], Yi = [
|
|
6452
6748
|
...L,
|
|
6453
6749
|
{
|
|
6454
6750
|
label: "Reward",
|
|
@@ -6503,7 +6799,7 @@ const L = [
|
|
|
6503
6799
|
subject: Z.crm_analytic,
|
|
6504
6800
|
actions: [o.read]
|
|
6505
6801
|
}
|
|
6506
|
-
],
|
|
6802
|
+
], Gi = [
|
|
6507
6803
|
...L,
|
|
6508
6804
|
{
|
|
6509
6805
|
label: "Tier",
|
|
@@ -6644,7 +6940,7 @@ const L = [
|
|
|
6644
6940
|
}
|
|
6645
6941
|
], pn = Ae(
|
|
6646
6942
|
ye,
|
|
6647
|
-
|
|
6943
|
+
Gi
|
|
6648
6944
|
), fn = Ae(
|
|
6649
6945
|
ye,
|
|
6650
6946
|
Vi
|
|
@@ -6660,10 +6956,10 @@ const L = [
|
|
|
6660
6956
|
), vn = Ae(
|
|
6661
6957
|
ye,
|
|
6662
6958
|
Ii
|
|
6663
|
-
),
|
|
6959
|
+
), wn = Ae(
|
|
6664
6960
|
ye,
|
|
6665
6961
|
Hi
|
|
6666
|
-
),
|
|
6962
|
+
), Bn = Ae(
|
|
6667
6963
|
ye,
|
|
6668
6964
|
Ri
|
|
6669
6965
|
), Xi = Ae(
|
|
@@ -6671,7 +6967,7 @@ const L = [
|
|
|
6671
6967
|
cn
|
|
6672
6968
|
), Mn = Ae(
|
|
6673
6969
|
ye,
|
|
6674
|
-
|
|
6970
|
+
Pi
|
|
6675
6971
|
), Qi = [
|
|
6676
6972
|
...L,
|
|
6677
6973
|
{
|
|
@@ -6704,7 +7000,7 @@ const L = [
|
|
|
6704
7000
|
ji,
|
|
6705
7001
|
Ei,
|
|
6706
7002
|
Mn,
|
|
6707
|
-
|
|
7003
|
+
Yi,
|
|
6708
7004
|
un,
|
|
6709
7005
|
pn,
|
|
6710
7006
|
fn,
|
|
@@ -6712,8 +7008,8 @@ const L = [
|
|
|
6712
7008
|
yn,
|
|
6713
7009
|
bn,
|
|
6714
7010
|
vn,
|
|
6715
|
-
Bn,
|
|
6716
7011
|
wn,
|
|
7012
|
+
Bn,
|
|
6717
7013
|
An,
|
|
6718
7014
|
dn,
|
|
6719
7015
|
mn,
|
|
@@ -6725,7 +7021,7 @@ const L = [
|
|
|
6725
7021
|
), Si = Ae(
|
|
6726
7022
|
ye,
|
|
6727
7023
|
Qi
|
|
6728
|
-
), Zi = Ae(ki),
|
|
7024
|
+
), Zi = Ae(ki), Ui = {
|
|
6729
7025
|
[`set_${d.crm}`]: {
|
|
6730
7026
|
key: "sys:crm:access",
|
|
6731
7027
|
name: "CRM Access",
|
|
@@ -6784,12 +7080,12 @@ const L = [
|
|
|
6784
7080
|
[`set_${d.crm_game}`]: {
|
|
6785
7081
|
key: "sys:crm:game",
|
|
6786
7082
|
name: "CRM Game",
|
|
6787
|
-
permissions:
|
|
7083
|
+
permissions: wn
|
|
6788
7084
|
},
|
|
6789
7085
|
[`set_${d.crm_mission}`]: {
|
|
6790
7086
|
key: "sys:crm:mission",
|
|
6791
7087
|
name: "CRM Mission",
|
|
6792
|
-
permissions:
|
|
7088
|
+
permissions: Bn
|
|
6793
7089
|
},
|
|
6794
7090
|
[`set_${d.crm_loyaltyMember}`]: {
|
|
6795
7091
|
key: "sys:crm:loyaltyMember",
|
|
@@ -6866,7 +7162,7 @@ const ie = [
|
|
|
6866
7162
|
subject: V.inventory_unitCostHistory,
|
|
6867
7163
|
actions: [o.read]
|
|
6868
7164
|
}
|
|
6869
|
-
],
|
|
7165
|
+
], zi = [
|
|
6870
7166
|
...ie,
|
|
6871
7167
|
{
|
|
6872
7168
|
label: "Stock Adjustment",
|
|
@@ -7045,7 +7341,7 @@ const Wi = [
|
|
|
7045
7341
|
subject: V.inventory_shipment,
|
|
7046
7342
|
actions: [o.read, o.update]
|
|
7047
7343
|
}
|
|
7048
|
-
],
|
|
7344
|
+
], Pn = [
|
|
7049
7345
|
{
|
|
7050
7346
|
label: "Purchase Order",
|
|
7051
7347
|
subject: V.inventory_purchaseOrder,
|
|
@@ -7066,7 +7362,7 @@ const Wi = [
|
|
|
7066
7362
|
subject: V.inventory_shipment,
|
|
7067
7363
|
actions: [o.read, o.update]
|
|
7068
7364
|
}
|
|
7069
|
-
],
|
|
7365
|
+
], Yn = [
|
|
7070
7366
|
...ie,
|
|
7071
7367
|
{
|
|
7072
7368
|
label: "Surcharge",
|
|
@@ -7083,7 +7379,7 @@ const Wi = [
|
|
|
7083
7379
|
subject: V.inventory_supplier,
|
|
7084
7380
|
actions: [o.read]
|
|
7085
7381
|
}
|
|
7086
|
-
],
|
|
7382
|
+
], Gn = [
|
|
7087
7383
|
...ie,
|
|
7088
7384
|
{
|
|
7089
7385
|
label: "Order Template",
|
|
@@ -7115,9 +7411,9 @@ const Wi = [
|
|
|
7115
7411
|
];
|
|
7116
7412
|
[
|
|
7117
7413
|
...En,
|
|
7414
|
+
...Pn,
|
|
7118
7415
|
...Yn,
|
|
7119
|
-
...Gn
|
|
7120
|
-
...Pn
|
|
7416
|
+
...Gn
|
|
7121
7417
|
];
|
|
7122
7418
|
const $i = [
|
|
7123
7419
|
...ie,
|
|
@@ -7183,7 +7479,7 @@ const nc = {
|
|
|
7183
7479
|
[`set_${d.inventory_stockAdjustment}`]: {
|
|
7184
7480
|
key: "sys:inventory:stock_adjustment",
|
|
7185
7481
|
name: "Stock Adjustment",
|
|
7186
|
-
permissions:
|
|
7482
|
+
permissions: zi
|
|
7187
7483
|
},
|
|
7188
7484
|
[`set_${d.inventory_unitCostHistory}`]: {
|
|
7189
7485
|
key: "sys:inventory:unit_cost_history",
|
|
@@ -7243,17 +7539,17 @@ const nc = {
|
|
|
7243
7539
|
[`set_${d.inventory_transferOut}`]: {
|
|
7244
7540
|
key: "sys:inventory:transfer_out",
|
|
7245
7541
|
name: "Transfer Out",
|
|
7246
|
-
permissions:
|
|
7542
|
+
permissions: Pn
|
|
7247
7543
|
},
|
|
7248
7544
|
[`set_${d.inventory_surcharge}`]: {
|
|
7249
7545
|
key: "sys:inventory:surcharge",
|
|
7250
7546
|
name: "Surcharge",
|
|
7251
|
-
permissions:
|
|
7547
|
+
permissions: Yn
|
|
7252
7548
|
},
|
|
7253
7549
|
[`set_${d.inventory_orderTemplate}`]: {
|
|
7254
7550
|
key: "sys:inventory:order_template",
|
|
7255
7551
|
name: "Order Template",
|
|
7256
|
-
permissions:
|
|
7552
|
+
permissions: Gn
|
|
7257
7553
|
},
|
|
7258
7554
|
[`set_${d.inventory_supplier}`]: {
|
|
7259
7555
|
key: "sys:inventory:supplier",
|
|
@@ -7396,7 +7692,7 @@ const sr = [
|
|
|
7396
7692
|
permissions: sr
|
|
7397
7693
|
}
|
|
7398
7694
|
}, ic = {
|
|
7399
|
-
...
|
|
7695
|
+
...Ui,
|
|
7400
7696
|
...nc,
|
|
7401
7697
|
...ac,
|
|
7402
7698
|
...oc
|
|
@@ -7466,8 +7762,8 @@ var On = { exports: {} };
|
|
|
7466
7762
|
}
|
|
7467
7763
|
function c(m) {
|
|
7468
7764
|
var p = "[object " + m + "]";
|
|
7469
|
-
return function(
|
|
7470
|
-
return Object.prototype.toString.call(
|
|
7765
|
+
return function(B) {
|
|
7766
|
+
return Object.prototype.toString.call(B) === p;
|
|
7471
7767
|
};
|
|
7472
7768
|
}
|
|
7473
7769
|
n.r(r), n.d(r, "default", function() {
|
|
@@ -7478,27 +7774,27 @@ var On = { exports: {} };
|
|
|
7478
7774
|
return At;
|
|
7479
7775
|
});
|
|
7480
7776
|
var l = c("Array"), y = c("Object"), h = c("Function");
|
|
7481
|
-
function
|
|
7777
|
+
function w(m, p) {
|
|
7482
7778
|
return h(m.get) ? m.get(p) : m[p];
|
|
7483
7779
|
}
|
|
7484
7780
|
function O(m) {
|
|
7485
|
-
return function(p,
|
|
7486
|
-
if (!l(
|
|
7487
|
-
for (var D = 0, E =
|
|
7488
|
-
if (m(p, B
|
|
7781
|
+
return function(p, B) {
|
|
7782
|
+
if (!l(B) || !B.length) return m(p, B);
|
|
7783
|
+
for (var D = 0, E = B.length; D < E; D++)
|
|
7784
|
+
if (m(p, w(B, D))) return !0;
|
|
7489
7785
|
return !1;
|
|
7490
7786
|
};
|
|
7491
7787
|
}
|
|
7492
7788
|
function N(m) {
|
|
7493
|
-
return function(p,
|
|
7494
|
-
if (!l(
|
|
7495
|
-
for (var D = 0, E =
|
|
7496
|
-
if (!m(p, B
|
|
7789
|
+
return function(p, B) {
|
|
7790
|
+
if (!l(B) || !B.length) return m(p, B);
|
|
7791
|
+
for (var D = 0, E = B.length; D < E; D++)
|
|
7792
|
+
if (!m(p, w(B, D))) return !1;
|
|
7497
7793
|
return !0;
|
|
7498
7794
|
};
|
|
7499
7795
|
}
|
|
7500
|
-
function
|
|
7501
|
-
return m.validate(m.options, p,
|
|
7796
|
+
function U(m, p, B, D) {
|
|
7797
|
+
return m.validate(m.options, p, B, D);
|
|
7502
7798
|
}
|
|
7503
7799
|
var $ = {
|
|
7504
7800
|
$eq: O(function(m, p) {
|
|
@@ -7528,115 +7824,115 @@ var On = { exports: {} };
|
|
|
7528
7824
|
$nin: function(m, p) {
|
|
7529
7825
|
return m(p);
|
|
7530
7826
|
},
|
|
7531
|
-
$not: function(m, p,
|
|
7532
|
-
return m(p,
|
|
7827
|
+
$not: function(m, p, B, D) {
|
|
7828
|
+
return m(p, B, D);
|
|
7533
7829
|
},
|
|
7534
7830
|
$type: function(m, p) {
|
|
7535
7831
|
return m(p);
|
|
7536
7832
|
},
|
|
7537
|
-
$all: function(m, p,
|
|
7538
|
-
return $.$and(m, p,
|
|
7833
|
+
$all: function(m, p, B, D) {
|
|
7834
|
+
return $.$and(m, p, B, D);
|
|
7539
7835
|
},
|
|
7540
7836
|
$size: function(m, p) {
|
|
7541
7837
|
return !!p && m === p.length;
|
|
7542
7838
|
},
|
|
7543
|
-
$or: function(m, p,
|
|
7544
|
-
for (var E = 0,
|
|
7545
|
-
if (
|
|
7839
|
+
$or: function(m, p, B, D) {
|
|
7840
|
+
for (var E = 0, Y = m.length; E < Y; E++)
|
|
7841
|
+
if (U(w(m, E), p, B, D)) return !0;
|
|
7546
7842
|
return !1;
|
|
7547
7843
|
},
|
|
7548
|
-
$nor: function(m, p,
|
|
7549
|
-
return !$.$or(m, p,
|
|
7844
|
+
$nor: function(m, p, B, D) {
|
|
7845
|
+
return !$.$or(m, p, B, D);
|
|
7550
7846
|
},
|
|
7551
|
-
$and: function(m, p,
|
|
7552
|
-
for (var E = 0,
|
|
7553
|
-
if (!
|
|
7847
|
+
$and: function(m, p, B, D) {
|
|
7848
|
+
for (var E = 0, Y = m.length; E < Y; E++)
|
|
7849
|
+
if (!U(w(m, E), p, B, D)) return !1;
|
|
7554
7850
|
return !0;
|
|
7555
7851
|
},
|
|
7556
7852
|
$regex: O(function(m, p) {
|
|
7557
7853
|
return typeof p == "string" && m.test(p);
|
|
7558
7854
|
}),
|
|
7559
|
-
$where: function(m, p,
|
|
7560
|
-
return m.call(p, p,
|
|
7855
|
+
$where: function(m, p, B, D) {
|
|
7856
|
+
return m.call(p, p, B, D);
|
|
7561
7857
|
},
|
|
7562
|
-
$elemMatch: function(m, p,
|
|
7563
|
-
return l(p) ? !!~function(E,
|
|
7858
|
+
$elemMatch: function(m, p, B, D) {
|
|
7859
|
+
return l(p) ? !!~function(E, Y) {
|
|
7564
7860
|
for (var q = 0; q < E.length; q++)
|
|
7565
|
-
if (
|
|
7861
|
+
if (w(E, q), U(Y, w(E, q))) return q;
|
|
7566
7862
|
return -1;
|
|
7567
|
-
}(p, m) :
|
|
7863
|
+
}(p, m) : U(m, p, B, D);
|
|
7568
7864
|
},
|
|
7569
|
-
$exists: function(m, p,
|
|
7570
|
-
return D.hasOwnProperty(
|
|
7865
|
+
$exists: function(m, p, B, D) {
|
|
7866
|
+
return D.hasOwnProperty(B) === m;
|
|
7571
7867
|
}
|
|
7572
7868
|
}, re = {
|
|
7573
|
-
$eq: function(m, p,
|
|
7574
|
-
var D =
|
|
7575
|
-
return m instanceof RegExp ? O(function(
|
|
7576
|
-
return typeof
|
|
7577
|
-
}) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(
|
|
7578
|
-
return l(
|
|
7869
|
+
$eq: function(m, p, B) {
|
|
7870
|
+
var D = B.comparable, E = B.compare;
|
|
7871
|
+
return m instanceof RegExp ? O(function(Y) {
|
|
7872
|
+
return typeof Y == "string" && m.test(Y);
|
|
7873
|
+
}) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(Y) {
|
|
7874
|
+
return l(Y) && !Y.length;
|
|
7579
7875
|
}) : O(
|
|
7580
|
-
m === null ? function(
|
|
7581
|
-
return
|
|
7582
|
-
} : function(
|
|
7583
|
-
return E(D(
|
|
7876
|
+
m === null ? function(Y) {
|
|
7877
|
+
return Y == null;
|
|
7878
|
+
} : function(Y) {
|
|
7879
|
+
return E(D(Y), D(m)) === 0;
|
|
7584
7880
|
}
|
|
7585
7881
|
);
|
|
7586
7882
|
},
|
|
7587
|
-
$gt: function(m, p,
|
|
7588
|
-
var D =
|
|
7589
|
-
return function(
|
|
7590
|
-
return E(D(
|
|
7883
|
+
$gt: function(m, p, B) {
|
|
7884
|
+
var D = B.comparable, E = B.compare;
|
|
7885
|
+
return function(Y) {
|
|
7886
|
+
return E(D(Y), D(m)) > 0;
|
|
7591
7887
|
};
|
|
7592
7888
|
},
|
|
7593
|
-
$gte: function(m, p,
|
|
7594
|
-
var D =
|
|
7595
|
-
return function(
|
|
7596
|
-
return E(D(
|
|
7889
|
+
$gte: function(m, p, B) {
|
|
7890
|
+
var D = B.comparable, E = B.compare;
|
|
7891
|
+
return function(Y) {
|
|
7892
|
+
return E(D(Y), D(m)) >= 0;
|
|
7597
7893
|
};
|
|
7598
7894
|
},
|
|
7599
|
-
$lt: function(m, p,
|
|
7600
|
-
var D =
|
|
7601
|
-
return function(
|
|
7602
|
-
return E(D(
|
|
7895
|
+
$lt: function(m, p, B) {
|
|
7896
|
+
var D = B.comparable, E = B.compare;
|
|
7897
|
+
return function(Y) {
|
|
7898
|
+
return E(D(Y), D(m)) < 0;
|
|
7603
7899
|
};
|
|
7604
7900
|
},
|
|
7605
|
-
$lte: function(m, p,
|
|
7606
|
-
var D =
|
|
7607
|
-
return function(
|
|
7608
|
-
return E(D(
|
|
7901
|
+
$lte: function(m, p, B) {
|
|
7902
|
+
var D = B.comparable, E = B.compare;
|
|
7903
|
+
return function(Y) {
|
|
7904
|
+
return E(D(Y), D(m)) <= 0;
|
|
7609
7905
|
};
|
|
7610
7906
|
},
|
|
7611
|
-
$in: function(m, p,
|
|
7612
|
-
var D =
|
|
7907
|
+
$in: function(m, p, B) {
|
|
7908
|
+
var D = B.comparable;
|
|
7613
7909
|
return function(E) {
|
|
7614
7910
|
if (!(E instanceof Array)) {
|
|
7615
|
-
var
|
|
7616
|
-
if (
|
|
7911
|
+
var Y = D(E);
|
|
7912
|
+
if (Y === E && a(E) === "object") {
|
|
7617
7913
|
for (R = m.length; R--; )
|
|
7618
7914
|
if (String(m[R]) === String(E) && String(E) !== "[object Object]")
|
|
7619
7915
|
return !0;
|
|
7620
7916
|
}
|
|
7621
|
-
if (
|
|
7917
|
+
if (Y === void 0) {
|
|
7622
7918
|
for (R = m.length; R--; ) if (m[R] == null) return !0;
|
|
7623
7919
|
}
|
|
7624
7920
|
for (R = m.length; R--; ) {
|
|
7625
|
-
var q =
|
|
7626
|
-
if (q && String(q) !== "[object Object]" && String(
|
|
7921
|
+
var q = U(lt(w(m, R), B), Y, R, m);
|
|
7922
|
+
if (q && String(q) !== "[object Object]" && String(Y) !== "[object Object]")
|
|
7627
7923
|
return !0;
|
|
7628
7924
|
}
|
|
7629
|
-
return !!~m.indexOf(
|
|
7925
|
+
return !!~m.indexOf(Y);
|
|
7630
7926
|
}
|
|
7631
7927
|
for (var R = E.length; R--; )
|
|
7632
|
-
if (~m.indexOf(D(
|
|
7928
|
+
if (~m.indexOf(D(w(E, R)))) return !0;
|
|
7633
7929
|
return !1;
|
|
7634
7930
|
};
|
|
7635
7931
|
},
|
|
7636
|
-
$nin: function(m, p,
|
|
7637
|
-
var D = re.$in(m, p,
|
|
7638
|
-
return function(E,
|
|
7639
|
-
return !D(E,
|
|
7932
|
+
$nin: function(m, p, B) {
|
|
7933
|
+
var D = re.$in(m, p, B);
|
|
7934
|
+
return function(E, Y, q, R) {
|
|
7935
|
+
return !D(E, Y, q, R);
|
|
7640
7936
|
};
|
|
7641
7937
|
},
|
|
7642
7938
|
$mod: function(m) {
|
|
@@ -7644,32 +7940,32 @@ var On = { exports: {} };
|
|
|
7644
7940
|
return p % m[0] == m[1];
|
|
7645
7941
|
};
|
|
7646
7942
|
},
|
|
7647
|
-
$ne: function(m, p,
|
|
7648
|
-
var D = re.$eq(m, p,
|
|
7649
|
-
return N(function(E,
|
|
7650
|
-
return !D(E,
|
|
7943
|
+
$ne: function(m, p, B) {
|
|
7944
|
+
var D = re.$eq(m, p, B);
|
|
7945
|
+
return N(function(E, Y, q, R) {
|
|
7946
|
+
return !D(E, Y, q, R);
|
|
7651
7947
|
});
|
|
7652
7948
|
},
|
|
7653
|
-
$and: function(m, p,
|
|
7654
|
-
return m.map(be(
|
|
7949
|
+
$and: function(m, p, B) {
|
|
7950
|
+
return m.map(be(B));
|
|
7655
7951
|
},
|
|
7656
|
-
$all: function(m, p,
|
|
7657
|
-
return re.$and(m, p,
|
|
7952
|
+
$all: function(m, p, B) {
|
|
7953
|
+
return re.$and(m, p, B);
|
|
7658
7954
|
},
|
|
7659
|
-
$or: function(m, p,
|
|
7660
|
-
return m.map(be(
|
|
7955
|
+
$or: function(m, p, B) {
|
|
7956
|
+
return m.map(be(B));
|
|
7661
7957
|
},
|
|
7662
|
-
$nor: function(m, p,
|
|
7663
|
-
return m.map(be(
|
|
7958
|
+
$nor: function(m, p, B) {
|
|
7959
|
+
return m.map(be(B));
|
|
7664
7960
|
},
|
|
7665
|
-
$not: function(m, p,
|
|
7666
|
-
var D = be(
|
|
7667
|
-
return function(E,
|
|
7668
|
-
return !
|
|
7961
|
+
$not: function(m, p, B) {
|
|
7962
|
+
var D = be(B)(m);
|
|
7963
|
+
return function(E, Y, q) {
|
|
7964
|
+
return !U(D, E, Y, q);
|
|
7669
7965
|
};
|
|
7670
7966
|
},
|
|
7671
7967
|
$type: function(m) {
|
|
7672
|
-
return function(p,
|
|
7968
|
+
return function(p, B, D) {
|
|
7673
7969
|
return p != null && (p instanceof m || p.constructor == m);
|
|
7674
7970
|
};
|
|
7675
7971
|
},
|
|
@@ -7682,8 +7978,8 @@ var On = { exports: {} };
|
|
|
7682
7978
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
7683
7979
|
);
|
|
7684
7980
|
},
|
|
7685
|
-
$elemMatch: function(m, p,
|
|
7686
|
-
return be(
|
|
7981
|
+
$elemMatch: function(m, p, B) {
|
|
7982
|
+
return be(B)(m);
|
|
7687
7983
|
},
|
|
7688
7984
|
$exists: function(m) {
|
|
7689
7985
|
return !!m;
|
|
@@ -7693,29 +7989,29 @@ var On = { exports: {} };
|
|
|
7693
7989
|
return { options: m, validate: p };
|
|
7694
7990
|
}
|
|
7695
7991
|
function ne(m, p) {
|
|
7696
|
-
var
|
|
7697
|
-
if (function i(g, A, b, M,
|
|
7992
|
+
var B = m.keyPath, D = m.child, E = m.query, Y = [];
|
|
7993
|
+
if (function i(g, A, b, M, G) {
|
|
7698
7994
|
if (b === A.length || g == null)
|
|
7699
|
-
return void
|
|
7700
|
-
var F =
|
|
7995
|
+
return void G.push([g, A[b - 1], M]);
|
|
7996
|
+
var F = w(A, b);
|
|
7701
7997
|
if (l(g) && isNaN(Number(F)))
|
|
7702
|
-
for (var k = 0, j = g.length; k < j; k++) i(
|
|
7703
|
-
else i(
|
|
7704
|
-
}(p,
|
|
7705
|
-
var q =
|
|
7706
|
-
return
|
|
7998
|
+
for (var k = 0, j = g.length; k < j; k++) i(w(g, k), A, b, g, G);
|
|
7999
|
+
else i(w(g, F), A, b + 1, g, G);
|
|
8000
|
+
}(p, B, 0, p, Y), Y.length === 1) {
|
|
8001
|
+
var q = Y[0];
|
|
8002
|
+
return U(D, q[0], q[1], q[2]);
|
|
7707
8003
|
}
|
|
7708
|
-
for (var R = E && E.$ne !== void 0, _ = R, se = 0; se <
|
|
7709
|
-
var f =
|
|
8004
|
+
for (var R = E && E.$ne !== void 0, _ = R, se = 0; se < Y.length; se++) {
|
|
8005
|
+
var f = Y[se], u = U(D, f[0], f[1], f[2]);
|
|
7710
8006
|
R ? _ &= u : _ |= u;
|
|
7711
8007
|
}
|
|
7712
8008
|
return _;
|
|
7713
8009
|
}
|
|
7714
|
-
function Jt(m, p,
|
|
7715
|
-
return me({ keyPath: m, child: p, query:
|
|
8010
|
+
function Jt(m, p, B) {
|
|
8011
|
+
return me({ keyPath: m, child: p, query: B }, ne);
|
|
7716
8012
|
}
|
|
7717
8013
|
function be(m) {
|
|
7718
|
-
var p = m.comparable,
|
|
8014
|
+
var p = m.comparable, B = m.expressions, D = function(q) {
|
|
7719
8015
|
var R;
|
|
7720
8016
|
return (!q || !(R = q) || R.constructor !== Object && R.constructor !== Array && R.constructor.toString() !== "function Object() { [native code] }" && R.constructor.toString() !== "function Array() { [native code] }" || R.toJSON) && (q = { $eq: q }), q;
|
|
7721
8017
|
}, E = function(q) {
|
|
@@ -7724,18 +8020,18 @@ var On = { exports: {} };
|
|
|
7724
8020
|
for (var _ in q) {
|
|
7725
8021
|
var se = q[_];
|
|
7726
8022
|
if (_ !== "$options") {
|
|
7727
|
-
var f = $[_] || m &&
|
|
8023
|
+
var f = $[_] || m && B && B[_];
|
|
7728
8024
|
if (f) re[_] && (se = re[_](se, q, m)), R.push(me(p(se), f));
|
|
7729
8025
|
else {
|
|
7730
8026
|
if (_.charCodeAt(0) === 36)
|
|
7731
8027
|
throw new Error("Unknown operation " + _);
|
|
7732
8028
|
var u = _.split(".");
|
|
7733
|
-
R.push(Jt(u,
|
|
8029
|
+
R.push(Jt(u, Y(se), se));
|
|
7734
8030
|
}
|
|
7735
8031
|
}
|
|
7736
8032
|
}
|
|
7737
8033
|
return R.length === 1 ? R[0] : me(R, $.$and);
|
|
7738
|
-
},
|
|
8034
|
+
}, Y = function(q) {
|
|
7739
8035
|
return q = D(q), function R(_, se) {
|
|
7740
8036
|
if (!y(_)) return se;
|
|
7741
8037
|
for (var f in _) se.push(f), R(_[f], se);
|
|
@@ -7751,7 +8047,7 @@ var On = { exports: {} };
|
|
|
7751
8047
|
return !1;
|
|
7752
8048
|
if (y(m)) {
|
|
7753
8049
|
if (Object.keys(m).length !== Object.keys(p).length) return !1;
|
|
7754
|
-
for (var
|
|
8050
|
+
for (var B in m) if (!Ne(m[B], p[B])) return !1;
|
|
7755
8051
|
return !0;
|
|
7756
8052
|
}
|
|
7757
8053
|
if (l(m)) {
|
|
@@ -7763,18 +8059,18 @@ var On = { exports: {} };
|
|
|
7763
8059
|
return m === p;
|
|
7764
8060
|
}
|
|
7765
8061
|
function lt(m, p) {
|
|
7766
|
-
var
|
|
7767
|
-
return p && p.select && (
|
|
7768
|
-
options:
|
|
7769
|
-
validate: function(D, E,
|
|
7770
|
-
return
|
|
8062
|
+
var B = be(p)(m);
|
|
8063
|
+
return p && p.select && (B = {
|
|
8064
|
+
options: B,
|
|
8065
|
+
validate: function(D, E, Y, q) {
|
|
8066
|
+
return U(D, E && p.select(E), Y, q);
|
|
7771
8067
|
}
|
|
7772
|
-
}),
|
|
8068
|
+
}), B;
|
|
7773
8069
|
}
|
|
7774
8070
|
function Dt(m, p) {
|
|
7775
|
-
var
|
|
7776
|
-
return function(D, E,
|
|
7777
|
-
return
|
|
8071
|
+
var B = lt(m, p = Object.assign({ compare: ut, comparable: At }, p));
|
|
8072
|
+
return function(D, E, Y) {
|
|
8073
|
+
return U(B, D, E, Y);
|
|
7778
8074
|
};
|
|
7779
8075
|
}
|
|
7780
8076
|
function ut(m, p) {
|
|
@@ -7810,10 +8106,10 @@ function js(e) {
|
|
|
7810
8106
|
return s.__proto__ || Object.getPrototypeOf(s);
|
|
7811
8107
|
}, js(e);
|
|
7812
8108
|
}
|
|
7813
|
-
function
|
|
7814
|
-
return
|
|
8109
|
+
function Ut(e, t) {
|
|
8110
|
+
return Ut = Object.setPrototypeOf || function(r, n) {
|
|
7815
8111
|
return r.__proto__ = n, r;
|
|
7816
|
-
},
|
|
8112
|
+
}, Ut(e, t);
|
|
7817
8113
|
}
|
|
7818
8114
|
function gc() {
|
|
7819
8115
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
@@ -7825,13 +8121,13 @@ function gc() {
|
|
|
7825
8121
|
return !1;
|
|
7826
8122
|
}
|
|
7827
8123
|
}
|
|
7828
|
-
function
|
|
7829
|
-
return gc() ?
|
|
8124
|
+
function Gt(e, t, s) {
|
|
8125
|
+
return gc() ? Gt = Reflect.construct : Gt = function(n, a, c) {
|
|
7830
8126
|
var l = [null];
|
|
7831
8127
|
l.push.apply(l, a);
|
|
7832
8128
|
var y = Function.bind.apply(n, l), h = new y();
|
|
7833
|
-
return c &&
|
|
7834
|
-
},
|
|
8129
|
+
return c && Ut(h, c.prototype), h;
|
|
8130
|
+
}, Gt.apply(null, arguments);
|
|
7835
8131
|
}
|
|
7836
8132
|
function pc(e) {
|
|
7837
8133
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
@@ -7847,7 +8143,7 @@ function Es(e) {
|
|
|
7847
8143
|
t.set(r, n);
|
|
7848
8144
|
}
|
|
7849
8145
|
function n() {
|
|
7850
|
-
return
|
|
8146
|
+
return Gt(r, arguments, js(this).constructor);
|
|
7851
8147
|
}
|
|
7852
8148
|
return n.prototype = Object.create(r.prototype, {
|
|
7853
8149
|
constructor: {
|
|
@@ -7856,7 +8152,7 @@ function Es(e) {
|
|
|
7856
8152
|
writable: !0,
|
|
7857
8153
|
configurable: !0
|
|
7858
8154
|
}
|
|
7859
|
-
}),
|
|
8155
|
+
}), Ut(n, r);
|
|
7860
8156
|
}, Es(e);
|
|
7861
8157
|
}
|
|
7862
8158
|
function rr(e) {
|
|
@@ -7902,7 +8198,7 @@ var Fn = function(t) {
|
|
|
7902
8198
|
this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
|
|
7903
8199
|
}, t;
|
|
7904
8200
|
}(Es(Error));
|
|
7905
|
-
function
|
|
8201
|
+
function Ps(e) {
|
|
7906
8202
|
return Array.isArray(e) ? e : [e];
|
|
7907
8203
|
}
|
|
7908
8204
|
function hc(e) {
|
|
@@ -7914,9 +8210,9 @@ function hc(e) {
|
|
|
7914
8210
|
function yc(e) {
|
|
7915
8211
|
return JSON.parse(JSON.stringify(e));
|
|
7916
8212
|
}
|
|
7917
|
-
var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g,
|
|
8213
|
+
var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g, wc = /\*+/, Bc = /\./g;
|
|
7918
8214
|
function Mc(e, t, s) {
|
|
7919
|
-
var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(
|
|
8215
|
+
var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(Bc, "\\$&").replace(wc, n + r);
|
|
7920
8216
|
return t + e.length === s.length ? "(?:" + a + ")?" : a;
|
|
7921
8217
|
}
|
|
7922
8218
|
function Cc(e, t, s) {
|
|
@@ -7930,7 +8226,7 @@ function Dc(e) {
|
|
|
7930
8226
|
}
|
|
7931
8227
|
var xc = /* @__PURE__ */ function() {
|
|
7932
8228
|
function e(s) {
|
|
7933
|
-
this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 :
|
|
8229
|
+
this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 : Ps(s.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
7934
8230
|
writable: !0
|
|
7935
8231
|
}), this.inverted = !!s.inverted, this.conditions = s.conditions, Object.defineProperty(this, "_matches", {
|
|
7936
8232
|
writable: !0,
|
|
@@ -7985,13 +8281,13 @@ var jc = /* @__PURE__ */ function() {
|
|
|
7985
8281
|
return this[de].indexedRules = a.rules, this[de].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", n), this;
|
|
7986
8282
|
}, t.buildIndexFor = function(r) {
|
|
7987
8283
|
for (var n = /* @__PURE__ */ Object.create(null), a = this[de].RuleType, c = !0, l = !1, y = 0; y < r.length; y++) {
|
|
7988
|
-
var h = new a(r[y]),
|
|
8284
|
+
var h = new a(r[y]), w = this.expandActions(h.actions), O = Ps(h.subject), N = r.length - y - 1;
|
|
7989
8285
|
c = !!(c && h.inverted), !l && h.fields && (l = !0);
|
|
7990
|
-
for (var
|
|
7991
|
-
var $ = O[
|
|
8286
|
+
for (var U = 0; U < O.length; U++) {
|
|
8287
|
+
var $ = O[U];
|
|
7992
8288
|
n[$] = n[$] || /* @__PURE__ */ Object.create(null);
|
|
7993
|
-
for (var re = 0; re <
|
|
7994
|
-
var me =
|
|
8289
|
+
for (var re = 0; re < w.length; re++) {
|
|
8290
|
+
var me = w[re];
|
|
7995
8291
|
n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][N] = h;
|
|
7996
8292
|
}
|
|
7997
8293
|
}
|
|
@@ -8002,7 +8298,7 @@ var jc = /* @__PURE__ */ function() {
|
|
|
8002
8298
|
rules: n
|
|
8003
8299
|
};
|
|
8004
8300
|
}, t.expandActions = function(r) {
|
|
8005
|
-
for (var n = this[de].aliases, a =
|
|
8301
|
+
for (var n = this[de].aliases, a = Ps(r), c = 0; c < a.length; ) {
|
|
8006
8302
|
var l = a[c++];
|
|
8007
8303
|
n.hasOwnProperty(l) && (a = a.concat(n[l]));
|
|
8008
8304
|
}
|
|
@@ -8066,7 +8362,7 @@ function Ol(e) {
|
|
|
8066
8362
|
const t = Object.entries(nn).find(([, s]) => s === e);
|
|
8067
8363
|
return t ? t[0] : e;
|
|
8068
8364
|
}
|
|
8069
|
-
function
|
|
8365
|
+
function Pc(e) {
|
|
8070
8366
|
return e.map((t) => ({
|
|
8071
8367
|
...t,
|
|
8072
8368
|
subject: Ec(t.subject),
|
|
@@ -8074,15 +8370,15 @@ function Yc(e) {
|
|
|
8074
8370
|
}));
|
|
8075
8371
|
}
|
|
8076
8372
|
function qn(e) {
|
|
8077
|
-
return new jc(
|
|
8373
|
+
return new jc(Pc(e));
|
|
8078
8374
|
}
|
|
8079
|
-
function
|
|
8375
|
+
function Yc(e, t) {
|
|
8080
8376
|
return e.rulesFor(t.action, t.subject, t.field).some((s) => !s.inverted);
|
|
8081
8377
|
}
|
|
8082
8378
|
function In(e, t) {
|
|
8083
|
-
return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !
|
|
8379
|
+
return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Yc(e, t);
|
|
8084
8380
|
}
|
|
8085
|
-
function
|
|
8381
|
+
function Ys(e, t) {
|
|
8086
8382
|
const s = qn(t), r = (l) => s.can(l.action, l.subject, l.field) ? !0 : In(s, l) ? s.can(l.action, l.coverSubject, l.field) : !1, n = e.find((l) => !r(l));
|
|
8087
8383
|
if (n) {
|
|
8088
8384
|
const l = s.relevantRuleFor(
|
|
@@ -8099,8 +8395,8 @@ function Gs(e, t) {
|
|
|
8099
8395
|
const a = e[0], c = s.relevantRuleFor(a.action, a.subject, a.field);
|
|
8100
8396
|
return { granted: !0, decisivePermission: a, decisiveRule: c ?? null };
|
|
8101
8397
|
}
|
|
8102
|
-
function
|
|
8103
|
-
const s =
|
|
8398
|
+
function Gc(e, t) {
|
|
8399
|
+
const s = Ys([e], t);
|
|
8104
8400
|
if (!s.granted)
|
|
8105
8401
|
return { ...s, conditionEvaluation: "not_enforced" };
|
|
8106
8402
|
const r = qn(t), n = In(r, e) ? e.coverSubject : void 0, a = [e.subject, n].filter(
|
|
@@ -8121,7 +8417,7 @@ function Pc(e, t) {
|
|
|
8121
8417
|
}
|
|
8122
8418
|
function Vc(e, t, s) {
|
|
8123
8419
|
const r = arguments.length >= 3;
|
|
8124
|
-
return Array.isArray(e) ?
|
|
8420
|
+
return Array.isArray(e) ? Ys(e, t) : r ? Gc(e, t) : Ys([e], t);
|
|
8125
8421
|
}
|
|
8126
8422
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8127
8423
|
const Oc = () => {
|
|
@@ -8137,27 +8433,27 @@ function Fc(e, t, s) {
|
|
|
8137
8433
|
shallow: c = !0,
|
|
8138
8434
|
onError: l = Oc
|
|
8139
8435
|
} = r, y = Qe(!n), h = c ? kn(t) : Qe(t);
|
|
8140
|
-
let
|
|
8436
|
+
let w = 0;
|
|
8141
8437
|
return ir(async (O) => {
|
|
8142
8438
|
if (!y.value)
|
|
8143
8439
|
return;
|
|
8144
|
-
|
|
8145
|
-
const N =
|
|
8146
|
-
let
|
|
8440
|
+
w++;
|
|
8441
|
+
const N = w;
|
|
8442
|
+
let U = !1;
|
|
8147
8443
|
a && Promise.resolve().then(() => {
|
|
8148
8444
|
a.value = !0;
|
|
8149
8445
|
});
|
|
8150
8446
|
try {
|
|
8151
8447
|
const $ = await e((re) => {
|
|
8152
8448
|
O(() => {
|
|
8153
|
-
a && (a.value = !1),
|
|
8449
|
+
a && (a.value = !1), U || re();
|
|
8154
8450
|
});
|
|
8155
8451
|
});
|
|
8156
|
-
N ===
|
|
8452
|
+
N === w && (h.value = $);
|
|
8157
8453
|
} catch ($) {
|
|
8158
8454
|
l($);
|
|
8159
8455
|
} finally {
|
|
8160
|
-
a && N ===
|
|
8456
|
+
a && N === w && (a.value = !1), U = !0;
|
|
8161
8457
|
}
|
|
8162
8458
|
}), n ? Os(() => (y.value = !0, h.value)) : h;
|
|
8163
8459
|
}
|
|
@@ -8203,7 +8499,7 @@ async function Ic(e, t) {
|
|
|
8203
8499
|
canAccess: !0
|
|
8204
8500
|
};
|
|
8205
8501
|
}
|
|
8206
|
-
var
|
|
8502
|
+
var Gs = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Gs || {});
|
|
8207
8503
|
function Hc() {
|
|
8208
8504
|
const e = Jn(), { sessionUser: t } = Ar();
|
|
8209
8505
|
return Fc(
|
|
@@ -8242,9 +8538,9 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8242
8538
|
}, Zc = {
|
|
8243
8539
|
title: "การเข้าถึงถูกปฏิเสธ",
|
|
8244
8540
|
subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
|
|
8245
|
-
},
|
|
8541
|
+
}, Uc = {
|
|
8246
8542
|
noPermission: Zc
|
|
8247
|
-
},
|
|
8543
|
+
}, zc = { class: "w-full h-full flex justify-center items-center" }, Wc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Lc = { class: "w-[300px] h-[300px]" }, Kc = ["src"], Jc = { class: "text-2xl" }, _c = { class: "text-xl" }, $c = /* @__PURE__ */ it({
|
|
8248
8544
|
__name: "NoPermission",
|
|
8249
8545
|
setup(e) {
|
|
8250
8546
|
const { t } = dr({
|
|
@@ -8252,20 +8548,20 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8252
8548
|
"en-US": Qc,
|
|
8253
8549
|
"zh-CN": Tc,
|
|
8254
8550
|
"zh-Hant": Sc,
|
|
8255
|
-
"th-TH":
|
|
8551
|
+
"th-TH": Uc
|
|
8256
8552
|
}
|
|
8257
8553
|
});
|
|
8258
|
-
return (s, r) => (ct(), lr("div",
|
|
8554
|
+
return (s, r) => (ct(), lr("div", zc, [
|
|
8259
8555
|
Ze("div", Wc, [
|
|
8260
8556
|
Ze("div", Lc, [
|
|
8261
8557
|
Ze("img", {
|
|
8262
|
-
src:
|
|
8558
|
+
src: Ue(Rc),
|
|
8263
8559
|
class: "w-full h-full"
|
|
8264
8560
|
}, null, 8, Kc)
|
|
8265
8561
|
]),
|
|
8266
8562
|
Ze("div", null, [
|
|
8267
|
-
Ze("h1", Jc, Ws(
|
|
8268
|
-
Ze("h2", _c, Ws(
|
|
8563
|
+
Ze("h1", Jc, Ws(Ue(t)("noPermission.title")), 1),
|
|
8564
|
+
Ze("h2", _c, Ws(Ue(t)("noPermission.subtitle")), 1)
|
|
8269
8565
|
])
|
|
8270
8566
|
])
|
|
8271
8567
|
]));
|
|
@@ -8274,14 +8570,14 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
8274
8570
|
__name: "PermissionWrapper",
|
|
8275
8571
|
setup(e) {
|
|
8276
8572
|
const t = Hc();
|
|
8277
|
-
return (s, r) =>
|
|
8573
|
+
return (s, r) => Ue(t) === Ue(Gs).Denied ? (ct(), zt($c, { key: 0 })) : Ue(t) === Ue(Gs).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
|
|
8278
8574
|
}
|
|
8279
8575
|
});
|
|
8280
8576
|
function Kt(e) {
|
|
8281
8577
|
return {
|
|
8282
8578
|
inheritAttrs: !1,
|
|
8283
8579
|
setup(t, { attrs: s }) {
|
|
8284
|
-
return () =>
|
|
8580
|
+
return () => zs(el, {}, { default: () => zs(e, s) });
|
|
8285
8581
|
}
|
|
8286
8582
|
};
|
|
8287
8583
|
}
|
|
@@ -8320,7 +8616,7 @@ const sl = /* @__PURE__ */ it({
|
|
|
8320
8616
|
return (a, c) => (ct(), lr("div", {
|
|
8321
8617
|
ref_key: "wrapper",
|
|
8322
8618
|
ref: s,
|
|
8323
|
-
style:
|
|
8619
|
+
style: Un(n.value)
|
|
8324
8620
|
}, [
|
|
8325
8621
|
cr(a.$slots, "default")
|
|
8326
8622
|
], 4));
|
|
@@ -8330,8 +8626,8 @@ const sl = /* @__PURE__ */ it({
|
|
|
8330
8626
|
setup(e) {
|
|
8331
8627
|
return (t, s) => {
|
|
8332
8628
|
const r = Fs("FmCircularProgress");
|
|
8333
|
-
return ct(),
|
|
8334
|
-
default:
|
|
8629
|
+
return ct(), zt(sl, null, {
|
|
8630
|
+
default: zn(() => [
|
|
8335
8631
|
Ze("div", rl, [
|
|
8336
8632
|
Wn(r, { size: "xl" })
|
|
8337
8633
|
])
|
|
@@ -8340,7 +8636,7 @@ const sl = /* @__PURE__ */ it({
|
|
|
8340
8636
|
});
|
|
8341
8637
|
};
|
|
8342
8638
|
}
|
|
8343
|
-
}),
|
|
8639
|
+
}), Be = (e) => Ln({
|
|
8344
8640
|
loader: e,
|
|
8345
8641
|
loadingComponent: nl
|
|
8346
8642
|
});
|
|
@@ -8354,10 +8650,10 @@ const Et = (e) => ({
|
|
|
8354
8650
|
}
|
|
8355
8651
|
]
|
|
8356
8652
|
}
|
|
8357
|
-
}), al = Kt(
|
|
8358
|
-
|
|
8359
|
-
), cl = Kt(
|
|
8360
|
-
() => import("./PermissionSetList-
|
|
8653
|
+
}), al = Kt(Be(() => import("./Main-C83-6ZYQ.js"))), ol = Kt(Be(() => import("./Main-DPmBwatV.js"))), il = Kt(
|
|
8654
|
+
Be(() => import("./AuditLogList-B9k56ux1.js"))
|
|
8655
|
+
), cl = Kt(Be(() => import("./Main-CZoUt9IM.js"))), ll = Be(() => import("./ApprovalCodeList-BgPrC2H1.js")), ul = Be(() => import("./GrantUserList-Db4_e87R.js")), Al = Be(() => import("./EmployeeList-f05XEwMS.js")), dl = Be(() => import("./RoleList-DsINcxpz.js")), ml = Be(() => import("./TimesheetList-D_Xq4ESR.js")), gl = Be(() => import("./TeamMemberList-DuP1QWAS.js")), pl = Be(
|
|
8656
|
+
() => import("./PermissionSetList-CqcbzdXp.js")
|
|
8361
8657
|
), Fl = [
|
|
8362
8658
|
{
|
|
8363
8659
|
path: "/",
|
|
@@ -8515,9 +8811,9 @@ const Et = (e) => ({
|
|
|
8515
8811
|
c.value !== l && (c.value = l);
|
|
8516
8812
|
}), (l, y) => {
|
|
8517
8813
|
const h = Fs("FmCollapsibleTabs");
|
|
8518
|
-
return ct(),
|
|
8814
|
+
return ct(), zt(h, {
|
|
8519
8815
|
modelValue: c.value,
|
|
8520
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
8816
|
+
"onUpdate:modelValue": y[0] || (y[0] = (w) => c.value = w),
|
|
8521
8817
|
items: a.value,
|
|
8522
8818
|
class: "py-16"
|
|
8523
8819
|
}, null, 8, ["modelValue", "items"]);
|
|
@@ -8568,7 +8864,7 @@ var Vs = { exports: {} };
|
|
|
8568
8864
|
b(j);
|
|
8569
8865
|
}
|
|
8570
8866
|
}
|
|
8571
|
-
function
|
|
8867
|
+
function G(k) {
|
|
8572
8868
|
try {
|
|
8573
8869
|
F(g.throw(k));
|
|
8574
8870
|
} catch (j) {
|
|
@@ -8577,9 +8873,9 @@ var Vs = { exports: {} };
|
|
|
8577
8873
|
}
|
|
8578
8874
|
function F(k) {
|
|
8579
8875
|
var j;
|
|
8580
|
-
k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(
|
|
8581
|
-
|
|
8582
|
-
})).then(M,
|
|
8876
|
+
k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(z) {
|
|
8877
|
+
z(j);
|
|
8878
|
+
})).then(M, G);
|
|
8583
8879
|
}
|
|
8584
8880
|
F((g = g.apply(f, [])).next());
|
|
8585
8881
|
});
|
|
@@ -8589,10 +8885,10 @@ var Vs = { exports: {} };
|
|
|
8589
8885
|
if (1 & A[0]) throw A[1];
|
|
8590
8886
|
return A[1];
|
|
8591
8887
|
}, trys: [], ops: [] };
|
|
8592
|
-
return b = { next:
|
|
8888
|
+
return b = { next: G(0), throw: G(1), return: G(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
|
|
8593
8889
|
return this;
|
|
8594
8890
|
}), b;
|
|
8595
|
-
function
|
|
8891
|
+
function G(F) {
|
|
8596
8892
|
return function(k) {
|
|
8597
8893
|
return function(j) {
|
|
8598
8894
|
if (i) throw new TypeError("Generator is already executing.");
|
|
@@ -8632,8 +8928,8 @@ var Vs = { exports: {} };
|
|
|
8632
8928
|
continue;
|
|
8633
8929
|
}
|
|
8634
8930
|
j = u.call(f, M);
|
|
8635
|
-
} catch (
|
|
8636
|
-
j = [6,
|
|
8931
|
+
} catch (z) {
|
|
8932
|
+
j = [6, z], g = 0;
|
|
8637
8933
|
} finally {
|
|
8638
8934
|
i = A = 0;
|
|
8639
8935
|
}
|
|
@@ -8679,18 +8975,18 @@ var Vs = { exports: {} };
|
|
|
8679
8975
|
Object.keys(u || {}).includes(g) || i.push(g);
|
|
8680
8976
|
}), Object.keys(i).length ? i : null;
|
|
8681
8977
|
}
|
|
8682
|
-
var
|
|
8978
|
+
var w, O;
|
|
8683
8979
|
function N(f, u, i) {
|
|
8684
8980
|
var g = "shortString", A = !0;
|
|
8685
8981
|
typeof i == "number" && (g = "javaDouble", A = !1), f[g] = f[g] || {}, f[g][u] = A ? i + "" : i;
|
|
8686
8982
|
}
|
|
8687
|
-
function
|
|
8983
|
+
function U(f) {
|
|
8688
8984
|
return !!f && typeof f == "object" && f.value !== void 0;
|
|
8689
8985
|
}
|
|
8690
8986
|
function $(f) {
|
|
8691
8987
|
return Object.fromEntries(Object.entries(f).map(function(u) {
|
|
8692
8988
|
var i = u[0], g = u[1];
|
|
8693
|
-
return [i,
|
|
8989
|
+
return [i, U(g) ? g : { value: g }];
|
|
8694
8990
|
}));
|
|
8695
8991
|
}
|
|
8696
8992
|
function re(f) {
|
|
@@ -8698,15 +8994,15 @@ var Vs = { exports: {} };
|
|
|
8698
8994
|
}
|
|
8699
8995
|
(function(f) {
|
|
8700
8996
|
f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
|
|
8701
|
-
})(
|
|
8997
|
+
})(w || (w = {}));
|
|
8702
8998
|
var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Ne = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
|
|
8703
8999
|
function f(u) {
|
|
8704
9000
|
var i = this;
|
|
8705
9001
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
8706
9002
|
var g = i, A = g.api, b = g.evaluationContext;
|
|
8707
9003
|
i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(n(n({}, i.loadingState), { isFetching: !0 }));
|
|
8708
|
-
var M = "".concat(i.getContext().identity),
|
|
8709
|
-
var k, j,
|
|
9004
|
+
var M = "".concat(i.getContext().identity), G = function(F) {
|
|
9005
|
+
var k, j, z, ce;
|
|
8710
9006
|
if (F && M === "".concat(i.getContext().identity)) {
|
|
8711
9007
|
var Me = F.flags, ge = F.traits, ve = F.identifier;
|
|
8712
9008
|
i.isLoading = !1;
|
|
@@ -8717,13 +9013,13 @@ var Vs = { exports: {} };
|
|
|
8717
9013
|
fe[W.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: W.transient, value: W.trait_value };
|
|
8718
9014
|
}), i.oldFlags = n({}, i.flags);
|
|
8719
9015
|
var Ce = h(i.oldFlags, pe), dt = h((k = i.evaluationContext.identity) === null || k === void 0 ? void 0 : k.traits, fe);
|
|
8720
|
-
if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null,
|
|
9016
|
+
if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
|
|
8721
9017
|
if (i.datadogRum.trackTraits) {
|
|
8722
9018
|
var mt = {};
|
|
8723
9019
|
Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(W) {
|
|
8724
9020
|
mt[ut + W] = i.getTrait(W);
|
|
8725
9021
|
});
|
|
8726
|
-
var Je = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((
|
|
9022
|
+
var Je = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((z = i.evaluationContext.identity) === null || z === void 0 ? void 0 : z.identifier) }), mt);
|
|
8727
9023
|
i.log("Setting Datadog user", Je), i.datadogRum.client.setUser(Je);
|
|
8728
9024
|
}
|
|
8729
9025
|
} catch (W) {
|
|
@@ -8747,12 +9043,12 @@ var Vs = { exports: {} };
|
|
|
8747
9043
|
}).filter(function(F) {
|
|
8748
9044
|
return F.trait_value !== void 0 || (i.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
|
|
8749
9045
|
}) })) : i.getJSON(A + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
|
|
8750
|
-
return i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: {} }),
|
|
9046
|
+
return i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: {} }), G(F == null ? void 0 : F[0]);
|
|
8751
9047
|
}).catch(function(F) {
|
|
8752
9048
|
var k = F.message, j = new Error(k);
|
|
8753
9049
|
return Promise.reject(j);
|
|
8754
9050
|
}) : i.getJSON(A + "flags/").then(function(F) {
|
|
8755
|
-
return
|
|
9051
|
+
return G({ flags: F, traits: void 0 });
|
|
8756
9052
|
});
|
|
8757
9053
|
}, this.analyticsFlags = function() {
|
|
8758
9054
|
var g = i.api;
|
|
@@ -8764,15 +9060,15 @@ var Vs = { exports: {} };
|
|
|
8764
9060
|
}).catch(function(A) {
|
|
8765
9061
|
i.log("Exception fetching evaluationEvent", A);
|
|
8766
9062
|
}) : void 0;
|
|
8767
|
-
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source:
|
|
8768
|
-
var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")],
|
|
8769
|
-
if (M && (
|
|
9063
|
+
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
|
|
9064
|
+
var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
|
|
9065
|
+
if (M && (G = M.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
|
|
8770
9066
|
if (A != null && A.json) try {
|
|
8771
|
-
return
|
|
9067
|
+
return G === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(G);
|
|
8772
9068
|
} catch {
|
|
8773
9069
|
return A.fallback;
|
|
8774
9070
|
}
|
|
8775
|
-
return
|
|
9071
|
+
return G;
|
|
8776
9072
|
}, this.getTrait = function(g) {
|
|
8777
9073
|
var A, b;
|
|
8778
9074
|
return ((A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits) && ((b = i.evaluationContext.identity.traits[g.toLowerCase().replace(/ /g, "_")]) === null || b === void 0 ? void 0 : b.value);
|
|
@@ -8795,26 +9091,26 @@ var Vs = { exports: {} };
|
|
|
8795
9091
|
}, this.setTraits = function(g) {
|
|
8796
9092
|
var A;
|
|
8797
9093
|
if (i.api) return i.setContext(n(n({}, i.evaluationContext), { identity: n(n({}, i.evaluationContext.identity), { traits: n(n({}, (A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits), Object.fromEntries(Object.entries(g).map(function(b) {
|
|
8798
|
-
var M = b[0],
|
|
8799
|
-
return [M,
|
|
9094
|
+
var M = b[0], G = b[1];
|
|
9095
|
+
return [M, U(G) ? G : { value: G }];
|
|
8800
9096
|
}))) }) }));
|
|
8801
9097
|
console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
|
|
8802
9098
|
}, this.hasFeature = function(g, A) {
|
|
8803
|
-
var b = typeof A == "object", M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")],
|
|
8804
|
-
return !M && b && A.fallback !== void 0 ?
|
|
9099
|
+
var b = typeof A == "object", M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
|
|
9100
|
+
return !M && b && A.fallback !== void 0 ? G = A == null ? void 0 : A.fallback : M && M.enabled && (G = !0), (b && !A.skipAnalytics || !A) && i.evaluateFlag(g, "ENABLED"), G;
|
|
8805
9101
|
}, this.getStorageKey = function() {
|
|
8806
9102
|
var g, A;
|
|
8807
9103
|
return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((A = i.evaluationContext.environment) === null || A === void 0 ? void 0 : A.apiKey);
|
|
8808
9104
|
}, this.getJSON = function(g, A, b) {
|
|
8809
|
-
var M,
|
|
8810
|
-
|
|
8811
|
-
var F =
|
|
9105
|
+
var M, G = i;
|
|
9106
|
+
G.evaluationContext;
|
|
9107
|
+
var F = G.headers, k = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
|
|
8812
9108
|
i.evaluationContext.environment && (k.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), A && A !== "GET" && (k.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(k.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
8813
9109
|
var j = "".concat((M = i.evaluationContext.identity) === null || M === void 0 ? void 0 : M.identifier);
|
|
8814
|
-
return O(g, k).then(function(
|
|
9110
|
+
return O(g, k).then(function(z) {
|
|
8815
9111
|
var ce, Me, ge = "".concat((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.identifier);
|
|
8816
9112
|
if (j === ge) {
|
|
8817
|
-
var ve = (Me =
|
|
9113
|
+
var ve = (Me = z.headers) === null || Me === void 0 ? void 0 : Me.get("x-flagsmith-document-updated-at");
|
|
8818
9114
|
if (ve) try {
|
|
8819
9115
|
var pe = parseFloat(ve);
|
|
8820
9116
|
if (isNaN(pe)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
|
|
@@ -8822,13 +9118,13 @@ var Vs = { exports: {} };
|
|
|
8822
9118
|
} catch (fe) {
|
|
8823
9119
|
i.log(fe, "Failed to parse x-flagsmith-document-updated-at", ve);
|
|
8824
9120
|
}
|
|
8825
|
-
return i.log("Fetch response: " +
|
|
9121
|
+
return i.log("Fetch response: " + z.status + " " + (A || "GET") + 0 + g), z.text().then(function(fe) {
|
|
8826
9122
|
var Ce = fe;
|
|
8827
9123
|
try {
|
|
8828
9124
|
Ce = JSON.parse(fe);
|
|
8829
9125
|
} catch {
|
|
8830
9126
|
}
|
|
8831
|
-
return !Ce &&
|
|
9127
|
+
return !Ce && z.status && (Ce = "API Response: ".concat(z.status)), z.status && z.status >= 200 && z.status < 300 ? Ce : Promise.reject(new Error(Ce));
|
|
8832
9128
|
});
|
|
8833
9129
|
}
|
|
8834
9130
|
i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ge));
|
|
@@ -8840,25 +9136,25 @@ var Vs = { exports: {} };
|
|
|
8840
9136
|
}
|
|
8841
9137
|
i.updateEventStorage();
|
|
8842
9138
|
}, this._onChange = function(g, A, b) {
|
|
8843
|
-
var M,
|
|
8844
|
-
i.setLoadingState(b), (M = i.onChange) === null || M === void 0 || M.call(i, g, A, i.loadingState), (
|
|
9139
|
+
var M, G;
|
|
9140
|
+
i.setLoadingState(b), (M = i.onChange) === null || M === void 0 || M.call(i, g, A, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
|
|
8845
9141
|
}, O = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : bt == null ? void 0 : bt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (me = u.eventSource), u.AsyncStorage && (ne = u.AsyncStorage);
|
|
8846
9142
|
}
|
|
8847
9143
|
return f.prototype.init = function(u) {
|
|
8848
9144
|
var i, g, A;
|
|
8849
9145
|
return a(this, void 0, void 0, function() {
|
|
8850
|
-
var b, M,
|
|
8851
|
-
return c(this, function(
|
|
8852
|
-
switch (
|
|
9146
|
+
var b, M, G, F, k, j, z, ce, Me, ge, ve, pe, fe, Ce, dt, mt, Je, le, W, _t, gt, Qs, _e, $t, ks, Ts, es, Ns, ts, pt, $e, Ss, ue = this;
|
|
9147
|
+
return c(this, function(we) {
|
|
9148
|
+
switch (we.label) {
|
|
8853
9149
|
case 0:
|
|
8854
|
-
b = re(u.evaluationContext || this.evaluationContext),
|
|
9150
|
+
b = re(u.evaluationContext || this.evaluationContext), we.label = 1;
|
|
8855
9151
|
case 1:
|
|
8856
|
-
if (
|
|
9152
|
+
if (we.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Ne : G, k = u.headers, j = u.onChange, z = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, Je = u.eventSourceUrl, le = Je === void 0 ? "https://realtime.flagsmith.com/" : Je, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, _e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
8857
9153
|
if (b.identity = _t || gt ? { identifier: _t, traits: gt ? Object.fromEntries(Object.entries(gt).map(function(he) {
|
|
8858
9154
|
return [he[0], { value: he[1] }];
|
|
8859
9155
|
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = k, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, es = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = ks || this._trigger, this._triggerLoadingState = Ts || this._triggerLoadingState, this.onError = function(he) {
|
|
8860
9156
|
ue.setLoadingState(n(n({}, ue.loadingState), { isFetching: !1, isLoading: !1, error: he })), Me == null || Me(he);
|
|
8861
|
-
}, this.enableLogs = fe || !1, this.cacheOptions = _e ? { skipAPI: !!_e.skipAPI, ttl: _e.ttl || 0, storageKey: _e.storageKey, loadStale: !!_e.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!
|
|
9157
|
+
}, this.enableLogs = fe || !1, this.cacheOptions = _e ? { skipAPI: !!_e.skipAPI, ttl: _e.ttl || 0, storageKey: _e.storageKey, loadStale: !!_e.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!z, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), $t && (O = /* @__PURE__ */ function(he) {
|
|
8862
9158
|
return function(De, xe) {
|
|
8863
9159
|
var Ie = xe.headers, K = xe.method, et = xe.body;
|
|
8864
9160
|
return new Promise(function(Se) {
|
|
@@ -8894,20 +9190,20 @@ var Vs = { exports: {} };
|
|
|
8894
9190
|
ue.log("Retrieved events from cache", De), ue.setState(n(n({}, Ie), { evaluationEvent: xe[ue.evaluationContext.environment.apiKey] }));
|
|
8895
9191
|
}
|
|
8896
9192
|
}
|
|
8897
|
-
})), !
|
|
9193
|
+
})), !z) return [3, 9];
|
|
8898
9194
|
if (!ne || !this.canUseStorage) return [3, 8];
|
|
8899
9195
|
Ns = function(he, De) {
|
|
8900
9196
|
return a(ue, void 0, void 0, function() {
|
|
8901
|
-
var xe, Ie, K, et, Se, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys,
|
|
9197
|
+
var xe, Ie, K, et, Se, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, Us = this;
|
|
8902
9198
|
return c(this, function(He) {
|
|
8903
9199
|
switch (He.label) {
|
|
8904
9200
|
case 0:
|
|
8905
9201
|
if (!De) return [3, 7];
|
|
8906
9202
|
xe = null, Ie = null, He.label = 1;
|
|
8907
9203
|
case 1:
|
|
8908
|
-
return He.trys.push([1, 5, , 6]), K = JSON.parse(De), et = !1, Se = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Se = !0, Oe = !0)), Oe && (et = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), et ? (ss = !pe && (!this.cacheOptions.skipAPI || Se), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null,
|
|
9204
|
+
return He.trys.push([1, 5, , 6]), K = JSON.parse(De), et = !1, Se = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Se = !0, Oe = !0)), Oe && (et = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), et ? (ss = !pe && (!this.cacheOptions.skipAPI || Se), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, w.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !Se && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
|
|
8909
9205
|
var bs;
|
|
8910
|
-
(bs =
|
|
9206
|
+
(bs = Us.onError) === null || bs === void 0 || bs.call(Us, Hn);
|
|
8911
9207
|
}), [3, 4]) : [3, 2];
|
|
8912
9208
|
case 2:
|
|
8913
9209
|
return pe ? [3, 4] : [4, this.getFlags()];
|
|
@@ -8924,10 +9220,10 @@ var Vs = { exports: {} };
|
|
|
8924
9220
|
case 8:
|
|
8925
9221
|
return He.sent(), [3, 10];
|
|
8926
9222
|
case 9:
|
|
8927
|
-
if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null,
|
|
9223
|
+
if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
|
|
8928
9224
|
else {
|
|
8929
9225
|
if (!this.flags) throw new Error(es);
|
|
8930
|
-
this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null,
|
|
9226
|
+
this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
|
|
8931
9227
|
}
|
|
8932
9228
|
He.label = 10;
|
|
8933
9229
|
case 10:
|
|
@@ -8935,32 +9231,32 @@ var Vs = { exports: {} };
|
|
|
8935
9231
|
}
|
|
8936
9232
|
});
|
|
8937
9233
|
});
|
|
8938
|
-
},
|
|
9234
|
+
}, we.label = 2;
|
|
8939
9235
|
case 2:
|
|
8940
|
-
return
|
|
9236
|
+
return we.trys.push([2, 7, , 8]), ne.getItemSync ? (ts = ne.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
|
|
8941
9237
|
case 3:
|
|
8942
9238
|
return [4, ne.getItem(this.getStorageKey())];
|
|
8943
9239
|
case 4:
|
|
8944
|
-
ts =
|
|
9240
|
+
ts = we.sent(), we.label = 5;
|
|
8945
9241
|
case 5:
|
|
8946
9242
|
return [4, Ns(null, ts)];
|
|
8947
9243
|
case 6:
|
|
8948
9244
|
case 7:
|
|
8949
|
-
return
|
|
9245
|
+
return we.sent(), [3, 8];
|
|
8950
9246
|
case 8:
|
|
8951
9247
|
return [3, 12];
|
|
8952
9248
|
case 9:
|
|
8953
9249
|
return pe ? [3, 11] : [4, this.getFlags()];
|
|
8954
9250
|
case 10:
|
|
8955
|
-
return
|
|
9251
|
+
return we.sent(), [3, 12];
|
|
8956
9252
|
case 11:
|
|
8957
|
-
if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null,
|
|
8958
|
-
else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt,
|
|
8959
|
-
|
|
9253
|
+
if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
|
|
9254
|
+
else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt, w.DEFAULT_FLAGS)), pt)) throw new Error(pt);
|
|
9255
|
+
we.label = 12;
|
|
8960
9256
|
case 12:
|
|
8961
9257
|
return [3, 14];
|
|
8962
9258
|
case 13:
|
|
8963
|
-
throw $e =
|
|
9259
|
+
throw $e = we.sent(), this.log("Error during initialisation ", $e), Ss = $e instanceof Error ? $e : new Error("".concat($e)), (A = this.onError) === null || A === void 0 || A.call(this, Ss), $e;
|
|
8964
9260
|
case 14:
|
|
8965
9261
|
return [2];
|
|
8966
9262
|
}
|
|
@@ -8971,7 +9267,7 @@ var Vs = { exports: {} };
|
|
|
8971
9267
|
}, f.prototype.identify = function(u, i, g) {
|
|
8972
9268
|
return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(A) {
|
|
8973
9269
|
var b = A[0], M = A[1];
|
|
8974
|
-
return [b,
|
|
9270
|
+
return [b, U(M) ? M : { value: M }];
|
|
8975
9271
|
}))), this.initialised ? this.getFlags() : Promise.resolve();
|
|
8976
9272
|
}, f.prototype.getState = function() {
|
|
8977
9273
|
return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
|
|
@@ -9010,8 +9306,8 @@ var Vs = { exports: {} };
|
|
|
9010
9306
|
var M;
|
|
9011
9307
|
try {
|
|
9012
9308
|
M = JSON.parse(b.data).updated_at;
|
|
9013
|
-
} catch (
|
|
9014
|
-
g.log("Could not parse sse event",
|
|
9309
|
+
} catch (G) {
|
|
9310
|
+
g.log("Could not parse sse event", G);
|
|
9015
9311
|
}
|
|
9016
9312
|
M ? !g.timestamp || M > g.timestamp ? g.isLoading ? g.log("updated_at is new, but flags are loading", b.data, g.timestamp) : (g.log("updated_at is new, fetching flags", b.data, g.timestamp), g.getFlags()) : g.log("updated_at is outdated, skipping get flags", b.data, g.timestamp) : g.log("No updated_at received, fetching flags", b);
|
|
9017
9313
|
})) : this.log("Error, EventSource is undefined");
|
|
@@ -9021,7 +9317,7 @@ var Vs = { exports: {} };
|
|
|
9021
9317
|
var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
|
|
9022
9318
|
return new At({ fetch: u, AsyncStorage: i, eventSource: g });
|
|
9023
9319
|
}
|
|
9024
|
-
var p,
|
|
9320
|
+
var p, B = (p = function(f, u) {
|
|
9025
9321
|
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
|
|
9026
9322
|
i.__proto__ = g;
|
|
9027
9323
|
} || function(i, g) {
|
|
@@ -9046,8 +9342,8 @@ var Vs = { exports: {} };
|
|
|
9046
9342
|
var g, A, b = i.call(f), M = [];
|
|
9047
9343
|
try {
|
|
9048
9344
|
for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) M.push(g.value);
|
|
9049
|
-
} catch (
|
|
9050
|
-
A = { error:
|
|
9345
|
+
} catch (G) {
|
|
9346
|
+
A = { error: G };
|
|
9051
9347
|
} finally {
|
|
9052
9348
|
try {
|
|
9053
9349
|
g && !g.done && (i = b.return) && i.call(b);
|
|
@@ -9056,7 +9352,7 @@ var Vs = { exports: {} };
|
|
|
9056
9352
|
}
|
|
9057
9353
|
}
|
|
9058
9354
|
return M;
|
|
9059
|
-
},
|
|
9355
|
+
}, Y = function(f, u, i) {
|
|
9060
9356
|
if (arguments.length === 2) for (var g, A = 0, b = u.length; A < b; A++) !g && A in u || (g || (g = Array.prototype.slice.call(u, 0, A)), g[A] = u[A]);
|
|
9061
9357
|
return f.concat(g || Array.prototype.slice.call(u));
|
|
9062
9358
|
}, q = function(f) {
|
|
@@ -9064,7 +9360,7 @@ var Vs = { exports: {} };
|
|
|
9064
9360
|
return f.call(this, `EventSource not available.
|
|
9065
9361
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
9066
9362
|
}
|
|
9067
|
-
return
|
|
9363
|
+
return B(u, f), u;
|
|
9068
9364
|
}(Error), R = function() {
|
|
9069
9365
|
function f(u, i) {
|
|
9070
9366
|
var g = this;
|
|
@@ -9086,8 +9382,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
9086
9382
|
};
|
|
9087
9383
|
try {
|
|
9088
9384
|
for (var b = D(Object.keys(this._listeners)), M = b.next(); !M.done; M = b.next()) {
|
|
9089
|
-
var
|
|
9090
|
-
this._eventSource.addEventListener(
|
|
9385
|
+
var G = M.value;
|
|
9386
|
+
this._eventSource.addEventListener(G, this._onevent_wrapped);
|
|
9091
9387
|
}
|
|
9092
9388
|
} catch (F) {
|
|
9093
9389
|
u = { error: F };
|
|
@@ -9114,10 +9410,10 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
9114
9410
|
u && u.lastEventId && (this._lastEventId = u.lastEventId);
|
|
9115
9411
|
var A = this._listeners[u.type];
|
|
9116
9412
|
if (A != null) try {
|
|
9117
|
-
for (var b = D(
|
|
9413
|
+
for (var b = D(Y([], E(A), !1)), M = b.next(); !M.done; M = b.next())
|
|
9118
9414
|
M.value.call(this, u);
|
|
9119
|
-
} catch (
|
|
9120
|
-
i = { error:
|
|
9415
|
+
} catch (G) {
|
|
9416
|
+
i = { error: G };
|
|
9121
9417
|
} finally {
|
|
9122
9418
|
try {
|
|
9123
9419
|
M && !M.done && (g = b.return) && g.call(b);
|
|
@@ -9134,7 +9430,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
9134
9430
|
}, f.prototype.addEventListener = function(u, i, g) {
|
|
9135
9431
|
this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
|
|
9136
9432
|
var A = this._listeners[u];
|
|
9137
|
-
A.includes(i) || (this._listeners[u] =
|
|
9433
|
+
A.includes(i) || (this._listeners[u] = Y(Y([], E(A), !1), [i], !1));
|
|
9138
9434
|
}, f.prototype.removeEventListener = function(u, i, g) {
|
|
9139
9435
|
var A = this._listeners[u];
|
|
9140
9436
|
this._listeners[u] = A.filter(function(b) {
|
|
@@ -9145,7 +9441,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
9145
9441
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
9146
9442
|
var _ = function(f, u) {
|
|
9147
9443
|
return u = u || {}, new Promise(function(i, g) {
|
|
9148
|
-
var A = new XMLHttpRequest(), b = [], M = [],
|
|
9444
|
+
var A = new XMLHttpRequest(), b = [], M = [], G = {}, F = function() {
|
|
9149
9445
|
return { ok: (A.status / 100 | 0) == 2, statusText: A.statusText, status: A.status, url: A.responseURL, text: function() {
|
|
9150
9446
|
return Promise.resolve(A.responseText);
|
|
9151
9447
|
}, json: function() {
|
|
@@ -9157,14 +9453,14 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
9157
9453
|
}, entries: function() {
|
|
9158
9454
|
return M;
|
|
9159
9455
|
}, get: function(j) {
|
|
9160
|
-
return
|
|
9456
|
+
return G[j.toLowerCase()];
|
|
9161
9457
|
}, has: function(j) {
|
|
9162
|
-
return j.toLowerCase() in
|
|
9458
|
+
return j.toLowerCase() in G;
|
|
9163
9459
|
} } };
|
|
9164
9460
|
};
|
|
9165
9461
|
for (var k in A.open(u.method || "get", f, !0), A.onload = function() {
|
|
9166
|
-
A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j,
|
|
9167
|
-
b.push(
|
|
9462
|
+
A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, z, ce) {
|
|
9463
|
+
b.push(z = z.toLowerCase()), M.push([z, ce]), G[z] = G[z] ? G[z] + "," + ce : ce;
|
|
9168
9464
|
}), i(F());
|
|
9169
9465
|
}, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(k, u.headers[k]);
|
|
9170
9466
|
A.send(u.body || null);
|
|
@@ -9279,57 +9575,57 @@ var hl = Vs.exports, yl = {
|
|
|
9279
9575
|
reset() {
|
|
9280
9576
|
this.flagsmithClient = null, this.userContext = null;
|
|
9281
9577
|
}
|
|
9282
|
-
}, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1),
|
|
9283
|
-
function
|
|
9284
|
-
const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (
|
|
9578
|
+
}, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1), Pt = Qe([]), st = Qe(null);
|
|
9579
|
+
function wl(e = vl) {
|
|
9580
|
+
const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, O = []) => {
|
|
9285
9581
|
if (ht.value) {
|
|
9286
9582
|
console.warn("FeatureFlag is already initialized.");
|
|
9287
9583
|
return;
|
|
9288
9584
|
}
|
|
9289
9585
|
try {
|
|
9290
|
-
await e.init(
|
|
9586
|
+
await e.init(w, O), Pt.value = await e.getFlags(), ht.value = !0, st.value = null;
|
|
9291
9587
|
} catch (N) {
|
|
9292
9588
|
console.error("Failed to initialize feature flags:", N), st.value = N;
|
|
9293
9589
|
}
|
|
9294
|
-
}, r = async (
|
|
9590
|
+
}, r = async (w) => {
|
|
9295
9591
|
if (t())
|
|
9296
9592
|
try {
|
|
9297
|
-
await e.setUser(
|
|
9593
|
+
await e.setUser(w), Pt.value = await e.getFlags(), st.value = null;
|
|
9298
9594
|
} catch (O) {
|
|
9299
9595
|
console.error("Failed to set user:", O), st.value = O;
|
|
9300
9596
|
}
|
|
9301
|
-
}, n = async (
|
|
9597
|
+
}, n = async (w) => r(`${or}-${w}`), a = (w, O, N = null) => {
|
|
9302
9598
|
if (!t()) return N;
|
|
9303
9599
|
try {
|
|
9304
|
-
return e.getFlagValue(
|
|
9305
|
-
} catch (
|
|
9306
|
-
return console.error(`Error getting flag value for ${
|
|
9600
|
+
return e.getFlagValue(w, O) ?? N;
|
|
9601
|
+
} catch (U) {
|
|
9602
|
+
return console.error(`Error getting flag value for ${w}:`, U), N;
|
|
9307
9603
|
}
|
|
9308
|
-
}, c = (
|
|
9604
|
+
}, c = (w, O) => {
|
|
9309
9605
|
if (!t()) return O ?? null;
|
|
9310
9606
|
try {
|
|
9311
|
-
return e.getFlag(
|
|
9607
|
+
return e.getFlag(w) ?? O ?? null;
|
|
9312
9608
|
} catch (N) {
|
|
9313
|
-
return console.error(`Error getting flag for ${
|
|
9609
|
+
return console.error(`Error getting flag for ${w}:`, N), O ?? null;
|
|
9314
9610
|
}
|
|
9315
|
-
}, l = async (
|
|
9611
|
+
}, l = async (w, O, N = null, U) => {
|
|
9316
9612
|
if (!t()) return N;
|
|
9317
9613
|
try {
|
|
9318
|
-
return await e.getUserFlagValue(
|
|
9614
|
+
return await e.getUserFlagValue(w, O, N, U);
|
|
9319
9615
|
} catch ($) {
|
|
9320
9616
|
return console.error(`Error getting user flag value for ${O}:`, $), N;
|
|
9321
9617
|
}
|
|
9322
|
-
}, y = async (
|
|
9618
|
+
}, y = async (w, O, N = null, U) => l(`${or}-${w}`, O, N, U), h = () => {
|
|
9323
9619
|
try {
|
|
9324
9620
|
e.reset();
|
|
9325
|
-
} catch (
|
|
9326
|
-
console.error("Error resetting feature flags:",
|
|
9621
|
+
} catch (w) {
|
|
9622
|
+
console.error("Error resetting feature flags:", w);
|
|
9327
9623
|
} finally {
|
|
9328
|
-
|
|
9624
|
+
Pt.value = [], ht.value = !1, st.value = null;
|
|
9329
9625
|
}
|
|
9330
9626
|
};
|
|
9331
9627
|
return {
|
|
9332
|
-
flags: vs(
|
|
9628
|
+
flags: vs(Pt),
|
|
9333
9629
|
isInitialized: vs(ht),
|
|
9334
9630
|
error: vs(st),
|
|
9335
9631
|
init: s,
|
|
@@ -9342,18 +9638,18 @@ function Bl(e = vl) {
|
|
|
9342
9638
|
reset: h
|
|
9343
9639
|
};
|
|
9344
9640
|
}
|
|
9345
|
-
var
|
|
9641
|
+
var Bl = () => wl();
|
|
9346
9642
|
const ql = /* @__PURE__ */ it({
|
|
9347
9643
|
__name: "App",
|
|
9348
9644
|
setup(e) {
|
|
9349
|
-
const t = Ar(), { init: s } =
|
|
9645
|
+
const t = Ar(), { init: s } = Bl();
|
|
9350
9646
|
return ur(async () => {
|
|
9351
9647
|
t.registerSidebarComponent(fl), await s({
|
|
9352
9648
|
apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
|
|
9353
9649
|
});
|
|
9354
9650
|
}), (r, n) => {
|
|
9355
9651
|
const a = Fs("RouterView");
|
|
9356
|
-
return ct(),
|
|
9652
|
+
return ct(), zt(a);
|
|
9357
9653
|
};
|
|
9358
9654
|
}
|
|
9359
9655
|
}), Il = () => {
|
|
@@ -9378,18 +9674,18 @@ const ql = /* @__PURE__ */ it({
|
|
|
9378
9674
|
);
|
|
9379
9675
|
};
|
|
9380
9676
|
export {
|
|
9381
|
-
|
|
9677
|
+
Pl as A,
|
|
9382
9678
|
Vl as G,
|
|
9383
9679
|
ic as P,
|
|
9384
9680
|
te as R,
|
|
9385
|
-
|
|
9681
|
+
Yl as S,
|
|
9386
9682
|
Sa as U,
|
|
9387
9683
|
sl as _,
|
|
9388
9684
|
nl as a,
|
|
9389
|
-
|
|
9685
|
+
Gl as b,
|
|
9390
9686
|
bt as c,
|
|
9391
9687
|
yt as d,
|
|
9392
|
-
|
|
9688
|
+
Ua as e,
|
|
9393
9689
|
El as f,
|
|
9394
9690
|
cc as g,
|
|
9395
9691
|
Ec as h,
|
|
@@ -9399,6 +9695,6 @@ export {
|
|
|
9399
9695
|
Ol as m,
|
|
9400
9696
|
o as n,
|
|
9401
9697
|
Fl as r,
|
|
9402
|
-
|
|
9698
|
+
Bl as u,
|
|
9403
9699
|
v
|
|
9404
9700
|
};
|