@feedmepos/mf-hrm-portal 2.3.0-dev.6 → 2.3.0-dev.7

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 (42) hide show
  1. package/dist/{ApprovalCodeList-Cf1l-ult.js → ApprovalCodeList-J-NC4Z5M.js} +2 -2
  2. package/dist/AuditLogList-B1Sb8HDk.js +1779 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BdbfGDI_.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BlXgJvsO.js} +2 -2
  4. package/dist/{EmployeeList-sc773luN.js → EmployeeList-DprCwGC9.js} +4 -4
  5. package/dist/{GrantUserList-2XTroUF8.js → GrantUserList-BWeZAzUC.js} +3 -3
  6. package/dist/{Main-BIo4YcWF.js → Main-BZCIlbf3.js} +2 -2
  7. package/dist/{Main-CCGYrZsD.js → Main-CGlnX97k.js} +9 -9
  8. package/dist/{Main-BNCfG0Sg.js → Main-Dna6CkrV.js} +5 -5
  9. package/dist/{PermissionSetList-7Ut1F99N.js → PermissionSetList-DuJjihft.js} +5 -5
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B1l2xUpn.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-RI8tMDoe.js} +1124 -1124
  11. package/dist/{RoleList-DMKdy74J.js → RoleList-Jn8EeYqo.js} +7 -7
  12. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CI94gSkp.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CV0DRK1L.js} +1 -1
  13. package/dist/{ScheduleGeneralPage-DGdnq7oV.js → ScheduleGeneralPage-DMMqTMQs.js} +4 -4
  14. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-Cq-zMPW_.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DLpFG65j.js} +605 -622
  15. package/dist/{SchedulePage-B7M5fPIA.js → SchedulePage-3MWnazgL.js} +6220 -6342
  16. package/dist/{SchedulePositionPage-DeorKiCc.js → SchedulePositionPage-B7S3G8gO.js} +9 -9
  17. package/dist/{TeamMemberList-CQswHBEk.js → TeamMemberList-Bx_I5hO6.js} +6 -6
  18. package/dist/{TimesheetList-lWsJuha_.js → TimesheetList-DjDoOqih.js} +5 -5
  19. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CLgmz6LT.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-pRgaW5ro.js} +2 -2
  20. package/dist/{app-MTWSOw4U.js → app-uVAVK4Qd.js} +216 -452
  21. package/dist/app.js +1 -1
  22. package/dist/{dayjs.min-9rM_szda.js → dayjs.min-CdEA8bsz.js} +1 -1
  23. package/dist/{employee-BvtW9sI6.js → employee-mq8mZRLE.js} +3 -3
  24. package/dist/{iteration-Byna7hj1.js → iteration-B5TN8t9O.js} +1 -1
  25. package/dist/{lodash-CnwRhwQm.js → lodash-DxYGKySa.js} +1 -1
  26. package/dist/{role-N_-ZZfhy.js → role-DiyMdYM9.js} +1 -1
  27. package/dist/{rule-B9-ryqfq.js → rule-BGlU-EJ_.js} +2 -2
  28. package/dist/src/api/audit-log/index.d.ts +0 -4
  29. package/dist/src/api/schedule/index.d.ts +1 -3
  30. package/dist/src/types/schedule.d.ts +1 -1
  31. package/dist/src/views/audit-log/constants.d.ts +30 -9
  32. package/dist/src/views/audit-log/locales/index.d.ts +0 -236
  33. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +5 -0
  34. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +5 -0
  35. package/dist/src/views/scheduling/schedule-store.d.ts +0 -1
  36. package/dist/style.css +1 -1
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{useReportPermissions-BSOsfpnM.js → useReportPermissions-CV0b4SBk.js} +3 -3
  39. package/package.json +1 -1
  40. package/dist/AuditLogList-D1sMrERs.js +0 -1951
  41. package/dist/src/views/audit-log/pos-row.d.ts +0 -27
  42. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +0 -2
@@ -1,9 +1,9 @@
1
- import { onMounted as He, onBeforeUnmount as Ae, ref as w, reactive as O, shallowRef as ce, watch as Ee, computed as P, defineComponent as be, createElementBlock as k, openBlock as b, renderSlot as Ye, useAttrs as ia, nextTick as pe, normalizeClass as se, createElementVNode as _, createBlock as ra, mergeProps as la, toDisplayString as F, Teleport as ua, createCommentVNode as U, withDirectives as da, vModelText as ca, Fragment as ye, renderList as ya, createTextVNode as ma, withModifiers as fa, normalizeStyle as pa } from "vue";
1
+ import { onMounted as we, onBeforeUnmount as He, ref as g, reactive as O, shallowRef as de, watch as Ee, computed as Y, defineComponent as Ae, createElementBlock as C, openBlock as N, renderSlot as Ye, useAttrs as sa, nextTick as fe, normalizeClass as oe, createElementVNode as _, createBlock as ra, mergeProps as la, toDisplayString as F, Teleport as ua, createCommentVNode as U, withDirectives as da, vModelText as ca, Fragment as ce, renderList as ya, createTextVNode as ma, withModifiers as fa, normalizeStyle as pa } from "vue";
2
2
  import { useRoute as ha, useRouter as va } from "vue-router";
3
3
  import { useCoreStore as Be } from "@feedmepos/mf-common";
4
- import { g as h, b as p, u as Da } from "./restaurant-D7PEQjPY.js";
5
- import { E as he, u as ga } from "./employee-BvtW9sI6.js";
6
- function Wn(e) {
4
+ import { g as v, b as h, u as Da } from "./restaurant-D7PEQjPY.js";
5
+ import { E as pe, u as ga } from "./employee-mq8mZRLE.js";
6
+ function Fn(e) {
7
7
  let a = null;
8
8
  function t() {
9
9
  if (!a) return;
@@ -11,14 +11,14 @@ function Wn(e) {
11
11
  const n = a.getBoundingClientRect().top;
12
12
  a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
13
13
  }
14
- He(() => {
14
+ we(() => {
15
15
  var n;
16
16
  a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
17
- }), Ae(() => {
17
+ }), He(() => {
18
18
  window.removeEventListener("resize", t), a && (a.style.height = "");
19
19
  });
20
20
  }
21
- function ve(e) {
21
+ function he(e) {
22
22
  const [a, t] = String(e || "0:0").split(":").map(Number);
23
23
  return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
24
24
  }
@@ -27,88 +27,88 @@ function wa(e) {
27
27
  return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
28
28
  }
29
29
  function Ha(e, a) {
30
- const t = ve(e);
31
- let n = ve(a);
30
+ const t = he(e);
31
+ let n = he(a);
32
32
  return n <= t && (n += 1440), [t, n];
33
33
  }
34
34
  function _e(e, a) {
35
35
  const [t, n] = Ha(e, a);
36
36
  return Math.max(0, n - t);
37
37
  }
38
- function Aa(e) {
39
- const a = (ve(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, r = t < 12 ? "am" : "pm", o = t % 12 || 12;
40
- return n ? `${o}:${String(n).padStart(2, "0")}${r}` : `${o}${r}`;
38
+ function Ea(e) {
39
+ const a = (he(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, s = t < 12 ? "am" : "pm", o = t % 12 || 12;
40
+ return n ? `${o}:${String(n).padStart(2, "0")}${s}` : `${o}${s}`;
41
41
  }
42
- function zn(e) {
43
- return Aa(wa(e % 1440));
42
+ function Un(e) {
43
+ return Ea(wa(e % 1440));
44
44
  }
45
45
  function xe(e) {
46
46
  const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
47
47
  return a != null && a.length ? a.reduce((t, n) => {
48
48
  if (n.type === "DURATION") return t + n.minutes;
49
- const [r, o] = n.startTime.split(":").map(Number), [s, i] = n.endTime.split(":").map(Number);
50
- let m = s * 60 + i - (r * 60 + o);
49
+ const [s, o] = n.startTime.split(":").map(Number), [r, i] = n.endTime.split(":").map(Number);
50
+ let m = r * 60 + i - (s * 60 + o);
51
51
  return m < 0 && (m += 24 * 60), t + m;
52
52
  }, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
53
53
  }
54
- function Vn(e, a) {
55
- var r;
56
- const t = a ?? _e(e.start, e.end), n = (r = e.breaks) != null && r.length ? e.breaks.reduce((o, s) => o + (s.breakPayType === "UNPAID" ? xe([s]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
54
+ function Wn(e, a) {
55
+ var s;
56
+ const t = a ?? _e(e.start, e.end), n = (s = e.breaks) != null && s.length ? e.breaks.reduce((o, r) => o + (r.breakPayType === "UNPAID" ? xe([r]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
57
57
  return Math.max(0, t - Math.min(t, n));
58
58
  }
59
- function Kn(e) {
59
+ function zn(e) {
60
60
  const a = Math.max(0, Math.round(e ?? 0));
61
61
  return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
62
62
  }
63
- const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
63
+ const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6, D = {
64
64
  async listEmployeeProfiles(e) {
65
- return h(
66
- await p("schedules").get("employees", {
65
+ return v(
66
+ await h("schedules").get("employees", {
67
67
  params: e != null && e.length ? { ids: e.join(",") } : void 0
68
68
  })
69
69
  );
70
70
  },
71
71
  async listEmployeeConfigs(e) {
72
- return h(
73
- await p(`restaurants/${e}/schedules`).get("employee-configs")
72
+ return v(
73
+ await h(`restaurants/${e}/schedules`).get("employee-configs")
74
74
  );
75
75
  },
76
76
  async saveEmployeeConfigs(e, a) {
77
- return h(
78
- await p(`restaurants/${e}/schedules`).post(
77
+ return v(
78
+ await h(`restaurants/${e}/schedules`).post(
79
79
  "employee-configs/reorder",
80
80
  a
81
81
  )
82
82
  );
83
83
  },
84
84
  async getSettings(e) {
85
- return h(
86
- await p(`restaurants/${e}/schedules`).get("settings")
85
+ return v(
86
+ await h(`restaurants/${e}/schedules`).get("settings")
87
87
  );
88
88
  },
89
89
  async saveSettings(e, a) {
90
- return h(
91
- await p(`restaurants/${e}/schedules`).post("settings", a)
90
+ return v(
91
+ await h(`restaurants/${e}/schedules`).post("settings", a)
92
92
  );
93
93
  },
94
94
  async generateAutoSchedule(e, a) {
95
- return h(
96
- await p(`restaurants/${e}/schedules`).post(
95
+ return v(
96
+ await h(`restaurants/${e}/schedules`).post(
97
97
  "auto-schedule/generate",
98
98
  a
99
99
  )
100
100
  );
101
101
  },
102
102
  async getAutoScheduleCapabilities(e) {
103
- return h(
104
- await p(`restaurants/${e}/schedules`).get(
103
+ return v(
104
+ await h(`restaurants/${e}/schedules`).get(
105
105
  "auto-schedule/capabilities"
106
106
  )
107
107
  );
108
108
  },
109
109
  async applyAutoSchedule(e, a) {
110
- return h(
111
- await p(`restaurants/${e}/schedules`).post(
110
+ return v(
111
+ await h(`restaurants/${e}/schedules`).post(
112
112
  "auto-schedule/apply",
113
113
  a
114
114
  )
@@ -116,90 +116,81 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
116
116
  },
117
117
  /** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
118
118
  async readBoard(e, a, t) {
119
- return h(
120
- await p(`restaurants/${e}/schedules`).get("board", {
119
+ return v(
120
+ await h(`restaurants/${e}/schedules`).get("board", {
121
121
  params: { from: a, to: t }
122
122
  })
123
123
  );
124
124
  },
125
125
  async createTimeOff(e, a) {
126
- return h(
127
- await p(`restaurants/${e}/schedules`).post("time-off", a)
126
+ return v(
127
+ await h(`restaurants/${e}/schedules`).post("time-off", a)
128
128
  );
129
129
  },
130
130
  async updateTimeOffStatus(e, a, t) {
131
- return h(
132
- await p(`restaurants/${e}/schedules`).post(
131
+ return v(
132
+ await h(`restaurants/${e}/schedules`).post(
133
133
  `time-off/${a}/status`,
134
134
  t
135
135
  )
136
136
  );
137
137
  },
138
138
  async deleteTimeOff(e, a) {
139
- await p(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
139
+ await h(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
140
140
  },
141
141
  /** Creates or updates the employee's shared business-level scheduling profile. */
142
142
  async createEmployeeProfile(e, a) {
143
- return h(await p("schedules").post("employees", a));
143
+ return v(await h("schedules").post("employees", a));
144
144
  },
145
145
  /** Edits the employee's shared business-level scheduling profile. */
146
146
  async updateEmployeeProfile(e, a, t) {
147
- return h(
148
- await p("schedules").post("employees", { employeeId: a, ...t })
147
+ return v(
148
+ await h("schedules").post("employees", { employeeId: a, ...t })
149
149
  );
150
150
  },
151
151
  /** Positions are shared across the business. */
152
152
  async createPosition(e) {
153
- return h(await p("schedules").post("positions", e));
153
+ return v(await h("schedules").post("positions", e));
154
154
  },
155
155
  async updatePosition(e, a) {
156
- return h(await p("schedules").post(`positions/${e}`, a));
156
+ return v(await h("schedules").post(`positions/${e}`, a));
157
157
  },
158
158
  /** Deleting one position is `deletePositions` with a single-id array — the backend's
159
159
  * `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
160
160
  async deletePosition(e) {
161
- await p("schedules").delete("positions", {
161
+ await h("schedules").delete("positions", {
162
162
  params: { ids: e }
163
163
  });
164
164
  },
165
165
  /** Creates one flat demand interval. */
166
166
  async createDemand(e, a) {
167
- return h(
168
- await p(`restaurants/${e}/schedules`).post("demands", a)
167
+ return v(
168
+ await h(`restaurants/${e}/schedules`).post("demands", a)
169
169
  );
170
170
  },
171
171
  /** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
172
172
  * day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
173
173
  * array. */
174
174
  async deleteDemands(e, a) {
175
- return h(
176
- await p(`restaurants/${e}/schedules`).delete("demands", {
175
+ return v(
176
+ await h(`restaurants/${e}/schedules`).delete("demands", {
177
177
  params: { ids: a.join(",") }
178
178
  })
179
179
  );
180
180
  },
181
181
  /** Atomically replaces one date/weekday's flattened demand rows. */
182
182
  async replaceDemands(e, a) {
183
- return h(
184
- await p(`restaurants/${e}/schedules`).post(
183
+ return v(
184
+ await h(`restaurants/${e}/schedules`).post(
185
185
  "demands/replace",
186
186
  a
187
187
  )
188
188
  );
189
189
  },
190
- /** Atomically replaces several date/weekday demand generations. */
191
- async bulkReplaceDemands(e, a) {
192
- return h(
193
- await p(`restaurants/${e}/schedules`).post(
194
- "demands/bulk-replace",
195
- a
196
- )
197
- );
198
- },
199
190
  /** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
200
191
  async saveScheduleDay(e, a, t) {
201
- return h(
202
- await p(`restaurants/${e}/schedules`).post(
192
+ return v(
193
+ await h(`restaurants/${e}/schedules`).post(
203
194
  `days/${a}`,
204
195
  t
205
196
  )
@@ -207,13 +198,13 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
207
198
  },
208
199
  /** A one-off shift assignment. */
209
200
  async createAssignment(e, a) {
210
- return h(
211
- await p(`restaurants/${e}/schedules`).post("assignments", a)
201
+ return v(
202
+ await h(`restaurants/${e}/schedules`).post("assignments", a)
212
203
  );
213
204
  },
214
205
  async updateAssignment(e, a, t) {
215
- return h(
216
- await p(`restaurants/${e}/schedules`).patch(
206
+ return v(
207
+ await h(`restaurants/${e}/schedules`).patch(
217
208
  `assignments/${a}`,
218
209
  t
219
210
  )
@@ -221,8 +212,8 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
221
212
  },
222
213
  /** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
223
214
  async bulkSaveAssignments(e, a) {
224
- return h(
225
- await p(`restaurants/${e}/schedules`).post(
215
+ return v(
216
+ await h(`restaurants/${e}/schedules`).post(
226
217
  "assignments/bulk",
227
218
  a
228
219
  )
@@ -232,8 +223,8 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
232
223
  * getting replaced wholesale. Deleting one assignment is just this with a single-id
233
224
  * array. */
234
225
  async deleteAssignments(e, a) {
235
- return h(
236
- await p(`restaurants/${e}/schedules`).delete("assignments", {
226
+ return v(
227
+ await h(`restaurants/${e}/schedules`).delete("assignments", {
237
228
  params: { ids: a.join(",") }
238
229
  })
239
230
  );
@@ -241,25 +232,25 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
241
232
  /** Flips a batch of assignments to one status in a single request — e.g. Publish sending
242
233
  * every DRAFT shift on the board to PUBLISHED at once. */
243
234
  async bulkUpdateAssignmentStatus(e, a) {
244
- return h(
245
- await p(`restaurants/${e}/schedules`).patch(
235
+ return v(
236
+ await h(`restaurants/${e}/schedules`).patch(
246
237
  "assignments/bulk-status",
247
238
  a
248
239
  )
249
240
  );
250
241
  }
251
242
  }, Ue = {
252
- payload: ce(null),
253
- loading: w(!1),
254
- rosterLoading: w(!1),
255
- loadError: w(null),
256
- scheduleSetupCompleted: w(!1),
257
- dataVersion: w(0),
258
- outletId: w(""),
259
- restaurantEmployees: w([]),
260
- employeeConfigs: w([]),
261
- employeeOutletIds: ce({}),
262
- businessEmployees: ce([]),
243
+ payload: de(null),
244
+ loading: g(!1),
245
+ rosterLoading: g(!1),
246
+ loadError: g(null),
247
+ scheduleSetupCompleted: g(!1),
248
+ dataVersion: g(0),
249
+ outletId: g(""),
250
+ restaurantEmployees: g([]),
251
+ employeeConfigs: g([]),
252
+ employeeOutletIds: de({}),
253
+ businessEmployees: de([]),
263
254
  positions: O([]),
264
255
  positionRecords: O([]),
265
256
  rolePositions: O({}),
@@ -299,27 +290,27 @@ const q = 500, Ea = 10, Me = 6, Gn = 1500, Fe = 1e6, D = {
299
290
  }, {
300
291
  payload: d,
301
292
  loading: Se,
302
- rosterLoading: Oe,
293
+ rosterLoading: Le,
303
294
  loadError: ie,
304
295
  scheduleSetupCompleted: We,
305
296
  dataVersion: z,
306
297
  outletId: y,
307
- restaurantEmployees: re,
298
+ restaurantEmployees: se,
308
299
  employeeConfigs: x,
309
300
  employeeOutletIds: ze,
310
- businessEmployees: me,
301
+ businessEmployees: ye,
311
302
  positions: ba,
312
303
  positionRecords: Ve,
313
- rolePositions: jn,
304
+ rolePositions: Kn,
314
305
  outlet: Na,
315
- locationOptions: Le,
316
- locationLabelById: J,
317
- compensationGroupMeta: Qn,
318
- existingStaff: qn,
319
- shiftTemplates: Xn,
320
- rules: I
306
+ locationOptions: Oe,
307
+ locationLabelById: X,
308
+ compensationGroupMeta: Gn,
309
+ existingStaff: jn,
310
+ shiftTemplates: Qn,
311
+ rules: T
321
312
  } = Ue;
322
- function ka() {
313
+ function Ca() {
323
314
  const e = Ue.rules;
324
315
  Object.keys(e.coverage).forEach((a) => delete e.coverage[a]), e.openFrom = "00:00", e.openTo = "24:00", e.dayHours.splice(0, e.dayHours.length, ...Array.from({ length: 7 }, () => [])), Object.assign(e.payRate.NORMAL, { overtime: 1.5 }), Object.assign(e.payRate.REST_DAY, { regular: 1, overtime: 2 }), Object.assign(e.payRate.PUBLIC_HOLIDAY, { regular: 2, overtime: 3 }), e.otAfterDaily = 0, e.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = 0, e.otBudget = 0, Object.assign(e.notify, {
325
316
  waConnected: !1,
@@ -328,49 +319,49 @@ function ka() {
328
319
  defaults: { wa: !1, push: !1, email: !1 }
329
320
  });
330
321
  }
331
- const De = 7;
332
- function Ca(e) {
322
+ const ve = 7;
323
+ function Ma(e) {
333
324
  const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
334
325
  return `${a}-${t}-${n}`;
335
326
  }
336
- function Z(e, a) {
327
+ function J(e, a) {
337
328
  const t = new Date(e);
338
329
  return t.setDate(t.getDate() + a), t;
339
330
  }
340
- function ge(e) {
331
+ function De(e) {
341
332
  const a = new Date(e);
342
333
  return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
343
334
  }
344
- function Jn(e, a = /* @__PURE__ */ new Date()) {
345
- const t = Z(ge(a), e * De);
346
- return Array.from({ length: De }, (n, r) => Z(t, r));
335
+ function qn(e, a = /* @__PURE__ */ new Date()) {
336
+ const t = J(De(a), e * ve);
337
+ return Array.from({ length: ve }, (n, s) => J(t, s));
347
338
  }
348
- function Zn(e, a) {
349
- const t = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), n = t(ge(e)), r = t(ge(a));
350
- return Math.trunc((r - n) / (De * 24 * 60 * 60 * 1e3));
339
+ function Xn(e, a) {
340
+ const t = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), n = t(De(e)), s = t(De(a));
341
+ return Math.trunc((s - n) / (ve * 24 * 60 * 60 * 1e3));
351
342
  }
352
- const ee = Ca;
353
- let V = null, K = null, W = null, X = 0, le = null;
343
+ const Z = Ma;
344
+ let V = null, K = null, W = null, q = 0, re = null;
354
345
  function Re(e) {
355
- return e === y.value ? !1 : (ka(), y.value = e, d.value = null, V = null, K = null, ie.value = null, le = null, We.value = !1, re.value = [], x.value = [], W = null, X += 1, z.value += 1, !0);
346
+ return e === y.value ? !1 : (Ca(), y.value = e, d.value = null, V = null, K = null, ie.value = null, re = null, We.value = !1, se.value = [], x.value = [], W = null, q += 1, z.value += 1, !0);
356
347
  }
357
- async function we(e) {
358
- if (!(!e || le === e)) {
359
- Oe.value = !0;
348
+ async function ge(e) {
349
+ if (!(!e || re === e)) {
350
+ Le.value = !0;
360
351
  try {
361
- await Ma(e);
352
+ await ka(e);
362
353
  } finally {
363
- Oe.value = !1;
354
+ Le.value = !1;
364
355
  }
365
356
  }
366
357
  }
367
- async function Ma(e) {
368
- const a = await he.readEmployeesPage({
369
- limit: q,
358
+ async function ka(e) {
359
+ const a = await pe.readEmployeesPage({
360
+ limit: Q,
370
361
  offset: 0,
371
362
  restaurantIds: [e]
372
363
  });
373
- e === y.value && (re.value = a.items, x.value = await D.listEmployeeConfigs(e), le = e, z.value += 1, Ra().then((t) => {
364
+ e === y.value && (se.value = a.items, x.value = await D.listEmployeeConfigs(e), re = e, z.value += 1, Ra().then((t) => {
374
365
  e === y.value && (ze.value = t, z.value += 1);
375
366
  }));
376
367
  }
@@ -380,24 +371,24 @@ async function Sa(e) {
380
371
  const t = await D.saveEmployeeConfigs(a, { configs: e });
381
372
  x.value = t, z.value += 1;
382
373
  }
383
- async function Oa(e, a) {
384
- const t = x.value.find((r) => r.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && x.value.some((r) => r.displayOrder !== null) ? Math.max(
374
+ async function La(e, a) {
375
+ const t = x.value.find((s) => s.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && x.value.some((s) => s.displayOrder !== null) ? Math.max(
385
376
  0,
386
- ...x.value.filter((r) => r.displayOrder !== null).map((r) => r.displayOrder)
377
+ ...x.value.filter((s) => s.displayOrder !== null).map((s) => s.displayOrder)
387
378
  ) + 100 : null);
388
379
  await Sa([{ employeeId: e, enabled: a, displayOrder: n }]);
389
380
  }
390
381
  async function Ke() {
391
382
  const e = y.value;
392
- e && (le = null, await we(e));
383
+ e && (re = null, await ge(e));
393
384
  }
394
385
  async function Ge(e, a) {
395
386
  const t = ga(), n = (await je(!0)).find((i) => i._id === e);
396
387
  if (!n) throw new Error("Could not find this employee");
397
- const r = n.restaurantRole.map((i) => ({
388
+ const s = n.restaurantRole.map((i) => ({
398
389
  restaurantId: i.restaurantId,
399
390
  roleId: i.roleId
400
- })), o = a(r);
391
+ })), o = a(s);
401
392
  if (!o.length)
402
393
  throw new Error(
403
394
  "An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page."
@@ -405,36 +396,36 @@ async function Ge(e, a) {
405
396
  (n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
406
397
  user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
407
398
  roles: o,
408
- previousRoles: r
399
+ previousRoles: s
409
400
  }) : await t.updateEmployee(e, {
410
401
  user: { name: n.name, passcode: n.passcode },
411
402
  roles: o,
412
- previousRoles: r
403
+ previousRoles: s
413
404
  });
414
405
  }
415
- async function eo(e, a, t = "") {
406
+ async function Jn(e, a, t = "") {
416
407
  const n = [...new Set(a.filter(Boolean))];
417
- n.length && (await Ge(e, (r) => [
418
- ...r.filter((o) => !n.includes(o.restaurantId)),
408
+ n.length && (await Ge(e, (s) => [
409
+ ...s.filter((o) => !n.includes(o.restaurantId)),
419
410
  ...n.map((o) => ({ restaurantId: o, roleId: t }))
420
- ]), y.value && n.includes(y.value) && await Oa(e, !0), await Ke());
411
+ ]), y.value && n.includes(y.value) && await La(e, !0), await Ke());
421
412
  }
422
- async function ao(e, a) {
413
+ async function Zn(e, a) {
423
414
  const t = new Set(a);
424
- t.size && (await Ge(e, (n) => n.filter((r) => !t.has(r.restaurantId))), await Ke());
415
+ t.size && (await Ge(e, (n) => n.filter((s) => !t.has(s.restaurantId))), await Ke());
425
416
  }
426
- let Q = null;
427
- async function La() {
428
- const e = await he.readEmployeesPage({
429
- limit: q,
417
+ let j = null;
418
+ async function Oa() {
419
+ const e = await pe.readEmployeesPage({
420
+ limit: Q,
430
421
  offset: 0,
431
422
  includeEmptyPasscode: !0
432
- }), a = Math.min(Ea, Math.ceil(e.total / q)), t = await Promise.all(
423
+ }), a = Math.min(Aa, Math.ceil(e.total / Q)), t = await Promise.all(
433
424
  Array.from(
434
425
  { length: Math.max(0, a - 1) },
435
- (n, r) => he.readEmployeesPage({
436
- limit: q,
437
- offset: (r + 1) * q,
426
+ (n, s) => pe.readEmployeesPage({
427
+ limit: Q,
428
+ offset: (s + 1) * Q,
438
429
  includeEmptyPasscode: !0
439
430
  })
440
431
  )
@@ -443,13 +434,13 @@ async function La() {
443
434
  }
444
435
  function je(e = !1) {
445
436
  if (!e) {
446
- if (Q) return Q;
447
- if (me.value.length) return Promise.resolve(me.value);
437
+ if (j) return j;
438
+ if (ye.value.length) return Promise.resolve(ye.value);
448
439
  }
449
- const a = La().then((t) => (me.value = t, t)).finally(() => {
450
- Q === a && (Q = null);
440
+ const a = Oa().then((t) => (ye.value = t, t)).finally(() => {
441
+ j === a && (j = null);
451
442
  });
452
- return Q = a, a;
443
+ return j = a, a;
453
444
  }
454
445
  async function Ra() {
455
446
  const e = {};
@@ -466,102 +457,95 @@ function Ie(e, a) {
466
457
  return V !== null && K !== null && V <= e && K >= a;
467
458
  }
468
459
  async function Ia(e) {
469
- const a = ee(e), t = ee(Z(e, 6));
460
+ const a = Z(e), t = Z(J(e, 6));
470
461
  Ie(a, t) || W && (await W, Ie(a, t)) || await Qe(
471
- Z(e, -7 * Me),
472
- Z(e, 7 * Me)
462
+ J(e, -7 * ke),
463
+ J(e, 7 * ke)
473
464
  );
474
465
  }
475
- async function to() {
466
+ async function eo() {
476
467
  !V || !K || await Qe(/* @__PURE__ */ new Date(`${V}T00:00:00`), /* @__PURE__ */ new Date(`${K}T00:00:00`));
477
468
  }
478
- async function no(e) {
469
+ async function ao(e) {
479
470
  if (!y.value) throw new Error("No outlet selected");
480
471
  const a = await D.createEmployeeProfile(y.value, e);
481
472
  d.value && (d.value.employees.push(a), z.value += 1);
482
473
  }
483
- async function oo(e, a) {
474
+ async function to(e, a) {
484
475
  if (!y.value) throw new Error("No outlet selected");
485
476
  const t = await D.updateEmployeeProfile(y.value, e, a);
486
477
  if (d.value) {
487
- const n = d.value.employees.findIndex((r) => r.employeeId === e);
478
+ const n = d.value.employees.findIndex((s) => s.employeeId === e);
488
479
  n > -1 && (d.value = {
489
480
  ...d.value,
490
- employees: d.value.employees.map((r, o) => o === n ? t : r)
481
+ employees: d.value.employees.map((s, o) => o === n ? t : s)
491
482
  });
492
483
  }
493
484
  }
494
- async function so(e) {
485
+ async function no(e) {
495
486
  const a = await D.createPosition(e);
496
487
  d.value && (d.value = { ...d.value, positions: [...d.value.positions, a] });
497
488
  }
498
- async function io(e, a) {
489
+ async function oo(e, a) {
499
490
  const t = await D.updatePosition(e, a);
500
491
  d.value && (d.value = {
501
492
  ...d.value,
502
493
  positions: d.value.positions.map((n) => n.id === e ? t : n)
503
494
  });
504
495
  }
505
- async function ro(e) {
496
+ async function io(e) {
506
497
  await D.deletePosition(e), d.value && (d.value = {
507
498
  ...d.value,
508
499
  positions: d.value.positions.filter((a) => a.id !== e)
509
500
  });
510
501
  }
511
- async function lo(e, a) {
512
- var r;
502
+ async function so(e, a) {
503
+ var s;
513
504
  if (!y.value) throw new Error("No outlet selected");
514
- const t = (r = d.value) == null ? void 0 : r.days.find((o) => o.date === e), n = await D.saveScheduleDay(y.value, e, {
505
+ const t = (s = d.value) == null ? void 0 : s.days.find((o) => o.date === e), n = await D.saveScheduleDay(y.value, e, {
515
506
  ...a,
516
507
  expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
517
508
  });
518
509
  if (d.value) {
519
- const o = d.value.days.filter((s) => s.date !== e);
510
+ const o = d.value.days.filter((r) => r.date !== e);
520
511
  n && o.push(n), d.value = { ...d.value, days: o };
521
512
  }
522
513
  }
523
- async function uo(e) {
524
- await $a([e]);
525
- }
526
- function Ta(e) {
527
- const a = e.periods.flatMap((t) => {
528
- const n = (t.roles ?? []).filter((s) => s.positionName && s.headcount > 0), r = n.reduce((s, i) => s + i.headcount, 0), o = {
514
+ async function ro(e) {
515
+ var s;
516
+ if (!y.value) throw new Error("No outlet selected");
517
+ const a = (((s = d.value) == null ? void 0 : s.demands) ?? []).filter(
518
+ (o) => e.date ? o.date === e.date : o.dayOfWeek === e.dayOfWeek
519
+ ), t = e.periods.flatMap((o) => {
520
+ const r = (o.roles ?? []).filter((f) => f.positionName && f.headcount > 0), i = r.reduce((f, w) => f + w.headcount, 0), m = {
529
521
  ...e.date ? { date: e.date } : { dayOfWeek: e.dayOfWeek },
530
- startTime: t.startTime,
531
- endTime: t.endTime
522
+ startTime: o.startTime,
523
+ endTime: o.endTime
532
524
  };
533
525
  return [
534
- ...n.map((s) => ({
535
- ...o,
536
- headcount: s.headcount,
537
- position: { positionId: s.positionId, positionName: s.positionName }
526
+ ...r.map((f) => ({
527
+ ...m,
528
+ headcount: f.headcount,
529
+ position: { positionId: f.positionId, positionName: f.positionName }
538
530
  })),
539
- ...t.headcount > r ? [{ ...o, headcount: t.headcount - r }] : []
531
+ ...o.headcount > i ? [{ ...m, headcount: o.headcount - i }] : []
540
532
  ];
541
- });
542
- return {
533
+ }), n = await D.replaceDemands(y.value, {
543
534
  ...e.date ? { date: e.date } : { dayOfWeek: e.dayOfWeek },
544
- demands: a
545
- };
546
- }
547
- async function $a(e) {
548
- if (!y.value) throw new Error("No outlet selected");
549
- if (!e.length) return;
550
- const a = e.map(Ta), t = e.length === 1 ? await D.replaceDemands(y.value, a[0]) : await D.bulkReplaceDemands(y.value, { replacements: a });
535
+ demands: t
536
+ });
551
537
  if (d.value) {
552
- const n = e.map((o) => ({ date: o.date, dayOfWeek: o.dayOfWeek })), r = d.value.demands.filter(
553
- (o) => !n.some((s) => s.date ? o.date === s.date : o.dayOfWeek === s.dayOfWeek)
554
- );
555
- d.value = { ...d.value, demands: [...r, ...t] };
538
+ const o = d.value.demands.filter((r) => !a.some((i) => i.id === r.id));
539
+ d.value = { ...d.value, demands: [...o, ...n] };
556
540
  }
557
541
  }
558
- async function co(e, a) {
542
+ async function lo(e, a) {
559
543
  if (!y.value) throw new Error("No outlet selected");
560
544
  const t = d.value;
561
545
  if (!t || t.demands.some((o) => o.date === a)) return 0;
562
546
  const n = t.demands.filter((o) => o.date === e);
563
547
  if (!n.length) return 0;
564
- const r = await Promise.all(
548
+ const s = await Promise.all(
565
549
  n.map(
566
550
  (o) => D.createDemand(y.value, {
567
551
  date: a,
@@ -577,34 +561,34 @@ async function co(e, a) {
577
561
  })
578
562
  )
579
563
  );
580
- return d.value && (d.value = { ...d.value, demands: [...d.value.demands, ...r] }), r.length;
564
+ return d.value && (d.value = { ...d.value, demands: [...d.value.demands, ...s] }), s.length;
581
565
  }
582
- async function yo(e) {
566
+ async function uo(e) {
583
567
  if (!y.value) throw new Error("No outlet selected");
584
568
  return D.generateAutoSchedule(y.value, e);
585
569
  }
586
- async function mo() {
570
+ async function co() {
587
571
  if (!y.value) throw new Error("No outlet selected");
588
572
  return D.getAutoScheduleCapabilities(y.value);
589
573
  }
590
- async function fo(e) {
574
+ async function yo(e) {
591
575
  if (!y.value) throw new Error("No outlet selected");
592
576
  return D.applyAutoSchedule(y.value, e);
593
577
  }
594
- async function po(e) {
578
+ async function mo(e) {
595
579
  if (!y.value) throw new Error("No outlet selected");
596
580
  return D.bulkSaveAssignments(y.value, e);
597
581
  }
598
- async function ho(e) {
582
+ async function fo(e) {
599
583
  if (!y.value) throw new Error("No outlet selected");
600
584
  e.length && await D.deleteAssignments(y.value, e);
601
585
  }
602
- async function vo(e) {
586
+ async function po(e) {
603
587
  if (!y.value) throw new Error("No outlet selected");
604
588
  const a = await D.createTimeOff(y.value, e);
605
589
  return d.value && (d.value = { ...d.value, timeOff: [...d.value.timeOff, a] }), a;
606
590
  }
607
- async function Do(e, a) {
591
+ async function ho(e, a) {
608
592
  if (!y.value) throw new Error("No outlet selected");
609
593
  const t = await D.updateTimeOffStatus(y.value, e, a);
610
594
  return t && d.value && (d.value = {
@@ -612,14 +596,14 @@ async function Do(e, a) {
612
596
  timeOff: d.value.timeOff.map((n) => n.id === e ? t : n)
613
597
  }), t;
614
598
  }
615
- async function go(e) {
599
+ async function vo(e) {
616
600
  if (!y.value) throw new Error("No outlet selected");
617
601
  await D.deleteTimeOff(y.value, e), d.value && (d.value = {
618
602
  ...d.value,
619
603
  timeOff: d.value.timeOff.filter((a) => a.id !== e)
620
604
  });
621
605
  }
622
- async function wo(e) {
606
+ async function Do(e) {
623
607
  if (!y.value) throw new Error("No outlet selected");
624
608
  return D.bulkUpdateAssignmentStatus(y.value, e);
625
609
  }
@@ -629,28 +613,28 @@ async function Qe(e, a) {
629
613
  ie.value = "No outlet selected";
630
614
  return;
631
615
  }
632
- const n = ee(e), r = ee(a), o = ++X;
616
+ const n = Z(e), s = Z(a), o = ++q;
633
617
  Se.value = !0, ie.value = null;
634
- const s = (async () => {
618
+ const r = (async () => {
635
619
  try {
636
- const i = await D.readBoard(t, n, r);
637
- if (y.value !== t || o !== X) return;
638
- d.value = i, We.value = i.settings.setupCompleted, V = n, K = r, z.value += 1;
620
+ const i = await D.readBoard(t, n, s);
621
+ if (y.value !== t || o !== q) return;
622
+ d.value = i, We.value = i.settings.setupCompleted, V = n, K = s, z.value += 1;
639
623
  } catch (i) {
640
- if (y.value !== t || o !== X) return;
624
+ if (y.value !== t || o !== q) return;
641
625
  ie.value = i instanceof Error ? i.message : "Could not load the schedule";
642
626
  } finally {
643
- y.value === t && o === X && (Se.value = !1);
627
+ y.value === t && o === q && (Se.value = !1);
644
628
  }
645
629
  })();
646
- W = s;
630
+ W = r;
647
631
  try {
648
- await s;
632
+ await r;
649
633
  } finally {
650
- W === s && (W = null);
634
+ W === r && (W = null);
651
635
  }
652
636
  }
653
- const Pa = "AE", Ya = "Asia/Dubai", Ba = {
637
+ const Ta = "AE", $a = "Asia/Dubai", Pa = {
654
638
  NORMAL: {
655
639
  overtime: 1.25
656
640
  },
@@ -662,13 +646,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
662
646
  regular: 2.5,
663
647
  overtime: 1.5
664
648
  }
665
- }, _a = {
649
+ }, Ya = {
666
650
  maxMonthlyHours: null,
667
651
  afterDailyHours: 2
668
- }, xa = {
652
+ }, Ba = {
669
653
  standardWeeklyHours: 48,
670
654
  maxDailyHours: 8
671
- }, Fa = [
655
+ }, _a = [
672
656
  {
673
657
  month: 1,
674
658
  day: 1,
@@ -684,7 +668,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
684
668
  day: 3,
685
669
  name: "UAE National Day Holiday"
686
670
  }
687
- ], Ua = {
671
+ ], xa = {
688
672
  2026: {
689
673
  "2026-01-01": "Gregorian New Year",
690
674
  "2026-03-20": "Eid Al-Fitr Holiday",
@@ -714,15 +698,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
714
698
  "2027-12-02": "UAE National Day",
715
699
  "2027-12-03": "UAE National Day Holiday"
716
700
  }
717
- }, Wa = {
718
- countryCode: Pa,
719
- timezone: Ya,
720
- payRate: Ba,
721
- overtime: _a,
722
- workingHours: xa,
723
- recurringPublicHolidays: Fa,
724
- publicHolidays: Ua
725
- }, za = "BN", Va = "Asia/Brunei", Ka = {
701
+ }, Fa = {
702
+ countryCode: Ta,
703
+ timezone: $a,
704
+ payRate: Pa,
705
+ overtime: Ya,
706
+ workingHours: Ba,
707
+ recurringPublicHolidays: _a,
708
+ publicHolidays: xa
709
+ }, Ua = "BN", Wa = "Asia/Brunei", za = {
726
710
  NORMAL: {
727
711
  overtime: 1.5
728
712
  },
@@ -734,13 +718,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
734
718
  regular: 2,
735
719
  overtime: 3
736
720
  }
737
- }, Ga = {
721
+ }, Va = {
738
722
  maxMonthlyHours: 72,
739
723
  afterDailyHours: null
740
- }, ja = {
724
+ }, Ka = {
741
725
  standardWeeklyHours: 44,
742
726
  maxDailyHours: 8
743
- }, Qa = [
727
+ }, Ga = [
744
728
  {
745
729
  month: 1,
746
730
  day: 1,
@@ -766,7 +750,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
766
750
  day: 25,
767
751
  name: "Christmas Day"
768
752
  }
769
- ], qa = {
753
+ ], ja = {
770
754
  2026: {
771
755
  "2026-01-01": "New Year's Day",
772
756
  "2026-02-17": "Chinese New Year",
@@ -796,15 +780,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
796
780
  "2027-08-15": "Prophet Muhammad's Birthday",
797
781
  "2027-12-25": "Christmas Day"
798
782
  }
799
- }, Xa = {
800
- countryCode: za,
801
- timezone: Va,
802
- payRate: Ka,
803
- overtime: Ga,
804
- workingHours: ja,
805
- recurringPublicHolidays: Qa,
806
- publicHolidays: qa
807
- }, Ja = "ID", Za = "Asia/Jakarta", et = {
783
+ }, Qa = {
784
+ countryCode: Ua,
785
+ timezone: Wa,
786
+ payRate: za,
787
+ overtime: Va,
788
+ workingHours: Ka,
789
+ recurringPublicHolidays: Ga,
790
+ publicHolidays: ja
791
+ }, qa = "ID", Xa = "Asia/Jakarta", Ja = {
808
792
  NORMAL: {
809
793
  overtime: 1.5
810
794
  },
@@ -816,13 +800,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
816
800
  regular: 2,
817
801
  overtime: 2
818
802
  }
819
- }, at = {
803
+ }, Za = {
820
804
  maxMonthlyHours: 72,
821
805
  afterDailyHours: 3
822
- }, tt = {
806
+ }, et = {
823
807
  standardWeeklyHours: 40,
824
808
  maxDailyHours: 8
825
- }, nt = [
809
+ }, at = [
826
810
  {
827
811
  month: 1,
828
812
  day: 1,
@@ -843,7 +827,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
843
827
  day: 25,
844
828
  name: "Christmas Day"
845
829
  }
846
- ], ot = {
830
+ ], tt = {
847
831
  2026: {
848
832
  "2026-01-01": "New Year's Day",
849
833
  "2026-01-16": "Isra Mi'raj",
@@ -883,15 +867,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
883
867
  "2027-12-25": "Christmas Day",
884
868
  "2027-12-26": "Isra Mi'raj"
885
869
  }
886
- }, st = {
887
- countryCode: Ja,
888
- timezone: Za,
889
- payRate: et,
890
- overtime: at,
891
- workingHours: tt,
892
- recurringPublicHolidays: nt,
893
- publicHolidays: ot
894
- }, it = "MO", rt = "Asia/Macau", lt = {
870
+ }, nt = {
871
+ countryCode: qa,
872
+ timezone: Xa,
873
+ payRate: Ja,
874
+ overtime: Za,
875
+ workingHours: et,
876
+ recurringPublicHolidays: at,
877
+ publicHolidays: tt
878
+ }, ot = "MO", it = "Asia/Macau", st = {
895
879
  NORMAL: {
896
880
  overtime: 1.5
897
881
  },
@@ -903,13 +887,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
903
887
  regular: 2,
904
888
  overtime: 3
905
889
  }
906
- }, ut = {
890
+ }, rt = {
907
891
  maxMonthlyHours: null,
908
892
  afterDailyHours: null
909
- }, dt = {
893
+ }, lt = {
910
894
  standardWeeklyHours: 48,
911
895
  maxDailyHours: 8
912
- }, ct = [
896
+ }, ut = [
913
897
  {
914
898
  month: 1,
915
899
  day: 1,
@@ -935,7 +919,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
935
919
  day: 25,
936
920
  name: "Christmas Day"
937
921
  }
938
- ], yt = {
922
+ ], dt = {
939
923
  2026: {
940
924
  "2026-01-01": "New Year's Day",
941
925
  "2026-02-17": "Lunar New Year's Day",
@@ -992,15 +976,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
992
976
  "2027-12-25": "Christmas Day",
993
977
  "2027-12-27": "Compensatory rest day"
994
978
  }
995
- }, mt = {
996
- countryCode: it,
997
- timezone: rt,
998
- payRate: lt,
999
- overtime: ut,
1000
- workingHours: dt,
1001
- recurringPublicHolidays: ct,
1002
- publicHolidays: yt
1003
- }, ft = "MV", pt = "Indian/Maldives", ht = {
979
+ }, ct = {
980
+ countryCode: ot,
981
+ timezone: it,
982
+ payRate: st,
983
+ overtime: rt,
984
+ workingHours: lt,
985
+ recurringPublicHolidays: ut,
986
+ publicHolidays: dt
987
+ }, yt = "MV", mt = "Indian/Maldives", ft = {
1004
988
  NORMAL: {
1005
989
  overtime: 1.5
1006
990
  },
@@ -1012,13 +996,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1012
996
  regular: 2,
1013
997
  overtime: 3
1014
998
  }
1015
- }, vt = {
999
+ }, pt = {
1016
1000
  maxMonthlyHours: null,
1017
1001
  afterDailyHours: null
1018
- }, Dt = {
1002
+ }, ht = {
1019
1003
  standardWeeklyHours: 48,
1020
1004
  maxDailyHours: 8
1021
- }, gt = [
1005
+ }, vt = [
1022
1006
  {
1023
1007
  month: 1,
1024
1008
  day: 1,
@@ -1044,7 +1028,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1044
1028
  day: 11,
1045
1029
  name: "Republic Day"
1046
1030
  }
1047
- ], wt = {
1031
+ ], Dt = {
1048
1032
  2026: {
1049
1033
  "2026-01-01": "New Year's Day",
1050
1034
  "2026-03-20": "Eid al-Fitr Holiday",
@@ -1082,15 +1066,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1082
1066
  "2027-11-03": "Victory Day",
1083
1067
  "2027-11-11": "Republic Day"
1084
1068
  }
1085
- }, Ht = {
1086
- countryCode: ft,
1087
- timezone: pt,
1088
- payRate: ht,
1089
- overtime: vt,
1090
- workingHours: Dt,
1091
- recurringPublicHolidays: gt,
1092
- publicHolidays: wt
1093
- }, At = "MY", Et = "Asia/Kuala_Lumpur", bt = {
1069
+ }, gt = {
1070
+ countryCode: yt,
1071
+ timezone: mt,
1072
+ payRate: ft,
1073
+ overtime: pt,
1074
+ workingHours: ht,
1075
+ recurringPublicHolidays: vt,
1076
+ publicHolidays: Dt
1077
+ }, wt = "MY", Ht = "Asia/Kuala_Lumpur", Et = {
1094
1078
  NORMAL: {
1095
1079
  overtime: 1.5
1096
1080
  },
@@ -1102,13 +1086,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1102
1086
  regular: 2,
1103
1087
  overtime: 3
1104
1088
  }
1105
- }, Nt = {
1089
+ }, At = {
1106
1090
  maxMonthlyHours: 104,
1107
1091
  afterDailyHours: null
1108
- }, kt = {
1092
+ }, bt = {
1109
1093
  standardWeeklyHours: 45,
1110
1094
  maxDailyHours: 8
1111
- }, Ct = [
1095
+ }, Nt = [
1112
1096
  {
1113
1097
  month: 1,
1114
1098
  day: 1,
@@ -1134,7 +1118,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1134
1118
  day: 25,
1135
1119
  name: "Christmas Day"
1136
1120
  }
1137
- ], Mt = {
1121
+ ], Ct = {
1138
1122
  2026: {
1139
1123
  "2026-01-01": "New Year's Day",
1140
1124
  "2026-02-17": "Chinese New Year",
@@ -1172,15 +1156,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1172
1156
  "2027-10-28": "Deepavali",
1173
1157
  "2027-12-25": "Christmas Day"
1174
1158
  }
1175
- }, St = {
1176
- countryCode: At,
1177
- timezone: Et,
1178
- payRate: bt,
1179
- overtime: Nt,
1180
- workingHours: kt,
1181
- recurringPublicHolidays: Ct,
1182
- publicHolidays: Mt
1183
- }, Ot = "PK", Lt = "Asia/Karachi", Rt = {
1159
+ }, Mt = {
1160
+ countryCode: wt,
1161
+ timezone: Ht,
1162
+ payRate: Et,
1163
+ overtime: At,
1164
+ workingHours: bt,
1165
+ recurringPublicHolidays: Nt,
1166
+ publicHolidays: Ct
1167
+ }, kt = "PK", St = "Asia/Karachi", Lt = {
1184
1168
  NORMAL: {
1185
1169
  overtime: 1.5
1186
1170
  },
@@ -1192,13 +1176,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1192
1176
  regular: 2,
1193
1177
  overtime: 3
1194
1178
  }
1195
- }, It = {
1179
+ }, Ot = {
1196
1180
  maxMonthlyHours: null,
1197
1181
  afterDailyHours: null
1198
- }, Tt = {
1182
+ }, Rt = {
1199
1183
  standardWeeklyHours: 48,
1200
1184
  maxDailyHours: 9
1201
- }, $t = [
1185
+ }, It = [
1202
1186
  {
1203
1187
  month: 1,
1204
1188
  day: 1,
@@ -1229,7 +1213,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1229
1213
  day: 25,
1230
1214
  name: "Quaid-e-Azam Day and Christmas Day"
1231
1215
  }
1232
- ], Pt = {
1216
+ ], Tt = {
1233
1217
  2026: {
1234
1218
  "2026-01-01": "New Year's Day",
1235
1219
  "2026-02-05": "Kashmir Day",
@@ -1254,15 +1238,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1254
1238
  "2027-08-15": "Eid Milad-un-Nabi",
1255
1239
  "2027-12-25": "Quaid-e-Azam Day and Christmas Day"
1256
1240
  }
1257
- }, Yt = {
1258
- countryCode: Ot,
1259
- timezone: Lt,
1260
- payRate: Rt,
1261
- overtime: It,
1262
- workingHours: Tt,
1263
- recurringPublicHolidays: $t,
1264
- publicHolidays: Pt
1265
- }, Bt = "SG", _t = "Asia/Singapore", xt = {
1241
+ }, $t = {
1242
+ countryCode: kt,
1243
+ timezone: St,
1244
+ payRate: Lt,
1245
+ overtime: Ot,
1246
+ workingHours: Rt,
1247
+ recurringPublicHolidays: It,
1248
+ publicHolidays: Tt
1249
+ }, Pt = "SG", Yt = "Asia/Singapore", Bt = {
1266
1250
  NORMAL: {
1267
1251
  overtime: 1.5
1268
1252
  },
@@ -1274,13 +1258,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1274
1258
  regular: 2,
1275
1259
  overtime: 1.5
1276
1260
  }
1277
- }, Ft = {
1261
+ }, _t = {
1278
1262
  maxMonthlyHours: 72,
1279
1263
  afterDailyHours: null
1280
- }, Ut = {
1264
+ }, xt = {
1281
1265
  standardWeeklyHours: 44,
1282
1266
  maxDailyHours: 12
1283
- }, Wt = [
1267
+ }, Ft = [
1284
1268
  {
1285
1269
  month: 1,
1286
1270
  day: 1,
@@ -1301,7 +1285,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1301
1285
  day: 25,
1302
1286
  name: "Christmas Day"
1303
1287
  }
1304
- ], zt = {
1288
+ ], Ut = {
1305
1289
  2026: {
1306
1290
  "2026-01-01": "New Year's Day",
1307
1291
  "2026-02-17": "Chinese New Year's Day",
@@ -1332,15 +1316,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1332
1316
  "2027-10-28": "Deepavali",
1333
1317
  "2027-12-25": "Christmas Day"
1334
1318
  }
1335
- }, Vt = {
1336
- countryCode: Bt,
1337
- timezone: _t,
1338
- payRate: xt,
1339
- overtime: Ft,
1340
- workingHours: Ut,
1341
- recurringPublicHolidays: Wt,
1342
- publicHolidays: zt
1343
- }, Kt = "TH", Gt = "Asia/Bangkok", jt = {
1319
+ }, Wt = {
1320
+ countryCode: Pt,
1321
+ timezone: Yt,
1322
+ payRate: Bt,
1323
+ overtime: _t,
1324
+ workingHours: xt,
1325
+ recurringPublicHolidays: Ft,
1326
+ publicHolidays: Ut
1327
+ }, zt = "TH", Vt = "Asia/Bangkok", Kt = {
1344
1328
  NORMAL: {
1345
1329
  overtime: 1.5
1346
1330
  },
@@ -1352,13 +1336,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1352
1336
  regular: 2,
1353
1337
  overtime: 3
1354
1338
  }
1355
- }, Qt = {
1339
+ }, Gt = {
1356
1340
  maxMonthlyHours: 36,
1357
1341
  afterDailyHours: null
1358
- }, qt = {
1342
+ }, jt = {
1359
1343
  standardWeeklyHours: 48,
1360
1344
  maxDailyHours: 8
1361
- }, Xt = [
1345
+ }, Qt = [
1362
1346
  {
1363
1347
  month: 1,
1364
1348
  day: 1,
@@ -1404,7 +1388,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1404
1388
  day: 31,
1405
1389
  name: "New Year's Eve"
1406
1390
  }
1407
- ], Jt = {
1391
+ ], qt = {
1408
1392
  2026: {
1409
1393
  "2026-01-01": "New Year's Day",
1410
1394
  "2026-03-03": "Makha Bucha Day",
@@ -1444,15 +1428,15 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1444
1428
  "2027-12-10": "Constitution Day",
1445
1429
  "2027-12-31": "New Year's Eve"
1446
1430
  }
1447
- }, Zt = {
1448
- countryCode: Kt,
1449
- timezone: Gt,
1450
- payRate: jt,
1451
- overtime: Qt,
1452
- workingHours: qt,
1453
- recurringPublicHolidays: Xt,
1454
- publicHolidays: Jt
1455
- }, en = "VN", an = "Asia/Ho_Chi_Minh", tn = {
1431
+ }, Xt = {
1432
+ countryCode: zt,
1433
+ timezone: Vt,
1434
+ payRate: Kt,
1435
+ overtime: Gt,
1436
+ workingHours: jt,
1437
+ recurringPublicHolidays: Qt,
1438
+ publicHolidays: qt
1439
+ }, Jt = "VN", Zt = "Asia/Ho_Chi_Minh", en = {
1456
1440
  NORMAL: {
1457
1441
  overtime: 1.5
1458
1442
  },
@@ -1464,13 +1448,13 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1464
1448
  regular: 2,
1465
1449
  overtime: 3
1466
1450
  }
1467
- }, nn = {
1451
+ }, an = {
1468
1452
  maxMonthlyHours: 40,
1469
1453
  afterDailyHours: null
1470
- }, on = {
1454
+ }, tn = {
1471
1455
  standardWeeklyHours: 48,
1472
1456
  maxDailyHours: 8
1473
- }, sn = [
1457
+ }, nn = [
1474
1458
  {
1475
1459
  month: 1,
1476
1460
  day: 1,
@@ -1491,7 +1475,7 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1491
1475
  day: 2,
1492
1476
  name: "National Day"
1493
1477
  }
1494
- ], rn = {
1478
+ ], on = {
1495
1479
  2026: {
1496
1480
  "2026-01-01": "New Year's Day",
1497
1481
  "2026-02-16": "Tet Holiday",
@@ -1519,16 +1503,16 @@ const Pa = "AE", Ya = "Asia/Dubai", Ba = {
1519
1503
  "2027-09-02": "National Day",
1520
1504
  "2027-09-03": "National Day Holiday"
1521
1505
  }
1522
- }, ln = {
1523
- countryCode: en,
1524
- timezone: an,
1525
- payRate: tn,
1526
- overtime: nn,
1527
- workingHours: on,
1528
- recurringPublicHolidays: sn,
1529
- publicHolidays: rn
1530
- }, Te = { AE: Wa, BN: Xa, ID: st, MO: mt, MV: Ht, MY: St, PK: Yt, SG: Vt, TH: Zt, VN: ln };
1531
- function un(e) {
1506
+ }, sn = {
1507
+ countryCode: Jt,
1508
+ timezone: Zt,
1509
+ payRate: en,
1510
+ overtime: an,
1511
+ workingHours: tn,
1512
+ recurringPublicHolidays: nn,
1513
+ publicHolidays: on
1514
+ }, Te = { AE: Fa, BN: Qa, ID: nt, MO: ct, MV: gt, MY: Mt, PK: $t, SG: Wt, TH: Xt, VN: sn };
1515
+ function rn(e) {
1532
1516
  if (typeof e == "string") return e.toUpperCase();
1533
1517
  if (e && typeof e == "object" && "code" in e) {
1534
1518
  const a = e.code;
@@ -1536,17 +1520,17 @@ function un(e) {
1536
1520
  }
1537
1521
  return "MY";
1538
1522
  }
1539
- function dn(e) {
1540
- return Te[un(e)] ?? Te.MY;
1523
+ function ln(e) {
1524
+ return Te[rn(e)] ?? Te.MY;
1541
1525
  }
1542
- function Ho(e, a) {
1543
- var o, s;
1526
+ function go(e, a) {
1527
+ var o, r;
1544
1528
  const t = (o = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : o[a];
1545
1529
  if (t) return t;
1546
- const n = Number(a.slice(5, 7)), r = Number(a.slice(8, 10));
1547
- return ((s = e.recurringPublicHolidays.find((i) => i.month === n && i.day === r)) == null ? void 0 : s.name) ?? null;
1530
+ const n = Number(a.slice(5, 7)), s = Number(a.slice(8, 10));
1531
+ return ((r = e.recurringPublicHolidays.find((i) => i.month === n && i.day === s)) == null ? void 0 : r.name) ?? null;
1548
1532
  }
1549
- const cn = Be(), qe = "unassigned", Ao = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Eo = "All Stations", bo = [
1533
+ const un = Be(), qe = "unassigned", wo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Ho = "All Stations", Eo = [
1550
1534
  { id: qe, label: "Assigned", roles: [], system: !0 }
1551
1535
  ], $e = [
1552
1536
  "#903E1F",
@@ -1558,74 +1542,74 @@ const cn = Be(), qe = "unassigned", Ao = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sa
1558
1542
  "#0F5C5C",
1559
1543
  "#6E2142"
1560
1544
  ];
1561
- function yn(e) {
1545
+ function dn(e) {
1562
1546
  var a;
1563
1547
  return (a = Ve.find((t) => t.name === e)) == null ? void 0 : a.id;
1564
1548
  }
1565
- function No(e) {
1549
+ function Ao(e) {
1566
1550
  if (e)
1567
- return { positionId: yn(e), positionName: e };
1551
+ return { positionId: dn(e), positionName: e };
1568
1552
  }
1569
- const ko = [1, 1, 1, 1, 1, 1, 1];
1570
- function ae(e) {
1553
+ const bo = [1, 1, 1, 1, 1, 1, 1];
1554
+ function ee(e) {
1571
1555
  return (e + 6) % 7;
1572
1556
  }
1573
- function Co(e) {
1557
+ function No(e) {
1574
1558
  return (e + 1) % 7;
1575
1559
  }
1576
- function oe(e, a) {
1560
+ function ne(e, a) {
1577
1561
  e.splice(0, e.length, ...a);
1578
1562
  }
1579
- function mn(e, a) {
1563
+ function cn(e, a) {
1580
1564
  return _e(e, a) / 60;
1581
1565
  }
1582
- function fn(e) {
1566
+ function yn(e) {
1583
1567
  var t;
1584
1568
  const a = e.trim().split(/\s+/).filter(Boolean);
1585
1569
  return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
1586
1570
  }
1587
- const Xe = /* @__PURE__ */ new Map(), fe = /* @__PURE__ */ new Map();
1588
- function Mo(e) {
1571
+ const Xe = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map();
1572
+ function Co(e) {
1589
1573
  return Xe.get(e);
1590
1574
  }
1591
- function pn(e) {
1592
- const a = fe.get(e);
1575
+ function mn(e) {
1576
+ const a = me.get(e);
1593
1577
  if (a !== void 0) return a;
1594
- const t = Fe + fe.size + 1;
1595
- return fe.set(e, t), Xe.set(t, e), t;
1578
+ const t = Fe + me.size + 1;
1579
+ return me.set(e, t), Xe.set(t, e), t;
1596
1580
  }
1597
- function So(e) {
1581
+ function Mo(e) {
1598
1582
  return e.sourceId || String(e.id);
1599
1583
  }
1600
- function hn(e) {
1601
- Na.name = (e == null ? void 0 : e.outlet.name) ?? "", oe(ba, (e == null ? void 0 : e.positions.map((s) => s.name)) ?? []), oe(Ve, (e == null ? void 0 : e.positions) ?? []);
1584
+ function fn(e) {
1585
+ Na.name = (e == null ? void 0 : e.outlet.name) ?? "", ne(ba, (e == null ? void 0 : e.positions.map((r) => r.name)) ?? []), ne(Ve, (e == null ? void 0 : e.positions) ?? []);
1602
1586
  const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
1603
- for (const s of a) t[ae(s.dayOfWeek)] = s.closed ? [] : s.hours;
1604
- oe(I.dayHours, t);
1605
- const n = a.filter((s) => !s.closed).flatMap((s) => s.hours);
1606
- I.openFrom = n.length ? n.map((s) => s.start).reduce((s, i) => i < s ? i : s) : "00:00", I.openTo = n.length ? n.map((s) => s.end).reduce((s, i) => i > s ? i : s) : "24:00", oe(
1607
- I.closedWeekdays,
1608
- a.filter((s) => s.closed).map((s) => ae(s.dayOfWeek)).sort((s, i) => s - i)
1587
+ for (const r of a) t[ee(r.dayOfWeek)] = r.closed ? [] : r.hours;
1588
+ ne(T.dayHours, t);
1589
+ const n = a.filter((r) => !r.closed).flatMap((r) => r.hours);
1590
+ T.openFrom = n.length ? n.map((r) => r.start).reduce((r, i) => i < r ? i : r) : "00:00", T.openTo = n.length ? n.map((r) => r.end).reduce((r, i) => i > r ? i : r) : "24:00", ne(
1591
+ T.closedWeekdays,
1592
+ a.filter((r) => r.closed).map((r) => ee(r.dayOfWeek)).sort((r, i) => r - i)
1609
1593
  );
1610
- const r = dn(cn.currentCountry.value), o = (e == null ? void 0 : e.settings.payRate) ?? r.payRate;
1611
- I.otCapHours = (e == null ? void 0 : e.settings.overtime.maxMonthlyHours) ?? r.overtime.maxMonthlyHours ?? 0, I.payRate.NORMAL.overtime = o.NORMAL.overtime, I.payRate.REST_DAY.regular = o.REST_DAY.regular, I.payRate.REST_DAY.overtime = o.REST_DAY.overtime, I.payRate.PUBLIC_HOLIDAY.regular = o.PUBLIC_HOLIDAY.regular, I.payRate.PUBLIC_HOLIDAY.overtime = o.PUBLIC_HOLIDAY.overtime;
1594
+ const s = ln(un.currentCountry.value), o = (e == null ? void 0 : e.settings.payRate) ?? s.payRate;
1595
+ T.otCapHours = (e == null ? void 0 : e.settings.overtime.maxMonthlyHours) ?? s.overtime.maxMonthlyHours ?? 0, T.payRate.NORMAL.overtime = o.NORMAL.overtime, T.payRate.REST_DAY.regular = o.REST_DAY.regular, T.payRate.REST_DAY.overtime = o.REST_DAY.overtime, T.payRate.PUBLIC_HOLIDAY.regular = o.PUBLIC_HOLIDAY.regular, T.payRate.PUBLIC_HOLIDAY.overtime = o.PUBLIC_HOLIDAY.overtime;
1612
1596
  }
1613
- Ee(d, hn, { immediate: !0 });
1614
- function vn(e) {
1597
+ Ee(d, fn, { immediate: !0 });
1598
+ function pn(e) {
1615
1599
  return e.reduce(
1616
1600
  (a, t) => t.employmentType === "FULLTIME" ? Math.max(a, t.workingHour) : a,
1617
1601
  0
1618
1602
  );
1619
1603
  }
1620
- function Dn(e, a) {
1604
+ function hn(e, a) {
1621
1605
  if (e.wage.type === "HOURLY") return e.wage.amount;
1622
1606
  const t = e.workingHour || a;
1623
1607
  return t ? e.wage.amount / (t * (52 / 12)) : 0;
1624
1608
  }
1625
- function gn(e, a) {
1609
+ function vn(e, a) {
1626
1610
  return e.employmentType === "FULLTIME" ? 100 : !a || !e.workingHour ? 0 : Math.min(99, Math.round(e.workingHour / a * 100));
1627
1611
  }
1628
- function wn(e) {
1612
+ function Dn(e) {
1629
1613
  var a;
1630
1614
  return {
1631
1615
  start: e.startTime,
@@ -1646,10 +1630,10 @@ function wn(e) {
1646
1630
  updatedAt: e.updatedAt
1647
1631
  };
1648
1632
  }
1649
- function Hn(e) {
1633
+ function gn(e) {
1650
1634
  return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
1651
1635
  }
1652
- function An(e, a) {
1636
+ function wn(e, a) {
1653
1637
  if (a < e.startDate || a > e.endDate) return null;
1654
1638
  const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
1655
1639
  return {
@@ -1657,12 +1641,12 @@ function An(e, a) {
1657
1641
  type: e.type,
1658
1642
  leaveType: e.leaveType ?? void 0,
1659
1643
  timeOff: e.status === "PENDING" ? "pending" : "approved",
1660
- reason: Hn(e),
1644
+ reason: gn(e),
1661
1645
  half: n !== "FULL_DAY",
1662
1646
  halfPart: n === "FULL_DAY" ? void 0 : n
1663
1647
  };
1664
1648
  }
1665
- function En(e) {
1649
+ function Hn(e) {
1666
1650
  return {
1667
1651
  employeeId: e._id,
1668
1652
  name: e.name,
@@ -1674,50 +1658,50 @@ function En(e) {
1674
1658
  availability: []
1675
1659
  };
1676
1660
  }
1677
- function bn(e) {
1678
- const a = J[y.value];
1661
+ function En(e) {
1662
+ const a = X[y.value];
1679
1663
  return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
1680
1664
  }
1681
- function Nn(e) {
1665
+ function An(e) {
1682
1666
  var n;
1683
- const t = (ze.value[e] ?? ((n = re.value.find((r) => r._id === e)) == null ? void 0 : n.restaurantRole.map((r) => r.restaurantId)) ?? []).map((r) => J[r]).filter((r) => !!r);
1684
- return t.length ? bn([...new Set(t)]) : void 0;
1667
+ const t = (ze.value[e] ?? ((n = se.value.find((s) => s._id === e)) == null ? void 0 : n.restaurantRole.map((s) => s.restaurantId)) ?? []).map((s) => X[s]).filter((s) => !!s);
1668
+ return t.length ? En([...new Set(t)]) : void 0;
1685
1669
  }
1686
- function Oo(e = []) {
1670
+ function ko(e = []) {
1687
1671
  const a = d.value;
1688
1672
  if (!a) return [];
1689
- const t = new Map(a.employees.map((i) => [i.employeeId, i])), n = new Map(x.value.map((i) => [i.employeeId, i])), r = re.value.filter((i) => {
1673
+ const t = new Map(a.employees.map((i) => [i.employeeId, i])), n = new Map(x.value.map((i) => [i.employeeId, i])), s = se.value.filter((i) => {
1690
1674
  var m;
1691
1675
  return ((m = n.get(i._id)) == null ? void 0 : m.enabled) !== !1;
1692
- }).map((i) => t.get(i._id) ?? En(i)), o = vn(r), s = /* @__PURE__ */ new Map();
1676
+ }).map((i) => t.get(i._id) ?? Hn(i)), o = pn(s), r = /* @__PURE__ */ new Map();
1693
1677
  for (const i of a.assignments) {
1694
- const m = `${i.employeeId}|${i.date}`, v = s.get(m);
1695
- v ? v.push(i) : s.set(m, [i]);
1678
+ const m = `${i.employeeId}|${i.date}`, f = r.get(m);
1679
+ f ? f.push(i) : r.set(m, [i]);
1696
1680
  }
1697
- return r.map((i) => {
1698
- var $, G;
1699
- const m = pn(i.employeeId), v = (($ = i.primaryPosition) == null ? void 0 : $.positionName) ?? "", N = [
1700
- (G = i.primaryPosition) == null ? void 0 : G.positionName,
1701
- ...i.secondaryPositions.map((S) => S.positionName)
1702
- ].filter((S) => !!S), T = e.map((S) => {
1703
- const A = ee(S), g = (a.timeOff ?? []).filter((E) => E.employeeId === i.employeeId).map((E) => An(E, A)).find((E) => E !== null);
1704
- if (g) return g;
1705
- const Y = (s.get(`${i.employeeId}|${A}`) ?? []).filter((E) => E.startTime && E.endTime).map((E) => wn(E)).sort((E, te) => E.start.localeCompare(te.start));
1706
- return Y.length ? Y.length === 1 ? Y[0] : Y : null;
1707
- }), f = i.availability.length > 0, C = Array.from(
1681
+ return s.map((i) => {
1682
+ var S, P;
1683
+ const m = mn(i.employeeId), f = ((S = i.primaryPosition) == null ? void 0 : S.positionName) ?? "", w = [
1684
+ (P = i.primaryPosition) == null ? void 0 : P.positionName,
1685
+ ...i.secondaryPositions.map((L) => L.positionName)
1686
+ ].filter((L) => !!L), $ = e.map((L) => {
1687
+ const A = Z(L), H = (a.timeOff ?? []).filter((E) => E.employeeId === i.employeeId).map((E) => wn(E, A)).find((E) => E !== null);
1688
+ if (H) return H;
1689
+ const b = (r.get(`${i.employeeId}|${A}`) ?? []).filter((E) => E.startTime && E.endTime).map((E) => Dn(E)).sort((E, ae) => E.start.localeCompare(ae.start));
1690
+ return b.length ? b.length === 1 ? b[0] : b : null;
1691
+ }), p = Array.from(
1708
1692
  { length: 7 },
1709
- (S, A) => f ? i.availability.some((g) => ae(g.dayOfWeek) === A) : !0
1710
- ), L = Array.from({ length: 7 }, (S, A) => {
1711
- const g = i.availability.find((H) => ae(H.dayOfWeek) === A);
1712
- return { from: (g == null ? void 0 : g.start) ?? "", to: (g == null ? void 0 : g.end) ?? "" };
1693
+ (L, A) => i.availability.some((H) => ee(H.dayOfWeek) === A)
1694
+ ), M = Array.from({ length: 7 }, (L, A) => {
1695
+ const H = i.availability.find((R) => ee(R.dayOfWeek) === A);
1696
+ return { from: (H == null ? void 0 : H.start) ?? "", to: (H == null ? void 0 : H.end) ?? "" };
1713
1697
  });
1714
1698
  return {
1715
1699
  id: m,
1716
1700
  sourceId: i.employeeId,
1717
1701
  name: i.name,
1718
1702
  employmentType: i.employmentType,
1719
- role: v,
1720
- initials: fn(i.name),
1703
+ role: f,
1704
+ initials: yn(i.name),
1721
1705
  color: $e[(m - Fe - 1) % $e.length],
1722
1706
  // Gross hours actually rostered this week — the figure the cost rail multiplies by
1723
1707
  // the rate. Contracted hours are a separate question, answered by RULES.contract.
@@ -1725,71 +1709,71 @@ function Oo(e = []) {
1725
1709
  // as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
1726
1710
  // verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
1727
1711
  weekHours: Math.round(
1728
- T.reduce(
1729
- (S, A) => S + (Array.isArray(A) ? A : A && "start" in A ? [A] : []).reduce(
1730
- (g, H) => g + mn(H.start, H.end),
1712
+ $.reduce(
1713
+ (L, A) => L + (Array.isArray(A) ? A : A && "start" in A ? [A] : []).reduce(
1714
+ (H, R) => H + cn(R.start, R.end),
1731
1715
  0
1732
1716
  ),
1733
1717
  0
1734
1718
  ) * 10
1735
1719
  ) / 10,
1736
- pct: gn(i, o),
1720
+ pct: vn(i, o),
1737
1721
  contractHours: i.workingHour || void 0,
1738
1722
  // Every outlet the POS says this person works at, not just this one — the Add / Edit form
1739
1723
  // shows them, and saving keeps them.
1740
- locations: Nn(i.employeeId),
1741
- rate: Dn(i, o),
1742
- positions: N,
1743
- shifts: T,
1724
+ locations: An(i.employeeId),
1725
+ rate: hn(i, o),
1726
+ positions: w,
1727
+ shifts: $,
1744
1728
  // Remarks live in their own collection in the older scheduling design and are not
1745
1729
  // part of this board's payload yet.
1746
1730
  remarks: [],
1747
1731
  section: qe,
1748
1732
  payBasis: i.wage.type === "HOURLY" ? "hourly" : "monthly",
1749
1733
  payAmount: i.wage.amount,
1750
- availDays: C,
1751
- availHours: L
1734
+ availDays: p,
1735
+ availHours: M
1752
1736
  };
1753
1737
  });
1754
1738
  }
1755
- function Lo() {
1739
+ function So() {
1756
1740
  return [];
1757
1741
  }
1758
- function Ro() {
1759
- var n, r;
1742
+ function Lo() {
1743
+ var n, s;
1760
1744
  const e = d.value, a = {}, t = {};
1761
1745
  for (const o of (e == null ? void 0 : e.demands) ?? []) {
1762
- const s = o.date ? a[n = o.date] ?? (a[n] = []) : o.dayOfWeek !== null ? t[r = ae(o.dayOfWeek)] ?? (t[r] = []) : null;
1763
- if (!s) continue;
1764
- let i = s.find((m) => m.from === o.startTime && m.to === o.endTime);
1765
- i || (i = { from: o.startTime, to: o.endTime, n: 0, roles: [] }, s.push(i)), i.n += o.headcount, o.position && i.roles.push({ position: o.position.positionName, n: o.headcount });
1746
+ const r = o.date ? a[n = o.date] ?? (a[n] = []) : o.dayOfWeek !== null ? t[s = ee(o.dayOfWeek)] ?? (t[s] = []) : null;
1747
+ if (!r) continue;
1748
+ let i = r.find((m) => m.from === o.startTime && m.to === o.endTime);
1749
+ i || (i = { from: o.startTime, to: o.endTime, n: 0, roles: [] }, r.push(i)), i.n += o.headcount, o.position && i.roles.push({ position: o.position.positionName, n: o.headcount });
1766
1750
  }
1767
1751
  return { byDate: a, byWeekday: t };
1768
1752
  }
1769
- function Io() {
1770
- const e = Be(), { restaurants: a, readRestaurants: t } = Da(), n = ha(), r = va(), o = w(!1), s = P(
1771
- () => [...a.value].map((f) => ({ value: f._id, label: f.profile.name })).sort((f, C) => f.label.localeCompare(C.label))
1772
- ), i = P(() => {
1773
- var f;
1774
- return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
1753
+ function Oo() {
1754
+ const e = Be(), { restaurants: a, readRestaurants: t } = Da(), n = ha(), s = va(), o = g(!1), r = Y(
1755
+ () => [...a.value].map((p) => ({ value: p._id, label: p.profile.name })).sort((p, M) => p.label.localeCompare(M.label))
1756
+ ), i = Y(() => {
1757
+ var p;
1758
+ return ((p = e.currentRestaurant.value) == null ? void 0 : p._id) ?? "";
1775
1759
  });
1776
- async function m(f, C) {
1777
- return Re(f) ? (n.query.restaurantId !== f && r.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([we(f), Ia(C)]), !0) : !1;
1760
+ async function m(p, M) {
1761
+ return Re(p) ? (n.query.restaurantId !== p && s.replace({ query: { ...n.query, restaurantId: p } }), await Promise.all([ge(p), Ia(M)]), !0) : !1;
1778
1762
  }
1779
- const v = (f) => !!f && s.value.some((C) => C.value === f);
1780
- async function N() {
1781
- var C;
1782
- await t(), Le.splice(0, Le.length, ...s.value.map((L) => L.label)), Object.keys(J).forEach((L) => delete J[L]), s.value.forEach((L) => J[L.value] = L.label);
1783
- const f = v(y.value) ? y.value : v(i.value) ? i.value : ((C = s.value[0]) == null ? void 0 : C.value) ?? "";
1784
- return f && Re(f), o.value = !0, f;
1763
+ const f = (p) => !!p && r.value.some((M) => M.value === p);
1764
+ async function w() {
1765
+ var M;
1766
+ await t(), Oe.splice(0, Oe.length, ...r.value.map((S) => S.label)), Object.keys(X).forEach((S) => delete X[S]), r.value.forEach((S) => X[S.value] = S.label);
1767
+ const p = f(y.value) ? y.value : f(i.value) ? i.value : ((M = r.value[0]) == null ? void 0 : M.value) ?? "";
1768
+ return p && Re(p), o.value = !0, p;
1785
1769
  }
1786
- async function T() {
1787
- const f = await N();
1788
- return f && await we(f), f;
1770
+ async function $() {
1771
+ const p = await w();
1772
+ return p && await ge(p), p;
1789
1773
  }
1790
- return { options: s, ready: o, outletId: y, resolve: T, resolveOutlet: N, switchTo: m };
1774
+ return { options: r, ready: o, outletId: y, resolve: $, resolveOutlet: w, switchTo: m };
1791
1775
  }
1792
- const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be({
1776
+ const bn = ["data-hierarchy", "data-size", "data-icon"], Ro = /* @__PURE__ */ Ae({
1793
1777
  __name: "ScheduleButton",
1794
1778
  props: {
1795
1779
  hierarchy: { default: "primary" },
@@ -1797,7 +1781,7 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
1797
1781
  iconOnly: { type: Boolean, default: !1 }
1798
1782
  },
1799
1783
  setup(e) {
1800
- return (a, t) => (b(), k("button", {
1784
+ return (a, t) => (N(), C("button", {
1801
1785
  type: "button",
1802
1786
  class: "sch-button",
1803
1787
  "data-hierarchy": e.hierarchy,
@@ -1805,24 +1789,24 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
1805
1789
  "data-icon": e.iconOnly ? "only" : void 0
1806
1790
  }, [
1807
1791
  Ye(a.$slots, "default")
1808
- ], 8, kn));
1792
+ ], 8, bn));
1809
1793
  }
1810
- }), Cn = ["disabled", "aria-expanded"], Mn = { class: "sch" }, Sn = ["aria-multiselectable"], On = {
1794
+ }), Nn = ["disabled", "aria-expanded"], Cn = { class: "sch" }, Mn = ["aria-multiselectable"], kn = {
1811
1795
  key: 0,
1812
1796
  class: "fx-pop-head"
1813
- }, Ln = {
1797
+ }, Sn = {
1814
1798
  key: 1,
1815
1799
  class: "fx-pop-search"
1816
- }, Rn = {
1800
+ }, Ln = {
1817
1801
  key: 2,
1818
1802
  class: "fx-opt is-off"
1819
- }, In = {
1803
+ }, On = {
1820
1804
  key: 0,
1821
1805
  class: "fx-grp"
1822
- }, Tn = ["aria-selected", "onClick"], $n = {
1806
+ }, Rn = ["aria-selected", "onClick"], In = {
1823
1807
  key: 0,
1824
1808
  class: "fx-opt-text"
1825
- }, Pn = { key: 0 }, $o = /* @__PURE__ */ be({
1809
+ }, Tn = { key: 0 }, Io = /* @__PURE__ */ Ae({
1826
1810
  inheritAttrs: !1,
1827
1811
  __name: "ScheduleSelect",
1828
1812
  props: {
@@ -1838,11 +1822,11 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
1838
1822
  },
1839
1823
  emits: ["update:modelValue", "toggle"],
1840
1824
  setup(e, { emit: a }) {
1841
- const t = e, n = a, r = ia(), o = P(() => r.class ?? ""), s = w(!1), i = w(!1), m = w(null), v = w(null), N = w(null), T = P(() => t.teleport !== !1 && i.value);
1842
- He(() => {
1825
+ const t = e, n = a, s = sa(), o = Y(() => s.class ?? ""), r = g(!1), i = g(!1), m = g(null), f = g(null), w = g(null), $ = Y(() => t.teleport !== !1 && i.value);
1826
+ we(() => {
1843
1827
  i.value = typeof document < "u" && !!document.body;
1844
1828
  });
1845
- const f = P(() => {
1829
+ const p = Y(() => {
1846
1830
  var l, c;
1847
1831
  if (t.multiple) {
1848
1832
  const u = ((l = t.selected) == null ? void 0 : l.length) ?? 0;
@@ -1850,80 +1834,80 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
1850
1834
  }
1851
1835
  return ((c = t.options.find((u) => u.value === t.modelValue)) == null ? void 0 : c.label) ?? "";
1852
1836
  });
1853
- function C(l) {
1837
+ function M(l) {
1854
1838
  var c;
1855
1839
  return t.multiple ? !!((c = t.selected) != null && c.includes(l.value)) : l.value === t.modelValue;
1856
1840
  }
1857
- const L = P(() => !!t.menuTitle || t.options.some((l) => l.hint)), $ = w(""), G = w(null), S = P(() => {
1858
- const l = $.value.trim().toLowerCase();
1841
+ const S = Y(() => !!t.menuTitle || t.options.some((l) => l.hint)), P = g(""), L = g(null), A = Y(() => {
1842
+ const l = P.value.trim().toLowerCase();
1859
1843
  return !t.searchable || !l ? t.options : t.options.filter((c) => `${c.label} ${c.hint ?? ""}`.toLowerCase().includes(l));
1860
- }), A = P(() => {
1844
+ }), H = Y(() => {
1861
1845
  const l = [];
1862
1846
  let c;
1863
- for (const u of S.value)
1847
+ for (const u of A.value)
1864
1848
  u.group !== c && (c = u.group, c && l.push({ heading: c })), l.push({ option: u });
1865
1849
  return l;
1866
- }), g = 5, H = 8;
1867
- function Y() {
1868
- const l = N.value, c = v.value;
1850
+ }), R = 5, b = 8;
1851
+ function E() {
1852
+ const l = w.value, c = f.value;
1869
1853
  if (!l || !c) return;
1870
- const u = c.getBoundingClientRect(), M = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
1871
- l.style.minWidth = `${Math.round(u.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(M - H * 2))}px`;
1872
- const j = R - u.bottom - g - H, na = u.top - g - H;
1873
- l.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(j, na)))}px`;
1874
- const ne = l.offsetHeight, oa = l.offsetWidth;
1875
- let de = u.bottom + g;
1876
- de + ne > R - H && (de = u.top - g - ne >= H ? u.top - g - ne : Math.max(H, R - ne - H));
1877
- const sa = Math.min(Math.max(H, u.left), Math.max(H, M - oa - H));
1878
- l.style.top = `${Math.round(de)}px`, l.style.left = `${Math.round(sa)}px`, l.style.visibility = "visible";
1854
+ const u = c.getBoundingClientRect(), k = window.innerWidth || document.documentElement.clientWidth, I = window.innerHeight || document.documentElement.clientHeight;
1855
+ l.style.minWidth = `${Math.round(u.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(k - b * 2))}px`;
1856
+ const G = I - u.bottom - R - b, na = u.top - R - b;
1857
+ l.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(G, na)))}px`;
1858
+ const te = l.offsetHeight, oa = l.offsetWidth;
1859
+ let ue = u.bottom + R;
1860
+ ue + te > I - b && (ue = u.top - R - te >= b ? u.top - R - te : Math.max(b, I - te - b));
1861
+ const ia = Math.min(Math.max(b, u.left), Math.max(b, k - oa - b));
1862
+ l.style.top = `${Math.round(ue)}px`, l.style.left = `${Math.round(ia)}px`, l.style.visibility = "visible";
1879
1863
  }
1880
- function E(l) {
1881
- var u, M;
1864
+ function ae(l) {
1865
+ var u, k;
1882
1866
  const c = l.target;
1883
- c && ((u = m.value) != null && u.contains(c) || (M = N.value) != null && M.contains(c)) || B();
1867
+ c && ((u = m.value) != null && u.contains(c) || (k = w.value) != null && k.contains(c)) || B();
1884
1868
  }
1885
- function te(l) {
1886
- const c = N.value, u = l.target;
1869
+ function be(l) {
1870
+ const c = w.value, u = l.target;
1887
1871
  if (c && u && u !== document && c.contains(u)) return;
1888
- const M = v.value;
1889
- if (!M) return;
1890
- const R = M.getBoundingClientRect(), j = window.innerHeight || document.documentElement.clientHeight;
1891
- if (R.bottom < 0 || R.top > j) {
1872
+ const k = f.value;
1873
+ if (!k) return;
1874
+ const I = k.getBoundingClientRect(), G = window.innerHeight || document.documentElement.clientHeight;
1875
+ if (I.bottom < 0 || I.top > G) {
1892
1876
  B();
1893
1877
  return;
1894
1878
  }
1895
- Y();
1879
+ E();
1896
1880
  }
1897
1881
  function Je() {
1898
- document.addEventListener("click", E), document.addEventListener("scroll", te, !0), window.addEventListener("resize", B);
1882
+ document.addEventListener("click", ae), document.addEventListener("scroll", be, !0), window.addEventListener("resize", B);
1899
1883
  }
1900
1884
  function Ne() {
1901
- document.removeEventListener("click", E), document.removeEventListener("scroll", te, !0), window.removeEventListener("resize", B);
1885
+ document.removeEventListener("click", ae), document.removeEventListener("scroll", be, !0), window.removeEventListener("resize", B);
1902
1886
  }
1903
- async function ue() {
1887
+ async function le() {
1904
1888
  var l, c, u;
1905
- t.disabled || s.value || ($.value = "", s.value = !0, await pe(), Y(), (l = G.value) == null || l.focus(), (u = (c = N.value) == null ? void 0 : c.querySelector(".fx-opt.is-on")) == null || u.scrollIntoView({ block: "nearest" }), Je());
1889
+ t.disabled || r.value || (P.value = "", r.value = !0, await fe(), E(), (l = L.value) == null || l.focus(), (u = (c = w.value) == null ? void 0 : c.querySelector(".fx-opt.is-on")) == null || u.scrollIntoView({ block: "nearest" }), Je());
1906
1890
  }
1907
1891
  function B() {
1908
- s.value && (s.value = !1, $.value = "", Ne());
1892
+ r.value && (r.value = !1, P.value = "", Ne());
1909
1893
  }
1910
- Ee($, async () => {
1911
- s.value && (await pe(), Y());
1894
+ Ee(P, async () => {
1895
+ r.value && (await fe(), E());
1912
1896
  });
1913
1897
  function Ze(l) {
1914
1898
  var c;
1915
1899
  if (l.key === "Escape")
1916
- l.preventDefault(), B(), (c = v.value) == null || c.focus();
1900
+ l.preventDefault(), B(), (c = f.value) == null || c.focus();
1917
1901
  else if (l.key === "Enter") {
1918
1902
  l.preventDefault();
1919
- const u = S.value.find((M) => !M.disabled);
1920
- u && Ce(u);
1903
+ const u = A.value.find((k) => !k.disabled);
1904
+ u && Me(u);
1921
1905
  }
1922
1906
  }
1923
- function ke() {
1924
- s.value ? B() : ue();
1907
+ function Ce() {
1908
+ r.value ? B() : le();
1925
1909
  }
1926
- function Ce(l) {
1910
+ function Me(l) {
1927
1911
  if (!l.disabled) {
1928
1912
  if (t.multiple && !l.command) {
1929
1913
  n("toggle", l.value);
@@ -1936,66 +1920,66 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
1936
1920
  l.value !== t.modelValue && n("update:modelValue", l.value);
1937
1921
  }
1938
1922
  }
1939
- const ea = P(() => t.options.filter((l) => !l.disabled));
1923
+ const ea = Y(() => t.options.filter((l) => !l.disabled));
1940
1924
  function aa(l) {
1941
1925
  const c = ea.value;
1942
1926
  if (t.multiple || !c.length) {
1943
- ue();
1927
+ le();
1944
1928
  return;
1945
1929
  }
1946
- const u = c.findIndex((j) => j.value === t.modelValue), M = l === "Home" ? 0 : l === "End" ? c.length - 1 : l === "ArrowDown" ? Math.min(c.length - 1, (u < 0 ? -1 : u) + 1) : Math.max(0, (u < 0 ? 1 : u) - 1), R = c[M];
1947
- R && R.value !== t.modelValue ? n("update:modelValue", R.value) : ue();
1930
+ const u = c.findIndex((G) => G.value === t.modelValue), k = l === "Home" ? 0 : l === "End" ? c.length - 1 : l === "ArrowDown" ? Math.min(c.length - 1, (u < 0 ? -1 : u) + 1) : Math.max(0, (u < 0 ? 1 : u) - 1), I = c[k];
1931
+ I && I.value !== t.modelValue ? n("update:modelValue", I.value) : le();
1948
1932
  }
1949
1933
  function ta(l) {
1950
1934
  var c;
1951
1935
  if (l.key === "Escape") {
1952
- if (!s.value) return;
1953
- l.preventDefault(), B(), (c = v.value) == null || c.focus();
1936
+ if (!r.value) return;
1937
+ l.preventDefault(), B(), (c = f.value) == null || c.focus();
1954
1938
  return;
1955
1939
  }
1956
1940
  if (l.key === "Enter" || l.key === " ") {
1957
- l.preventDefault(), ke();
1941
+ l.preventDefault(), Ce();
1958
1942
  return;
1959
1943
  }
1960
1944
  l.key !== "ArrowDown" && l.key !== "ArrowUp" && l.key !== "Home" && l.key !== "End" || (l.preventDefault(), aa(l.key));
1961
1945
  }
1962
- return Ae(Ne), (l, c) => (b(), k("div", {
1946
+ return He(Ne), (l, c) => (N(), C("div", {
1963
1947
  ref_key: "rootEl",
1964
1948
  ref: m,
1965
- class: se(["fx-sel", o.value])
1949
+ class: oe(["fx-sel", o.value])
1966
1950
  }, [
1967
1951
  _("button", la({
1968
1952
  ref_key: "btnEl",
1969
- ref: v
1953
+ ref: f
1970
1954
  }, l.$attrs, {
1971
1955
  type: "button",
1972
- class: ["sch-input fx-btn", { "is-open": s.value }],
1956
+ class: ["sch-input fx-btn", { "is-open": r.value }],
1973
1957
  disabled: e.disabled,
1974
1958
  "aria-haspopup": "listbox",
1975
- "aria-expanded": s.value,
1976
- onClick: c[0] || (c[0] = (u) => ke()),
1959
+ "aria-expanded": r.value,
1960
+ onClick: c[0] || (c[0] = (u) => Ce()),
1977
1961
  onKeydown: ta
1978
- }), F(f.value), 17, Cn),
1979
- (b(), ra(ua, {
1962
+ }), F(p.value), 17, Nn),
1963
+ (N(), ra(ua, {
1980
1964
  to: "body",
1981
- disabled: !T.value
1965
+ disabled: !$.value
1982
1966
  }, [
1983
- _("div", Mn, [
1984
- s.value ? (b(), k("div", {
1967
+ _("div", Cn, [
1968
+ r.value ? (N(), C("div", {
1985
1969
  key: 0,
1986
1970
  ref_key: "popEl",
1987
- ref: N,
1988
- class: se(["fx-pop", { "fx-pop-rich": L.value }]),
1971
+ ref: w,
1972
+ class: oe(["fx-pop", { "fx-pop-rich": S.value }]),
1989
1973
  role: "listbox",
1990
1974
  "aria-multiselectable": e.multiple || void 0,
1991
1975
  style: { visibility: "hidden" }
1992
1976
  }, [
1993
- e.menuTitle ? (b(), k("div", On, F(e.menuTitle), 1)) : U("", !0),
1994
- e.searchable ? (b(), k("div", Ln, [
1977
+ e.menuTitle ? (N(), C("div", kn, F(e.menuTitle), 1)) : U("", !0),
1978
+ e.searchable ? (N(), C("div", Sn, [
1995
1979
  da(_("input", {
1996
1980
  ref_key: "searchEl",
1997
- ref: G,
1998
- "onUpdate:modelValue": c[1] || (c[1] = (u) => $.value = u),
1981
+ ref: L,
1982
+ "onUpdate:modelValue": c[1] || (c[1] = (u) => P.value = u),
1999
1983
  class: "sch-input fx-pop-q",
2000
1984
  type: "search",
2001
1985
  placeholder: "Search",
@@ -2004,23 +1988,23 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
2004
1988
  "aria-label": "Search",
2005
1989
  onKeydown: Ze
2006
1990
  }, null, 544), [
2007
- [ca, $.value]
1991
+ [ca, P.value]
2008
1992
  ])
2009
1993
  ])) : U("", !0),
2010
- e.searchable && !A.value.length ? (b(), k("div", Rn, "No matches")) : U("", !0),
2011
- (b(!0), k(ye, null, ya(A.value, (u) => (b(), k(ye, {
1994
+ e.searchable && !H.value.length ? (N(), C("div", Ln, "No matches")) : U("", !0),
1995
+ (N(!0), C(ce, null, ya(H.value, (u) => (N(), C(ce, {
2012
1996
  key: "heading" in u ? `heading:${u.heading}` : `option:${u.option.value}`
2013
1997
  }, [
2014
- "heading" in u ? (b(), k("div", In, F(u.heading), 1)) : (b(), k("div", {
1998
+ "heading" in u ? (N(), C("div", On, F(u.heading), 1)) : (N(), C("div", {
2015
1999
  key: 1,
2016
- class: se(["fx-opt", {
2017
- "is-on": C(u.option),
2000
+ class: oe(["fx-opt", {
2001
+ "is-on": M(u.option),
2018
2002
  "is-off": u.option.disabled,
2019
2003
  "is-new": u.option.command
2020
2004
  }]),
2021
2005
  role: "option",
2022
- "aria-selected": C(u.option),
2023
- onClick: (M) => Ce(u.option)
2006
+ "aria-selected": M(u.option),
2007
+ onClick: (k) => Me(u.option)
2024
2008
  }, [
2025
2009
  c[2] || (c[2] = _("span", {
2026
2010
  class: "fx-tick",
@@ -2041,20 +2025,20 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
2041
2025
  })
2042
2026
  ])
2043
2027
  ], -1)),
2044
- L.value ? (b(), k("span", $n, [
2028
+ S.value ? (N(), C("span", In, [
2045
2029
  _("b", null, F(u.option.label), 1),
2046
- u.option.hint ? (b(), k("small", Pn, F(u.option.hint), 1)) : U("", !0)
2047
- ])) : (b(), k(ye, { key: 1 }, [
2030
+ u.option.hint ? (N(), C("small", Tn, F(u.option.hint), 1)) : U("", !0)
2031
+ ])) : (N(), C(ce, { key: 1 }, [
2048
2032
  ma(F(u.option.label), 1)
2049
2033
  ], 64))
2050
- ], 10, Tn))
2034
+ ], 10, Rn))
2051
2035
  ], 64))), 128))
2052
- ], 10, Sn)) : U("", !0)
2036
+ ], 10, Mn)) : U("", !0)
2053
2037
  ])
2054
2038
  ], 8, ["disabled"]))
2055
2039
  ], 2));
2056
2040
  }
2057
- }), Yn = ["id", "aria-labelledby", "aria-label"], Pe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', Po = /* @__PURE__ */ be({
2041
+ }), $n = ["id", "aria-labelledby", "aria-label"], Pe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', To = /* @__PURE__ */ Ae({
2058
2042
  __name: "ScheduleModal",
2059
2043
  props: {
2060
2044
  open: { type: Boolean },
@@ -2066,11 +2050,11 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
2066
2050
  },
2067
2051
  emits: ["close"],
2068
2052
  setup(e, { emit: a }) {
2069
- const t = e, n = a, r = w(null);
2053
+ const t = e, n = a, s = g(null);
2070
2054
  let o = null;
2071
- function s() {
2072
- pe(() => {
2073
- const m = r.value;
2055
+ function r() {
2056
+ fe(() => {
2057
+ const m = s.value;
2074
2058
  m && (m.querySelector(Pe) ?? m).focus();
2075
2059
  });
2076
2060
  }
@@ -2080,30 +2064,30 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
2080
2064
  m.preventDefault(), n("close");
2081
2065
  return;
2082
2066
  }
2083
- if (m.key !== "Tab" || !r.value) return;
2084
- const v = Array.from(r.value.querySelectorAll(Pe));
2085
- if (!v.length) return;
2086
- const N = v[0], T = v[v.length - 1];
2087
- m.shiftKey && document.activeElement === N ? (m.preventDefault(), T.focus()) : !m.shiftKey && document.activeElement === T && (m.preventDefault(), N.focus());
2067
+ if (m.key !== "Tab" || !s.value) return;
2068
+ const f = Array.from(s.value.querySelectorAll(Pe));
2069
+ if (!f.length) return;
2070
+ const w = f[0], $ = f[f.length - 1];
2071
+ m.shiftKey && document.activeElement === w ? (m.preventDefault(), $.focus()) : !m.shiftKey && document.activeElement === $ && (m.preventDefault(), w.focus());
2088
2072
  }
2089
2073
  return Ee(
2090
2074
  () => t.open,
2091
2075
  (m) => {
2092
- m ? (o = document.activeElement instanceof HTMLElement ? document.activeElement : null, s()) : (o == null || o.focus(), o = null);
2076
+ m ? (o = document.activeElement instanceof HTMLElement ? document.activeElement : null, r()) : (o == null || o.focus(), o = null);
2093
2077
  },
2094
2078
  { immediate: !0 }
2095
- ), He(() => document.addEventListener("keydown", i)), Ae(() => {
2079
+ ), we(() => document.addEventListener("keydown", i)), He(() => {
2096
2080
  document.removeEventListener("keydown", i), o = null;
2097
- }), (m, v) => e.open ? (b(), k("div", {
2081
+ }), (m, f) => e.open ? (N(), C("div", {
2098
2082
  key: 0,
2099
2083
  class: "modal-overlay open",
2100
- onClick: v[0] || (v[0] = fa((N) => n("close"), ["self"]))
2084
+ onClick: f[0] || (f[0] = fa((w) => n("close"), ["self"]))
2101
2085
  }, [
2102
2086
  _("div", {
2103
2087
  id: e.id,
2104
2088
  ref_key: "panel",
2105
- ref: r,
2106
- class: se(["schedule-modal-panel", e.panelClass]),
2089
+ ref: s,
2090
+ class: oe(["schedule-modal-panel", e.panelClass]),
2107
2091
  style: pa(e.panelStyle),
2108
2092
  role: "dialog",
2109
2093
  "aria-modal": "true",
@@ -2112,94 +2096,93 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], To = /* @__PURE__ */ be
2112
2096
  tabindex: "-1"
2113
2097
  }, [
2114
2098
  Ye(m.$slots, "default")
2115
- ], 14, Yn)
2099
+ ], 14, $n)
2116
2100
  ])) : U("", !0);
2117
2101
  }
2118
2102
  });
2119
2103
  export {
2120
- no as $,
2121
- Eo as A,
2122
- Aa as B,
2123
- Qn as C,
2124
- Xn as D,
2125
- oo as E,
2104
+ ao as $,
2105
+ Ho as A,
2106
+ Ea as B,
2107
+ Gn as C,
2108
+ Qn as D,
2109
+ to as E,
2126
2110
  wa as F,
2127
- go as G,
2128
- Do as H,
2129
- vo as I,
2111
+ vo as G,
2112
+ ho as H,
2113
+ po as I,
2130
2114
  We as J,
2131
2115
  D as K,
2132
2116
  x as L,
2133
2117
  Sa as M,
2134
- Le as N,
2135
- Co as O,
2118
+ Oe as N,
2119
+ No as O,
2136
2120
  ba as P,
2137
- qn as Q,
2138
- jn as R,
2139
- bo as S,
2140
- ae as T,
2121
+ jn as Q,
2122
+ Kn as R,
2123
+ Eo as S,
2124
+ ee as T,
2141
2125
  qe as U,
2142
- bn as V,
2143
- Ao as W,
2126
+ En as V,
2127
+ wo as W,
2144
2128
  je as X,
2145
- J as Y,
2146
- eo as Z,
2147
- ao as _,
2148
- Oo as a,
2129
+ X as Y,
2130
+ Jn as Z,
2131
+ Zn as _,
2132
+ ko as a,
2149
2133
  Ke as a0,
2150
- pn as a1,
2151
- ee as a2,
2152
- fo as a3,
2153
- yo as a4,
2154
- mo as a5,
2155
- ko as a6,
2134
+ mn as a1,
2135
+ Z as a2,
2136
+ yo as a3,
2137
+ uo as a4,
2138
+ co as a5,
2139
+ bo as a6,
2156
2140
  Ia as a7,
2157
- co as a8,
2141
+ lo as a8,
2158
2142
  Na as a9,
2159
2143
  Ha as aa,
2160
- zn as ab,
2161
- $a as ac,
2162
- uo as ad,
2163
- yn as ae,
2164
- Se as af,
2165
- Oe as ag,
2166
- ie as ah,
2167
- we as ai,
2168
- Ro as aj,
2169
- Oa as ak,
2170
- To as al,
2171
- $o as am,
2172
- Po as an,
2173
- Wn as ao,
2174
- Io as ap,
2175
- Ve as aq,
2176
- ro as ar,
2177
- so as as,
2178
- re as at,
2179
- io as au,
2180
- I as b,
2181
- Lo as c,
2144
+ Un as ab,
2145
+ ro as ac,
2146
+ dn as ad,
2147
+ Se as ae,
2148
+ Le as af,
2149
+ ie as ag,
2150
+ ge as ah,
2151
+ Lo as ai,
2152
+ La as aj,
2153
+ Ro as ak,
2154
+ Io as al,
2155
+ To as am,
2156
+ Fn as an,
2157
+ Oo as ao,
2158
+ Ve as ap,
2159
+ io as aq,
2160
+ no as ar,
2161
+ se as as,
2162
+ oo as at,
2163
+ T as b,
2164
+ So as c,
2182
2165
  z as d,
2183
- Kn as e,
2166
+ zn as e,
2184
2167
  d as f,
2185
- dn as g,
2186
- Ho as h,
2187
- Ca as i,
2188
- Mo as j,
2189
- po as k,
2190
- ho as l,
2191
- wo as m,
2192
- ge as n,
2168
+ ln as g,
2169
+ go as h,
2170
+ Ma as i,
2171
+ Co as j,
2172
+ mo as k,
2173
+ fo as l,
2174
+ Do as m,
2175
+ De as n,
2193
2176
  y as o,
2194
- No as p,
2195
- Zn as q,
2196
- to as r,
2197
- lo as s,
2198
- De as t,
2199
- Gn as u,
2200
- So as v,
2201
- Jn as w,
2202
- Vn as x,
2177
+ Ao as p,
2178
+ Xn as q,
2179
+ eo as r,
2180
+ so as s,
2181
+ ve as t,
2182
+ Vn as u,
2183
+ Mo as v,
2184
+ qn as w,
2185
+ Wn as x,
2203
2186
  _e as y,
2204
- ve as z
2187
+ he as z
2205
2188
  };