@feedmepos/mf-hrm-portal 2.3.2-dev.11 → 2.3.2-dev.12

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.
Files changed (62) hide show
  1. package/dist/{ApprovalCodeList-DoNoFW6w.js → ApprovalCodeList-CCh9mNJh.js} +7 -7
  2. package/dist/AuditLogList-DCADUZ5s.js +2019 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1dLOPFb.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js} +10 -10
  4. package/dist/{EmployeeList-BX9gy9WG.js → EmployeeList-CRI7XjzX.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-iCgTyICI.js → FormSection.vue_vue_type_script_setup_true_lang-y9_hxba6.js} +1 -1
  6. package/dist/{GrantUserList-DNvmmlDI.js → GrantUserList-DbMngkpK.js} +8 -8
  7. package/dist/{Main-BHmY7VHC.js → Main-BsFUfsmP.js} +29 -29
  8. package/dist/{Main-SzU5H5uC.js → Main-CrnM6wr8.js} +623 -629
  9. package/dist/{Main-2NivoQNg.js → Main-D4Zq5AXi.js} +5 -5
  10. package/dist/{MyPosProfile-2W5mT5d5.js → MyPosProfile-B4cE47im.js} +1 -1
  11. package/dist/{PermissionSetList-BCAm8rHm.js → PermissionSetList-D_2x-mDD.js} +112 -113
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js +4212 -0
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DYbfmF2P.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-COX-N0k6.js} +33 -33
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-o4mXv2hT.js → RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js} +41 -41
  15. package/dist/{RoleList-BXkyCeH0.js → RoleList-BC-c7fqn.js} +105 -96
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DOxRdHY1.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DBbuSrXV.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-4hV53-q6.js → ScheduleGeneralPage-eytzOZQr.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-D5jOHLA1.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js} +4 -4
  19. package/dist/{SchedulePage-CqNa_p32.js → SchedulePage-B0QirzAk.js} +17 -17
  20. package/dist/{SchedulePositionPage-7xYBe1xd.js → SchedulePositionPage-BAE-NQvL.js} +3 -3
  21. package/dist/{SelectFilter-Dy2Nv1_D.js → SelectFilter-DrLJhxt6.js} +1 -1
  22. package/dist/TeamMemberList-CHkiL_q9.js +2083 -0
  23. package/dist/TimesheetList-BZuddmzy.js +402 -0
  24. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-LCUO-ogb.js +58 -0
  25. package/dist/{app-C37qvNnc.js → app-B9qAxMj1.js} +3516 -3470
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-B7rpc4Oe.js → approval-code-CTgj9q6m.js} +1 -1
  28. package/dist/{dayjs.min-D35yhU4A.js → dayjs.min-giCSI3N8.js} +22 -22
  29. package/dist/employee-BD3NXG8h.js +210 -0
  30. package/dist/{grant-user-CostZ0Md.js → grant-user-jeTFzGU1.js} +1 -1
  31. package/dist/{index-DPiNc7mn.js → iteration-Tyg43nH0.js} +726 -698
  32. package/dist/{lodash-C8MGI_QW.js → lodash-CZsDR_DU.js} +1 -1
  33. package/dist/{member-grant-CktOoicv.js → member-grant-DsEMLN1N.js} +2 -2
  34. package/dist/restaurant-CDJ3VjdH.js +49 -0
  35. package/dist/role-BDRWt87n.js +91 -0
  36. package/dist/{rule-EYBPBkv_.js → rule-EiO87cJJ.js} +309 -313
  37. package/dist/src/api/employee/index.d.ts +2 -1
  38. package/dist/src/api/timesheet/index.d.ts +1 -1
  39. package/dist/src/composables/useTenant.d.ts +11 -0
  40. package/dist/src/router/courtGuard.d.ts +4 -0
  41. package/dist/src/stores/employee.d.ts +7 -1
  42. package/dist/src/stores/restaurant.d.ts +1 -61
  43. package/dist/src/stores/team.d.ts +1 -1
  44. package/dist/src/stores/timesheet.d.ts +51 -66
  45. package/dist/src/types/timesheet.d.ts +0 -3
  46. package/dist/style.css +1 -1
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/{useAppStore-BmBJPo1_.js → useAppStore-CkUZ2H5h.js} +1 -1
  49. package/dist/{useLoading-BtyGXkm_.js → useLoading-DJHJM5E0.js} +1 -1
  50. package/dist/useReportPermissions-2dfIX21b.js +80 -0
  51. package/dist/{useSsoProviders-CZrTNgfp.js → useSsoProviders-BarGHndw.js} +1 -1
  52. package/package.json +2 -2
  53. package/dist/AuditLogList-D5M0cl8g.js +0 -2026
  54. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-e2vu_Mcn.js +0 -4208
  55. package/dist/TeamMemberList-okhiXdLg.js +0 -2087
  56. package/dist/TimesheetList-BKj9OnJW.js +0 -437
  57. package/dist/employee-Bn6HTMxg.js +0 -172
  58. package/dist/iteration-CcXrOMQe.js +0 -30
  59. package/dist/restaurant-BgvuJL8G.js +0 -52
  60. package/dist/role-D8G5QOG1.js +0 -98
  61. package/dist/timesheet-D6jBeR-V.js +0 -76
  62. package/dist/useReportPermissions-C8z7EA7v.js +0 -82
@@ -1,11 +1,9 @@
1
- import { e as j } from "./index-DPiNc7mn.js";
2
- import { y as N, m as h, k as W, z as ne, P as z, g, b, B as L, v as x, C as y, s as F } from "./app-C37qvNnc.js";
3
- import { s as V, c as re } from "./iteration-CcXrOMQe.js";
4
- import { s as ie } from "./utils-BZkjJbju.js";
5
- import { defineStore as K, storeToRefs as Q } from "pinia";
6
- import { ref as v, computed as C } from "vue";
7
- import { useCoreStore as H } from "@feedmepos/mf-common";
8
- import { u as oe } from "./restaurant-BgvuJL8G.js";
1
+ import { s as W, c as ne, e as j } from "./iteration-Tyg43nH0.js";
2
+ import { C as _, m as h, k as z, D as re, x as K, g, b, u as V, E as L, H as ie, h as x, I as y, l as F } from "./app-B9qAxMj1.js";
3
+ import { s as oe } from "./utils-BZkjJbju.js";
4
+ import { defineStore as H, storeToRefs as Q } from "pinia";
5
+ import { ref as v, computed as E } from "vue";
6
+ import { u as ae } from "./restaurant-CDJ3VjdH.js";
9
7
  function k(e) {
10
8
  if (e) {
11
9
  if (typeof e == "string") {
@@ -26,53 +24,53 @@ function w(e) {
26
24
  ) : !0;
27
25
  }
28
26
  function Y(e) {
29
- const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = (r, s, o) => {
30
- var a, c;
27
+ const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), r = (n, s, a) => {
28
+ var o, c;
31
29
  const u = k(s.conditions);
32
30
  let l = `${s.subject}::${JSON.stringify([...s.actions].sort())}`;
33
31
  w(u) || (l += `::${JSON.stringify(u)}`);
34
- const m = r.get(l);
32
+ const m = n.get(l);
35
33
  if (!m) {
36
- r.set(l, { ...s, setNames: [o.name], setId: o._id });
34
+ n.set(l, { ...s, setNames: [a.name], setId: a._id });
37
35
  return;
38
36
  }
39
- m.setNames.push(o.name);
37
+ m.setNames.push(a.name);
40
38
  const d = k(m.conditions);
41
39
  if (!d || !u) {
42
40
  m.conditions = void 0;
43
41
  return;
44
42
  }
45
43
  for (const f in u)
46
- (a = d[f]) != null && a.$in && (c = u[f]) != null && c.$in ? d[f].$in = Array.from(
44
+ (o = d[f]) != null && o.$in && (c = u[f]) != null && c.$in ? d[f].$in = Array.from(
47
45
  /* @__PURE__ */ new Set([...d[f].$in, ...u[f].$in])
48
46
  ) : d[f] || (d[f] = u[f]);
49
47
  m.conditions = JSON.stringify(d);
50
48
  };
51
- for (const r of e)
52
- for (const s of r.permissions)
53
- n(s.inverted ? i : t, s, r);
49
+ for (const n of e)
50
+ for (const s of n.permissions)
51
+ r(s.inverted ? i : t, s, n);
54
52
  return [...Array.from(t.values()), ...Array.from(i.values())];
55
53
  }
56
- function E(e, t) {
54
+ function C(e, t) {
57
55
  return `${e}::${[...t].sort().join(",")}`;
58
56
  }
59
57
  function G(e, t) {
60
- const i = [...e], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
61
- for (const a of e) {
62
- const c = N(a.subject);
63
- n.add(E(c, a.actions)), a.inverted && a.actions.includes("manage") && r.add(`set_${c}`), !a.inverted && a.actions.includes("manage") && s.add(c);
58
+ const i = [...e], r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
59
+ for (const o of e) {
60
+ const c = _(o.subject);
61
+ r.add(C(c, o.actions)), o.inverted && o.actions.includes("manage") && n.add(`set_${c}`), !o.inverted && o.actions.includes("manage") && s.add(c);
64
62
  }
65
- const o = [...e];
66
- for (; o.length > 0; ) {
67
- const a = o.shift(), c = `set_${N(a.subject)}`, u = t[c];
68
- if (!u || r.has(c) || !a.actions.includes("manage") || a.inverted) continue;
69
- r.add(c);
70
- const l = ae(a);
71
- a.source && !a.source.trace && (a.source = { ...a.source, trace: l });
63
+ const a = [...e];
64
+ for (; a.length > 0; ) {
65
+ const o = a.shift(), c = `set_${_(o.subject)}`, u = t[c];
66
+ if (!u || n.has(c) || !o.actions.includes("manage") || o.inverted) continue;
67
+ n.add(c);
68
+ const l = ue(o);
69
+ o.source && !o.source.trace && (o.source = { ...o.source, trace: l });
72
70
  const m = [...l, `${u.name} (system)`];
73
71
  for (const d of u.permissions ?? []) {
74
- const f = N(d.subject), p = E(f, d.actions);
75
- n.has(p) || s.has(f) || (n.add(p), i.push({
72
+ const f = _(d.subject), p = C(f, d.actions);
73
+ r.has(p) || s.has(f) || (r.add(p), i.push({
76
74
  ...d,
77
75
  // FdoPermissionRule.fields is string[] | null; RawRule expects string[] | undefined
78
76
  fields: d.fields ?? void 0,
@@ -85,7 +83,7 @@ function G(e, t) {
85
83
  }));
86
84
  }
87
85
  for (const d of u.permissionSets ?? []) {
88
- const f = N(d), p = E(f, ["manage"]), S = {
86
+ const f = _(d), p = C(f, ["manage"]), S = {
89
87
  subject: f,
90
88
  actions: ["manage"],
91
89
  source: {
@@ -95,18 +93,18 @@ function G(e, t) {
95
93
  trace: m
96
94
  }
97
95
  };
98
- n.has(p) || (n.add(p), i.push(S)), o.push(S);
96
+ r.has(p) || (r.add(p), i.push(S)), a.push(S);
99
97
  }
100
98
  }
101
- return [...i.filter((a) => !a.inverted), ...i.filter((a) => a.inverted)];
99
+ return [...i.filter((o) => !o.inverted), ...i.filter((o) => o.inverted)];
102
100
  }
103
- function ae(e) {
101
+ function ue(e) {
104
102
  if (!e.source) return [];
105
- const { type: t, trace: i, permissionSetName: n } = e.source;
103
+ const { type: t, trace: i, permissionSetName: r } = e.source;
106
104
  if (i && i.length > 0) return i;
107
105
  switch (t) {
108
106
  case "permissionSet":
109
- return n ? [n] : [];
107
+ return r ? [r] : [];
110
108
  case "custom":
111
109
  return ["custom"];
112
110
  default:
@@ -116,40 +114,40 @@ function ae(e) {
116
114
  function X(e, t) {
117
115
  return Array.isArray(e) ? e.includes(t) : e === t;
118
116
  }
119
- function ue(e) {
117
+ function ce(e) {
120
118
  return Array.isArray(e) ? e[0] : e;
121
119
  }
122
- function Te(e, t) {
123
- const i = t.find((r) => X(r.subject, e));
120
+ function Fe(e, t) {
121
+ const i = t.find((n) => X(n.subject, e));
124
122
  if (!(i != null && i.category) || i.isCategoryCover) return;
125
- const n = t.find((r) => r.category === i.category && r.isCategoryCover);
126
- if (n)
127
- return ue(n.subject);
123
+ const r = t.find((n) => n.category === i.category && n.isCategoryCover);
124
+ if (r)
125
+ return ce(r.subject);
128
126
  }
129
- function Le(e, t) {
130
- const i = t.find((n) => X(n.subject, e));
127
+ function Te(e, t) {
128
+ const i = t.find((r) => X(r.subject, e));
131
129
  return !!(i != null && i.isCategoryCover);
132
130
  }
133
131
  function Z(e, t, i = /* @__PURE__ */ new Set()) {
134
- var n;
135
- const r = [];
132
+ var r;
133
+ const n = [];
136
134
  for (const s of e) {
137
135
  if (i.has(s)) continue;
138
136
  i.add(s);
139
- const o = t.find((a) => a.id === s);
140
- o && (r.push(o), (n = o.permissionSetIds) != null && n.length && r.push(...Z(o.permissionSetIds, t, i)));
137
+ const a = t.find((o) => o.id === s);
138
+ a && (n.push(a), (r = a.permissionSetIds) != null && r.length && n.push(...Z(a.permissionSetIds, t, i)));
141
139
  }
142
- return r;
140
+ return n;
143
141
  }
144
- function ce(e) {
142
+ function le(e) {
145
143
  const t = Y(e).map(
146
- ({ setNames: r, setId: s, ...o }) => o
147
- ), i = t.filter((r) => !r.inverted), n = t.filter((r) => r.inverted);
148
- return T(i, n);
144
+ ({ setNames: n, setId: s, ...a }) => a
145
+ ), i = t.filter((n) => !n.inverted), r = t.filter((n) => n.inverted);
146
+ return T(i, r);
149
147
  }
150
- function le(e, t) {
151
- const i = (a, c) => {
152
- const u = { ...a }, l = JSON.parse(u.conditions || "{}");
148
+ function de(e, t) {
149
+ const i = (o, c) => {
150
+ const u = { ...o }, l = JSON.parse(u.conditions || "{}");
153
151
  if (c)
154
152
  if (c.length > 0) {
155
153
  const m = Object.keys(l)[0];
@@ -161,9 +159,9 @@ function le(e, t) {
161
159
  inverted: !0,
162
160
  ...u.conditions && { conditions: JSON.stringify(l) }
163
161
  };
164
- }, n = new Map(e.map((a) => [a.subject, a])), r = new Map(t.map((a) => [a.subject, a])), s = [], o = /* @__PURE__ */ new Set([...n.keys(), ...r.keys()]);
165
- for (const a of o) {
166
- const c = n.get(a), u = r.get(a);
162
+ }, r = new Map(e.map((o) => [o.subject, o])), n = new Map(t.map((o) => [o.subject, o])), s = [], a = /* @__PURE__ */ new Set([...r.keys(), ...n.keys()]);
163
+ for (const o of a) {
164
+ const c = r.get(o), u = n.get(o);
167
165
  if (c && u) {
168
166
  if (c.conditions && u.conditions) {
169
167
  const l = JSON.parse(c.conditions), m = JSON.parse(u.conditions);
@@ -213,120 +211,120 @@ function le(e, t) {
213
211
  }
214
212
  return s;
215
213
  }
216
- function de(e) {
214
+ function me(e) {
217
215
  const t = G(
218
216
  e,
219
- z
217
+ K
220
218
  ), i = new Set(
221
- t.filter((r) => {
219
+ t.filter((n) => {
222
220
  var s;
223
- return ((s = r.source) == null ? void 0 : s.type) === "systemPermissionSet" && !r.inverted;
224
- }).map((r) => r.subject)
225
- ), n = new Set(
221
+ return ((s = n.source) == null ? void 0 : s.type) === "systemPermissionSet" && !n.inverted;
222
+ }).map((n) => n.subject)
223
+ ), r = new Set(
226
224
  t.filter(
227
- (r) => {
225
+ (n) => {
228
226
  var s;
229
- return ((s = r.source) == null ? void 0 : s.type) === "systemPermissionSet" && !r.inverted && r.actions.includes("manage");
227
+ return ((s = n.source) == null ? void 0 : s.type) === "systemPermissionSet" && !n.inverted && n.actions.includes("manage");
230
228
  }
231
- ).map((r) => r.subject)
229
+ ).map((n) => n.subject)
232
230
  );
233
- return e.filter((r) => r.inverted ? !(i.has(r.subject) && !n.has(r.subject)) : !i.has(r.subject));
231
+ return e.filter((n) => n.inverted ? !(i.has(n.subject) && !r.has(n.subject)) : !i.has(n.subject));
234
232
  }
235
- const me = "business::report::";
236
- function fe(e, t) {
237
- const i = [], n = e.filter((r) => {
238
- const s = r.subject;
239
- return !s.startsWith(me) || t.has(s) ? !0 : (i.push(s), !1);
233
+ const fe = "business::report::";
234
+ function pe(e, t) {
235
+ const i = [], r = e.filter((n) => {
236
+ const s = n.subject;
237
+ return !s.startsWith(fe) || t.has(s) ? !0 : (i.push(s), !1);
240
238
  });
241
- return i.length > 0 && console.warn("[filterStalePermissions] dropped stale report permissions:", i), n;
239
+ return i.length > 0 && console.warn("[filterStalePermissions] dropped stale report permissions:", i), r;
242
240
  }
243
- const pe = "business::report::reports::", ge = h.Subject.Business.report_reports_allDefaultReports, be = h.Subject.Business.report_reports_allCustomReports;
244
- function he(e, t) {
241
+ const ge = "business::report::reports::", be = h.Subject.Business.report_reports_allDefaultReports, he = h.Subject.Business.report_reports_allCustomReports;
242
+ function ve(e, t) {
245
243
  return e.conditions ? !!t.conditions && e.conditions === t.conditions : !t.conditions;
246
244
  }
247
- function ve(e, t) {
245
+ function Se(e, t) {
248
246
  const i = e.find(
249
- (o) => !o.inverted && o.subject === ge
250
- ), n = e.find(
251
- (o) => !o.inverted && o.subject === be
247
+ (a) => !a.inverted && a.subject === be
248
+ ), r = e.find(
249
+ (a) => !a.inverted && a.subject === he
252
250
  );
253
- if (!i && !n) return e;
254
- const r = i ? new Set(i.actions) : null, s = n ? new Set(n.actions) : null;
255
- return e.reduce((o, a) => {
256
- if (a.inverted)
257
- return o.push(a), o;
258
- const c = a.subject;
259
- if (!c.startsWith(pe))
260
- return o.push(a), o;
261
- const u = t.has(c), l = u ? r : s, m = u ? i : n;
262
- if (!l || !m || !he(m, a))
263
- return o.push(a), o;
264
- if (l.has("manage")) return o;
265
- const d = a.actions;
251
+ if (!i && !r) return e;
252
+ const n = i ? new Set(i.actions) : null, s = r ? new Set(r.actions) : null;
253
+ return e.reduce((a, o) => {
254
+ if (o.inverted)
255
+ return a.push(o), a;
256
+ const c = o.subject;
257
+ if (!c.startsWith(ge))
258
+ return a.push(o), a;
259
+ const u = t.has(c), l = u ? n : s, m = u ? i : r;
260
+ if (!l || !m || !ve(m, o))
261
+ return a.push(o), a;
262
+ if (l.has("manage")) return a;
263
+ const d = o.actions;
266
264
  if (d.includes("manage"))
267
- return o.push(a), o;
265
+ return a.push(o), a;
268
266
  const f = new Set(d);
269
267
  for (const p of l)
270
268
  f.delete(p);
271
- return f.size === 0 || o.push({ ...a, actions: Array.from(f) }), o;
269
+ return f.size === 0 || a.push({ ...o, actions: Array.from(f) }), a;
272
270
  }, []);
273
271
  }
274
272
  function T(e, t) {
275
- var i, n;
276
- const r = new Map(e.map((s) => [s.subject, s]));
273
+ var i, r;
274
+ const n = new Map(e.map((s) => [s.subject, s]));
277
275
  for (const s of t) {
278
276
  if (s.inverted) {
279
- const a = r.get(s.subject);
277
+ const o = n.get(s.subject);
280
278
  if (s.conditions) {
281
- if (a != null && a.conditions) {
282
- const c = JSON.parse(a.conditions), u = JSON.parse(s.conditions);
279
+ if (o != null && o.conditions) {
280
+ const c = JSON.parse(o.conditions), u = JSON.parse(s.conditions);
283
281
  if (!w(c) || !w(u)) {
284
- r.delete(s.subject);
282
+ n.delete(s.subject);
285
283
  continue;
286
284
  }
287
- const l = Object.keys(u)[0], m = ((i = u[l]) == null ? void 0 : i.$in) ?? [], d = (((n = c[l]) == null ? void 0 : n.$in) ?? []).filter((f) => !m.includes(f));
288
- d.length > 0 ? r.set(s.subject, {
289
- ...a,
285
+ const l = Object.keys(u)[0], m = ((i = u[l]) == null ? void 0 : i.$in) ?? [], d = (((r = c[l]) == null ? void 0 : r.$in) ?? []).filter((f) => !m.includes(f));
286
+ d.length > 0 ? n.set(s.subject, {
287
+ ...o,
290
288
  conditions: JSON.stringify({ [l]: { $in: d } })
291
- }) : r.delete(s.subject);
289
+ }) : n.delete(s.subject);
292
290
  } else
293
- r.delete(s.subject);
291
+ n.delete(s.subject);
294
292
  continue;
295
293
  }
296
- if (a) {
297
- const c = new Set(s.actions), u = a.actions.filter((l) => !c.has(l));
298
- u.length > 0 ? r.set(s.subject, { ...a, actions: u }) : r.delete(s.subject);
294
+ if (o) {
295
+ const c = new Set(s.actions), u = o.actions.filter((l) => !c.has(l));
296
+ u.length > 0 ? n.set(s.subject, { ...o, actions: u }) : n.delete(s.subject);
299
297
  continue;
300
298
  }
301
299
  continue;
302
300
  }
303
301
  if (s.conditions) {
304
- r.set(s.subject, s);
302
+ n.set(s.subject, s);
305
303
  continue;
306
304
  }
307
- const o = r.get(s.subject);
308
- if (o != null && o.conditions && !w(JSON.parse(o.conditions))) {
309
- r.set(s.subject, s);
305
+ const a = n.get(s.subject);
306
+ if (a != null && a.conditions && !w(JSON.parse(a.conditions))) {
307
+ n.set(s.subject, s);
310
308
  continue;
311
309
  }
312
- if (o) {
313
- const a = [
314
- .../* @__PURE__ */ new Set([...o.actions, ...s.actions])
310
+ if (a) {
311
+ const o = [
312
+ .../* @__PURE__ */ new Set([...a.actions, ...s.actions])
315
313
  ];
316
- r.set(s.subject, {
317
- ...o,
318
- actions: a
314
+ n.set(s.subject, {
315
+ ...a,
316
+ actions: o
319
317
  });
320
318
  } else
321
- r.set(s.subject, s);
319
+ n.set(s.subject, s);
322
320
  }
323
- return Array.from(r.values());
321
+ return Array.from(n.values());
324
322
  }
325
- function Se(e, t) {
326
- const i = T(e, t), n = new Set(e.map((s) => s.subject)), r = t.filter(
327
- (s) => s.inverted && !n.has(s.subject)
323
+ function ye(e, t) {
324
+ const i = T(e, t), r = new Set(e.map((s) => s.subject)), n = t.filter(
325
+ (s) => s.inverted && !r.has(s.subject)
328
326
  );
329
- return [...i, ...r];
327
+ return [...i, ...n];
330
328
  }
331
329
  const q = (e) => JSON.parse(JSON.stringify(e));
332
330
  function ee(e) {
@@ -339,9 +337,9 @@ function te(e) {
339
337
  const t = e.find((i) => i.subject === h.Subject.Business.role);
340
338
  return t ? t.conditions ? JSON.parse(t.conditions).roleId.$in : null : [];
341
339
  }
342
- function ye(e, t) {
340
+ function je(e, t) {
343
341
  const i = q(
344
- e.filter((n) => n.subject !== h.Subject.Business.role)
342
+ e.filter((r) => r.subject !== h.Subject.Business.role)
345
343
  );
346
344
  return t && t.length > 0 && i.push({
347
345
  actions: [h.Action.manage],
@@ -349,8 +347,8 @@ function ye(e, t) {
349
347
  conditions: JSON.stringify({ roleId: { $in: t } })
350
348
  }), i;
351
349
  }
352
- function xe(e, t, { restaurantRoles: i, allRoleIds: n }) {
353
- let r = q(
350
+ function Le(e, t, { restaurantRoles: i, allRoleIds: r }) {
351
+ let n = q(
354
352
  e.filter(
355
353
  (s) => s.subject !== h.Subject.Business.restaurant && s.subject !== h.Subject.Restaurant.restaurant
356
354
  )
@@ -358,74 +356,73 @@ function xe(e, t, { restaurantRoles: i, allRoleIds: n }) {
358
356
  if (!t || t.length > 0) {
359
357
  const {
360
358
  category: s,
361
- showByFeatureFlag: o,
362
- ...a
363
- } = W.restaurant;
364
- r.push(a);
359
+ showByFeatureFlag: a,
360
+ ...o
361
+ } = z.restaurant;
362
+ n.push(o);
365
363
  const c = {
366
364
  actions: [h.Action.manage],
367
365
  subject: h.Subject.Restaurant.restaurant
368
366
  };
369
- t && (c.conditions = JSON.stringify({ restaurantId: { $in: t } })), r.push(c);
367
+ t && (c.conditions = JSON.stringify({ restaurantId: { $in: t } })), n.push(c);
370
368
  }
371
369
  if (t) {
372
370
  const s = [
373
- ...new Set(t.map((o) => i[o] ?? []).flatMap((o) => o))
371
+ ...new Set(t.map((a) => i[a] ?? []).flatMap((a) => a))
374
372
  ];
375
- s.length !== n.length && (r = ye(
376
- r,
377
- (te(e) || n).filter((o) => s.includes(o))
373
+ s.length !== r.length && (n = je(
374
+ n,
375
+ (te(e) || r).filter((a) => s.includes(a))
378
376
  ));
379
377
  }
380
- return r;
378
+ return n;
381
379
  }
382
- function ke(e) {
380
+ function xe(e) {
383
381
  let t = e.userPermissions;
384
- return e.reportSubjects && (t = fe(t, e.reportSubjects)), e.defaultReportSubjects && (t = ve(t, e.defaultReportSubjects)), {
385
- customPermissions: le(
386
- ce(e.inheritedPermissions),
387
- de(t)
382
+ return e.reportSubjects && (t = pe(t, e.reportSubjects)), e.defaultReportSubjects && (t = Se(t, e.defaultReportSubjects)), {
383
+ customPermissions: de(
384
+ le(e.inheritedPermissions),
385
+ me(t)
388
386
  ),
389
- permissions: t.filter((i) => !i.inverted).map((i) => ({ ...i, subject: ne(i.subject) }))
387
+ permissions: t.filter((i) => !i.inverted).map((i) => ({ ...i, subject: re(i.subject) }))
390
388
  };
391
389
  }
392
- const _ = "/permission-sets", J = {
390
+ const J = "/permission-sets", U = {
393
391
  async read() {
394
- return g(await b().get(_));
392
+ return g(await b().get(J));
395
393
  },
396
394
  async create(e) {
397
- return g(await b().post(_, e));
395
+ return g(await b().post(J, e));
398
396
  },
399
397
  async update(e, t) {
400
- return g(await b().put(`${_}/${e}`, t));
398
+ return g(await b().put(`${J}/${e}`, t));
401
399
  },
402
400
  async delete(e) {
403
- return g(await b().delete(`${_}/${e}`));
401
+ return g(await b().delete(`${J}/${e}`));
404
402
  }
405
- }, je = K("hrm-permission-set", () => {
406
- const { currentBusiness: e } = H(), t = v([]), i = v(!1), n = v(null);
407
- async function r() {
408
- var l;
409
- const u = ((l = e.value) == null ? void 0 : l._id) ?? null;
410
- if (n.value !== u)
403
+ }, we = H("hrm-permission-set", () => {
404
+ const e = V(), t = v([]), i = v(!1), r = v(null);
405
+ async function n() {
406
+ const u = e.id.value ?? null;
407
+ if (r.value !== u)
411
408
  try {
412
409
  i.value = !0;
413
- const m = await J.read();
414
- t.value = c(m), n.value = u;
410
+ const l = await U.read();
411
+ t.value = c(l), r.value = u;
415
412
  } finally {
416
413
  i.value = !1;
417
414
  }
418
415
  }
419
416
  async function s(u) {
420
- const l = await J.create(u);
417
+ const l = await U.create(u);
421
418
  t.value = c([...t.value, l]);
422
419
  }
423
- async function o(u, l) {
424
- const m = await J.update(u, l);
420
+ async function a(u, l) {
421
+ const m = await U.update(u, l);
425
422
  t.value = c(t.value.map((d) => d.id === u ? m : d));
426
423
  }
427
- async function a(u) {
428
- await J.delete(u), t.value = c(t.value.filter((l) => l.id !== u));
424
+ async function o(u) {
425
+ await U.delete(u), t.value = c(t.value.filter((l) => l.id !== u));
429
426
  }
430
427
  function c(u) {
431
428
  return u.sort((l, m) => l.name.localeCompare(m.name));
@@ -433,13 +430,13 @@ const _ = "/permission-sets", J = {
433
430
  return {
434
431
  permissionSets: t,
435
432
  isLoading: i,
436
- readPermissionSets: r,
433
+ readPermissionSets: n,
437
434
  createPermissionSet: s,
438
- updatePermissionSet: o,
439
- deletePermissionSet: a
435
+ updatePermissionSet: a,
436
+ deletePermissionSet: o
440
437
  };
441
- }), we = () => {
442
- const e = je();
438
+ }), Pe = () => {
439
+ const e = we();
443
440
  return {
444
441
  ...e,
445
442
  ...Q(e)
@@ -468,45 +465,45 @@ const _ = "/permission-sets", J = {
468
465
  await b().post("/my-permissions/report-manage", { permissionKey: e, label: t })
469
466
  );
470
467
  }
471
- }, Pe = K("hrm-permission-assignment", () => {
468
+ }, $e = H("hrm-permission-assignment", () => {
472
469
  const e = v([]);
473
470
  async function t() {
474
- const a = await I.readAll();
475
- e.value = a;
471
+ const o = await I.readAll();
472
+ e.value = o;
476
473
  }
477
- async function i(a) {
478
- return await I.readByUserId(a);
474
+ async function i(o) {
475
+ return await I.readByUserId(o);
479
476
  }
480
- async function n(a) {
481
- const c = await I.create(a);
477
+ async function r(o) {
478
+ const c = await I.create(o);
482
479
  e.value = [...e.value, c];
483
480
  }
484
- async function r(a, c) {
485
- const u = await I.update(a, c);
486
- e.value = e.value.map((l) => l.id === a ? u : l);
481
+ async function n(o, c) {
482
+ const u = await I.update(o, c);
483
+ e.value = e.value.map((l) => l.id === o ? u : l);
487
484
  }
488
- async function s(a) {
489
- await I.delete(a), e.value = e.value.filter((c) => c.id !== a);
485
+ async function s(o) {
486
+ await I.delete(o), e.value = e.value.filter((c) => c.id !== o);
490
487
  }
491
- function o(a) {
492
- return e.value.find((c) => c.userId === a);
488
+ function a(o) {
489
+ return e.value.find((c) => c.userId === o);
493
490
  }
494
491
  return {
495
492
  permissionAssignments: e,
496
493
  readPermissionAssignments: t,
497
494
  readPermissionAssignmentByUserId: i,
498
- createPermissionAssignment: n,
499
- updatePermissionAssignment: r,
495
+ createPermissionAssignment: r,
496
+ updatePermissionAssignment: n,
500
497
  deletePermissionAssignment: s,
501
- getPermissionAssignmentByUserId: o
498
+ getPermissionAssignmentByUserId: a
502
499
  };
503
- }), $e = () => {
504
- const e = Pe();
500
+ }), Ie = () => {
501
+ const e = $e();
505
502
  return {
506
503
  ...e,
507
504
  ...Q(e)
508
505
  };
509
- }, Ie = {
506
+ }, Oe = {
510
507
  async fetchReportPermissions(e, t) {
511
508
  const i = t ? { lang: t } : {};
512
509
  return g(
@@ -519,33 +516,32 @@ const _ = "/permission-sets", J = {
519
516
  await L().get(`/report-query/hrm/${e}/reports`, { params: i })
520
517
  );
521
518
  }
522
- }, B = v([]), U = v(!1), O = v(!1), R = v(null), D = v(null), M = v(!1);
523
- function Oe() {
524
- const e = H();
519
+ }, O = v([]), B = v(!1), R = v(!1), A = v(null), D = v(null), M = v(!1);
520
+ function Re() {
521
+ const e = V();
525
522
  async function t() {
526
- var s;
527
- const n = (s = e.currentBusiness.value) == null ? void 0 : s.id;
528
- if (!n) return;
529
- const r = localStorage.getItem("locale");
530
- if (R.value !== n && (B.value = [], U.value = !1, O.value = !1, R.value = n, M.value = !1), !(U.value && D.value === r)) {
531
- if (O.value) {
523
+ const r = e.id.value;
524
+ if (!r) return;
525
+ const n = localStorage.getItem("locale");
526
+ if (A.value !== r && (O.value = [], B.value = !1, R.value = !1, A.value = r, M.value = !1), !(B.value && D.value === n)) {
527
+ if (R.value) {
532
528
  M.value = !0;
533
529
  return;
534
530
  }
535
- O.value = !0;
531
+ R.value = !0;
536
532
  try {
537
- const o = await Ie.fetchReportPermissionsForPortal(n, r);
538
- if (R.value !== n) return;
539
- B.value = o, U.value = !0, D.value = r;
540
- } catch (o) {
541
- if (R.value !== n) return;
542
- console.warn("Failed to fetch custom report permissions:", o), B.value = [];
533
+ const s = await Oe.fetchReportPermissionsForPortal(r, n);
534
+ if (A.value !== r) return;
535
+ O.value = s, B.value = !0, D.value = n;
536
+ } catch (s) {
537
+ if (A.value !== r) return;
538
+ console.warn("Failed to fetch custom report permissions:", s), O.value = [];
543
539
  } finally {
544
- R.value === n && (O.value = !1, M.value && (M.value = !1, await t()));
540
+ A.value === r && (R.value = !1, M.value && (M.value = !1, await t()));
545
541
  }
546
542
  }
547
543
  }
548
- const i = C(() => B.value.map(
544
+ const i = E(() => (e.isFoodCourt.value ? O.value.filter((n) => !n.isDefault || ie.has(n.permissionKey)) : O.value).map(
549
545
  (n) => n.isDefault ? {
550
546
  label: n.name,
551
547
  subject: `business::report::reports::${n.permissionKey}`,
@@ -567,23 +563,23 @@ function Oe() {
567
563
  return {
568
564
  fetchCustomReportPermissions: t,
569
565
  customReportPermissions: i,
570
- isLoading: C(() => O.value),
571
- isLoaded: C(() => U.value)
566
+ isLoading: E(() => R.value),
567
+ isLoaded: E(() => B.value)
572
568
  };
573
569
  }
574
- function A(e) {
575
- const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } = Oe(), s = i.getPermissionAssignmentByUserId(e.id), o = Z(
570
+ function N(e) {
571
+ const t = Pe(), i = Ie(), r = ae().restaurants, { customReportPermissions: n } = Re(), s = i.getPermissionAssignmentByUserId(e.id), a = Z(
576
572
  (s == null ? void 0 : s.permissionSetIds) ?? e.permissionSetIds ?? [],
577
573
  t.permissionSets.value
578
- ), a = Y(o).map(
574
+ ), o = Y(a).map(
579
575
  ({ setNames: p, ...S }) => S
580
576
  ), c = s == null ? void 0 : s.customPermissions, u = c ?? e.permissions.map((p) => ({
581
577
  ...p,
582
- subject: N(p.subject)
583
- })), l = T(a, u), m = G(
584
- Se(a, u),
585
- z
586
- ).filter((p) => !p.inverted), d = ee(m), f = d ?? n.value.map((p) => p._id);
578
+ subject: _(p.subject)
579
+ })), l = T(o, u), m = G(
580
+ ye(o, u),
581
+ K
582
+ ).filter((p) => !p.inverted), d = ee(m), f = d ?? r.value.map((p) => p._id);
587
583
  return {
588
584
  doc: e,
589
585
  id: e.id,
@@ -591,29 +587,29 @@ function A(e) {
591
587
  name: e.status === "invited" ? e.name || "-" : e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
592
588
  phoneNumber: e.phoneNumber,
593
589
  email: e.email,
594
- restaurants: V(
590
+ restaurants: W(
595
591
  f.map((p) => {
596
592
  var S;
597
- return ((S = n.value.find((se) => se._id === p)) == null ? void 0 : S.profile.name) ?? "";
593
+ return ((S = r.value.find((se) => se._id === p)) == null ? void 0 : S.profile.name) ?? "";
598
594
  })
599
595
  ),
600
596
  managableRestaurantIds: d,
601
- permissionLabels: Ne(m, r.value),
597
+ permissionLabels: _e(m, n.value),
602
598
  permissions: l,
603
599
  status: e.status ?? "active",
604
600
  loginMethod: e.loginMethod ?? "feedme"
605
601
  };
606
602
  }
607
- const Re = Object.freeze(
608
- Object.values(W)
609
- ), De = {
603
+ const Ae = Object.freeze(
604
+ Object.values(z)
605
+ ), ke = {
610
606
  async readTeamMembers() {
611
607
  return g(
612
608
  await b().get("/portal-users")
613
- ).map(A);
609
+ ).map(N);
614
610
  },
615
611
  async readTeamMembersPage(e) {
616
- var i, n, r, s, o;
612
+ var i, r, n, s, a;
617
613
  const t = g(
618
614
  await b().get("/portal-users/paged", {
619
615
  params: {
@@ -621,30 +617,30 @@ const Re = Object.freeze(
621
617
  offset: e.offset,
622
618
  search: e.search,
623
619
  restaurantIds: (i = e.restaurantIds) != null && i.length ? e.restaurantIds : void 0,
624
- permissionSubjects: (n = e.permissionSubjects) != null && n.length ? e.permissionSubjects : void 0,
625
- permissionSetIds: (r = e.permissionSetIds) != null && r.length ? e.permissionSetIds : void 0,
620
+ permissionSubjects: (r = e.permissionSubjects) != null && r.length ? e.permissionSubjects : void 0,
621
+ permissionSetIds: (n = e.permissionSetIds) != null && n.length ? e.permissionSetIds : void 0,
626
622
  statuses: (s = e.statuses) != null && s.length ? e.statuses : void 0,
627
- loginMethods: (o = e.loginMethods) != null && o.length ? e.loginMethods : void 0
623
+ loginMethods: (a = e.loginMethods) != null && a.length ? e.loginMethods : void 0
628
624
  }
629
625
  })
630
626
  );
631
627
  return {
632
- items: t.items.map(A),
628
+ items: t.items.map(N),
633
629
  total: t.total
634
630
  };
635
631
  },
636
632
  async readTeamMember(e) {
637
- return A(
633
+ return N(
638
634
  g(await b().get(`/portal-users/${e}`))
639
635
  );
640
636
  },
641
637
  async createTeamMember(e) {
642
- return A(
638
+ return N(
643
639
  g(await b().post("/portal-users", e))
644
640
  );
645
641
  },
646
642
  async updateTeamMember(e, t) {
647
- return A(
643
+ return N(
648
644
  g(await b().put(`/portal-users/${e}`, t))
649
645
  );
650
646
  },
@@ -663,15 +659,15 @@ const Re = Object.freeze(
663
659
  )}`;
664
660
  }
665
661
  };
666
- function We(e, t, i) {
667
- if (e.some((o) => o.subject === "all")) return "All";
668
- const n = (i ?? F).filter(
669
- (o) => o.subject === t
670
- ), r = new Set(n.map((o) => $(o).value)), s = e.filter((o) => o.subject === t).filter((o) => r.has($(o).value));
671
- return s.length === n.length ? "All" : s.length === 0 ? "-" : `${s.length} permission allow`;
662
+ function De(e, t, i) {
663
+ if (e.some((a) => a.subject === "all")) return "All";
664
+ const r = (i ?? F).filter(
665
+ (a) => a.subject === t
666
+ ), n = new Set(r.map((a) => $(a).value)), s = e.filter((a) => a.subject === t).filter((a) => n.has($(a).value));
667
+ return s.length === r.length ? "All" : s.length === 0 ? "-" : `${s.length} permission allow`;
672
668
  }
673
669
  function $(e) {
674
- const t = re(e), i = t.subject;
670
+ const t = ne(e), i = t.subject;
675
671
  return {
676
672
  ...t,
677
673
  get conditions() {
@@ -683,8 +679,8 @@ function $(e) {
683
679
  }
684
680
  },
685
681
  get isDiscountOperation() {
686
- var n;
687
- return i === j.F_RULE_SUBJECT.enum.order && ((n = this.conditions) == null ? void 0 : n.operation) === j.F_RULE_ORDER_OPERATION.enum.discount;
682
+ var r;
683
+ return i === j.F_RULE_SUBJECT.enum.order && ((r = this.conditions) == null ? void 0 : r.operation) === j.F_RULE_ORDER_OPERATION.enum.discount;
688
684
  },
689
685
  get isOrderOperation() {
690
686
  return i === j.F_RULE_SUBJECT.enum.order;
@@ -710,97 +706,97 @@ function $(e) {
710
706
  * save (HRM-0027), so it must not look resolvable here either.
711
707
  */
712
708
  get discriminator() {
713
- var n, r;
714
- return this.isOrderOperation ? ((n = this.conditions) == null ? void 0 : n.operation) || void 0 : this.isReportPermission ? ((r = this.conditions) == null ? void 0 : r.name) || void 0 : i.toString();
709
+ var r, n;
710
+ return this.isOrderOperation ? ((r = this.conditions) == null ? void 0 : r.operation) || void 0 : this.isReportPermission ? ((n = this.conditions) == null ? void 0 : n.name) || void 0 : i.toString();
715
711
  },
716
712
  get formatted() {
717
- const n = this.discriminator;
718
- return n === void 0 ? i.toString() : n.endsWith("_") ? n.slice(0, n.length - 1) : n;
713
+ const r = this.discriminator;
714
+ return r === void 0 ? i.toString() : r.endsWith("_") ? r.slice(0, r.length - 1) : r;
719
715
  },
720
716
  get label() {
721
- return t.label || ie(this.formatted);
717
+ return t.label || oe(this.formatted);
722
718
  },
723
719
  get value() {
724
- const n = this.discriminator;
725
- return this.isOrderOperation || this.isReportPermission ? n === void 0 ? i.toString() : `${i}:${n}` : i.toString();
720
+ const r = this.discriminator;
721
+ return this.isOrderOperation || this.isReportPermission ? r === void 0 ? i.toString() : `${i}:${r}` : i.toString();
726
722
  }
727
723
  };
728
724
  }
729
- function ze(e) {
730
- var n, r;
725
+ function We(e) {
726
+ var r, n;
731
727
  const t = e.map((s) => $(s)).find((s) => s.isDiscountOperation);
732
728
  if (!t) return 100;
733
- const i = Number((r = (n = t.conditions) == null ? void 0 : n.adjustment) == null ? void 0 : r.$lte);
729
+ const i = Number((n = (r = t.conditions) == null ? void 0 : r.adjustment) == null ? void 0 : n.$lte);
734
730
  return Number.isFinite(i) ? parseInt((i * 100).toFixed(0)) : 0;
735
731
  }
736
- function Ve(e, t) {
732
+ function ze(e, t) {
737
733
  return t.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: ee(e), roleIds: te(e) };
738
734
  }
739
735
  function Ke(e) {
740
736
  return (e == null ? void 0 : e.some((t) => t.subject === "all")) ?? !1;
741
737
  }
742
- function Qe(e) {
738
+ function Ve(e) {
743
739
  const t = $(e);
744
740
  if (!t.isReportPermission) return;
745
- const { name: i, ...n } = t.conditions ?? {};
746
- return Object.keys(n).length > 0 ? n : void 0;
741
+ const { name: i, ...r } = t.conditions ?? {};
742
+ return Object.keys(r).length > 0 ? r : void 0;
747
743
  }
748
744
  function He(e, t, i) {
749
- return e.flatMap((n) => {
750
- const r = Ae(n);
751
- if (!r) return [];
752
- const s = r.isReportPermission ? i == null ? void 0 : i.get(n) : void 0;
745
+ return e.flatMap((r) => {
746
+ const n = Ne(r);
747
+ if (!n) return [];
748
+ const s = n.isReportPermission ? i == null ? void 0 : i.get(r) : void 0;
753
749
  return [
754
750
  {
755
- subject: r.subject,
756
- actions: r.actions,
751
+ subject: n.subject,
752
+ actions: n.actions,
757
753
  conditions: {
758
- ...r.conditions,
754
+ ...n.conditions,
759
755
  ...s ?? {},
760
- adjustment: r.isDiscountOperation ? { $lte: parseFloat((t / 100).toFixed(2)) } : void 0
756
+ adjustment: n.isDiscountOperation ? { $lte: parseFloat((t / 100).toFixed(2)) } : void 0
761
757
  }
762
758
  }
763
759
  ];
764
760
  });
765
761
  }
766
- function Ae(e) {
767
- const t = e.indexOf(":"), i = t === -1 ? e : e.slice(0, t), n = t === -1 ? void 0 : e.slice(t + 1);
768
- if (t !== -1 && !n) return;
769
- let r;
770
- return n ? (r = F.find((s) => {
762
+ function Ne(e) {
763
+ const t = e.indexOf(":"), i = t === -1 ? e : e.slice(0, t), r = t === -1 ? void 0 : e.slice(t + 1);
764
+ if (t !== -1 && !r) return;
765
+ let n;
766
+ return r ? (n = F.find((s) => {
771
767
  if (s.subject !== i) return !1;
772
- const o = typeof s.conditions == "string" ? JSON.parse(s.conditions) : s.conditions;
773
- return [o == null ? void 0 : o.operation, o == null ? void 0 : o.name].includes(n);
774
- }), !r && i === j.F_RULE_SUBJECT.enum.report && (r = {
768
+ const a = typeof s.conditions == "string" ? JSON.parse(s.conditions) : s.conditions;
769
+ return [a == null ? void 0 : a.operation, a == null ? void 0 : a.name].includes(r);
770
+ }), !n && i === j.F_RULE_SUBJECT.enum.report && (n = {
775
771
  label: "",
776
772
  subject: j.F_RULE_SUBJECT.enum.report,
777
773
  actions: ["read"],
778
- conditions: { name: n },
774
+ conditions: { name: r },
779
775
  inverted: !1,
780
776
  reason: ""
781
- })) : r = F.find((s) => s.subject === i), r ? $(r) : void 0;
777
+ })) : n = F.find((s) => s.subject === i), n ? $(n) : void 0;
782
778
  }
783
- function Ye(e, t) {
779
+ function Qe(e, t) {
784
780
  const i = { values: [], passthrough: [], dropped: [] };
785
- for (const n of e) {
786
- const r = n == null ? void 0 : n.actions;
787
- if (typeof (n == null ? void 0 : n.subject) != "string" || n.subject.trim().length === 0 || !Array.isArray(r) || r.length === 0 || r.some((c) => typeof c != "string" || c.trim().length === 0)) {
788
- i.dropped.push(n);
781
+ for (const r of e) {
782
+ const n = r == null ? void 0 : r.actions;
783
+ if (typeof (r == null ? void 0 : r.subject) != "string" || r.subject.trim().length === 0 || !Array.isArray(n) || n.length === 0 || n.some((c) => typeof c != "string" || c.trim().length === 0)) {
784
+ i.dropped.push(r);
789
785
  continue;
790
786
  }
791
- const s = $(n).value, o = `${j.F_RULE_SUBJECT.enum.report}:`, a = s.startsWith(o) ? s.slice(o.length) : "";
792
- t.has(s) || a && a !== "undefined" ? i.values.push(s) : i.passthrough.push(n);
787
+ const s = $(r).value, a = `${j.F_RULE_SUBJECT.enum.report}:`, o = s.startsWith(a) ? s.slice(a.length) : "";
788
+ t.has(s) || o && o !== "undefined" ? i.values.push(s) : i.passthrough.push(r);
793
789
  }
794
790
  return i;
795
791
  }
796
- function Ne(e, t = []) {
797
- return V(
798
- e.reduce((i, n) => {
799
- const r = Re.find(
800
- (s) => s.subject === n.subject && n.actions.includes("manage")
801
- ) || t.find((s) => s.subject === n.subject);
802
- if (r) {
803
- const s = r.subject === h.Subject.Business.inventory_stock ? "Warehouse Management" : r.label;
792
+ function _e(e, t = []) {
793
+ return W(
794
+ e.reduce((i, r) => {
795
+ const n = Ae.find(
796
+ (s) => s.subject === r.subject && r.actions.includes("manage")
797
+ ) || t.find((s) => s.subject === r.subject);
798
+ if (n) {
799
+ const s = n.subject === h.Subject.Business.inventory_stock ? "Warehouse Management" : n.label;
804
800
  i.push(s);
805
801
  }
806
802
  return i;
@@ -808,36 +804,36 @@ function Ne(e, t = []) {
808
804
  );
809
805
  }
810
806
  export {
811
- me as $,
807
+ fe as $,
812
808
  te as A,
813
- fe as B,
814
- ye as C,
815
- xe as D,
816
- le as E,
817
- Se as H,
809
+ pe as B,
810
+ je as C,
811
+ Le as D,
812
+ de as E,
813
+ ye as H,
818
814
  G as N,
819
815
  Z as P,
820
816
  ee as Q,
821
- ce as R,
822
- de as T,
823
- Te as V,
824
- Le as Y,
825
- Oe as a,
826
- Ve as b,
827
- $e as c,
817
+ le as R,
818
+ me as T,
819
+ Fe as V,
820
+ Te as Y,
821
+ Re as a,
822
+ ze as b,
823
+ Ie as c,
828
824
  He as d,
829
- Qe as e,
830
- We as f,
831
- ze as g,
825
+ Ve as e,
826
+ De as f,
827
+ We as g,
832
828
  Ke as h,
833
- Ie as i,
829
+ Oe as i,
834
830
  Y as j,
835
- Ne as m,
836
- Re as p,
831
+ _e as m,
832
+ Ae as p,
837
833
  $ as r,
838
- Ye as s,
839
- De as t,
840
- we as u,
841
- ve as x,
842
- ke as z
834
+ Qe as s,
835
+ ke as t,
836
+ Pe as u,
837
+ Se as x,
838
+ xe as z
843
839
  };