@feedmepos/mf-hrm-portal 2.2.5-dev.9 → 2.3.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/{ApprovalCodeList-D5l9vIsE.js → ApprovalCodeList-cG0zmQVJ.js} +5 -5
  2. package/dist/{AuditLogList-ByTa5UJY.js → AuditLogList-BTifJhO1.js} +4 -4
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-qr5TwLTK.js} +2 -2
  4. package/dist/{EmployeeList-Bv6ANk-P.js → EmployeeList-DzcMtxJ3.js} +6 -6
  5. package/dist/{GrantUserList-Bt8w3p4j.js → GrantUserList-D5b7tJ8Y.js} +6 -6
  6. package/dist/{Main-DqiGpT4v.js → Main-B2r59IOW.js} +5 -5
  7. package/dist/{Main-DHJcgePj.js → Main-DFwdAWqn.js} +8 -8
  8. package/dist/{Main-DkP8dWgn.js → Main-DkLBemi7.js} +11 -11
  9. package/dist/{PermissionSetList-BIGv1u67.js → PermissionSetList-B80hrfMW.js} +7 -7
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DjNcJQM9.js +4167 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fe-Rdwn4.js} +1 -1
  12. package/dist/{RoleList-CH6NDKPU.js → RoleList-DHO4JRKF.js} +9 -9
  13. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B-XtB64L.js +452 -0
  14. package/dist/ScheduleGeneralPage-WlBM8bxV.js +629 -0
  15. package/dist/SchedulePage-Nm0krGVU.js +17056 -0
  16. package/dist/SchedulePositionPage-C0hrO11d.js +263 -0
  17. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js +1150 -0
  18. package/dist/{TeamMemberList-BwfG3go2.js → TeamMemberList-CgFWLRBM.js} +10 -10
  19. package/dist/{TimesheetList-DcoqzbLO.js → TimesheetList-Dp40G-0I.js} +7 -7
  20. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BFjrMhUG.js} +3 -3
  21. package/dist/{app-BcZ6C8M8.js → app-CmBSTvaI.js} +851 -739
  22. package/dist/app.js +1 -1
  23. package/dist/{approval-code-jIjkeVEb.js → approval-code-C9DmR4Md.js} +1 -1
  24. package/dist/{dayjs.min-Ch0iysTG.js → dayjs.min-CfL2DQ3d.js} +1 -1
  25. package/dist/{employee-DwYHFacQ.js → employee-DQcHjoij.js} +4 -4
  26. package/dist/{grant-user-SNiDV22U.js → grant-user-Bv-pJ9Wt.js} +1 -1
  27. package/dist/{iteration-D1uWLp0V.js → iteration-BlavheWG.js} +1 -1
  28. package/dist/{lodash-DErxm7xf.js → lodash-QerqayrJ.js} +1 -1
  29. package/dist/{restaurant-BTpBmfBV.js → restaurant-D7PEQjPY.js} +257 -251
  30. package/dist/{role-B9VanAny.js → role-RM2YLO7n.js} +2 -2
  31. package/dist/{rule-C4f_Ilzr.js → rule-DjlvYIuP.js} +3 -3
  32. package/dist/src/api/restaurant/index.d.ts +2 -0
  33. package/dist/src/api/schedule/index.d.ts +12 -2
  34. package/dist/src/composables/useMessage.d.ts +8 -2
  35. package/dist/src/types/schedule.d.ts +10 -218
  36. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +2 -0
  37. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +11 -0
  38. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  39. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  40. package/dist/src/views/scheduling/components/{ScheduleLegendBar.vue.d.ts → ScheduleCoach.vue.d.ts} +2 -2
  41. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +9 -1
  42. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  43. package/dist/src/views/scheduling/components/ScheduleExportDoneDialog.vue.d.ts +6 -0
  44. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +0 -2
  45. package/dist/src/views/scheduling/components/ScheduleOnboardingComplete.vue.d.ts +10 -0
  46. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  47. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +1 -2
  48. package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +2 -2
  49. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +6 -6
  50. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +2 -0
  51. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +0 -2
  52. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +6 -6
  53. package/dist/src/views/scheduling/components/ScheduleTourAllSet.vue.d.ts +6 -0
  54. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +33 -0
  55. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +5 -0
  56. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  57. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +50 -0
  58. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +8 -2
  59. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +22 -1
  60. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +3 -0
  61. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +2 -8
  62. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +12 -0
  63. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +11 -8
  64. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +10 -2
  65. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +13 -0
  66. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +158 -12
  67. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +110 -13
  68. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +11 -1
  69. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +19 -0
  70. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  71. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -3
  72. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +24 -1
  73. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +4 -2
  74. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +33 -1
  75. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +17 -0
  76. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +1 -3
  77. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +20 -31
  78. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  79. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  80. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +327 -75
  81. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +5 -3
  82. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  83. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +20 -0
  84. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +18 -0
  85. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +2 -0
  86. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +0 -5
  87. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +25 -0
  88. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +53 -1
  89. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +7 -4
  90. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +8 -9
  91. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +63 -92
  92. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +30 -2
  93. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +5 -11
  94. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +0 -1
  95. package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +4 -4
  96. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +93 -0
  97. package/dist/src/views/scheduling/data.d.ts +6 -19
  98. package/dist/src/views/scheduling/locales/index.d.ts +116 -4
  99. package/dist/src/views/scheduling/schedule-state.d.ts +679 -0
  100. package/dist/src/views/scheduling/schedule-store.d.ts +16 -60
  101. package/dist/src/views/scheduling/types.d.ts +29 -2
  102. package/dist/style.css +1 -1
  103. package/dist/tsconfig.app.tsbuildinfo +1 -1
  104. package/dist/{useAppStore-DCwd8GWN.js → useAppStore-d_nHyK5u.js} +1 -1
  105. package/dist/{useLoading-CXzTpIVv.js → useLoading-JFoghhRz.js} +1 -1
  106. package/dist/{useReportPermissions-CTr56kBo.js → useReportPermissions-Bl6Br79r.js} +3 -3
  107. package/package.json +3 -2
  108. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js +0 -4167
  109. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js +0 -426
  110. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js +0 -690
  111. package/dist/ScheduleGeneralPage-DJPENJZ2.js +0 -320
  112. package/dist/SchedulePage-C1egcbIC.js +0 -14421
  113. package/dist/SchedulePositionPage-OhL_hsqG.js +0 -293
  114. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +0 -242
  115. package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +0 -21
  116. package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +0 -35
@@ -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
3
  var Yt = (e, t, s) => Ka(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as fn, computed as qs, h as Ht, defineComponent as at, createBlock as $t, renderSlot as ks, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as Ts, createElementVNode as Qe, toDisplayString as sn, watch as er, nextTick as hn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Xs, withCtx as nr, createVNode as ar, defineAsyncComponent as rr, readonly as Ds } from "vue";
4
+ import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as Rt, defineComponent as at, createBlock as $t, renderSlot as qs, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as Ts, createElementVNode as Qe, toDisplayString as sn, watch as er, nextTick as fn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Xs, 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";
@@ -96,7 +96,7 @@ const x = U.arrayToEnum([
96
96
  default:
97
97
  return x.unknown;
98
98
  }
99
- }, C = U.arrayToEnum([
99
+ }, M = U.arrayToEnum([
100
100
  "invalid_type",
101
101
  "invalid_literal",
102
102
  "custom",
@@ -113,7 +113,7 @@ const x = U.arrayToEnum([
113
113
  "invalid_intersection_types",
114
114
  "not_multiple_of"
115
115
  ]), ur = (e) => JSON.stringify(e, null, 2).replace(/"([^"]+)":/g, "$1:");
116
- class qe extends Error {
116
+ class Ie extends Error {
117
117
  constructor(t) {
118
118
  super(), this.issues = [], this.addIssue = (n) => {
119
119
  this.issues = [...this.issues, n];
@@ -140,10 +140,10 @@ class qe extends Error {
140
140
  else if (l.path.length === 0)
141
141
  n._errors.push(s(l));
142
142
  else {
143
- let c = n, f = 0;
144
- for (; f < l.path.length; ) {
145
- const y = l.path[f];
146
- f === l.path.length - 1 ? (c[y] = c[y] || { _errors: [] }, c[y]._errors.push(s(l))) : c[y] = c[y] || { _errors: [] }, c = c[y], f++;
143
+ let c = n, h = 0;
144
+ for (; h < l.path.length; ) {
145
+ const y = l.path[h];
146
+ h === l.path.length - 1 ? (c[y] = c[y] || { _errors: [] }, c[y]._errors.push(s(l))) : c[y] = c[y] || { _errors: [] }, c = c[y], h++;
147
147
  }
148
148
  }
149
149
  };
@@ -168,53 +168,53 @@ class qe extends Error {
168
168
  return this.flatten();
169
169
  }
170
170
  }
171
- qe.create = (e) => new qe(e);
171
+ Ie.create = (e) => new Ie(e);
172
172
  const jt = (e, t) => {
173
173
  let s;
174
174
  switch (e.code) {
175
- case C.invalid_type:
175
+ case M.invalid_type:
176
176
  e.received === x.undefined ? s = "Required" : s = `Expected ${e.expected}, received ${e.received}`;
177
177
  break;
178
- case C.invalid_literal:
178
+ case M.invalid_literal:
179
179
  s = `Invalid literal value, expected ${JSON.stringify(e.expected, Qs)}`;
180
180
  break;
181
- case C.unrecognized_keys:
181
+ case M.unrecognized_keys:
182
182
  s = `Unrecognized key(s) in object: ${U.joinValues(e.keys, ", ")}`;
183
183
  break;
184
- case C.invalid_union:
184
+ case M.invalid_union:
185
185
  s = "Invalid input";
186
186
  break;
187
- case C.invalid_union_discriminator:
187
+ case M.invalid_union_discriminator:
188
188
  s = `Invalid discriminator value. Expected ${U.joinValues(e.options)}`;
189
189
  break;
190
- case C.invalid_enum_value:
190
+ case M.invalid_enum_value:
191
191
  s = `Invalid enum value. Expected ${U.joinValues(e.options)}, received '${e.received}'`;
192
192
  break;
193
- case C.invalid_arguments:
193
+ case M.invalid_arguments:
194
194
  s = "Invalid function arguments";
195
195
  break;
196
- case C.invalid_return_type:
196
+ case M.invalid_return_type:
197
197
  s = "Invalid function return type";
198
198
  break;
199
- case C.invalid_date:
199
+ case M.invalid_date:
200
200
  s = "Invalid date";
201
201
  break;
202
- case C.invalid_string:
202
+ case M.invalid_string:
203
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}"` : U.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
204
204
  break;
205
- case C.too_small:
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";
207
207
  break;
208
- case C.too_big:
208
+ case M.too_big:
209
209
  e.type === "array" ? s = `Array must contain ${e.inclusive ? "at most" : "less than"} ${e.maximum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at most" : "under"} ${e.maximum} character(s)` : e.type === "number" ? s = `Number must be less than ${e.inclusive ? "or equal to " : ""}${e.maximum}` : e.type === "date" ? s = `Date must be smaller than ${e.inclusive ? "or equal to " : ""}${new Date(e.maximum)}` : s = "Invalid input";
210
210
  break;
211
- case C.custom:
211
+ case M.custom:
212
212
  s = "Invalid input";
213
213
  break;
214
- case C.invalid_intersection_types:
214
+ case M.invalid_intersection_types:
215
215
  s = "Intersection results could not be merged";
216
216
  break;
217
- case C.not_multiple_of:
217
+ case M.not_multiple_of:
218
218
  s = `Number must be a multiple of ${e.multipleOf}`;
219
219
  break;
220
220
  default:
@@ -226,17 +226,17 @@ let Bn = jt;
226
226
  function dr(e) {
227
227
  Bn = e;
228
228
  }
229
- function It() {
229
+ function Ht() {
230
230
  return Bn;
231
231
  }
232
- const qt = (e) => {
232
+ const It = (e) => {
233
233
  const { data: t, path: s, errorMaps: n, issueData: a } = e, r = [...s, ...a.path || []], l = {
234
234
  ...a,
235
235
  path: r
236
236
  };
237
237
  let c = "";
238
- const f = n.filter((y) => !!y).slice().reverse();
239
- for (const y of f)
238
+ const h = n.filter((y) => !!y).slice().reverse();
239
+ for (const y of h)
240
240
  c = y(l, { data: t, defaultError: c }).message;
241
241
  return {
242
242
  ...a,
@@ -245,14 +245,14 @@ const qt = (e) => {
245
245
  };
246
246
  }, Ar = [];
247
247
  function P(e, t) {
248
- const s = qt({
248
+ const s = It({
249
249
  issueData: t,
250
250
  data: e.data,
251
251
  path: e.path,
252
252
  errorMaps: [
253
253
  e.common.contextualErrorMap,
254
254
  e.schemaErrorMap,
255
- It(),
255
+ Ht(),
256
256
  jt
257
257
  ].filter((n) => !!n)
258
258
  });
@@ -272,7 +272,7 @@ class le {
272
272
  const n = [];
273
273
  for (const a of s) {
274
274
  if (a.status === "aborted")
275
- return q;
275
+ return I;
276
276
  a.status === "dirty" && t.dirty(), n.push(a.value);
277
277
  }
278
278
  return { status: t.value, value: n };
@@ -291,15 +291,15 @@ class le {
291
291
  for (const a of s) {
292
292
  const { key: r, value: l } = a;
293
293
  if (r.status === "aborted" || l.status === "aborted")
294
- return q;
294
+ return I;
295
295
  r.status === "dirty" && t.dirty(), l.status === "dirty" && t.dirty(), (typeof l.value < "u" || a.alwaysSet) && (n[r.value] = l.value);
296
296
  }
297
297
  return { status: t.value, value: n };
298
298
  }
299
299
  }
300
- const q = Object.freeze({
300
+ const I = Object.freeze({
301
301
  status: "aborted"
302
- }), mr = (e) => ({ status: "dirty", value: e }), ce = (e) => ({ status: "valid", value: e }), js = (e) => e.status === "aborted", Es = (e) => e.status === "dirty", kt = (e) => e.status === "valid", Ps = (e) => typeof Promise !== void 0 && e instanceof Promise, Qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
302
+ }), mr = (e) => ({ status: "dirty", value: e }), ce = (e) => ({ status: "valid", value: e }), js = (e) => e.status === "aborted", Es = (e) => e.status === "dirty", qt = (e) => e.status === "valid", Ps = (e) => typeof Promise !== void 0 && e instanceof Promise, Qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
303
303
  var N;
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;
@@ -313,11 +313,11 @@ class Ye {
313
313
  }
314
314
  }
315
315
  const nn = (e, t) => {
316
- if (kt(t))
316
+ if (qt(t))
317
317
  return { success: !0, data: t.value };
318
318
  if (!e.common.issues.length)
319
319
  throw new Error("Validation failed but no issues detected.");
320
- return { success: !1, error: new qe(e.common.issues) };
320
+ return { success: !1, error: new Ie(e.common.issues) };
321
321
  };
322
322
  function X(e) {
323
323
  if (!e)
@@ -417,10 +417,10 @@ class T {
417
417
  const n = (a) => typeof s == "string" || typeof s > "u" ? { message: s } : typeof s == "function" ? s(a) : s;
418
418
  return this._refinement((a, r) => {
419
419
  const l = t(a), c = () => r.addIssue({
420
- code: C.custom,
420
+ code: M.custom,
421
421
  ...n(a)
422
422
  });
423
- return typeof Promise < "u" && l instanceof Promise ? l.then((f) => f ? !0 : (c(), !1)) : l ? !0 : (c(), !1);
423
+ return typeof Promise < "u" && l instanceof Promise ? l.then((h) => h ? !0 : (c(), !1)) : l ? !0 : (c(), !1);
424
424
  });
425
425
  }
426
426
  refinement(t, s) {
@@ -429,7 +429,7 @@ class T {
429
429
  _refinement(t) {
430
430
  return new Se({
431
431
  schema: this,
432
- typeName: I.ZodEffects,
432
+ typeName: H.ZodEffects,
433
433
  effect: { type: "refinement", refinement: t }
434
434
  });
435
435
  }
@@ -457,7 +457,7 @@ class T {
457
457
  transform(t) {
458
458
  return new Se({
459
459
  schema: this,
460
- typeName: I.ZodEffects,
460
+ typeName: H.ZodEffects,
461
461
  effect: { type: "transform", transform: t }
462
462
  });
463
463
  }
@@ -466,7 +466,7 @@ class T {
466
466
  return new Ns({
467
467
  innerType: this,
468
468
  defaultValue: s,
469
- typeName: I.ZodDefault
469
+ typeName: H.ZodDefault
470
470
  });
471
471
  }
472
472
  describe(t) {
@@ -483,12 +483,12 @@ class T {
483
483
  return this.safeParse(null).success;
484
484
  }
485
485
  }
486
- const gr = /^c[^\s-]{8,}$/i, pr = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i, fr = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
486
+ const gr = /^c[^\s-]{8,}$/i, pr = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i, hr = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
487
487
  class ze extends T {
488
488
  constructor() {
489
489
  super(...arguments), this._regex = (t, s, n) => this.refinement((a) => t.test(a), {
490
490
  validation: s,
491
- code: C.invalid_string,
491
+ code: M.invalid_string,
492
492
  ...N.errToObj(n)
493
493
  }), this.nonempty = (t) => this.min(1, N.errToObj(t)), this.trim = () => new ze({
494
494
  ...this._def,
@@ -501,19 +501,19 @@ class ze extends T {
501
501
  return P(
502
502
  r,
503
503
  {
504
- code: C.invalid_type,
504
+ code: M.invalid_type,
505
505
  expected: x.string,
506
506
  received: r.parsedType
507
507
  }
508
508
  //
509
- ), q;
509
+ ), I;
510
510
  }
511
511
  const n = new le();
512
512
  let a;
513
513
  for (const r of this._def.checks)
514
514
  if (r.kind === "min")
515
515
  t.data.length < r.value && (a = this._getOrReturnCtx(t, a), P(a, {
516
- code: C.too_small,
516
+ code: M.too_small,
517
517
  minimum: r.value,
518
518
  type: "string",
519
519
  inclusive: !0,
@@ -521,28 +521,28 @@ class ze extends T {
521
521
  }), n.dirty());
522
522
  else if (r.kind === "max")
523
523
  t.data.length > r.value && (a = this._getOrReturnCtx(t, a), P(a, {
524
- code: C.too_big,
524
+ code: M.too_big,
525
525
  maximum: r.value,
526
526
  type: "string",
527
527
  inclusive: !0,
528
528
  message: r.message
529
529
  }), n.dirty());
530
530
  else if (r.kind === "email")
531
- fr.test(t.data) || (a = this._getOrReturnCtx(t, a), P(a, {
531
+ hr.test(t.data) || (a = this._getOrReturnCtx(t, a), P(a, {
532
532
  validation: "email",
533
- code: C.invalid_string,
533
+ code: M.invalid_string,
534
534
  message: r.message
535
535
  }), n.dirty());
536
536
  else if (r.kind === "uuid")
537
537
  pr.test(t.data) || (a = this._getOrReturnCtx(t, a), P(a, {
538
538
  validation: "uuid",
539
- code: C.invalid_string,
539
+ code: M.invalid_string,
540
540
  message: r.message
541
541
  }), n.dirty());
542
542
  else if (r.kind === "cuid")
543
543
  gr.test(t.data) || (a = this._getOrReturnCtx(t, a), P(a, {
544
544
  validation: "cuid",
545
- code: C.invalid_string,
545
+ code: M.invalid_string,
546
546
  message: r.message
547
547
  }), n.dirty());
548
548
  else if (r.kind === "url")
@@ -551,20 +551,20 @@ class ze extends T {
551
551
  } catch {
552
552
  a = this._getOrReturnCtx(t, a), P(a, {
553
553
  validation: "url",
554
- code: C.invalid_string,
554
+ code: M.invalid_string,
555
555
  message: r.message
556
556
  }), n.dirty();
557
557
  }
558
558
  else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(t.data) || (a = this._getOrReturnCtx(t, a), P(a, {
559
559
  validation: "regex",
560
- code: C.invalid_string,
560
+ code: M.invalid_string,
561
561
  message: r.message
562
562
  }), n.dirty())) : r.kind === "trim" ? t.data = t.data.trim() : r.kind === "startsWith" ? t.data.startsWith(r.value) || (a = this._getOrReturnCtx(t, a), P(a, {
563
- code: C.invalid_string,
563
+ code: M.invalid_string,
564
564
  validation: { startsWith: r.value },
565
565
  message: r.message
566
566
  }), n.dirty()) : r.kind === "endsWith" ? t.data.endsWith(r.value) || (a = this._getOrReturnCtx(t, a), P(a, {
567
- code: C.invalid_string,
567
+ code: M.invalid_string,
568
568
  validation: { endsWith: r.value },
569
569
  message: r.message
570
570
  }), n.dirty()) : U.assertNever(r);
@@ -653,10 +653,10 @@ class ze extends T {
653
653
  }
654
654
  ze.create = (e) => new ze({
655
655
  checks: [],
656
- typeName: I.ZodString,
656
+ typeName: H.ZodString,
657
657
  ...X(e)
658
658
  });
659
- function hr(e, t) {
659
+ function fr(e, t) {
660
660
  const s = (e.toString().split(".")[1] || "").length, n = (t.toString().split(".")[1] || "").length, a = s > n ? s : n, r = parseInt(e.toFixed(a).replace(".", "")), l = parseInt(t.toFixed(a).replace(".", ""));
661
661
  return r % l / Math.pow(10, a);
662
662
  }
@@ -668,33 +668,33 @@ class et extends T {
668
668
  if (this._getType(t) !== x.number) {
669
669
  const r = this._getOrReturnCtx(t);
670
670
  return P(r, {
671
- code: C.invalid_type,
671
+ code: M.invalid_type,
672
672
  expected: x.number,
673
673
  received: r.parsedType
674
- }), q;
674
+ }), I;
675
675
  }
676
676
  let n;
677
677
  const a = new le();
678
678
  for (const r of this._def.checks)
679
679
  r.kind === "int" ? U.isInteger(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
680
- code: C.invalid_type,
680
+ code: M.invalid_type,
681
681
  expected: "integer",
682
682
  received: "float",
683
683
  message: r.message
684
684
  }), a.dirty()) : r.kind === "min" ? (r.inclusive ? t.data < r.value : t.data <= r.value) && (n = this._getOrReturnCtx(t, n), P(n, {
685
- code: C.too_small,
685
+ code: M.too_small,
686
686
  minimum: r.value,
687
687
  type: "number",
688
688
  inclusive: r.inclusive,
689
689
  message: r.message
690
690
  }), a.dirty()) : r.kind === "max" ? (r.inclusive ? t.data > r.value : t.data >= r.value) && (n = this._getOrReturnCtx(t, n), P(n, {
691
- code: C.too_big,
691
+ code: M.too_big,
692
692
  maximum: r.value,
693
693
  type: "number",
694
694
  inclusive: r.inclusive,
695
695
  message: r.message
696
- }), a.dirty()) : r.kind === "multipleOf" ? hr(t.data, r.value) !== 0 && (n = this._getOrReturnCtx(t, n), P(n, {
697
- code: C.not_multiple_of,
696
+ }), a.dirty()) : r.kind === "multipleOf" ? fr(t.data, r.value) !== 0 && (n = this._getOrReturnCtx(t, n), P(n, {
697
+ code: M.not_multiple_of,
698
698
  multipleOf: r.value,
699
699
  message: r.message
700
700
  }), a.dirty()) : U.assertNever(r);
@@ -795,7 +795,7 @@ class et extends T {
795
795
  }
796
796
  et.create = (e) => new et({
797
797
  checks: [],
798
- typeName: I.ZodNumber,
798
+ typeName: H.ZodNumber,
799
799
  ...X(e)
800
800
  });
801
801
  class Tt extends T {
@@ -803,16 +803,16 @@ class Tt extends T {
803
803
  if (this._getType(t) !== x.bigint) {
804
804
  const n = this._getOrReturnCtx(t);
805
805
  return P(n, {
806
- code: C.invalid_type,
806
+ code: M.invalid_type,
807
807
  expected: x.bigint,
808
808
  received: n.parsedType
809
- }), q;
809
+ }), I;
810
810
  }
811
811
  return ce(t.data);
812
812
  }
813
813
  }
814
814
  Tt.create = (e) => new Tt({
815
- typeName: I.ZodBigInt,
815
+ typeName: H.ZodBigInt,
816
816
  ...X(e)
817
817
  });
818
818
  class Xt extends T {
@@ -820,16 +820,16 @@ class Xt extends T {
820
820
  if (this._getType(t) !== x.boolean) {
821
821
  const n = this._getOrReturnCtx(t);
822
822
  return P(n, {
823
- code: C.invalid_type,
823
+ code: M.invalid_type,
824
824
  expected: x.boolean,
825
825
  received: n.parsedType
826
- }), q;
826
+ }), I;
827
827
  }
828
828
  return ce(t.data);
829
829
  }
830
830
  }
831
831
  Xt.create = (e) => new Xt({
832
- typeName: I.ZodBoolean,
832
+ typeName: H.ZodBoolean,
833
833
  ...X(e)
834
834
  });
835
835
  class mt extends T {
@@ -837,28 +837,28 @@ class mt extends T {
837
837
  if (this._getType(t) !== x.date) {
838
838
  const r = this._getOrReturnCtx(t);
839
839
  return P(r, {
840
- code: C.invalid_type,
840
+ code: M.invalid_type,
841
841
  expected: x.date,
842
842
  received: r.parsedType
843
- }), q;
843
+ }), I;
844
844
  }
845
845
  if (isNaN(t.data.getTime())) {
846
846
  const r = this._getOrReturnCtx(t);
847
847
  return P(r, {
848
- code: C.invalid_date
849
- }), q;
848
+ code: M.invalid_date
849
+ }), I;
850
850
  }
851
851
  const n = new le();
852
852
  let a;
853
853
  for (const r of this._def.checks)
854
854
  r.kind === "min" ? t.data.getTime() < r.value && (a = this._getOrReturnCtx(t, a), P(a, {
855
- code: C.too_small,
855
+ code: M.too_small,
856
856
  message: r.message,
857
857
  inclusive: !0,
858
858
  minimum: r.value,
859
859
  type: "date"
860
860
  }), n.dirty()) : r.kind === "max" ? t.data.getTime() > r.value && (a = this._getOrReturnCtx(t, a), P(a, {
861
- code: C.too_big,
861
+ code: M.too_big,
862
862
  message: r.message,
863
863
  inclusive: !0,
864
864
  maximum: r.value,
@@ -904,7 +904,7 @@ class mt extends T {
904
904
  }
905
905
  mt.create = (e) => new mt({
906
906
  checks: [],
907
- typeName: I.ZodDate,
907
+ typeName: H.ZodDate,
908
908
  ...X(e)
909
909
  });
910
910
  class Qt extends T {
@@ -912,16 +912,16 @@ class Qt extends T {
912
912
  if (this._getType(t) !== x.undefined) {
913
913
  const n = this._getOrReturnCtx(t);
914
914
  return P(n, {
915
- code: C.invalid_type,
915
+ code: M.invalid_type,
916
916
  expected: x.undefined,
917
917
  received: n.parsedType
918
- }), q;
918
+ }), I;
919
919
  }
920
920
  return ce(t.data);
921
921
  }
922
922
  }
923
923
  Qt.create = (e) => new Qt({
924
- typeName: I.ZodUndefined,
924
+ typeName: H.ZodUndefined,
925
925
  ...X(e)
926
926
  });
927
927
  class Nt extends T {
@@ -929,16 +929,16 @@ class Nt extends T {
929
929
  if (this._getType(t) !== x.null) {
930
930
  const n = this._getOrReturnCtx(t);
931
931
  return P(n, {
932
- code: C.invalid_type,
932
+ code: M.invalid_type,
933
933
  expected: x.null,
934
934
  received: n.parsedType
935
- }), q;
935
+ }), I;
936
936
  }
937
937
  return ce(t.data);
938
938
  }
939
939
  }
940
940
  Nt.create = (e) => new Nt({
941
- typeName: I.ZodNull,
941
+ typeName: H.ZodNull,
942
942
  ...X(e)
943
943
  });
944
944
  class gt extends T {
@@ -950,7 +950,7 @@ class gt extends T {
950
950
  }
951
951
  }
952
952
  gt.create = (e) => new gt({
953
- typeName: I.ZodAny,
953
+ typeName: H.ZodAny,
954
954
  ...X(e)
955
955
  });
956
956
  class Ze extends T {
@@ -962,21 +962,21 @@ class Ze extends T {
962
962
  }
963
963
  }
964
964
  Ze.create = (e) => new Ze({
965
- typeName: I.ZodUnknown,
965
+ typeName: H.ZodUnknown,
966
966
  ...X(e)
967
967
  });
968
968
  class We extends T {
969
969
  _parse(t) {
970
970
  const s = this._getOrReturnCtx(t);
971
971
  return P(s, {
972
- code: C.invalid_type,
972
+ code: M.invalid_type,
973
973
  expected: x.never,
974
974
  received: s.parsedType
975
- }), q;
975
+ }), I;
976
976
  }
977
977
  }
978
978
  We.create = (e) => new We({
979
- typeName: I.ZodNever,
979
+ typeName: H.ZodNever,
980
980
  ...X(e)
981
981
  });
982
982
  class Zt extends T {
@@ -984,16 +984,16 @@ class Zt extends T {
984
984
  if (this._getType(t) !== x.undefined) {
985
985
  const n = this._getOrReturnCtx(t);
986
986
  return P(n, {
987
- code: C.invalid_type,
987
+ code: M.invalid_type,
988
988
  expected: x.void,
989
989
  received: n.parsedType
990
- }), q;
990
+ }), I;
991
991
  }
992
992
  return ce(t.data);
993
993
  }
994
994
  }
995
995
  Zt.create = (e) => new Zt({
996
- typeName: I.ZodVoid,
996
+ typeName: H.ZodVoid,
997
997
  ...X(e)
998
998
  });
999
999
  class Ve extends T {
@@ -1001,18 +1001,18 @@ class Ve extends T {
1001
1001
  const { ctx: s, status: n } = this._processInputParams(t), a = this._def;
1002
1002
  if (s.parsedType !== x.array)
1003
1003
  return P(s, {
1004
- code: C.invalid_type,
1004
+ code: M.invalid_type,
1005
1005
  expected: x.array,
1006
1006
  received: s.parsedType
1007
- }), q;
1007
+ }), I;
1008
1008
  if (a.minLength !== null && s.data.length < a.minLength.value && (P(s, {
1009
- code: C.too_small,
1009
+ code: M.too_small,
1010
1010
  minimum: a.minLength.value,
1011
1011
  type: "array",
1012
1012
  inclusive: !0,
1013
1013
  message: a.minLength.message
1014
1014
  }), n.dirty()), a.maxLength !== null && s.data.length > a.maxLength.value && (P(s, {
1015
- code: C.too_big,
1015
+ code: M.too_big,
1016
1016
  maximum: a.maxLength.value,
1017
1017
  type: "array",
1018
1018
  inclusive: !0,
@@ -1048,7 +1048,7 @@ Ve.create = (e, t) => new Ve({
1048
1048
  type: e,
1049
1049
  minLength: null,
1050
1050
  maxLength: null,
1051
- typeName: I.ZodArray,
1051
+ typeName: H.ZodArray,
1052
1052
  ...X(t)
1053
1053
  });
1054
1054
  var Ut;
@@ -1092,18 +1092,18 @@ class ee extends T {
1092
1092
  if (this._getType(t) !== x.object) {
1093
1093
  const y = this._getOrReturnCtx(t);
1094
1094
  return P(y, {
1095
- code: C.invalid_type,
1095
+ code: M.invalid_type,
1096
1096
  expected: x.object,
1097
1097
  received: y.parsedType
1098
- }), q;
1098
+ }), I;
1099
1099
  }
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 f = [];
1103
+ const h = [];
1104
1104
  for (const y of l) {
1105
1105
  const w = r[y], V = a.data[y];
1106
- f.push({
1106
+ h.push({
1107
1107
  key: { status: "valid", value: y },
1108
1108
  value: w._parse(new Ye(a, V, a.path, y)),
1109
1109
  alwaysSet: y in a.data
@@ -1113,13 +1113,13 @@ class ee extends T {
1113
1113
  const y = this._def.unknownKeys;
1114
1114
  if (y === "passthrough")
1115
1115
  for (const w of c)
1116
- f.push({
1116
+ h.push({
1117
1117
  key: { status: "valid", value: w },
1118
1118
  value: { status: "valid", value: a.data[w] }
1119
1119
  });
1120
1120
  else if (y === "strict")
1121
1121
  c.length > 0 && (P(a, {
1122
- code: C.unrecognized_keys,
1122
+ code: M.unrecognized_keys,
1123
1123
  keys: c
1124
1124
  }), n.dirty());
1125
1125
  else if (y !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
@@ -1127,7 +1127,7 @@ class ee extends T {
1127
1127
  const y = this._def.catchall;
1128
1128
  for (const w of c) {
1129
1129
  const V = a.data[w];
1130
- f.push({
1130
+ h.push({
1131
1131
  key: { status: "valid", value: w },
1132
1132
  value: y._parse(
1133
1133
  new Ye(a, V, a.path, w)
@@ -1139,7 +1139,7 @@ class ee extends T {
1139
1139
  }
1140
1140
  return a.common.async ? Promise.resolve().then(async () => {
1141
1141
  const y = [];
1142
- for (const w of f) {
1142
+ for (const w of h) {
1143
1143
  const V = await w.key;
1144
1144
  y.push({
1145
1145
  key: V,
@@ -1148,7 +1148,7 @@ class ee extends T {
1148
1148
  });
1149
1149
  }
1150
1150
  return y;
1151
- }).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n, f);
1151
+ }).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n, h);
1152
1152
  }
1153
1153
  get shape() {
1154
1154
  return this._def.shape();
@@ -1160,11 +1160,11 @@ class ee extends T {
1160
1160
  ...t !== void 0 ? {
1161
1161
  errorMap: (s, n) => {
1162
1162
  var a, r, l, c;
1163
- const f = (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;
1163
+ const h = (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 = N.errToObj(t).message) !== null && c !== void 0 ? c : f
1165
+ message: (c = N.errToObj(t).message) !== null && c !== void 0 ? c : h
1166
1166
  } : {
1167
- message: f
1167
+ message: h
1168
1168
  };
1169
1169
  }
1170
1170
  } : {}
@@ -1195,7 +1195,7 @@ class ee extends T {
1195
1195
  unknownKeys: t._def.unknownKeys,
1196
1196
  catchall: t._def.catchall,
1197
1197
  shape: () => Ut.mergeShapes(this._def.shape(), t._def.shape()),
1198
- typeName: I.ZodObject
1198
+ typeName: H.ZodObject
1199
1199
  });
1200
1200
  }
1201
1201
  catchall(t) {
@@ -1257,28 +1257,28 @@ class ee extends T {
1257
1257
  });
1258
1258
  }
1259
1259
  keyof() {
1260
- return Mn(U.objectKeys(this.shape));
1260
+ return Cn(U.objectKeys(this.shape));
1261
1261
  }
1262
1262
  }
1263
1263
  ee.create = (e, t) => new ee({
1264
1264
  shape: () => e,
1265
1265
  unknownKeys: "strip",
1266
1266
  catchall: We.create(),
1267
- typeName: I.ZodObject,
1267
+ typeName: H.ZodObject,
1268
1268
  ...X(t)
1269
1269
  });
1270
1270
  ee.strictCreate = (e, t) => new ee({
1271
1271
  shape: () => e,
1272
1272
  unknownKeys: "strict",
1273
1273
  catchall: We.create(),
1274
- typeName: I.ZodObject,
1274
+ typeName: H.ZodObject,
1275
1275
  ...X(t)
1276
1276
  });
1277
1277
  ee.lazycreate = (e, t) => new ee({
1278
1278
  shape: e,
1279
1279
  unknownKeys: "strip",
1280
1280
  catchall: We.create(),
1281
- typeName: I.ZodObject,
1281
+ typeName: H.ZodObject,
1282
1282
  ...X(t)
1283
1283
  });
1284
1284
  class Et extends T {
@@ -1291,11 +1291,11 @@ class Et extends T {
1291
1291
  for (const c of r)
1292
1292
  if (c.result.status === "dirty")
1293
1293
  return s.common.issues.push(...c.ctx.common.issues), c.result;
1294
- const l = r.map((c) => new qe(c.ctx.common.issues));
1294
+ const l = r.map((c) => new Ie(c.ctx.common.issues));
1295
1295
  return P(s, {
1296
- code: C.invalid_union,
1296
+ code: M.invalid_union,
1297
1297
  unionErrors: l
1298
- }), q;
1298
+ }), I;
1299
1299
  }
1300
1300
  if (s.common.async)
1301
1301
  return Promise.all(n.map(async (r) => {
@@ -1319,7 +1319,7 @@ class Et extends T {
1319
1319
  {
1320
1320
  let r;
1321
1321
  const l = [];
1322
- for (const f of n) {
1322
+ for (const h of n) {
1323
1323
  const y = {
1324
1324
  ...s,
1325
1325
  common: {
@@ -1327,7 +1327,7 @@ class Et extends T {
1327
1327
  issues: []
1328
1328
  },
1329
1329
  parent: null
1330
- }, w = f._parseSync({
1330
+ }, w = h._parseSync({
1331
1331
  data: s.data,
1332
1332
  path: s.path,
1333
1333
  parent: y
@@ -1338,11 +1338,11 @@ class Et extends T {
1338
1338
  }
1339
1339
  if (r)
1340
1340
  return s.common.issues.push(...r.ctx.common.issues), r.result;
1341
- const c = l.map((f) => new qe(f));
1341
+ const c = l.map((h) => new Ie(h));
1342
1342
  return P(s, {
1343
- code: C.invalid_union,
1343
+ code: M.invalid_union,
1344
1344
  unionErrors: c
1345
- }), q;
1345
+ }), I;
1346
1346
  }
1347
1347
  }
1348
1348
  get options() {
@@ -1351,7 +1351,7 @@ class Et extends T {
1351
1351
  }
1352
1352
  Et.create = (e, t) => new Et({
1353
1353
  options: e,
1354
- typeName: I.ZodUnion,
1354
+ typeName: H.ZodUnion,
1355
1355
  ...X(t)
1356
1356
  });
1357
1357
  class es extends T {
@@ -1359,10 +1359,10 @@ class es extends T {
1359
1359
  const { ctx: s } = this._processInputParams(t);
1360
1360
  if (s.parsedType !== x.object)
1361
1361
  return P(s, {
1362
- code: C.invalid_type,
1362
+ code: M.invalid_type,
1363
1363
  expected: x.object,
1364
1364
  received: s.parsedType
1365
- }), q;
1365
+ }), I;
1366
1366
  const n = this.discriminator, a = s.data[n], r = this.options.get(a);
1367
1367
  return r ? s.common.async ? r._parseAsync({
1368
1368
  data: s.data,
@@ -1373,10 +1373,10 @@ class es extends T {
1373
1373
  path: s.path,
1374
1374
  parent: s
1375
1375
  }) : (P(s, {
1376
- code: C.invalid_union_discriminator,
1376
+ code: M.invalid_union_discriminator,
1377
1377
  options: this.validDiscriminatorValues,
1378
1378
  path: [n]
1379
- }), q);
1379
+ }), I);
1380
1380
  }
1381
1381
  get discriminator() {
1382
1382
  return this._def.discriminator;
@@ -1408,7 +1408,7 @@ class es extends T {
1408
1408
  if (a.size !== s.length)
1409
1409
  throw new Error("Some of the discriminator values are not unique");
1410
1410
  return new es({
1411
- typeName: I.ZodDiscriminatedUnion,
1411
+ typeName: H.ZodDiscriminatedUnion,
1412
1412
  discriminator: t,
1413
1413
  options: a,
1414
1414
  ...X(n)
@@ -1422,10 +1422,10 @@ function Os(e, t) {
1422
1422
  if (s === x.object && n === x.object) {
1423
1423
  const a = U.objectKeys(t), r = U.objectKeys(e).filter((c) => a.indexOf(c) !== -1), l = { ...e, ...t };
1424
1424
  for (const c of r) {
1425
- const f = Os(e[c], t[c]);
1426
- if (!f.valid)
1425
+ const h = Os(e[c], t[c]);
1426
+ if (!h.valid)
1427
1427
  return { valid: !1 };
1428
- l[c] = f.data;
1428
+ l[c] = h.data;
1429
1429
  }
1430
1430
  return { valid: !0, data: l };
1431
1431
  } else if (s === x.array && n === x.array) {
@@ -1433,10 +1433,10 @@ 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], f = Os(l, c);
1437
- if (!f.valid)
1436
+ const l = e[r], c = t[r], h = Os(l, c);
1437
+ if (!h.valid)
1438
1438
  return { valid: !1 };
1439
- a.push(f.data);
1439
+ a.push(h.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 };
@@ -1445,11 +1445,11 @@ class Pt extends T {
1445
1445
  _parse(t) {
1446
1446
  const { status: s, ctx: n } = this._processInputParams(t), a = (r, l) => {
1447
1447
  if (js(r) || js(l))
1448
- return q;
1448
+ return I;
1449
1449
  const c = Os(r.value, l.value);
1450
1450
  return c.valid ? ((Es(r) || Es(l)) && s.dirty(), { status: s.value, value: c.data }) : (P(n, {
1451
- code: C.invalid_intersection_types
1452
- }), q);
1451
+ code: M.invalid_intersection_types
1452
+ }), I);
1453
1453
  };
1454
1454
  return n.common.async ? Promise.all([
1455
1455
  this._def.left._parseAsync({
@@ -1476,7 +1476,7 @@ class Pt extends T {
1476
1476
  Pt.create = (e, t, s) => new Pt({
1477
1477
  left: e,
1478
1478
  right: t,
1479
- typeName: I.ZodIntersection,
1479
+ typeName: H.ZodIntersection,
1480
1480
  ...X(s)
1481
1481
  });
1482
1482
  class Fe extends T {
@@ -1484,26 +1484,26 @@ class Fe extends T {
1484
1484
  const { status: s, ctx: n } = this._processInputParams(t);
1485
1485
  if (n.parsedType !== x.array)
1486
1486
  return P(n, {
1487
- code: C.invalid_type,
1487
+ code: M.invalid_type,
1488
1488
  expected: x.array,
1489
1489
  received: n.parsedType
1490
- }), q;
1490
+ }), I;
1491
1491
  if (n.data.length < this._def.items.length)
1492
1492
  return P(n, {
1493
- code: C.too_small,
1493
+ code: M.too_small,
1494
1494
  minimum: this._def.items.length,
1495
1495
  inclusive: !0,
1496
1496
  type: "array"
1497
- }), q;
1497
+ }), I;
1498
1498
  !this._def.rest && n.data.length > this._def.items.length && (P(n, {
1499
- code: C.too_big,
1499
+ code: M.too_big,
1500
1500
  maximum: this._def.items.length,
1501
1501
  inclusive: !0,
1502
1502
  type: "array"
1503
1503
  }), s.dirty());
1504
1504
  const r = n.data.map((l, c) => {
1505
- const f = this._def.items[c] || this._def.rest;
1506
- return f ? f._parse(new Ye(n, l, n.path, c)) : null;
1505
+ const h = this._def.items[c] || this._def.rest;
1506
+ return h ? h._parse(new Ye(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
  }
@@ -1519,7 +1519,7 @@ class Fe extends T {
1519
1519
  }
1520
1520
  Fe.create = (e, t) => new Fe({
1521
1521
  items: e,
1522
- typeName: I.ZodTuple,
1522
+ typeName: H.ZodTuple,
1523
1523
  rest: null,
1524
1524
  ...X(t)
1525
1525
  });
@@ -1534,10 +1534,10 @@ class Ot extends T {
1534
1534
  const { status: s, ctx: n } = this._processInputParams(t);
1535
1535
  if (n.parsedType !== x.object)
1536
1536
  return P(n, {
1537
- code: C.invalid_type,
1537
+ code: M.invalid_type,
1538
1538
  expected: x.object,
1539
1539
  received: n.parsedType
1540
- }), q;
1540
+ }), I;
1541
1541
  const a = [], r = this._def.keyType, l = this._def.valueType;
1542
1542
  for (const c in n.data)
1543
1543
  a.push({
@@ -1553,12 +1553,12 @@ class Ot extends T {
1553
1553
  return s instanceof T ? new Ot({
1554
1554
  keyType: t,
1555
1555
  valueType: s,
1556
- typeName: I.ZodRecord,
1556
+ typeName: H.ZodRecord,
1557
1557
  ...X(n)
1558
1558
  }) : new Ot({
1559
1559
  keyType: ze.create(),
1560
1560
  valueType: t,
1561
- typeName: I.ZodRecord,
1561
+ typeName: H.ZodRecord,
1562
1562
  ...X(s)
1563
1563
  });
1564
1564
  }
@@ -1568,31 +1568,31 @@ class zt extends T {
1568
1568
  const { status: s, ctx: n } = this._processInputParams(t);
1569
1569
  if (n.parsedType !== x.map)
1570
1570
  return P(n, {
1571
- code: C.invalid_type,
1571
+ code: M.invalid_type,
1572
1572
  expected: x.map,
1573
1573
  received: n.parsedType
1574
- }), q;
1575
- const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c, f], y) => ({
1574
+ }), I;
1575
+ const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c, h], y) => ({
1576
1576
  key: a._parse(new Ye(n, c, n.path, [y, "key"])),
1577
- value: r._parse(new Ye(n, f, n.path, [y, "value"]))
1577
+ value: r._parse(new Ye(n, h, 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 f of l) {
1583
- const y = await f.key, w = await f.value;
1582
+ for (const h of l) {
1583
+ const y = await h.key, w = await h.value;
1584
1584
  if (y.status === "aborted" || w.status === "aborted")
1585
- return q;
1585
+ return I;
1586
1586
  (y.status === "dirty" || w.status === "dirty") && s.dirty(), c.set(y.value, w.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 f of l) {
1593
- const y = f.key, w = f.value;
1592
+ for (const h of l) {
1593
+ const y = h.key, w = h.value;
1594
1594
  if (y.status === "aborted" || w.status === "aborted")
1595
- return q;
1595
+ return I;
1596
1596
  (y.status === "dirty" || w.status === "dirty") && s.dirty(), c.set(y.value, w.value);
1597
1597
  }
1598
1598
  return { status: s.value, value: c };
@@ -1602,7 +1602,7 @@ class zt extends T {
1602
1602
  zt.create = (e, t, s) => new zt({
1603
1603
  valueType: t,
1604
1604
  keyType: e,
1605
- typeName: I.ZodMap,
1605
+ typeName: H.ZodMap,
1606
1606
  ...X(s)
1607
1607
  });
1608
1608
  class tt extends T {
@@ -1610,36 +1610,36 @@ class tt extends T {
1610
1610
  const { status: s, ctx: n } = this._processInputParams(t);
1611
1611
  if (n.parsedType !== x.set)
1612
1612
  return P(n, {
1613
- code: C.invalid_type,
1613
+ code: M.invalid_type,
1614
1614
  expected: x.set,
1615
1615
  received: n.parsedType
1616
- }), q;
1616
+ }), I;
1617
1617
  const a = this._def;
1618
1618
  a.minSize !== null && n.data.size < a.minSize.value && (P(n, {
1619
- code: C.too_small,
1619
+ code: M.too_small,
1620
1620
  minimum: a.minSize.value,
1621
1621
  type: "set",
1622
1622
  inclusive: !0,
1623
1623
  message: a.minSize.message
1624
1624
  }), s.dirty()), a.maxSize !== null && n.data.size > a.maxSize.value && (P(n, {
1625
- code: C.too_big,
1625
+ code: M.too_big,
1626
1626
  maximum: a.maxSize.value,
1627
1627
  type: "set",
1628
1628
  inclusive: !0,
1629
1629
  message: a.maxSize.message
1630
1630
  }), s.dirty());
1631
1631
  const r = this._def.valueType;
1632
- function l(f) {
1632
+ function l(h) {
1633
1633
  const y = /* @__PURE__ */ new Set();
1634
- for (const w of f) {
1634
+ for (const w of h) {
1635
1635
  if (w.status === "aborted")
1636
- return q;
1636
+ return I;
1637
1637
  w.status === "dirty" && s.dirty(), y.add(w.value);
1638
1638
  }
1639
1639
  return { status: s.value, value: y };
1640
1640
  }
1641
- const c = [...n.data.values()].map((f, y) => r._parse(new Ye(n, f, n.path, y)));
1642
- return n.common.async ? Promise.all(c).then((f) => l(f)) : l(c);
1641
+ const c = [...n.data.values()].map((h, y) => r._parse(new Ye(n, h, n.path, y)));
1642
+ return n.common.async ? Promise.all(c).then((h) => l(h)) : l(c);
1643
1643
  }
1644
1644
  min(t, s) {
1645
1645
  return new tt({
@@ -1664,7 +1664,7 @@ tt.create = (e, t) => new tt({
1664
1664
  valueType: e,
1665
1665
  minSize: null,
1666
1666
  maxSize: null,
1667
- typeName: I.ZodSet,
1667
+ typeName: H.ZodSet,
1668
1668
  ...X(t)
1669
1669
  });
1670
1670
  class st extends T {
@@ -1675,57 +1675,57 @@ class st extends T {
1675
1675
  const { ctx: s } = this._processInputParams(t);
1676
1676
  if (s.parsedType !== x.function)
1677
1677
  return P(s, {
1678
- code: C.invalid_type,
1678
+ code: M.invalid_type,
1679
1679
  expected: x.function,
1680
1680
  received: s.parsedType
1681
- }), q;
1682
- function n(c, f) {
1683
- return qt({
1681
+ }), I;
1682
+ function n(c, h) {
1683
+ return It({
1684
1684
  data: c,
1685
1685
  path: s.path,
1686
1686
  errorMaps: [
1687
1687
  s.common.contextualErrorMap,
1688
1688
  s.schemaErrorMap,
1689
- It(),
1689
+ Ht(),
1690
1690
  jt
1691
1691
  ].filter((y) => !!y),
1692
1692
  issueData: {
1693
- code: C.invalid_arguments,
1694
- argumentsError: f
1693
+ code: M.invalid_arguments,
1694
+ argumentsError: h
1695
1695
  }
1696
1696
  });
1697
1697
  }
1698
- function a(c, f) {
1699
- return qt({
1698
+ function a(c, h) {
1699
+ return It({
1700
1700
  data: c,
1701
1701
  path: s.path,
1702
1702
  errorMaps: [
1703
1703
  s.common.contextualErrorMap,
1704
1704
  s.schemaErrorMap,
1705
- It(),
1705
+ Ht(),
1706
1706
  jt
1707
1707
  ].filter((y) => !!y),
1708
1708
  issueData: {
1709
- code: C.invalid_return_type,
1710
- returnTypeError: f
1709
+ code: M.invalid_return_type,
1710
+ returnTypeError: h
1711
1711
  }
1712
1712
  });
1713
1713
  }
1714
1714
  const r = { errorMap: s.common.contextualErrorMap }, l = s.data;
1715
1715
  return this._def.returns instanceof pt ? ce(async (...c) => {
1716
- const f = new qe([]), y = await this._def.args.parseAsync(c, r).catch((Z) => {
1717
- throw f.addIssue(n(c, Z)), f;
1716
+ const h = new Ie([]), y = await this._def.args.parseAsync(c, r).catch((Z) => {
1717
+ throw h.addIssue(n(c, Z)), h;
1718
1718
  }), w = await l(...y);
1719
1719
  return await this._def.returns._def.type.parseAsync(w, r).catch((Z) => {
1720
- throw f.addIssue(a(w, Z)), f;
1720
+ throw h.addIssue(a(w, Z)), h;
1721
1721
  });
1722
1722
  }) : ce((...c) => {
1723
- const f = this._def.args.safeParse(c, r);
1724
- if (!f.success)
1725
- throw new qe([n(c, f.error)]);
1726
- const y = l(...f.data), w = this._def.returns.safeParse(y, r);
1723
+ const h = this._def.args.safeParse(c, r);
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);
1727
1727
  if (!w.success)
1728
- throw new qe([a(y, w.error)]);
1728
+ throw new Ie([a(y, w.error)]);
1729
1729
  return w.data;
1730
1730
  });
1731
1731
  }
@@ -1757,7 +1757,7 @@ class st extends T {
1757
1757
  st.create = (e, t, s) => new st({
1758
1758
  args: e ? e.rest(Ze.create()) : Fe.create([]).rest(Ze.create()),
1759
1759
  returns: t || Ze.create(),
1760
- typeName: I.ZodFunction,
1760
+ typeName: H.ZodFunction,
1761
1761
  ...X(s)
1762
1762
  });
1763
1763
  class Wt extends T {
@@ -1771,7 +1771,7 @@ class Wt extends T {
1771
1771
  }
1772
1772
  Wt.create = (e, t) => new Wt({
1773
1773
  getter: e,
1774
- typeName: I.ZodLazy,
1774
+ typeName: H.ZodLazy,
1775
1775
  ...X(t)
1776
1776
  });
1777
1777
  class Lt extends T {
@@ -1779,9 +1779,9 @@ class Lt extends T {
1779
1779
  if (t.data !== this._def.value) {
1780
1780
  const s = this._getOrReturnCtx(t);
1781
1781
  return P(s, {
1782
- code: C.invalid_literal,
1782
+ code: M.invalid_literal,
1783
1783
  expected: this._def.value
1784
- }), q;
1784
+ }), I;
1785
1785
  }
1786
1786
  return { status: "valid", value: t.data };
1787
1787
  }
@@ -1791,13 +1791,13 @@ class Lt extends T {
1791
1791
  }
1792
1792
  Lt.create = (e, t) => new Lt({
1793
1793
  value: e,
1794
- typeName: I.ZodLiteral,
1794
+ typeName: H.ZodLiteral,
1795
1795
  ...X(t)
1796
1796
  });
1797
- function Mn(e, t) {
1797
+ function Cn(e, t) {
1798
1798
  return new ts({
1799
1799
  values: e,
1800
- typeName: I.ZodEnum,
1800
+ typeName: H.ZodEnum,
1801
1801
  ...X(t)
1802
1802
  });
1803
1803
  }
@@ -1808,16 +1808,16 @@ class ts extends T {
1808
1808
  return P(s, {
1809
1809
  expected: U.joinValues(n),
1810
1810
  received: s.parsedType,
1811
- code: C.invalid_type
1812
- }), q;
1811
+ code: M.invalid_type
1812
+ }), I;
1813
1813
  }
1814
1814
  if (this._def.values.indexOf(t.data) === -1) {
1815
1815
  const s = this._getOrReturnCtx(t), n = this._def.values;
1816
1816
  return P(s, {
1817
1817
  received: s.data,
1818
- code: C.invalid_enum_value,
1818
+ code: M.invalid_enum_value,
1819
1819
  options: n
1820
- }), q;
1820
+ }), I;
1821
1821
  }
1822
1822
  return ce(t.data);
1823
1823
  }
@@ -1843,7 +1843,7 @@ class ts extends T {
1843
1843
  return t;
1844
1844
  }
1845
1845
  }
1846
- ts.create = Mn;
1846
+ ts.create = Cn;
1847
1847
  class Kt extends T {
1848
1848
  _parse(t) {
1849
1849
  const s = U.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
@@ -1852,16 +1852,16 @@ class Kt extends T {
1852
1852
  return P(n, {
1853
1853
  expected: U.joinValues(a),
1854
1854
  received: n.parsedType,
1855
- code: C.invalid_type
1856
- }), q;
1855
+ code: M.invalid_type
1856
+ }), I;
1857
1857
  }
1858
1858
  if (s.indexOf(t.data) === -1) {
1859
1859
  const a = U.objectValues(s);
1860
1860
  return P(n, {
1861
1861
  received: n.data,
1862
- code: C.invalid_enum_value,
1862
+ code: M.invalid_enum_value,
1863
1863
  options: a
1864
- }), q;
1864
+ }), I;
1865
1865
  }
1866
1866
  return ce(t.data);
1867
1867
  }
@@ -1871,7 +1871,7 @@ class Kt extends T {
1871
1871
  }
1872
1872
  Kt.create = (e, t) => new Kt({
1873
1873
  values: e,
1874
- typeName: I.ZodNativeEnum,
1874
+ typeName: H.ZodNativeEnum,
1875
1875
  ...X(t)
1876
1876
  });
1877
1877
  class pt extends T {
@@ -1879,10 +1879,10 @@ class pt extends T {
1879
1879
  const { ctx: s } = this._processInputParams(t);
1880
1880
  if (s.parsedType !== x.promise && s.common.async === !1)
1881
1881
  return P(s, {
1882
- code: C.invalid_type,
1882
+ code: M.invalid_type,
1883
1883
  expected: x.promise,
1884
1884
  received: s.parsedType
1885
- }), q;
1885
+ }), I;
1886
1886
  const n = s.parsedType === x.promise ? s.data : Promise.resolve(s.data);
1887
1887
  return ce(n.then((a) => this._def.type.parseAsync(a, {
1888
1888
  path: s.path,
@@ -1892,7 +1892,7 @@ class pt extends T {
1892
1892
  }
1893
1893
  pt.create = (e, t) => new pt({
1894
1894
  type: e,
1895
- typeName: I.ZodPromise,
1895
+ typeName: H.ZodPromise,
1896
1896
  ...X(t)
1897
1897
  });
1898
1898
  class Se extends T {
@@ -1923,10 +1923,10 @@ class Se extends T {
1923
1923
  };
1924
1924
  if (r.addIssue = r.addIssue.bind(r), a.type === "refinement") {
1925
1925
  const l = (c) => {
1926
- const f = a.refinement(c, r);
1926
+ const h = a.refinement(c, r);
1927
1927
  if (n.common.async)
1928
- return Promise.resolve(f);
1929
- if (f instanceof Promise)
1928
+ return Promise.resolve(h);
1929
+ if (h instanceof Promise)
1930
1930
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
1931
1931
  return c;
1932
1932
  };
@@ -1936,9 +1936,9 @@ class Se extends T {
1936
1936
  path: n.path,
1937
1937
  parent: n
1938
1938
  });
1939
- return c.status === "aborted" ? q : (c.status === "dirty" && s.dirty(), l(c.value), { status: s.value, value: c.value });
1939
+ return c.status === "aborted" ? I : (c.status === "dirty" && s.dirty(), l(c.value), { status: s.value, value: c.value });
1940
1940
  } else
1941
- return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((c) => c.status === "aborted" ? q : (c.status === "dirty" && s.dirty(), l(c.value).then(() => ({ status: s.value, value: c.value }))));
1941
+ return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((c) => c.status === "aborted" ? I : (c.status === "dirty" && s.dirty(), l(c.value).then(() => ({ status: s.value, value: c.value }))));
1942
1942
  }
1943
1943
  if (a.type === "transform")
1944
1944
  if (n.common.async === !1) {
@@ -1947,27 +1947,27 @@ class Se extends T {
1947
1947
  path: n.path,
1948
1948
  parent: n
1949
1949
  });
1950
- if (!kt(l))
1950
+ if (!qt(l))
1951
1951
  return l;
1952
1952
  const c = a.transform(l.value, r);
1953
1953
  if (c instanceof Promise)
1954
1954
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
1955
1955
  return { status: s.value, value: c };
1956
1956
  } else
1957
- return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) => kt(l) ? Promise.resolve(a.transform(l.value, r)).then((c) => ({ status: s.value, value: c })) : l);
1957
+ return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) => qt(l) ? Promise.resolve(a.transform(l.value, r)).then((c) => ({ status: s.value, value: c })) : l);
1958
1958
  U.assertNever(a);
1959
1959
  }
1960
1960
  }
1961
1961
  Se.create = (e, t, s) => new Se({
1962
1962
  schema: e,
1963
- typeName: I.ZodEffects,
1963
+ typeName: H.ZodEffects,
1964
1964
  effect: t,
1965
1965
  ...X(s)
1966
1966
  });
1967
1967
  Se.createWithPreprocess = (e, t, s) => new Se({
1968
1968
  schema: t,
1969
1969
  effect: { type: "preprocess", transform: e },
1970
- typeName: I.ZodEffects,
1970
+ typeName: H.ZodEffects,
1971
1971
  ...X(s)
1972
1972
  });
1973
1973
  class Ge extends T {
@@ -1980,7 +1980,7 @@ class Ge extends T {
1980
1980
  }
1981
1981
  Ge.create = (e, t) => new Ge({
1982
1982
  innerType: e,
1983
- typeName: I.ZodOptional,
1983
+ typeName: H.ZodOptional,
1984
1984
  ...X(t)
1985
1985
  });
1986
1986
  class nt extends T {
@@ -1993,7 +1993,7 @@ class nt extends T {
1993
1993
  }
1994
1994
  nt.create = (e, t) => new nt({
1995
1995
  innerType: e,
1996
- typeName: I.ZodNullable,
1996
+ typeName: H.ZodNullable,
1997
1997
  ...X(t)
1998
1998
  });
1999
1999
  class Ns extends T {
@@ -2012,7 +2012,7 @@ class Ns extends T {
2012
2012
  }
2013
2013
  Ns.create = (e, t) => new Ge({
2014
2014
  innerType: e,
2015
- typeName: I.ZodOptional,
2015
+ typeName: H.ZodOptional,
2016
2016
  ...X(t)
2017
2017
  });
2018
2018
  class Jt extends T {
@@ -2020,19 +2020,19 @@ class Jt extends T {
2020
2020
  if (this._getType(t) !== x.nan) {
2021
2021
  const n = this._getOrReturnCtx(t);
2022
2022
  return P(n, {
2023
- code: C.invalid_type,
2023
+ code: M.invalid_type,
2024
2024
  expected: x.nan,
2025
2025
  received: n.parsedType
2026
- }), q;
2026
+ }), I;
2027
2027
  }
2028
2028
  return { status: "valid", value: t.data };
2029
2029
  }
2030
2030
  }
2031
2031
  Jt.create = (e) => new Jt({
2032
- typeName: I.ZodNaN,
2032
+ typeName: H.ZodNaN,
2033
2033
  ...X(e)
2034
2034
  });
2035
- const Cn = (e, t = {}, s) => e ? gt.create().superRefine((n, a) => {
2035
+ const Mn = (e, t = {}, s) => e ? gt.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 });
@@ -2040,27 +2040,27 @@ const Cn = (e, t = {}, s) => e ? gt.create().superRefine((n, a) => {
2040
2040
  }) : gt.create(), yr = {
2041
2041
  object: ee.lazycreate
2042
2042
  };
2043
- var I;
2043
+ var H;
2044
2044
  (function(e) {
2045
2045
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodPromise = "ZodPromise";
2046
- })(I || (I = {}));
2046
+ })(H || (H = {}));
2047
2047
  const br = (e, t = {
2048
2048
  message: `Input not instance of ${e.name}`
2049
- }) => Cn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = Tt.create, jn = Xt.create, Br = mt.create, Mr = Qt.create, Cr = Nt.create, Dr = gt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Ve.create, Or = ee.create, Gr = ee.strictCreate, Yr = Et.create, Vr = es.create, Fr = Pt.create, Sr = Fe.create, Rr = Ot.create, Hr = zt.create, Ir = tt.create, qr = st.create, kr = Wt.create, Tr = Lt.create, Xr = ts.create, Qr = Kt.create, Nr = pt.create, rn = Se.create, Zr = Ge.create, Ur = nt.create, zr = Se.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
2050
- var Mt = /* @__PURE__ */ Object.freeze({
2049
+ }) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = Tt.create, jn = Xt.create, Br = mt.create, Cr = Qt.create, Mr = Nt.create, Dr = gt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Ve.create, Or = ee.create, Gr = ee.strictCreate, Yr = Et.create, Vr = es.create, Fr = Pt.create, Sr = Fe.create, kr = Ot.create, Rr = zt.create, Hr = tt.create, Ir = st.create, qr = Wt.create, Tr = Lt.create, Xr = ts.create, Qr = Kt.create, Nr = pt.create, rn = Se.create, Zr = Ge.create, Ur = nt.create, zr = Se.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
2050
+ var Ct = /* @__PURE__ */ Object.freeze({
2051
2051
  __proto__: null,
2052
2052
  getParsedType: Ne,
2053
2053
  ZodParsedType: x,
2054
- makeIssue: qt,
2054
+ makeIssue: It,
2055
2055
  EMPTY_PATH: Ar,
2056
2056
  addIssueToContext: P,
2057
2057
  ParseStatus: le,
2058
- INVALID: q,
2058
+ INVALID: I,
2059
2059
  DIRTY: mr,
2060
2060
  OK: ce,
2061
2061
  isAborted: js,
2062
2062
  isDirty: Es,
2063
- isValid: kt,
2063
+ isValid: qt,
2064
2064
  isAsync: Ps,
2065
2065
  jsonStringifyReplacer: Qs,
2066
2066
  ZodType: T,
@@ -2099,12 +2099,12 @@ var Mt = /* @__PURE__ */ Object.freeze({
2099
2099
  ZodNullable: nt,
2100
2100
  ZodDefault: Ns,
2101
2101
  ZodNaN: Jt,
2102
- custom: Cn,
2102
+ custom: Mn,
2103
2103
  Schema: T,
2104
2104
  ZodSchema: T,
2105
2105
  late: yr,
2106
2106
  get ZodFirstPartyTypeKind() {
2107
- return I;
2107
+ return H;
2108
2108
  },
2109
2109
  any: Dr,
2110
2110
  array: Pr,
@@ -2114,16 +2114,16 @@ var Mt = /* @__PURE__ */ Object.freeze({
2114
2114
  discriminatedUnion: Vr,
2115
2115
  effect: rn,
2116
2116
  enum: Xr,
2117
- function: qr,
2117
+ function: Ir,
2118
2118
  instanceof: br,
2119
2119
  intersection: Fr,
2120
- lazy: kr,
2120
+ lazy: qr,
2121
2121
  literal: Tr,
2122
- map: Hr,
2122
+ map: Rr,
2123
2123
  nan: vr,
2124
2124
  nativeEnum: Qr,
2125
2125
  never: jr,
2126
- null: Cr,
2126
+ null: Mr,
2127
2127
  nullable: Ur,
2128
2128
  number: xn,
2129
2129
  object: Or,
@@ -2133,22 +2133,22 @@ var Mt = /* @__PURE__ */ Object.freeze({
2133
2133
  ostring: Wr,
2134
2134
  preprocess: zr,
2135
2135
  promise: Nr,
2136
- record: Rr,
2137
- set: Ir,
2136
+ record: kr,
2137
+ set: Hr,
2138
2138
  strictObject: Gr,
2139
2139
  string: Dn,
2140
2140
  transformer: rn,
2141
2141
  tuple: Sr,
2142
- undefined: Mr,
2142
+ undefined: Cr,
2143
2143
  union: Yr,
2144
2144
  unknown: xr,
2145
2145
  void: Er,
2146
- ZodIssueCode: C,
2146
+ ZodIssueCode: M,
2147
2147
  quotelessJson: ur,
2148
- ZodError: qe,
2148
+ ZodError: Ie,
2149
2149
  defaultErrorMap: jt,
2150
2150
  setErrorMap: dr,
2151
- getErrorMap: It
2151
+ getErrorMap: Ht
2152
2152
  });
2153
2153
  function Zs(e) {
2154
2154
  return typeof e == "object" && e !== null && !Array.isArray(e) && Object.keys(e).length === 1 && typeof e.$form == "string";
@@ -2307,15 +2307,15 @@ function co(e) {
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::", Ao = Mt.object({
2310
+ const uo = "business::report::reports::", Ao = Ct.object({
2311
2311
  /** Requested report date, normalized to a UTC ISO string. */
2312
- reportDate: Mt.string().refine((e) => !Number.isNaN(Date.parse(e))),
2312
+ reportDate: Ct.string().refine((e) => !Number.isNaN(Date.parse(e))),
2313
2313
  /** Whole UTC days between now and the report date. */
2314
- reportAgeDays: Mt.number().int().min(0),
2314
+ reportAgeDays: Ct.number().int().min(0),
2315
2315
  /** Whole UTC months between now and the report date. */
2316
- reportAgeMonths: Mt.number().int().min(0),
2316
+ reportAgeMonths: Ct.number().int().min(0),
2317
2317
  /** Whole UTC years between now and the report date. */
2318
- reportAgeYears: Mt.number().int().min(0)
2318
+ reportAgeYears: Ct.number().int().min(0)
2319
2319
  }), mo = 864e5;
2320
2320
  function ln(e, t) {
2321
2321
  const s = new Date(e);
@@ -2333,12 +2333,12 @@ function po(e, t) {
2333
2333
  let s = (t.getUTCFullYear() - e.getUTCFullYear()) * 12 + (t.getUTCMonth() - e.getUTCMonth());
2334
2334
  return t.getUTCDate() < e.getUTCDate() && (s -= 1), s;
2335
2335
  }
2336
- function fo(e, t) {
2336
+ function ho(e, t) {
2337
2337
  let s = t.getUTCFullYear() - e.getUTCFullYear();
2338
2338
  const n = t.getUTCMonth(), a = e.getUTCMonth();
2339
2339
  return (n < a || n === a && t.getUTCDate() < e.getUTCDate()) && (s -= 1), s;
2340
2340
  }
2341
- function ho(e) {
2341
+ function fo(e) {
2342
2342
  const t = ln(e.nowAtUtc, "nowAtUtc"), s = ln(e.reportDate, "reportDate");
2343
2343
  if (s.getTime() > t.getTime())
2344
2344
  throw new Error(`Invalid reportDate: ${e.reportDate} is after nowAtUtc`);
@@ -2346,7 +2346,7 @@ function ho(e) {
2346
2346
  reportDate: s.toISOString(),
2347
2347
  reportAgeDays: go(s, t),
2348
2348
  reportAgeMonths: po(s, t),
2349
- reportAgeYears: fo(s, t)
2349
+ reportAgeYears: ho(s, t)
2350
2350
  };
2351
2351
  }
2352
2352
  const yo = "report-access-window";
@@ -2438,7 +2438,7 @@ const Bo = {
2438
2438
  }
2439
2439
  }
2440
2440
  ]
2441
- }, Mo = no({
2441
+ }, Co = no({
2442
2442
  version: 1,
2443
2443
  builderKey: yo,
2444
2444
  contextSchema: Ao,
@@ -2465,13 +2465,13 @@ const Bo = {
2465
2465
  }
2466
2466
  ],
2467
2467
  /** Build the evaluation context from raw request dates. */
2468
- buildContext: ho,
2468
+ buildContext: fo,
2469
2469
  // Not expressible via `templates` — passed alongside; the template branch
2470
2470
  // of `defineConditionBuilder` spreads `...rest` (everything but `templates`)
2471
2471
  // onto the returned builder, so these survive untouched.
2472
2472
  appliesToActions: bo,
2473
2473
  summarizeForm: wo
2474
- }), Je = [Mo], Co = {
2474
+ }), Je = [Co], Mo = {
2475
2475
  [`prefix:${uo}`]: Je,
2476
2476
  [d.report_reports_allDefaultReports]: Je,
2477
2477
  [d.report_reports_allCustomReports]: Je,
@@ -2485,7 +2485,7 @@ const Bo = {
2485
2485
  // Flat POS report subject used by the restaurant role editor.
2486
2486
  report: Je
2487
2487
  };
2488
- oo(Co);
2488
+ oo(Mo);
2489
2489
  function eu(e, t) {
2490
2490
  if (!e) return {};
2491
2491
  const s = new Set(t.ownedFields);
@@ -2818,12 +2818,12 @@ const On = {
2818
2818
  }, So = {
2819
2819
  date: Fn,
2820
2820
  auditLog: Sn
2821
- }, Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2821
+ }, ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2822
2822
  __proto__: null,
2823
2823
  auditLog: Sn,
2824
2824
  date: Fn,
2825
2825
  default: So
2826
- }, Symbol.toStringTag, { value: "Module" })), Rn = {
2826
+ }, Symbol.toStringTag, { value: "Module" })), kn = {
2827
2827
  predefinedRanges: {
2828
2828
  today: "วันนี้",
2829
2829
  yesterday: "เมื่อวาน",
@@ -2833,7 +2833,7 @@ const On = {
2833
2833
  thisMonth: "เดือนนี้",
2834
2834
  lastMonth: "เดือนที่แล้ว"
2835
2835
  }
2836
- }, Hn = {
2836
+ }, Rn = {
2837
2837
  title: "ประวัติการใช้งาน",
2838
2838
  export: "ส่งออก",
2839
2839
  dateRange: {
@@ -3045,15 +3045,15 @@ const On = {
3045
3045
  }
3046
3046
  }
3047
3047
  }
3048
- }, Ho = {
3049
- date: Rn,
3050
- auditLog: Hn
3051
- }, Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3048
+ }, Ro = {
3049
+ date: kn,
3050
+ auditLog: Rn
3051
+ }, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3052
3052
  __proto__: null,
3053
- auditLog: Hn,
3054
- date: Rn,
3055
- default: Ho
3056
- }, Symbol.toStringTag, { value: "Module" })), In = {
3053
+ auditLog: Rn,
3054
+ date: kn,
3055
+ default: Ro
3056
+ }, Symbol.toStringTag, { value: "Module" })), Hn = {
3057
3057
  predefinedRanges: {
3058
3058
  today: "今天",
3059
3059
  yesterday: "昨天",
@@ -3063,7 +3063,7 @@ const On = {
3063
3063
  thisMonth: "本月",
3064
3064
  lastMonth: "上月"
3065
3065
  }
3066
- }, qn = {
3066
+ }, In = {
3067
3067
  title: "审计日志",
3068
3068
  export: "导出",
3069
3069
  dateRange: {
@@ -3275,15 +3275,15 @@ const On = {
3275
3275
  }
3276
3276
  }
3277
3277
  }
3278
- }, qo = {
3279
- date: In,
3280
- auditLog: qn
3281
- }, ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3278
+ }, Io = {
3279
+ date: Hn,
3280
+ auditLog: In
3281
+ }, qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3282
3282
  __proto__: null,
3283
- auditLog: qn,
3284
- date: In,
3285
- default: qo
3286
- }, Symbol.toStringTag, { value: "Module" })), kn = {
3283
+ auditLog: In,
3284
+ date: Hn,
3285
+ default: Io
3286
+ }, Symbol.toStringTag, { value: "Module" })), qn = {
3287
3287
  predefinedRanges: {
3288
3288
  today: "今天",
3289
3289
  yesterday: "昨天",
@@ -3506,17 +3506,17 @@ const On = {
3506
3506
  }
3507
3507
  }
3508
3508
  }, To = {
3509
- date: kn,
3509
+ date: qn,
3510
3510
  auditLog: Tn
3511
3511
  }, Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3512
3512
  __proto__: null,
3513
3513
  auditLog: Tn,
3514
- date: kn,
3514
+ date: qn,
3515
3515
  default: To
3516
3516
  }, Symbol.toStringTag, { value: "Module" })), Qo = {
3517
- "en-US": Ro,
3518
- "zh-CN": ko,
3519
- "th-TH": Io,
3517
+ "en-US": ko,
3518
+ "zh-CN": qo,
3519
+ "th-TH": Ho,
3520
3520
  "zh-Hant": Xo
3521
3521
  }, Xn = {
3522
3522
  employee: {
@@ -5649,7 +5649,7 @@ const On = {
5649
5649
  __proto__: null,
5650
5650
  default: gi,
5651
5651
  grantUser: na
5652
- }, Symbol.toStringTag, { value: "Module" })), fi = {
5652
+ }, Symbol.toStringTag, { value: "Module" })), hi = {
5653
5653
  "en-US": ci,
5654
5654
  "zh-CN": mi,
5655
5655
  "th-TH": di,
@@ -5738,12 +5738,12 @@ const On = {
5738
5738
  passcode: {
5739
5739
  copied: "Code copied"
5740
5740
  }
5741
- }, hi = {
5741
+ }, fi = {
5742
5742
  approvalCode: aa
5743
5743
  }, yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5744
5744
  __proto__: null,
5745
5745
  approvalCode: aa,
5746
- default: hi
5746
+ default: fi
5747
5747
  }, Symbol.toStringTag, { value: "Module" })), ra = {
5748
5748
  title: "รหัสเข้าใช้งาน",
5749
5749
  actions: {
@@ -6008,17 +6008,17 @@ const On = {
6008
6008
  passcode: {
6009
6009
  copied: "授權碼已複製"
6010
6010
  }
6011
- }, Mi = {
6011
+ }, Ci = {
6012
6012
  approvalCode: ia
6013
- }, Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6013
+ }, Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6014
6014
  __proto__: null,
6015
6015
  approvalCode: ia,
6016
- default: Mi
6016
+ default: Ci
6017
6017
  }, Symbol.toStringTag, { value: "Module" })), Di = {
6018
6018
  "en-US": yi,
6019
6019
  "zh-CN": Bi,
6020
6020
  "th-TH": vi,
6021
- "zh-Hant": Ci
6021
+ "zh-Hant": Mi
6022
6022
  }, la = {
6023
6023
  title: "POS Access",
6024
6024
  tabs: {
@@ -6085,17 +6085,45 @@ const On = {
6085
6085
  section: "Scheduling",
6086
6086
  board: "Schedule",
6087
6087
  position: "Position",
6088
- general: "General"
6088
+ general: "General Settings"
6089
6089
  },
6090
6090
  topbar: {
6091
+ title: "Schedule",
6091
6092
  today: "Today",
6092
- copy: "Copy schedule",
6093
6093
  autoSchedule: "Auto-Schedule",
6094
6094
  actions: "Actions",
6095
+ share: "Share",
6096
+ publish: "Publish",
6097
+ settings: "Scheduling settings",
6098
+ copyFromLastWeek: "Copy from last week",
6099
+ copyToNextWeek: "Copy to next week",
6100
+ demandAndShifts: "Demand + employee shifts",
6101
+ demandOnly: "Demand only",
6102
+ clear: "Clear",
6103
+ clearShiftsAndDemand: "Clear shifts & demand",
6104
+ clearShifts: "Clear shifts",
6105
+ clearDemand: "Clear demand",
6106
+ pdfDescription: "A4 landscape. Preview, then save",
6107
+ imageDescription: "One picture of the schedule. Send it to the team",
6095
6108
  exportSchedule: "Export schedule",
6096
6109
  clearAllShifts: "Clear all shifts",
6097
6110
  comingSoon: "Coming in a later phase"
6098
6111
  },
6112
+ welcome: {
6113
+ eyebrow: "Welcome to Scheduling",
6114
+ outletSetup: "Setting up",
6115
+ title: "Build your first weekly schedule",
6116
+ subtitle: "Tell us how your outlets operate—from opening hours and staffing needs to your team and their availability. We'll use this to draft a schedule that you can review and adjust before publishing.",
6117
+ setUp: "Set up scheduling",
6118
+ skip: "Skip for now",
6119
+ previewLabel: "Where this ends up",
6120
+ cap1Label: "Set up your team and rules",
6121
+ cap1Description: "Positions, pay and the shifts you run.",
6122
+ cap2Label: "Fill the week",
6123
+ cap2Description: "Auto-Schedule staffs it to the headcount you set.",
6124
+ cap3Label: "Publish",
6125
+ cap3Description: "Your team sees their week."
6126
+ },
6099
6127
  status: {
6100
6128
  draft: "Draft",
6101
6129
  published: "Published"
@@ -6202,7 +6230,7 @@ const On = {
6202
6230
  comingSoon: "Coming soon."
6203
6231
  }, Si = {
6204
6232
  scheduling: Aa
6205
- }, Ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6233
+ }, ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6206
6234
  __proto__: null,
6207
6235
  default: Si,
6208
6236
  scheduling: Aa
@@ -6214,14 +6242,42 @@ const On = {
6214
6242
  general: "General"
6215
6243
  },
6216
6244
  topbar: {
6245
+ title: "Schedule",
6217
6246
  today: "Today",
6218
- copy: "Copy schedule",
6219
6247
  autoSchedule: "Auto-Schedule",
6220
6248
  actions: "Actions",
6249
+ share: "Share",
6250
+ publish: "Publish",
6251
+ settings: "Scheduling settings",
6252
+ copyFromLastWeek: "Copy from last week",
6253
+ copyToNextWeek: "Copy to next week",
6254
+ demandAndShifts: "Demand + employee shifts",
6255
+ demandOnly: "Demand only",
6256
+ clear: "Clear",
6257
+ clearShiftsAndDemand: "Clear shifts & demand",
6258
+ clearShifts: "Clear shifts",
6259
+ clearDemand: "Clear demand",
6260
+ pdfDescription: "A4 landscape. Preview, then save",
6261
+ imageDescription: "One picture of the schedule. Send it to the team",
6221
6262
  exportSchedule: "Export schedule",
6222
6263
  clearAllShifts: "Clear all shifts",
6223
6264
  comingSoon: "Coming in a later phase"
6224
6265
  },
6266
+ welcome: {
6267
+ eyebrow: "Welcome to Scheduling",
6268
+ outletSetup: "Setting up",
6269
+ title: "Build your first weekly schedule",
6270
+ subtitle: "Tell us how your outlets operate—from opening hours and staffing needs to your team and their availability. We'll use this to draft a schedule that you can review and adjust before publishing.",
6271
+ setUp: "Set up scheduling",
6272
+ skip: "Skip for now",
6273
+ previewLabel: "Where this ends up",
6274
+ cap1Label: "Set up your team and rules",
6275
+ cap1Description: "Positions, pay and the shifts you run.",
6276
+ cap2Label: "Fill the week",
6277
+ cap2Description: "Auto-Schedule staffs it to the headcount you set.",
6278
+ cap3Label: "Publish",
6279
+ cap3Description: "Your team sees their week."
6280
+ },
6225
6281
  status: {
6226
6282
  draft: "Draft",
6227
6283
  published: "Published"
@@ -6326,11 +6382,11 @@ const On = {
6326
6382
  nextWeek: "Next week"
6327
6383
  },
6328
6384
  comingSoon: "Coming soon."
6329
- }, Hi = {
6385
+ }, Ri = {
6330
6386
  scheduling: ma
6331
- }, Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6387
+ }, Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6332
6388
  __proto__: null,
6333
- default: Hi,
6389
+ default: Ri,
6334
6390
  scheduling: ma
6335
6391
  }, Symbol.toStringTag, { value: "Module" })), ga = {
6336
6392
  nav: {
@@ -6340,14 +6396,42 @@ const On = {
6340
6396
  general: "General"
6341
6397
  },
6342
6398
  topbar: {
6399
+ title: "Schedule",
6343
6400
  today: "Today",
6344
- copy: "Copy schedule",
6345
6401
  autoSchedule: "Auto-Schedule",
6346
6402
  actions: "Actions",
6403
+ share: "Share",
6404
+ publish: "Publish",
6405
+ settings: "Scheduling settings",
6406
+ copyFromLastWeek: "Copy from last week",
6407
+ copyToNextWeek: "Copy to next week",
6408
+ demandAndShifts: "Demand + employee shifts",
6409
+ demandOnly: "Demand only",
6410
+ clear: "Clear",
6411
+ clearShiftsAndDemand: "Clear shifts & demand",
6412
+ clearShifts: "Clear shifts",
6413
+ clearDemand: "Clear demand",
6414
+ pdfDescription: "A4 landscape. Preview, then save",
6415
+ imageDescription: "One picture of the schedule. Send it to the team",
6347
6416
  exportSchedule: "Export schedule",
6348
6417
  clearAllShifts: "Clear all shifts",
6349
6418
  comingSoon: "Coming in a later phase"
6350
6419
  },
6420
+ welcome: {
6421
+ eyebrow: "Welcome to Scheduling",
6422
+ outletSetup: "Setting up",
6423
+ title: "Build your first weekly schedule",
6424
+ subtitle: "Tell us how your outlets operate—from opening hours and staffing needs to your team and their availability. We'll use this to draft a schedule that you can review and adjust before publishing.",
6425
+ setUp: "Set up scheduling",
6426
+ skip: "Skip for now",
6427
+ previewLabel: "Where this ends up",
6428
+ cap1Label: "Set up your team and rules",
6429
+ cap1Description: "Positions, pay and the shifts you run.",
6430
+ cap2Label: "Fill the week",
6431
+ cap2Description: "Auto-Schedule staffs it to the headcount you set.",
6432
+ cap3Label: "Publish",
6433
+ cap3Description: "Your team sees their week."
6434
+ },
6351
6435
  status: {
6352
6436
  draft: "Draft",
6353
6437
  published: "Published"
@@ -6452,11 +6536,11 @@ const On = {
6452
6536
  nextWeek: "Next week"
6453
6537
  },
6454
6538
  comingSoon: "Coming soon."
6455
- }, qi = {
6539
+ }, Ii = {
6456
6540
  scheduling: ga
6457
- }, ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6541
+ }, qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6458
6542
  __proto__: null,
6459
- default: qi,
6543
+ default: Ii,
6460
6544
  scheduling: ga
6461
6545
  }, Symbol.toStringTag, { value: "Module" })), pa = {
6462
6546
  nav: {
@@ -6466,14 +6550,42 @@ const On = {
6466
6550
  general: "General"
6467
6551
  },
6468
6552
  topbar: {
6553
+ title: "Schedule",
6469
6554
  today: "Today",
6470
- copy: "Copy schedule",
6471
6555
  autoSchedule: "Auto-Schedule",
6472
6556
  actions: "Actions",
6557
+ share: "Share",
6558
+ publish: "Publish",
6559
+ settings: "Scheduling settings",
6560
+ copyFromLastWeek: "Copy from last week",
6561
+ copyToNextWeek: "Copy to next week",
6562
+ demandAndShifts: "Demand + employee shifts",
6563
+ demandOnly: "Demand only",
6564
+ clear: "Clear",
6565
+ clearShiftsAndDemand: "Clear shifts & demand",
6566
+ clearShifts: "Clear shifts",
6567
+ clearDemand: "Clear demand",
6568
+ pdfDescription: "A4 landscape. Preview, then save",
6569
+ imageDescription: "One picture of the schedule. Send it to the team",
6473
6570
  exportSchedule: "Export schedule",
6474
6571
  clearAllShifts: "Clear all shifts",
6475
6572
  comingSoon: "Coming in a later phase"
6476
6573
  },
6574
+ welcome: {
6575
+ eyebrow: "Welcome to Scheduling",
6576
+ outletSetup: "Setting up",
6577
+ title: "Build your first weekly schedule",
6578
+ subtitle: "Tell us how your outlets operate—from opening hours and staffing needs to your team and their availability. We'll use this to draft a schedule that you can review and adjust before publishing.",
6579
+ setUp: "Set up scheduling",
6580
+ skip: "Skip for now",
6581
+ previewLabel: "Where this ends up",
6582
+ cap1Label: "Set up your team and rules",
6583
+ cap1Description: "Positions, pay and the shifts you run.",
6584
+ cap2Label: "Fill the week",
6585
+ cap2Description: "Auto-Schedule staffs it to the headcount you set.",
6586
+ cap3Label: "Publish",
6587
+ cap3Description: "Your team sees their week."
6588
+ },
6477
6589
  status: {
6478
6590
  draft: "Draft",
6479
6591
  published: "Published"
@@ -6585,12 +6697,12 @@ const On = {
6585
6697
  default: Ti,
6586
6698
  scheduling: pa
6587
6699
  }, Symbol.toStringTag, { value: "Module" })), Qi = {
6588
- "en-US": Ri,
6589
- "zh-CN": ki,
6590
- "th-TH": Ii,
6700
+ "en-US": ki,
6701
+ "zh-CN": qi,
6702
+ "th-TH": Hi,
6591
6703
  "zh-Hant": Xi
6592
6704
  };
6593
- 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 || {}), R = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(R || {}), 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 || {});
6705
+ 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 || {}), Re = /* @__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))(Re || {}), 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 || {});
6594
6706
  const su = {
6595
6707
  // General
6596
6708
  restaurant: {
@@ -7262,9 +7374,9 @@ const su = {
7262
7374
  {
7263
7375
  label: "",
7264
7376
  subject: S.Order,
7265
- actions: [R.update],
7377
+ actions: [k.update],
7266
7378
  conditions: {
7267
- operation: He.Discount,
7379
+ operation: Re.Discount,
7268
7380
  adjustment: {
7269
7381
  $lte: 1
7270
7382
  }
@@ -7275,67 +7387,67 @@ const su = {
7275
7387
  {
7276
7388
  label: "",
7277
7389
  subject: S.Order,
7278
- actions: [R.update],
7279
- conditions: { operation: He.ChangePrice },
7390
+ actions: [k.update],
7391
+ conditions: { operation: Re.ChangePrice },
7280
7392
  inverted: !1,
7281
7393
  reason: null
7282
7394
  },
7283
7395
  {
7284
7396
  label: "",
7285
7397
  subject: S.Order,
7286
- actions: [R.update],
7398
+ actions: [k.update],
7287
7399
  // 'void_' (not 'void') — POS saves role/ability data straight to CouchDB, and
7288
7400
  // 'void' is a reserved word in the POS Flutter/Dart client, so the identifier
7289
7401
  // POS actually evaluates against (and sends to the approval-code validate
7290
7402
  // endpoint) is already 'void_'. Keep in sync with approval-code-rules.ts.
7291
- conditions: { operation: He.Void },
7403
+ conditions: { operation: Re.Void },
7292
7404
  inverted: !1,
7293
7405
  reason: null
7294
7406
  },
7295
7407
  {
7296
7408
  label: "",
7297
7409
  subject: S.Order,
7298
- actions: [R.update],
7299
- conditions: { operation: He.WaiveServiceCharge },
7410
+ actions: [k.update],
7411
+ conditions: { operation: Re.WaiveServiceCharge },
7300
7412
  inverted: !1,
7301
7413
  reason: null
7302
7414
  },
7303
7415
  {
7304
7416
  label: "",
7305
7417
  subject: S.Order,
7306
- actions: [R.update],
7307
- conditions: { operation: He.Payment },
7418
+ actions: [k.update],
7419
+ conditions: { operation: Re.Payment },
7308
7420
  inverted: !1,
7309
7421
  reason: null
7310
7422
  },
7311
7423
  {
7312
7424
  label: "",
7313
7425
  subject: S.Order,
7314
- actions: [R.update],
7315
- conditions: { operation: He.ClaimDeposit },
7426
+ actions: [k.update],
7427
+ conditions: { operation: Re.ClaimDeposit },
7316
7428
  inverted: !1,
7317
7429
  reason: null
7318
7430
  },
7319
7431
  {
7320
7432
  label: "",
7321
7433
  subject: S.Order,
7322
- actions: [R.update],
7323
- conditions: { operation: He.Resend },
7434
+ actions: [k.update],
7435
+ conditions: { operation: Re.Resend },
7324
7436
  inverted: !1,
7325
7437
  reason: null
7326
7438
  },
7327
7439
  {
7328
7440
  label: "",
7329
7441
  subject: S.Order,
7330
- actions: [R.update],
7331
- conditions: { operation: He.ChangePaymentType },
7442
+ actions: [k.update],
7443
+ conditions: { operation: Re.ChangePaymentType },
7332
7444
  inverted: !1,
7333
7445
  reason: null
7334
7446
  },
7335
7447
  {
7336
7448
  label: "",
7337
7449
  subject: S.Refund,
7338
- actions: [R.create],
7450
+ actions: [k.create],
7339
7451
  conditions: null,
7340
7452
  inverted: !1,
7341
7453
  reason: null
@@ -7343,7 +7455,7 @@ const su = {
7343
7455
  {
7344
7456
  label: "",
7345
7457
  subject: S.Counter,
7346
- actions: [R.manage],
7458
+ actions: [k.manage],
7347
7459
  conditions: null,
7348
7460
  inverted: !1,
7349
7461
  reason: null
@@ -7351,7 +7463,7 @@ const su = {
7351
7463
  {
7352
7464
  label: "",
7353
7465
  subject: S.MallIntegration,
7354
- actions: [R.manage],
7466
+ actions: [k.manage],
7355
7467
  conditions: null,
7356
7468
  inverted: !1,
7357
7469
  reason: null
@@ -7359,7 +7471,7 @@ const su = {
7359
7471
  {
7360
7472
  label: "",
7361
7473
  subject: S.Drawer,
7362
- actions: [R.manage],
7474
+ actions: [k.manage],
7363
7475
  conditions: null,
7364
7476
  inverted: !1,
7365
7477
  reason: null
@@ -7367,7 +7479,7 @@ const su = {
7367
7479
  {
7368
7480
  label: "",
7369
7481
  subject: S.Menu,
7370
- actions: [R.manage],
7482
+ actions: [k.manage],
7371
7483
  conditions: null,
7372
7484
  inverted: !1,
7373
7485
  reason: null
@@ -7375,7 +7487,7 @@ const su = {
7375
7487
  {
7376
7488
  label: "",
7377
7489
  subject: S.Inventory,
7378
- actions: [R.manage],
7490
+ actions: [k.manage],
7379
7491
  conditions: null,
7380
7492
  inverted: !1,
7381
7493
  reason: null
@@ -7383,7 +7495,7 @@ const su = {
7383
7495
  {
7384
7496
  label: "",
7385
7497
  subject: S.Deposit,
7386
- actions: [R.manage],
7498
+ actions: [k.manage],
7387
7499
  conditions: null,
7388
7500
  inverted: !1,
7389
7501
  reason: null
@@ -7391,7 +7503,7 @@ const su = {
7391
7503
  {
7392
7504
  label: "",
7393
7505
  subject: S.Delivery,
7394
- actions: [R.manage],
7506
+ actions: [k.manage],
7395
7507
  conditions: null,
7396
7508
  inverted: !1,
7397
7509
  reason: null
@@ -7399,7 +7511,7 @@ const su = {
7399
7511
  {
7400
7512
  label: "",
7401
7513
  subject: S.CounterRecord,
7402
- actions: [R.manage],
7514
+ actions: [k.manage],
7403
7515
  conditions: null,
7404
7516
  inverted: !1,
7405
7517
  reason: null
@@ -7407,7 +7519,7 @@ const su = {
7407
7519
  {
7408
7520
  label: "",
7409
7521
  subject: S.RestaurantSetting,
7410
- actions: [R.manage],
7522
+ actions: [k.manage],
7411
7523
  conditions: null,
7412
7524
  inverted: !1,
7413
7525
  reason: null
@@ -7415,7 +7527,7 @@ const su = {
7415
7527
  {
7416
7528
  label: "",
7417
7529
  subject: S.Display,
7418
- actions: [R.manage],
7530
+ actions: [k.manage],
7419
7531
  conditions: null,
7420
7532
  inverted: !1,
7421
7533
  reason: null
@@ -7423,7 +7535,7 @@ const su = {
7423
7535
  {
7424
7536
  label: "",
7425
7537
  subject: S.Printer,
7426
- actions: [R.manage],
7538
+ actions: [k.manage],
7427
7539
  conditions: null,
7428
7540
  inverted: !1,
7429
7541
  reason: null
@@ -7431,7 +7543,7 @@ const su = {
7431
7543
  {
7432
7544
  label: "",
7433
7545
  subject: S.Table,
7434
- actions: [R.manage],
7546
+ actions: [k.manage],
7435
7547
  conditions: null,
7436
7548
  inverted: !1,
7437
7549
  reason: null
@@ -7439,7 +7551,7 @@ const su = {
7439
7551
  {
7440
7552
  label: "",
7441
7553
  subject: S.Employee,
7442
- actions: [R.manage],
7554
+ actions: [k.manage],
7443
7555
  conditions: null,
7444
7556
  inverted: !1,
7445
7557
  reason: null
@@ -7447,7 +7559,7 @@ const su = {
7447
7559
  {
7448
7560
  label: "",
7449
7561
  subject: S.System,
7450
- actions: [R.manage],
7562
+ actions: [k.manage],
7451
7563
  conditions: null,
7452
7564
  inverted: !1,
7453
7565
  reason: null
@@ -7455,7 +7567,7 @@ const su = {
7455
7567
  {
7456
7568
  label: "",
7457
7569
  subject: S.Tax,
7458
- actions: [R.manage],
7570
+ actions: [k.manage],
7459
7571
  conditions: null,
7460
7572
  inverted: !1,
7461
7573
  reason: null
@@ -7463,7 +7575,7 @@ const su = {
7463
7575
  {
7464
7576
  label: "",
7465
7577
  subject: S.PaymentType,
7466
- actions: [R.manage],
7578
+ actions: [k.manage],
7467
7579
  conditions: null,
7468
7580
  inverted: !1,
7469
7581
  reason: null
@@ -7471,7 +7583,7 @@ const su = {
7471
7583
  {
7472
7584
  label: "",
7473
7585
  subject: S.FaceId,
7474
- actions: [R.manage],
7586
+ actions: [k.manage],
7475
7587
  conditions: null,
7476
7588
  inverted: !1,
7477
7589
  reason: null
@@ -7479,7 +7591,7 @@ const su = {
7479
7591
  {
7480
7592
  label: "",
7481
7593
  subject: S.Report,
7482
- actions: [R.read],
7594
+ actions: [k.read],
7483
7595
  conditions: { name: re.Closeup },
7484
7596
  inverted: !1,
7485
7597
  reason: ""
@@ -7487,7 +7599,7 @@ const su = {
7487
7599
  {
7488
7600
  label: "",
7489
7601
  subject: S.Report,
7490
- actions: [R.read],
7602
+ actions: [k.read],
7491
7603
  conditions: { name: re.Counter },
7492
7604
  inverted: !1,
7493
7605
  reason: ""
@@ -7495,7 +7607,7 @@ const su = {
7495
7607
  {
7496
7608
  label: "",
7497
7609
  subject: S.Report,
7498
- actions: [R.read],
7610
+ actions: [k.read],
7499
7611
  conditions: { name: re.HourlySales },
7500
7612
  inverted: !1,
7501
7613
  reason: ""
@@ -7503,7 +7615,7 @@ const su = {
7503
7615
  {
7504
7616
  label: "",
7505
7617
  subject: S.Report,
7506
- actions: [R.read],
7618
+ actions: [k.read],
7507
7619
  conditions: { name: re.DailySales },
7508
7620
  inverted: !1,
7509
7621
  reason: ""
@@ -7511,7 +7623,7 @@ const su = {
7511
7623
  {
7512
7624
  label: "",
7513
7625
  subject: S.Report,
7514
- actions: [R.read],
7626
+ actions: [k.read],
7515
7627
  conditions: { name: re.ProductSales },
7516
7628
  inverted: !1,
7517
7629
  reason: ""
@@ -7519,7 +7631,7 @@ const su = {
7519
7631
  {
7520
7632
  label: "",
7521
7633
  subject: S.Report,
7522
- actions: [R.read],
7634
+ actions: [k.read],
7523
7635
  conditions: { name: re.SourceProductSales },
7524
7636
  inverted: !1,
7525
7637
  reason: ""
@@ -7527,7 +7639,7 @@ const su = {
7527
7639
  {
7528
7640
  label: "",
7529
7641
  subject: S.Report,
7530
- actions: [R.read],
7642
+ actions: [k.read],
7531
7643
  conditions: { name: re.UserProductSales },
7532
7644
  inverted: !1,
7533
7645
  reason: ""
@@ -7535,7 +7647,7 @@ const su = {
7535
7647
  {
7536
7648
  label: "",
7537
7649
  subject: S.Report,
7538
- actions: [R.read],
7650
+ actions: [k.read],
7539
7651
  conditions: { name: re.CategorySales },
7540
7652
  inverted: !1,
7541
7653
  reason: ""
@@ -7543,7 +7655,7 @@ const su = {
7543
7655
  {
7544
7656
  label: "",
7545
7657
  subject: S.Report,
7546
- actions: [R.read],
7658
+ actions: [k.read],
7547
7659
  conditions: { name: re.AddonSales },
7548
7660
  inverted: !1,
7549
7661
  reason: ""
@@ -7551,7 +7663,7 @@ const su = {
7551
7663
  {
7552
7664
  label: "",
7553
7665
  subject: S.Report,
7554
- actions: [R.read],
7666
+ actions: [k.read],
7555
7667
  conditions: { name: re.SlotSales },
7556
7668
  inverted: !1,
7557
7669
  reason: ""
@@ -7559,7 +7671,7 @@ const su = {
7559
7671
  {
7560
7672
  label: "",
7561
7673
  subject: S.Report,
7562
- actions: [R.read],
7674
+ actions: [k.read],
7563
7675
  conditions: { name: re.Drawer },
7564
7676
  inverted: !1,
7565
7677
  reason: ""
@@ -7567,7 +7679,7 @@ const su = {
7567
7679
  {
7568
7680
  label: "",
7569
7681
  subject: S.Report,
7570
- actions: [R.read],
7682
+ actions: [k.read],
7571
7683
  conditions: { name: re.Discount },
7572
7684
  inverted: !1,
7573
7685
  reason: ""
@@ -7575,7 +7687,7 @@ const su = {
7575
7687
  {
7576
7688
  label: "",
7577
7689
  subject: S.Report,
7578
- actions: [R.read],
7690
+ actions: [k.read],
7579
7691
  conditions: { name: re.Refund },
7580
7692
  inverted: !1,
7581
7693
  reason: ""
@@ -7583,7 +7695,7 @@ const su = {
7583
7695
  {
7584
7696
  label: "",
7585
7697
  subject: S.Report,
7586
- actions: [R.read],
7698
+ actions: [k.read],
7587
7699
  // 'void_' (not 'void') to match the report-query service's permissionKey and the
7588
7700
  // value already persisted in CouchDB — 'void' is a reserved word in the POS
7589
7701
  // Flutter/Dart client. See pos-role.service.ts / pos-role.helpers.ts.
@@ -7594,7 +7706,7 @@ const su = {
7594
7706
  {
7595
7707
  label: "",
7596
7708
  subject: S.Report,
7597
- actions: [R.read],
7709
+ actions: [k.read],
7598
7710
  conditions: { name: re.Timesheet },
7599
7711
  inverted: !1,
7600
7712
  reason: ""
@@ -7602,7 +7714,7 @@ const su = {
7602
7714
  {
7603
7715
  label: "",
7604
7716
  subject: S.Report,
7605
- actions: [R.read],
7717
+ actions: [k.read],
7606
7718
  conditions: { name: re.CounterPayment },
7607
7719
  inverted: !1,
7608
7720
  reason: ""
@@ -7639,7 +7751,7 @@ const J = [
7639
7751
  o.delete
7640
7752
  ]
7641
7753
  }
7642
- ], fa = [
7754
+ ], ha = [
7643
7755
  ...J,
7644
7756
  {
7645
7757
  label: "Transaction",
@@ -7651,7 +7763,7 @@ const J = [
7651
7763
  o.delete
7652
7764
  ]
7653
7765
  }
7654
- ], ha = [
7766
+ ], fa = [
7655
7767
  ...J,
7656
7768
  {
7657
7769
  label: "Store",
@@ -7869,7 +7981,7 @@ const J = [
7869
7981
  o.delete
7870
7982
  ]
7871
7983
  }
7872
- ], Ma = [
7984
+ ], Ca = [
7873
7985
  ...J,
7874
7986
  {
7875
7987
  label: "Loyalty Card",
@@ -7881,7 +7993,7 @@ const J = [
7881
7993
  o.delete
7882
7994
  ]
7883
7995
  }
7884
- ], Ca = [
7996
+ ], Ma = [
7885
7997
  ...J,
7886
7998
  {
7887
7999
  label: "Bin",
@@ -7945,8 +8057,8 @@ const J = [
7945
8057
  ], il = ge(
7946
8058
  Ni,
7947
8059
  Zi,
7948
- fa,
7949
8060
  ha,
8061
+ fa,
7950
8062
  Ui,
7951
8063
  zi,
7952
8064
  Va,
@@ -7962,8 +8074,8 @@ const J = [
7962
8074
  Ya,
7963
8075
  wa,
7964
8076
  Ba,
7965
- Ma,
7966
- Ca
8077
+ Ca,
8078
+ Ma
7967
8079
  ), ll = ge(
7968
8080
  Be,
7969
8081
  ya,
@@ -8050,7 +8162,7 @@ const J = [
8050
8162
  [`set_${d.crm_loyaltyCard}`]: {
8051
8163
  key: "sys:crm:loyaltyCard",
8052
8164
  name: "CRM Loyalty Card",
8053
- permissions: Ma
8165
+ permissions: Ca
8054
8166
  },
8055
8167
  [`set_${d.crm_referral}`]: {
8056
8168
  key: "sys:crm:referral",
@@ -8060,12 +8172,12 @@ const J = [
8060
8172
  [`set_${d.crm_store}`]: {
8061
8173
  key: "sys:crm:store",
8062
8174
  name: "CRM Store",
8063
- permissions: ha
8175
+ permissions: fa
8064
8176
  },
8065
8177
  [`set_${d.crm_transaction}`]: {
8066
8178
  key: "sys:crm:transaction",
8067
8179
  name: "CRM Transaction",
8068
- permissions: fa
8180
+ permissions: ha
8069
8181
  },
8070
8182
  [`set_${d.crm_setting}`]: {
8071
8183
  key: "sys:crm:setting",
@@ -8075,7 +8187,7 @@ const J = [
8075
8187
  [`set_${d.crm_bin}`]: {
8076
8188
  key: "sys:crm:bin",
8077
8189
  name: "CRM Bin",
8078
- permissions: Ca
8190
+ permissions: Ma
8079
8191
  },
8080
8192
  [`set_${d.crm_marketingMaterial}`]: {
8081
8193
  key: "sys:crm:marketingMaterial",
@@ -8161,7 +8273,7 @@ const zs = [
8161
8273
  subject: Y.inventory_closingDraft,
8162
8274
  actions: [o.read]
8163
8275
  }
8164
- ], Ra = [
8276
+ ], ka = [
8165
8277
  ...ue,
8166
8278
  {
8167
8279
  label: "Closing Draft",
@@ -8188,7 +8300,7 @@ const zs = [
8188
8300
  subject: Y.inventory_stockAdjustment,
8189
8301
  actions: [o.read]
8190
8302
  }
8191
- ], Ha = [
8303
+ ], Ra = [
8192
8304
  ...ue,
8193
8305
  {
8194
8306
  label: "Closing Template",
@@ -8208,8 +8320,8 @@ const zs = [
8208
8320
  ];
8209
8321
  [
8210
8322
  ...zs,
8211
- ...Ra,
8212
- ...Ha
8323
+ ...ka,
8324
+ ...Ra
8213
8325
  ];
8214
8326
  const ml = [
8215
8327
  {
@@ -8244,13 +8356,13 @@ const ml = [
8244
8356
  subject: Y.inventory,
8245
8357
  actions: [o.read, o.update]
8246
8358
  }
8247
- ], fl = [
8359
+ ], hl = [
8248
8360
  {
8249
8361
  label: "Inventory",
8250
8362
  subject: Y.inventory,
8251
8363
  actions: [o.read, o.update]
8252
8364
  }
8253
- ], Ia = [
8365
+ ], Ha = [
8254
8366
  {
8255
8367
  label: "Purchase Order",
8256
8368
  subject: Y.inventory_purchaseOrder,
@@ -8291,7 +8403,7 @@ const ml = [
8291
8403
  subject: Y.inventory_shipment,
8292
8404
  actions: [o.read, o.update]
8293
8405
  }
8294
- ], qa = [
8406
+ ], Ia = [
8295
8407
  {
8296
8408
  label: "Purchase Order",
8297
8409
  subject: Y.inventory_purchaseOrder,
@@ -8312,7 +8424,7 @@ const ml = [
8312
8424
  subject: Y.inventory_shipment,
8313
8425
  actions: [o.read, o.update]
8314
8426
  }
8315
- ], ka = [
8427
+ ], qa = [
8316
8428
  ...ue,
8317
8429
  {
8318
8430
  label: "Surcharge",
@@ -8351,7 +8463,7 @@ const ml = [
8351
8463
  subject: Y.inventory_shipment,
8352
8464
  actions: [o.read, o.update]
8353
8465
  }
8354
- ], hl = [
8466
+ ], fl = [
8355
8467
  ...ue,
8356
8468
  {
8357
8469
  label: "Order Draft Approval",
@@ -8360,9 +8472,9 @@ const ml = [
8360
8472
  }
8361
8473
  ];
8362
8474
  [
8475
+ ...Ha,
8363
8476
  ...Ia,
8364
8477
  ...qa,
8365
- ...ka,
8366
8478
  ...Ta
8367
8479
  ];
8368
8480
  const yl = [
@@ -8420,7 +8532,7 @@ const yl = [
8420
8532
  ...Us,
8421
8533
  ...zs
8422
8534
  ];
8423
- const Ml = {
8535
+ const Cl = {
8424
8536
  [`set_${d.inventory_stockBalance}`]: {
8425
8537
  key: "sys:inventory:stock_balance",
8426
8538
  name: "Stock Balance",
@@ -8449,12 +8561,12 @@ const Ml = {
8449
8561
  [`set_${d.inventory_closingTemplate}`]: {
8450
8562
  key: "sys:inventory:closing_template",
8451
8563
  name: "Closing Template",
8452
- permissions: Ha
8564
+ permissions: Ra
8453
8565
  },
8454
8566
  [`set_${d.inventory_closingDraft}`]: {
8455
8567
  key: "sys:inventory:closing_draft",
8456
8568
  name: "Closing Draft",
8457
- permissions: Ra
8569
+ permissions: ka
8458
8570
  },
8459
8571
  [`set_${d.inventory_ingredient}`]: {
8460
8572
  key: "sys:inventory:ingredient",
@@ -8474,27 +8586,27 @@ const Ml = {
8474
8586
  [`set_${d.inventory_unit}`]: {
8475
8587
  key: "sys:inventory:unit",
8476
8588
  name: "Unit",
8477
- permissions: fl
8589
+ permissions: hl
8478
8590
  },
8479
8591
  [`set_${d.inventory_purchaseTransfer}`]: {
8480
8592
  key: "sys:inventory:purchase_transfer",
8481
8593
  name: "Purchase Transfer",
8482
- permissions: Ia
8594
+ permissions: Ha
8483
8595
  },
8484
8596
  [`set_${d.inventory_orderDraftApproval}`]: {
8485
8597
  key: "sys:inventory:order_draft_approval",
8486
8598
  name: "Order Draft Approval",
8487
- permissions: hl
8599
+ permissions: fl
8488
8600
  },
8489
8601
  [`set_${d.inventory_transferOut}`]: {
8490
8602
  key: "sys:inventory:transfer_out",
8491
8603
  name: "Transfer Out",
8492
- permissions: qa
8604
+ permissions: Ia
8493
8605
  },
8494
8606
  [`set_${d.inventory_surcharge}`]: {
8495
8607
  key: "sys:inventory:surcharge",
8496
8608
  name: "Surcharge",
8497
- permissions: ka
8609
+ permissions: qa
8498
8610
  },
8499
8611
  [`set_${d.inventory_orderTemplate}`]: {
8500
8612
  key: "sys:inventory:order_template",
@@ -8527,8 +8639,8 @@ const Ml = {
8527
8639
  permissions: Bl
8528
8640
  }
8529
8641
  };
8530
- var Ie = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(Ie || {});
8531
- const Cl = {
8642
+ var He = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(He || {});
8643
+ const Ml = {
8532
8644
  /**
8533
8645
  * Triggered by: hrm_teamMember:manage (portal toggle)
8534
8646
  * Injects: team member list read + pos role read
@@ -8540,7 +8652,7 @@ const Cl = {
8540
8652
  permissions: [
8541
8653
  {
8542
8654
  label: "Portal Users",
8543
- subject: Ie.hrm_portalUsers,
8655
+ subject: He.hrm_portalUsers,
8544
8656
  actions: [o.manage]
8545
8657
  },
8546
8658
  {
@@ -8550,12 +8662,12 @@ const Cl = {
8550
8662
  },
8551
8663
  {
8552
8664
  label: "Pos Role",
8553
- subject: Ie.hrm_posRole,
8665
+ subject: He.hrm_posRole,
8554
8666
  actions: [o.read]
8555
8667
  },
8556
8668
  {
8557
8669
  label: "Restaurant resource",
8558
- subject: Ie.hrm_restaurant,
8670
+ subject: He.hrm_restaurant,
8559
8671
  actions: [o.read]
8560
8672
  }
8561
8673
  ]
@@ -8570,17 +8682,17 @@ const Cl = {
8570
8682
  permissions: [
8571
8683
  {
8572
8684
  label: "Portal Users",
8573
- subject: Ie.hrm_portalUsers,
8685
+ subject: He.hrm_portalUsers,
8574
8686
  actions: [o.read]
8575
8687
  },
8576
8688
  {
8577
8689
  label: "Restaurant resource",
8578
- subject: Ie.hrm_restaurant,
8690
+ subject: He.hrm_restaurant,
8579
8691
  actions: [o.read]
8580
8692
  },
8581
8693
  {
8582
8694
  label: "Pos Role",
8583
- subject: Ie.hrm_posRole,
8695
+ subject: He.hrm_posRole,
8584
8696
  actions: [o.manage]
8585
8697
  }
8586
8698
  ]
@@ -8597,7 +8709,7 @@ const Cl = {
8597
8709
  permissions: [
8598
8710
  {
8599
8711
  label: "Portal Users",
8600
- subject: Ie.hrm_portalUsers,
8712
+ subject: He.hrm_portalUsers,
8601
8713
  actions: [o.read]
8602
8714
  }
8603
8715
  ]
@@ -8612,7 +8724,7 @@ const Cl = {
8612
8724
  permissions: [
8613
8725
  {
8614
8726
  label: "Restaurant resource",
8615
- subject: Ie.hrm_restaurant,
8727
+ subject: He.hrm_restaurant,
8616
8728
  actions: [o.read]
8617
8729
  }
8618
8730
  ]
@@ -8643,8 +8755,8 @@ const dn = [
8643
8755
  }
8644
8756
  }, xl = {
8645
8757
  ...dl,
8646
- ...Ml,
8647
8758
  ...Cl,
8759
+ ...Ml,
8648
8760
  ...Dl
8649
8761
  }, au = Object.values(
8650
8762
  xl
@@ -8703,13 +8815,13 @@ var Na = { exports: {} };
8703
8815
  if (1 & l && (r = a(r)), 8 & l || 4 & l && typeof r == "object" && r && r.__esModule) return r;
8704
8816
  var c = /* @__PURE__ */ Object.create(null);
8705
8817
  if (a.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: r }), 2 & l && typeof r != "string")
8706
- for (var f in r)
8818
+ for (var h in r)
8707
8819
  a.d(
8708
8820
  c,
8709
- f,
8821
+ h,
8710
8822
  (function(y) {
8711
8823
  return r[y];
8712
- }).bind(null, f)
8824
+ }).bind(null, h)
8713
8825
  );
8714
8826
  return c;
8715
8827
  }, a.n = function(r) {
@@ -8743,11 +8855,11 @@ var Na = { exports: {} };
8743
8855
  a.r(n), a.d(n, "default", function() {
8744
8856
  return Gt;
8745
8857
  }), a.d(n, "compare", function() {
8746
- return ht;
8858
+ return ft;
8747
8859
  }), a.d(n, "comparable", function() {
8748
8860
  return yt;
8749
8861
  });
8750
- var c = l("Array"), f = l("Object"), y = l("Function");
8862
+ var c = l("Array"), h = l("Object"), y = l("Function");
8751
8863
  function w(m, p) {
8752
8864
  return y(m.get) ? m.get(p) : m[p];
8753
8865
  }
@@ -8831,8 +8943,8 @@ var Na = { exports: {} };
8831
8943
  },
8832
8944
  $elemMatch: function(m, p, B, D) {
8833
8945
  return c(p) ? !!~function(E, O) {
8834
- for (var H = 0; H < E.length; H++)
8835
- if (w(E, H), W(O, w(E, H))) return H;
8946
+ for (var R = 0; R < E.length; R++)
8947
+ if (w(E, R), W(O, w(E, R))) return R;
8836
8948
  return -1;
8837
8949
  }(p, m) : W(m, p, B, D);
8838
8950
  },
@@ -8884,29 +8996,29 @@ var Na = { exports: {} };
8884
8996
  if (!(E instanceof Array)) {
8885
8997
  var O = D(E);
8886
8998
  if (O === E && r(E) === "object") {
8887
- for (k = m.length; k--; )
8888
- if (String(m[k]) === String(E) && String(E) !== "[object Object]")
8999
+ for (q = m.length; q--; )
9000
+ if (String(m[q]) === String(E) && String(E) !== "[object Object]")
8889
9001
  return !0;
8890
9002
  }
8891
9003
  if (O === void 0) {
8892
- for (k = m.length; k--; ) if (m[k] == null) return !0;
9004
+ for (q = m.length; q--; ) if (m[q] == null) return !0;
8893
9005
  }
8894
- for (k = m.length; k--; ) {
8895
- var H = W(ft(w(m, k), B), O, k, m);
8896
- if (H && String(H) !== "[object Object]" && String(O) !== "[object Object]")
9006
+ for (q = m.length; q--; ) {
9007
+ var R = W(ht(w(m, q), B), O, q, m);
9008
+ if (R && String(R) !== "[object Object]" && String(O) !== "[object Object]")
8897
9009
  return !0;
8898
9010
  }
8899
9011
  return !!~m.indexOf(O);
8900
9012
  }
8901
- for (var k = E.length; k--; )
8902
- if (~m.indexOf(D(w(E, k)))) return !0;
9013
+ for (var q = E.length; q--; )
9014
+ if (~m.indexOf(D(w(E, q)))) return !0;
8903
9015
  return !1;
8904
9016
  };
8905
9017
  },
8906
9018
  $nin: function(m, p, B) {
8907
9019
  var D = oe.$in(m, p, B);
8908
- return function(E, O, H, k) {
8909
- return !D(E, O, H, k);
9020
+ return function(E, O, R, q) {
9021
+ return !D(E, O, R, q);
8910
9022
  };
8911
9023
  },
8912
9024
  $mod: function(m) {
@@ -8916,26 +9028,26 @@ var Na = { exports: {} };
8916
9028
  },
8917
9029
  $ne: function(m, p, B) {
8918
9030
  var D = oe.$eq(m, p, B);
8919
- return Z(function(E, O, H, k) {
8920
- return !D(E, O, H, k);
9031
+ return Z(function(E, O, R, q) {
9032
+ return !D(E, O, R, q);
8921
9033
  });
8922
9034
  },
8923
9035
  $and: function(m, p, B) {
8924
- return m.map(Me(B));
9036
+ return m.map(Ce(B));
8925
9037
  },
8926
9038
  $all: function(m, p, B) {
8927
9039
  return oe.$and(m, p, B);
8928
9040
  },
8929
9041
  $or: function(m, p, B) {
8930
- return m.map(Me(B));
9042
+ return m.map(Ce(B));
8931
9043
  },
8932
9044
  $nor: function(m, p, B) {
8933
- return m.map(Me(B));
9045
+ return m.map(Ce(B));
8934
9046
  },
8935
9047
  $not: function(m, p, B) {
8936
- var D = Me(B)(m);
8937
- return function(E, O, H) {
8938
- return !W(D, E, O, H);
9048
+ var D = Ce(B)(m);
9049
+ return function(E, O, R) {
9050
+ return !W(D, E, O, R);
8939
9051
  };
8940
9052
  },
8941
9053
  $type: function(m) {
@@ -8953,73 +9065,73 @@ var Na = { exports: {} };
8953
9065
  );
8954
9066
  },
8955
9067
  $elemMatch: function(m, p, B) {
8956
- return Me(B)(m);
9068
+ return Ce(B)(m);
8957
9069
  },
8958
9070
  $exists: function(m) {
8959
9071
  return !!m;
8960
9072
  }
8961
9073
  };
8962
- function he(m, p) {
9074
+ function fe(m, p) {
8963
9075
  return { options: m, validate: p };
8964
9076
  }
8965
9077
  function ie(m, p) {
8966
9078
  var B = m.keyPath, D = m.child, E = m.query, O = [];
8967
- if (function i(g, A, b, M, G) {
9079
+ if (function i(g, A, b, C, G) {
8968
9080
  if (b === A.length || g == null)
8969
- return void G.push([g, A[b - 1], M]);
9081
+ return void G.push([g, A[b - 1], C]);
8970
9082
  var F = w(A, b);
8971
9083
  if (c(g) && isNaN(Number(F)))
8972
9084
  for (var Q = 0, j = g.length; Q < j; Q++) i(w(g, Q), A, b, g, G);
8973
9085
  else i(w(g, F), A, b + 1, g, G);
8974
9086
  }(p, B, 0, p, O), O.length === 1) {
8975
- var H = O[0];
8976
- return W(D, H[0], H[1], H[2]);
9087
+ var R = O[0];
9088
+ return W(D, R[0], R[1], R[2]);
8977
9089
  }
8978
- for (var k = E && E.$ne !== void 0, te = k, ae = 0; ae < O.length; ae++) {
8979
- var h = O[ae], u = W(D, h[0], h[1], h[2]);
8980
- k ? te &= u : te |= u;
9090
+ for (var q = E && E.$ne !== void 0, te = q, ae = 0; ae < O.length; ae++) {
9091
+ var f = O[ae], u = W(D, f[0], f[1], f[2]);
9092
+ q ? te &= u : te |= u;
8981
9093
  }
8982
9094
  return te;
8983
9095
  }
8984
9096
  function ss(m, p, B) {
8985
- return he({ keyPath: m, child: p, query: B }, ie);
9097
+ return fe({ keyPath: m, child: p, query: B }, ie);
8986
9098
  }
8987
- function Me(m) {
8988
- var p = m.comparable, B = m.expressions, D = function(H) {
8989
- var k;
8990
- return (!H || !(k = H) || k.constructor !== Object && k.constructor !== Array && k.constructor.toString() !== "function Object() { [native code] }" && k.constructor.toString() !== "function Array() { [native code] }" || k.toJSON) && (H = { $eq: H }), H;
8991
- }, E = function(H) {
8992
- H = p(H);
8993
- var k = [];
8994
- for (var te in H) {
8995
- var ae = H[te];
9099
+ function Ce(m) {
9100
+ var p = m.comparable, B = m.expressions, D = function(R) {
9101
+ var q;
9102
+ return (!R || !(q = R) || q.constructor !== Object && q.constructor !== Array && q.constructor.toString() !== "function Object() { [native code] }" && q.constructor.toString() !== "function Array() { [native code] }" || q.toJSON) && (R = { $eq: R }), R;
9103
+ }, E = function(R) {
9104
+ R = p(R);
9105
+ var q = [];
9106
+ for (var te in R) {
9107
+ var ae = R[te];
8996
9108
  if (te !== "$options") {
8997
- var h = se[te] || m && B && B[te];
8998
- if (h) oe[te] && (ae = oe[te](ae, H, m)), k.push(he(p(ae), h));
9109
+ var f = se[te] || m && B && B[te];
9110
+ if (f) oe[te] && (ae = oe[te](ae, R, m)), q.push(fe(p(ae), f));
8999
9111
  else {
9000
9112
  if (te.charCodeAt(0) === 36)
9001
9113
  throw new Error("Unknown operation " + te);
9002
9114
  var u = te.split(".");
9003
- k.push(ss(u, O(ae), ae));
9115
+ q.push(ss(u, O(ae), ae));
9004
9116
  }
9005
9117
  }
9006
9118
  }
9007
- return k.length === 1 ? k[0] : he(k, se.$and);
9008
- }, O = function(H) {
9009
- return H = D(H), function k(te, ae) {
9010
- if (!f(te)) return ae;
9011
- for (var h in te) ae.push(h), k(te[h], ae);
9119
+ return q.length === 1 ? q[0] : fe(q, se.$and);
9120
+ }, O = function(R) {
9121
+ return R = D(R), function q(te, ae) {
9122
+ if (!h(te)) return ae;
9123
+ for (var f in te) ae.push(f), q(te[f], ae);
9012
9124
  return ae;
9013
- }(H, []).join(",").search(/[$.]/) === -1 ? he(H, Le) : E(H);
9125
+ }(R, []).join(",").search(/[$.]/) === -1 ? fe(R, Le) : E(R);
9014
9126
  };
9015
- return function(H) {
9016
- return E(D(H));
9127
+ return function(R) {
9128
+ return E(D(R));
9017
9129
  };
9018
9130
  }
9019
9131
  function Le(m, p) {
9020
9132
  if (Object.prototype.toString.call(m) !== Object.prototype.toString.call(p))
9021
9133
  return !1;
9022
- if (f(m)) {
9134
+ if (h(m)) {
9023
9135
  if (Object.keys(m).length !== Object.keys(p).length) return !1;
9024
9136
  for (var B in m) if (!Le(m[B], p[B])) return !1;
9025
9137
  return !0;
@@ -9032,22 +9144,22 @@ var Na = { exports: {} };
9032
9144
  }
9033
9145
  return m === p;
9034
9146
  }
9035
- function ft(m, p) {
9036
- var B = Me(p)(m);
9147
+ function ht(m, p) {
9148
+ var B = Ce(p)(m);
9037
9149
  return p && p.select && (B = {
9038
9150
  options: B,
9039
- validate: function(D, E, O, H) {
9040
- return W(D, E && p.select(E), O, H);
9151
+ validate: function(D, E, O, R) {
9152
+ return W(D, E && p.select(E), O, R);
9041
9153
  }
9042
9154
  }), B;
9043
9155
  }
9044
9156
  function Gt(m, p) {
9045
- var B = ft(m, p = Object.assign({ compare: ht, comparable: yt }, p));
9157
+ var B = ht(m, p = Object.assign({ compare: ft, comparable: yt }, p));
9046
9158
  return function(D, E, O) {
9047
9159
  return W(B, D, E, O);
9048
9160
  };
9049
9161
  }
9050
- function ht(m, p) {
9162
+ function ft(m, p) {
9051
9163
  if (Le(m, p)) return 0;
9052
9164
  if (r(m) === r(p)) {
9053
9165
  if (m > p) return 1;
@@ -9095,13 +9207,13 @@ function Vl() {
9095
9207
  return !1;
9096
9208
  }
9097
9209
  }
9098
- function Rt(e, t, s) {
9099
- return Vl() ? Rt = Reflect.construct : Rt = function(a, r, l) {
9210
+ function kt(e, t, s) {
9211
+ return Vl() ? kt = Reflect.construct : kt = function(a, r, l) {
9100
9212
  var c = [null];
9101
9213
  c.push.apply(c, r);
9102
- var f = Function.bind.apply(a, c), y = new f();
9214
+ var h = Function.bind.apply(a, c), y = new h();
9103
9215
  return l && _t(y, l.prototype), y;
9104
- }, Rt.apply(null, arguments);
9216
+ }, kt.apply(null, arguments);
9105
9217
  }
9106
9218
  function Fl(e) {
9107
9219
  return Function.toString.call(e).indexOf("[native code]") !== -1;
@@ -9117,7 +9229,7 @@ function Fs(e) {
9117
9229
  t.set(n, a);
9118
9230
  }
9119
9231
  function a() {
9120
- return Rt(n, arguments, Vs(this).constructor);
9232
+ return kt(n, arguments, Vs(this).constructor);
9121
9233
  }
9122
9234
  return a.prototype = Object.create(n.prototype, {
9123
9235
  constructor: {
@@ -9165,8 +9277,8 @@ var Za = function(t) {
9165
9277
  field: l,
9166
9278
  subjectName: this.ability.subjectName(r)
9167
9279
  });
9168
- var f = c ? c.reason : "";
9169
- throw this.message = this._customMessage || f || Vt(this), this;
9280
+ var h = c ? c.reason : "";
9281
+ throw this.message = this._customMessage || h || Vt(this), this;
9170
9282
  }
9171
9283
  }, s._setMetadata = function(a) {
9172
9284
  this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field;
@@ -9175,18 +9287,18 @@ var Za = function(t) {
9175
9287
  function Ss(e) {
9176
9288
  return Array.isArray(e) ? e : [e];
9177
9289
  }
9178
- function Rl(e) {
9290
+ function kl(e) {
9179
9291
  if (!e || typeof e == "string")
9180
9292
  return e;
9181
9293
  var t = typeof e == "object" ? e.constructor : e;
9182
9294
  return t.modelName || t.name;
9183
9295
  }
9184
- function Hl(e) {
9296
+ function Rl(e) {
9185
9297
  return JSON.parse(JSON.stringify(e));
9186
9298
  }
9187
- var Il = /[-/\\^$+?.()|[\]{}]/g, ql = /\.?\*+\.?/g, kl = /\*+/, Tl = /\./g;
9299
+ var Hl = /[-/\\^$+?.()|[\]{}]/g, Il = /\.?\*+\.?/g, ql = /\*+/, Tl = /\./g;
9188
9300
  function Xl(e, t, s) {
9189
- var n = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", r = e.replace(Tl, "\\$&").replace(kl, a + n);
9301
+ var n = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", r = e.replace(Tl, "\\$&").replace(ql, a + n);
9190
9302
  return t + e.length === s.length ? "(?:" + r + ")?" : r;
9191
9303
  }
9192
9304
  function Ql(e, t, s) {
@@ -9194,7 +9306,7 @@ function Ql(e, t, s) {
9194
9306
  }
9195
9307
  function Nl(e) {
9196
9308
  var t = e.map(function(n) {
9197
- return n.replace(Il, Ql).replace(ql, Xl);
9309
+ return n.replace(Hl, Ql).replace(Il, Xl);
9198
9310
  }), s = t.length > 1 ? "(?:" + t.join("|") + ")" : t[0];
9199
9311
  return new RegExp("^" + s + "$");
9200
9312
  }
@@ -9215,7 +9327,7 @@ var Zl = /* @__PURE__ */ function() {
9215
9327
  }, t.matchesField = function(n) {
9216
9328
  return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Nl(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
9217
9329
  }, e;
9218
- }(), fe = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), mn = {
9330
+ }(), he = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), mn = {
9219
9331
  crud: ["create", "read", "update", "delete"]
9220
9332
  };
9221
9333
  function gn(e, t) {
@@ -9231,15 +9343,15 @@ var Ul = /* @__PURE__ */ function() {
9231
9343
  };
9232
9344
  function e(s, n) {
9233
9345
  n === void 0 && (n = {}), Object.defineProperty(this, "subjectName", {
9234
- value: n.subjectName || Rl
9235
- }), this[fe] = {
9346
+ value: n.subjectName || kl
9347
+ }), this[he] = {
9236
9348
  RuleType: n.RuleType || Zl,
9237
9349
  originalRules: s || [],
9238
9350
  hasPerFieldRules: !1,
9239
9351
  indexedRules: /* @__PURE__ */ Object.create(null),
9240
9352
  mergedRules: /* @__PURE__ */ Object.create(null),
9241
9353
  events: {},
9242
- aliases: Hl(mn)
9354
+ aliases: Rl(mn)
9243
9355
  }, this.update(s);
9244
9356
  }
9245
9357
  var t = e.prototype;
@@ -9250,19 +9362,19 @@ var Ul = /* @__PURE__ */ function() {
9250
9362
  rules: n,
9251
9363
  ability: this
9252
9364
  };
9253
- this.emit("update", a), this[fe].originalRules = n.slice(0), this[fe].mergedRules = /* @__PURE__ */ Object.create(null);
9365
+ this.emit("update", a), this[he].originalRules = n.slice(0), this[he].mergedRules = /* @__PURE__ */ Object.create(null);
9254
9366
  var r = this.buildIndexFor(n);
9255
- return this[fe].indexedRules = r.rules, this[fe].hasPerFieldRules = r.hasPerFieldRules, this.emit("updated", a), this;
9367
+ return this[he].indexedRules = r.rules, this[he].hasPerFieldRules = r.hasPerFieldRules, this.emit("updated", a), this;
9256
9368
  }, t.buildIndexFor = function(n) {
9257
- for (var a = /* @__PURE__ */ Object.create(null), r = this[fe].RuleType, l = !0, c = !1, f = 0; f < n.length; f++) {
9258
- var y = new r(n[f]), w = this.expandActions(y.actions), V = Ss(y.subject), Z = n.length - f - 1;
9369
+ for (var a = /* @__PURE__ */ Object.create(null), r = this[he].RuleType, l = !0, c = !1, h = 0; h < n.length; h++) {
9370
+ var y = new r(n[h]), w = this.expandActions(y.actions), V = Ss(y.subject), Z = n.length - h - 1;
9259
9371
  l = !!(l && y.inverted), !c && y.fields && (c = !0);
9260
9372
  for (var W = 0; W < V.length; W++) {
9261
9373
  var se = V[W];
9262
9374
  a[se] = a[se] || /* @__PURE__ */ Object.create(null);
9263
9375
  for (var oe = 0; oe < w.length; oe++) {
9264
- var he = w[oe];
9265
- a[se][he] = a[se][he] || /* @__PURE__ */ Object.create(null), a[se][he][Z] = y;
9376
+ var fe = w[oe];
9377
+ a[se][fe] = a[se][fe] || /* @__PURE__ */ Object.create(null), a[se][fe][Z] = y;
9266
9378
  }
9267
9379
  }
9268
9380
  }
@@ -9272,7 +9384,7 @@ var Ul = /* @__PURE__ */ function() {
9272
9384
  rules: a
9273
9385
  };
9274
9386
  }, t.expandActions = function(n) {
9275
- for (var a = this[fe].aliases, r = Ss(n), l = 0; l < r.length; ) {
9387
+ for (var a = this[he].aliases, r = Ss(n), l = 0; l < r.length; ) {
9276
9388
  var c = r[l++];
9277
9389
  a.hasOwnProperty(c) && (r = r.concat(a[c]));
9278
9390
  }
@@ -9288,17 +9400,17 @@ var Ul = /* @__PURE__ */ function() {
9288
9400
  return l[c];
9289
9401
  return null;
9290
9402
  }, t.possibleRulesFor = function(n, a) {
9291
- var r = this.subjectName(a), l = this[fe].mergedRules, c = r + "_" + n;
9403
+ var r = this.subjectName(a), l = this[he].mergedRules, c = r + "_" + n;
9292
9404
  return l[c] || (l[c] = this.mergeRulesFor(n, r)), l[c];
9293
9405
  }, t.mergeRulesFor = function(n, a) {
9294
- var r = this[fe].indexedRules, l = [a, "all"].reduce(function(c, f) {
9295
- var y = r[f];
9406
+ var r = this[he].indexedRules, l = [a, "all"].reduce(function(c, h) {
9407
+ var y = r[h];
9296
9408
  return y ? Object.assign(c, y[n], y.manage) : c;
9297
9409
  }, []);
9298
9410
  return l.filter(Boolean);
9299
9411
  }, t.rulesFor = function(n, a, r) {
9300
9412
  var l = this.possibleRulesFor(n, a);
9301
- return this[fe].hasPerFieldRules ? l.filter(function(c) {
9413
+ return this[he].hasPerFieldRules ? l.filter(function(c) {
9302
9414
  return c.isRelevantFor(a, r);
9303
9415
  }) : l;
9304
9416
  }, t.cannot = function() {
@@ -9310,7 +9422,7 @@ var Ul = /* @__PURE__ */ function() {
9310
9422
  Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
9311
9423
  `.trim()), (n = Sl.from(this)).throwUnlessCan.apply(n, arguments);
9312
9424
  }, t.on = function(n, a) {
9313
- var r = this[fe].events, l = !0;
9425
+ var r = this[he].events, l = !0;
9314
9426
  return r[n] || (r[n] = []), r[n].push(a), function() {
9315
9427
  if (l) {
9316
9428
  var c = r[n].indexOf(a);
@@ -9318,14 +9430,14 @@ var Ul = /* @__PURE__ */ function() {
9318
9430
  }
9319
9431
  };
9320
9432
  }, t.emit = function(n, a) {
9321
- var r = this[fe].events[n];
9433
+ var r = this[he].events[n];
9322
9434
  r && r.slice(0).forEach(function(l) {
9323
9435
  return l(a);
9324
9436
  });
9325
9437
  }, Gl(e, [{
9326
9438
  key: "rules",
9327
9439
  get: function() {
9328
- return this[fe].originalRules;
9440
+ return this[he].originalRules;
9329
9441
  }
9330
9442
  }]), e;
9331
9443
  }();
@@ -9352,7 +9464,7 @@ function Ll(e, t) {
9352
9464
  function za(e, t) {
9353
9465
  return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Ll(e, t);
9354
9466
  }
9355
- function Rs(e, t) {
9467
+ function ks(e, t) {
9356
9468
  const s = Ua(t), n = (c) => s.can(c.action, c.subject, c.field) ? !0 : za(s, c) ? s.can(c.action, c.coverSubject, c.field) : !1, a = e.find((c) => !n(c));
9357
9469
  if (a) {
9358
9470
  const c = s.relevantRuleFor(
@@ -9370,19 +9482,19 @@ function Rs(e, t) {
9370
9482
  return { granted: !0, decisivePermission: r, decisiveRule: l ?? null };
9371
9483
  }
9372
9484
  function Kl(e, t) {
9373
- const s = Rs([e], t);
9485
+ const s = ks([e], t);
9374
9486
  if (!s.granted)
9375
9487
  return { ...s, conditionEvaluation: "not_enforced" };
9376
9488
  const n = Ua(t), a = za(n, e) ? e.coverSubject : void 0, r = [e.subject, a].filter(
9377
9489
  (l) => l !== void 0
9378
9490
  ).flatMap((l) => {
9379
- const c = co(l).filter((f) => {
9491
+ const c = co(l).filter((h) => {
9380
9492
  var y;
9381
- return ((y = f.appliesToActions) == null ? void 0 : y.call(f, [e.action])) ?? !0;
9382
- }).flatMap((f) => f.ownedFields);
9383
- return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((f) => !f.inverted).map((f) => ({ rule: f, ownedFields: c }));
9493
+ return ((y = h.appliesToActions) == null ? void 0 : y.call(h, [e.action])) ?? !0;
9494
+ }).flatMap((h) => h.ownedFields);
9495
+ return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((h) => !h.inverted).map((h) => ({ rule: h, ownedFields: c }));
9384
9496
  });
9385
- return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((f) => c.includes(f))) ? { ...s, conditionEvaluation: "not_enforced" } : {
9497
+ return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((h) => c.includes(h))) ? { ...s, conditionEvaluation: "not_enforced" } : {
9386
9498
  granted: !1,
9387
9499
  decisivePermission: e,
9388
9500
  decisiveRule: null,
@@ -9391,7 +9503,7 @@ function Kl(e, t) {
9391
9503
  }
9392
9504
  function Jl(e, t, s) {
9393
9505
  const n = arguments.length >= 3;
9394
- return Array.isArray(e) ? Rs(e, t) : n ? Kl(e, t) : Rs([e], t);
9506
+ return Array.isArray(e) ? ks(e, t) : n ? Kl(e, t) : ks([e], t);
9395
9507
  }
9396
9508
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
9397
9509
  const _l = () => {
@@ -9406,10 +9518,10 @@ function $l(e, t, s) {
9406
9518
  evaluating: r = void 0,
9407
9519
  shallow: l = !0,
9408
9520
  onError: c = _l
9409
- } = n, f = Ue(!a), y = l ? _a(t) : Ue(t);
9521
+ } = n, h = Ue(!a), y = l ? _a(t) : Ue(t);
9410
9522
  let w = 0;
9411
- return fn(async (V) => {
9412
- if (!f.value)
9523
+ return hn(async (V) => {
9524
+ if (!h.value)
9413
9525
  return;
9414
9526
  w++;
9415
9527
  const Z = w;
@@ -9429,7 +9541,7 @@ function $l(e, t, s) {
9429
9541
  } finally {
9430
9542
  r && Z === w && (r.value = !1), W = !0;
9431
9543
  }
9432
- }), a ? qs(() => (f.value = !0, y.value)) : y;
9544
+ }), a ? Is(() => (h.value = !0, y.value)) : y;
9433
9545
  }
9434
9546
  async function ec(e) {
9435
9547
  const { sessionUser: t, validationManifest: s } = e, { requiredRoles: n, requiredCaslPermissions: a, customValidationFunction: r } = s;
@@ -9473,7 +9585,7 @@ async function tc(e, t) {
9473
9585
  canAccess: !0
9474
9586
  };
9475
9587
  }
9476
- var Hs = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Hs || {});
9588
+ var Rs = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Rs || {});
9477
9589
  function sc() {
9478
9590
  const e = ir(), { sessionUser: t } = bn();
9479
9591
  return $l(
@@ -9514,7 +9626,7 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
9514
9626
  subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
9515
9627
  }, dc = {
9516
9628
  noPermission: uc
9517
- }, Ac = { class: "w-full h-full flex justify-center items-center" }, mc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, gc = { class: "w-[300px] h-[300px]" }, pc = ["src"], fc = { class: "text-2xl" }, hc = { class: "text-xl" }, yc = /* @__PURE__ */ at({
9629
+ }, Ac = { class: "w-full h-full flex justify-center items-center" }, mc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, gc = { class: "w-[300px] h-[300px]" }, pc = ["src"], hc = { class: "text-2xl" }, fc = { class: "text-xl" }, yc = /* @__PURE__ */ at({
9518
9630
  __name: "NoPermission",
9519
9631
  setup(e) {
9520
9632
  const { t } = vn({
@@ -9534,8 +9646,8 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
9534
9646
  }, null, 8, pc)
9535
9647
  ]),
9536
9648
  Qe("div", null, [
9537
- Qe("h1", fc, sn($e(t)("noPermission.title")), 1),
9538
- Qe("h2", hc, sn($e(t)("noPermission.subtitle")), 1)
9649
+ Qe("h1", hc, sn($e(t)("noPermission.title")), 1),
9650
+ Qe("h2", fc, sn($e(t)("noPermission.subtitle")), 1)
9539
9651
  ])
9540
9652
  ])
9541
9653
  ]));
@@ -9544,14 +9656,14 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
9544
9656
  __name: "PermissionWrapper",
9545
9657
  setup(e) {
9546
9658
  const t = sc();
9547
- return (s, n) => $e(t) === $e(Hs).Denied ? (rt(), $t(yc, { key: 0 })) : $e(t) === $e(Hs).Allowed ? ks(s.$slots, "default", { key: 1 }) : $a("", !0);
9659
+ return (s, n) => $e(t) === $e(Rs).Denied ? (rt(), $t(yc, { key: 0 })) : $e(t) === $e(Rs).Allowed ? qs(s.$slots, "default", { key: 1 }) : $a("", !0);
9548
9660
  }
9549
9661
  });
9550
9662
  function ot(e) {
9551
9663
  return {
9552
9664
  inheritAttrs: !1,
9553
9665
  setup(t, { attrs: s }) {
9554
- return () => Ht(bc, {}, { default: () => Ht(e, s) });
9666
+ return () => Rt(bc, {}, { default: () => Rt(e, s) });
9555
9667
  }
9556
9668
  };
9557
9669
  }
@@ -9570,7 +9682,7 @@ function vc(e, t) {
9570
9682
  }
9571
9683
  let a = null;
9572
9684
  return er(e, async (r) => {
9573
- r && (await hn(), n());
9685
+ r && (await fn(), n());
9574
9686
  }), yn(() => {
9575
9687
  window.addEventListener("resize", n), a = new ResizeObserver(n), a.observe(document.body);
9576
9688
  }), tr(() => {
@@ -9580,7 +9692,7 @@ function vc(e, t) {
9580
9692
  const wc = /* @__PURE__ */ at({
9581
9693
  __name: "FullWrapper",
9582
9694
  setup(e) {
9583
- const t = or(), s = Ue(null), n = vc(s), a = qs(() => {
9695
+ const t = or(), s = Ue(null), n = vc(s), a = Is(() => {
9584
9696
  var c;
9585
9697
  const l = t.isAtMost("sm") ? 56 : 0;
9586
9698
  return {
@@ -9592,10 +9704,10 @@ const wc = /* @__PURE__ */ at({
9592
9704
  ref: s,
9593
9705
  style: sr(a.value)
9594
9706
  }, [
9595
- ks(r.$slots, "default")
9707
+ qs(r.$slots, "default")
9596
9708
  ], 4));
9597
9709
  }
9598
- }), Bc = { class: "flex justify-center items-center h-full w-full" }, Mc = /* @__PURE__ */ at({
9710
+ }), Bc = { class: "flex justify-center items-center h-full w-full" }, Cc = /* @__PURE__ */ at({
9599
9711
  __name: "PageLoading",
9600
9712
  setup(e) {
9601
9713
  return (t, s) => {
@@ -9612,13 +9724,13 @@ const wc = /* @__PURE__ */ at({
9612
9724
  }
9613
9725
  }), pe = (e) => rr({
9614
9726
  loader: e,
9615
- loadingComponent: Mc
9616
- }), Cc = { class: "sch-vars sch-page" }, Dc = { class: "sch-shell-main" }, xc = /* @__PURE__ */ at({
9727
+ loadingComponent: Cc
9728
+ }), Mc = { class: "sch-vars sch-page" }, Dc = { class: "sch-shell-main" }, xc = /* @__PURE__ */ at({
9617
9729
  __name: "PortalShell",
9618
9730
  setup(e) {
9619
- return (t, s) => (rt(), Ts("div", Cc, [
9731
+ return (t, s) => (rt(), Ts("div", Mc, [
9620
9732
  Qe("div", Dc, [
9621
- ks(t.$slots, "default")
9733
+ qs(t.$slots, "default")
9622
9734
  ])
9623
9735
  ]));
9624
9736
  }
@@ -9627,7 +9739,7 @@ function Ws(e) {
9627
9739
  return {
9628
9740
  inheritAttrs: !1,
9629
9741
  setup(t, { attrs: s }) {
9630
- return () => Ht(xc, {}, { default: () => Ht(e, s) });
9742
+ return () => Rt(xc, {}, { default: () => Rt(e, s) });
9631
9743
  }
9632
9744
  };
9633
9745
  }
@@ -9641,16 +9753,16 @@ const _e = (e) => ({
9641
9753
  }
9642
9754
  ]
9643
9755
  }
9644
- }), jc = ot(pe(() => import("./Main-DkP8dWgn.js"))), Ec = ot(pe(() => import("./Main-DHJcgePj.js"))), Pc = ot(
9645
- pe(() => import("./AuditLogList-ByTa5UJY.js"))
9646
- ), Oc = ot(pe(() => import("./Main-DqiGpT4v.js"))), Gc = pe(() => import("./ApprovalCodeList-D5l9vIsE.js")), Yc = pe(() => import("./GrantUserList-Bt8w3p4j.js")), Vc = pe(() => import("./EmployeeList-Bv6ANk-P.js")), Fc = pe(() => import("./RoleList-CH6NDKPU.js")), Sc = pe(() => import("./TimesheetList-DcoqzbLO.js")), Rc = pe(() => import("./TeamMemberList-BwfG3go2.js")), Hc = pe(
9647
- () => import("./PermissionSetList-BIGv1u67.js")
9756
+ }), jc = ot(pe(() => import("./Main-DkLBemi7.js"))), Ec = ot(pe(() => import("./Main-DFwdAWqn.js"))), Pc = ot(
9757
+ pe(() => import("./AuditLogList-BTifJhO1.js"))
9758
+ ), Oc = ot(pe(() => import("./Main-B2r59IOW.js"))), Gc = pe(() => import("./ApprovalCodeList-cG0zmQVJ.js")), Yc = pe(() => import("./GrantUserList-D5b7tJ8Y.js")), Vc = pe(() => import("./EmployeeList-DzcMtxJ3.js")), Fc = pe(() => import("./RoleList-DHO4JRKF.js")), Sc = pe(() => import("./TimesheetList-Dp40G-0I.js")), kc = pe(() => import("./TeamMemberList-CgFWLRBM.js")), Rc = pe(
9759
+ () => import("./PermissionSetList-B80hrfMW.js")
9760
+ ), Hc = Ws(
9761
+ ot(pe(() => import("./SchedulePage-Nm0krGVU.js")))
9648
9762
  ), Ic = Ws(
9649
- ot(pe(() => import("./SchedulePage-C1egcbIC.js")))
9763
+ ot(pe(() => import("./SchedulePositionPage-C0hrO11d.js")))
9650
9764
  ), qc = Ws(
9651
- ot(pe(() => import("./SchedulePositionPage-OhL_hsqG.js")))
9652
- ), kc = Ws(
9653
- ot(pe(() => import("./ScheduleGeneralPage-DJPENJZ2.js")))
9765
+ ot(pe(() => import("./ScheduleGeneralPage-WlBM8bxV.js")))
9654
9766
  ), ou = [
9655
9767
  {
9656
9768
  path: "/",
@@ -9698,12 +9810,12 @@ const _e = (e) => ({
9698
9810
  {
9699
9811
  path: "member",
9700
9812
  name: "team-member",
9701
- component: Rc
9813
+ component: kc
9702
9814
  },
9703
9815
  {
9704
9816
  path: "role",
9705
9817
  name: "team-role",
9706
- component: Hc
9818
+ component: Rc
9707
9819
  }
9708
9820
  ]
9709
9821
  },
@@ -9732,19 +9844,19 @@ const _e = (e) => ({
9732
9844
  {
9733
9845
  path: "/schedule",
9734
9846
  name: "schedule",
9735
- component: Ic,
9847
+ component: Hc,
9736
9848
  meta: _e(Xe.Subject.Business.hrm_scheduling)
9737
9849
  },
9738
9850
  {
9739
9851
  path: "/schedule/position",
9740
9852
  name: "schedule-position",
9741
- component: qc,
9853
+ component: Ic,
9742
9854
  meta: _e(Xe.Subject.Business.hrm_scheduling)
9743
9855
  },
9744
9856
  {
9745
9857
  path: "/schedule/general",
9746
9858
  name: "schedule-general",
9747
- component: kc,
9859
+ component: qc,
9748
9860
  meta: _e(Xe.Subject.Business.hrm_scheduling)
9749
9861
  },
9750
9862
  // Old bookmarks / deep links from before the POS Access merge.
@@ -9761,36 +9873,36 @@ const _e = (e) => ({
9761
9873
  emits: ["close-navigation"],
9762
9874
  setup(e, { emit: t }) {
9763
9875
  const s = t, { t: n } = vn(), a = lr();
9764
- async function r(f) {
9765
- await a.push({ name: f, query: a.currentRoute.value.query }), await hn(), s("close-navigation");
9876
+ async function r(h) {
9877
+ await a.push({ name: h, query: a.currentRoute.value.query }), await fn(), s("close-navigation");
9766
9878
  }
9767
- const l = qs(() => {
9768
- const f = [];
9769
- return f.push({
9879
+ const l = Is(() => {
9880
+ const h = [];
9881
+ return h.push({
9770
9882
  label: n("hr.employee.title"),
9771
9883
  value: "employee",
9772
9884
  action: () => {
9773
9885
  r($.EMPLOYEE);
9774
9886
  }
9775
- }), f.push({
9887
+ }), h.push({
9776
9888
  label: n("team.title"),
9777
9889
  value: "team-member",
9778
9890
  action: () => {
9779
9891
  r($.TEAM);
9780
9892
  }
9781
- }), f.push({
9893
+ }), h.push({
9782
9894
  label: n("auditLog.title"),
9783
9895
  value: "audit-log",
9784
9896
  action: () => {
9785
9897
  r($.AUDIT_LOG);
9786
9898
  }
9787
- }), f.push({
9899
+ }), h.push({
9788
9900
  label: n("posAccess.title"),
9789
9901
  value: "pos-access",
9790
9902
  action: () => {
9791
9903
  r($.APPROVAL_CODE);
9792
9904
  }
9793
- }), f.push({
9905
+ }), h.push({
9794
9906
  label: n("scheduling.nav.section"),
9795
9907
  value: "schedule-group",
9796
9908
  children: [
@@ -9802,57 +9914,57 @@ const _e = (e) => ({
9802
9914
  }
9803
9915
  },
9804
9916
  {
9805
- label: n("scheduling.nav.position"),
9806
- value: "schedule-position",
9917
+ label: n("scheduling.nav.general"),
9918
+ value: "schedule-general",
9807
9919
  action: () => {
9808
- r($.SCHEDULE_POSITION);
9920
+ r($.SCHEDULE_GENERAL);
9809
9921
  }
9810
9922
  },
9811
9923
  {
9812
- label: n("scheduling.nav.general"),
9813
- value: "schedule-general",
9924
+ label: n("scheduling.nav.position"),
9925
+ value: "schedule-position",
9814
9926
  action: () => {
9815
- r($.SCHEDULE_GENERAL);
9927
+ r($.SCHEDULE_POSITION);
9816
9928
  }
9817
9929
  }
9818
9930
  ]
9819
- }), f;
9931
+ }), h;
9820
9932
  }), c = Ue();
9821
- return fn(() => {
9933
+ return hn(() => {
9822
9934
  var y;
9823
- let f = (y = a.currentRoute.value) == null ? void 0 : y.name;
9824
- switch (f) {
9935
+ let h = (y = a.currentRoute.value) == null ? void 0 : y.name;
9936
+ switch (h) {
9825
9937
  case $.EMPLOYEE:
9826
9938
  case $.ROLE:
9827
9939
  case $.TIMESHEET:
9828
- f = $.EMPLOYEE;
9940
+ h = $.EMPLOYEE;
9829
9941
  break;
9830
9942
  case $.TEAM_MEMBER:
9831
9943
  case $.TEAM_ROLE:
9832
- f = $.TEAM_MEMBER;
9944
+ h = $.TEAM_MEMBER;
9833
9945
  break;
9834
9946
  case $.SCHEDULE:
9835
- f = "schedule";
9947
+ h = "schedule";
9836
9948
  break;
9837
9949
  case $.SCHEDULE_POSITION:
9838
- f = "schedule-position";
9950
+ h = "schedule-position";
9839
9951
  break;
9840
9952
  case $.SCHEDULE_GENERAL:
9841
- f = "schedule-general";
9953
+ h = "schedule-general";
9842
9954
  break;
9843
9955
  case $.AUDIT_LOG:
9844
- f = $.AUDIT_LOG;
9956
+ h = $.AUDIT_LOG;
9845
9957
  break;
9846
9958
  case $.APPROVAL_CODE:
9847
9959
  case $.POS_GRANT:
9848
9960
  case $.POS_ACCESS:
9849
- f = "pos-access";
9961
+ h = "pos-access";
9850
9962
  break;
9851
9963
  default:
9852
- f = $.EMPLOYEE;
9964
+ h = $.EMPLOYEE;
9853
9965
  }
9854
- c.value !== f && (c.value = f);
9855
- }), (f, y) => {
9966
+ c.value !== h && (c.value = h);
9967
+ }), (h, y) => {
9856
9968
  const w = Xs("FmCollapsibleTabs");
9857
9969
  return rt(), $t(w, {
9858
9970
  modelValue: c.value,
@@ -9863,44 +9975,44 @@ const _e = (e) => ({
9863
9975
  };
9864
9976
  }
9865
9977
  });
9866
- var Is = { exports: {} };
9978
+ var Hs = { exports: {} };
9867
9979
  (function(e, t) {
9868
9980
  (function(s, n) {
9869
9981
  n(t);
9870
9982
  })(Dt, function(s) {
9871
- var n = { getItemSync: function(h) {
9983
+ var n = { getItemSync: function(f) {
9872
9984
  try {
9873
- return localStorage.getItem(h) || null;
9985
+ return localStorage.getItem(f) || null;
9874
9986
  } catch {
9875
9987
  return null;
9876
9988
  }
9877
- }, getItem: function(h, u) {
9989
+ }, getItem: function(f, u) {
9878
9990
  var i = this;
9879
9991
  return new Promise(function(g, A) {
9880
9992
  try {
9881
- var b = i.getItemSync(h);
9993
+ var b = i.getItemSync(f);
9882
9994
  u == null || u(null, b), g(b);
9883
- } catch (M) {
9884
- u && u(M, null), A(M);
9995
+ } catch (C) {
9996
+ u && u(C, null), A(C);
9885
9997
  }
9886
9998
  });
9887
- }, setItem: function(h, u, i) {
9999
+ }, setItem: function(f, u, i) {
9888
10000
  return new Promise(function(g, A) {
9889
10001
  try {
9890
- localStorage.setItem(h, u), i && i(null, u), g(u);
10002
+ localStorage.setItem(f, u), i && i(null, u), g(u);
9891
10003
  } catch (b) {
9892
10004
  i && i(b, null), A(b);
9893
10005
  }
9894
10006
  });
9895
10007
  } }, a = function() {
9896
- return a = Object.assign || function(h) {
9897
- for (var u, i = 1, g = arguments.length; i < g; i++) for (var A in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, A) && (h[A] = u[A]);
9898
- return h;
10008
+ return a = Object.assign || function(f) {
10009
+ for (var u, i = 1, g = arguments.length; i < g; i++) for (var A in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, A) && (f[A] = u[A]);
10010
+ return f;
9899
10011
  }, a.apply(this, arguments);
9900
10012
  };
9901
- function r(h, u, i, g) {
10013
+ function r(f, u, i, g) {
9902
10014
  return new (i || (i = Promise))(function(A, b) {
9903
- function M(Q) {
10015
+ function C(Q) {
9904
10016
  try {
9905
10017
  F(g.next(Q));
9906
10018
  } catch (j) {
@@ -9918,13 +10030,13 @@ var Is = { exports: {} };
9918
10030
  var j;
9919
10031
  Q.done ? A(Q.value) : (j = Q.value, j instanceof i ? j : new i(function(L) {
9920
10032
  L(j);
9921
- })).then(M, G);
10033
+ })).then(C, G);
9922
10034
  }
9923
- F((g = g.apply(h, [])).next());
10035
+ F((g = g.apply(f, [])).next());
9924
10036
  });
9925
10037
  }
9926
- function l(h, u) {
9927
- var i, g, A, b, M = { label: 0, sent: function() {
10038
+ function l(f, u) {
10039
+ var i, g, A, b, C = { label: 0, sent: function() {
9928
10040
  if (1 & A[0]) throw A[1];
9929
10041
  return A[1];
9930
10042
  }, trys: [], ops: [] };
@@ -9935,7 +10047,7 @@ var Is = { exports: {} };
9935
10047
  return function(Q) {
9936
10048
  return function(j) {
9937
10049
  if (i) throw new TypeError("Generator is already executing.");
9938
- for (; M; ) try {
10050
+ for (; C; ) try {
9939
10051
  if (i = 1, g && (A = 2 & j[0] ? g.return : j[0] ? g.throw || ((A = g.return) && A.call(g), 0) : g.next) && !(A = A.call(g, j[1])).done) return A;
9940
10052
  switch (g = 0, A && (j = [2 & j[0], A.value]), j[0]) {
9941
10053
  case 0:
@@ -9943,34 +10055,34 @@ var Is = { exports: {} };
9943
10055
  A = j;
9944
10056
  break;
9945
10057
  case 4:
9946
- return M.label++, { value: j[1], done: !1 };
10058
+ return C.label++, { value: j[1], done: !1 };
9947
10059
  case 5:
9948
- M.label++, g = j[1], j = [0];
10060
+ C.label++, g = j[1], j = [0];
9949
10061
  continue;
9950
10062
  case 7:
9951
- j = M.ops.pop(), M.trys.pop();
10063
+ j = C.ops.pop(), C.trys.pop();
9952
10064
  continue;
9953
10065
  default:
9954
- if (A = M.trys, !((A = A.length > 0 && A[A.length - 1]) || j[0] !== 6 && j[0] !== 2)) {
9955
- M = 0;
10066
+ if (A = C.trys, !((A = A.length > 0 && A[A.length - 1]) || j[0] !== 6 && j[0] !== 2)) {
10067
+ C = 0;
9956
10068
  continue;
9957
10069
  }
9958
10070
  if (j[0] === 3 && (!A || j[1] > A[0] && j[1] < A[3])) {
9959
- M.label = j[1];
10071
+ C.label = j[1];
9960
10072
  break;
9961
10073
  }
9962
- if (j[0] === 6 && M.label < A[1]) {
9963
- M.label = A[1], A = j;
10074
+ if (j[0] === 6 && C.label < A[1]) {
10075
+ C.label = A[1], A = j;
9964
10076
  break;
9965
10077
  }
9966
- if (A && M.label < A[2]) {
9967
- M.label = A[2], M.ops.push(j);
10078
+ if (A && C.label < A[2]) {
10079
+ C.label = A[2], C.ops.push(j);
9968
10080
  break;
9969
10081
  }
9970
- A[2] && M.ops.pop(), M.trys.pop();
10082
+ A[2] && C.ops.pop(), C.trys.pop();
9971
10083
  continue;
9972
10084
  }
9973
- j = u.call(h, M);
10085
+ j = u.call(f, C);
9974
10086
  } catch (L) {
9975
10087
  j = [6, L], g = 0;
9976
10088
  } finally {
@@ -9982,18 +10094,18 @@ var Is = { exports: {} };
9982
10094
  };
9983
10095
  }
9984
10096
  }
9985
- function c(h, u, i) {
10097
+ function c(f, u, i) {
9986
10098
  for (var g, A = 0, b = u.length; A < b; A++) !g && A in u || (g || (g = Array.prototype.slice.call(u, 0, A)), g[A] = u[A]);
9987
- return h.concat(g || Array.prototype.slice.call(u));
10099
+ return f.concat(g || Array.prototype.slice.call(u));
9988
10100
  }
9989
- var f = function h(u, i) {
10101
+ var h = function f(u, i) {
9990
10102
  if (u === i) return !0;
9991
10103
  if (u && i && typeof u == "object" && typeof i == "object") {
9992
10104
  if (u.constructor !== i.constructor) return !1;
9993
10105
  var g, A, b;
9994
10106
  if (Array.isArray(u)) {
9995
10107
  if ((g = u.length) != i.length) return !1;
9996
- for (A = g; A-- != 0; ) if (!h(u[A], i[A])) return !1;
10108
+ for (A = g; A-- != 0; ) if (!f(u[A], i[A])) return !1;
9997
10109
  return !0;
9998
10110
  }
9999
10111
  if (u.constructor === RegExp) return u.source === i.source && u.flags === i.flags;
@@ -10002,52 +10114,52 @@ var Is = { exports: {} };
10002
10114
  if ((g = (b = Object.keys(u)).length) !== Object.keys(i).length) return !1;
10003
10115
  for (A = g; A-- != 0; ) if (!Object.prototype.hasOwnProperty.call(i, b[A])) return !1;
10004
10116
  for (A = g; A-- != 0; ) {
10005
- var M = b[A];
10006
- if (!h(u[M], i[M])) return !1;
10117
+ var C = b[A];
10118
+ if (!f(u[C], i[C])) return !1;
10007
10119
  }
10008
10120
  return !0;
10009
10121
  }
10010
10122
  return u != u && i != i;
10011
10123
  };
10012
- function y(h, u) {
10124
+ function y(f, u) {
10013
10125
  var i = Object.keys(u || {}).filter(function(g) {
10014
- var A = h == null ? void 0 : h[g], b = u == null ? void 0 : u[g];
10015
- return !f(A, b);
10126
+ var A = f == null ? void 0 : f[g], b = u == null ? void 0 : u[g];
10127
+ return !h(A, b);
10016
10128
  });
10017
- return Object.keys(h || {}).filter(function(g) {
10129
+ return Object.keys(f || {}).filter(function(g) {
10018
10130
  Object.keys(u || {}).includes(g) || i.push(g);
10019
10131
  }), Object.keys(i).length ? i : null;
10020
10132
  }
10021
10133
  var w, V;
10022
- function Z(h, u, i) {
10134
+ function Z(f, u, i) {
10023
10135
  var g = "shortString", A = !0;
10024
- typeof i == "number" && (g = "javaDouble", A = !1), h[g] = h[g] || {}, h[g][u] = A ? i + "" : i;
10136
+ typeof i == "number" && (g = "javaDouble", A = !1), f[g] = f[g] || {}, f[g][u] = A ? i + "" : i;
10025
10137
  }
10026
- function W(h) {
10027
- return !!h && typeof h == "object" && h.value !== void 0;
10138
+ function W(f) {
10139
+ return !!f && typeof f == "object" && f.value !== void 0;
10028
10140
  }
10029
- function se(h) {
10030
- return Object.fromEntries(Object.entries(h).map(function(u) {
10141
+ function se(f) {
10142
+ return Object.fromEntries(Object.entries(f).map(function(u) {
10031
10143
  var i = u[0], g = u[1];
10032
10144
  return [i, W(g) ? g : { value: g }];
10033
10145
  }));
10034
10146
  }
10035
- function oe(h) {
10036
- return a(a({}, h), { identity: h.identity ? a(a({}, h.identity), { traits: se(h.identity.traits || {}) }) : void 0 });
10147
+ function oe(f) {
10148
+ return a(a({}, f), { identity: f.identity ? a(a({}, f.identity), { traits: se(f.identity.traits || {}) }) : void 0 });
10037
10149
  }
10038
- (function(h) {
10039
- h.NONE = "NONE", h.DEFAULT_FLAGS = "DEFAULT_FLAGS", h.CACHE = "CACHE", h.SERVER = "SERVER";
10150
+ (function(f) {
10151
+ f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
10040
10152
  })(w || (w = {}));
10041
- var he, ie = null, ss = "FLAGSMITH_EVENT", Me = ss, Le = "https://edge.api.flagsmith.com/api/v1/", ft = "flagsmith_value_", Gt = "flagsmith_enabled_", ht = "flagsmith_trait_", yt = function() {
10042
- function h(u) {
10153
+ var fe, ie = null, ss = "FLAGSMITH_EVENT", Ce = ss, Le = "https://edge.api.flagsmith.com/api/v1/", ht = "flagsmith_value_", Gt = "flagsmith_enabled_", ft = "flagsmith_trait_", yt = function() {
10154
+ function f(u) {
10043
10155
  var i = this;
10044
10156
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
10045
10157
  var g = i, A = g.api, b = g.evaluationContext;
10046
10158
  i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(a(a({}, i.loadingState), { isFetching: !0 }));
10047
- var M = "".concat(i.getContext().identity), G = function(F) {
10159
+ var C = "".concat(i.getContext().identity), G = function(F) {
10048
10160
  var Q, j, L, de;
10049
- if (F && M === "".concat(i.getContext().identity)) {
10050
- var xe = F.flags, ye = F.traits, Ce = F.identifier;
10161
+ if (F && C === "".concat(i.getContext().identity)) {
10162
+ var xe = F.flags, ye = F.traits, Me = F.identifier;
10051
10163
  i.isLoading = !1;
10052
10164
  var be = {}, ve = {};
10053
10165
  ye = ye || [], (xe = xe || []).forEach(function(K) {
@@ -10056,11 +10168,11 @@ var Is = { exports: {} };
10056
10168
  ve[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
10057
10169
  }), i.oldFlags = a({}, i.flags);
10058
10170
  var je = y(i.oldFlags, be), bt = y((Q = i.evaluationContext.identity) === null || Q === void 0 ? void 0 : Q.traits, ve);
10059
- if ((Ce || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Ce && (i.evaluationContext.identity.identifier = Ce)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: je, traitsChanged: bt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
10171
+ 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: je, traitsChanged: bt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
10060
10172
  if (i.datadogRum.trackTraits) {
10061
10173
  var vt = {};
10062
10174
  Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(K) {
10063
- vt[ht + K] = i.getTrait(K);
10175
+ vt[ft + K] = i.getTrait(K);
10064
10176
  });
10065
10177
  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) }), vt);
10066
10178
  i.log("Setting Datadog user", it), i.datadogRum.client.setUser(it);
@@ -10071,9 +10183,9 @@ var Is = { exports: {} };
10071
10183
  if (i.dtrum) try {
10072
10184
  var Ae = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
10073
10185
  Object.keys(i.flags).map(function(K) {
10074
- Z(Ae, ft + K, i.getValue(K, { skipAnalytics: !0 })), Z(Ae, Gt + K, i.hasFeature(K, { skipAnalytics: !0 }));
10186
+ Z(Ae, ht + K, i.getValue(K, { skipAnalytics: !0 })), Z(Ae, Gt + K, i.hasFeature(K, { skipAnalytics: !0 }));
10075
10187
  }), Object.keys(((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.traits) || {}).map(function(K) {
10076
- Z(Ae, ht + K, i.getTrait(K));
10188
+ Z(Ae, ft + K, i.getTrait(K));
10077
10189
  }), i.log("Sending javaLongOrObject traits to dynatrace", Ae.javaLongOrObject), i.log("Sending date traits to dynatrace", Ae.date), i.log("Sending shortString traits to dynatrace", Ae.shortString), i.log("Sending javaDouble to dynatrace", Ae.javaDouble), i.dtrum.sendSessionProperties(Ae.javaLongOrObject, Ae.date, Ae.shortString, Ae.javaDouble);
10078
10190
  } catch (K) {
10079
10191
  console.error(K);
@@ -10104,8 +10216,8 @@ var Is = { exports: {} };
10104
10216
  i.log("Exception fetching evaluationEvent", A);
10105
10217
  }) : void 0;
10106
10218
  }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
10107
- var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
10108
- if (M && (G = M.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
10219
+ var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
10220
+ if (C && (G = C.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
10109
10221
  if (A != null && A.json) try {
10110
10222
  return G === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(G);
10111
10223
  } catch {
@@ -10118,8 +10230,8 @@ var Is = { exports: {} };
10118
10230
  }, this.getAllTraits = function() {
10119
10231
  var g;
10120
10232
  return Object.fromEntries(Object.entries(((g = i.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) || {}).map(function(A) {
10121
- var b = A[0], M = A[1];
10122
- return [b, M == null ? void 0 : M.value];
10233
+ var b = A[0], C = A[1];
10234
+ return [b, C == null ? void 0 : C.value];
10123
10235
  }));
10124
10236
  }, this.setContext = function(g) {
10125
10237
  var A = oe(g);
@@ -10134,32 +10246,32 @@ var Is = { exports: {} };
10134
10246
  }, this.setTraits = function(g) {
10135
10247
  var A;
10136
10248
  if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits), Object.fromEntries(Object.entries(g).map(function(b) {
10137
- var M = b[0], G = b[1];
10138
- return [M, W(G) ? G : { value: G }];
10249
+ var C = b[0], G = b[1];
10250
+ return [C, W(G) ? G : { value: G }];
10139
10251
  }))) }) }));
10140
10252
  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.");
10141
10253
  }, this.hasFeature = function(g, A) {
10142
- var b = typeof A == "object", M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
10143
- return !M && b && A.fallback !== void 0 ? G = A == null ? void 0 : A.fallback : M && M.enabled && (G = !0), (b && !A.skipAnalytics || !A) && i.evaluateFlag(g, "ENABLED"), G;
10254
+ var b = typeof A == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
10255
+ return !C && b && A.fallback !== void 0 ? G = A == null ? void 0 : A.fallback : C && C.enabled && (G = !0), (b && !A.skipAnalytics || !A) && i.evaluateFlag(g, "ENABLED"), G;
10144
10256
  }, this.getStorageKey = function() {
10145
10257
  var g, A;
10146
10258
  return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((A = i.evaluationContext.environment) === null || A === void 0 ? void 0 : A.apiKey);
10147
10259
  }, this.getJSON = function(g, A, b) {
10148
- var M, G = i;
10260
+ var C, G = i;
10149
10261
  G.evaluationContext;
10150
10262
  var F = G.headers, Q = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
10151
10263
  i.evaluationContext.environment && (Q.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), A && A !== "GET" && (Q.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(Q.headers, F), V || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
10152
- var j = "".concat((M = i.evaluationContext.identity) === null || M === void 0 ? void 0 : M.identifier);
10264
+ var j = "".concat((C = i.evaluationContext.identity) === null || C === void 0 ? void 0 : C.identifier);
10153
10265
  return V(g, Q).then(function(L) {
10154
10266
  var de, xe, ye = "".concat((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.identifier);
10155
10267
  if (j === ye) {
10156
- var Ce = (xe = L.headers) === null || xe === void 0 ? void 0 : xe.get("x-flagsmith-document-updated-at");
10157
- if (Ce) try {
10158
- var be = parseFloat(Ce);
10268
+ var Me = (xe = L.headers) === null || xe === void 0 ? void 0 : xe.get("x-flagsmith-document-updated-at");
10269
+ if (Me) try {
10270
+ var be = parseFloat(Me);
10159
10271
  if (isNaN(be)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
10160
10272
  i.timestamp = be;
10161
10273
  } catch (ve) {
10162
- i.log(ve, "Failed to parse x-flagsmith-document-updated-at", Ce);
10274
+ i.log(ve, "Failed to parse x-flagsmith-document-updated-at", Me);
10163
10275
  }
10164
10276
  return i.log("Fetch response: " + L.status + " " + (A || "GET") + 0 + g), L.text().then(function(ve) {
10165
10277
  var je = ve;
@@ -10173,80 +10285,80 @@ var Is = { exports: {} };
10173
10285
  i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ye));
10174
10286
  });
10175
10287
  }, this.evaluateFlag = function(g, A) {
10176
- if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? A === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ft + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Gt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
10288
+ if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? A === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ht + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Gt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
10177
10289
  if (!i.evaluationEvent || !i.evaluationContext.environment) return;
10178
10290
  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;
10179
10291
  }
10180
10292
  i.updateEventStorage();
10181
10293
  }, this._onChange = function(g, A, b) {
10182
- var M, G;
10183
- i.setLoadingState(b), (M = i.onChange) === null || M === void 0 || M.call(i, g, A, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
10184
- }, V = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : Dt == null ? void 0 : Dt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (he = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
10294
+ var C, G;
10295
+ i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, A, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
10296
+ }, V = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : Dt == null ? void 0 : Dt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (fe = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
10185
10297
  }
10186
- return h.prototype.init = function(u) {
10298
+ return f.prototype.init = function(u) {
10187
10299
  var i, g, A;
10188
10300
  return r(this, void 0, void 0, function() {
10189
- var b, M, G, F, Q, j, L, de, xe, ye, Ce, be, ve, je, bt, vt, it, Ae, K, ns, wt, Ls, lt, as, Ks, Js, rs, _s, os, Bt, ct, $s, me = this;
10301
+ var b, C, G, F, Q, j, L, de, xe, ye, Me, be, ve, je, bt, vt, it, Ae, K, ns, wt, Ls, lt, as, Ks, Js, rs, _s, os, Bt, ct, $s, me = this;
10190
10302
  return l(this, function(De) {
10191
10303
  switch (De.label) {
10192
10304
  case 0:
10193
10305
  b = oe(u.evaluationContext || this.evaluationContext), De.label = 1;
10194
10306
  case 1:
10195
- if (De.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Le : G, Q = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, xe = u.onError, ye = u.defaultFlags, Ce = u.fetch, be = u.preventFetch, ve = u.enableLogs, je = u.enableDynatrace, bt = u.enableAnalytics, vt = u.realtime, it = u.eventSourceUrl, Ae = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, wt = u.traits, Ls = u.state, lt = u.cacheOptions, as = u.angularHttpClient, Ks = u._trigger, Js = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
10307
+ if (De.trys.push([1, 13, , 14]), C = u.environmentID, G = u.api, F = G === void 0 ? Le : G, Q = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, xe = u.onError, ye = u.defaultFlags, Me = u.fetch, be = u.preventFetch, ve = u.enableLogs, je = u.enableDynatrace, bt = u.enableAnalytics, vt = u.realtime, it = u.eventSourceUrl, Ae = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, wt = 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`");
10196
10308
  if (b.identity = ns || wt ? { identifier: ns, traits: wt ? Object.fromEntries(Object.entries(wt).map(function(we) {
10197
10309
  return [we[0], { value: we[1] }];
10198
10310
  })) : {} } : 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) {
10199
10311
  me.setLoadingState(a(a({}, me.loadingState), { isFetching: !1, isLoading: !1, error: we })), xe == null || xe(we);
10200
- }, 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."), Ce && (V = Ce), this.enableAnalytics = bt || !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, Me = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), vt && typeof window < "u" && this.setupRealtime(Ae, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), je && (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 && (V = /* @__PURE__ */ function(we) {
10312
+ }, 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 && (V = Me), this.enableAnalytics = bt || !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), vt && typeof window < "u" && this.setupRealtime(Ae, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), je && (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 && (V = /* @__PURE__ */ function(we) {
10201
10313
  return function(Ee, Pe) {
10202
- var ke = Pe.headers, _ = Pe.method, ut = Pe.body;
10314
+ var qe = Pe.headers, _ = Pe.method, ut = Pe.body;
10203
10315
  return new Promise(function(Ke) {
10204
10316
  switch (_) {
10205
10317
  case "GET":
10206
- return we.get(Ee, { headers: ke }).subscribe(function(Re) {
10318
+ return we.get(Ee, { headers: qe }).subscribe(function(ke) {
10207
10319
  Ke({ ok: !0, text: function() {
10208
- return Promise.resolve(Re);
10320
+ return Promise.resolve(ke);
10209
10321
  } });
10210
10322
  });
10211
10323
  case "POST":
10212
10324
  case "PUT":
10213
- return we.post(Ee, ut, { headers: ke }).subscribe(function(Re) {
10325
+ return we.post(Ee, ut, { headers: qe }).subscribe(function(ke) {
10214
10326
  Ke({ ok: !0, text: function() {
10215
- return Promise.resolve(Re);
10327
+ return Promise.resolve(ke);
10216
10328
  } });
10217
10329
  });
10218
10330
  }
10219
10331
  });
10220
10332
  };
10221
- }(as)), ie && this.canUseStorage && ie.getItem(Me).then(function(we) {
10333
+ }(as)), ie && this.canUseStorage && ie.getItem(Ce).then(function(we) {
10222
10334
  try {
10223
10335
  me.evaluationEvent = JSON.parse(we) || {};
10224
10336
  } catch {
10225
10337
  me.evaluationEvent = {};
10226
10338
  }
10227
10339
  me.analyticsInterval = setInterval(me.analyticsFlags, me.ticks);
10228
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), ie && this.canUseStorage && ie.getItem(Me, function(we, Ee) {
10340
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), ie && this.canUseStorage && ie.getItem(Ce, function(we, Ee) {
10229
10341
  if (Ee && me.evaluationContext.environment) {
10230
10342
  var Pe = JSON.parse(Ee);
10231
10343
  if (Pe[me.evaluationContext.environment.apiKey]) {
10232
- var ke = me.getState();
10233
- me.log("Retrieved events from cache", Ee), me.setState(a(a({}, ke), { evaluationEvent: Pe[me.evaluationContext.environment.apiKey] }));
10344
+ var qe = me.getState();
10345
+ me.log("Retrieved events from cache", Ee), me.setState(a(a({}, qe), { evaluationEvent: Pe[me.evaluationContext.environment.apiKey] }));
10234
10346
  }
10235
10347
  }
10236
10348
  })), !L) return [3, 9];
10237
10349
  if (!ie || !this.canUseStorage) return [3, 8];
10238
10350
  _s = function(we, Ee) {
10239
10351
  return r(me, void 0, void 0, function() {
10240
- var Pe, ke, _, ut, Ke, Re, is, en, ls, cs, us, ds, As, ms, gs, ps, fs, hs, ys, bs, vs, ws, Bs, Ms, tn = this;
10352
+ var Pe, qe, _, ut, Ke, ke, is, en, ls, cs, us, ds, As, ms, gs, ps, hs, fs, ys, bs, vs, ws, Bs, Cs, tn = this;
10241
10353
  return l(this, function(Te) {
10242
10354
  switch (Te.label) {
10243
10355
  case 0:
10244
10356
  if (!Ee) return [3, 7];
10245
- Pe = null, ke = null, Te.label = 1;
10357
+ Pe = null, qe = null, Te.label = 1;
10246
10358
  case 1:
10247
- return Te.trys.push([1, 5, , 6]), _ = JSON.parse(Ee), 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 && ((As = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || As === void 0 ? void 0 : As.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (ms = _.evaluationContext) === null || ms === void 0 ? void 0 : ms.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, ke = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (hs = (fs = _.evaluationContext) === null || fs === void 0 ? void 0 : fs.identity) === null || hs === void 0 ? void 0 : hs.traits), Pe = 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) || {}), wt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Pe, traitsChanged: ke }, this._loadedState(null, w.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
10248
- var Cs;
10249
- (Cs = tn.onError) === null || Cs === void 0 || Cs.call(tn, Wa);
10359
+ return Te.trys.push([1, 5, , 6]), _ = JSON.parse(Ee), 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) && (ke = !0, this.evaluationContext.identity && ((As = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || As === void 0 ? void 0 : As.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (ms = _.evaluationContext) === null || ms === void 0 ? void 0 : ms.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !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"), ke = !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, ke = !0)), ke && (ut = !0, qe = 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), Pe = 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) || {}), wt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Pe, traitsChanged: qe }, this._loadedState(null, w.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
10360
+ var Ms;
10361
+ (Ms = tn.onError) === null || Ms === void 0 || Ms.call(tn, Wa);
10250
10362
  }), [3, 4]) : [3, 2];
10251
10363
  case 2:
10252
10364
  return be ? [3, 4] : [4, this.getFlags()];
@@ -10266,7 +10378,7 @@ var Is = { exports: {} };
10266
10378
  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, w.DEFAULT_FLAGS));
10267
10379
  else {
10268
10380
  if (!this.flags) throw new Error(rs);
10269
- this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Ms = this.evaluationContext.identity) === null || Ms === void 0 ? void 0 : Ms.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
10381
+ 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, w.DEFAULT_FLAGS));
10270
10382
  }
10271
10383
  Te.label = 10;
10272
10384
  case 10:
@@ -10305,86 +10417,86 @@ var Is = { exports: {} };
10305
10417
  }
10306
10418
  });
10307
10419
  });
10308
- }, h.prototype.getAllFlags = function() {
10420
+ }, f.prototype.getAllFlags = function() {
10309
10421
  return this.flags;
10310
- }, h.prototype.identify = function(u, i, g) {
10422
+ }, f.prototype.identify = function(u, i, g) {
10311
10423
  return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(A) {
10312
- var b = A[0], M = A[1];
10313
- return [b, W(M) ? M : { value: M }];
10424
+ var b = A[0], C = A[1];
10425
+ return [b, W(C) ? C : { value: C }];
10314
10426
  }))), this.initialised ? this.getFlags() : Promise.resolve();
10315
- }, h.prototype.getState = function() {
10427
+ }, f.prototype.getState = function() {
10316
10428
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
10317
- }, h.prototype.setState = function(u) {
10429
+ }, f.prototype.setState = function(u) {
10318
10430
  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));
10319
- }, h.prototype.logout = function() {
10431
+ }, f.prototype.logout = function() {
10320
10432
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
10321
- }, h.prototype.startListening = function(u) {
10433
+ }, f.prototype.startListening = function(u) {
10322
10434
  u === void 0 && (u = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, u);
10323
- }, h.prototype.stopListening = function() {
10435
+ }, f.prototype.stopListening = function() {
10324
10436
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
10325
- }, h.prototype._loadedState = function(u, i, g) {
10437
+ }, f.prototype._loadedState = function(u, i, g) {
10326
10438
  return u === void 0 && (u = null), g === void 0 && (g = !1), { error: u, isFetching: g, isLoading: !1, source: i };
10327
- }, h.prototype.log = function() {
10439
+ }, f.prototype.log = function() {
10328
10440
  for (var u = [], i = 0; i < arguments.length; i++) u[i] = arguments[i];
10329
10441
  this.enableLogs && console.log.apply(this, c(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], u));
10330
- }, h.prototype.updateStorage = function() {
10442
+ }, f.prototype.updateStorage = function() {
10331
10443
  if (this.cacheFlags) {
10332
10444
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
10333
10445
  var u = JSON.stringify(this.getState());
10334
10446
  this.log("Setting storage", u), ie.setItem(this.getStorageKey(), u);
10335
10447
  }
10336
- }, h.prototype.updateEventStorage = function() {
10448
+ }, f.prototype.updateEventStorage = function() {
10337
10449
  if (this.enableAnalytics) {
10338
10450
  var u = JSON.stringify(this.getState().evaluationEvent);
10339
- ie.setItem(Me, u).catch(function(i) {
10451
+ ie.setItem(Ce, u).catch(function(i) {
10340
10452
  return console.error("Flagsmith: Error setting item in async storage", i);
10341
10453
  });
10342
10454
  }
10343
- }, h.prototype.setLoadingState = function(u) {
10455
+ }, f.prototype.setLoadingState = function(u) {
10344
10456
  var i;
10345
- f(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
10346
- }, h.prototype.setupRealtime = function(u, i) {
10457
+ h(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
10458
+ }, f.prototype.setupRealtime = function(u, i) {
10347
10459
  var g = this, A = u + "sse/environments/" + i + "/stream";
10348
- he ? this.eventSource || (this.log("Creating event source with url " + A), this.eventSource = new he(A), this.eventSource.addEventListener("environment_updated", function(b) {
10349
- var M;
10460
+ fe ? this.eventSource || (this.log("Creating event source with url " + A), this.eventSource = new fe(A), this.eventSource.addEventListener("environment_updated", function(b) {
10461
+ var C;
10350
10462
  try {
10351
- M = JSON.parse(b.data).updated_at;
10463
+ C = JSON.parse(b.data).updated_at;
10352
10464
  } catch (G) {
10353
10465
  g.log("Could not parse sse event", G);
10354
10466
  }
10355
- M ? !g.timestamp || M > g.timestamp ? g.isLoading ? g.log("updated_at is new, but flags are loading", b.data, g.timestamp) : (g.log("updated_at is new, fetching flags", b.data, g.timestamp), g.getFlags()) : g.log("updated_at is outdated, skipping get flags", b.data, g.timestamp) : g.log("No updated_at received, fetching flags", b);
10467
+ 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);
10356
10468
  })) : this.log("Error, EventSource is undefined");
10357
- }, h;
10469
+ }, f;
10358
10470
  }();
10359
- function m(h) {
10360
- var u = h.fetch, i = h.AsyncStorage, g = h.eventSource;
10471
+ function m(f) {
10472
+ var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
10361
10473
  return new yt({ fetch: u, AsyncStorage: i, eventSource: g });
10362
10474
  }
10363
- var p, B = (p = function(h, u) {
10475
+ var p, B = (p = function(f, u) {
10364
10476
  return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
10365
10477
  i.__proto__ = g;
10366
10478
  } || function(i, g) {
10367
10479
  for (var A in g) Object.prototype.hasOwnProperty.call(g, A) && (i[A] = g[A]);
10368
- }, p(h, u);
10369
- }, function(h, u) {
10480
+ }, p(f, u);
10481
+ }, function(f, u) {
10370
10482
  if (typeof u != "function" && u !== null) throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
10371
10483
  function i() {
10372
- this.constructor = h;
10484
+ this.constructor = f;
10373
10485
  }
10374
- p(h, u), h.prototype = u === null ? Object.create(u) : (i.prototype = u.prototype, new i());
10375
- }), D = function(h) {
10376
- var u = typeof Symbol == "function" && Symbol.iterator, i = u && h[u], g = 0;
10377
- if (i) return i.call(h);
10378
- if (h && typeof h.length == "number") return { next: function() {
10379
- return h && g >= h.length && (h = void 0), { value: h && h[g++], done: !h };
10486
+ p(f, u), f.prototype = u === null ? Object.create(u) : (i.prototype = u.prototype, new i());
10487
+ }), D = function(f) {
10488
+ var u = typeof Symbol == "function" && Symbol.iterator, i = u && f[u], g = 0;
10489
+ if (i) return i.call(f);
10490
+ if (f && typeof f.length == "number") return { next: function() {
10491
+ return f && g >= f.length && (f = void 0), { value: f && f[g++], done: !f };
10380
10492
  } };
10381
10493
  throw new TypeError(u ? "Object is not iterable." : "Symbol.iterator is not defined.");
10382
- }, E = function(h, u) {
10383
- var i = typeof Symbol == "function" && h[Symbol.iterator];
10384
- if (!i) return h;
10385
- var g, A, b = i.call(h), M = [];
10494
+ }, E = function(f, u) {
10495
+ var i = typeof Symbol == "function" && f[Symbol.iterator];
10496
+ if (!i) return f;
10497
+ var g, A, b = i.call(f), C = [];
10386
10498
  try {
10387
- for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) M.push(g.value);
10499
+ for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) C.push(g.value);
10388
10500
  } catch (G) {
10389
10501
  A = { error: G };
10390
10502
  } finally {
@@ -10394,27 +10506,27 @@ var Is = { exports: {} };
10394
10506
  if (A) throw A.error;
10395
10507
  }
10396
10508
  }
10397
- return M;
10398
- }, O = function(h, u, i) {
10509
+ return C;
10510
+ }, O = function(f, u, i) {
10399
10511
  if (arguments.length === 2) for (var g, A = 0, b = u.length; A < b; A++) !g && A in u || (g || (g = Array.prototype.slice.call(u, 0, A)), g[A] = u[A]);
10400
- return h.concat(g || Array.prototype.slice.call(u));
10401
- }, H = function(h) {
10512
+ return f.concat(g || Array.prototype.slice.call(u));
10513
+ }, R = function(f) {
10402
10514
  function u() {
10403
- return h.call(this, `EventSource not available.
10515
+ return f.call(this, `EventSource not available.
10404
10516
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
10405
10517
  }
10406
- return B(u, h), u;
10407
- }(Error), k = function() {
10408
- function h(u, i) {
10518
+ return B(u, f), u;
10519
+ }(Error), q = function() {
10520
+ function f(u, i) {
10409
10521
  var g = this;
10410
- 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 H();
10522
+ 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();
10411
10523
  this._onevent_wrapped = function(A) {
10412
10524
  g._onevent(A);
10413
10525
  }, this._start();
10414
10526
  }
10415
- return h.prototype.dispatchEvent = function(u) {
10527
+ return f.prototype.dispatchEvent = function(u) {
10416
10528
  throw new Error("Method not implemented.");
10417
- }, h.prototype._start = function() {
10529
+ }, f.prototype._start = function() {
10418
10530
  var u, i, g = this, A = this.url;
10419
10531
  this._lastEventId && (A.indexOf("?") === -1 ? A += "?" : A += "&", A += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(A, this._configuration), this._eventSource.onopen = function(F) {
10420
10532
  g._onopen(F);
@@ -10424,22 +10536,22 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10424
10536
  g.onmessage(F);
10425
10537
  };
10426
10538
  try {
10427
- for (var b = D(Object.keys(this._listeners)), M = b.next(); !M.done; M = b.next()) {
10428
- var G = M.value;
10539
+ for (var b = D(Object.keys(this._listeners)), C = b.next(); !C.done; C = b.next()) {
10540
+ var G = C.value;
10429
10541
  this._eventSource.addEventListener(G, this._onevent_wrapped);
10430
10542
  }
10431
10543
  } catch (F) {
10432
10544
  u = { error: F };
10433
10545
  } finally {
10434
10546
  try {
10435
- M && !M.done && (i = b.return) && i.call(b);
10547
+ C && !C.done && (i = b.return) && i.call(b);
10436
10548
  } finally {
10437
10549
  if (u) throw u.error;
10438
10550
  }
10439
10551
  }
10440
- }, h.prototype._onopen = function(u) {
10552
+ }, f.prototype._onopen = function(u) {
10441
10553
  this.readyState === 0 && (this.readyState = 1, this.onopen(u));
10442
- }, h.prototype._onerror = function(u) {
10554
+ }, f.prototype._onerror = function(u) {
10443
10555
  var i = this;
10444
10556
  if (this.readyState === 1 && (this.readyState = 0, this.onerror(u)), this._eventSource) {
10445
10557
  this._eventSource.close(), this._eventSource = null;
@@ -10448,43 +10560,43 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10448
10560
  return i._start();
10449
10561
  }, g);
10450
10562
  }
10451
- }, h.prototype._onevent = function(u) {
10563
+ }, f.prototype._onevent = function(u) {
10452
10564
  var i, g;
10453
10565
  u && u.lastEventId && (this._lastEventId = u.lastEventId);
10454
10566
  var A = this._listeners[u.type];
10455
10567
  if (A != null) try {
10456
- for (var b = D(O([], E(A), !1)), M = b.next(); !M.done; M = b.next())
10457
- M.value.call(this, u);
10568
+ for (var b = D(O([], E(A), !1)), C = b.next(); !C.done; C = b.next())
10569
+ C.value.call(this, u);
10458
10570
  } catch (G) {
10459
10571
  i = { error: G };
10460
10572
  } finally {
10461
10573
  try {
10462
- M && !M.done && (g = b.return) && g.call(b);
10574
+ C && !C.done && (g = b.return) && g.call(b);
10463
10575
  } finally {
10464
10576
  if (i) throw i.error;
10465
10577
  }
10466
10578
  }
10467
10579
  u.type === "message" && this.onmessage(u);
10468
- }, h.prototype.onopen = function(u) {
10469
- }, h.prototype.onerror = function(u) {
10470
- }, h.prototype.onmessage = function(u) {
10471
- }, h.prototype.close = function() {
10580
+ }, f.prototype.onopen = function(u) {
10581
+ }, f.prototype.onerror = function(u) {
10582
+ }, f.prototype.onmessage = function(u) {
10583
+ }, f.prototype.close = function() {
10472
10584
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
10473
- }, h.prototype.addEventListener = function(u, i, g) {
10585
+ }, f.prototype.addEventListener = function(u, i, g) {
10474
10586
  this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
10475
10587
  var A = this._listeners[u];
10476
10588
  A.includes(i) || (this._listeners[u] = O(O([], E(A), !1), [i], !1));
10477
- }, h.prototype.removeEventListener = function(u, i, g) {
10589
+ }, f.prototype.removeEventListener = function(u, i, g) {
10478
10590
  var A = this._listeners[u];
10479
10591
  this._listeners[u] = A.filter(function(b) {
10480
10592
  return b !== i;
10481
10593
  });
10482
- }, h;
10594
+ }, f;
10483
10595
  }();
10484
10596
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
10485
- var te = function(h, u) {
10597
+ var te = function(f, u) {
10486
10598
  return u = u || {}, new Promise(function(i, g) {
10487
- var A = new XMLHttpRequest(), b = [], M = [], G = {}, F = function() {
10599
+ var A = new XMLHttpRequest(), b = [], C = [], G = {}, F = function() {
10488
10600
  return { ok: (A.status / 100 | 0) == 2, statusText: A.statusText, status: A.status, url: A.responseURL, text: function() {
10489
10601
  return Promise.resolve(A.responseText);
10490
10602
  }, json: function() {
@@ -10494,27 +10606,27 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10494
10606
  }, clone: F, headers: { keys: function() {
10495
10607
  return b;
10496
10608
  }, entries: function() {
10497
- return M;
10609
+ return C;
10498
10610
  }, get: function(j) {
10499
10611
  return G[j.toLowerCase()];
10500
10612
  }, has: function(j) {
10501
10613
  return j.toLowerCase() in G;
10502
10614
  } } };
10503
10615
  };
10504
- for (var Q in A.open(u.method || "get", h, !0), A.onload = function() {
10616
+ for (var Q in A.open(u.method || "get", f, !0), A.onload = function() {
10505
10617
  A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, L, de) {
10506
- b.push(L = L.toLowerCase()), M.push([L, de]), G[L] = G[L] ? G[L] + "," + de : de;
10618
+ b.push(L = L.toLowerCase()), C.push([L, de]), G[L] = G[L] ? G[L] + "," + de : de;
10507
10619
  }), i(F());
10508
10620
  }, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(Q, u.headers[Q]);
10509
10621
  A.send(u.body || null);
10510
10622
  });
10511
- }, ae = m({ AsyncStorage: n, fetch: te, eventSource: k });
10623
+ }, ae = m({ AsyncStorage: n, fetch: te, eventSource: q });
10512
10624
  typeof window < "u" && (window.flagsmith = ae), s.createFlagsmithInstance = function() {
10513
- return m({ AsyncStorage: n, fetch: te, eventSource: k });
10625
+ return m({ AsyncStorage: n, fetch: te, eventSource: q });
10514
10626
  }, s.default = ae, Object.defineProperty(s, "__esModule", { value: !0 });
10515
10627
  });
10516
- })(Is, Is.exports);
10517
- var Xc = Is.exports, Qc = {
10628
+ })(Hs, Hs.exports);
10629
+ var Xc = Hs.exports, Qc = {
10518
10630
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first."
10519
10631
  }, pn = "business", Oe, Nc = (Oe = class {
10520
10632
  constructor() {
@@ -10618,15 +10730,15 @@ var Xc = Is.exports, Qc = {
10618
10730
  reset() {
10619
10731
  this.flagsmithClient = null, this.userContext = null;
10620
10732
  }
10621
- }, Yt(Oe, "instance"), Oe), Zc = Nc.getInstance(), Ct = Ue(!1), Ft = Ue([]), dt = Ue(null);
10733
+ }, Yt(Oe, "instance"), Oe), Zc = Nc.getInstance(), Mt = Ue(!1), Ft = Ue([]), dt = Ue(null);
10622
10734
  function Uc(e = Zc) {
10623
- const t = () => Ct.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, V = []) => {
10624
- if (Ct.value) {
10735
+ const t = () => Mt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, V = []) => {
10736
+ if (Mt.value) {
10625
10737
  console.warn("FeatureFlag is already initialized.");
10626
10738
  return;
10627
10739
  }
10628
10740
  try {
10629
- await e.init(w, V), Ft.value = await e.getFlags(), Ct.value = !0, dt.value = null;
10741
+ await e.init(w, V), Ft.value = await e.getFlags(), Mt.value = !0, dt.value = null;
10630
10742
  } catch (Z) {
10631
10743
  console.error("Failed to initialize feature flags:", Z), dt.value = Z;
10632
10744
  }
@@ -10658,18 +10770,18 @@ function Uc(e = Zc) {
10658
10770
  } catch (se) {
10659
10771
  return console.error(`Error getting user flag value for ${V}:`, se), Z;
10660
10772
  }
10661
- }, f = async (w, V, Z = null, W) => c(`${pn}-${w}`, V, Z, W), y = () => {
10773
+ }, h = async (w, V, Z = null, W) => c(`${pn}-${w}`, V, Z, W), y = () => {
10662
10774
  try {
10663
10775
  e.reset();
10664
10776
  } catch (w) {
10665
10777
  console.error("Error resetting feature flags:", w);
10666
10778
  } finally {
10667
- Ft.value = [], Ct.value = !1, dt.value = null;
10779
+ Ft.value = [], Mt.value = !1, dt.value = null;
10668
10780
  }
10669
10781
  };
10670
10782
  return {
10671
10783
  flags: Ds(Ft),
10672
- isInitialized: Ds(Ct),
10784
+ isInitialized: Ds(Mt),
10673
10785
  error: Ds(dt),
10674
10786
  init: s,
10675
10787
  setUser: n,
@@ -10677,7 +10789,7 @@ function Uc(e = Zc) {
10677
10789
  getFlagValue: r,
10678
10790
  getFlag: l,
10679
10791
  getUserFlagValue: c,
10680
- getBusinessFlagValue: f,
10792
+ getBusinessFlagValue: h,
10681
10793
  reset: y
10682
10794
  };
10683
10795
  }
@@ -10696,7 +10808,7 @@ const iu = /* @__PURE__ */ at({
10696
10808
  };
10697
10809
  }
10698
10810
  });
10699
- var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.2.5-dev.9", mode: "fmmf" };
10811
+ var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev", mode: "fmmf" };
10700
10812
  console.log(
10701
10813
  `%c${xs.name}%c v${xs.version} %c${xs.mode}`,
10702
10814
  "background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
@@ -10708,7 +10820,7 @@ const lu = () => {
10708
10820
  ii,
10709
10821
  _o,
10710
10822
  Qo,
10711
- fi,
10823
+ hi,
10712
10824
  Fo,
10713
10825
  Di,
10714
10826
  Fi,
@@ -10735,7 +10847,7 @@ export {
10735
10847
  tu as S,
10736
10848
  eo as U,
10737
10849
  wc as _,
10738
- Mc as a,
10850
+ Cc as a,
10739
10851
  xl as b,
10740
10852
  Xe as c,
10741
10853
  so as d,