@feedmepos/mf-hrm-portal 2.3.0-dev.13 → 2.3.0-dev.14
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-D3egZFML.js → ApprovalCodeList-C9dauQ81.js} +4 -4
- package/dist/{AuditLogList-BzbaEsSj.js → AuditLogList-zW_N_ECT.js} +17 -18
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Do52KbKm.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js} +2 -2
- package/dist/{EmployeeList-BiM8dRwZ.js → EmployeeList-8jkHTd7q.js} +255 -267
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-CJc_g0tW.js} +6 -6
- package/dist/{GrantUserList-Dj2ms20E.js → GrantUserList-Dj55GA7O.js} +5 -5
- package/dist/{Main-C2z7Jf9A.js → Main-0TfvGJ4N.js} +5 -5
- package/dist/{Main-DmpwTPaI.js → Main-BQNkTyET.js} +9 -9
- package/dist/{Main-DklZWoKj.js → Main-CuUG6svQ.js} +2 -2
- package/dist/{PermissionSetList-C-qgCcRO.js → PermissionSetList-BsLi-TOK.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ggZB5zWW.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C2l8nWx2.js} +1014 -1014
- package/dist/{RoleList-ohfin77B.js → RoleList-DLDcyVWT.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-diuWysro.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CUXUPfRc.js} +190 -181
- package/dist/{ScheduleGeneralPage-aCljFf21.js → ScheduleGeneralPage-BhYI6O9g.js} +132 -133
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-x_-BYkcc.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js} +669 -646
- package/dist/{SchedulePage-DdMHF6kX.js → SchedulePage-DPU4taJt.js} +7407 -7359
- package/dist/{SchedulePositionPage-CID91orD.js → SchedulePositionPage-Byt6nmUj.js} +82 -84
- package/dist/{SelectFilter-CG13h83-.js → SelectFilter-1fh00OZW.js} +1 -1
- package/dist/{TeamMemberList-DJIKL4dE.js → TeamMemberList-CyUX8Afk.js} +35 -36
- package/dist/{TimesheetList-BPXWPNfT.js → TimesheetList-Q4FeNgOT.js} +52 -53
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DVcV0knM.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C3iU4Zmc.js} +2 -2
- package/dist/{app-Bz8568j8.js → app-TuHQoM7K.js} +676 -666
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DhSRKSu4.js → dayjs.min-DXnA8GYn.js} +1 -1
- package/dist/{employee-BM44u8b-.js → employee-Ctnil3cD.js} +3 -3
- package/dist/{iteration-BHDxs89d.js → iteration-BxOzv27y.js} +1 -1
- package/dist/{lodash-DgSYLwYD.js → lodash-CKT_RxJs.js} +1 -1
- package/dist/object-Dwyg2LgX.js +16 -0
- package/dist/{role-BMJ7LEHN.js → role-CNEJPyaD.js} +1 -1
- package/dist/{rule-CCo7_ckA.js → rule-FbuHv6Gh.js} +2 -2
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +3 -1
- package/dist/src/views/scheduling/data.d.ts +17 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-C_Cd__n1.js → useReportPermissions-lemBrd1S.js} +3 -3
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var La = Object.defineProperty;
|
|
2
2
|
var Ka = (e, t, s) => t in e ? La(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
-
var
|
|
4
|
-
import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as
|
|
3
|
+
var Vt = (e, t, s) => Ka(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as At, defineComponent as at, createBlock as $t, renderSlot as Ts, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as qs, createElementVNode as Xe, toDisplayString as sn, watch as er, nextTick as fn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Ns, withCtx as nr, createVNode as ar, defineAsyncComponent as rr, readonly as Ds } from "vue";
|
|
5
5
|
import { useBreakpoints as or } from "@feedmepos/ui-library";
|
|
6
6
|
import { useRoute as ir, useRouter as lr } from "vue-router";
|
|
7
7
|
import { useCoreStore as bn, useI18n as vn } from "@feedmepos/mf-common";
|
|
@@ -21,7 +21,7 @@ const v = {
|
|
|
21
21
|
miniProgram: "Mini Program",
|
|
22
22
|
media: "Media"
|
|
23
23
|
}, cr = "access-denied";
|
|
24
|
-
var
|
|
24
|
+
var z;
|
|
25
25
|
(function(e) {
|
|
26
26
|
function t(a) {
|
|
27
27
|
}
|
|
@@ -55,8 +55,8 @@ var U;
|
|
|
55
55
|
return a.map((l) => typeof l == "string" ? `'${l}'` : l).join(r);
|
|
56
56
|
}
|
|
57
57
|
e.joinValues = n;
|
|
58
|
-
})(
|
|
59
|
-
const x =
|
|
58
|
+
})(z || (z = {}));
|
|
59
|
+
const x = z.arrayToEnum([
|
|
60
60
|
"string",
|
|
61
61
|
"nan",
|
|
62
62
|
"number",
|
|
@@ -96,7 +96,7 @@ const x = U.arrayToEnum([
|
|
|
96
96
|
default:
|
|
97
97
|
return x.unknown;
|
|
98
98
|
}
|
|
99
|
-
}, M =
|
|
99
|
+
}, M = z.arrayToEnum([
|
|
100
100
|
"invalid_type",
|
|
101
101
|
"invalid_literal",
|
|
102
102
|
"custom",
|
|
@@ -140,10 +140,10 @@ class Ie extends Error {
|
|
|
140
140
|
else if (l.path.length === 0)
|
|
141
141
|
n._errors.push(s(l));
|
|
142
142
|
else {
|
|
143
|
-
let c = n,
|
|
144
|
-
for (;
|
|
145
|
-
const y = l.path[
|
|
146
|
-
|
|
143
|
+
let c = n, w = 0;
|
|
144
|
+
for (; w < l.path.length; ) {
|
|
145
|
+
const y = l.path[w];
|
|
146
|
+
w === l.path.length - 1 ? (c[y] = c[y] || { _errors: [] }, c[y]._errors.push(s(l))) : c[y] = c[y] || { _errors: [] }, c = c[y], w++;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
};
|
|
@@ -169,7 +169,7 @@ class Ie extends Error {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
Ie.create = (e) => new Ie(e);
|
|
172
|
-
const
|
|
172
|
+
const Et = (e, t) => {
|
|
173
173
|
let s;
|
|
174
174
|
switch (e.code) {
|
|
175
175
|
case M.invalid_type:
|
|
@@ -179,16 +179,16 @@ const jt = (e, t) => {
|
|
|
179
179
|
s = `Invalid literal value, expected ${JSON.stringify(e.expected, Xs)}`;
|
|
180
180
|
break;
|
|
181
181
|
case M.unrecognized_keys:
|
|
182
|
-
s = `Unrecognized key(s) in object: ${
|
|
182
|
+
s = `Unrecognized key(s) in object: ${z.joinValues(e.keys, ", ")}`;
|
|
183
183
|
break;
|
|
184
184
|
case M.invalid_union:
|
|
185
185
|
s = "Invalid input";
|
|
186
186
|
break;
|
|
187
187
|
case M.invalid_union_discriminator:
|
|
188
|
-
s = `Invalid discriminator value. Expected ${
|
|
188
|
+
s = `Invalid discriminator value. Expected ${z.joinValues(e.options)}`;
|
|
189
189
|
break;
|
|
190
190
|
case M.invalid_enum_value:
|
|
191
|
-
s = `Invalid enum value. Expected ${
|
|
191
|
+
s = `Invalid enum value. Expected ${z.joinValues(e.options)}, received '${e.received}'`;
|
|
192
192
|
break;
|
|
193
193
|
case M.invalid_arguments:
|
|
194
194
|
s = "Invalid function arguments";
|
|
@@ -200,7 +200,7 @@ const jt = (e, t) => {
|
|
|
200
200
|
s = "Invalid date";
|
|
201
201
|
break;
|
|
202
202
|
case M.invalid_string:
|
|
203
|
-
typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` :
|
|
203
|
+
typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : z.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
|
|
204
204
|
break;
|
|
205
205
|
case M.too_small:
|
|
206
206
|
e.type === "array" ? s = `Array must contain ${e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? s = `Number must be greater than ${e.inclusive ? "or equal to " : ""}${e.minimum}` : e.type === "date" ? s = `Date must be greater than ${e.inclusive ? "or equal to " : ""}${new Date(e.minimum)}` : s = "Invalid input";
|
|
@@ -218,11 +218,11 @@ const jt = (e, t) => {
|
|
|
218
218
|
s = `Number must be a multiple of ${e.multipleOf}`;
|
|
219
219
|
break;
|
|
220
220
|
default:
|
|
221
|
-
s = t.defaultError,
|
|
221
|
+
s = t.defaultError, z.assertNever(e);
|
|
222
222
|
}
|
|
223
223
|
return { message: s };
|
|
224
224
|
};
|
|
225
|
-
let Bn =
|
|
225
|
+
let Bn = Et;
|
|
226
226
|
function dr(e) {
|
|
227
227
|
Bn = e;
|
|
228
228
|
}
|
|
@@ -235,8 +235,8 @@ const It = (e) => {
|
|
|
235
235
|
path: r
|
|
236
236
|
};
|
|
237
237
|
let c = "";
|
|
238
|
-
const
|
|
239
|
-
for (const y of
|
|
238
|
+
const w = n.filter((y) => !!y).slice().reverse();
|
|
239
|
+
for (const y of w)
|
|
240
240
|
c = y(l, { data: t, defaultError: c }).message;
|
|
241
241
|
return {
|
|
242
242
|
...a,
|
|
@@ -253,7 +253,7 @@ function P(e, t) {
|
|
|
253
253
|
e.common.contextualErrorMap,
|
|
254
254
|
e.schemaErrorMap,
|
|
255
255
|
Ht(),
|
|
256
|
-
|
|
256
|
+
Et
|
|
257
257
|
].filter((n) => !!n)
|
|
258
258
|
});
|
|
259
259
|
e.common.issues.push(s);
|
|
@@ -300,10 +300,10 @@ class le {
|
|
|
300
300
|
const I = Object.freeze({
|
|
301
301
|
status: "aborted"
|
|
302
302
|
}), Ar = (e) => ({ status: "dirty", value: e }), ce = (e) => ({ status: "valid", value: e }), js = (e) => e.status === "aborted", Es = (e) => e.status === "dirty", Tt = (e) => e.status === "valid", Ps = (e) => typeof Promise !== void 0 && e instanceof Promise, Xs = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
303
|
-
var
|
|
303
|
+
var Z;
|
|
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
|
+
})(Z || (Z = {}));
|
|
307
307
|
class Ve {
|
|
308
308
|
constructor(t, s, n, a) {
|
|
309
309
|
this.parent = t, this.data = s, this._path = n, this._key = a;
|
|
@@ -420,7 +420,7 @@ class q {
|
|
|
420
420
|
code: M.custom,
|
|
421
421
|
...n(a)
|
|
422
422
|
});
|
|
423
|
-
return typeof Promise < "u" && l instanceof Promise ? l.then((
|
|
423
|
+
return typeof Promise < "u" && l instanceof Promise ? l.then((w) => w ? !0 : (c(), !1)) : l ? !0 : (c(), !1);
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
refinement(t, s) {
|
|
@@ -446,13 +446,13 @@ class q {
|
|
|
446
446
|
return Fe.create(this);
|
|
447
447
|
}
|
|
448
448
|
promise() {
|
|
449
|
-
return
|
|
449
|
+
return ht.create(this);
|
|
450
450
|
}
|
|
451
451
|
or(t) {
|
|
452
|
-
return
|
|
452
|
+
return Pt.create([this, t]);
|
|
453
453
|
}
|
|
454
454
|
and(t) {
|
|
455
|
-
return
|
|
455
|
+
return Ot.create(this, t);
|
|
456
456
|
}
|
|
457
457
|
transform(t) {
|
|
458
458
|
return new ke({
|
|
@@ -489,8 +489,8 @@ class ze extends q {
|
|
|
489
489
|
super(...arguments), this._regex = (t, s, n) => this.refinement((a) => t.test(a), {
|
|
490
490
|
validation: s,
|
|
491
491
|
code: M.invalid_string,
|
|
492
|
-
...
|
|
493
|
-
}), this.nonempty = (t) => this.min(1,
|
|
492
|
+
...Z.errToObj(n)
|
|
493
|
+
}), this.nonempty = (t) => this.min(1, Z.errToObj(t)), this.trim = () => new ze({
|
|
494
494
|
...this._def,
|
|
495
495
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
496
496
|
});
|
|
@@ -567,7 +567,7 @@ class ze extends q {
|
|
|
567
567
|
code: M.invalid_string,
|
|
568
568
|
validation: { endsWith: r.value },
|
|
569
569
|
message: r.message
|
|
570
|
-
}), n.dirty()) :
|
|
570
|
+
}), n.dirty()) : z.assertNever(r);
|
|
571
571
|
return { status: n.value, value: t.data };
|
|
572
572
|
}
|
|
573
573
|
_addCheck(t) {
|
|
@@ -577,50 +577,50 @@ class ze extends q {
|
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
email(t) {
|
|
580
|
-
return this._addCheck({ kind: "email", ...
|
|
580
|
+
return this._addCheck({ kind: "email", ...Z.errToObj(t) });
|
|
581
581
|
}
|
|
582
582
|
url(t) {
|
|
583
|
-
return this._addCheck({ kind: "url", ...
|
|
583
|
+
return this._addCheck({ kind: "url", ...Z.errToObj(t) });
|
|
584
584
|
}
|
|
585
585
|
uuid(t) {
|
|
586
|
-
return this._addCheck({ kind: "uuid", ...
|
|
586
|
+
return this._addCheck({ kind: "uuid", ...Z.errToObj(t) });
|
|
587
587
|
}
|
|
588
588
|
cuid(t) {
|
|
589
|
-
return this._addCheck({ kind: "cuid", ...
|
|
589
|
+
return this._addCheck({ kind: "cuid", ...Z.errToObj(t) });
|
|
590
590
|
}
|
|
591
591
|
regex(t, s) {
|
|
592
592
|
return this._addCheck({
|
|
593
593
|
kind: "regex",
|
|
594
594
|
regex: t,
|
|
595
|
-
...
|
|
595
|
+
...Z.errToObj(s)
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
startsWith(t, s) {
|
|
599
599
|
return this._addCheck({
|
|
600
600
|
kind: "startsWith",
|
|
601
601
|
value: t,
|
|
602
|
-
...
|
|
602
|
+
...Z.errToObj(s)
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
endsWith(t, s) {
|
|
606
606
|
return this._addCheck({
|
|
607
607
|
kind: "endsWith",
|
|
608
608
|
value: t,
|
|
609
|
-
...
|
|
609
|
+
...Z.errToObj(s)
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
612
|
min(t, s) {
|
|
613
613
|
return this._addCheck({
|
|
614
614
|
kind: "min",
|
|
615
615
|
value: t,
|
|
616
|
-
...
|
|
616
|
+
...Z.errToObj(s)
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
619
|
max(t, s) {
|
|
620
620
|
return this._addCheck({
|
|
621
621
|
kind: "max",
|
|
622
622
|
value: t,
|
|
623
|
-
...
|
|
623
|
+
...Z.errToObj(s)
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
626
|
length(t, s) {
|
|
@@ -676,7 +676,7 @@ class et extends q {
|
|
|
676
676
|
let n;
|
|
677
677
|
const a = new le();
|
|
678
678
|
for (const r of this._def.checks)
|
|
679
|
-
r.kind === "int" ?
|
|
679
|
+
r.kind === "int" ? z.isInteger(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
|
|
680
680
|
code: M.invalid_type,
|
|
681
681
|
expected: "integer",
|
|
682
682
|
received: "float",
|
|
@@ -697,20 +697,20 @@ class et extends q {
|
|
|
697
697
|
code: M.not_multiple_of,
|
|
698
698
|
multipleOf: r.value,
|
|
699
699
|
message: r.message
|
|
700
|
-
}), a.dirty()) :
|
|
700
|
+
}), a.dirty()) : z.assertNever(r);
|
|
701
701
|
return { status: a.value, value: t.data };
|
|
702
702
|
}
|
|
703
703
|
gte(t, s) {
|
|
704
|
-
return this.setLimit("min", t, !0,
|
|
704
|
+
return this.setLimit("min", t, !0, Z.toString(s));
|
|
705
705
|
}
|
|
706
706
|
gt(t, s) {
|
|
707
|
-
return this.setLimit("min", t, !1,
|
|
707
|
+
return this.setLimit("min", t, !1, Z.toString(s));
|
|
708
708
|
}
|
|
709
709
|
lte(t, s) {
|
|
710
|
-
return this.setLimit("max", t, !0,
|
|
710
|
+
return this.setLimit("max", t, !0, Z.toString(s));
|
|
711
711
|
}
|
|
712
712
|
lt(t, s) {
|
|
713
|
-
return this.setLimit("max", t, !1,
|
|
713
|
+
return this.setLimit("max", t, !1, Z.toString(s));
|
|
714
714
|
}
|
|
715
715
|
setLimit(t, s, n, a) {
|
|
716
716
|
return new et({
|
|
@@ -721,7 +721,7 @@ class et extends q {
|
|
|
721
721
|
kind: t,
|
|
722
722
|
value: s,
|
|
723
723
|
inclusive: n,
|
|
724
|
-
message:
|
|
724
|
+
message: Z.toString(a)
|
|
725
725
|
}
|
|
726
726
|
]
|
|
727
727
|
});
|
|
@@ -735,7 +735,7 @@ class et extends q {
|
|
|
735
735
|
int(t) {
|
|
736
736
|
return this._addCheck({
|
|
737
737
|
kind: "int",
|
|
738
|
-
message:
|
|
738
|
+
message: Z.toString(t)
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
741
|
positive(t) {
|
|
@@ -743,7 +743,7 @@ class et extends q {
|
|
|
743
743
|
kind: "min",
|
|
744
744
|
value: 0,
|
|
745
745
|
inclusive: !1,
|
|
746
|
-
message:
|
|
746
|
+
message: Z.toString(t)
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
negative(t) {
|
|
@@ -751,7 +751,7 @@ class et extends q {
|
|
|
751
751
|
kind: "max",
|
|
752
752
|
value: 0,
|
|
753
753
|
inclusive: !1,
|
|
754
|
-
message:
|
|
754
|
+
message: Z.toString(t)
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
nonpositive(t) {
|
|
@@ -759,7 +759,7 @@ class et extends q {
|
|
|
759
759
|
kind: "max",
|
|
760
760
|
value: 0,
|
|
761
761
|
inclusive: !0,
|
|
762
|
-
message:
|
|
762
|
+
message: Z.toString(t)
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
765
|
nonnegative(t) {
|
|
@@ -767,14 +767,14 @@ class et extends q {
|
|
|
767
767
|
kind: "min",
|
|
768
768
|
value: 0,
|
|
769
769
|
inclusive: !0,
|
|
770
|
-
message:
|
|
770
|
+
message: Z.toString(t)
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
multipleOf(t, s) {
|
|
774
774
|
return this._addCheck({
|
|
775
775
|
kind: "multipleOf",
|
|
776
776
|
value: t,
|
|
777
|
-
message:
|
|
777
|
+
message: Z.toString(s)
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
780
|
get minValue() {
|
|
@@ -832,7 +832,7 @@ Nt.create = (e) => new Nt({
|
|
|
832
832
|
typeName: H.ZodBoolean,
|
|
833
833
|
...N(e)
|
|
834
834
|
});
|
|
835
|
-
class
|
|
835
|
+
class gt extends q {
|
|
836
836
|
_parse(t) {
|
|
837
837
|
if (this._getType(t) !== x.date) {
|
|
838
838
|
const r = this._getOrReturnCtx(t);
|
|
@@ -863,14 +863,14 @@ class At extends q {
|
|
|
863
863
|
inclusive: !0,
|
|
864
864
|
maximum: r.value,
|
|
865
865
|
type: "date"
|
|
866
|
-
}), n.dirty()) :
|
|
866
|
+
}), n.dirty()) : z.assertNever(r);
|
|
867
867
|
return {
|
|
868
868
|
status: n.value,
|
|
869
869
|
value: new Date(t.data.getTime())
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
872
|
_addCheck(t) {
|
|
873
|
-
return new
|
|
873
|
+
return new gt({
|
|
874
874
|
...this._def,
|
|
875
875
|
checks: [...this._def.checks, t]
|
|
876
876
|
});
|
|
@@ -879,14 +879,14 @@ class At extends q {
|
|
|
879
879
|
return this._addCheck({
|
|
880
880
|
kind: "min",
|
|
881
881
|
value: t.getTime(),
|
|
882
|
-
message:
|
|
882
|
+
message: Z.toString(s)
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
max(t, s) {
|
|
886
886
|
return this._addCheck({
|
|
887
887
|
kind: "max",
|
|
888
888
|
value: t.getTime(),
|
|
889
|
-
message:
|
|
889
|
+
message: Z.toString(s)
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
get minDate() {
|
|
@@ -902,7 +902,7 @@ class At extends q {
|
|
|
902
902
|
return t != null ? new Date(t) : null;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
gt.create = (e) => new gt({
|
|
906
906
|
checks: [],
|
|
907
907
|
typeName: H.ZodDate,
|
|
908
908
|
...N(e)
|
|
@@ -941,7 +941,7 @@ Qt.create = (e) => new Qt({
|
|
|
941
941
|
typeName: H.ZodNull,
|
|
942
942
|
...N(e)
|
|
943
943
|
});
|
|
944
|
-
class
|
|
944
|
+
class pt extends q {
|
|
945
945
|
constructor() {
|
|
946
946
|
super(...arguments), this._any = !0;
|
|
947
947
|
}
|
|
@@ -949,7 +949,7 @@ class gt extends q {
|
|
|
949
949
|
return ce(t.data);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
|
|
952
|
+
pt.create = (e) => new pt({
|
|
953
953
|
typeName: H.ZodAny,
|
|
954
954
|
...N(e)
|
|
955
955
|
});
|
|
@@ -1028,13 +1028,13 @@ class Fe extends q {
|
|
|
1028
1028
|
min(t, s) {
|
|
1029
1029
|
return new Fe({
|
|
1030
1030
|
...this._def,
|
|
1031
|
-
minLength: { value: t, message:
|
|
1031
|
+
minLength: { value: t, message: Z.toString(s) }
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
max(t, s) {
|
|
1035
1035
|
return new Fe({
|
|
1036
1036
|
...this._def,
|
|
1037
|
-
maxLength: { value: t, message:
|
|
1037
|
+
maxLength: { value: t, message: Z.toString(s) }
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
1040
|
length(t, s) {
|
|
@@ -1085,7 +1085,7 @@ class ee extends q {
|
|
|
1085
1085
|
_getCached() {
|
|
1086
1086
|
if (this._cached !== null)
|
|
1087
1087
|
return this._cached;
|
|
1088
|
-
const t = this._def.shape(), s =
|
|
1088
|
+
const t = this._def.shape(), s = z.objectKeys(t);
|
|
1089
1089
|
return this._cached = { shape: t, keys: s };
|
|
1090
1090
|
}
|
|
1091
1091
|
_parse(t) {
|
|
@@ -1100,22 +1100,22 @@ class ee extends q {
|
|
|
1100
1100
|
const { status: n, ctx: a } = this._processInputParams(t), { shape: r, keys: l } = this._getCached(), c = [];
|
|
1101
1101
|
for (const y in a.data)
|
|
1102
1102
|
l.includes(y) || c.push(y);
|
|
1103
|
-
const
|
|
1103
|
+
const w = [];
|
|
1104
1104
|
for (const y of l) {
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1105
|
+
const f = r[y], O = a.data[y];
|
|
1106
|
+
w.push({
|
|
1107
1107
|
key: { status: "valid", value: y },
|
|
1108
|
-
value:
|
|
1108
|
+
value: f._parse(new Ve(a, O, a.path, y)),
|
|
1109
1109
|
alwaysSet: y in a.data
|
|
1110
1110
|
});
|
|
1111
1111
|
}
|
|
1112
1112
|
if (this._def.catchall instanceof We) {
|
|
1113
1113
|
const y = this._def.unknownKeys;
|
|
1114
1114
|
if (y === "passthrough")
|
|
1115
|
-
for (const
|
|
1116
|
-
|
|
1117
|
-
key: { status: "valid", value:
|
|
1118
|
-
value: { status: "valid", value: a.data[
|
|
1115
|
+
for (const f of c)
|
|
1116
|
+
w.push({
|
|
1117
|
+
key: { status: "valid", value: f },
|
|
1118
|
+
value: { status: "valid", value: a.data[f] }
|
|
1119
1119
|
});
|
|
1120
1120
|
else if (y === "strict")
|
|
1121
1121
|
c.length > 0 && (P(a, {
|
|
@@ -1125,46 +1125,46 @@ class ee extends q {
|
|
|
1125
1125
|
else if (y !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1126
1126
|
} else {
|
|
1127
1127
|
const y = this._def.catchall;
|
|
1128
|
-
for (const
|
|
1129
|
-
const
|
|
1130
|
-
|
|
1131
|
-
key: { status: "valid", value:
|
|
1128
|
+
for (const f of c) {
|
|
1129
|
+
const O = a.data[f];
|
|
1130
|
+
w.push({
|
|
1131
|
+
key: { status: "valid", value: f },
|
|
1132
1132
|
value: y._parse(
|
|
1133
|
-
new Ve(a,
|
|
1133
|
+
new Ve(a, O, a.path, f)
|
|
1134
1134
|
//, ctx.child(key), value, getParsedType(value)
|
|
1135
1135
|
),
|
|
1136
|
-
alwaysSet:
|
|
1136
|
+
alwaysSet: f in a.data
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
return a.common.async ? Promise.resolve().then(async () => {
|
|
1141
1141
|
const y = [];
|
|
1142
|
-
for (const
|
|
1143
|
-
const
|
|
1142
|
+
for (const f of w) {
|
|
1143
|
+
const O = await f.key;
|
|
1144
1144
|
y.push({
|
|
1145
|
-
key:
|
|
1146
|
-
value: await
|
|
1147
|
-
alwaysSet:
|
|
1145
|
+
key: O,
|
|
1146
|
+
value: await f.value,
|
|
1147
|
+
alwaysSet: f.alwaysSet
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
return y;
|
|
1151
|
-
}).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n,
|
|
1151
|
+
}).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n, w);
|
|
1152
1152
|
}
|
|
1153
1153
|
get shape() {
|
|
1154
1154
|
return this._def.shape();
|
|
1155
1155
|
}
|
|
1156
1156
|
strict(t) {
|
|
1157
|
-
return
|
|
1157
|
+
return Z.errToObj, new ee({
|
|
1158
1158
|
...this._def,
|
|
1159
1159
|
unknownKeys: "strict",
|
|
1160
1160
|
...t !== void 0 ? {
|
|
1161
1161
|
errorMap: (s, n) => {
|
|
1162
1162
|
var a, r, l, c;
|
|
1163
|
-
const
|
|
1163
|
+
const w = (l = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, s, n).message) !== null && l !== void 0 ? l : n.defaultError;
|
|
1164
1164
|
return s.code === "unrecognized_keys" ? {
|
|
1165
|
-
message: (c =
|
|
1165
|
+
message: (c = Z.errToObj(t).message) !== null && c !== void 0 ? c : w
|
|
1166
1166
|
} : {
|
|
1167
|
-
message:
|
|
1167
|
+
message: w
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
1170
|
} : {}
|
|
@@ -1206,7 +1206,7 @@ class ee extends q {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
pick(t) {
|
|
1208
1208
|
const s = {};
|
|
1209
|
-
return
|
|
1209
|
+
return z.objectKeys(t).map((n) => {
|
|
1210
1210
|
this.shape[n] && (s[n] = this.shape[n]);
|
|
1211
1211
|
}), new ee({
|
|
1212
1212
|
...this._def,
|
|
@@ -1215,8 +1215,8 @@ class ee extends q {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
omit(t) {
|
|
1217
1217
|
const s = {};
|
|
1218
|
-
return
|
|
1219
|
-
|
|
1218
|
+
return z.objectKeys(this.shape).map((n) => {
|
|
1219
|
+
z.objectKeys(t).indexOf(n) === -1 && (s[n] = this.shape[n]);
|
|
1220
1220
|
}), new ee({
|
|
1221
1221
|
...this._def,
|
|
1222
1222
|
shape: () => s
|
|
@@ -1228,8 +1228,8 @@ class ee extends q {
|
|
|
1228
1228
|
partial(t) {
|
|
1229
1229
|
const s = {};
|
|
1230
1230
|
if (t)
|
|
1231
|
-
return
|
|
1232
|
-
|
|
1231
|
+
return z.objectKeys(this.shape).map((n) => {
|
|
1232
|
+
z.objectKeys(t).indexOf(n) === -1 ? s[n] = this.shape[n] : s[n] = this.shape[n].optional();
|
|
1233
1233
|
}), new ee({
|
|
1234
1234
|
...this._def,
|
|
1235
1235
|
shape: () => s
|
|
@@ -1257,7 +1257,7 @@ class ee extends q {
|
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
keyof() {
|
|
1260
|
-
return Cn(
|
|
1260
|
+
return Cn(z.objectKeys(this.shape));
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
ee.create = (e, t) => new ee({
|
|
@@ -1281,7 +1281,7 @@ ee.lazycreate = (e, t) => new ee({
|
|
|
1281
1281
|
typeName: H.ZodObject,
|
|
1282
1282
|
...N(t)
|
|
1283
1283
|
});
|
|
1284
|
-
class
|
|
1284
|
+
class Pt extends q {
|
|
1285
1285
|
_parse(t) {
|
|
1286
1286
|
const { ctx: s } = this._processInputParams(t), n = this._def.options;
|
|
1287
1287
|
function a(r) {
|
|
@@ -1319,7 +1319,7 @@ class Et extends q {
|
|
|
1319
1319
|
{
|
|
1320
1320
|
let r;
|
|
1321
1321
|
const l = [];
|
|
1322
|
-
for (const
|
|
1322
|
+
for (const w of n) {
|
|
1323
1323
|
const y = {
|
|
1324
1324
|
...s,
|
|
1325
1325
|
common: {
|
|
@@ -1327,18 +1327,18 @@ class Et extends q {
|
|
|
1327
1327
|
issues: []
|
|
1328
1328
|
},
|
|
1329
1329
|
parent: null
|
|
1330
|
-
},
|
|
1330
|
+
}, f = w._parseSync({
|
|
1331
1331
|
data: s.data,
|
|
1332
1332
|
path: s.path,
|
|
1333
1333
|
parent: y
|
|
1334
1334
|
});
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
|
|
1335
|
+
if (f.status === "valid")
|
|
1336
|
+
return f;
|
|
1337
|
+
f.status === "dirty" && !r && (r = { result: f, ctx: y }), y.common.issues.length && l.push(y.common.issues);
|
|
1338
1338
|
}
|
|
1339
1339
|
if (r)
|
|
1340
1340
|
return s.common.issues.push(...r.ctx.common.issues), r.result;
|
|
1341
|
-
const c = l.map((
|
|
1341
|
+
const c = l.map((w) => new Ie(w));
|
|
1342
1342
|
return P(s, {
|
|
1343
1343
|
code: M.invalid_union,
|
|
1344
1344
|
unionErrors: c
|
|
@@ -1349,7 +1349,7 @@ class Et extends q {
|
|
|
1349
1349
|
return this._def.options;
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
|
|
1352
|
+
Pt.create = (e, t) => new Pt({
|
|
1353
1353
|
options: e,
|
|
1354
1354
|
typeName: H.ZodUnion,
|
|
1355
1355
|
...N(t)
|
|
@@ -1420,12 +1420,12 @@ function Os(e, t) {
|
|
|
1420
1420
|
if (e === t)
|
|
1421
1421
|
return { valid: !0, data: e };
|
|
1422
1422
|
if (s === x.object && n === x.object) {
|
|
1423
|
-
const a =
|
|
1423
|
+
const a = z.objectKeys(t), r = z.objectKeys(e).filter((c) => a.indexOf(c) !== -1), l = { ...e, ...t };
|
|
1424
1424
|
for (const c of r) {
|
|
1425
|
-
const
|
|
1426
|
-
if (!
|
|
1425
|
+
const w = Os(e[c], t[c]);
|
|
1426
|
+
if (!w.valid)
|
|
1427
1427
|
return { valid: !1 };
|
|
1428
|
-
l[c] =
|
|
1428
|
+
l[c] = w.data;
|
|
1429
1429
|
}
|
|
1430
1430
|
return { valid: !0, data: l };
|
|
1431
1431
|
} else if (s === x.array && n === x.array) {
|
|
@@ -1433,15 +1433,15 @@ function Os(e, t) {
|
|
|
1433
1433
|
return { valid: !1 };
|
|
1434
1434
|
const a = [];
|
|
1435
1435
|
for (let r = 0; r < e.length; r++) {
|
|
1436
|
-
const l = e[r], c = t[r],
|
|
1437
|
-
if (!
|
|
1436
|
+
const l = e[r], c = t[r], w = Os(l, c);
|
|
1437
|
+
if (!w.valid)
|
|
1438
1438
|
return { valid: !1 };
|
|
1439
|
-
a.push(
|
|
1439
|
+
a.push(w.data);
|
|
1440
1440
|
}
|
|
1441
1441
|
return { valid: !0, data: a };
|
|
1442
1442
|
} else return s === x.date && n === x.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
|
|
1443
1443
|
}
|
|
1444
|
-
class
|
|
1444
|
+
class Ot extends q {
|
|
1445
1445
|
_parse(t) {
|
|
1446
1446
|
const { status: s, ctx: n } = this._processInputParams(t), a = (r, l) => {
|
|
1447
1447
|
if (js(r) || js(l))
|
|
@@ -1473,7 +1473,7 @@ class Pt extends q {
|
|
|
1473
1473
|
}));
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
|
|
1476
|
+
Ot.create = (e, t, s) => new Ot({
|
|
1477
1477
|
left: e,
|
|
1478
1478
|
right: t,
|
|
1479
1479
|
typeName: H.ZodIntersection,
|
|
@@ -1502,8 +1502,8 @@ class Se extends q {
|
|
|
1502
1502
|
type: "array"
|
|
1503
1503
|
}), s.dirty());
|
|
1504
1504
|
const r = n.data.map((l, c) => {
|
|
1505
|
-
const
|
|
1506
|
-
return
|
|
1505
|
+
const w = this._def.items[c] || this._def.rest;
|
|
1506
|
+
return w ? w._parse(new Ve(n, l, n.path, c)) : null;
|
|
1507
1507
|
}).filter((l) => !!l);
|
|
1508
1508
|
return n.common.async ? Promise.all(r).then((l) => le.mergeArray(s, l)) : le.mergeArray(s, r);
|
|
1509
1509
|
}
|
|
@@ -1523,7 +1523,7 @@ Se.create = (e, t) => new Se({
|
|
|
1523
1523
|
rest: null,
|
|
1524
1524
|
...N(t)
|
|
1525
1525
|
});
|
|
1526
|
-
class
|
|
1526
|
+
class Gt extends q {
|
|
1527
1527
|
get keySchema() {
|
|
1528
1528
|
return this._def.keyType;
|
|
1529
1529
|
}
|
|
@@ -1550,12 +1550,12 @@ class Ot extends q {
|
|
|
1550
1550
|
return this._def.valueType;
|
|
1551
1551
|
}
|
|
1552
1552
|
static create(t, s, n) {
|
|
1553
|
-
return s instanceof q ? new
|
|
1553
|
+
return s instanceof q ? new Gt({
|
|
1554
1554
|
keyType: t,
|
|
1555
1555
|
valueType: s,
|
|
1556
1556
|
typeName: H.ZodRecord,
|
|
1557
1557
|
...N(n)
|
|
1558
|
-
}) : new
|
|
1558
|
+
}) : new Gt({
|
|
1559
1559
|
keyType: ze.create(),
|
|
1560
1560
|
valueType: t,
|
|
1561
1561
|
typeName: H.ZodRecord,
|
|
@@ -1572,28 +1572,28 @@ class zt extends q {
|
|
|
1572
1572
|
expected: x.map,
|
|
1573
1573
|
received: n.parsedType
|
|
1574
1574
|
}), I;
|
|
1575
|
-
const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c,
|
|
1575
|
+
const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c, w], y) => ({
|
|
1576
1576
|
key: a._parse(new Ve(n, c, n.path, [y, "key"])),
|
|
1577
|
-
value: r._parse(new Ve(n,
|
|
1577
|
+
value: r._parse(new Ve(n, w, n.path, [y, "value"]))
|
|
1578
1578
|
}));
|
|
1579
1579
|
if (n.common.async) {
|
|
1580
1580
|
const c = /* @__PURE__ */ new Map();
|
|
1581
1581
|
return Promise.resolve().then(async () => {
|
|
1582
|
-
for (const
|
|
1583
|
-
const y = await
|
|
1584
|
-
if (y.status === "aborted" ||
|
|
1582
|
+
for (const w of l) {
|
|
1583
|
+
const y = await w.key, f = await w.value;
|
|
1584
|
+
if (y.status === "aborted" || f.status === "aborted")
|
|
1585
1585
|
return I;
|
|
1586
|
-
(y.status === "dirty" ||
|
|
1586
|
+
(y.status === "dirty" || f.status === "dirty") && s.dirty(), c.set(y.value, f.value);
|
|
1587
1587
|
}
|
|
1588
1588
|
return { status: s.value, value: c };
|
|
1589
1589
|
});
|
|
1590
1590
|
} else {
|
|
1591
1591
|
const c = /* @__PURE__ */ new Map();
|
|
1592
|
-
for (const
|
|
1593
|
-
const y =
|
|
1594
|
-
if (y.status === "aborted" ||
|
|
1592
|
+
for (const w of l) {
|
|
1593
|
+
const y = w.key, f = w.value;
|
|
1594
|
+
if (y.status === "aborted" || f.status === "aborted")
|
|
1595
1595
|
return I;
|
|
1596
|
-
(y.status === "dirty" ||
|
|
1596
|
+
(y.status === "dirty" || f.status === "dirty") && s.dirty(), c.set(y.value, f.value);
|
|
1597
1597
|
}
|
|
1598
1598
|
return { status: s.value, value: c };
|
|
1599
1599
|
}
|
|
@@ -1629,28 +1629,28 @@ class tt extends q {
|
|
|
1629
1629
|
message: a.maxSize.message
|
|
1630
1630
|
}), s.dirty());
|
|
1631
1631
|
const r = this._def.valueType;
|
|
1632
|
-
function l(
|
|
1632
|
+
function l(w) {
|
|
1633
1633
|
const y = /* @__PURE__ */ new Set();
|
|
1634
|
-
for (const
|
|
1635
|
-
if (
|
|
1634
|
+
for (const f of w) {
|
|
1635
|
+
if (f.status === "aborted")
|
|
1636
1636
|
return I;
|
|
1637
|
-
|
|
1637
|
+
f.status === "dirty" && s.dirty(), y.add(f.value);
|
|
1638
1638
|
}
|
|
1639
1639
|
return { status: s.value, value: y };
|
|
1640
1640
|
}
|
|
1641
|
-
const c = [...n.data.values()].map((
|
|
1642
|
-
return n.common.async ? Promise.all(c).then((
|
|
1641
|
+
const c = [...n.data.values()].map((w, y) => r._parse(new Ve(n, w, n.path, y)));
|
|
1642
|
+
return n.common.async ? Promise.all(c).then((w) => l(w)) : l(c);
|
|
1643
1643
|
}
|
|
1644
1644
|
min(t, s) {
|
|
1645
1645
|
return new tt({
|
|
1646
1646
|
...this._def,
|
|
1647
|
-
minSize: { value: t, message:
|
|
1647
|
+
minSize: { value: t, message: Z.toString(s) }
|
|
1648
1648
|
});
|
|
1649
1649
|
}
|
|
1650
1650
|
max(t, s) {
|
|
1651
1651
|
return new tt({
|
|
1652
1652
|
...this._def,
|
|
1653
|
-
maxSize: { value: t, message:
|
|
1653
|
+
maxSize: { value: t, message: Z.toString(s) }
|
|
1654
1654
|
});
|
|
1655
1655
|
}
|
|
1656
1656
|
size(t, s) {
|
|
@@ -1679,7 +1679,7 @@ class st extends q {
|
|
|
1679
1679
|
expected: x.function,
|
|
1680
1680
|
received: s.parsedType
|
|
1681
1681
|
}), I;
|
|
1682
|
-
function n(c,
|
|
1682
|
+
function n(c, w) {
|
|
1683
1683
|
return It({
|
|
1684
1684
|
data: c,
|
|
1685
1685
|
path: s.path,
|
|
@@ -1687,15 +1687,15 @@ class st extends q {
|
|
|
1687
1687
|
s.common.contextualErrorMap,
|
|
1688
1688
|
s.schemaErrorMap,
|
|
1689
1689
|
Ht(),
|
|
1690
|
-
|
|
1690
|
+
Et
|
|
1691
1691
|
].filter((y) => !!y),
|
|
1692
1692
|
issueData: {
|
|
1693
1693
|
code: M.invalid_arguments,
|
|
1694
|
-
argumentsError:
|
|
1694
|
+
argumentsError: w
|
|
1695
1695
|
}
|
|
1696
1696
|
});
|
|
1697
1697
|
}
|
|
1698
|
-
function a(c,
|
|
1698
|
+
function a(c, w) {
|
|
1699
1699
|
return It({
|
|
1700
1700
|
data: c,
|
|
1701
1701
|
path: s.path,
|
|
@@ -1703,30 +1703,30 @@ class st extends q {
|
|
|
1703
1703
|
s.common.contextualErrorMap,
|
|
1704
1704
|
s.schemaErrorMap,
|
|
1705
1705
|
Ht(),
|
|
1706
|
-
|
|
1706
|
+
Et
|
|
1707
1707
|
].filter((y) => !!y),
|
|
1708
1708
|
issueData: {
|
|
1709
1709
|
code: M.invalid_return_type,
|
|
1710
|
-
returnTypeError:
|
|
1710
|
+
returnTypeError: w
|
|
1711
1711
|
}
|
|
1712
1712
|
});
|
|
1713
1713
|
}
|
|
1714
1714
|
const r = { errorMap: s.common.contextualErrorMap }, l = s.data;
|
|
1715
|
-
return this._def.returns instanceof
|
|
1716
|
-
const
|
|
1717
|
-
throw
|
|
1718
|
-
}),
|
|
1719
|
-
return await this._def.returns._def.type.parseAsync(
|
|
1720
|
-
throw
|
|
1715
|
+
return this._def.returns instanceof ht ? ce(async (...c) => {
|
|
1716
|
+
const w = new Ie([]), y = await this._def.args.parseAsync(c, r).catch((X) => {
|
|
1717
|
+
throw w.addIssue(n(c, X)), w;
|
|
1718
|
+
}), f = await l(...y);
|
|
1719
|
+
return await this._def.returns._def.type.parseAsync(f, r).catch((X) => {
|
|
1720
|
+
throw w.addIssue(a(f, X)), w;
|
|
1721
1721
|
});
|
|
1722
1722
|
}) : ce((...c) => {
|
|
1723
|
-
const
|
|
1724
|
-
if (!h.success)
|
|
1725
|
-
throw new Ie([n(c, h.error)]);
|
|
1726
|
-
const y = l(...h.data), w = this._def.returns.safeParse(y, r);
|
|
1723
|
+
const w = this._def.args.safeParse(c, r);
|
|
1727
1724
|
if (!w.success)
|
|
1728
|
-
throw new Ie([
|
|
1729
|
-
|
|
1725
|
+
throw new Ie([n(c, w.error)]);
|
|
1726
|
+
const y = l(...w.data), f = this._def.returns.safeParse(y, r);
|
|
1727
|
+
if (!f.success)
|
|
1728
|
+
throw new Ie([a(y, f.error)]);
|
|
1729
|
+
return f.data;
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
1732
|
parameters() {
|
|
@@ -1806,7 +1806,7 @@ class ts extends q {
|
|
|
1806
1806
|
if (typeof t.data != "string") {
|
|
1807
1807
|
const s = this._getOrReturnCtx(t), n = this._def.values;
|
|
1808
1808
|
return P(s, {
|
|
1809
|
-
expected:
|
|
1809
|
+
expected: z.joinValues(n),
|
|
1810
1810
|
received: s.parsedType,
|
|
1811
1811
|
code: M.invalid_type
|
|
1812
1812
|
}), I;
|
|
@@ -1846,17 +1846,17 @@ class ts extends q {
|
|
|
1846
1846
|
ts.create = Cn;
|
|
1847
1847
|
class Kt extends q {
|
|
1848
1848
|
_parse(t) {
|
|
1849
|
-
const s =
|
|
1849
|
+
const s = z.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
|
|
1850
1850
|
if (n.parsedType !== x.string && n.parsedType !== x.number) {
|
|
1851
|
-
const a =
|
|
1851
|
+
const a = z.objectValues(s);
|
|
1852
1852
|
return P(n, {
|
|
1853
|
-
expected:
|
|
1853
|
+
expected: z.joinValues(a),
|
|
1854
1854
|
received: n.parsedType,
|
|
1855
1855
|
code: M.invalid_type
|
|
1856
1856
|
}), I;
|
|
1857
1857
|
}
|
|
1858
1858
|
if (s.indexOf(t.data) === -1) {
|
|
1859
|
-
const a =
|
|
1859
|
+
const a = z.objectValues(s);
|
|
1860
1860
|
return P(n, {
|
|
1861
1861
|
received: n.data,
|
|
1862
1862
|
code: M.invalid_enum_value,
|
|
@@ -1874,7 +1874,7 @@ Kt.create = (e, t) => new Kt({
|
|
|
1874
1874
|
typeName: H.ZodNativeEnum,
|
|
1875
1875
|
...N(t)
|
|
1876
1876
|
});
|
|
1877
|
-
class
|
|
1877
|
+
class ht extends q {
|
|
1878
1878
|
_parse(t) {
|
|
1879
1879
|
const { ctx: s } = this._processInputParams(t);
|
|
1880
1880
|
if (s.parsedType !== x.promise && s.common.async === !1)
|
|
@@ -1890,7 +1890,7 @@ class pt extends q {
|
|
|
1890
1890
|
})));
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
|
|
1893
|
+
ht.create = (e, t) => new ht({
|
|
1894
1894
|
type: e,
|
|
1895
1895
|
typeName: H.ZodPromise,
|
|
1896
1896
|
...N(t)
|
|
@@ -1923,10 +1923,10 @@ class ke extends q {
|
|
|
1923
1923
|
};
|
|
1924
1924
|
if (r.addIssue = r.addIssue.bind(r), a.type === "refinement") {
|
|
1925
1925
|
const l = (c) => {
|
|
1926
|
-
const
|
|
1926
|
+
const w = a.refinement(c, r);
|
|
1927
1927
|
if (n.common.async)
|
|
1928
|
-
return Promise.resolve(
|
|
1929
|
-
if (
|
|
1928
|
+
return Promise.resolve(w);
|
|
1929
|
+
if (w instanceof Promise)
|
|
1930
1930
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
1931
1931
|
return c;
|
|
1932
1932
|
};
|
|
@@ -1955,7 +1955,7 @@ class ke extends q {
|
|
|
1955
1955
|
return { status: s.value, value: c };
|
|
1956
1956
|
} else
|
|
1957
1957
|
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) => Tt(l) ? Promise.resolve(a.transform(l.value, r)).then((c) => ({ status: s.value, value: c })) : l);
|
|
1958
|
-
|
|
1958
|
+
z.assertNever(a);
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
ke.create = (e, t, s) => new ke({
|
|
@@ -2032,12 +2032,12 @@ Jt.create = (e) => new Jt({
|
|
|
2032
2032
|
typeName: H.ZodNaN,
|
|
2033
2033
|
...N(e)
|
|
2034
2034
|
});
|
|
2035
|
-
const Mn = (e, t = {}, s) => e ?
|
|
2035
|
+
const Mn = (e, t = {}, s) => e ? pt.create().superRefine((n, a) => {
|
|
2036
2036
|
if (!e(n)) {
|
|
2037
2037
|
const r = typeof t == "function" ? t(n) : t, l = typeof r == "string" ? { message: r } : r;
|
|
2038
2038
|
a.addIssue({ code: "custom", ...l, fatal: s });
|
|
2039
2039
|
}
|
|
2040
|
-
}) :
|
|
2040
|
+
}) : pt.create(), yr = {
|
|
2041
2041
|
object: ee.lazycreate
|
|
2042
2042
|
};
|
|
2043
2043
|
var H;
|
|
@@ -2046,8 +2046,8 @@ var H;
|
|
|
2046
2046
|
})(H || (H = {}));
|
|
2047
2047
|
const br = (e, t = {
|
|
2048
2048
|
message: `Input not instance of ${e.name}`
|
|
2049
|
-
}) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = qt.create, jn = Nt.create, Br =
|
|
2050
|
-
var
|
|
2049
|
+
}) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = qt.create, jn = Nt.create, Br = gt.create, Cr = Xt.create, Mr = Qt.create, Dr = pt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Fe.create, Or = ee.create, Gr = ee.strictCreate, Yr = Pt.create, Vr = es.create, Fr = Ot.create, Sr = Se.create, kr = Gt.create, Rr = zt.create, Hr = tt.create, Ir = st.create, Tr = Wt.create, qr = Lt.create, Nr = ts.create, Xr = Kt.create, Qr = ht.create, rn = ke.create, Zr = Ye.create, Ur = nt.create, zr = ke.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
|
|
2050
|
+
var Mt = /* @__PURE__ */ Object.freeze({
|
|
2051
2051
|
__proto__: null,
|
|
2052
2052
|
getParsedType: Qe,
|
|
2053
2053
|
ZodParsedType: x,
|
|
@@ -2068,10 +2068,10 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2068
2068
|
ZodNumber: et,
|
|
2069
2069
|
ZodBigInt: qt,
|
|
2070
2070
|
ZodBoolean: Nt,
|
|
2071
|
-
ZodDate:
|
|
2071
|
+
ZodDate: gt,
|
|
2072
2072
|
ZodUndefined: Xt,
|
|
2073
2073
|
ZodNull: Qt,
|
|
2074
|
-
ZodAny:
|
|
2074
|
+
ZodAny: pt,
|
|
2075
2075
|
ZodUnknown: Ze,
|
|
2076
2076
|
ZodNever: We,
|
|
2077
2077
|
ZodVoid: Zt,
|
|
@@ -2080,11 +2080,11 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2080
2080
|
return Ut;
|
|
2081
2081
|
},
|
|
2082
2082
|
ZodObject: ee,
|
|
2083
|
-
ZodUnion:
|
|
2083
|
+
ZodUnion: Pt,
|
|
2084
2084
|
ZodDiscriminatedUnion: es,
|
|
2085
|
-
ZodIntersection:
|
|
2085
|
+
ZodIntersection: Ot,
|
|
2086
2086
|
ZodTuple: Se,
|
|
2087
|
-
ZodRecord:
|
|
2087
|
+
ZodRecord: Gt,
|
|
2088
2088
|
ZodMap: zt,
|
|
2089
2089
|
ZodSet: tt,
|
|
2090
2090
|
ZodFunction: st,
|
|
@@ -2092,7 +2092,7 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2092
2092
|
ZodLiteral: Lt,
|
|
2093
2093
|
ZodEnum: ts,
|
|
2094
2094
|
ZodNativeEnum: Kt,
|
|
2095
|
-
ZodPromise:
|
|
2095
|
+
ZodPromise: ht,
|
|
2096
2096
|
ZodEffects: ke,
|
|
2097
2097
|
ZodTransformer: ke,
|
|
2098
2098
|
ZodOptional: Ye,
|
|
@@ -2146,7 +2146,7 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2146
2146
|
ZodIssueCode: M,
|
|
2147
2147
|
quotelessJson: ur,
|
|
2148
2148
|
ZodError: Ie,
|
|
2149
|
-
defaultErrorMap:
|
|
2149
|
+
defaultErrorMap: Et,
|
|
2150
2150
|
setErrorMap: dr,
|
|
2151
2151
|
getErrorMap: Ht
|
|
2152
2152
|
});
|
|
@@ -2234,7 +2234,7 @@ function to(e, t) {
|
|
|
2234
2234
|
function so(e, t) {
|
|
2235
2235
|
return e.fields.filter((s) => to(s, t));
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2237
|
+
function tu(e, t) {
|
|
2238
2238
|
const s = { ...t };
|
|
2239
2239
|
for (const n of so(e, s))
|
|
2240
2240
|
(s[n.key] === void 0 || s[n.key] === null) && n.default !== void 0 && (s[n.key] = n.default);
|
|
@@ -2267,7 +2267,7 @@ function ao(e) {
|
|
|
2267
2267
|
const t = e == null ? void 0 : e.shape;
|
|
2268
2268
|
return t ? Object.keys(t) : void 0;
|
|
2269
2269
|
}
|
|
2270
|
-
const Pn = /* @__PURE__ */ new Map(),
|
|
2270
|
+
const Pn = /* @__PURE__ */ new Map(), kt = [], ro = /* @__PURE__ */ new Map(), on = "prefix:";
|
|
2271
2271
|
function oo(e) {
|
|
2272
2272
|
for (const [t, s] of Object.entries(e))
|
|
2273
2273
|
io([t], s);
|
|
@@ -2278,8 +2278,8 @@ function io(e, t) {
|
|
|
2278
2278
|
for (const n of s) ro.set(n.builderKey, n);
|
|
2279
2279
|
for (const n of e)
|
|
2280
2280
|
if (n.startsWith(on)) {
|
|
2281
|
-
const a = n.slice(on.length), r =
|
|
2282
|
-
r >= 0 ?
|
|
2281
|
+
const a = n.slice(on.length), r = kt.findIndex((l) => l.prefix === a);
|
|
2282
|
+
r >= 0 ? kt[r] = { prefix: a, builders: s } : kt.push({ prefix: a, builders: s });
|
|
2283
2283
|
} else
|
|
2284
2284
|
Pn.set(n, s);
|
|
2285
2285
|
}
|
|
@@ -2303,19 +2303,19 @@ function co(e) {
|
|
|
2303
2303
|
const t = Pn.get(e);
|
|
2304
2304
|
if (t) return t;
|
|
2305
2305
|
let s;
|
|
2306
|
-
for (const n of
|
|
2306
|
+
for (const n of kt)
|
|
2307
2307
|
e.startsWith(n.prefix) && (!s || n.prefix.length > s.prefix.length) && (s = n);
|
|
2308
2308
|
return (s == null ? void 0 : s.builders) ?? [];
|
|
2309
2309
|
}
|
|
2310
|
-
const uo = "business::report::reports::", mo =
|
|
2310
|
+
const uo = "business::report::reports::", mo = Mt.object({
|
|
2311
2311
|
/** Requested report date, normalized to a UTC ISO string. */
|
|
2312
|
-
reportDate:
|
|
2312
|
+
reportDate: Mt.string().refine((e) => !Number.isNaN(Date.parse(e))),
|
|
2313
2313
|
/** Whole UTC days between now and the report date. */
|
|
2314
|
-
reportAgeDays:
|
|
2314
|
+
reportAgeDays: Mt.number().int().min(0),
|
|
2315
2315
|
/** Whole UTC months between now and the report date. */
|
|
2316
|
-
reportAgeMonths:
|
|
2316
|
+
reportAgeMonths: Mt.number().int().min(0),
|
|
2317
2317
|
/** Whole UTC years between now and the report date. */
|
|
2318
|
-
reportAgeYears:
|
|
2318
|
+
reportAgeYears: Mt.number().int().min(0)
|
|
2319
2319
|
}), Ao = 864e5;
|
|
2320
2320
|
function ln(e, t) {
|
|
2321
2321
|
const s = new Date(e);
|
|
@@ -2370,18 +2370,18 @@ function vo(e, t) {
|
|
|
2370
2370
|
return e.slice(0, 10);
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
2373
|
-
const
|
|
2374
|
-
days: `${
|
|
2375
|
-
months: `${
|
|
2376
|
-
years: `${
|
|
2373
|
+
const jt = "conditionBuilder.reportAccessWindow", un = {
|
|
2374
|
+
days: `${jt}.inheritedLastDays`,
|
|
2375
|
+
months: `${jt}.inheritedLastMonths`,
|
|
2376
|
+
years: `${jt}.inheritedLastYears`
|
|
2377
2377
|
};
|
|
2378
2378
|
function wo(e, t) {
|
|
2379
2379
|
if (!(!e || typeof e != "object")) {
|
|
2380
2380
|
if (e.mode === "unrestricted")
|
|
2381
|
-
return { labelKey: `${
|
|
2381
|
+
return { labelKey: `${jt}.unrestricted` };
|
|
2382
2382
|
if (e.mode === "since" && typeof e.sinceAtUtc == "string")
|
|
2383
2383
|
return {
|
|
2384
|
-
labelKey: `${
|
|
2384
|
+
labelKey: `${jt}.inheritedSince`,
|
|
2385
2385
|
params: { date: vo(e.sinceAtUtc, t.timeZone) }
|
|
2386
2386
|
};
|
|
2387
2387
|
if (e.mode === "last" && typeof e.amount == "number" && typeof e.unit == "string" && e.unit in un)
|
|
@@ -2486,7 +2486,7 @@ const Bo = {
|
|
|
2486
2486
|
report: Je
|
|
2487
2487
|
};
|
|
2488
2488
|
oo(Mo);
|
|
2489
|
-
function
|
|
2489
|
+
function su(e, t) {
|
|
2490
2490
|
if (!e) return {};
|
|
2491
2491
|
const s = new Set(t.ownedFields);
|
|
2492
2492
|
return Object.fromEntries(Object.entries(e).filter(([n]) => s.has(n)));
|
|
@@ -2496,7 +2496,7 @@ function Do(e, t) {
|
|
|
2496
2496
|
const s = new Set(t.flatMap((n) => n.ownedFields));
|
|
2497
2497
|
return Object.fromEntries(Object.entries(e).filter(([n]) => !s.has(n)));
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function nu(e, t) {
|
|
2500
2500
|
return Object.assign(
|
|
2501
2501
|
Do(
|
|
2502
2502
|
e,
|
|
@@ -6783,7 +6783,7 @@ const On = {
|
|
|
6783
6783
|
"zh-Hant": Ni
|
|
6784
6784
|
};
|
|
6785
6785
|
var S = /* @__PURE__ */ ((e) => (e.Order = "order", e.Refund = "refund", e.Drawer = "drawer", e.Menu = "menu", e.Inventory = "inventory", e.Deposit = "deposit", e.Delivery = "delivery", e.CounterRecord = "counterRecord", e.Counter = "counter", e.RestaurantSetting = "restaurantSetting", e.Display = "display", e.Printer = "printer", e.Table = "table", e.Employee = "employee", e.System = "system", e.Tax = "tax", e.PaymentType = "paymentType", e.FaceId = "faceId", e.MallIntegration = "mallIntegration", e.Report = "report", e))(S || {}), He = /* @__PURE__ */ ((e) => (e.Discount = "discount", e.Payment = "payment", e.ClaimDeposit = "claimDeposit", e.ChangePrice = "changePrice", e.Void = "void_", e.WaiveServiceCharge = "waiveServiceCharge", e.Resend = "resend", e.ChangePaymentType = "changePaymentType", e))(He || {}), k = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(k || {}), re = /* @__PURE__ */ ((e) => (e.Closeup = "closeup", e.Counter = "counter", e.HourlySales = "hourlySales", e.DailySales = "dailySales", e.ProductSales = "productSales", e.SourceProductSales = "sourceProductSales", e.UserProductSales = "userProductSales", e.CategorySales = "categorySales", e.AddonSales = "addonSales", e.SlotSales = "slotSales", e.Drawer = "drawer", e.Discount = "discount", e.Refund = "refund", e.Void = "void_", e.Timesheet = "timesheet", e.CounterPayment = "counterPayment", e))(re || {});
|
|
6786
|
-
const
|
|
6786
|
+
const au = {
|
|
6787
6787
|
// General
|
|
6788
6788
|
restaurant: {
|
|
6789
6789
|
label: "Restaurant Owner",
|
|
@@ -7450,7 +7450,7 @@ const su = {
|
|
|
7450
7450
|
category: v.media,
|
|
7451
7451
|
showByFeatureFlag: "hrm_enable_media_permission"
|
|
7452
7452
|
}
|
|
7453
|
-
},
|
|
7453
|
+
}, ru = [
|
|
7454
7454
|
{
|
|
7455
7455
|
label: "",
|
|
7456
7456
|
subject: S.Order,
|
|
@@ -7800,18 +7800,18 @@ const su = {
|
|
|
7800
7800
|
reason: ""
|
|
7801
7801
|
}
|
|
7802
7802
|
];
|
|
7803
|
-
var
|
|
7803
|
+
var W = /* @__PURE__ */ ((e) => (e.crm = "crm", e.crm_user = "crm::user", e.crm_segmentation = "crm::segmentation", e.crm_queue = "crm::queue", e.crm_transaction = "crm::transaction", e.crm_store = "crm::store", e.crm_location = "crm::location", e.crm_effect = "crm::effect", e.crm_setting = "crm::setting", e.crm_reward = "crm::reward", e.crm_campaign = "crm::campaign", e.crm_referral = "crm::referral", e.crm_marketingMaterial = "crm::marketingMaterial", e.crm_voucher = "crm::voucher", e.crm_membership = "crm::membership", e.crm_analytic = "crm::analytic", e.crm_tier = "crm::tier", e.crm_title = "crm::title", e.crm_broadcast = "crm::broadcast", e.crm_point = "crm::point", e.crm_credit = "crm::credit", e.crm_experience = "crm::experience", e.crm_game = "crm::game", e.crm_mission = "crm::mission", e.crm_loyaltyMember = "crm::loyaltyMember", e.crm_loyaltySegment = "crm::loyaltySegment", e.crm_loyaltyCard = "crm::loyaltyCard", e.crm_bin = "crm::bin", e))(W || {});
|
|
7804
7804
|
const J = [
|
|
7805
7805
|
{
|
|
7806
7806
|
label: "CRM",
|
|
7807
|
-
subject:
|
|
7807
|
+
subject: W.crm,
|
|
7808
7808
|
actions: [o.read]
|
|
7809
7809
|
}
|
|
7810
7810
|
], ge = (...e) => e.flat(), Qi = [
|
|
7811
7811
|
...J,
|
|
7812
7812
|
{
|
|
7813
7813
|
label: "User",
|
|
7814
|
-
subject:
|
|
7814
|
+
subject: W.crm_user,
|
|
7815
7815
|
actions: [
|
|
7816
7816
|
o.read,
|
|
7817
7817
|
o.create,
|
|
@@ -7823,7 +7823,7 @@ const J = [
|
|
|
7823
7823
|
...J,
|
|
7824
7824
|
{
|
|
7825
7825
|
label: "Segmentation",
|
|
7826
|
-
subject:
|
|
7826
|
+
subject: W.crm_segmentation,
|
|
7827
7827
|
actions: [
|
|
7828
7828
|
o.read,
|
|
7829
7829
|
o.create,
|
|
@@ -7835,7 +7835,7 @@ const J = [
|
|
|
7835
7835
|
...J,
|
|
7836
7836
|
{
|
|
7837
7837
|
label: "Transaction",
|
|
7838
|
-
subject:
|
|
7838
|
+
subject: W.crm_transaction,
|
|
7839
7839
|
actions: [
|
|
7840
7840
|
o.read,
|
|
7841
7841
|
o.create,
|
|
@@ -7847,7 +7847,7 @@ const J = [
|
|
|
7847
7847
|
...J,
|
|
7848
7848
|
{
|
|
7849
7849
|
label: "Store",
|
|
7850
|
-
subject:
|
|
7850
|
+
subject: W.crm_store,
|
|
7851
7851
|
actions: [
|
|
7852
7852
|
o.read,
|
|
7853
7853
|
o.create,
|
|
@@ -7859,7 +7859,7 @@ const J = [
|
|
|
7859
7859
|
...J,
|
|
7860
7860
|
{
|
|
7861
7861
|
label: "Location",
|
|
7862
|
-
subject:
|
|
7862
|
+
subject: W.crm_location,
|
|
7863
7863
|
actions: [
|
|
7864
7864
|
o.read,
|
|
7865
7865
|
o.create,
|
|
@@ -7871,7 +7871,7 @@ const J = [
|
|
|
7871
7871
|
...J,
|
|
7872
7872
|
{
|
|
7873
7873
|
label: "Effect",
|
|
7874
|
-
subject:
|
|
7874
|
+
subject: W.crm_effect,
|
|
7875
7875
|
actions: [
|
|
7876
7876
|
o.read,
|
|
7877
7877
|
o.create,
|
|
@@ -7883,14 +7883,14 @@ const J = [
|
|
|
7883
7883
|
...J,
|
|
7884
7884
|
{
|
|
7885
7885
|
label: "Setting",
|
|
7886
|
-
subject:
|
|
7886
|
+
subject: W.crm_setting,
|
|
7887
7887
|
actions: [o.read, o.update]
|
|
7888
7888
|
}
|
|
7889
7889
|
], Li = [
|
|
7890
7890
|
...J,
|
|
7891
7891
|
{
|
|
7892
7892
|
label: "Reward",
|
|
7893
|
-
subject:
|
|
7893
|
+
subject: W.crm_reward,
|
|
7894
7894
|
actions: [
|
|
7895
7895
|
o.read,
|
|
7896
7896
|
o.create,
|
|
@@ -7902,7 +7902,7 @@ const J = [
|
|
|
7902
7902
|
...J,
|
|
7903
7903
|
{
|
|
7904
7904
|
label: "Campaign",
|
|
7905
|
-
subject:
|
|
7905
|
+
subject: W.crm_campaign,
|
|
7906
7906
|
actions: [
|
|
7907
7907
|
o.read,
|
|
7908
7908
|
o.create,
|
|
@@ -7914,7 +7914,7 @@ const J = [
|
|
|
7914
7914
|
...J,
|
|
7915
7915
|
{
|
|
7916
7916
|
label: "Referral",
|
|
7917
|
-
subject:
|
|
7917
|
+
subject: W.crm_referral,
|
|
7918
7918
|
actions: [
|
|
7919
7919
|
o.read,
|
|
7920
7920
|
o.create,
|
|
@@ -7926,7 +7926,7 @@ const J = [
|
|
|
7926
7926
|
...J,
|
|
7927
7927
|
{
|
|
7928
7928
|
label: "Marketing Material",
|
|
7929
|
-
subject:
|
|
7929
|
+
subject: W.crm_marketingMaterial,
|
|
7930
7930
|
actions: [
|
|
7931
7931
|
o.read,
|
|
7932
7932
|
o.create,
|
|
@@ -7938,14 +7938,14 @@ const J = [
|
|
|
7938
7938
|
...J,
|
|
7939
7939
|
{
|
|
7940
7940
|
label: "Analytic",
|
|
7941
|
-
subject:
|
|
7941
|
+
subject: W.crm_analytic,
|
|
7942
7942
|
actions: [o.read]
|
|
7943
7943
|
}
|
|
7944
7944
|
], Ki = [
|
|
7945
7945
|
...J,
|
|
7946
7946
|
{
|
|
7947
7947
|
label: "Tier",
|
|
7948
|
-
subject:
|
|
7948
|
+
subject: W.crm_tier,
|
|
7949
7949
|
actions: [
|
|
7950
7950
|
o.read,
|
|
7951
7951
|
o.create,
|
|
@@ -7957,7 +7957,7 @@ const J = [
|
|
|
7957
7957
|
...J,
|
|
7958
7958
|
{
|
|
7959
7959
|
label: "Title",
|
|
7960
|
-
subject:
|
|
7960
|
+
subject: W.crm_title,
|
|
7961
7961
|
actions: [
|
|
7962
7962
|
o.read,
|
|
7963
7963
|
o.create,
|
|
@@ -7969,7 +7969,7 @@ const J = [
|
|
|
7969
7969
|
...J,
|
|
7970
7970
|
{
|
|
7971
7971
|
label: "Broadcast",
|
|
7972
|
-
subject:
|
|
7972
|
+
subject: W.crm_broadcast,
|
|
7973
7973
|
actions: [
|
|
7974
7974
|
o.read,
|
|
7975
7975
|
o.create,
|
|
@@ -7981,7 +7981,7 @@ const J = [
|
|
|
7981
7981
|
...J,
|
|
7982
7982
|
{
|
|
7983
7983
|
label: "Point",
|
|
7984
|
-
subject:
|
|
7984
|
+
subject: W.crm_point,
|
|
7985
7985
|
actions: [
|
|
7986
7986
|
o.read,
|
|
7987
7987
|
o.create,
|
|
@@ -7993,7 +7993,7 @@ const J = [
|
|
|
7993
7993
|
...J,
|
|
7994
7994
|
{
|
|
7995
7995
|
label: "Credit",
|
|
7996
|
-
subject:
|
|
7996
|
+
subject: W.crm_credit,
|
|
7997
7997
|
actions: [
|
|
7998
7998
|
o.read,
|
|
7999
7999
|
o.create,
|
|
@@ -8005,7 +8005,7 @@ const J = [
|
|
|
8005
8005
|
...J,
|
|
8006
8006
|
{
|
|
8007
8007
|
label: "Experience",
|
|
8008
|
-
subject:
|
|
8008
|
+
subject: W.crm_experience,
|
|
8009
8009
|
actions: [
|
|
8010
8010
|
o.read,
|
|
8011
8011
|
o.create,
|
|
@@ -8017,7 +8017,7 @@ const J = [
|
|
|
8017
8017
|
...J,
|
|
8018
8018
|
{
|
|
8019
8019
|
label: "Game",
|
|
8020
|
-
subject:
|
|
8020
|
+
subject: W.crm_game,
|
|
8021
8021
|
actions: [
|
|
8022
8022
|
o.read,
|
|
8023
8023
|
o.create,
|
|
@@ -8029,7 +8029,7 @@ const J = [
|
|
|
8029
8029
|
...J,
|
|
8030
8030
|
{
|
|
8031
8031
|
label: "Mission",
|
|
8032
|
-
subject:
|
|
8032
|
+
subject: W.crm_mission,
|
|
8033
8033
|
actions: [
|
|
8034
8034
|
o.read,
|
|
8035
8035
|
o.create,
|
|
@@ -8041,7 +8041,7 @@ const J = [
|
|
|
8041
8041
|
...J,
|
|
8042
8042
|
{
|
|
8043
8043
|
label: "Loyalty Member",
|
|
8044
|
-
subject:
|
|
8044
|
+
subject: W.crm_loyaltyMember,
|
|
8045
8045
|
actions: [
|
|
8046
8046
|
o.read,
|
|
8047
8047
|
o.create,
|
|
@@ -8053,7 +8053,7 @@ const J = [
|
|
|
8053
8053
|
...J,
|
|
8054
8054
|
{
|
|
8055
8055
|
label: "Loyalty Segment",
|
|
8056
|
-
subject:
|
|
8056
|
+
subject: W.crm_loyaltySegment,
|
|
8057
8057
|
actions: [
|
|
8058
8058
|
o.read,
|
|
8059
8059
|
o.create,
|
|
@@ -8065,7 +8065,7 @@ const J = [
|
|
|
8065
8065
|
...J,
|
|
8066
8066
|
{
|
|
8067
8067
|
label: "Loyalty Card",
|
|
8068
|
-
subject:
|
|
8068
|
+
subject: W.crm_loyaltyCard,
|
|
8069
8069
|
actions: [
|
|
8070
8070
|
o.read,
|
|
8071
8071
|
o.create,
|
|
@@ -8077,7 +8077,7 @@ const J = [
|
|
|
8077
8077
|
...J,
|
|
8078
8078
|
{
|
|
8079
8079
|
label: "Bin",
|
|
8080
|
-
subject:
|
|
8080
|
+
subject: W.crm_bin,
|
|
8081
8081
|
actions: [o.read, o.update, o.delete]
|
|
8082
8082
|
}
|
|
8083
8083
|
], Da = ge(
|
|
@@ -8114,7 +8114,7 @@ const J = [
|
|
|
8114
8114
|
...J,
|
|
8115
8115
|
{
|
|
8116
8116
|
label: "Voucher",
|
|
8117
|
-
subject:
|
|
8117
|
+
subject: W.crm_voucher,
|
|
8118
8118
|
actions: [
|
|
8119
8119
|
o.read,
|
|
8120
8120
|
o.create,
|
|
@@ -8126,7 +8126,7 @@ const J = [
|
|
|
8126
8126
|
...J,
|
|
8127
8127
|
{
|
|
8128
8128
|
label: "Membership",
|
|
8129
|
-
subject:
|
|
8129
|
+
subject: W.crm_membership,
|
|
8130
8130
|
actions: [
|
|
8131
8131
|
o.read,
|
|
8132
8132
|
o.create,
|
|
@@ -8275,54 +8275,54 @@ const J = [
|
|
|
8275
8275
|
permissions: ba
|
|
8276
8276
|
}
|
|
8277
8277
|
};
|
|
8278
|
-
var
|
|
8278
|
+
var V = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockAdjustmentReason = "inventory::stockAdjustmentReason", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(V || {});
|
|
8279
8279
|
const ue = [
|
|
8280
8280
|
{
|
|
8281
8281
|
label: "Inventory",
|
|
8282
|
-
subject:
|
|
8282
|
+
subject: V.inventory,
|
|
8283
8283
|
actions: [o.read]
|
|
8284
8284
|
}
|
|
8285
8285
|
], Us = [
|
|
8286
8286
|
...ue,
|
|
8287
8287
|
{
|
|
8288
8288
|
label: "Stock",
|
|
8289
|
-
subject:
|
|
8289
|
+
subject: V.inventory_stock,
|
|
8290
8290
|
actions: [o.read, o.create, o.update]
|
|
8291
8291
|
},
|
|
8292
8292
|
{
|
|
8293
8293
|
label: "Stock Adjustment",
|
|
8294
|
-
subject:
|
|
8294
|
+
subject: V.inventory_stockAdjustment,
|
|
8295
8295
|
actions: [o.read, o.update]
|
|
8296
8296
|
},
|
|
8297
8297
|
{
|
|
8298
8298
|
label: "Stock Recalculation",
|
|
8299
|
-
subject:
|
|
8299
|
+
subject: V.inventory_stockRecalculation,
|
|
8300
8300
|
actions: [o.update]
|
|
8301
8301
|
},
|
|
8302
8302
|
{
|
|
8303
8303
|
label: "Unit Cost History",
|
|
8304
|
-
subject:
|
|
8304
|
+
subject: V.inventory_unitCostHistory,
|
|
8305
8305
|
actions: [o.read]
|
|
8306
8306
|
}
|
|
8307
8307
|
], ml = [
|
|
8308
8308
|
...ue,
|
|
8309
8309
|
{
|
|
8310
8310
|
label: "Stock Adjustment",
|
|
8311
|
-
subject:
|
|
8311
|
+
subject: V.inventory_stockAdjustment,
|
|
8312
8312
|
actions: [o.update]
|
|
8313
8313
|
}
|
|
8314
8314
|
], Fa = [
|
|
8315
8315
|
...ue,
|
|
8316
8316
|
{
|
|
8317
8317
|
label: "Unit Cost History",
|
|
8318
|
-
subject:
|
|
8318
|
+
subject: V.inventory_unitCostHistory,
|
|
8319
8319
|
actions: [o.read, o.update]
|
|
8320
8320
|
}
|
|
8321
8321
|
], Sa = [
|
|
8322
8322
|
...ue,
|
|
8323
8323
|
{
|
|
8324
8324
|
label: "Wastage Template",
|
|
8325
|
-
subject:
|
|
8325
|
+
subject: V.inventory_wastageTemplate,
|
|
8326
8326
|
actions: [
|
|
8327
8327
|
o.read,
|
|
8328
8328
|
o.create,
|
|
@@ -8340,51 +8340,51 @@ const zs = [
|
|
|
8340
8340
|
...ue,
|
|
8341
8341
|
{
|
|
8342
8342
|
label: "Closing",
|
|
8343
|
-
subject:
|
|
8343
|
+
subject: V.inventory_closing,
|
|
8344
8344
|
actions: [o.read, o.create]
|
|
8345
8345
|
},
|
|
8346
8346
|
{
|
|
8347
8347
|
label: "Stock Recalculation",
|
|
8348
|
-
subject:
|
|
8348
|
+
subject: V.inventory_stockRecalculation,
|
|
8349
8349
|
actions: [o.read, o.update]
|
|
8350
8350
|
},
|
|
8351
8351
|
{
|
|
8352
8352
|
label: "Closing Draft",
|
|
8353
|
-
subject:
|
|
8353
|
+
subject: V.inventory_closingDraft,
|
|
8354
8354
|
actions: [o.read]
|
|
8355
8355
|
}
|
|
8356
8356
|
], ka = [
|
|
8357
8357
|
...ue,
|
|
8358
8358
|
{
|
|
8359
8359
|
label: "Closing Draft",
|
|
8360
|
-
subject:
|
|
8360
|
+
subject: V.inventory_closingDraft,
|
|
8361
8361
|
actions: [o.read, o.create, o.update]
|
|
8362
8362
|
},
|
|
8363
8363
|
{
|
|
8364
8364
|
label: "Closing",
|
|
8365
|
-
subject:
|
|
8365
|
+
subject: V.inventory_closing,
|
|
8366
8366
|
actions: [o.read]
|
|
8367
8367
|
},
|
|
8368
8368
|
{
|
|
8369
8369
|
label: "Stock Recalculation",
|
|
8370
|
-
subject:
|
|
8370
|
+
subject: V.inventory_stockRecalculation,
|
|
8371
8371
|
actions: [o.read, o.update]
|
|
8372
8372
|
},
|
|
8373
8373
|
{
|
|
8374
8374
|
label: "Stock",
|
|
8375
|
-
subject:
|
|
8375
|
+
subject: V.inventory_stock,
|
|
8376
8376
|
actions: [o.read]
|
|
8377
8377
|
},
|
|
8378
8378
|
{
|
|
8379
8379
|
label: "Stock Adjustment",
|
|
8380
|
-
subject:
|
|
8380
|
+
subject: V.inventory_stockAdjustment,
|
|
8381
8381
|
actions: [o.read]
|
|
8382
8382
|
}
|
|
8383
8383
|
], Ra = [
|
|
8384
8384
|
...ue,
|
|
8385
8385
|
{
|
|
8386
8386
|
label: "Closing Template",
|
|
8387
|
-
subject:
|
|
8387
|
+
subject: V.inventory_closingTemplate,
|
|
8388
8388
|
actions: [
|
|
8389
8389
|
o.read,
|
|
8390
8390
|
o.create,
|
|
@@ -8394,7 +8394,7 @@ const zs = [
|
|
|
8394
8394
|
},
|
|
8395
8395
|
{
|
|
8396
8396
|
label: "Closing",
|
|
8397
|
-
subject:
|
|
8397
|
+
subject: V.inventory_closing,
|
|
8398
8398
|
actions: [o.read]
|
|
8399
8399
|
}
|
|
8400
8400
|
];
|
|
@@ -8406,109 +8406,109 @@ const zs = [
|
|
|
8406
8406
|
const Al = [
|
|
8407
8407
|
{
|
|
8408
8408
|
label: "Inventory",
|
|
8409
|
-
subject:
|
|
8409
|
+
subject: V.inventory,
|
|
8410
8410
|
actions: [o.read, o.update]
|
|
8411
8411
|
},
|
|
8412
8412
|
{
|
|
8413
8413
|
label: "Order Template",
|
|
8414
|
-
subject:
|
|
8414
|
+
subject: V.inventory_orderTemplate,
|
|
8415
8415
|
actions: [o.read, o.update]
|
|
8416
8416
|
},
|
|
8417
8417
|
{
|
|
8418
8418
|
label: "Wastage Template",
|
|
8419
|
-
subject:
|
|
8419
|
+
subject: V.inventory_wastageTemplate,
|
|
8420
8420
|
actions: [o.read, o.update]
|
|
8421
8421
|
},
|
|
8422
8422
|
{
|
|
8423
8423
|
label: "Closing Template",
|
|
8424
|
-
subject:
|
|
8424
|
+
subject: V.inventory_closingTemplate,
|
|
8425
8425
|
actions: [o.read, o.update]
|
|
8426
8426
|
}
|
|
8427
8427
|
], gl = [
|
|
8428
8428
|
{
|
|
8429
8429
|
label: "Inventory",
|
|
8430
|
-
subject:
|
|
8430
|
+
subject: V.inventory,
|
|
8431
8431
|
actions: [o.read, o.update]
|
|
8432
8432
|
}
|
|
8433
8433
|
], pl = [
|
|
8434
8434
|
{
|
|
8435
8435
|
label: "Inventory",
|
|
8436
|
-
subject:
|
|
8436
|
+
subject: V.inventory,
|
|
8437
8437
|
actions: [o.read, o.update]
|
|
8438
8438
|
}
|
|
8439
8439
|
], hl = [
|
|
8440
8440
|
{
|
|
8441
8441
|
label: "Inventory",
|
|
8442
|
-
subject:
|
|
8442
|
+
subject: V.inventory,
|
|
8443
8443
|
actions: [o.read, o.update]
|
|
8444
8444
|
}
|
|
8445
8445
|
], Ha = [
|
|
8446
8446
|
{
|
|
8447
8447
|
label: "Purchase Order",
|
|
8448
|
-
subject:
|
|
8448
|
+
subject: V.inventory_purchaseOrder,
|
|
8449
8449
|
actions: [o.read, o.create, o.update]
|
|
8450
8450
|
},
|
|
8451
8451
|
{
|
|
8452
8452
|
label: "Inventory",
|
|
8453
|
-
subject:
|
|
8453
|
+
subject: V.inventory,
|
|
8454
8454
|
actions: [o.read, o.create, o.update]
|
|
8455
8455
|
},
|
|
8456
8456
|
{
|
|
8457
8457
|
label: "Closing",
|
|
8458
|
-
subject:
|
|
8458
|
+
subject: V.inventory_closing,
|
|
8459
8459
|
actions: [o.read]
|
|
8460
8460
|
},
|
|
8461
8461
|
{
|
|
8462
8462
|
label: "Order Template",
|
|
8463
|
-
subject:
|
|
8463
|
+
subject: V.inventory_orderTemplate,
|
|
8464
8464
|
actions: [o.read]
|
|
8465
8465
|
},
|
|
8466
8466
|
{
|
|
8467
8467
|
label: "Supplier",
|
|
8468
|
-
subject:
|
|
8468
|
+
subject: V.inventory_supplier,
|
|
8469
8469
|
actions: [o.read]
|
|
8470
8470
|
},
|
|
8471
8471
|
{
|
|
8472
8472
|
label: "Surcharge",
|
|
8473
|
-
subject:
|
|
8473
|
+
subject: V.inventory_surcharge,
|
|
8474
8474
|
actions: [o.read]
|
|
8475
8475
|
},
|
|
8476
8476
|
{
|
|
8477
8477
|
label: "Delivery Order",
|
|
8478
|
-
subject:
|
|
8478
|
+
subject: V.inventory_deliveryOrder,
|
|
8479
8479
|
actions: [o.read, o.create, o.update]
|
|
8480
8480
|
},
|
|
8481
8481
|
{
|
|
8482
8482
|
label: "Shipment",
|
|
8483
|
-
subject:
|
|
8483
|
+
subject: V.inventory_shipment,
|
|
8484
8484
|
actions: [o.read, o.update]
|
|
8485
8485
|
}
|
|
8486
8486
|
], Ia = [
|
|
8487
8487
|
{
|
|
8488
8488
|
label: "Purchase Order",
|
|
8489
|
-
subject:
|
|
8489
|
+
subject: V.inventory_purchaseOrder,
|
|
8490
8490
|
actions: [o.read, o.update]
|
|
8491
8491
|
},
|
|
8492
8492
|
{
|
|
8493
8493
|
label: "Inventory",
|
|
8494
|
-
subject:
|
|
8494
|
+
subject: V.inventory,
|
|
8495
8495
|
actions: [o.read, o.create, o.update]
|
|
8496
8496
|
},
|
|
8497
8497
|
{
|
|
8498
8498
|
label: "Delivery Order",
|
|
8499
|
-
subject:
|
|
8499
|
+
subject: V.inventory_deliveryOrder,
|
|
8500
8500
|
actions: [o.read, o.create, o.update]
|
|
8501
8501
|
},
|
|
8502
8502
|
{
|
|
8503
8503
|
label: "Shipment",
|
|
8504
|
-
subject:
|
|
8504
|
+
subject: V.inventory_shipment,
|
|
8505
8505
|
actions: [o.read, o.update]
|
|
8506
8506
|
}
|
|
8507
8507
|
], Ta = [
|
|
8508
8508
|
...ue,
|
|
8509
8509
|
{
|
|
8510
8510
|
label: "Surcharge",
|
|
8511
|
-
subject:
|
|
8511
|
+
subject: V.inventory_surcharge,
|
|
8512
8512
|
actions: [
|
|
8513
8513
|
o.read,
|
|
8514
8514
|
o.create,
|
|
@@ -8518,14 +8518,14 @@ const Al = [
|
|
|
8518
8518
|
},
|
|
8519
8519
|
{
|
|
8520
8520
|
label: "Supplier",
|
|
8521
|
-
subject:
|
|
8521
|
+
subject: V.inventory_supplier,
|
|
8522
8522
|
actions: [o.read]
|
|
8523
8523
|
}
|
|
8524
8524
|
], qa = [
|
|
8525
8525
|
...ue,
|
|
8526
8526
|
{
|
|
8527
8527
|
label: "Order Template",
|
|
8528
|
-
subject:
|
|
8528
|
+
subject: V.inventory_orderTemplate,
|
|
8529
8529
|
actions: [
|
|
8530
8530
|
o.read,
|
|
8531
8531
|
o.create,
|
|
@@ -8535,19 +8535,19 @@ const Al = [
|
|
|
8535
8535
|
},
|
|
8536
8536
|
{
|
|
8537
8537
|
label: "Supplier",
|
|
8538
|
-
subject:
|
|
8538
|
+
subject: V.inventory_supplier,
|
|
8539
8539
|
actions: [o.read]
|
|
8540
8540
|
},
|
|
8541
8541
|
{
|
|
8542
8542
|
label: "Shipment",
|
|
8543
|
-
subject:
|
|
8543
|
+
subject: V.inventory_shipment,
|
|
8544
8544
|
actions: [o.read, o.update]
|
|
8545
8545
|
}
|
|
8546
8546
|
], fl = [
|
|
8547
8547
|
...ue,
|
|
8548
8548
|
{
|
|
8549
8549
|
label: "Order Draft Approval",
|
|
8550
|
-
subject:
|
|
8550
|
+
subject: V.inventory_orderDraftApproval,
|
|
8551
8551
|
actions: [o.update]
|
|
8552
8552
|
}
|
|
8553
8553
|
];
|
|
@@ -8561,7 +8561,7 @@ const yl = [
|
|
|
8561
8561
|
...ue,
|
|
8562
8562
|
{
|
|
8563
8563
|
label: "Supplier",
|
|
8564
|
-
subject:
|
|
8564
|
+
subject: V.inventory_supplier,
|
|
8565
8565
|
actions: [
|
|
8566
8566
|
o.read,
|
|
8567
8567
|
o.create,
|
|
@@ -8571,14 +8571,14 @@ const yl = [
|
|
|
8571
8571
|
},
|
|
8572
8572
|
{
|
|
8573
8573
|
label: "Order Template",
|
|
8574
|
-
subject:
|
|
8574
|
+
subject: V.inventory_orderTemplate,
|
|
8575
8575
|
actions: [o.read, o.update]
|
|
8576
8576
|
}
|
|
8577
8577
|
], bl = [
|
|
8578
8578
|
...ue,
|
|
8579
8579
|
{
|
|
8580
8580
|
label: "Warehouse",
|
|
8581
|
-
subject:
|
|
8581
|
+
subject: V.inventory_warehouse,
|
|
8582
8582
|
actions: [
|
|
8583
8583
|
o.read,
|
|
8584
8584
|
o.create,
|
|
@@ -8589,21 +8589,21 @@ const yl = [
|
|
|
8589
8589
|
], vl = [
|
|
8590
8590
|
{
|
|
8591
8591
|
label: "Inventory",
|
|
8592
|
-
subject:
|
|
8592
|
+
subject: V.inventory,
|
|
8593
8593
|
actions: [o.read, o.update]
|
|
8594
8594
|
}
|
|
8595
8595
|
], wl = [
|
|
8596
8596
|
...ue,
|
|
8597
8597
|
{
|
|
8598
8598
|
label: "Inventory",
|
|
8599
|
-
subject:
|
|
8599
|
+
subject: V.inventory,
|
|
8600
8600
|
actions: [o.update]
|
|
8601
8601
|
}
|
|
8602
8602
|
], Bl = [
|
|
8603
8603
|
...ue,
|
|
8604
8604
|
{
|
|
8605
8605
|
label: "Integration",
|
|
8606
|
-
subject:
|
|
8606
|
+
subject: V.inventory_integration,
|
|
8607
8607
|
actions: [o.read, o.create, o.update]
|
|
8608
8608
|
}
|
|
8609
8609
|
];
|
|
@@ -8868,7 +8868,7 @@ const dn = [
|
|
|
8868
8868
|
...Cl,
|
|
8869
8869
|
...Ml,
|
|
8870
8870
|
...Dl
|
|
8871
|
-
},
|
|
8871
|
+
}, ou = Object.values(
|
|
8872
8872
|
xl
|
|
8873
8873
|
).flatMap((e) => e.permissions ?? []).reduce(
|
|
8874
8874
|
(e, t) => {
|
|
@@ -8901,7 +8901,7 @@ const dn = [
|
|
|
8901
8901
|
[ne.orderDraft]: d.inventory_orderDraftApproval,
|
|
8902
8902
|
[ne.unitCostHistory]: d.inventory_unitCostHistory
|
|
8903
8903
|
};
|
|
8904
|
-
var
|
|
8904
|
+
var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8905
8905
|
function jl(e) {
|
|
8906
8906
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8907
8907
|
}
|
|
@@ -8909,7 +8909,7 @@ var Qa = { exports: {} };
|
|
|
8909
8909
|
(function(e, t) {
|
|
8910
8910
|
(function(s, n) {
|
|
8911
8911
|
e.exports = n();
|
|
8912
|
-
})(
|
|
8912
|
+
})(xt, function() {
|
|
8913
8913
|
return function(s) {
|
|
8914
8914
|
var n = {};
|
|
8915
8915
|
function a(r) {
|
|
@@ -8925,13 +8925,13 @@ var Qa = { exports: {} };
|
|
|
8925
8925
|
if (1 & l && (r = a(r)), 8 & l || 4 & l && typeof r == "object" && r && r.__esModule) return r;
|
|
8926
8926
|
var c = /* @__PURE__ */ Object.create(null);
|
|
8927
8927
|
if (a.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: r }), 2 & l && typeof r != "string")
|
|
8928
|
-
for (var
|
|
8928
|
+
for (var w in r)
|
|
8929
8929
|
a.d(
|
|
8930
8930
|
c,
|
|
8931
|
-
|
|
8931
|
+
w,
|
|
8932
8932
|
(function(y) {
|
|
8933
8933
|
return r[y];
|
|
8934
|
-
}).bind(null,
|
|
8934
|
+
}).bind(null, w)
|
|
8935
8935
|
);
|
|
8936
8936
|
return c;
|
|
8937
8937
|
}, a.n = function(r) {
|
|
@@ -8963,55 +8963,55 @@ var Qa = { exports: {} };
|
|
|
8963
8963
|
};
|
|
8964
8964
|
}
|
|
8965
8965
|
a.r(n), a.d(n, "default", function() {
|
|
8966
|
-
return
|
|
8966
|
+
return Yt;
|
|
8967
8967
|
}), a.d(n, "compare", function() {
|
|
8968
|
-
return ft;
|
|
8969
|
-
}), a.d(n, "comparable", function() {
|
|
8970
8968
|
return yt;
|
|
8969
|
+
}), a.d(n, "comparable", function() {
|
|
8970
|
+
return bt;
|
|
8971
8971
|
});
|
|
8972
|
-
var c = l("Array"),
|
|
8973
|
-
function
|
|
8972
|
+
var c = l("Array"), w = l("Object"), y = l("Function");
|
|
8973
|
+
function f(A, p) {
|
|
8974
8974
|
return y(A.get) ? A.get(p) : A[p];
|
|
8975
8975
|
}
|
|
8976
|
-
function
|
|
8976
|
+
function O(A) {
|
|
8977
8977
|
return function(p, B) {
|
|
8978
8978
|
if (!c(B) || !B.length) return A(p, B);
|
|
8979
8979
|
for (var D = 0, E = B.length; D < E; D++)
|
|
8980
|
-
if (A(p,
|
|
8980
|
+
if (A(p, f(B, D))) return !0;
|
|
8981
8981
|
return !1;
|
|
8982
8982
|
};
|
|
8983
8983
|
}
|
|
8984
|
-
function
|
|
8984
|
+
function X(A) {
|
|
8985
8985
|
return function(p, B) {
|
|
8986
8986
|
if (!c(B) || !B.length) return A(p, B);
|
|
8987
8987
|
for (var D = 0, E = B.length; D < E; D++)
|
|
8988
|
-
if (!A(p,
|
|
8988
|
+
if (!A(p, f(B, D))) return !1;
|
|
8989
8989
|
return !0;
|
|
8990
8990
|
};
|
|
8991
8991
|
}
|
|
8992
|
-
function
|
|
8992
|
+
function U(A, p, B, D) {
|
|
8993
8993
|
return A.validate(A.options, p, B, D);
|
|
8994
8994
|
}
|
|
8995
8995
|
var se = {
|
|
8996
|
-
$eq:
|
|
8996
|
+
$eq: O(function(A, p) {
|
|
8997
8997
|
return A(p);
|
|
8998
8998
|
}),
|
|
8999
|
-
$ne:
|
|
8999
|
+
$ne: X(function(A, p) {
|
|
9000
9000
|
return A(p);
|
|
9001
9001
|
}),
|
|
9002
|
-
$gt:
|
|
9002
|
+
$gt: O(function(A, p) {
|
|
9003
9003
|
return A(p);
|
|
9004
9004
|
}),
|
|
9005
|
-
$gte:
|
|
9005
|
+
$gte: O(function(A, p) {
|
|
9006
9006
|
return A(p);
|
|
9007
9007
|
}),
|
|
9008
|
-
$lt:
|
|
9008
|
+
$lt: O(function(A, p) {
|
|
9009
9009
|
return A(p);
|
|
9010
9010
|
}),
|
|
9011
|
-
$lte:
|
|
9011
|
+
$lte: O(function(A, p) {
|
|
9012
9012
|
return A(p);
|
|
9013
9013
|
}),
|
|
9014
|
-
$mod:
|
|
9014
|
+
$mod: O(function(A, p) {
|
|
9015
9015
|
return A(p);
|
|
9016
9016
|
}),
|
|
9017
9017
|
$in: function(A, p) {
|
|
@@ -9033,30 +9033,30 @@ var Qa = { exports: {} };
|
|
|
9033
9033
|
return !!p && A === p.length;
|
|
9034
9034
|
},
|
|
9035
9035
|
$or: function(A, p, B, D) {
|
|
9036
|
-
for (var E = 0,
|
|
9037
|
-
if (
|
|
9036
|
+
for (var E = 0, G = A.length; E < G; E++)
|
|
9037
|
+
if (U(f(A, E), p, B, D)) return !0;
|
|
9038
9038
|
return !1;
|
|
9039
9039
|
},
|
|
9040
9040
|
$nor: function(A, p, B, D) {
|
|
9041
9041
|
return !se.$or(A, p, B, D);
|
|
9042
9042
|
},
|
|
9043
9043
|
$and: function(A, p, B, D) {
|
|
9044
|
-
for (var E = 0,
|
|
9045
|
-
if (!
|
|
9044
|
+
for (var E = 0, G = A.length; E < G; E++)
|
|
9045
|
+
if (!U(f(A, E), p, B, D)) return !1;
|
|
9046
9046
|
return !0;
|
|
9047
9047
|
},
|
|
9048
|
-
$regex:
|
|
9048
|
+
$regex: O(function(A, p) {
|
|
9049
9049
|
return typeof p == "string" && A.test(p);
|
|
9050
9050
|
}),
|
|
9051
9051
|
$where: function(A, p, B, D) {
|
|
9052
9052
|
return A.call(p, p, B, D);
|
|
9053
9053
|
},
|
|
9054
9054
|
$elemMatch: function(A, p, B, D) {
|
|
9055
|
-
return c(p) ? !!~function(E,
|
|
9055
|
+
return c(p) ? !!~function(E, G) {
|
|
9056
9056
|
for (var R = 0; R < E.length; R++)
|
|
9057
|
-
if (
|
|
9057
|
+
if (f(E, R), U(G, f(E, R))) return R;
|
|
9058
9058
|
return -1;
|
|
9059
|
-
}(p, A) :
|
|
9059
|
+
}(p, A) : U(A, p, B, D);
|
|
9060
9060
|
},
|
|
9061
9061
|
$exists: function(A, p, B, D) {
|
|
9062
9062
|
return D.hasOwnProperty(B) === A;
|
|
@@ -9064,71 +9064,71 @@ var Qa = { exports: {} };
|
|
|
9064
9064
|
}, oe = {
|
|
9065
9065
|
$eq: function(A, p, B) {
|
|
9066
9066
|
var D = B.comparable, E = B.compare;
|
|
9067
|
-
return A instanceof RegExp ?
|
|
9068
|
-
return typeof
|
|
9069
|
-
}) : A instanceof Function ?
|
|
9070
|
-
return c(
|
|
9071
|
-
}) :
|
|
9072
|
-
A === null ? function(
|
|
9073
|
-
return
|
|
9074
|
-
} : function(
|
|
9075
|
-
return E(D(
|
|
9067
|
+
return A instanceof RegExp ? O(function(G) {
|
|
9068
|
+
return typeof G == "string" && A.test(G);
|
|
9069
|
+
}) : A instanceof Function ? O(A) : c(A) && !A.length ? O(function(G) {
|
|
9070
|
+
return c(G) && !G.length;
|
|
9071
|
+
}) : O(
|
|
9072
|
+
A === null ? function(G) {
|
|
9073
|
+
return G == null;
|
|
9074
|
+
} : function(G) {
|
|
9075
|
+
return E(D(G), D(A)) === 0;
|
|
9076
9076
|
}
|
|
9077
9077
|
);
|
|
9078
9078
|
},
|
|
9079
9079
|
$gt: function(A, p, B) {
|
|
9080
9080
|
var D = B.comparable, E = B.compare;
|
|
9081
|
-
return function(
|
|
9082
|
-
return E(D(
|
|
9081
|
+
return function(G) {
|
|
9082
|
+
return E(D(G), D(A)) > 0;
|
|
9083
9083
|
};
|
|
9084
9084
|
},
|
|
9085
9085
|
$gte: function(A, p, B) {
|
|
9086
9086
|
var D = B.comparable, E = B.compare;
|
|
9087
|
-
return function(
|
|
9088
|
-
return E(D(
|
|
9087
|
+
return function(G) {
|
|
9088
|
+
return E(D(G), D(A)) >= 0;
|
|
9089
9089
|
};
|
|
9090
9090
|
},
|
|
9091
9091
|
$lt: function(A, p, B) {
|
|
9092
9092
|
var D = B.comparable, E = B.compare;
|
|
9093
|
-
return function(
|
|
9094
|
-
return E(D(
|
|
9093
|
+
return function(G) {
|
|
9094
|
+
return E(D(G), D(A)) < 0;
|
|
9095
9095
|
};
|
|
9096
9096
|
},
|
|
9097
9097
|
$lte: function(A, p, B) {
|
|
9098
9098
|
var D = B.comparable, E = B.compare;
|
|
9099
|
-
return function(
|
|
9100
|
-
return E(D(
|
|
9099
|
+
return function(G) {
|
|
9100
|
+
return E(D(G), D(A)) <= 0;
|
|
9101
9101
|
};
|
|
9102
9102
|
},
|
|
9103
9103
|
$in: function(A, p, B) {
|
|
9104
9104
|
var D = B.comparable;
|
|
9105
9105
|
return function(E) {
|
|
9106
9106
|
if (!(E instanceof Array)) {
|
|
9107
|
-
var
|
|
9108
|
-
if (
|
|
9107
|
+
var G = D(E);
|
|
9108
|
+
if (G === E && r(E) === "object") {
|
|
9109
9109
|
for (T = A.length; T--; )
|
|
9110
9110
|
if (String(A[T]) === String(E) && String(E) !== "[object Object]")
|
|
9111
9111
|
return !0;
|
|
9112
9112
|
}
|
|
9113
|
-
if (
|
|
9113
|
+
if (G === void 0) {
|
|
9114
9114
|
for (T = A.length; T--; ) if (A[T] == null) return !0;
|
|
9115
9115
|
}
|
|
9116
9116
|
for (T = A.length; T--; ) {
|
|
9117
|
-
var R =
|
|
9118
|
-
if (R && String(R) !== "[object Object]" && String(
|
|
9117
|
+
var R = U(ft(f(A, T), B), G, T, A);
|
|
9118
|
+
if (R && String(R) !== "[object Object]" && String(G) !== "[object Object]")
|
|
9119
9119
|
return !0;
|
|
9120
9120
|
}
|
|
9121
|
-
return !!~A.indexOf(
|
|
9121
|
+
return !!~A.indexOf(G);
|
|
9122
9122
|
}
|
|
9123
9123
|
for (var T = E.length; T--; )
|
|
9124
|
-
if (~A.indexOf(D(
|
|
9124
|
+
if (~A.indexOf(D(f(E, T)))) return !0;
|
|
9125
9125
|
return !1;
|
|
9126
9126
|
};
|
|
9127
9127
|
},
|
|
9128
9128
|
$nin: function(A, p, B) {
|
|
9129
9129
|
var D = oe.$in(A, p, B);
|
|
9130
|
-
return function(E,
|
|
9131
|
-
return !D(E,
|
|
9130
|
+
return function(E, G, R, T) {
|
|
9131
|
+
return !D(E, G, R, T);
|
|
9132
9132
|
};
|
|
9133
9133
|
},
|
|
9134
9134
|
$mod: function(A) {
|
|
@@ -9138,8 +9138,8 @@ var Qa = { exports: {} };
|
|
|
9138
9138
|
},
|
|
9139
9139
|
$ne: function(A, p, B) {
|
|
9140
9140
|
var D = oe.$eq(A, p, B);
|
|
9141
|
-
return
|
|
9142
|
-
return !D(E,
|
|
9141
|
+
return X(function(E, G, R, T) {
|
|
9142
|
+
return !D(E, G, R, T);
|
|
9143
9143
|
});
|
|
9144
9144
|
},
|
|
9145
9145
|
$and: function(A, p, B) {
|
|
@@ -9156,8 +9156,8 @@ var Qa = { exports: {} };
|
|
|
9156
9156
|
},
|
|
9157
9157
|
$not: function(A, p, B) {
|
|
9158
9158
|
var D = Ce(B)(A);
|
|
9159
|
-
return function(E,
|
|
9160
|
-
return !
|
|
9159
|
+
return function(E, G, R) {
|
|
9160
|
+
return !U(D, E, G, R);
|
|
9161
9161
|
};
|
|
9162
9162
|
},
|
|
9163
9163
|
$type: function(A) {
|
|
@@ -9185,20 +9185,20 @@ var Qa = { exports: {} };
|
|
|
9185
9185
|
return { options: A, validate: p };
|
|
9186
9186
|
}
|
|
9187
9187
|
function ie(A, p) {
|
|
9188
|
-
var B = A.keyPath, D = A.child, E = A.query,
|
|
9189
|
-
if (function i(g, m, b, C,
|
|
9188
|
+
var B = A.keyPath, D = A.child, E = A.query, G = [];
|
|
9189
|
+
if (function i(g, m, b, C, Y) {
|
|
9190
9190
|
if (b === m.length || g == null)
|
|
9191
|
-
return void
|
|
9192
|
-
var F =
|
|
9191
|
+
return void Y.push([g, m[b - 1], C]);
|
|
9192
|
+
var F = f(m, b);
|
|
9193
9193
|
if (c(g) && isNaN(Number(F)))
|
|
9194
|
-
for (var
|
|
9195
|
-
else i(
|
|
9196
|
-
}(p, B, 0, p,
|
|
9197
|
-
var R =
|
|
9198
|
-
return
|
|
9194
|
+
for (var Q = 0, j = g.length; Q < j; Q++) i(f(g, Q), m, b, g, Y);
|
|
9195
|
+
else i(f(g, F), m, b + 1, g, Y);
|
|
9196
|
+
}(p, B, 0, p, G), G.length === 1) {
|
|
9197
|
+
var R = G[0];
|
|
9198
|
+
return U(D, R[0], R[1], R[2]);
|
|
9199
9199
|
}
|
|
9200
|
-
for (var T = E && E.$ne !== void 0, te = T, ae = 0; ae <
|
|
9201
|
-
var
|
|
9200
|
+
for (var T = E && E.$ne !== void 0, te = T, ae = 0; ae < G.length; ae++) {
|
|
9201
|
+
var h = G[ae], u = U(D, h[0], h[1], h[2]);
|
|
9202
9202
|
T ? te &= u : te |= u;
|
|
9203
9203
|
}
|
|
9204
9204
|
return te;
|
|
@@ -9216,21 +9216,21 @@ var Qa = { exports: {} };
|
|
|
9216
9216
|
for (var te in R) {
|
|
9217
9217
|
var ae = R[te];
|
|
9218
9218
|
if (te !== "$options") {
|
|
9219
|
-
var
|
|
9220
|
-
if (
|
|
9219
|
+
var h = se[te] || A && B && B[te];
|
|
9220
|
+
if (h) oe[te] && (ae = oe[te](ae, R, A)), T.push(fe(p(ae), h));
|
|
9221
9221
|
else {
|
|
9222
9222
|
if (te.charCodeAt(0) === 36)
|
|
9223
9223
|
throw new Error("Unknown operation " + te);
|
|
9224
9224
|
var u = te.split(".");
|
|
9225
|
-
T.push(ss(u,
|
|
9225
|
+
T.push(ss(u, G(ae), ae));
|
|
9226
9226
|
}
|
|
9227
9227
|
}
|
|
9228
9228
|
}
|
|
9229
9229
|
return T.length === 1 ? T[0] : fe(T, se.$and);
|
|
9230
|
-
},
|
|
9230
|
+
}, G = function(R) {
|
|
9231
9231
|
return R = D(R), function T(te, ae) {
|
|
9232
|
-
if (!
|
|
9233
|
-
for (var
|
|
9232
|
+
if (!w(te)) return ae;
|
|
9233
|
+
for (var h in te) ae.push(h), T(te[h], ae);
|
|
9234
9234
|
return ae;
|
|
9235
9235
|
}(R, []).join(",").search(/[$.]/) === -1 ? fe(R, Le) : E(R);
|
|
9236
9236
|
};
|
|
@@ -9241,7 +9241,7 @@ var Qa = { exports: {} };
|
|
|
9241
9241
|
function Le(A, p) {
|
|
9242
9242
|
if (Object.prototype.toString.call(A) !== Object.prototype.toString.call(p))
|
|
9243
9243
|
return !1;
|
|
9244
|
-
if (
|
|
9244
|
+
if (w(A)) {
|
|
9245
9245
|
if (Object.keys(A).length !== Object.keys(p).length) return !1;
|
|
9246
9246
|
for (var B in A) if (!Le(A[B], p[B])) return !1;
|
|
9247
9247
|
return !0;
|
|
@@ -9254,30 +9254,30 @@ var Qa = { exports: {} };
|
|
|
9254
9254
|
}
|
|
9255
9255
|
return A === p;
|
|
9256
9256
|
}
|
|
9257
|
-
function
|
|
9257
|
+
function ft(A, p) {
|
|
9258
9258
|
var B = Ce(p)(A);
|
|
9259
9259
|
return p && p.select && (B = {
|
|
9260
9260
|
options: B,
|
|
9261
|
-
validate: function(D, E,
|
|
9262
|
-
return
|
|
9261
|
+
validate: function(D, E, G, R) {
|
|
9262
|
+
return U(D, E && p.select(E), G, R);
|
|
9263
9263
|
}
|
|
9264
9264
|
}), B;
|
|
9265
9265
|
}
|
|
9266
|
-
function
|
|
9267
|
-
var B =
|
|
9268
|
-
return function(D, E,
|
|
9269
|
-
return
|
|
9266
|
+
function Yt(A, p) {
|
|
9267
|
+
var B = ft(A, p = Object.assign({ compare: yt, comparable: bt }, p));
|
|
9268
|
+
return function(D, E, G) {
|
|
9269
|
+
return U(B, D, E, G);
|
|
9270
9270
|
};
|
|
9271
9271
|
}
|
|
9272
|
-
function
|
|
9272
|
+
function yt(A, p) {
|
|
9273
9273
|
if (Le(A, p)) return 0;
|
|
9274
9274
|
if (r(A) === r(p)) {
|
|
9275
9275
|
if (A > p) return 1;
|
|
9276
9276
|
if (A < p) return -1;
|
|
9277
9277
|
}
|
|
9278
9278
|
}
|
|
9279
|
-
function
|
|
9280
|
-
return A instanceof Date ? A.getTime() : c(A) ? A.map(
|
|
9279
|
+
function bt(A) {
|
|
9280
|
+
return A instanceof Date ? A.getTime() : c(A) ? A.map(bt) : A && typeof A.toJSON == "function" ? A.toJSON() : A;
|
|
9281
9281
|
}
|
|
9282
9282
|
}
|
|
9283
9283
|
]);
|
|
@@ -9317,13 +9317,13 @@ function Vl() {
|
|
|
9317
9317
|
return !1;
|
|
9318
9318
|
}
|
|
9319
9319
|
}
|
|
9320
|
-
function
|
|
9321
|
-
return Vl() ?
|
|
9320
|
+
function Rt(e, t, s) {
|
|
9321
|
+
return Vl() ? Rt = Reflect.construct : Rt = function(a, r, l) {
|
|
9322
9322
|
var c = [null];
|
|
9323
9323
|
c.push.apply(c, r);
|
|
9324
|
-
var
|
|
9324
|
+
var w = Function.bind.apply(a, c), y = new w();
|
|
9325
9325
|
return l && _t(y, l.prototype), y;
|
|
9326
|
-
},
|
|
9326
|
+
}, Rt.apply(null, arguments);
|
|
9327
9327
|
}
|
|
9328
9328
|
function Fl(e) {
|
|
9329
9329
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
@@ -9339,7 +9339,7 @@ function Fs(e) {
|
|
|
9339
9339
|
t.set(n, a);
|
|
9340
9340
|
}
|
|
9341
9341
|
function a() {
|
|
9342
|
-
return
|
|
9342
|
+
return Rt(n, arguments, Vs(this).constructor);
|
|
9343
9343
|
}
|
|
9344
9344
|
return a.prototype = Object.create(n.prototype, {
|
|
9345
9345
|
constructor: {
|
|
@@ -9358,9 +9358,9 @@ function mn(e) {
|
|
|
9358
9358
|
}
|
|
9359
9359
|
var Za = function(t) {
|
|
9360
9360
|
return 'Cannot execute "' + t.action + '" on "' + t.subjectName + '"';
|
|
9361
|
-
},
|
|
9361
|
+
}, Ft = Za, Sl = /* @__PURE__ */ function(e) {
|
|
9362
9362
|
Yl(t, e), t.setDefaultMessage = function(a) {
|
|
9363
|
-
a === null ?
|
|
9363
|
+
a === null ? Ft = Za : Ft = typeof a == "string" ? function() {
|
|
9364
9364
|
return a;
|
|
9365
9365
|
} : a;
|
|
9366
9366
|
}, t.from = function(a) {
|
|
@@ -9371,7 +9371,7 @@ var Za = function(t) {
|
|
|
9371
9371
|
};
|
|
9372
9372
|
function t(n, a) {
|
|
9373
9373
|
var r;
|
|
9374
|
-
return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n ||
|
|
9374
|
+
return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n || Ft(mn(r)), r._customMessage = null, typeof Error.captureStackTrace == "function" && (r.name = r.constructor.name, Error.captureStackTrace(mn(r), r.constructor)), r;
|
|
9375
9375
|
}
|
|
9376
9376
|
var s = t.prototype;
|
|
9377
9377
|
return s.setMessage = function(a) {
|
|
@@ -9387,8 +9387,8 @@ var Za = function(t) {
|
|
|
9387
9387
|
field: l,
|
|
9388
9388
|
subjectName: this.ability.subjectName(r)
|
|
9389
9389
|
});
|
|
9390
|
-
var
|
|
9391
|
-
throw this.message = this._customMessage ||
|
|
9390
|
+
var w = c ? c.reason : "";
|
|
9391
|
+
throw this.message = this._customMessage || w || Ft(this), this;
|
|
9392
9392
|
}
|
|
9393
9393
|
}, s._setMetadata = function(a) {
|
|
9394
9394
|
this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field;
|
|
@@ -9476,15 +9476,15 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9476
9476
|
var r = this.buildIndexFor(n);
|
|
9477
9477
|
return this[he].indexedRules = r.rules, this[he].hasPerFieldRules = r.hasPerFieldRules, this.emit("updated", a), this;
|
|
9478
9478
|
}, t.buildIndexFor = function(n) {
|
|
9479
|
-
for (var a = /* @__PURE__ */ Object.create(null), r = this[he].RuleType, l = !0, c = !1,
|
|
9480
|
-
var y = new r(n[
|
|
9479
|
+
for (var a = /* @__PURE__ */ Object.create(null), r = this[he].RuleType, l = !0, c = !1, w = 0; w < n.length; w++) {
|
|
9480
|
+
var y = new r(n[w]), f = this.expandActions(y.actions), O = Ss(y.subject), X = n.length - w - 1;
|
|
9481
9481
|
l = !!(l && y.inverted), !c && y.fields && (c = !0);
|
|
9482
|
-
for (var
|
|
9483
|
-
var se =
|
|
9482
|
+
for (var U = 0; U < O.length; U++) {
|
|
9483
|
+
var se = O[U];
|
|
9484
9484
|
a[se] = a[se] || /* @__PURE__ */ Object.create(null);
|
|
9485
|
-
for (var oe = 0; oe <
|
|
9486
|
-
var fe =
|
|
9487
|
-
a[se][fe] = a[se][fe] || /* @__PURE__ */ Object.create(null), a[se][fe][
|
|
9485
|
+
for (var oe = 0; oe < f.length; oe++) {
|
|
9486
|
+
var fe = f[oe];
|
|
9487
|
+
a[se][fe] = a[se][fe] || /* @__PURE__ */ Object.create(null), a[se][fe][X] = y;
|
|
9488
9488
|
}
|
|
9489
9489
|
}
|
|
9490
9490
|
}
|
|
@@ -9513,8 +9513,8 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9513
9513
|
var r = this.subjectName(a), l = this[he].mergedRules, c = r + "_" + n;
|
|
9514
9514
|
return l[c] || (l[c] = this.mergeRulesFor(n, r)), l[c];
|
|
9515
9515
|
}, t.mergeRulesFor = function(n, a) {
|
|
9516
|
-
var r = this[he].indexedRules, l = [a, "all"].reduce(function(c,
|
|
9517
|
-
var y = r[
|
|
9516
|
+
var r = this[he].indexedRules, l = [a, "all"].reduce(function(c, w) {
|
|
9517
|
+
var y = r[w];
|
|
9518
9518
|
return y ? Object.assign(c, y[n], y.manage) : c;
|
|
9519
9519
|
}, []);
|
|
9520
9520
|
return l.filter(Boolean);
|
|
@@ -9554,7 +9554,7 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9554
9554
|
function zl(e) {
|
|
9555
9555
|
return Xa[e] ?? e;
|
|
9556
9556
|
}
|
|
9557
|
-
function
|
|
9557
|
+
function iu(e) {
|
|
9558
9558
|
const t = Object.entries(Xa).find(([, s]) => s === e);
|
|
9559
9559
|
return t ? t[0] : e;
|
|
9560
9560
|
}
|
|
@@ -9598,13 +9598,13 @@ function Kl(e, t) {
|
|
|
9598
9598
|
const n = Ua(t), a = za(n, e) ? e.coverSubject : void 0, r = [e.subject, a].filter(
|
|
9599
9599
|
(l) => l !== void 0
|
|
9600
9600
|
).flatMap((l) => {
|
|
9601
|
-
const c = co(l).filter((
|
|
9601
|
+
const c = co(l).filter((w) => {
|
|
9602
9602
|
var y;
|
|
9603
|
-
return ((y =
|
|
9604
|
-
}).flatMap((
|
|
9605
|
-
return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((
|
|
9603
|
+
return ((y = w.appliesToActions) == null ? void 0 : y.call(w, [e.action])) ?? !0;
|
|
9604
|
+
}).flatMap((w) => w.ownedFields);
|
|
9605
|
+
return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((w) => !w.inverted).map((w) => ({ rule: w, ownedFields: c }));
|
|
9606
9606
|
});
|
|
9607
|
-
return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((
|
|
9607
|
+
return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((w) => c.includes(w))) ? { ...s, conditionEvaluation: "not_enforced" } : {
|
|
9608
9608
|
granted: !1,
|
|
9609
9609
|
decisivePermission: e,
|
|
9610
9610
|
decisiveRule: null,
|
|
@@ -9628,30 +9628,30 @@ function $l(e, t, s) {
|
|
|
9628
9628
|
evaluating: r = void 0,
|
|
9629
9629
|
shallow: l = !0,
|
|
9630
9630
|
onError: c = _l
|
|
9631
|
-
} = n,
|
|
9632
|
-
let
|
|
9633
|
-
return hn(async (
|
|
9634
|
-
if (!
|
|
9631
|
+
} = n, w = Ue(!a), y = l ? _a(t) : Ue(t);
|
|
9632
|
+
let f = 0;
|
|
9633
|
+
return hn(async (O) => {
|
|
9634
|
+
if (!w.value)
|
|
9635
9635
|
return;
|
|
9636
|
-
|
|
9637
|
-
const
|
|
9638
|
-
let
|
|
9636
|
+
f++;
|
|
9637
|
+
const X = f;
|
|
9638
|
+
let U = !1;
|
|
9639
9639
|
r && Promise.resolve().then(() => {
|
|
9640
9640
|
r.value = !0;
|
|
9641
9641
|
});
|
|
9642
9642
|
try {
|
|
9643
9643
|
const se = await e((oe) => {
|
|
9644
|
-
|
|
9645
|
-
r && (r.value = !1),
|
|
9644
|
+
O(() => {
|
|
9645
|
+
r && (r.value = !1), U || oe();
|
|
9646
9646
|
});
|
|
9647
9647
|
});
|
|
9648
|
-
|
|
9648
|
+
X === f && (y.value = se);
|
|
9649
9649
|
} catch (se) {
|
|
9650
9650
|
c(se);
|
|
9651
9651
|
} finally {
|
|
9652
|
-
r &&
|
|
9652
|
+
r && X === f && (r.value = !1), U = !0;
|
|
9653
9653
|
}
|
|
9654
|
-
}), a ? Is(() => (
|
|
9654
|
+
}), a ? Is(() => (w.value = !0, y.value)) : y;
|
|
9655
9655
|
}
|
|
9656
9656
|
async function ec(e) {
|
|
9657
9657
|
const { sessionUser: t, validationManifest: s } = e, { requiredRoles: n, requiredCaslPermissions: a, customValidationFunction: r } = s;
|
|
@@ -9773,7 +9773,7 @@ function ot(e) {
|
|
|
9773
9773
|
return {
|
|
9774
9774
|
inheritAttrs: !1,
|
|
9775
9775
|
setup(t, { attrs: s }) {
|
|
9776
|
-
return () =>
|
|
9776
|
+
return () => At(bc, {}, { default: () => At(e, s) });
|
|
9777
9777
|
}
|
|
9778
9778
|
};
|
|
9779
9779
|
}
|
|
@@ -9849,7 +9849,7 @@ function Ws(e) {
|
|
|
9849
9849
|
return {
|
|
9850
9850
|
inheritAttrs: !1,
|
|
9851
9851
|
setup(t, { attrs: s }) {
|
|
9852
|
-
return () =>
|
|
9852
|
+
return () => At(xc, {}, { default: () => At(e, s) });
|
|
9853
9853
|
}
|
|
9854
9854
|
};
|
|
9855
9855
|
}
|
|
@@ -9863,17 +9863,17 @@ const _e = (e) => ({
|
|
|
9863
9863
|
}
|
|
9864
9864
|
]
|
|
9865
9865
|
}
|
|
9866
|
-
}), jc = ot(pe(() => import("./Main-
|
|
9867
|
-
pe(() => import("./AuditLogList-
|
|
9868
|
-
), Oc = ot(pe(() => import("./Main-
|
|
9869
|
-
() => import("./PermissionSetList-
|
|
9866
|
+
}), jc = ot(pe(() => import("./Main-BQNkTyET.js"))), Ec = ot(pe(() => import("./Main-0TfvGJ4N.js"))), Pc = ot(
|
|
9867
|
+
pe(() => import("./AuditLogList-zW_N_ECT.js"))
|
|
9868
|
+
), Oc = ot(pe(() => import("./Main-CuUG6svQ.js"))), Gc = pe(() => import("./ApprovalCodeList-C9dauQ81.js")), Yc = pe(() => import("./GrantUserList-Dj55GA7O.js")), Vc = pe(() => import("./EmployeeList-8jkHTd7q.js")), Fc = pe(() => import("./RoleList-DLDcyVWT.js")), Sc = pe(() => import("./TimesheetList-Q4FeNgOT.js")), kc = pe(() => import("./TeamMemberList-CyUX8Afk.js")), Rc = pe(
|
|
9869
|
+
() => import("./PermissionSetList-BsLi-TOK.js")
|
|
9870
9870
|
), Hc = Ws(
|
|
9871
|
-
ot(pe(() => import("./SchedulePage-
|
|
9871
|
+
ot(pe(() => import("./SchedulePage-DPU4taJt.js")))
|
|
9872
9872
|
), Ic = Ws(
|
|
9873
|
-
ot(pe(() => import("./SchedulePositionPage-
|
|
9873
|
+
ot(pe(() => import("./SchedulePositionPage-Byt6nmUj.js")))
|
|
9874
9874
|
), Tc = Ws(
|
|
9875
|
-
ot(pe(() => import("./ScheduleGeneralPage-
|
|
9876
|
-
),
|
|
9875
|
+
ot(pe(() => import("./ScheduleGeneralPage-BhYI6O9g.js")))
|
|
9876
|
+
), lu = [
|
|
9877
9877
|
{
|
|
9878
9878
|
path: "/",
|
|
9879
9879
|
name: "home",
|
|
@@ -9986,179 +9986,188 @@ const _e = (e) => ({
|
|
|
9986
9986
|
__name: "Navigator",
|
|
9987
9987
|
emits: ["close-navigation"],
|
|
9988
9988
|
setup(e, { emit: t }) {
|
|
9989
|
-
const s = t, { t: n } = vn(), a = lr();
|
|
9990
|
-
async function
|
|
9991
|
-
await a.push({ name:
|
|
9989
|
+
const s = t, { t: n } = vn(), a = lr(), r = () => At("span", { class: "sch-badge page-tag-premium page-tag-premium-nav", "data-color": "brand" }, "Premium"), l = () => At("span", { class: "sch-badge page-tag-premium page-tag-premium-nav page-tag-premium-section", "data-color": "brand" }, "Premium");
|
|
9990
|
+
async function c(f) {
|
|
9991
|
+
await a.push({ name: f, query: a.currentRoute.value.query }), await fn(), s("close-navigation");
|
|
9992
9992
|
}
|
|
9993
|
-
const
|
|
9994
|
-
const
|
|
9995
|
-
return
|
|
9993
|
+
const w = Is(() => {
|
|
9994
|
+
const f = [];
|
|
9995
|
+
return f.push({
|
|
9996
9996
|
label: n("hr.employee.title"),
|
|
9997
9997
|
value: "employee",
|
|
9998
9998
|
action: () => {
|
|
9999
|
-
|
|
9999
|
+
c($.EMPLOYEE);
|
|
10000
10000
|
}
|
|
10001
|
-
}),
|
|
10001
|
+
}), f.push({
|
|
10002
10002
|
label: n("team.title"),
|
|
10003
10003
|
value: "team-member",
|
|
10004
10004
|
action: () => {
|
|
10005
|
-
|
|
10005
|
+
c($.TEAM);
|
|
10006
10006
|
}
|
|
10007
|
-
}),
|
|
10007
|
+
}), f.push({
|
|
10008
10008
|
label: n("auditLog.title"),
|
|
10009
10009
|
value: "audit-log",
|
|
10010
10010
|
action: () => {
|
|
10011
|
-
|
|
10011
|
+
c($.AUDIT_LOG);
|
|
10012
10012
|
}
|
|
10013
|
-
}),
|
|
10013
|
+
}), f.push({
|
|
10014
10014
|
label: n("posAccess.title"),
|
|
10015
10015
|
value: "pos-access",
|
|
10016
10016
|
action: () => {
|
|
10017
|
-
|
|
10017
|
+
c($.APPROVAL_CODE);
|
|
10018
10018
|
}
|
|
10019
|
-
}),
|
|
10019
|
+
}), f.push({
|
|
10020
10020
|
label: n("scheduling.nav.section"),
|
|
10021
10021
|
value: "schedule-group",
|
|
10022
|
+
badge: l,
|
|
10022
10023
|
children: [
|
|
10023
10024
|
{
|
|
10024
10025
|
label: n("scheduling.nav.board"),
|
|
10025
10026
|
value: "schedule",
|
|
10027
|
+
badge: r,
|
|
10026
10028
|
action: () => {
|
|
10027
|
-
|
|
10029
|
+
c($.SCHEDULE);
|
|
10028
10030
|
}
|
|
10029
10031
|
},
|
|
10030
10032
|
{
|
|
10031
10033
|
label: n("scheduling.nav.general"),
|
|
10032
10034
|
value: "schedule-general",
|
|
10035
|
+
badge: r,
|
|
10033
10036
|
action: () => {
|
|
10034
|
-
|
|
10037
|
+
c($.SCHEDULE_GENERAL);
|
|
10035
10038
|
}
|
|
10036
10039
|
},
|
|
10037
10040
|
{
|
|
10038
10041
|
label: n("scheduling.nav.position"),
|
|
10039
10042
|
value: "schedule-position",
|
|
10043
|
+
badge: r,
|
|
10040
10044
|
action: () => {
|
|
10041
|
-
|
|
10045
|
+
c($.SCHEDULE_POSITION);
|
|
10042
10046
|
}
|
|
10043
10047
|
}
|
|
10044
10048
|
]
|
|
10045
|
-
}),
|
|
10046
|
-
}),
|
|
10049
|
+
}), f;
|
|
10050
|
+
}), y = Ue();
|
|
10047
10051
|
return hn(() => {
|
|
10048
|
-
var
|
|
10049
|
-
let
|
|
10050
|
-
switch (
|
|
10052
|
+
var O;
|
|
10053
|
+
let f = (O = a.currentRoute.value) == null ? void 0 : O.name;
|
|
10054
|
+
switch (f) {
|
|
10051
10055
|
case $.EMPLOYEE:
|
|
10052
10056
|
case $.ROLE:
|
|
10053
10057
|
case $.TIMESHEET:
|
|
10054
|
-
|
|
10058
|
+
f = $.EMPLOYEE;
|
|
10055
10059
|
break;
|
|
10056
10060
|
case $.TEAM_MEMBER:
|
|
10057
10061
|
case $.TEAM_ROLE:
|
|
10058
|
-
|
|
10062
|
+
f = $.TEAM_MEMBER;
|
|
10059
10063
|
break;
|
|
10060
10064
|
case $.SCHEDULE:
|
|
10061
|
-
|
|
10065
|
+
f = "schedule";
|
|
10062
10066
|
break;
|
|
10063
10067
|
case $.SCHEDULE_POSITION:
|
|
10064
|
-
|
|
10068
|
+
f = "schedule-position";
|
|
10065
10069
|
break;
|
|
10066
10070
|
case $.SCHEDULE_GENERAL:
|
|
10067
|
-
|
|
10071
|
+
f = "schedule-general";
|
|
10068
10072
|
break;
|
|
10069
10073
|
case $.AUDIT_LOG:
|
|
10070
|
-
|
|
10074
|
+
f = $.AUDIT_LOG;
|
|
10071
10075
|
break;
|
|
10072
10076
|
case $.APPROVAL_CODE:
|
|
10073
10077
|
case $.POS_GRANT:
|
|
10074
10078
|
case $.POS_ACCESS:
|
|
10075
|
-
|
|
10079
|
+
f = "pos-access";
|
|
10076
10080
|
break;
|
|
10077
10081
|
default:
|
|
10078
|
-
|
|
10082
|
+
f = $.EMPLOYEE;
|
|
10079
10083
|
}
|
|
10080
|
-
|
|
10081
|
-
}), (
|
|
10082
|
-
const
|
|
10083
|
-
return rt(), $t(
|
|
10084
|
-
modelValue:
|
|
10085
|
-
"onUpdate:modelValue":
|
|
10086
|
-
items:
|
|
10084
|
+
y.value !== f && (y.value = f);
|
|
10085
|
+
}), (f, O) => {
|
|
10086
|
+
const X = Ns("FmCollapsibleTabs");
|
|
10087
|
+
return rt(), $t(X, {
|
|
10088
|
+
modelValue: y.value,
|
|
10089
|
+
"onUpdate:modelValue": O[0] || (O[0] = (U) => y.value = U),
|
|
10090
|
+
items: w.value,
|
|
10087
10091
|
class: "py-16"
|
|
10088
10092
|
}, null, 8, ["modelValue", "items"]);
|
|
10089
10093
|
};
|
|
10090
10094
|
}
|
|
10091
|
-
})
|
|
10095
|
+
}), Nc = (e, t) => {
|
|
10096
|
+
const s = e.__vccOpts || e;
|
|
10097
|
+
for (const [n, a] of t)
|
|
10098
|
+
s[n] = a;
|
|
10099
|
+
return s;
|
|
10100
|
+
}, Xc = /* @__PURE__ */ Nc(qc, [["__scopeId", "data-v-94921122"]]);
|
|
10092
10101
|
var Hs = { exports: {} };
|
|
10093
10102
|
(function(e, t) {
|
|
10094
10103
|
(function(s, n) {
|
|
10095
10104
|
n(t);
|
|
10096
|
-
})(
|
|
10097
|
-
var n = { getItemSync: function(
|
|
10105
|
+
})(xt, function(s) {
|
|
10106
|
+
var n = { getItemSync: function(h) {
|
|
10098
10107
|
try {
|
|
10099
|
-
return localStorage.getItem(
|
|
10108
|
+
return localStorage.getItem(h) || null;
|
|
10100
10109
|
} catch {
|
|
10101
10110
|
return null;
|
|
10102
10111
|
}
|
|
10103
|
-
}, getItem: function(
|
|
10112
|
+
}, getItem: function(h, u) {
|
|
10104
10113
|
var i = this;
|
|
10105
10114
|
return new Promise(function(g, m) {
|
|
10106
10115
|
try {
|
|
10107
|
-
var b = i.getItemSync(
|
|
10116
|
+
var b = i.getItemSync(h);
|
|
10108
10117
|
u == null || u(null, b), g(b);
|
|
10109
10118
|
} catch (C) {
|
|
10110
10119
|
u && u(C, null), m(C);
|
|
10111
10120
|
}
|
|
10112
10121
|
});
|
|
10113
|
-
}, setItem: function(
|
|
10122
|
+
}, setItem: function(h, u, i) {
|
|
10114
10123
|
return new Promise(function(g, m) {
|
|
10115
10124
|
try {
|
|
10116
|
-
localStorage.setItem(
|
|
10125
|
+
localStorage.setItem(h, u), i && i(null, u), g(u);
|
|
10117
10126
|
} catch (b) {
|
|
10118
10127
|
i && i(b, null), m(b);
|
|
10119
10128
|
}
|
|
10120
10129
|
});
|
|
10121
10130
|
} }, a = function() {
|
|
10122
|
-
return a = Object.assign || function(
|
|
10123
|
-
for (var u, i = 1, g = arguments.length; i < g; i++) for (var m in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, m) && (
|
|
10124
|
-
return
|
|
10131
|
+
return a = Object.assign || function(h) {
|
|
10132
|
+
for (var u, i = 1, g = arguments.length; i < g; i++) for (var m in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, m) && (h[m] = u[m]);
|
|
10133
|
+
return h;
|
|
10125
10134
|
}, a.apply(this, arguments);
|
|
10126
10135
|
};
|
|
10127
|
-
function r(
|
|
10136
|
+
function r(h, u, i, g) {
|
|
10128
10137
|
return new (i || (i = Promise))(function(m, b) {
|
|
10129
|
-
function C(
|
|
10138
|
+
function C(Q) {
|
|
10130
10139
|
try {
|
|
10131
|
-
F(g.next(
|
|
10140
|
+
F(g.next(Q));
|
|
10132
10141
|
} catch (j) {
|
|
10133
10142
|
b(j);
|
|
10134
10143
|
}
|
|
10135
10144
|
}
|
|
10136
|
-
function
|
|
10145
|
+
function Y(Q) {
|
|
10137
10146
|
try {
|
|
10138
|
-
F(g.throw(
|
|
10147
|
+
F(g.throw(Q));
|
|
10139
10148
|
} catch (j) {
|
|
10140
10149
|
b(j);
|
|
10141
10150
|
}
|
|
10142
10151
|
}
|
|
10143
|
-
function F(
|
|
10152
|
+
function F(Q) {
|
|
10144
10153
|
var j;
|
|
10145
|
-
|
|
10154
|
+
Q.done ? m(Q.value) : (j = Q.value, j instanceof i ? j : new i(function(L) {
|
|
10146
10155
|
L(j);
|
|
10147
|
-
})).then(C,
|
|
10156
|
+
})).then(C, Y);
|
|
10148
10157
|
}
|
|
10149
|
-
F((g = g.apply(
|
|
10158
|
+
F((g = g.apply(h, [])).next());
|
|
10150
10159
|
});
|
|
10151
10160
|
}
|
|
10152
|
-
function l(
|
|
10161
|
+
function l(h, u) {
|
|
10153
10162
|
var i, g, m, b, C = { label: 0, sent: function() {
|
|
10154
10163
|
if (1 & m[0]) throw m[1];
|
|
10155
10164
|
return m[1];
|
|
10156
10165
|
}, trys: [], ops: [] };
|
|
10157
|
-
return b = { next:
|
|
10166
|
+
return b = { next: Y(0), throw: Y(1), return: Y(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
|
|
10158
10167
|
return this;
|
|
10159
10168
|
}), b;
|
|
10160
|
-
function
|
|
10161
|
-
return function(
|
|
10169
|
+
function Y(F) {
|
|
10170
|
+
return function(Q) {
|
|
10162
10171
|
return function(j) {
|
|
10163
10172
|
if (i) throw new TypeError("Generator is already executing.");
|
|
10164
10173
|
for (; C; ) try {
|
|
@@ -10196,7 +10205,7 @@ var Hs = { exports: {} };
|
|
|
10196
10205
|
m[2] && C.ops.pop(), C.trys.pop();
|
|
10197
10206
|
continue;
|
|
10198
10207
|
}
|
|
10199
|
-
j = u.call(
|
|
10208
|
+
j = u.call(h, C);
|
|
10200
10209
|
} catch (L) {
|
|
10201
10210
|
j = [6, L], g = 0;
|
|
10202
10211
|
} finally {
|
|
@@ -10204,22 +10213,22 @@ var Hs = { exports: {} };
|
|
|
10204
10213
|
}
|
|
10205
10214
|
if (5 & j[0]) throw j[1];
|
|
10206
10215
|
return { value: j[0] ? j[1] : void 0, done: !0 };
|
|
10207
|
-
}([F,
|
|
10216
|
+
}([F, Q]);
|
|
10208
10217
|
};
|
|
10209
10218
|
}
|
|
10210
10219
|
}
|
|
10211
|
-
function c(
|
|
10220
|
+
function c(h, u, i) {
|
|
10212
10221
|
for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
|
|
10213
|
-
return
|
|
10222
|
+
return h.concat(g || Array.prototype.slice.call(u));
|
|
10214
10223
|
}
|
|
10215
|
-
var
|
|
10224
|
+
var w = function h(u, i) {
|
|
10216
10225
|
if (u === i) return !0;
|
|
10217
10226
|
if (u && i && typeof u == "object" && typeof i == "object") {
|
|
10218
10227
|
if (u.constructor !== i.constructor) return !1;
|
|
10219
10228
|
var g, m, b;
|
|
10220
10229
|
if (Array.isArray(u)) {
|
|
10221
10230
|
if ((g = u.length) != i.length) return !1;
|
|
10222
|
-
for (m = g; m-- != 0; ) if (!
|
|
10231
|
+
for (m = g; m-- != 0; ) if (!h(u[m], i[m])) return !1;
|
|
10223
10232
|
return !0;
|
|
10224
10233
|
}
|
|
10225
10234
|
if (u.constructor === RegExp) return u.source === i.source && u.flags === i.flags;
|
|
@@ -10229,49 +10238,49 @@ var Hs = { exports: {} };
|
|
|
10229
10238
|
for (m = g; m-- != 0; ) if (!Object.prototype.hasOwnProperty.call(i, b[m])) return !1;
|
|
10230
10239
|
for (m = g; m-- != 0; ) {
|
|
10231
10240
|
var C = b[m];
|
|
10232
|
-
if (!
|
|
10241
|
+
if (!h(u[C], i[C])) return !1;
|
|
10233
10242
|
}
|
|
10234
10243
|
return !0;
|
|
10235
10244
|
}
|
|
10236
10245
|
return u != u && i != i;
|
|
10237
10246
|
};
|
|
10238
|
-
function y(
|
|
10247
|
+
function y(h, u) {
|
|
10239
10248
|
var i = Object.keys(u || {}).filter(function(g) {
|
|
10240
|
-
var m =
|
|
10241
|
-
return !
|
|
10249
|
+
var m = h == null ? void 0 : h[g], b = u == null ? void 0 : u[g];
|
|
10250
|
+
return !w(m, b);
|
|
10242
10251
|
});
|
|
10243
|
-
return Object.keys(
|
|
10252
|
+
return Object.keys(h || {}).filter(function(g) {
|
|
10244
10253
|
Object.keys(u || {}).includes(g) || i.push(g);
|
|
10245
10254
|
}), Object.keys(i).length ? i : null;
|
|
10246
10255
|
}
|
|
10247
|
-
var
|
|
10248
|
-
function
|
|
10256
|
+
var f, O;
|
|
10257
|
+
function X(h, u, i) {
|
|
10249
10258
|
var g = "shortString", m = !0;
|
|
10250
|
-
typeof i == "number" && (g = "javaDouble", m = !1),
|
|
10259
|
+
typeof i == "number" && (g = "javaDouble", m = !1), h[g] = h[g] || {}, h[g][u] = m ? i + "" : i;
|
|
10251
10260
|
}
|
|
10252
|
-
function
|
|
10253
|
-
return !!
|
|
10261
|
+
function U(h) {
|
|
10262
|
+
return !!h && typeof h == "object" && h.value !== void 0;
|
|
10254
10263
|
}
|
|
10255
|
-
function se(
|
|
10256
|
-
return Object.fromEntries(Object.entries(
|
|
10264
|
+
function se(h) {
|
|
10265
|
+
return Object.fromEntries(Object.entries(h).map(function(u) {
|
|
10257
10266
|
var i = u[0], g = u[1];
|
|
10258
|
-
return [i,
|
|
10267
|
+
return [i, U(g) ? g : { value: g }];
|
|
10259
10268
|
}));
|
|
10260
10269
|
}
|
|
10261
|
-
function oe(
|
|
10262
|
-
return a(a({},
|
|
10270
|
+
function oe(h) {
|
|
10271
|
+
return a(a({}, h), { identity: h.identity ? a(a({}, h.identity), { traits: se(h.identity.traits || {}) }) : void 0 });
|
|
10263
10272
|
}
|
|
10264
|
-
(function(
|
|
10265
|
-
|
|
10266
|
-
})(
|
|
10267
|
-
var fe, ie = null, ss = "FLAGSMITH_EVENT", Ce = ss, Le = "https://edge.api.flagsmith.com/api/v1/",
|
|
10268
|
-
function
|
|
10273
|
+
(function(h) {
|
|
10274
|
+
h.NONE = "NONE", h.DEFAULT_FLAGS = "DEFAULT_FLAGS", h.CACHE = "CACHE", h.SERVER = "SERVER";
|
|
10275
|
+
})(f || (f = {}));
|
|
10276
|
+
var fe, ie = null, ss = "FLAGSMITH_EVENT", Ce = ss, Le = "https://edge.api.flagsmith.com/api/v1/", ft = "flagsmith_value_", Yt = "flagsmith_enabled_", yt = "flagsmith_trait_", bt = function() {
|
|
10277
|
+
function h(u) {
|
|
10269
10278
|
var i = this;
|
|
10270
10279
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
10271
10280
|
var g = i, m = g.api, b = g.evaluationContext;
|
|
10272
10281
|
i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(a(a({}, i.loadingState), { isFetching: !0 }));
|
|
10273
|
-
var C = "".concat(i.getContext().identity),
|
|
10274
|
-
var
|
|
10282
|
+
var C = "".concat(i.getContext().identity), Y = function(F) {
|
|
10283
|
+
var Q, j, L, de;
|
|
10275
10284
|
if (F && C === "".concat(i.getContext().identity)) {
|
|
10276
10285
|
var je = F.flags, ye = F.traits, Me = F.identifier;
|
|
10277
10286
|
i.isLoading = !1;
|
|
@@ -10281,14 +10290,14 @@ var Hs = { exports: {} };
|
|
|
10281
10290
|
}), ye.forEach(function(K) {
|
|
10282
10291
|
ve[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
|
|
10283
10292
|
}), i.oldFlags = a({}, i.flags);
|
|
10284
|
-
var Ee = y(i.oldFlags, be),
|
|
10285
|
-
if ((Me || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Me && (i.evaluationContext.identity.identifier = Me)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ee, traitsChanged:
|
|
10293
|
+
var Ee = y(i.oldFlags, be), vt = y((Q = i.evaluationContext.identity) === null || Q === void 0 ? void 0 : Q.traits, ve);
|
|
10294
|
+
if ((Me || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Me && (i.evaluationContext.identity.identifier = Me)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ee, traitsChanged: vt }, i._loadedState(null, f.SERVER)), i.datadogRum) try {
|
|
10286
10295
|
if (i.datadogRum.trackTraits) {
|
|
10287
|
-
var
|
|
10296
|
+
var wt = {};
|
|
10288
10297
|
Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(K) {
|
|
10289
|
-
|
|
10298
|
+
wt[yt + K] = i.getTrait(K);
|
|
10290
10299
|
});
|
|
10291
|
-
var it = a(a(a({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((L = i.evaluationContext.identity) === null || L === void 0 ? void 0 : L.identifier) }),
|
|
10300
|
+
var it = a(a(a({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((L = i.evaluationContext.identity) === null || L === void 0 ? void 0 : L.identifier) }), wt);
|
|
10292
10301
|
i.log("Setting Datadog user", it), i.datadogRum.client.setUser(it);
|
|
10293
10302
|
}
|
|
10294
10303
|
} catch (K) {
|
|
@@ -10297,9 +10306,9 @@ var Hs = { exports: {} };
|
|
|
10297
10306
|
if (i.dtrum) try {
|
|
10298
10307
|
var me = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
|
|
10299
10308
|
Object.keys(i.flags).map(function(K) {
|
|
10300
|
-
|
|
10309
|
+
X(me, ft + K, i.getValue(K, { skipAnalytics: !0 })), X(me, Yt + K, i.hasFeature(K, { skipAnalytics: !0 }));
|
|
10301
10310
|
}), Object.keys(((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.traits) || {}).map(function(K) {
|
|
10302
|
-
|
|
10311
|
+
X(me, yt + K, i.getTrait(K));
|
|
10303
10312
|
}), i.log("Sending javaLongOrObject traits to dynatrace", me.javaLongOrObject), i.log("Sending date traits to dynatrace", me.date), i.log("Sending shortString traits to dynatrace", me.shortString), i.log("Sending javaDouble to dynatrace", me.javaDouble), i.dtrum.sendSessionProperties(me.javaLongOrObject, me.date, me.shortString, me.javaDouble);
|
|
10304
10313
|
} catch (K) {
|
|
10305
10314
|
console.error(K);
|
|
@@ -10307,17 +10316,17 @@ var Hs = { exports: {} };
|
|
|
10307
10316
|
}
|
|
10308
10317
|
};
|
|
10309
10318
|
return b.identity ? Promise.all([b.identity.traits && Object.keys(b.identity.traits).length || !b.identity.identifier ? i.getJSON(m + "identities/", "POST", JSON.stringify({ identifier: b.identity.identifier, transient: b.identity.transient, traits: Object.entries(b.identity.traits).map(function(F) {
|
|
10310
|
-
var
|
|
10311
|
-
return { trait_key:
|
|
10319
|
+
var Q = F[0], j = F[1];
|
|
10320
|
+
return { trait_key: Q, trait_value: j == null ? void 0 : j.value, transient: j == null ? void 0 : j.transient };
|
|
10312
10321
|
}).filter(function(F) {
|
|
10313
10322
|
return F.trait_value !== void 0 || (i.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
|
|
10314
10323
|
}) })) : i.getJSON(m + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
|
|
10315
|
-
return i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: {} }),
|
|
10324
|
+
return i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: {} }), Y(F == null ? void 0 : F[0]);
|
|
10316
10325
|
}).catch(function(F) {
|
|
10317
|
-
var
|
|
10326
|
+
var Q = F.message, j = new Error(Q);
|
|
10318
10327
|
return Promise.reject(j);
|
|
10319
10328
|
}) : i.getJSON(m + "flags/").then(function(F) {
|
|
10320
|
-
return
|
|
10329
|
+
return Y({ flags: F, traits: void 0 });
|
|
10321
10330
|
});
|
|
10322
10331
|
}, this.analyticsFlags = function() {
|
|
10323
10332
|
var g = i.api;
|
|
@@ -10329,15 +10338,15 @@ var Hs = { exports: {} };
|
|
|
10329
10338
|
}).catch(function(m) {
|
|
10330
10339
|
i.log("Exception fetching evaluationEvent", m);
|
|
10331
10340
|
}) : void 0;
|
|
10332
|
-
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source:
|
|
10333
|
-
var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")],
|
|
10334
|
-
if (C && (
|
|
10341
|
+
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: f.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, m, b) {
|
|
10342
|
+
var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], Y = null;
|
|
10343
|
+
if (C && (Y = C.value), m != null && m.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), Y === null && (m == null ? void 0 : m.fallback) !== void 0) return m.fallback;
|
|
10335
10344
|
if (m != null && m.json) try {
|
|
10336
|
-
return
|
|
10345
|
+
return Y === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(Y);
|
|
10337
10346
|
} catch {
|
|
10338
10347
|
return m.fallback;
|
|
10339
10348
|
}
|
|
10340
|
-
return
|
|
10349
|
+
return Y;
|
|
10341
10350
|
}, this.getTrait = function(g) {
|
|
10342
10351
|
var m, b;
|
|
10343
10352
|
return ((m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) && ((b = i.evaluationContext.identity.traits[g.toLowerCase().replace(/ /g, "_")]) === null || b === void 0 ? void 0 : b.value);
|
|
@@ -10360,23 +10369,23 @@ var Hs = { exports: {} };
|
|
|
10360
10369
|
}, this.setTraits = function(g) {
|
|
10361
10370
|
var m;
|
|
10362
10371
|
if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits), Object.fromEntries(Object.entries(g).map(function(b) {
|
|
10363
|
-
var C = b[0],
|
|
10364
|
-
return [C,
|
|
10372
|
+
var C = b[0], Y = b[1];
|
|
10373
|
+
return [C, U(Y) ? Y : { value: Y }];
|
|
10365
10374
|
}))) }) }));
|
|
10366
10375
|
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.");
|
|
10367
10376
|
}, this.hasFeature = function(g, m) {
|
|
10368
|
-
var b = typeof m == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")],
|
|
10369
|
-
return !C && b && m.fallback !== void 0 ?
|
|
10377
|
+
var b = typeof m == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], Y = !1;
|
|
10378
|
+
return !C && b && m.fallback !== void 0 ? Y = m == null ? void 0 : m.fallback : C && C.enabled && (Y = !0), (b && !m.skipAnalytics || !m) && i.evaluateFlag(g, "ENABLED"), Y;
|
|
10370
10379
|
}, this.getStorageKey = function() {
|
|
10371
10380
|
var g, m;
|
|
10372
10381
|
return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((m = i.evaluationContext.environment) === null || m === void 0 ? void 0 : m.apiKey);
|
|
10373
10382
|
}, this.getJSON = function(g, m, b) {
|
|
10374
|
-
var C,
|
|
10375
|
-
|
|
10376
|
-
var F =
|
|
10377
|
-
i.evaluationContext.environment && (
|
|
10383
|
+
var C, Y = i;
|
|
10384
|
+
Y.evaluationContext;
|
|
10385
|
+
var F = Y.headers, Q = { method: m || "GET", body: b, cache: "no-cache", headers: {} };
|
|
10386
|
+
i.evaluationContext.environment && (Q.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), m && m !== "GET" && (Q.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(Q.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
10378
10387
|
var j = "".concat((C = i.evaluationContext.identity) === null || C === void 0 ? void 0 : C.identifier);
|
|
10379
|
-
return
|
|
10388
|
+
return O(g, Q).then(function(L) {
|
|
10380
10389
|
var de, je, ye = "".concat((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.identifier);
|
|
10381
10390
|
if (j === ye) {
|
|
10382
10391
|
var Me = (je = L.headers) === null || je === void 0 ? void 0 : je.get("x-flagsmith-document-updated-at");
|
|
@@ -10399,31 +10408,31 @@ var Hs = { exports: {} };
|
|
|
10399
10408
|
i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ye));
|
|
10400
10409
|
});
|
|
10401
10410
|
}, this.evaluateFlag = function(g, m) {
|
|
10402
|
-
if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? m === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(
|
|
10411
|
+
if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? m === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ft + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Yt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
|
|
10403
10412
|
if (!i.evaluationEvent || !i.evaluationContext.environment) return;
|
|
10404
10413
|
i.evaluationEvent[i.evaluationContext.environment.apiKey] || (i.evaluationEvent[i.evaluationContext.environment.apiKey] = {}), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] === void 0 && (i.evaluationEvent[i.evaluationContext.environment.apiKey][g] = 0), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] += 1;
|
|
10405
10414
|
}
|
|
10406
10415
|
i.updateEventStorage();
|
|
10407
10416
|
}, this._onChange = function(g, m, b) {
|
|
10408
|
-
var C,
|
|
10409
|
-
i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, m, i.loadingState), (
|
|
10410
|
-
},
|
|
10417
|
+
var C, Y;
|
|
10418
|
+
i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, m, i.loadingState), (Y = i._trigger) === null || Y === void 0 || Y.call(i);
|
|
10419
|
+
}, O = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : xt == null ? void 0 : xt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (fe = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
|
|
10411
10420
|
}
|
|
10412
|
-
return
|
|
10421
|
+
return h.prototype.init = function(u) {
|
|
10413
10422
|
var i, g, m;
|
|
10414
10423
|
return r(this, void 0, void 0, function() {
|
|
10415
|
-
var b, C,
|
|
10424
|
+
var b, C, Y, F, Q, j, L, de, je, ye, Me, be, ve, Ee, vt, wt, it, me, K, ns, Bt, Ls, lt, as, Ks, Js, rs, _s, os, Ct, ct, $s, Ae = this;
|
|
10416
10425
|
return l(this, function(De) {
|
|
10417
10426
|
switch (De.label) {
|
|
10418
10427
|
case 0:
|
|
10419
10428
|
b = oe(u.evaluationContext || this.evaluationContext), De.label = 1;
|
|
10420
10429
|
case 1:
|
|
10421
|
-
if (De.trys.push([1, 13, , 14]), C = u.environmentID,
|
|
10422
|
-
if (b.identity = ns ||
|
|
10430
|
+
if (De.trys.push([1, 13, , 14]), C = u.environmentID, Y = u.api, F = Y === void 0 ? Le : Y, Q = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, je = u.onError, ye = u.defaultFlags, Me = u.fetch, be = u.preventFetch, ve = u.enableLogs, Ee = u.enableDynatrace, vt = u.enableAnalytics, wt = u.realtime, it = u.eventSourceUrl, me = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, Bt = u.traits, Ls = u.state, lt = u.cacheOptions, as = u.angularHttpClient, Ks = u._trigger, Js = u._triggerLoadingState, b.environment = C ? { apiKey: C } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
10431
|
+
if (b.identity = ns || Bt ? { identifier: ns, traits: Bt ? Object.fromEntries(Object.entries(Bt).map(function(we) {
|
|
10423
10432
|
return [we[0], { value: we[1] }];
|
|
10424
|
-
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers =
|
|
10433
|
+
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = Q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, rs = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ks || this._trigger, this._triggerLoadingState = Js || this._triggerLoadingState, this.onError = function(we) {
|
|
10425
10434
|
Ae.setLoadingState(a(a({}, Ae.loadingState), { isFetching: !1, isLoading: !1, error: we })), je == null || je(we);
|
|
10426
|
-
}, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.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."), Me && (
|
|
10435
|
+
}, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.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."), Me && (O = Me), this.enableAnalytics = vt || !1, this.flags = Object.assign({}, ye) || {}, this.datadogRum = de || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ie !== void 0 && !!L, Ce = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), wt && typeof window < "u" && this.setupRealtime(me, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: f.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), Ee && (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), as && (O = /* @__PURE__ */ function(we) {
|
|
10427
10436
|
return function(Pe, Oe) {
|
|
10428
10437
|
var Te = Oe.headers, _ = Oe.method, ut = Oe.body;
|
|
10429
10438
|
return new Promise(function(Ke) {
|
|
@@ -10470,7 +10479,7 @@ var Hs = { exports: {} };
|
|
|
10470
10479
|
if (!Pe) return [3, 7];
|
|
10471
10480
|
Oe = null, Te = null, qe.label = 1;
|
|
10472
10481
|
case 1:
|
|
10473
|
-
return qe.trys.push([1, 5, , 6]), _ = JSON.parse(Pe), ut = !1, Ke = !1, _ && _.api === this.api && ((cs = (ls = _.evaluationContext) === null || ls === void 0 ? void 0 : ls.environment) === null || cs === void 0 ? void 0 : cs.apiKey) === ((us = this.evaluationContext.environment) === null || us === void 0 ? void 0 : us.apiKey) && (Re = !0, this.evaluationContext.identity && ((ms = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || ms === void 0 ? void 0 : ms.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (As = _.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), Re = !1), this.cacheOptions.ttl && (!_.ts || (/* @__PURE__ */ new Date()).valueOf() - _.ts > this.cacheOptions.ttl) && (_.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Re = !1) : _.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Ke = !0, Re = !0)), Re && (ut = !0, Te = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (fs = (hs = _.evaluationContext) === null || hs === void 0 ? void 0 : hs.identity) === null || fs === void 0 ? void 0 : fs.traits), Oe = y(this.flags, _.flags), this.setState(a(a({}, _), { evaluationContext: oe(a(a({}, _.evaluationContext), { identity: !((ys = _.evaluationContext) === null || ys === void 0) && ys.identity ? a(a({}, (bs = _.evaluationContext) === null || bs === void 0 ? void 0 : bs.identity), { traits: a(a({}, ((ws = (vs = _.evaluationContext) === null || vs === void 0 ? void 0 : vs.identity) === null || ws === void 0 ? void 0 : ws.traits) || {}),
|
|
10482
|
+
return qe.trys.push([1, 5, , 6]), _ = JSON.parse(Pe), ut = !1, Ke = !1, _ && _.api === this.api && ((cs = (ls = _.evaluationContext) === null || ls === void 0 ? void 0 : ls.environment) === null || cs === void 0 ? void 0 : cs.apiKey) === ((us = this.evaluationContext.environment) === null || us === void 0 ? void 0 : us.apiKey) && (Re = !0, this.evaluationContext.identity && ((ms = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || ms === void 0 ? void 0 : ms.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (As = _.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), Re = !1), this.cacheOptions.ttl && (!_.ts || (/* @__PURE__ */ new Date()).valueOf() - _.ts > this.cacheOptions.ttl) && (_.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Re = !1) : _.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Ke = !0, Re = !0)), Re && (ut = !0, Te = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (fs = (hs = _.evaluationContext) === null || hs === void 0 ? void 0 : hs.identity) === null || fs === void 0 ? void 0 : fs.traits), Oe = y(this.flags, _.flags), this.setState(a(a({}, _), { evaluationContext: oe(a(a({}, _.evaluationContext), { identity: !((ys = _.evaluationContext) === null || ys === void 0) && ys.identity ? a(a({}, (bs = _.evaluationContext) === null || bs === void 0 ? void 0 : bs.identity), { traits: a(a({}, ((ws = (vs = _.evaluationContext) === null || vs === void 0 ? void 0 : vs.identity) === null || ws === void 0 ? void 0 : ws.traits) || {}), Bt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Oe, traitsChanged: Te }, this._loadedState(null, f.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
|
|
10474
10483
|
var Ms;
|
|
10475
10484
|
(Ms = tn.onError) === null || Ms === void 0 || Ms.call(tn, Wa);
|
|
10476
10485
|
}), [3, 4]) : [3, 2];
|
|
@@ -10489,10 +10498,10 @@ var Hs = { exports: {} };
|
|
|
10489
10498
|
case 8:
|
|
10490
10499
|
return qe.sent(), [3, 10];
|
|
10491
10500
|
case 9:
|
|
10492
|
-
if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Bs = this.evaluationContext.identity) === null || Bs === void 0 ? void 0 : Bs.traits) }, this._loadedState(null,
|
|
10501
|
+
if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Bs = this.evaluationContext.identity) === null || Bs === void 0 ? void 0 : Bs.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
|
|
10493
10502
|
else {
|
|
10494
10503
|
if (!this.flags) throw new Error(rs);
|
|
10495
|
-
this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Cs = this.evaluationContext.identity) === null || Cs === void 0 ? void 0 : Cs.traits) }, this._loadedState(null,
|
|
10504
|
+
this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Cs = this.evaluationContext.identity) === null || Cs === void 0 ? void 0 : Cs.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
|
|
10496
10505
|
}
|
|
10497
10506
|
qe.label = 10;
|
|
10498
10507
|
case 10:
|
|
@@ -10519,8 +10528,8 @@ var Hs = { exports: {} };
|
|
|
10519
10528
|
case 10:
|
|
10520
10529
|
return De.sent(), [3, 12];
|
|
10521
10530
|
case 11:
|
|
10522
|
-
if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, ye), traitsChanged: y({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null,
|
|
10523
|
-
else if (this.flags && (
|
|
10531
|
+
if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, ye), traitsChanged: y({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
|
|
10532
|
+
else if (this.flags && (Ct = null, Object.keys(this.flags).length === 0 && (Ct = rs), this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(Ct, f.DEFAULT_FLAGS)), Ct)) throw new Error(Ct);
|
|
10524
10533
|
De.label = 12;
|
|
10525
10534
|
case 12:
|
|
10526
10535
|
return [3, 14];
|
|
@@ -10531,88 +10540,88 @@ var Hs = { exports: {} };
|
|
|
10531
10540
|
}
|
|
10532
10541
|
});
|
|
10533
10542
|
});
|
|
10534
|
-
},
|
|
10543
|
+
}, h.prototype.getAllFlags = function() {
|
|
10535
10544
|
return this.flags;
|
|
10536
|
-
},
|
|
10545
|
+
}, h.prototype.identify = function(u, i, g) {
|
|
10537
10546
|
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(m) {
|
|
10538
10547
|
var b = m[0], C = m[1];
|
|
10539
|
-
return [b,
|
|
10548
|
+
return [b, U(C) ? C : { value: C }];
|
|
10540
10549
|
}))), this.initialised ? this.getFlags() : Promise.resolve();
|
|
10541
|
-
},
|
|
10550
|
+
}, h.prototype.getState = function() {
|
|
10542
10551
|
return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
|
|
10543
|
-
},
|
|
10552
|
+
}, h.prototype.setState = function(u) {
|
|
10544
10553
|
u && (this.initialised = !0, this.api = u.api || this.api || Le, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
|
|
10545
|
-
},
|
|
10554
|
+
}, h.prototype.logout = function() {
|
|
10546
10555
|
return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
|
|
10547
|
-
},
|
|
10556
|
+
}, h.prototype.startListening = function(u) {
|
|
10548
10557
|
u === void 0 && (u = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, u);
|
|
10549
|
-
},
|
|
10558
|
+
}, h.prototype.stopListening = function() {
|
|
10550
10559
|
this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
|
|
10551
|
-
},
|
|
10560
|
+
}, h.prototype._loadedState = function(u, i, g) {
|
|
10552
10561
|
return u === void 0 && (u = null), g === void 0 && (g = !1), { error: u, isFetching: g, isLoading: !1, source: i };
|
|
10553
|
-
},
|
|
10562
|
+
}, h.prototype.log = function() {
|
|
10554
10563
|
for (var u = [], i = 0; i < arguments.length; i++) u[i] = arguments[i];
|
|
10555
10564
|
this.enableLogs && console.log.apply(this, c(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], u));
|
|
10556
|
-
},
|
|
10565
|
+
}, h.prototype.updateStorage = function() {
|
|
10557
10566
|
if (this.cacheFlags) {
|
|
10558
10567
|
this.ts = (/* @__PURE__ */ new Date()).valueOf();
|
|
10559
10568
|
var u = JSON.stringify(this.getState());
|
|
10560
10569
|
this.log("Setting storage", u), ie.setItem(this.getStorageKey(), u);
|
|
10561
10570
|
}
|
|
10562
|
-
},
|
|
10571
|
+
}, h.prototype.updateEventStorage = function() {
|
|
10563
10572
|
if (this.enableAnalytics) {
|
|
10564
10573
|
var u = JSON.stringify(this.getState().evaluationEvent);
|
|
10565
10574
|
ie.setItem(Ce, u).catch(function(i) {
|
|
10566
10575
|
return console.error("Flagsmith: Error setting item in async storage", i);
|
|
10567
10576
|
});
|
|
10568
10577
|
}
|
|
10569
|
-
},
|
|
10578
|
+
}, h.prototype.setLoadingState = function(u) {
|
|
10570
10579
|
var i;
|
|
10571
|
-
|
|
10572
|
-
},
|
|
10580
|
+
w(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
|
|
10581
|
+
}, h.prototype.setupRealtime = function(u, i) {
|
|
10573
10582
|
var g = this, m = u + "sse/environments/" + i + "/stream";
|
|
10574
10583
|
fe ? this.eventSource || (this.log("Creating event source with url " + m), this.eventSource = new fe(m), this.eventSource.addEventListener("environment_updated", function(b) {
|
|
10575
10584
|
var C;
|
|
10576
10585
|
try {
|
|
10577
10586
|
C = JSON.parse(b.data).updated_at;
|
|
10578
|
-
} catch (
|
|
10579
|
-
g.log("Could not parse sse event",
|
|
10587
|
+
} catch (Y) {
|
|
10588
|
+
g.log("Could not parse sse event", Y);
|
|
10580
10589
|
}
|
|
10581
10590
|
C ? !g.timestamp || C > 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);
|
|
10582
10591
|
})) : this.log("Error, EventSource is undefined");
|
|
10583
|
-
},
|
|
10592
|
+
}, h;
|
|
10584
10593
|
}();
|
|
10585
|
-
function A(
|
|
10586
|
-
var u =
|
|
10587
|
-
return new
|
|
10594
|
+
function A(h) {
|
|
10595
|
+
var u = h.fetch, i = h.AsyncStorage, g = h.eventSource;
|
|
10596
|
+
return new bt({ fetch: u, AsyncStorage: i, eventSource: g });
|
|
10588
10597
|
}
|
|
10589
|
-
var p, B = (p = function(
|
|
10598
|
+
var p, B = (p = function(h, u) {
|
|
10590
10599
|
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
|
|
10591
10600
|
i.__proto__ = g;
|
|
10592
10601
|
} || function(i, g) {
|
|
10593
10602
|
for (var m in g) Object.prototype.hasOwnProperty.call(g, m) && (i[m] = g[m]);
|
|
10594
|
-
}, p(
|
|
10595
|
-
}, function(
|
|
10603
|
+
}, p(h, u);
|
|
10604
|
+
}, function(h, u) {
|
|
10596
10605
|
if (typeof u != "function" && u !== null) throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
|
|
10597
10606
|
function i() {
|
|
10598
|
-
this.constructor =
|
|
10607
|
+
this.constructor = h;
|
|
10599
10608
|
}
|
|
10600
|
-
p(
|
|
10601
|
-
}), D = function(
|
|
10602
|
-
var u = typeof Symbol == "function" && Symbol.iterator, i = u &&
|
|
10603
|
-
if (i) return i.call(
|
|
10604
|
-
if (
|
|
10605
|
-
return
|
|
10609
|
+
p(h, u), h.prototype = u === null ? Object.create(u) : (i.prototype = u.prototype, new i());
|
|
10610
|
+
}), D = function(h) {
|
|
10611
|
+
var u = typeof Symbol == "function" && Symbol.iterator, i = u && h[u], g = 0;
|
|
10612
|
+
if (i) return i.call(h);
|
|
10613
|
+
if (h && typeof h.length == "number") return { next: function() {
|
|
10614
|
+
return h && g >= h.length && (h = void 0), { value: h && h[g++], done: !h };
|
|
10606
10615
|
} };
|
|
10607
10616
|
throw new TypeError(u ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
10608
|
-
}, E = function(
|
|
10609
|
-
var i = typeof Symbol == "function" &&
|
|
10610
|
-
if (!i) return
|
|
10611
|
-
var g, m, b = i.call(
|
|
10617
|
+
}, E = function(h, u) {
|
|
10618
|
+
var i = typeof Symbol == "function" && h[Symbol.iterator];
|
|
10619
|
+
if (!i) return h;
|
|
10620
|
+
var g, m, b = i.call(h), C = [];
|
|
10612
10621
|
try {
|
|
10613
10622
|
for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) C.push(g.value);
|
|
10614
|
-
} catch (
|
|
10615
|
-
m = { error:
|
|
10623
|
+
} catch (Y) {
|
|
10624
|
+
m = { error: Y };
|
|
10616
10625
|
} finally {
|
|
10617
10626
|
try {
|
|
10618
10627
|
g && !g.done && (i = b.return) && i.call(b);
|
|
@@ -10621,26 +10630,26 @@ var Hs = { exports: {} };
|
|
|
10621
10630
|
}
|
|
10622
10631
|
}
|
|
10623
10632
|
return C;
|
|
10624
|
-
},
|
|
10633
|
+
}, G = function(h, u, i) {
|
|
10625
10634
|
if (arguments.length === 2) for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
|
|
10626
|
-
return
|
|
10627
|
-
}, R = function(
|
|
10635
|
+
return h.concat(g || Array.prototype.slice.call(u));
|
|
10636
|
+
}, R = function(h) {
|
|
10628
10637
|
function u() {
|
|
10629
|
-
return
|
|
10638
|
+
return h.call(this, `EventSource not available.
|
|
10630
10639
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
10631
10640
|
}
|
|
10632
|
-
return B(u,
|
|
10641
|
+
return B(u, h), u;
|
|
10633
10642
|
}(Error), T = function() {
|
|
10634
|
-
function
|
|
10643
|
+
function h(u, i) {
|
|
10635
10644
|
var g = this;
|
|
10636
10645
|
if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = i != null ? Object.assign({}, i) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = u.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new R();
|
|
10637
10646
|
this._onevent_wrapped = function(m) {
|
|
10638
10647
|
g._onevent(m);
|
|
10639
10648
|
}, this._start();
|
|
10640
10649
|
}
|
|
10641
|
-
return
|
|
10650
|
+
return h.prototype.dispatchEvent = function(u) {
|
|
10642
10651
|
throw new Error("Method not implemented.");
|
|
10643
|
-
},
|
|
10652
|
+
}, h.prototype._start = function() {
|
|
10644
10653
|
var u, i, g = this, m = this.url;
|
|
10645
10654
|
this._lastEventId && (m.indexOf("?") === -1 ? m += "?" : m += "&", m += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(m, this._configuration), this._eventSource.onopen = function(F) {
|
|
10646
10655
|
g._onopen(F);
|
|
@@ -10651,8 +10660,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10651
10660
|
};
|
|
10652
10661
|
try {
|
|
10653
10662
|
for (var b = D(Object.keys(this._listeners)), C = b.next(); !C.done; C = b.next()) {
|
|
10654
|
-
var
|
|
10655
|
-
this._eventSource.addEventListener(
|
|
10663
|
+
var Y = C.value;
|
|
10664
|
+
this._eventSource.addEventListener(Y, this._onevent_wrapped);
|
|
10656
10665
|
}
|
|
10657
10666
|
} catch (F) {
|
|
10658
10667
|
u = { error: F };
|
|
@@ -10663,9 +10672,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10663
10672
|
if (u) throw u.error;
|
|
10664
10673
|
}
|
|
10665
10674
|
}
|
|
10666
|
-
},
|
|
10675
|
+
}, h.prototype._onopen = function(u) {
|
|
10667
10676
|
this.readyState === 0 && (this.readyState = 1, this.onopen(u));
|
|
10668
|
-
},
|
|
10677
|
+
}, h.prototype._onerror = function(u) {
|
|
10669
10678
|
var i = this;
|
|
10670
10679
|
if (this.readyState === 1 && (this.readyState = 0, this.onerror(u)), this._eventSource) {
|
|
10671
10680
|
this._eventSource.close(), this._eventSource = null;
|
|
@@ -10674,15 +10683,15 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10674
10683
|
return i._start();
|
|
10675
10684
|
}, g);
|
|
10676
10685
|
}
|
|
10677
|
-
},
|
|
10686
|
+
}, h.prototype._onevent = function(u) {
|
|
10678
10687
|
var i, g;
|
|
10679
10688
|
u && u.lastEventId && (this._lastEventId = u.lastEventId);
|
|
10680
10689
|
var m = this._listeners[u.type];
|
|
10681
10690
|
if (m != null) try {
|
|
10682
|
-
for (var b = D(
|
|
10691
|
+
for (var b = D(G([], E(m), !1)), C = b.next(); !C.done; C = b.next())
|
|
10683
10692
|
C.value.call(this, u);
|
|
10684
|
-
} catch (
|
|
10685
|
-
i = { error:
|
|
10693
|
+
} catch (Y) {
|
|
10694
|
+
i = { error: Y };
|
|
10686
10695
|
} finally {
|
|
10687
10696
|
try {
|
|
10688
10697
|
C && !C.done && (g = b.return) && g.call(b);
|
|
@@ -10691,26 +10700,26 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10691
10700
|
}
|
|
10692
10701
|
}
|
|
10693
10702
|
u.type === "message" && this.onmessage(u);
|
|
10694
|
-
},
|
|
10695
|
-
},
|
|
10696
|
-
},
|
|
10697
|
-
},
|
|
10703
|
+
}, h.prototype.onopen = function(u) {
|
|
10704
|
+
}, h.prototype.onerror = function(u) {
|
|
10705
|
+
}, h.prototype.onmessage = function(u) {
|
|
10706
|
+
}, h.prototype.close = function() {
|
|
10698
10707
|
this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
|
|
10699
|
-
},
|
|
10708
|
+
}, h.prototype.addEventListener = function(u, i, g) {
|
|
10700
10709
|
this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
|
|
10701
10710
|
var m = this._listeners[u];
|
|
10702
|
-
m.includes(i) || (this._listeners[u] =
|
|
10703
|
-
},
|
|
10711
|
+
m.includes(i) || (this._listeners[u] = G(G([], E(m), !1), [i], !1));
|
|
10712
|
+
}, h.prototype.removeEventListener = function(u, i, g) {
|
|
10704
10713
|
var m = this._listeners[u];
|
|
10705
10714
|
this._listeners[u] = m.filter(function(b) {
|
|
10706
10715
|
return b !== i;
|
|
10707
10716
|
});
|
|
10708
|
-
},
|
|
10717
|
+
}, h;
|
|
10709
10718
|
}();
|
|
10710
10719
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
10711
|
-
var te = function(
|
|
10720
|
+
var te = function(h, u) {
|
|
10712
10721
|
return u = u || {}, new Promise(function(i, g) {
|
|
10713
|
-
var m = new XMLHttpRequest(), b = [], C = [],
|
|
10722
|
+
var m = new XMLHttpRequest(), b = [], C = [], Y = {}, F = function() {
|
|
10714
10723
|
return { ok: (m.status / 100 | 0) == 2, statusText: m.statusText, status: m.status, url: m.responseURL, text: function() {
|
|
10715
10724
|
return Promise.resolve(m.responseText);
|
|
10716
10725
|
}, json: function() {
|
|
@@ -10722,16 +10731,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10722
10731
|
}, entries: function() {
|
|
10723
10732
|
return C;
|
|
10724
10733
|
}, get: function(j) {
|
|
10725
|
-
return
|
|
10734
|
+
return Y[j.toLowerCase()];
|
|
10726
10735
|
}, has: function(j) {
|
|
10727
|
-
return j.toLowerCase() in
|
|
10736
|
+
return j.toLowerCase() in Y;
|
|
10728
10737
|
} } };
|
|
10729
10738
|
};
|
|
10730
|
-
for (var
|
|
10739
|
+
for (var Q in m.open(u.method || "get", h, !0), m.onload = function() {
|
|
10731
10740
|
m.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, L, de) {
|
|
10732
|
-
b.push(L = L.toLowerCase()), C.push([L, de]),
|
|
10741
|
+
b.push(L = L.toLowerCase()), C.push([L, de]), Y[L] = Y[L] ? Y[L] + "," + de : de;
|
|
10733
10742
|
}), i(F());
|
|
10734
|
-
}, m.onerror = g, m.withCredentials = u.credentials == "include", u.headers) m.setRequestHeader(
|
|
10743
|
+
}, m.onerror = g, m.withCredentials = u.credentials == "include", u.headers) m.setRequestHeader(Q, u.headers[Q]);
|
|
10735
10744
|
m.send(u.body || null);
|
|
10736
10745
|
});
|
|
10737
10746
|
}, ae = A({ AsyncStorage: n, fetch: te, eventSource: T });
|
|
@@ -10740,24 +10749,24 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10740
10749
|
}, s.default = ae, Object.defineProperty(s, "__esModule", { value: !0 });
|
|
10741
10750
|
});
|
|
10742
10751
|
})(Hs, Hs.exports);
|
|
10743
|
-
var
|
|
10752
|
+
var Qc = Hs.exports, Zc = {
|
|
10744
10753
|
NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first."
|
|
10745
|
-
}, pn = "business", Ge,
|
|
10754
|
+
}, pn = "business", Ge, Uc = (Ge = class {
|
|
10746
10755
|
constructor() {
|
|
10747
|
-
|
|
10748
|
-
|
|
10756
|
+
Vt(this, "flagsmithClient", null);
|
|
10757
|
+
Vt(this, "userContext", null);
|
|
10749
10758
|
}
|
|
10750
10759
|
static getInstance() {
|
|
10751
10760
|
return Ge.instance || (Ge.instance = new Ge()), Ge.instance;
|
|
10752
10761
|
}
|
|
10753
10762
|
ensureInitialized() {
|
|
10754
10763
|
if (!this.flagsmithClient)
|
|
10755
|
-
throw new Error(
|
|
10764
|
+
throw new Error(Zc.NOT_INITIALIZED);
|
|
10756
10765
|
}
|
|
10757
10766
|
async init(t, s = []) {
|
|
10758
10767
|
if (!this.flagsmithClient)
|
|
10759
10768
|
try {
|
|
10760
|
-
this.flagsmithClient =
|
|
10769
|
+
this.flagsmithClient = Qc.createFlagsmithInstance();
|
|
10761
10770
|
const n = s.reduce((a, r) => (a[r.feature.name] = r, a), {});
|
|
10762
10771
|
await this.flagsmithClient.init({
|
|
10763
10772
|
environmentID: t.apiKey,
|
|
@@ -10844,58 +10853,58 @@ var Nc = Hs.exports, Xc = {
|
|
|
10844
10853
|
reset() {
|
|
10845
10854
|
this.flagsmithClient = null, this.userContext = null;
|
|
10846
10855
|
}
|
|
10847
|
-
},
|
|
10848
|
-
function
|
|
10849
|
-
const t = () =>
|
|
10850
|
-
if (
|
|
10856
|
+
}, Vt(Ge, "instance"), Ge), zc = Uc.getInstance(), Dt = Ue(!1), St = Ue([]), dt = Ue(null);
|
|
10857
|
+
function Wc(e = zc) {
|
|
10858
|
+
const t = () => Dt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (f, O = []) => {
|
|
10859
|
+
if (Dt.value) {
|
|
10851
10860
|
console.warn("FeatureFlag is already initialized.");
|
|
10852
10861
|
return;
|
|
10853
10862
|
}
|
|
10854
10863
|
try {
|
|
10855
|
-
await e.init(
|
|
10856
|
-
} catch (
|
|
10857
|
-
console.error("Failed to initialize feature flags:",
|
|
10864
|
+
await e.init(f, O), St.value = await e.getFlags(), Dt.value = !0, dt.value = null;
|
|
10865
|
+
} catch (X) {
|
|
10866
|
+
console.error("Failed to initialize feature flags:", X), dt.value = X;
|
|
10858
10867
|
}
|
|
10859
|
-
}, n = async (
|
|
10868
|
+
}, n = async (f) => {
|
|
10860
10869
|
if (t())
|
|
10861
10870
|
try {
|
|
10862
|
-
await e.setUser(
|
|
10863
|
-
} catch (
|
|
10864
|
-
console.error("Failed to set user:",
|
|
10871
|
+
await e.setUser(f), St.value = await e.getFlags(), dt.value = null;
|
|
10872
|
+
} catch (O) {
|
|
10873
|
+
console.error("Failed to set user:", O), dt.value = O;
|
|
10865
10874
|
}
|
|
10866
|
-
}, a = async (
|
|
10867
|
-
if (!t()) return
|
|
10875
|
+
}, a = async (f) => n(`${pn}-${f}`), r = (f, O, X = null) => {
|
|
10876
|
+
if (!t()) return X;
|
|
10868
10877
|
try {
|
|
10869
|
-
return e.getFlagValue(
|
|
10870
|
-
} catch (
|
|
10871
|
-
return console.error(`Error getting flag value for ${
|
|
10878
|
+
return e.getFlagValue(f, O) ?? X;
|
|
10879
|
+
} catch (U) {
|
|
10880
|
+
return console.error(`Error getting flag value for ${f}:`, U), X;
|
|
10872
10881
|
}
|
|
10873
|
-
}, l = (
|
|
10874
|
-
if (!t()) return
|
|
10882
|
+
}, l = (f, O) => {
|
|
10883
|
+
if (!t()) return O ?? null;
|
|
10875
10884
|
try {
|
|
10876
|
-
return e.getFlag(
|
|
10877
|
-
} catch (
|
|
10878
|
-
return console.error(`Error getting flag for ${
|
|
10885
|
+
return e.getFlag(f) ?? O ?? null;
|
|
10886
|
+
} catch (X) {
|
|
10887
|
+
return console.error(`Error getting flag for ${f}:`, X), O ?? null;
|
|
10879
10888
|
}
|
|
10880
|
-
}, c = async (
|
|
10881
|
-
if (!t()) return
|
|
10889
|
+
}, c = async (f, O, X = null, U) => {
|
|
10890
|
+
if (!t()) return X;
|
|
10882
10891
|
try {
|
|
10883
|
-
return await e.getUserFlagValue(
|
|
10892
|
+
return await e.getUserFlagValue(f, O, X, U);
|
|
10884
10893
|
} catch (se) {
|
|
10885
|
-
return console.error(`Error getting user flag value for ${
|
|
10894
|
+
return console.error(`Error getting user flag value for ${O}:`, se), X;
|
|
10886
10895
|
}
|
|
10887
|
-
},
|
|
10896
|
+
}, w = async (f, O, X = null, U) => c(`${pn}-${f}`, O, X, U), y = () => {
|
|
10888
10897
|
try {
|
|
10889
10898
|
e.reset();
|
|
10890
|
-
} catch (
|
|
10891
|
-
console.error("Error resetting feature flags:",
|
|
10899
|
+
} catch (f) {
|
|
10900
|
+
console.error("Error resetting feature flags:", f);
|
|
10892
10901
|
} finally {
|
|
10893
|
-
|
|
10902
|
+
St.value = [], Dt.value = !1, dt.value = null;
|
|
10894
10903
|
}
|
|
10895
10904
|
};
|
|
10896
10905
|
return {
|
|
10897
|
-
flags: Ds(
|
|
10898
|
-
isInitialized: Ds(
|
|
10906
|
+
flags: Ds(St),
|
|
10907
|
+
isInitialized: Ds(Dt),
|
|
10899
10908
|
error: Ds(dt),
|
|
10900
10909
|
init: s,
|
|
10901
10910
|
setUser: n,
|
|
@@ -10903,17 +10912,17 @@ function Uc(e = Zc) {
|
|
|
10903
10912
|
getFlagValue: r,
|
|
10904
10913
|
getFlag: l,
|
|
10905
10914
|
getUserFlagValue: c,
|
|
10906
|
-
getBusinessFlagValue:
|
|
10915
|
+
getBusinessFlagValue: w,
|
|
10907
10916
|
reset: y
|
|
10908
10917
|
};
|
|
10909
10918
|
}
|
|
10910
|
-
var
|
|
10911
|
-
const
|
|
10919
|
+
var Lc = () => Wc();
|
|
10920
|
+
const cu = /* @__PURE__ */ at({
|
|
10912
10921
|
__name: "App",
|
|
10913
10922
|
setup(e) {
|
|
10914
|
-
const t = bn(), { init: s } =
|
|
10923
|
+
const t = bn(), { init: s } = Lc();
|
|
10915
10924
|
return yn(async () => {
|
|
10916
|
-
t.registerSidebarComponent(
|
|
10925
|
+
t.registerSidebarComponent(Xc), await s({
|
|
10917
10926
|
apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
|
|
10918
10927
|
});
|
|
10919
10928
|
}), (n, a) => {
|
|
@@ -10922,14 +10931,14 @@ const iu = /* @__PURE__ */ at({
|
|
|
10922
10931
|
};
|
|
10923
10932
|
}
|
|
10924
10933
|
});
|
|
10925
|
-
var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev.
|
|
10934
|
+
var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev.14", mode: "fmmf" };
|
|
10926
10935
|
console.log(
|
|
10927
10936
|
`%c${xs.name}%c v${xs.version} %c${xs.mode}`,
|
|
10928
10937
|
"background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
|
|
10929
10938
|
"background:#42b883;color:#1f1f1f;padding:2px 6px",
|
|
10930
10939
|
"background:#555;color:#fff;padding:2px 6px;border-radius:0 3px 3px 0"
|
|
10931
10940
|
);
|
|
10932
|
-
const
|
|
10941
|
+
const uu = () => {
|
|
10933
10942
|
const e = [
|
|
10934
10943
|
ii,
|
|
10935
10944
|
_o,
|
|
@@ -10952,28 +10961,29 @@ const lu = () => {
|
|
|
10952
10961
|
);
|
|
10953
10962
|
};
|
|
10954
10963
|
export {
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10964
|
+
su as A,
|
|
10965
|
+
ou as B,
|
|
10966
|
+
ru as D,
|
|
10967
|
+
tu as G,
|
|
10968
|
+
au as O,
|
|
10960
10969
|
$ as R,
|
|
10961
|
-
|
|
10970
|
+
nu as S,
|
|
10962
10971
|
eo as U,
|
|
10963
10972
|
wc as _,
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
+
Nc as a,
|
|
10974
|
+
Cc as b,
|
|
10975
|
+
xl as c,
|
|
10976
|
+
Ne as d,
|
|
10977
|
+
so as e,
|
|
10978
|
+
zl as f,
|
|
10979
|
+
xt as g,
|
|
10980
|
+
jl as h,
|
|
10981
|
+
uu as i,
|
|
10982
|
+
cu as j,
|
|
10973
10983
|
co as k,
|
|
10974
|
-
|
|
10984
|
+
iu as m,
|
|
10975
10985
|
o as n,
|
|
10976
|
-
|
|
10977
|
-
|
|
10986
|
+
lu as r,
|
|
10987
|
+
Lc as u,
|
|
10978
10988
|
v
|
|
10979
10989
|
};
|