@feedmepos/mf-hrm-portal 2.3.0-dev.16 → 2.3.0-dev.17

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 (56) hide show
  1. package/dist/{ApprovalCodeList-NeNAiyOr.js → ApprovalCodeList-CQp5AXmP.js} +7 -7
  2. package/dist/{AuditLogList-Pv9kFjBr.js → AuditLogList-CBOp_hDR.js} +5 -5
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DWfp8X80.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-_2_usHCJ.js} +2 -2
  4. package/dist/{EmployeeList-Bs9lymzV.js → EmployeeList-1vR0zMMp.js} +8 -8
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-Cb22fFWE.js → FormItem.vue_vue_type_script_setup_true_lang-NR_aWS7l.js} +1 -1
  6. package/dist/{GrantUserList-dTWAmoUv.js → GrantUserList-CmeAG1Gy.js} +8 -8
  7. package/dist/{Main-Cp40vaRW.js → Main-BUTiZtwj.js} +5 -5
  8. package/dist/{Main-D_iKA3Se.js → Main-DLh6VmQX.js} +8 -8
  9. package/dist/{Main-C_RrWM3c.js → Main-DTAb8QWQ.js} +11 -11
  10. package/dist/{PermissionSetList-D9uTEllI.js → PermissionSetList-BtaX2k3V.js} +7 -7
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-vbO5PdcM.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B6dR75q1.js} +714 -714
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BVz6q3HE.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
  13. package/dist/{RoleList-DyoCd2jX.js → RoleList-Qyyi7w2u.js} +9 -9
  14. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-EPVMITc0.js +532 -0
  15. package/dist/{ScheduleGeneralPage-DyIBUXY1.js → ScheduleGeneralPage-CjZ8OFnN.js} +2 -2
  16. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CJMPrPHl.js → ScheduleModal.vue_vue_type_script_setup_true_lang-KOLBDv21.js} +523 -512
  17. package/dist/SchedulePage-BWpgAx3a.js +18831 -0
  18. package/dist/{SchedulePositionPage-DE5XxDl2.js → SchedulePositionPage-Cu6rRBlZ.js} +3 -3
  19. package/dist/{SelectFilter-D27X9BNI.js → SelectFilter-D58Vrs_W.js} +1 -1
  20. package/dist/{TeamMemberList-YudsADAP.js → TeamMemberList-CC_okKtX.js} +11 -11
  21. package/dist/{TimesheetList-CQXDulxg.js → TimesheetList-ULjiy1OT.js} +8 -8
  22. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CWHjolT4.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D9xXvYuA.js} +3 -3
  23. package/dist/{app-BMVAE__n.js → app-COD0IHk1.js} +8 -8
  24. package/dist/app.js +1 -1
  25. package/dist/{approval-code-DHsUgc4K.js → approval-code-BXUiojPH.js} +1 -1
  26. package/dist/{dayjs.min-6iMvK3bi.js → dayjs.min-jNfjc_8X.js} +1 -1
  27. package/dist/{employee-kAmYgyIB.js → employee-Db1gyZQZ.js} +4 -4
  28. package/dist/{grant-user-qzKHFTro.js → grant-user-CBJ3gEgW.js} +1 -1
  29. package/dist/{iteration-kNseYv0g.js → iteration-z1uPD-7T.js} +1 -1
  30. package/dist/{lodash-CoGtJ4ls.js → lodash-uwLYB3oL.js} +1 -1
  31. package/dist/{restaurant-BbYRA_IT.js → restaurant-D2mfKHaH.js} +44 -45
  32. package/dist/{role-BvQeAAsI.js → role-BhO6Cl-l.js} +2 -2
  33. package/dist/{rule-DkjcuvBR.js → rule-BZ340_dr.js} +3 -3
  34. package/dist/src/api/schedule/index.d.ts +6 -1
  35. package/dist/src/types/schedule.d.ts +1 -1
  36. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +1 -0
  37. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +2 -0
  38. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -4
  39. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +1 -0
  40. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +1 -0
  41. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +4 -1
  42. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +3 -10
  43. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +1 -0
  44. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +10 -1
  45. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +1 -0
  46. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +6 -0
  47. package/dist/src/views/scheduling/schedule-state.d.ts +232 -232
  48. package/dist/src/views/scheduling/schedule-store.d.ts +4 -0
  49. package/dist/style.css +1 -1
  50. package/dist/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/{useAppStore-BoLkvkE2.js → useAppStore-DZCdxlCd.js} +1 -1
  52. package/dist/{useLoading-Ch1AUYT1.js → useLoading-Nygx2zn8.js} +1 -1
  53. package/dist/{useReportPermissions-CbnelOLy.js → useReportPermissions-BjkeMcNA.js} +3 -3
  54. package/package.json +3 -3
  55. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D0Mg9P_m.js +0 -501
  56. package/dist/SchedulePage-BkvOpOVt.js +0 -18757
@@ -1,10 +1,10 @@
1
1
  import { onMounted as Le, onBeforeUnmount as Ie, ref as P, reactive as T, shallowRef as we, watch as Te, computed as Y, defineComponent as Re, createElementBlock as k, openBlock as b, renderSlot as Ve, useAttrs as ua, nextTick as Pe, normalizeClass as pe, createElementVNode as x, createBlock as da, mergeProps as ca, toDisplayString as W, Teleport as ma, createCommentVNode as z, withDirectives as ya, vModelText as pa, Fragment as He, renderList as fa, createTextVNode as ha, withModifiers as va, normalizeStyle as ga } from "vue";
2
2
  import { useRoute as Da, useRouter as wa } from "vue-router";
3
3
  import { useCoreStore as Ke } from "@feedmepos/mf-common";
4
- import { g as w, b as v, u as Ha } from "./restaurant-BbYRA_IT.js";
5
- import { E as be, u as Ge } from "./employee-kAmYgyIB.js";
6
- import { t as Oe, q as Aa } from "./rule-DkjcuvBR.js";
7
- function Qn(e) {
4
+ import { g, b as h, u as Ha } from "./restaurant-D2mfKHaH.js";
5
+ import { E as be, u as Ge } from "./employee-Db1gyZQZ.js";
6
+ import { t as Oe, q as Aa } from "./rule-BZ340_dr.js";
7
+ function jn(e) {
8
8
  let a = null;
9
9
  function t() {
10
10
  if (!a) return;
@@ -37,79 +37,84 @@ function je(e, a) {
37
37
  return Math.max(0, n - t);
38
38
  }
39
39
  function ba(e) {
40
- const a = (ke(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, i = t < 12 ? "am" : "pm", o = t % 12 || 12;
41
- return n ? `${o}:${String(n).padStart(2, "0")}${i}` : `${o}${i}`;
40
+ const a = (ke(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, s = t < 12 ? "am" : "pm", i = t % 12 || 12;
41
+ return n ? `${i}:${String(n).padStart(2, "0")}${s}` : `${i}${s}`;
42
42
  }
43
- function Xn(e) {
43
+ function Qn(e) {
44
44
  return ba(Ea(e % 1440));
45
45
  }
46
46
  function Qe(e) {
47
47
  const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
48
48
  return a != null && a.length ? a.reduce((t, n) => {
49
49
  if (n.type === "DURATION") return t + n.minutes;
50
- const [i, o] = n.startTime.split(":").map(Number), [r, s] = n.endTime.split(":").map(Number);
51
- let d = r * 60 + s - (i * 60 + o);
50
+ const [s, i] = n.startTime.split(":").map(Number), [r, o] = n.endTime.split(":").map(Number);
51
+ let d = r * 60 + o - (s * 60 + i);
52
52
  return d < 0 && (d += 24 * 60), t + d;
53
53
  }, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
54
54
  }
55
- function Jn(e, a) {
56
- var i;
57
- const t = a ?? je(e.start, e.end), n = (i = e.breaks) != null && i.length ? e.breaks.reduce((o, r) => o + (r.breakPayType === "UNPAID" ? Qe([r]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
55
+ function Xn(e, a) {
56
+ var s;
57
+ const t = a ?? je(e.start, e.end), n = (s = e.breaks) != null && s.length ? e.breaks.reduce((i, r) => i + (r.breakPayType === "UNPAID" ? Qe([r]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
58
58
  return Math.max(0, t - Math.min(t, n));
59
59
  }
60
- function Zn(e) {
60
+ function Jn(e) {
61
61
  const a = Math.max(0, Math.round(e ?? 0));
62
62
  return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
63
63
  }
64
- const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
64
+ const te = 500, ka = 10, $e = 6, Zn = 1500, Xe = 1e6, H = {
65
+ async completeOnboarding(e, a) {
66
+ return g(
67
+ await h(`restaurants/${e}/schedules`).post("onboarding", a)
68
+ );
69
+ },
65
70
  async listEmployeeProfiles(e) {
66
- return w(
67
- await v("schedules").get("employees", {
71
+ return g(
72
+ await h("schedules").get("employees", {
68
73
  params: e != null && e.length ? { ids: e.join(",") } : void 0
69
74
  })
70
75
  );
71
76
  },
72
77
  async listEmployeeConfigs(e) {
73
- return w(
74
- await v(`restaurants/${e}/schedules`).get("employee-configs")
78
+ return g(
79
+ await h(`restaurants/${e}/schedules`).get("employee-configs")
75
80
  );
76
81
  },
77
82
  async saveEmployeeConfigs(e, a) {
78
- return w(
79
- await v(`restaurants/${e}/schedules`).post(
83
+ return g(
84
+ await h(`restaurants/${e}/schedules`).post(
80
85
  "employee-configs/reorder",
81
86
  a
82
87
  )
83
88
  );
84
89
  },
85
90
  async getSettings(e) {
86
- return w(
87
- await v(`restaurants/${e}/schedules`).get("settings")
91
+ return g(
92
+ await h(`restaurants/${e}/schedules`).get("settings")
88
93
  );
89
94
  },
90
95
  async saveSettings(e, a) {
91
- return w(
92
- await v(`restaurants/${e}/schedules`).post("settings", a)
96
+ return g(
97
+ await h(`restaurants/${e}/schedules`).post("settings", a)
93
98
  );
94
99
  },
95
100
  async generateAutoSchedule(e, a) {
96
- return w(
97
- await v(`restaurants/${e}/schedules`).post(
101
+ return g(
102
+ await h(`restaurants/${e}/schedules`).post(
98
103
  "auto-schedule/generate",
99
104
  a
100
105
  )
101
106
  );
102
107
  },
103
108
  async getAutoScheduleCapabilities(e) {
104
- return w(
105
- await v(`restaurants/${e}/schedules`).get(
109
+ return g(
110
+ await h(`restaurants/${e}/schedules`).get(
106
111
  "auto-schedule/capabilities"
107
112
  )
108
113
  );
109
114
  },
110
115
  async applyAutoSchedule(e, a) {
111
- return w(
112
- await v(`restaurants/${e}/schedules`).post(
116
+ return g(
117
+ await h(`restaurants/${e}/schedules`).post(
113
118
  "auto-schedule/apply",
114
119
  a
115
120
  )
@@ -117,75 +122,75 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
117
122
  },
118
123
  /** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
119
124
  async readBoard(e, a, t) {
120
- return w(
121
- await v(`restaurants/${e}/schedules`).get("board", {
125
+ return g(
126
+ await h(`restaurants/${e}/schedules`).get("board", {
122
127
  params: { from: a, to: t }
123
128
  })
124
129
  );
125
130
  },
126
131
  async createTimeOff(e, a) {
127
- return w(
128
- await v(`restaurants/${e}/schedules`).post("time-off", a)
132
+ return g(
133
+ await h(`restaurants/${e}/schedules`).post("time-off", a)
129
134
  );
130
135
  },
131
136
  async updateTimeOffStatus(e, a, t) {
132
- return w(
133
- await v(`restaurants/${e}/schedules`).post(
137
+ return g(
138
+ await h(`restaurants/${e}/schedules`).post(
134
139
  `time-off/${a}/status`,
135
140
  t
136
141
  )
137
142
  );
138
143
  },
139
144
  async deleteTimeOff(e, a) {
140
- await v(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
145
+ await h(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
141
146
  },
142
147
  /** Creates or updates the employee's shared business-level scheduling profile. */
143
148
  async createEmployeeProfile(e, a) {
144
- return w(await v("schedules").post("employees", a));
149
+ return g(await h("schedules").post("employees", a));
145
150
  },
146
151
  /** Edits the employee's shared business-level scheduling profile. */
147
152
  async updateEmployeeProfile(e, a, t) {
148
- return w(
149
- await v("schedules").post("employees", { employeeId: a, ...t })
153
+ return g(
154
+ await h("schedules").post("employees", { employeeId: a, ...t })
150
155
  );
151
156
  },
152
157
  async validatePosAccess(e) {
153
- await v("schedules").post("employees/validate-pos-access", e);
158
+ await h("schedules").post("employees/validate-pos-access", e);
154
159
  },
155
160
  /** Positions are shared across the business. */
156
161
  async createPosition(e) {
157
- return w(await v("schedules").post("positions", e));
162
+ return g(await h("schedules").post("positions", e));
158
163
  },
159
164
  async updatePosition(e, a) {
160
- return w(await v("schedules").post(`positions/${e}`, a));
165
+ return g(await h("schedules").post(`positions/${e}`, a));
161
166
  },
162
167
  /** Deleting one position is `deletePositions` with a single-id array — the backend's
163
168
  * `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
164
169
  async deletePosition(e) {
165
- await v("schedules").delete("positions", {
170
+ await h("schedules").delete("positions", {
166
171
  params: { ids: e }
167
172
  });
168
173
  },
169
174
  /** Creates one flat demand interval. */
170
175
  async createDemand(e, a) {
171
- return w(
172
- await v(`restaurants/${e}/schedules`).post("demands", a)
176
+ return g(
177
+ await h(`restaurants/${e}/schedules`).post("demands", a)
173
178
  );
174
179
  },
175
180
  /** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
176
181
  * day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
177
182
  * array. */
178
183
  async deleteDemands(e, a) {
179
- return w(
180
- await v(`restaurants/${e}/schedules`).delete("demands", {
184
+ return g(
185
+ await h(`restaurants/${e}/schedules`).delete("demands", {
181
186
  params: { ids: a.join(",") }
182
187
  })
183
188
  );
184
189
  },
185
190
  /** Atomically replaces one date/weekday's flattened demand rows. */
186
191
  async replaceDemands(e, a) {
187
- return w(
188
- await v(`restaurants/${e}/schedules`).post(
192
+ return g(
193
+ await h(`restaurants/${e}/schedules`).post(
189
194
  "demands/replace",
190
195
  a
191
196
  )
@@ -193,8 +198,8 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
193
198
  },
194
199
  /** Atomically replaces several date/weekday demand generations. */
195
200
  async bulkReplaceDemands(e, a) {
196
- return w(
197
- await v(`restaurants/${e}/schedules`).post(
201
+ return g(
202
+ await h(`restaurants/${e}/schedules`).post(
198
203
  "demands/bulk-replace",
199
204
  a
200
205
  )
@@ -202,8 +207,8 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
202
207
  },
203
208
  /** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
204
209
  async saveScheduleDay(e, a, t) {
205
- return w(
206
- await v(`restaurants/${e}/schedules`).post(
210
+ return g(
211
+ await h(`restaurants/${e}/schedules`).post(
207
212
  `days/${a}`,
208
213
  t
209
214
  )
@@ -211,13 +216,13 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
211
216
  },
212
217
  /** A one-off shift assignment. */
213
218
  async createAssignment(e, a) {
214
- return w(
215
- await v(`restaurants/${e}/schedules`).post("assignments", a)
219
+ return g(
220
+ await h(`restaurants/${e}/schedules`).post("assignments", a)
216
221
  );
217
222
  },
218
223
  async updateAssignment(e, a, t) {
219
- return w(
220
- await v(`restaurants/${e}/schedules`).patch(
224
+ return g(
225
+ await h(`restaurants/${e}/schedules`).patch(
221
226
  `assignments/${a}`,
222
227
  t
223
228
  )
@@ -225,19 +230,31 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
225
230
  },
226
231
  /** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
227
232
  async bulkSaveAssignments(e, a) {
228
- return w(
229
- await v(`restaurants/${e}/schedules`).post(
233
+ return g(
234
+ await h(`restaurants/${e}/schedules`).post(
230
235
  "assignments/bulk",
231
236
  a
232
237
  )
233
238
  );
234
239
  },
240
+ /** Replaces demand and/or assignments in one backend transaction. */
241
+ async copySchedule(e, a) {
242
+ return g(
243
+ await h(`restaurants/${e}/schedules`).post("copy", a)
244
+ );
245
+ },
246
+ /** Clears demand and/or assignments in one backend transaction. */
247
+ async clearSchedule(e, a) {
248
+ return g(
249
+ await h(`restaurants/${e}/schedules`).post("clear", a)
250
+ );
251
+ },
235
252
  /** Deletes a batch of assignments in one request — e.g. a shift split into several segments
236
253
  * getting replaced wholesale. Deleting one assignment is just this with a single-id
237
254
  * array. */
238
255
  async deleteAssignments(e, a) {
239
- return w(
240
- await v(`restaurants/${e}/schedules`).delete("assignments", {
256
+ return g(
257
+ await h(`restaurants/${e}/schedules`).delete("assignments", {
241
258
  params: { ids: a.join(",") }
242
259
  })
243
260
  );
@@ -245,8 +262,8 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
245
262
  /** Flips a batch of assignments to one status in a single request — e.g. Publish sending
246
263
  * every DRAFT shift on the board to PUBLISHED at once. */
247
264
  async bulkUpdateAssignmentStatus(e, a) {
248
- return w(
249
- await v(`restaurants/${e}/schedules`).patch(
265
+ return g(
266
+ await h(`restaurants/${e}/schedules`).patch(
250
267
  "assignments/bulk-status",
251
268
  a
252
269
  )
@@ -318,16 +335,16 @@ const te = 500, ka = 10, $e = 6, qn = 1500, Xe = 1e6, H = {
318
335
  businessEmployees: Ae,
319
336
  positions: Na,
320
337
  positionRecords: B,
321
- rolePositions: eo,
338
+ rolePositions: qn,
322
339
  outlet: Ca,
323
340
  locationOptions: Be,
324
341
  locationLabelById: oe,
325
- compensationGroupMeta: ao,
326
- existingStaff: to,
327
- shiftTemplates: no,
342
+ compensationGroupMeta: eo,
343
+ existingStaff: ao,
344
+ shiftTemplates: to,
328
345
  rules: N
329
346
  } = Je;
330
- function Ma() {
347
+ function Sa() {
331
348
  const e = Je.rules;
332
349
  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.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = null, e.workingHours = {
333
350
  minHoursPerDay: null,
@@ -341,7 +358,7 @@ function Ma() {
341
358
  });
342
359
  }
343
360
  const Ne = 7;
344
- function Sa(e) {
361
+ function Ma(e) {
345
362
  const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
346
363
  return `${a}-${t}-${n}`;
347
364
  }
@@ -353,20 +370,20 @@ function Ce(e) {
353
370
  const a = new Date(e);
354
371
  return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
355
372
  }
356
- function oo(e, a = /* @__PURE__ */ new Date()) {
373
+ function no(e, a = /* @__PURE__ */ new Date()) {
357
374
  const t = se(Ce(a), e * Ne);
358
- return Array.from({ length: Ne }, (n, i) => se(t, i));
375
+ return Array.from({ length: Ne }, (n, s) => se(t, s));
359
376
  }
360
- function so(e, a) {
361
- const t = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), n = t(Ce(e)), i = t(Ce(a));
362
- return Math.trunc((i - n) / (Ne * 24 * 60 * 60 * 1e3));
377
+ function oo(e, a) {
378
+ const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Ce(e)), s = t(Ce(a));
379
+ return Math.trunc((s - n) / (Ne * 24 * 60 * 60 * 1e3));
363
380
  }
364
- const j = Sa;
381
+ const j = Ma;
365
382
  let Q = null, X = null, V = null, ne = 0, he = null;
366
383
  function _e(e) {
367
- return e === m.value ? !1 : (Ma(), m.value = e, l.value = null, Q = null, X = null, fe.value = null, he = null, Ze.value = !1, re.value = [], F.value = [], V = null, ne += 1, G.value += 1, !0);
384
+ return e === m.value ? !1 : (Sa(), m.value = e, l.value = null, Q = null, X = null, fe.value = null, he = null, Ze.value = !1, re.value = [], F.value = [], V = null, ne += 1, G.value += 1, !0);
368
385
  }
369
- async function Me(e) {
386
+ async function Se(e) {
370
387
  if (!(!e || he === e)) {
371
388
  Ye.value = !0;
372
389
  try {
@@ -392,66 +409,66 @@ async function Ia(e) {
392
409
  const t = await H.saveEmployeeConfigs(a, { configs: e });
393
410
  F.value = t, G.value += 1;
394
411
  }
395
- async function io(e) {
412
+ async function so(e) {
396
413
  const a = m.value;
397
414
  if (!a) throw new Error("No outlet selected");
398
415
  const t = await H.saveSettings(a, e);
399
416
  return m.value === a && l.value && (l.value = { ...l.value, settings: t }), t;
400
417
  }
401
418
  async function Ta(e, a) {
402
- const t = F.value.find((i) => i.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && F.value.some((i) => i.displayOrder !== null) ? Math.max(
419
+ const t = F.value.find((s) => s.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && F.value.some((s) => s.displayOrder !== null) ? Math.max(
403
420
  0,
404
421
  ...F.value.filter(
405
- (i) => i.displayOrder !== null
406
- ).map((i) => i.displayOrder)
422
+ (s) => s.displayOrder !== null
423
+ ).map((s) => s.displayOrder)
407
424
  ) + 100 : null);
408
425
  await Ia([{ employeeId: e, enabled: a, displayOrder: n }]);
409
426
  }
410
- async function Se() {
427
+ async function Me() {
411
428
  const e = m.value;
412
- e && (he = null, await Me(e));
429
+ e && (he = null, await Se(e));
413
430
  }
414
431
  async function Ra(e, a) {
415
- const t = Ge(), n = (await K(!0)).find((s) => s._id === e);
432
+ const t = Ge(), n = (await K(!0)).find((o) => o._id === e);
416
433
  if (!n) throw new Error("Could not find this employee");
417
- const i = n.restaurantRole.map((s) => ({
418
- restaurantId: s.restaurantId,
419
- roleId: s.roleId
420
- })), o = a(i);
421
- if (!o.length)
434
+ const s = n.restaurantRole.map((o) => ({
435
+ restaurantId: o.restaurantId,
436
+ roleId: o.roleId
437
+ })), i = a(s);
438
+ if (!i.length)
422
439
  throw new Error(
423
440
  "An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page."
424
441
  );
425
442
  (n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
426
443
  user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
427
- roles: o,
428
- previousRoles: i
444
+ roles: i,
445
+ previousRoles: s
429
446
  }) : await t.updateEmployee(e, {
430
447
  user: { name: n.name, passcode: n.passcode },
431
- roles: o,
432
- previousRoles: i
448
+ roles: i,
449
+ previousRoles: s
433
450
  }), await K(!0);
434
451
  }
435
- async function ro(e, a, t = "", n = !0) {
436
- const i = [...new Set(a.filter(Boolean))];
437
- i.length && (await Ra(e, (o) => [
438
- ...o.filter((r) => !i.includes(r.restaurantId)),
439
- ...i.map((r) => ({ restaurantId: r, roleId: t }))
440
- ]), n && m.value && i.includes(m.value) && await Ta(e, !0), await Se());
452
+ async function io(e, a, t = "", n = !0) {
453
+ const s = [...new Set(a.filter(Boolean))];
454
+ s.length && (await Ra(e, (i) => [
455
+ ...i.filter((r) => !s.includes(r.restaurantId)),
456
+ ...s.map((r) => ({ restaurantId: r, roleId: t }))
457
+ ]), n && m.value && s.includes(m.value) && await Ta(e, !0), await Me());
441
458
  }
442
- async function lo(e, a) {
459
+ async function ro(e, a) {
443
460
  const t = Ge(), n = (await K(!0)).find(
444
461
  (p) => p._id === e
445
462
  );
446
463
  if (!n) throw new Error("Could not find this employee");
447
- const i = (p) => p.slice().sort((g, C) => g.restaurantId.localeCompare(C.restaurantId)).map((g) => `${g.restaurantId}:${g.roleId}`).join("|"), o = i(n.restaurantRole) !== i(a.roles), r = n.name !== a.name || n.passcode !== a.passcode || n.isMasterUser !== a.masterUser || a.masterUser && (n.code ?? "") !== a.masterCode;
448
- if (!o && !r) return;
449
- const s = n.restaurantRole.map((p) => ({
464
+ const s = (p) => p.slice().sort((D, C) => D.restaurantId.localeCompare(C.restaurantId)).map((D) => `${D.restaurantId}:${D.roleId}`).join("|"), i = s(n.restaurantRole) !== s(a.roles), r = n.name !== a.name || n.passcode !== a.passcode || n.isMasterUser !== a.masterUser || a.masterUser && (n.code ?? "") !== a.masterCode;
465
+ if (!i && !r) return;
466
+ const o = n.restaurantRole.map((p) => ({
450
467
  restaurantId: p.restaurantId,
451
468
  roleId: p.roleId
452
469
  })), d = n.isMasterUser ? (await Oe.readTeamMembers()).find((p) => p.doc.posUserId === e) : void 0;
453
470
  if (d) {
454
- const p = Aa(), g = p.getPermissionAssignmentByUserId(d.id) ?? await p.readPermissionAssignmentByUserId(d.id), C = a.masterUser ? {
471
+ const p = Aa(), D = p.getPermissionAssignmentByUserId(d.id) ?? await p.readPermissionAssignmentByUserId(d.id), C = a.masterUser ? {
455
472
  code: a.masterCode,
456
473
  name: a.name,
457
474
  passcode: a.passcode,
@@ -459,30 +476,30 @@ async function lo(e, a) {
459
476
  } : null;
460
477
  await Oe.updateTeamMember(d.id, {
461
478
  permissions: d.permissions,
462
- customPermissions: (g == null ? void 0 : g.customPermissions) ?? d.permissions,
463
- permissionSetIds: (g == null ? void 0 : g.permissionSetIds) ?? d.doc.permissionSetIds ?? [],
479
+ customPermissions: (D == null ? void 0 : D.customPermissions) ?? d.permissions,
480
+ permissionSetIds: (D == null ? void 0 : D.permissionSetIds) ?? d.doc.permissionSetIds ?? [],
464
481
  posUser: C
465
- }), await K(!0), await Se();
482
+ }), await K(!0), await Me();
466
483
  return;
467
484
  }
468
485
  if (a.masterUser) {
469
486
  const p = {
470
487
  user: { name: a.name, passcode: a.passcode, code: a.masterCode },
471
488
  roles: a.roles,
472
- previousRoles: s
489
+ previousRoles: o
473
490
  };
474
491
  n.isMasterUser ? await t.updateMasterEmployee(e, p) : await t.migrateToMasterUser(e, p);
475
492
  } else
476
493
  n.isMasterUser ? await t.updateMasterEmployee(e, {
477
494
  user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
478
495
  roles: [],
479
- previousRoles: s
496
+ previousRoles: o
480
497
  }) : await t.updateEmployee(e, {
481
498
  user: { name: a.name, passcode: a.passcode },
482
499
  roles: a.roles,
483
- previousRoles: s
500
+ previousRoles: o
484
501
  });
485
- await K(!0), await Se();
502
+ await K(!0), await Me();
486
503
  }
487
504
  let ae = null;
488
505
  async function Oa() {
@@ -493,9 +510,9 @@ async function Oa() {
493
510
  }), a = Math.min(ka, Math.ceil(e.total / te)), t = await Promise.all(
494
511
  Array.from(
495
512
  { length: Math.max(0, a - 1) },
496
- (n, i) => be.readEmployeesPage({
513
+ (n, s) => be.readEmployeesPage({
497
514
  limit: te,
498
- offset: (i + 1) * te,
515
+ offset: (s + 1) * te,
499
516
  includeEmptyPasscode: !0
500
517
  })
501
518
  )
@@ -533,83 +550,80 @@ async function xa(e) {
533
550
  se(e, 7 * $e)
534
551
  );
535
552
  }
536
- async function uo() {
553
+ async function lo() {
537
554
  !Q || !X || await ea(/* @__PURE__ */ new Date(`${Q}T00:00:00`), /* @__PURE__ */ new Date(`${X}T00:00:00`));
538
555
  }
539
- async function co(e) {
556
+ async function uo(e) {
540
557
  if (!m.value) throw new Error("No outlet selected");
541
558
  const a = await H.createEmployeeProfile(m.value, e);
542
559
  l.value && (l.value.employees.push(a), G.value += 1);
543
560
  }
544
- async function mo(e) {
561
+ async function co(e) {
545
562
  await H.validatePosAccess(e);
546
563
  }
547
- async function yo(e, a) {
564
+ async function mo(e, a) {
548
565
  if (!m.value) throw new Error("No outlet selected");
549
566
  const t = await H.updateEmployeeProfile(m.value, e, a);
550
567
  if (l.value) {
551
- const n = l.value.employees.findIndex((i) => i.employeeId === e);
568
+ const n = l.value.employees.findIndex((s) => s.employeeId === e);
552
569
  n > -1 && (l.value = {
553
570
  ...l.value,
554
- employees: l.value.employees.map((i, o) => o === n ? t : i)
571
+ employees: l.value.employees.map((s, i) => i === n ? t : s)
555
572
  });
556
573
  }
557
574
  }
558
- async function po(e) {
575
+ async function yo(e) {
559
576
  const a = await H.createPosition(e);
560
577
  l.value && (l.value = { ...l.value, positions: [...l.value.positions, a] });
561
578
  }
562
- async function fo(e, a) {
579
+ async function po(e, a) {
563
580
  const t = await H.updatePosition(e, a);
564
581
  if (l.value) {
565
- const n = l.value.positions.find((o) => o.id === e), i = (o) => o.positionId === e || !o.positionId && o.positionName === (n == null ? void 0 : n.name);
582
+ const n = l.value.positions.find((i) => i.id === e), s = (i) => i.positionId === e || !i.positionId && i.positionName === (n == null ? void 0 : n.name);
566
583
  l.value = {
567
584
  ...l.value,
568
- positions: l.value.positions.map((o) => o.id === e ? t : o),
569
- employees: l.value.employees.map((o) => ({
570
- ...o,
571
- primaryPosition: o.primaryPosition && i(o.primaryPosition) ? { ...o.primaryPosition, positionName: t.name } : o.primaryPosition,
572
- secondaryPositions: o.secondaryPositions.map(
573
- (r) => i(r) ? { ...r, positionName: t.name } : r
585
+ positions: l.value.positions.map((i) => i.id === e ? t : i),
586
+ employees: l.value.employees.map((i) => ({
587
+ ...i,
588
+ primaryPosition: i.primaryPosition && s(i.primaryPosition) ? { ...i.primaryPosition, positionName: t.name } : i.primaryPosition,
589
+ secondaryPositions: i.secondaryPositions.map(
590
+ (r) => s(r) ? { ...r, positionName: t.name } : r
574
591
  )
575
592
  }))
576
593
  };
577
594
  }
578
595
  }
579
- async function ho(e) {
596
+ async function fo(e) {
580
597
  await H.deletePosition(e), l.value && (l.value = {
581
598
  ...l.value,
582
599
  positions: l.value.positions.filter((a) => a.id !== e)
583
600
  });
584
601
  }
585
- async function vo(e, a) {
586
- var i;
602
+ async function ho(e, a) {
603
+ var s;
587
604
  if (!m.value) throw new Error("No outlet selected");
588
- const t = (i = l.value) == null ? void 0 : i.days.find((o) => o.date === e), n = await H.saveScheduleDay(m.value, e, {
605
+ const t = (s = l.value) == null ? void 0 : s.days.find((i) => i.date === e), n = await H.saveScheduleDay(m.value, e, {
589
606
  ...a,
590
607
  expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
591
608
  });
592
609
  if (l.value) {
593
- const o = l.value.days.filter((r) => r.date !== e);
594
- n && o.push(n), l.value = { ...l.value, days: o };
610
+ const i = l.value.days.filter((r) => r.date !== e);
611
+ n && i.push(n), l.value = { ...l.value, days: i };
595
612
  }
596
613
  }
597
- async function go(e) {
598
- await Ba([e]);
599
- }
600
614
  function Ya(e) {
601
615
  const a = e.periods.flatMap((t) => {
602
- const n = (t.roles ?? []).filter((r) => r.positionName && r.headcount > 0), i = n.reduce((r, s) => r + s.headcount, 0), o = {
616
+ const n = (t.roles ?? []).filter((r) => r.positionName && r.headcount > 0), s = n.reduce((r, o) => r + o.headcount, 0), i = {
603
617
  startTime: t.startTime,
604
618
  endTime: t.endTime
605
619
  };
606
620
  return [
607
621
  ...n.map((r) => ({
608
- ...o,
622
+ ...i,
609
623
  headcount: r.headcount,
610
624
  position: { positionId: r.positionId, positionName: r.positionName }
611
625
  })),
612
- ...t.headcount > i ? [{ ...o, headcount: t.headcount - i }] : []
626
+ ...t.headcount > s ? [{ ...i, headcount: t.headcount - s }] : []
613
627
  ];
614
628
  });
615
629
  return {
@@ -617,61 +631,58 @@ function Ya(e) {
617
631
  demands: a
618
632
  };
619
633
  }
620
- async function Ba(e) {
634
+ async function vo(e) {
621
635
  if (!m.value) throw new Error("No outlet selected");
622
636
  if (!e.length) return;
623
637
  const a = e.map(Ya), t = e.length === 1 ? await H.replaceDemands(m.value, a[0]) : await H.bulkReplaceDemands(m.value, { replacements: a });
624
638
  if (l.value) {
625
- const n = new Set(e.map((o) => o.date)), i = l.value.demands.filter((o) => o.date === null || !n.has(o.date));
626
- l.value = { ...l.value, demands: [...i, ...t] };
639
+ const n = new Set(e.map((i) => i.date)), s = l.value.demands.filter((i) => i.date === null || !n.has(i.date));
640
+ l.value = { ...l.value, demands: [...s, ...t] };
627
641
  }
628
642
  }
629
- async function Do(e, a) {
630
- if (!m.value) throw new Error("No outlet selected");
631
- const t = l.value;
632
- if (!t || t.demands.some((o) => o.date === a)) return 0;
633
- const n = t.demands.filter((o) => o.date === e);
634
- if (!n.length) return 0;
635
- const i = await Promise.all(
636
- n.map(
637
- (o) => H.createDemand(m.value, {
638
- date: a,
639
- startTime: o.startTime,
640
- endTime: o.endTime,
641
- headcount: o.headcount,
642
- ...o.position && t.positions.some(
643
- (r) => o.position.positionId ? r.id === o.position.positionId : r.name.toLocaleLowerCase() === o.position.positionName.toLocaleLowerCase()
644
- ) ? {
645
- position: {
646
- positionId: o.position.positionId,
647
- positionName: o.position.positionName
648
- }
649
- } : {}
650
- })
651
- )
652
- );
653
- return l.value && (l.value = { ...l.value, demands: [...l.value.demands, ...i] }), i.length;
654
- }
655
- async function wo(e) {
643
+ async function go(e) {
656
644
  if (!m.value) throw new Error("No outlet selected");
657
645
  return H.generateAutoSchedule(m.value, e);
658
646
  }
659
- async function Ho() {
647
+ async function Do() {
660
648
  if (!m.value) throw new Error("No outlet selected");
661
649
  return H.getAutoScheduleCapabilities(m.value);
662
650
  }
663
- async function Ao(e) {
651
+ async function wo(e) {
664
652
  if (!m.value) throw new Error("No outlet selected");
665
653
  return H.applyAutoSchedule(m.value, e);
666
654
  }
667
- async function Eo(e) {
655
+ async function Ho(e) {
668
656
  if (!m.value) throw new Error("No outlet selected");
669
657
  const a = await H.bulkSaveAssignments(m.value, e);
670
658
  if (l.value) {
671
659
  const t = new Set(e.deleteIds), n = new Map(
672
- l.value.assignments.filter((i) => !t.has(i.id)).map((i) => [i.id, i])
660
+ l.value.assignments.filter((s) => !t.has(s.id)).map((s) => [s.id, s])
673
661
  );
674
- a.updated.forEach((i) => n.set(i.id, i)), a.created.forEach((i) => n.set(i.id, i)), l.value = { ...l.value, assignments: [...n.values()] };
662
+ a.updated.forEach((s) => n.set(s.id, s)), a.created.forEach((s) => n.set(s.id, s)), l.value = { ...l.value, assignments: [...n.values()] };
663
+ }
664
+ return a;
665
+ }
666
+ async function Ao(e) {
667
+ if (!m.value) throw new Error("No outlet selected");
668
+ return H.copySchedule(m.value, e);
669
+ }
670
+ async function Eo(e) {
671
+ var t;
672
+ if (!m.value) throw new Error("No outlet selected");
673
+ const a = await H.clearSchedule(m.value, e);
674
+ if (l.value) {
675
+ const n = new Set(
676
+ (((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((r) => r.date)
677
+ ), s = new Set(a.deletedAssignmentIds), i = a.demand;
678
+ l.value = {
679
+ ...l.value,
680
+ demands: [
681
+ ...l.value.demands.filter((r) => r.date === null || !n.has(r.date)),
682
+ ...i
683
+ ],
684
+ assignments: l.value.assignments.filter((r) => !s.has(r.id))
685
+ };
675
686
  }
676
687
  return a;
677
688
  }
@@ -725,18 +736,18 @@ async function ea(e, a) {
725
736
  fe.value = "No outlet selected";
726
737
  return;
727
738
  }
728
- const n = j(e), i = j(a), o = ++ne;
739
+ const n = j(e), s = j(a), i = ++ne;
729
740
  xe.value = !0, fe.value = null;
730
741
  const r = (async () => {
731
742
  try {
732
- const s = await H.readBoard(t, n, i);
733
- if (m.value !== t || o !== ne) return;
734
- l.value = s, Ze.value = s.settings.setupCompleted, Q = n, X = i, G.value += 1;
735
- } catch (s) {
736
- if (m.value !== t || o !== ne) return;
737
- fe.value = s instanceof Error ? s.message : "Could not load the schedule";
743
+ const o = await H.readBoard(t, n, s);
744
+ if (m.value !== t || i !== ne) return;
745
+ l.value = o, Ze.value = o.settings.setupCompleted, Q = n, X = s, G.value += 1;
746
+ } catch (o) {
747
+ if (m.value !== t || i !== ne) return;
748
+ fe.value = o instanceof Error ? o.message : "Could not load the schedule";
738
749
  } finally {
739
- m.value === t && o === ne && (xe.value = !1);
750
+ m.value === t && i === ne && (xe.value = !1);
740
751
  }
741
752
  })();
742
753
  V = r;
@@ -746,7 +757,7 @@ async function ea(e, a) {
746
757
  V === r && (V = null);
747
758
  }
748
759
  }
749
- const _a = "AE", Fa = "Asia/Dubai", Ua = {
760
+ const Ba = "AE", _a = "Asia/Dubai", Fa = {
750
761
  NORMAL: {
751
762
  overtime: 1.25
752
763
  },
@@ -758,9 +769,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
758
769
  regular: 2.5,
759
770
  overtime: 1.5
760
771
  }
761
- }, Wa = {
772
+ }, Ua = {
762
773
  maxHoursPerMonth: null
763
- }, za = {
774
+ }, Wa = {
764
775
  fullTime: {
765
776
  minHoursPerDay: null,
766
777
  maxHoursPerDay: 8,
@@ -769,7 +780,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
769
780
  partTime: {
770
781
  maxHoursPerWeek: 32
771
782
  }
772
- }, Va = [
783
+ }, za = [
773
784
  {
774
785
  month: 1,
775
786
  day: 1,
@@ -785,7 +796,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
785
796
  day: 3,
786
797
  name: "UAE National Day Holiday"
787
798
  }
788
- ], Ka = {
799
+ ], Va = {
789
800
  2026: {
790
801
  "2026-01-01": "Gregorian New Year",
791
802
  "2026-03-20": "Eid Al-Fitr Holiday",
@@ -815,15 +826,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
815
826
  "2027-12-02": "UAE National Day",
816
827
  "2027-12-03": "UAE National Day Holiday"
817
828
  }
818
- }, Ga = {
819
- countryCode: _a,
820
- timezone: Fa,
821
- payRate: Ua,
822
- overtime: Wa,
823
- workingHours: za,
824
- recurringPublicHolidays: Va,
825
- publicHolidays: Ka
826
- }, ja = "BN", Qa = "Asia/Brunei", Xa = {
829
+ }, Ka = {
830
+ countryCode: Ba,
831
+ timezone: _a,
832
+ payRate: Fa,
833
+ overtime: Ua,
834
+ workingHours: Wa,
835
+ recurringPublicHolidays: za,
836
+ publicHolidays: Va
837
+ }, Ga = "BN", ja = "Asia/Brunei", Qa = {
827
838
  NORMAL: {
828
839
  overtime: 1.5
829
840
  },
@@ -835,9 +846,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
835
846
  regular: 2,
836
847
  overtime: 3
837
848
  }
838
- }, Ja = {
849
+ }, Xa = {
839
850
  maxHoursPerMonth: 72
840
- }, Za = {
851
+ }, Ja = {
841
852
  fullTime: {
842
853
  minHoursPerDay: null,
843
854
  maxHoursPerDay: 8,
@@ -846,7 +857,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
846
857
  partTime: {
847
858
  maxHoursPerWeek: 30
848
859
  }
849
- }, qa = [
860
+ }, Za = [
850
861
  {
851
862
  month: 1,
852
863
  day: 1,
@@ -872,7 +883,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
872
883
  day: 25,
873
884
  name: "Christmas Day"
874
885
  }
875
- ], et = {
886
+ ], qa = {
876
887
  2026: {
877
888
  "2026-01-01": "New Year's Day",
878
889
  "2026-02-17": "Chinese New Year",
@@ -902,15 +913,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
902
913
  "2027-08-15": "Prophet Muhammad's Birthday",
903
914
  "2027-12-25": "Christmas Day"
904
915
  }
905
- }, at = {
906
- countryCode: ja,
907
- timezone: Qa,
908
- payRate: Xa,
909
- overtime: Ja,
910
- workingHours: Za,
911
- recurringPublicHolidays: qa,
912
- publicHolidays: et
913
- }, tt = "ID", nt = "Asia/Jakarta", ot = {
916
+ }, et = {
917
+ countryCode: Ga,
918
+ timezone: ja,
919
+ payRate: Qa,
920
+ overtime: Xa,
921
+ workingHours: Ja,
922
+ recurringPublicHolidays: Za,
923
+ publicHolidays: qa
924
+ }, at = "ID", tt = "Asia/Jakarta", nt = {
914
925
  NORMAL: {
915
926
  overtime: 1.5
916
927
  },
@@ -922,9 +933,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
922
933
  regular: 2,
923
934
  overtime: 2
924
935
  }
925
- }, st = {
936
+ }, ot = {
926
937
  maxHoursPerMonth: 72
927
- }, it = {
938
+ }, st = {
928
939
  fullTime: {
929
940
  minHoursPerDay: null,
930
941
  maxHoursPerDay: 8,
@@ -933,7 +944,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
933
944
  partTime: {
934
945
  maxHoursPerWeek: null
935
946
  }
936
- }, rt = [
947
+ }, it = [
937
948
  {
938
949
  month: 1,
939
950
  day: 1,
@@ -954,7 +965,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
954
965
  day: 25,
955
966
  name: "Christmas Day"
956
967
  }
957
- ], lt = {
968
+ ], rt = {
958
969
  2026: {
959
970
  "2026-01-01": "New Year's Day",
960
971
  "2026-01-16": "Isra Mi'raj",
@@ -994,15 +1005,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
994
1005
  "2027-12-25": "Christmas Day",
995
1006
  "2027-12-26": "Isra Mi'raj"
996
1007
  }
997
- }, ut = {
998
- countryCode: tt,
999
- timezone: nt,
1000
- payRate: ot,
1001
- overtime: st,
1002
- workingHours: it,
1003
- recurringPublicHolidays: rt,
1004
- publicHolidays: lt
1005
- }, dt = "MO", ct = "Asia/Macau", mt = {
1008
+ }, lt = {
1009
+ countryCode: at,
1010
+ timezone: tt,
1011
+ payRate: nt,
1012
+ overtime: ot,
1013
+ workingHours: st,
1014
+ recurringPublicHolidays: it,
1015
+ publicHolidays: rt
1016
+ }, ut = "MO", dt = "Asia/Macau", ct = {
1006
1017
  NORMAL: {
1007
1018
  overtime: 1.5
1008
1019
  },
@@ -1014,9 +1025,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1014
1025
  regular: 2,
1015
1026
  overtime: 3
1016
1027
  }
1017
- }, yt = {
1028
+ }, mt = {
1018
1029
  maxHoursPerMonth: null
1019
- }, pt = {
1030
+ }, yt = {
1020
1031
  fullTime: {
1021
1032
  minHoursPerDay: null,
1022
1033
  maxHoursPerDay: 8,
@@ -1025,7 +1036,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1025
1036
  partTime: {
1026
1037
  maxHoursPerWeek: null
1027
1038
  }
1028
- }, ft = [
1039
+ }, pt = [
1029
1040
  {
1030
1041
  month: 1,
1031
1042
  day: 1,
@@ -1051,7 +1062,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1051
1062
  day: 25,
1052
1063
  name: "Christmas Day"
1053
1064
  }
1054
- ], ht = {
1065
+ ], ft = {
1055
1066
  2026: {
1056
1067
  "2026-01-01": "New Year's Day",
1057
1068
  "2026-02-17": "Lunar New Year's Day",
@@ -1108,15 +1119,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1108
1119
  "2027-12-25": "Christmas Day",
1109
1120
  "2027-12-27": "Compensatory rest day"
1110
1121
  }
1111
- }, vt = {
1112
- countryCode: dt,
1113
- timezone: ct,
1114
- payRate: mt,
1115
- overtime: yt,
1116
- workingHours: pt,
1117
- recurringPublicHolidays: ft,
1118
- publicHolidays: ht
1119
- }, gt = "MV", Dt = "Indian/Maldives", wt = {
1122
+ }, ht = {
1123
+ countryCode: ut,
1124
+ timezone: dt,
1125
+ payRate: ct,
1126
+ overtime: mt,
1127
+ workingHours: yt,
1128
+ recurringPublicHolidays: pt,
1129
+ publicHolidays: ft
1130
+ }, vt = "MV", gt = "Indian/Maldives", Dt = {
1120
1131
  NORMAL: {
1121
1132
  overtime: 1.5
1122
1133
  },
@@ -1128,9 +1139,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1128
1139
  regular: 2,
1129
1140
  overtime: 3
1130
1141
  }
1131
- }, Ht = {
1142
+ }, wt = {
1132
1143
  maxHoursPerMonth: null
1133
- }, At = {
1144
+ }, Ht = {
1134
1145
  fullTime: {
1135
1146
  minHoursPerDay: null,
1136
1147
  maxHoursPerDay: 8,
@@ -1139,7 +1150,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1139
1150
  partTime: {
1140
1151
  maxHoursPerWeek: null
1141
1152
  }
1142
- }, Et = [
1153
+ }, At = [
1143
1154
  {
1144
1155
  month: 1,
1145
1156
  day: 1,
@@ -1165,7 +1176,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1165
1176
  day: 11,
1166
1177
  name: "Republic Day"
1167
1178
  }
1168
- ], Pt = {
1179
+ ], Et = {
1169
1180
  2026: {
1170
1181
  "2026-01-01": "New Year's Day",
1171
1182
  "2026-03-20": "Eid al-Fitr Holiday",
@@ -1203,15 +1214,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1203
1214
  "2027-11-03": "Victory Day",
1204
1215
  "2027-11-11": "Republic Day"
1205
1216
  }
1206
- }, bt = {
1207
- countryCode: gt,
1208
- timezone: Dt,
1209
- payRate: wt,
1210
- overtime: Ht,
1211
- workingHours: At,
1212
- recurringPublicHolidays: Et,
1213
- publicHolidays: Pt
1214
- }, kt = "MY", Nt = "Asia/Kuala_Lumpur", Ct = {
1217
+ }, Pt = {
1218
+ countryCode: vt,
1219
+ timezone: gt,
1220
+ payRate: Dt,
1221
+ overtime: wt,
1222
+ workingHours: Ht,
1223
+ recurringPublicHolidays: At,
1224
+ publicHolidays: Et
1225
+ }, bt = "MY", kt = "Asia/Kuala_Lumpur", Nt = {
1215
1226
  NORMAL: {
1216
1227
  overtime: 1.5
1217
1228
  },
@@ -1223,7 +1234,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1223
1234
  regular: 2,
1224
1235
  overtime: 3
1225
1236
  }
1226
- }, Mt = {
1237
+ }, Ct = {
1227
1238
  maxHoursPerMonth: 104
1228
1239
  }, St = {
1229
1240
  fullTime: {
@@ -1234,7 +1245,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1234
1245
  partTime: {
1235
1246
  maxHoursPerWeek: 31.5
1236
1247
  }
1237
- }, Lt = [
1248
+ }, Mt = [
1238
1249
  {
1239
1250
  month: 1,
1240
1251
  day: 1,
@@ -1260,7 +1271,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1260
1271
  day: 25,
1261
1272
  name: "Christmas Day"
1262
1273
  }
1263
- ], It = {
1274
+ ], Lt = {
1264
1275
  2026: {
1265
1276
  "2026-01-01": "New Year's Day",
1266
1277
  "2026-02-17": "Chinese New Year",
@@ -1298,15 +1309,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1298
1309
  "2027-10-28": "Deepavali",
1299
1310
  "2027-12-25": "Christmas Day"
1300
1311
  }
1301
- }, Tt = {
1302
- countryCode: kt,
1303
- timezone: Nt,
1304
- payRate: Ct,
1305
- overtime: Mt,
1312
+ }, It = {
1313
+ countryCode: bt,
1314
+ timezone: kt,
1315
+ payRate: Nt,
1316
+ overtime: Ct,
1306
1317
  workingHours: St,
1307
- recurringPublicHolidays: Lt,
1308
- publicHolidays: It
1309
- }, Rt = "PK", Ot = "Asia/Karachi", $t = {
1318
+ recurringPublicHolidays: Mt,
1319
+ publicHolidays: Lt
1320
+ }, Tt = "PK", Rt = "Asia/Karachi", Ot = {
1310
1321
  NORMAL: {
1311
1322
  overtime: 1.5
1312
1323
  },
@@ -1318,9 +1329,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1318
1329
  regular: 2,
1319
1330
  overtime: 3
1320
1331
  }
1321
- }, xt = {
1332
+ }, $t = {
1322
1333
  maxHoursPerMonth: null
1323
- }, Yt = {
1334
+ }, xt = {
1324
1335
  fullTime: {
1325
1336
  minHoursPerDay: null,
1326
1337
  maxHoursPerDay: 9,
@@ -1329,7 +1340,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1329
1340
  partTime: {
1330
1341
  maxHoursPerWeek: null
1331
1342
  }
1332
- }, Bt = [
1343
+ }, Yt = [
1333
1344
  {
1334
1345
  month: 1,
1335
1346
  day: 1,
@@ -1360,7 +1371,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1360
1371
  day: 25,
1361
1372
  name: "Quaid-e-Azam Day and Christmas Day"
1362
1373
  }
1363
- ], _t = {
1374
+ ], Bt = {
1364
1375
  2026: {
1365
1376
  "2026-01-01": "New Year's Day",
1366
1377
  "2026-02-05": "Kashmir Day",
@@ -1385,15 +1396,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1385
1396
  "2027-08-15": "Eid Milad-un-Nabi",
1386
1397
  "2027-12-25": "Quaid-e-Azam Day and Christmas Day"
1387
1398
  }
1388
- }, Ft = {
1389
- countryCode: Rt,
1390
- timezone: Ot,
1391
- payRate: $t,
1392
- overtime: xt,
1393
- workingHours: Yt,
1394
- recurringPublicHolidays: Bt,
1395
- publicHolidays: _t
1396
- }, Ut = "SG", Wt = "Asia/Singapore", zt = {
1399
+ }, _t = {
1400
+ countryCode: Tt,
1401
+ timezone: Rt,
1402
+ payRate: Ot,
1403
+ overtime: $t,
1404
+ workingHours: xt,
1405
+ recurringPublicHolidays: Yt,
1406
+ publicHolidays: Bt
1407
+ }, Ft = "SG", Ut = "Asia/Singapore", Wt = {
1397
1408
  NORMAL: {
1398
1409
  overtime: 1.5
1399
1410
  },
@@ -1405,9 +1416,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1405
1416
  regular: 2,
1406
1417
  overtime: 1.5
1407
1418
  }
1408
- }, Vt = {
1419
+ }, zt = {
1409
1420
  maxHoursPerMonth: 72
1410
- }, Kt = {
1421
+ }, Vt = {
1411
1422
  fullTime: {
1412
1423
  minHoursPerDay: null,
1413
1424
  maxHoursPerDay: 12,
@@ -1416,7 +1427,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1416
1427
  partTime: {
1417
1428
  maxHoursPerWeek: 35
1418
1429
  }
1419
- }, Gt = [
1430
+ }, Kt = [
1420
1431
  {
1421
1432
  month: 1,
1422
1433
  day: 1,
@@ -1437,7 +1448,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1437
1448
  day: 25,
1438
1449
  name: "Christmas Day"
1439
1450
  }
1440
- ], jt = {
1451
+ ], Gt = {
1441
1452
  2026: {
1442
1453
  "2026-01-01": "New Year's Day",
1443
1454
  "2026-02-17": "Chinese New Year's Day",
@@ -1468,15 +1479,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1468
1479
  "2027-10-28": "Deepavali",
1469
1480
  "2027-12-25": "Christmas Day"
1470
1481
  }
1471
- }, Qt = {
1472
- countryCode: Ut,
1473
- timezone: Wt,
1474
- payRate: zt,
1475
- overtime: Vt,
1476
- workingHours: Kt,
1477
- recurringPublicHolidays: Gt,
1478
- publicHolidays: jt
1479
- }, Xt = "TH", Jt = "Asia/Bangkok", Zt = {
1482
+ }, jt = {
1483
+ countryCode: Ft,
1484
+ timezone: Ut,
1485
+ payRate: Wt,
1486
+ overtime: zt,
1487
+ workingHours: Vt,
1488
+ recurringPublicHolidays: Kt,
1489
+ publicHolidays: Gt
1490
+ }, Qt = "TH", Xt = "Asia/Bangkok", Jt = {
1480
1491
  NORMAL: {
1481
1492
  overtime: 1.5
1482
1493
  },
@@ -1488,9 +1499,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1488
1499
  regular: 2,
1489
1500
  overtime: 3
1490
1501
  }
1491
- }, qt = {
1502
+ }, Zt = {
1492
1503
  maxHoursPerMonth: 36
1493
- }, en = {
1504
+ }, qt = {
1494
1505
  fullTime: {
1495
1506
  minHoursPerDay: null,
1496
1507
  maxHoursPerDay: 8,
@@ -1499,7 +1510,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1499
1510
  partTime: {
1500
1511
  maxHoursPerWeek: null
1501
1512
  }
1502
- }, an = [
1513
+ }, en = [
1503
1514
  {
1504
1515
  month: 1,
1505
1516
  day: 1,
@@ -1545,7 +1556,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1545
1556
  day: 31,
1546
1557
  name: "New Year's Eve"
1547
1558
  }
1548
- ], tn = {
1559
+ ], an = {
1549
1560
  2026: {
1550
1561
  "2026-01-01": "New Year's Day",
1551
1562
  "2026-03-03": "Makha Bucha Day",
@@ -1585,15 +1596,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1585
1596
  "2027-12-10": "Constitution Day",
1586
1597
  "2027-12-31": "New Year's Eve"
1587
1598
  }
1588
- }, nn = {
1589
- countryCode: Xt,
1590
- timezone: Jt,
1591
- payRate: Zt,
1592
- overtime: qt,
1593
- workingHours: en,
1594
- recurringPublicHolidays: an,
1595
- publicHolidays: tn
1596
- }, on = "VN", sn = "Asia/Ho_Chi_Minh", rn = {
1599
+ }, tn = {
1600
+ countryCode: Qt,
1601
+ timezone: Xt,
1602
+ payRate: Jt,
1603
+ overtime: Zt,
1604
+ workingHours: qt,
1605
+ recurringPublicHolidays: en,
1606
+ publicHolidays: an
1607
+ }, nn = "VN", on = "Asia/Ho_Chi_Minh", sn = {
1597
1608
  NORMAL: {
1598
1609
  overtime: 1.5
1599
1610
  },
@@ -1605,9 +1616,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1605
1616
  regular: 2,
1606
1617
  overtime: 3
1607
1618
  }
1608
- }, ln = {
1619
+ }, rn = {
1609
1620
  maxHoursPerMonth: 40
1610
- }, un = {
1621
+ }, ln = {
1611
1622
  fullTime: {
1612
1623
  minHoursPerDay: null,
1613
1624
  maxHoursPerDay: 8,
@@ -1616,7 +1627,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1616
1627
  partTime: {
1617
1628
  maxHoursPerWeek: null
1618
1629
  }
1619
- }, dn = [
1630
+ }, un = [
1620
1631
  {
1621
1632
  month: 1,
1622
1633
  day: 1,
@@ -1637,7 +1648,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1637
1648
  day: 2,
1638
1649
  name: "National Day"
1639
1650
  }
1640
- ], cn = {
1651
+ ], dn = {
1641
1652
  2026: {
1642
1653
  "2026-01-01": "New Year's Day",
1643
1654
  "2026-02-16": "Tet Holiday",
@@ -1665,16 +1676,16 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
1665
1676
  "2027-09-02": "National Day",
1666
1677
  "2027-09-03": "National Day Holiday"
1667
1678
  }
1668
- }, mn = {
1669
- countryCode: on,
1670
- timezone: sn,
1671
- payRate: rn,
1672
- overtime: ln,
1673
- workingHours: un,
1674
- recurringPublicHolidays: dn,
1675
- publicHolidays: cn
1676
- }, Ue = { AE: Ga, BN: at, ID: ut, MO: vt, MV: bt, MY: Tt, PK: Ft, SG: Qt, TH: nn, VN: mn };
1677
- function yn(e) {
1679
+ }, cn = {
1680
+ countryCode: nn,
1681
+ timezone: on,
1682
+ payRate: sn,
1683
+ overtime: rn,
1684
+ workingHours: ln,
1685
+ recurringPublicHolidays: un,
1686
+ publicHolidays: dn
1687
+ }, Ue = { AE: Ka, BN: et, ID: lt, MO: ht, MV: Pt, MY: It, PK: _t, SG: jt, TH: tn, VN: cn };
1688
+ function mn(e) {
1678
1689
  if (typeof e == "string") return e.toUpperCase();
1679
1690
  if (e && typeof e == "object" && "code" in e) {
1680
1691
  const a = e.code;
@@ -1682,17 +1693,17 @@ function yn(e) {
1682
1693
  }
1683
1694
  return "MY";
1684
1695
  }
1685
- function pn(e) {
1686
- return Ue[yn(e)] ?? Ue.MY;
1696
+ function yn(e) {
1697
+ return Ue[mn(e)] ?? Ue.MY;
1687
1698
  }
1688
- function Mo(e, a) {
1689
- var o, r;
1690
- const t = (o = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : o[a];
1699
+ function So(e, a) {
1700
+ var i, r;
1701
+ const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
1691
1702
  if (t) return t;
1692
- const n = Number(a.slice(5, 7)), i = Number(a.slice(8, 10));
1693
- return ((r = e.recurringPublicHolidays.find((s) => s.month === n && s.day === i)) == null ? void 0 : r.name) ?? null;
1703
+ const n = Number(a.slice(5, 7)), s = Number(a.slice(8, 10));
1704
+ return ((r = e.recurringPublicHolidays.find((o) => o.month === n && o.day === s)) == null ? void 0 : r.name) ?? null;
1694
1705
  }
1695
- const fn = Ke(), aa = "unassigned", So = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Lo = "All Stations", Io = [{ id: aa, label: "Assigned", roles: [], system: !0 }], We = [
1706
+ const pn = Ke(), aa = "unassigned", Mo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Lo = "All Stations", Io = [{ id: aa, label: "Assigned", roles: [], system: !0 }], We = [
1696
1707
  "#903E1F",
1697
1708
  "#5F090A",
1698
1709
  "#0A5384",
@@ -1702,14 +1713,14 @@ const fn = Ke(), aa = "unassigned", So = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sa
1702
1713
  "#0F5C5C",
1703
1714
  "#6E2142"
1704
1715
  ];
1705
- function hn(e) {
1716
+ function fn(e) {
1706
1717
  var t;
1707
1718
  const a = e.trim().toLocaleLowerCase();
1708
1719
  return (t = B.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
1709
1720
  }
1710
1721
  function To(e, a) {
1711
1722
  if (e)
1712
- return { positionId: a ?? hn(e), positionName: e };
1723
+ return { positionId: a ?? fn(e), positionName: e };
1713
1724
  }
1714
1725
  function ie(e, a = B) {
1715
1726
  var t;
@@ -1719,7 +1730,7 @@ function ie(e, a = B) {
1719
1730
  function Ro(e, a = B) {
1720
1731
  var t, n;
1721
1732
  if (e)
1722
- return e.positionId ? (t = a.find((i) => i.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((i) => i.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
1733
+ return e.positionId ? (t = a.find((s) => s.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((s) => s.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
1723
1734
  }
1724
1735
  function Oo(e, a) {
1725
1736
  return a ? !B.some((t) => t.id === a) : !!e && !B.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
@@ -1734,10 +1745,10 @@ function xo(e) {
1734
1745
  function ye(e, a) {
1735
1746
  e.splice(0, e.length, ...a);
1736
1747
  }
1737
- function vn(e, a) {
1748
+ function hn(e, a) {
1738
1749
  return je(e, a) / 60;
1739
1750
  }
1740
- function gn(e) {
1751
+ function vn(e) {
1741
1752
  var t;
1742
1753
  const a = e.trim().split(/\s+/).filter(Boolean);
1743
1754
  return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
@@ -1746,7 +1757,7 @@ const ta = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map();
1746
1757
  function Yo(e) {
1747
1758
  return ta.get(e);
1748
1759
  }
1749
- function Dn(e) {
1760
+ function gn(e) {
1750
1761
  const a = Ee.get(e);
1751
1762
  if (a !== void 0) return a;
1752
1763
  const t = Xe + Ee.size + 1;
@@ -1755,24 +1766,24 @@ function Dn(e) {
1755
1766
  function Bo(e) {
1756
1767
  return e.sourceId || String(e.id);
1757
1768
  }
1758
- function wn(e) {
1759
- Ca.name = (e == null ? void 0 : e.outlet.name) ?? "", ye(Na, (e == null ? void 0 : e.positions.map((s) => s.name)) ?? []), ye(B, (e == null ? void 0 : e.positions) ?? []);
1769
+ function Dn(e) {
1770
+ Ca.name = (e == null ? void 0 : e.outlet.name) ?? "", ye(Na, (e == null ? void 0 : e.positions.map((o) => o.name)) ?? []), ye(B, (e == null ? void 0 : e.positions) ?? []);
1760
1771
  const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
1761
- for (const s of a) t[le(s.dayOfWeek)] = s.closed ? [] : s.hours;
1772
+ for (const o of a) t[le(o.dayOfWeek)] = o.closed ? [] : o.hours;
1762
1773
  ye(N.dayHours, t);
1763
- const n = a.filter((s) => !s.closed).flatMap((s) => s.hours);
1764
- N.openFrom = n.length ? n.map((s) => s.start).reduce((s, d) => d < s ? d : s) : "00:00", N.openTo = n.length ? n.map((s) => s.end).reduce((s, d) => d > s ? d : s) : "24:00", ye(
1774
+ const n = a.filter((o) => !o.closed).flatMap((o) => o.hours);
1775
+ N.openFrom = n.length ? n.map((o) => o.start).reduce((o, d) => d < o ? d : o) : "00:00", N.openTo = n.length ? n.map((o) => o.end).reduce((o, d) => d > o ? d : o) : "24:00", ye(
1765
1776
  N.closedWeekdays,
1766
- a.filter((s) => s.closed).map((s) => le(s.dayOfWeek)).sort((s, d) => s - d)
1777
+ a.filter((o) => o.closed).map((o) => le(o.dayOfWeek)).sort((o, d) => o - d)
1767
1778
  );
1768
- const i = pn(fn.currentCountry.value), o = (e == null ? void 0 : e.settings.settingsConfigured) === !0, r = o ? e.settings.payRate : i.payRate;
1769
- N.otCapHours = o ? e.settings.overtime.maxHoursPerMonth : i.overtime.maxHoursPerMonth, N.workingHours = o ? e.settings.workingHours : {
1779
+ const s = yn(pn.currentCountry.value), i = (e == null ? void 0 : e.settings.settingsConfigured) === !0, r = i ? e.settings.payRate : s.payRate;
1780
+ N.otCapHours = i ? e.settings.overtime.maxHoursPerMonth : s.overtime.maxHoursPerMonth, N.workingHours = i ? e.settings.workingHours : {
1770
1781
  minHoursPerDay: null,
1771
- maxHoursPerDay: i.workingHours.fullTime.maxHoursPerDay,
1772
- maxHoursPerWeek: i.workingHours.fullTime.maxHoursPerWeek
1782
+ maxHoursPerDay: s.workingHours.fullTime.maxHoursPerDay,
1783
+ maxHoursPerWeek: s.workingHours.fullTime.maxHoursPerWeek
1773
1784
  }, N.payRate.NORMAL.overtime = r.NORMAL.overtime, N.payRate.REST_DAY.regular = r.REST_DAY.regular, N.payRate.REST_DAY.overtime = r.REST_DAY.overtime, N.payRate.PUBLIC_HOLIDAY.regular = r.PUBLIC_HOLIDAY.regular, N.payRate.PUBLIC_HOLIDAY.overtime = r.PUBLIC_HOLIDAY.overtime;
1774
1785
  }
1775
- Te(l, wn, { immediate: !0 });
1786
+ Te(l, Dn, { immediate: !0 });
1776
1787
  function ve(e) {
1777
1788
  var a, t, n;
1778
1789
  return {
@@ -1781,7 +1792,7 @@ function ve(e) {
1781
1792
  maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? N.workingHours.maxHoursPerWeek
1782
1793
  };
1783
1794
  }
1784
- function Hn(e) {
1795
+ function wn(e) {
1785
1796
  return e.reduce(
1786
1797
  (a, t) => {
1787
1798
  const n = ve(t).maxHoursPerWeek;
@@ -1790,17 +1801,17 @@ function Hn(e) {
1790
1801
  0
1791
1802
  );
1792
1803
  }
1793
- function An(e, a) {
1804
+ function Hn(e, a) {
1794
1805
  if (e.wage.type === "HOURLY") return e.wage.amount;
1795
1806
  const t = ve(e).maxHoursPerWeek ?? a;
1796
1807
  return t ? e.wage.amount / (t * (52 / 12)) : 0;
1797
1808
  }
1798
- function En(e, a) {
1809
+ function An(e, a) {
1799
1810
  if (e.employmentType === "FULLTIME") return 100;
1800
1811
  const t = ve(e).maxHoursPerWeek;
1801
1812
  return !a || t == null ? 0 : Math.min(99, Math.round(t / a * 100));
1802
1813
  }
1803
- function Pn(e) {
1814
+ function En(e) {
1804
1815
  var a;
1805
1816
  return {
1806
1817
  start: e.startTime,
@@ -1822,10 +1833,10 @@ function Pn(e) {
1822
1833
  updatedAt: e.updatedAt
1823
1834
  };
1824
1835
  }
1825
- function bn(e) {
1836
+ function Pn(e) {
1826
1837
  return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
1827
1838
  }
1828
- function kn(e, a) {
1839
+ function bn(e, a) {
1829
1840
  if (a < e.startDate || a > e.endDate) return null;
1830
1841
  const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
1831
1842
  return {
@@ -1833,12 +1844,12 @@ function kn(e, a) {
1833
1844
  type: e.type,
1834
1845
  leaveType: e.leaveType ?? void 0,
1835
1846
  timeOff: e.status === "PENDING" ? "pending" : "approved",
1836
- reason: bn(e),
1847
+ reason: Pn(e),
1837
1848
  half: n !== "FULL_DAY",
1838
1849
  halfPart: n === "FULL_DAY" ? void 0 : n
1839
1850
  };
1840
1851
  }
1841
- function Nn(e) {
1852
+ function kn(e) {
1842
1853
  return {
1843
1854
  employeeId: e._id,
1844
1855
  name: e.name,
@@ -1849,53 +1860,53 @@ function Nn(e) {
1849
1860
  availability: []
1850
1861
  };
1851
1862
  }
1852
- function Cn(e) {
1863
+ function Nn(e) {
1853
1864
  const a = oe[m.value];
1854
1865
  return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
1855
1866
  }
1856
- function Mn(e) {
1867
+ function Cn(e) {
1857
1868
  var n;
1858
- const t = (qe.value[e] ?? ((n = re.value.find((i) => i._id === e)) == null ? void 0 : n.restaurantRole.map((i) => i.restaurantId)) ?? []).map((i) => oe[i]).filter((i) => !!i);
1859
- return t.length ? Cn([...new Set(t)]) : void 0;
1869
+ const t = (qe.value[e] ?? ((n = re.value.find((s) => s._id === e)) == null ? void 0 : n.restaurantRole.map((s) => s.restaurantId)) ?? []).map((s) => oe[s]).filter((s) => !!s);
1870
+ return t.length ? Nn([...new Set(t)]) : void 0;
1860
1871
  }
1861
1872
  function _o(e = []) {
1862
1873
  const a = l.value;
1863
1874
  if (!a) return [];
1864
- const t = new Map(a.employees.map((s) => [s.employeeId, s])), n = new Map(
1865
- F.value.map((s) => [s.employeeId, s])
1866
- ), i = re.value.filter((s) => {
1875
+ const t = new Map(a.employees.map((o) => [o.employeeId, o])), n = new Map(
1876
+ F.value.map((o) => [o.employeeId, o])
1877
+ ), s = re.value.filter((o) => {
1867
1878
  var d;
1868
- return ((d = n.get(s._id)) == null ? void 0 : d.enabled) !== !1;
1869
- }).map((s) => t.get(s._id) ?? Nn(s)), o = Hn(i), r = /* @__PURE__ */ new Map();
1870
- for (const s of a.assignments) {
1871
- const d = `${s.employeeId}|${s.date}`, p = r.get(d);
1872
- p ? p.push(s) : r.set(d, [s]);
1873
- }
1874
- return i.map((s) => {
1875
- const d = re.value.find((h) => h._id === s.employeeId) ?? {
1876
- name: s.name,
1879
+ return ((d = n.get(o._id)) == null ? void 0 : d.enabled) !== !1;
1880
+ }).map((o) => t.get(o._id) ?? kn(o)), i = wn(s), r = /* @__PURE__ */ new Map();
1881
+ for (const o of a.assignments) {
1882
+ const d = `${o.employeeId}|${o.date}`, p = r.get(d);
1883
+ p ? p.push(o) : r.set(d, [o]);
1884
+ }
1885
+ return s.map((o) => {
1886
+ const d = re.value.find((v) => v._id === o.employeeId) ?? {
1887
+ name: o.name,
1877
1888
  code: void 0,
1878
1889
  passcode: "",
1879
1890
  isMasterUser: !1
1880
- }, p = ve(s), g = Dn(s.employeeId), C = new Set(B.map((h) => h.id)), J = new Set(B.map((h) => h.name.toLocaleLowerCase())), f = (h) => h.positionId ? C.has(h.positionId) : J.has(h.positionName.toLocaleLowerCase()), A = ie(s.primaryPosition), S = !!s.primaryPosition && f(s.primaryPosition), L = s.secondaryPositions.filter(f).map((h) => ie(h)).filter((h) => !!h), Z = A ? S ? [A, ...L] : [] : L, q = [
1881
- ...A && !S ? [A] : [],
1882
- ...s.secondaryPositions.filter((h) => !f(h)).map((h) => ie(h)).filter((h) => !!h)
1883
- ], _ = Z[0] ?? "", I = e.map((h) => {
1884
- const E = j(h);
1885
- return (a.timeOff ?? []).filter((D) => D.employeeId === s.employeeId).map((D) => kn(D, E)).find((D) => D !== null) ?? null;
1886
- }), U = e.map((h) => {
1887
- const E = j(h), R = (r.get(`${s.employeeId}|${E}`) ?? []).filter(($) => $.startTime && $.endTime).map(($) => Pn($)).sort(($, ce) => $.start.localeCompare(ce.start));
1891
+ }, p = ve(o), D = gn(o.employeeId), C = new Set(B.map((v) => v.id)), J = new Set(B.map((v) => v.name.toLocaleLowerCase())), f = (v) => v.positionId ? C.has(v.positionId) : J.has(v.positionName.toLocaleLowerCase()), A = ie(o.primaryPosition), M = !!o.primaryPosition && f(o.primaryPosition), L = o.secondaryPositions.filter(f).map((v) => ie(v)).filter((v) => !!v), Z = A ? M ? [A, ...L] : [] : L, q = [
1892
+ ...A && !M ? [A] : [],
1893
+ ...o.secondaryPositions.filter((v) => !f(v)).map((v) => ie(v)).filter((v) => !!v)
1894
+ ], _ = Z[0] ?? "", I = e.map((v) => {
1895
+ const E = j(v);
1896
+ return (a.timeOff ?? []).filter((w) => w.employeeId === o.employeeId).map((w) => bn(w, E)).find((w) => w !== null) ?? null;
1897
+ }), U = e.map((v) => {
1898
+ const E = j(v), R = (r.get(`${o.employeeId}|${E}`) ?? []).filter(($) => $.startTime && $.endTime).map(($) => En($)).sort(($, ce) => $.start.localeCompare(ce.start));
1888
1899
  return R.length ? R.length === 1 ? R[0] : R : null;
1889
- }), ue = s.availability.length > 0, de = Array.from(
1900
+ }), ue = o.availability.length > 0, de = Array.from(
1890
1901
  { length: 7 },
1891
- (h, E) => ue ? s.availability.some((D) => le(D.dayOfWeek) === E) : !0
1892
- ), ge = Array.from({ length: 7 }, (h, E) => {
1893
- const D = s.availability.find((R) => le(R.dayOfWeek) === E);
1894
- return { from: (D == null ? void 0 : D.start) ?? "", to: (D == null ? void 0 : D.end) ?? "" };
1902
+ (v, E) => ue ? o.availability.some((w) => le(w.dayOfWeek) === E) : !0
1903
+ ), ge = Array.from({ length: 7 }, (v, E) => {
1904
+ const w = o.availability.find((R) => le(R.dayOfWeek) === E);
1905
+ return { from: (w == null ? void 0 : w.start) ?? "", to: (w == null ? void 0 : w.end) ?? "" };
1895
1906
  });
1896
1907
  return {
1897
- id: g,
1898
- sourceId: s.employeeId,
1908
+ id: D,
1909
+ sourceId: o.employeeId,
1899
1910
  // Employee page edits update the POS employee name. Use that as the display
1900
1911
  // source so Scheduling reflects those changes after its roster refresh.
1901
1912
  name: d.name,
@@ -1905,10 +1916,10 @@ function _o(e = []) {
1905
1916
  passcode: d.passcode || void 0,
1906
1917
  code: d.code,
1907
1918
  masterUser: d.isMasterUser,
1908
- employmentType: s.employmentType,
1919
+ employmentType: o.employmentType,
1909
1920
  role: _,
1910
- initials: gn(d.name),
1911
- color: We[(g - Xe - 1) % We.length],
1921
+ initials: vn(d.name),
1922
+ color: We[(D - Xe - 1) % We.length],
1912
1923
  // Gross hours actually rostered this week — the figure the cost rail multiplies by
1913
1924
  // the rate. Contracted hours are a separate question, answered by RULES.contract.
1914
1925
  // Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
@@ -1916,23 +1927,23 @@ function _o(e = []) {
1916
1927
  // verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
1917
1928
  weekHours: Math.round(
1918
1929
  U.reduce(
1919
- (h, E) => h + (Array.isArray(E) ? E : E && "start" in E ? [E] : []).reduce(
1920
- (D, R) => D + vn(R.start, R.end),
1930
+ (v, E) => v + (Array.isArray(E) ? E : E && "start" in E ? [E] : []).reduce(
1931
+ (w, R) => w + hn(R.start, R.end),
1921
1932
  0
1922
1933
  ),
1923
1934
  0
1924
1935
  ) * 10
1925
1936
  ) / 10,
1926
- pct: En(s, o),
1937
+ pct: An(o, i),
1927
1938
  contractHours: p.maxHoursPerWeek ?? void 0,
1928
1939
  minHoursPerDay: p.minHoursPerDay ?? void 0,
1929
1940
  // Keep the persisted override shape here. Consumers that need the effective value use
1930
1941
  // effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
1931
- workingHours: s.workingHours,
1942
+ workingHours: o.workingHours,
1932
1943
  // Every outlet the POS says this person works at, not just this one — the Add / Edit form
1933
1944
  // shows them, and saving keeps them.
1934
- locations: Mn(s.employeeId),
1935
- rate: An(s, o),
1945
+ locations: Cn(o.employeeId),
1946
+ rate: Hn(o, i),
1936
1947
  positions: Z,
1937
1948
  archivedPositions: q.length ? q : void 0,
1938
1949
  shifts: U,
@@ -1941,8 +1952,8 @@ function _o(e = []) {
1941
1952
  // part of this board's payload yet.
1942
1953
  remarks: [],
1943
1954
  section: aa,
1944
- payBasis: s.wage.type === "HOURLY" ? "hourly" : "monthly",
1945
- payAmount: s.wage.amount,
1955
+ payBasis: o.wage.type === "HOURLY" ? "hourly" : "monthly",
1956
+ payAmount: o.wage.amount,
1946
1957
  availDays: de,
1947
1958
  availHours: ge
1948
1959
  };
@@ -1952,24 +1963,24 @@ function Fo() {
1952
1963
  return [];
1953
1964
  }
1954
1965
  function Uo() {
1955
- var n, i;
1966
+ var n, s;
1956
1967
  const e = l.value, a = {}, t = {};
1957
- for (const o of (e == null ? void 0 : e.demands) ?? []) {
1958
- const r = o.date ? a[n = o.date] ?? (a[n] = []) : o.dayOfWeek !== null ? t[i = le(o.dayOfWeek)] ?? (t[i] = []) : null;
1968
+ for (const i of (e == null ? void 0 : e.demands) ?? []) {
1969
+ const r = i.date ? a[n = i.date] ?? (a[n] = []) : i.dayOfWeek !== null ? t[s = le(i.dayOfWeek)] ?? (t[s] = []) : null;
1959
1970
  if (!r) continue;
1960
- let s = r.find((d) => d.from === o.startTime && d.to === o.endTime);
1961
- s || (s = { from: o.startTime, to: o.endTime, n: 0, roles: [] }, r.push(s)), s.n += o.headcount, o.position && s.roles.push({
1962
- position: ie(o.position) ?? "",
1963
- positionId: o.position.positionId || void 0,
1964
- n: o.headcount
1971
+ let o = r.find((d) => d.from === i.startTime && d.to === i.endTime);
1972
+ o || (o = { from: i.startTime, to: i.endTime, n: 0, roles: [] }, r.push(o)), o.n += i.headcount, i.position && o.roles.push({
1973
+ position: ie(i.position) ?? "",
1974
+ positionId: i.position.positionId || void 0,
1975
+ n: i.headcount
1965
1976
  });
1966
1977
  }
1967
1978
  return { byDate: a, byWeekday: t };
1968
1979
  }
1969
1980
  function Wo() {
1970
- const e = Ke(), { restaurants: a, readRestaurants: t } = Ha(), n = Da(), i = wa(), o = P(!1), r = Y(
1981
+ const e = Ke(), { restaurants: a, readRestaurants: t } = Ha(), n = Da(), s = wa(), i = P(!1), r = Y(
1971
1982
  () => a.value.filter((f) => f.managable).map((f) => ({ value: f._id, label: f.profile.name })).sort((f, A) => f.label.localeCompare(A.label))
1972
- ), s = () => {
1983
+ ), o = () => {
1973
1984
  var f;
1974
1985
  return `hrm-schedule-outlet:${((f = e.currentBusiness.value) == null ? void 0 : f._id) ?? ""}`;
1975
1986
  }, d = Y(() => {
@@ -1977,20 +1988,20 @@ function Wo() {
1977
1988
  return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
1978
1989
  });
1979
1990
  async function p(f, A) {
1980
- return _e(f) ? (localStorage.setItem(s(), f), n.query.restaurantId !== f && i.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([Me(f), xa(A)]), !0) : !1;
1991
+ return _e(f) ? (localStorage.setItem(o(), f), n.query.restaurantId !== f && s.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([Se(f), xa(A)]), !0) : !1;
1981
1992
  }
1982
- const g = (f) => !!f && r.value.some((A) => A.value === f);
1993
+ const D = (f) => !!f && r.value.some((A) => A.value === f);
1983
1994
  async function C() {
1984
- var S;
1995
+ var M;
1985
1996
  await t(), Be.splice(0, Be.length, ...r.value.map((L) => L.label)), Object.keys(oe).forEach((L) => delete oe[L]), a.value.forEach((L) => oe[L._id] = L.profile.name);
1986
- const f = localStorage.getItem(s()) ?? "", A = [m.value, f, d.value].find(g) ?? ((S = r.value[0]) == null ? void 0 : S.value) ?? "";
1987
- return A && _e(A), o.value = !0, A;
1997
+ const f = localStorage.getItem(o()) ?? "", A = [m.value, f, d.value].find(D) ?? ((M = r.value[0]) == null ? void 0 : M.value) ?? "";
1998
+ return A && _e(A), i.value = !0, A;
1988
1999
  }
1989
2000
  async function J() {
1990
2001
  const f = await C();
1991
- return f && await Me(f), f;
2002
+ return f && await Se(f), f;
1992
2003
  }
1993
- return { options: r, ready: o, outletId: m, resolve: J, resolveOutlet: C, switchTo: p };
2004
+ return { options: r, ready: i, outletId: m, resolve: J, resolveOutlet: C, switchTo: p };
1994
2005
  }
1995
2006
  const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re({
1996
2007
  __name: "ScheduleButton",
@@ -2010,22 +2021,22 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2010
2021
  Ve(a.$slots, "default")
2011
2022
  ], 8, Sn));
2012
2023
  }
2013
- }), Ln = ["disabled", "aria-expanded"], In = { class: "fx-btn-label" }, Tn = { class: "sch" }, Rn = ["aria-multiselectable"], On = {
2024
+ }), Mn = ["disabled", "aria-expanded"], Ln = { class: "fx-btn-label" }, In = { class: "sch" }, Tn = ["aria-multiselectable"], Rn = {
2014
2025
  key: 0,
2015
2026
  class: "fx-pop-head"
2016
- }, $n = {
2027
+ }, On = {
2017
2028
  key: 1,
2018
2029
  class: "fx-pop-search"
2019
- }, xn = {
2030
+ }, $n = {
2020
2031
  key: 2,
2021
2032
  class: "fx-opt is-off"
2022
- }, Yn = {
2033
+ }, xn = {
2023
2034
  key: 0,
2024
2035
  class: "fx-grp"
2025
- }, Bn = ["aria-selected", "onClick"], _n = {
2036
+ }, Yn = ["aria-selected", "onClick"], Bn = {
2026
2037
  key: 0,
2027
2038
  class: "fx-opt-text"
2028
- }, Fn = { key: 0 }, Vo = /* @__PURE__ */ Re({
2039
+ }, _n = { key: 0 }, Vo = /* @__PURE__ */ Re({
2029
2040
  inheritAttrs: !1,
2030
2041
  __name: "ScheduleSelect",
2031
2042
  props: {
@@ -2043,9 +2054,9 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2043
2054
  },
2044
2055
  emits: ["update:modelValue", "toggle"],
2045
2056
  setup(e, { emit: a }) {
2046
- const t = e, n = a, i = ua(), o = Y(() => i.class ?? ""), r = P(!1), s = P(!1), d = P(null), p = P(null), g = P(null), C = Y(() => t.teleport !== !1 && s.value);
2057
+ const t = e, n = a, s = ua(), i = Y(() => s.class ?? ""), r = P(!1), o = P(!1), d = P(null), p = P(null), D = P(null), C = Y(() => t.teleport !== !1 && o.value);
2047
2058
  Le(() => {
2048
- s.value = typeof document < "u" && !!document.body;
2059
+ o.value = typeof document < "u" && !!document.body;
2049
2060
  });
2050
2061
  const J = Y(() => {
2051
2062
  var u, y;
@@ -2060,8 +2071,8 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2060
2071
  var y;
2061
2072
  return t.multiple ? !!((y = t.selected) != null && y.includes(u.value)) : t.selectedId != null ? u.id === t.selectedId : u.value === t.modelValue;
2062
2073
  }
2063
- const A = Y(() => !!t.menuTitle || t.options.some((u) => u.hint)), S = P(""), L = P(null), Z = Y(() => {
2064
- const u = S.value.trim().toLowerCase();
2074
+ const A = Y(() => !!t.menuTitle || t.options.some((u) => u.hint)), M = P(""), L = P(null), Z = Y(() => {
2075
+ const u = M.value.trim().toLowerCase();
2065
2076
  return !t.searchable || !u ? t.options : t.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(u));
2066
2077
  }), q = Y(() => {
2067
2078
  const u = [];
@@ -2071,63 +2082,63 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2071
2082
  return u;
2072
2083
  }), _ = 5, I = 8;
2073
2084
  function U() {
2074
- const u = g.value, y = p.value;
2085
+ const u = D.value, y = p.value;
2075
2086
  if (!u || !y) return;
2076
- const c = y.getBoundingClientRect(), M = window.innerWidth || document.documentElement.clientWidth, O = window.innerHeight || document.documentElement.clientHeight;
2077
- u.style.minWidth = `${Math.round(c.width)}px`, u.style.maxWidth = `${Math.max(180, Math.round(M - I * 2))}px`;
2087
+ const c = y.getBoundingClientRect(), S = window.innerWidth || document.documentElement.clientWidth, O = window.innerHeight || document.documentElement.clientHeight;
2088
+ u.style.minWidth = `${Math.round(c.width)}px`, u.style.maxWidth = `${Math.max(180, Math.round(S - I * 2))}px`;
2078
2089
  const ee = O - c.bottom - _ - I, ia = c.top - _ - I;
2079
2090
  u.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ee, ia)))}px`;
2080
2091
  const me = u.offsetHeight, ra = u.offsetWidth;
2081
2092
  let De = c.bottom + _;
2082
2093
  De + me > O - I && (De = c.top - _ - me >= I ? c.top - _ - me : Math.max(I, O - me - I));
2083
- const la = Math.min(Math.max(I, c.left), Math.max(I, M - ra - I));
2094
+ const la = Math.min(Math.max(I, c.left), Math.max(I, S - ra - I));
2084
2095
  u.style.top = `${Math.round(De)}px`, u.style.left = `${Math.round(la)}px`, u.style.visibility = "visible";
2085
2096
  }
2086
2097
  function ue(u) {
2087
- var c, M;
2098
+ var c, S;
2088
2099
  const y = u.target;
2089
- y && ((c = d.value) != null && c.contains(y) || (M = g.value) != null && M.contains(y)) || D();
2100
+ y && ((c = d.value) != null && c.contains(y) || (S = D.value) != null && S.contains(y)) || w();
2090
2101
  }
2091
2102
  function de(u) {
2092
- const y = g.value, c = u.target;
2103
+ const y = D.value, c = u.target;
2093
2104
  if (y && c && c !== document && y.contains(c)) return;
2094
- const M = p.value;
2095
- if (!M) return;
2096
- const O = M.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
2105
+ const S = p.value;
2106
+ if (!S) return;
2107
+ const O = S.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
2097
2108
  if (O.bottom < 0 || O.top > ee) {
2098
- D();
2109
+ w();
2099
2110
  return;
2100
2111
  }
2101
2112
  U();
2102
2113
  }
2103
2114
  function ge() {
2104
- document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize", D);
2115
+ document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize", w);
2105
2116
  }
2106
- function h() {
2107
- document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize", D);
2117
+ function v() {
2118
+ document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize", w);
2108
2119
  }
2109
2120
  async function E() {
2110
2121
  var u, y, c;
2111
- t.disabled || r.value || (S.value = "", r.value = !0, await Pe(), U(), (u = L.value) == null || u.focus(), (c = (y = g.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), ge());
2122
+ t.disabled || r.value || (M.value = "", r.value = !0, await Pe(), U(), (u = L.value) == null || u.focus(), (c = (y = D.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), ge());
2112
2123
  }
2113
- function D() {
2114
- r.value && (r.value = !1, S.value = "", h());
2124
+ function w() {
2125
+ r.value && (r.value = !1, M.value = "", v());
2115
2126
  }
2116
- Te(S, async () => {
2127
+ Te(M, async () => {
2117
2128
  r.value && (await Pe(), U());
2118
2129
  });
2119
2130
  function R(u) {
2120
2131
  var y;
2121
2132
  if (u.key === "Escape")
2122
- u.preventDefault(), D(), (y = p.value) == null || y.focus();
2133
+ u.preventDefault(), w(), (y = p.value) == null || y.focus();
2123
2134
  else if (u.key === "Enter") {
2124
2135
  u.preventDefault();
2125
- const c = Z.value.find((M) => !M.disabled);
2136
+ const c = Z.value.find((S) => !S.disabled);
2126
2137
  c && ce(c);
2127
2138
  }
2128
2139
  }
2129
2140
  function $() {
2130
- r.value ? D() : E();
2141
+ r.value ? w() : E();
2131
2142
  }
2132
2143
  function ce(u) {
2133
2144
  if (!u.disabled) {
@@ -2135,7 +2146,7 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2135
2146
  n("toggle", u.value);
2136
2147
  return;
2137
2148
  }
2138
- if (D(), t.multiple) {
2149
+ if (w(), t.multiple) {
2139
2150
  n("update:modelValue", u.value);
2140
2151
  return;
2141
2152
  }
@@ -2149,14 +2160,14 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2149
2160
  E();
2150
2161
  return;
2151
2162
  }
2152
- const c = y.findIndex((ee) => ee.value === t.modelValue), M = u === "Home" ? 0 : u === "End" ? y.length - 1 : u === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), O = y[M];
2163
+ const c = y.findIndex((ee) => ee.value === t.modelValue), S = u === "Home" ? 0 : u === "End" ? y.length - 1 : u === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), O = y[S];
2153
2164
  O && O.value !== t.modelValue ? n("update:modelValue", O.value) : E();
2154
2165
  }
2155
2166
  function sa(u) {
2156
2167
  var y;
2157
2168
  if (u.key === "Escape") {
2158
2169
  if (!r.value) return;
2159
- u.preventDefault(), D(), (y = p.value) == null || y.focus();
2170
+ u.preventDefault(), w(), (y = p.value) == null || y.focus();
2160
2171
  return;
2161
2172
  }
2162
2173
  if (u.key === "Enter" || u.key === " ") {
@@ -2165,10 +2176,10 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2165
2176
  }
2166
2177
  u.key !== "ArrowDown" && u.key !== "ArrowUp" && u.key !== "Home" && u.key !== "End" || (u.preventDefault(), oa(u.key));
2167
2178
  }
2168
- return Ie(h), (u, y) => (b(), k("div", {
2179
+ return Ie(v), (u, y) => (b(), k("div", {
2169
2180
  ref_key: "rootEl",
2170
2181
  ref: d,
2171
- class: pe(["fx-sel", o.value])
2182
+ class: pe(["fx-sel", i.value])
2172
2183
  }, [
2173
2184
  x("button", ca({
2174
2185
  ref_key: "btnEl",
@@ -2182,28 +2193,28 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2182
2193
  onClick: y[0] || (y[0] = (c) => $()),
2183
2194
  onKeydown: sa
2184
2195
  }), [
2185
- x("span", In, W(J.value), 1)
2186
- ], 16, Ln),
2196
+ x("span", Ln, W(J.value), 1)
2197
+ ], 16, Mn),
2187
2198
  (b(), da(ma, {
2188
2199
  to: "body",
2189
2200
  disabled: !C.value
2190
2201
  }, [
2191
- x("div", Tn, [
2202
+ x("div", In, [
2192
2203
  r.value ? (b(), k("div", {
2193
2204
  key: 0,
2194
2205
  ref_key: "popEl",
2195
- ref: g,
2206
+ ref: D,
2196
2207
  class: pe(["fx-pop", { "fx-pop-rich": A.value }]),
2197
2208
  role: "listbox",
2198
2209
  "aria-multiselectable": e.multiple || void 0,
2199
2210
  style: { visibility: "hidden" }
2200
2211
  }, [
2201
- e.menuTitle ? (b(), k("div", On, W(e.menuTitle), 1)) : z("", !0),
2202
- e.searchable ? (b(), k("div", $n, [
2212
+ e.menuTitle ? (b(), k("div", Rn, W(e.menuTitle), 1)) : z("", !0),
2213
+ e.searchable ? (b(), k("div", On, [
2203
2214
  ya(x("input", {
2204
2215
  ref_key: "searchEl",
2205
2216
  ref: L,
2206
- "onUpdate:modelValue": y[1] || (y[1] = (c) => S.value = c),
2217
+ "onUpdate:modelValue": y[1] || (y[1] = (c) => M.value = c),
2207
2218
  class: "sch-input fx-pop-q",
2208
2219
  type: "search",
2209
2220
  placeholder: "Search",
@@ -2212,14 +2223,14 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2212
2223
  "aria-label": "Search",
2213
2224
  onKeydown: R
2214
2225
  }, null, 544), [
2215
- [pa, S.value]
2226
+ [pa, M.value]
2216
2227
  ])
2217
2228
  ])) : z("", !0),
2218
- e.searchable && !q.value.length ? (b(), k("div", xn, "No matches")) : z("", !0),
2229
+ e.searchable && !q.value.length ? (b(), k("div", $n, "No matches")) : z("", !0),
2219
2230
  (b(!0), k(He, null, fa(q.value, (c) => (b(), k(He, {
2220
2231
  key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
2221
2232
  }, [
2222
- "heading" in c ? (b(), k("div", Yn, W(c.heading), 1)) : (b(), k("div", {
2233
+ "heading" in c ? (b(), k("div", xn, W(c.heading), 1)) : (b(), k("div", {
2223
2234
  key: 1,
2224
2235
  class: pe(["fx-opt", {
2225
2236
  "is-on": f(c.option),
@@ -2228,7 +2239,7 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2228
2239
  }]),
2229
2240
  role: "option",
2230
2241
  "aria-selected": f(c.option),
2231
- onClick: (M) => ce(c.option)
2242
+ onClick: (S) => ce(c.option)
2232
2243
  }, [
2233
2244
  y[2] || (y[2] = x("span", {
2234
2245
  class: "fx-tick",
@@ -2249,20 +2260,20 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2249
2260
  })
2250
2261
  ])
2251
2262
  ], -1)),
2252
- A.value ? (b(), k("span", _n, [
2263
+ A.value ? (b(), k("span", Bn, [
2253
2264
  x("b", null, W(c.option.label), 1),
2254
- c.option.hint ? (b(), k("small", Fn, W(c.option.hint), 1)) : z("", !0)
2265
+ c.option.hint ? (b(), k("small", _n, W(c.option.hint), 1)) : z("", !0)
2255
2266
  ])) : (b(), k(He, { key: 1 }, [
2256
2267
  ha(W(c.option.label), 1)
2257
2268
  ], 64))
2258
- ], 10, Bn))
2269
+ ], 10, Yn))
2259
2270
  ], 64))), 128))
2260
- ], 10, Rn)) : z("", !0)
2271
+ ], 10, Tn)) : z("", !0)
2261
2272
  ])
2262
2273
  ], 8, ["disabled"]))
2263
2274
  ], 2));
2264
2275
  }
2265
- }), Un = ["id", "aria-labelledby", "aria-label"], ze = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', Ko = /* @__PURE__ */ Re({
2276
+ }), Fn = ["id", "aria-labelledby", "aria-label"], ze = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', Ko = /* @__PURE__ */ Re({
2266
2277
  __name: "ScheduleModal",
2267
2278
  props: {
2268
2279
  open: { type: Boolean },
@@ -2274,43 +2285,43 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2274
2285
  },
2275
2286
  emits: ["close"],
2276
2287
  setup(e, { emit: a }) {
2277
- const t = e, n = a, i = P(null);
2278
- let o = null;
2288
+ const t = e, n = a, s = P(null);
2289
+ let i = null;
2279
2290
  function r() {
2280
2291
  Pe(() => {
2281
- const d = i.value;
2292
+ const d = s.value;
2282
2293
  d && (d.querySelector(ze) ?? d).focus();
2283
2294
  });
2284
2295
  }
2285
- function s(d) {
2296
+ function o(d) {
2286
2297
  if (!t.open) return;
2287
2298
  if (d.key === "Escape") {
2288
2299
  d.preventDefault(), n("close");
2289
2300
  return;
2290
2301
  }
2291
- if (d.key !== "Tab" || !i.value) return;
2292
- const p = Array.from(i.value.querySelectorAll(ze));
2302
+ if (d.key !== "Tab" || !s.value) return;
2303
+ const p = Array.from(s.value.querySelectorAll(ze));
2293
2304
  if (!p.length) return;
2294
- const g = p[0], C = p[p.length - 1];
2295
- d.shiftKey && document.activeElement === g ? (d.preventDefault(), C.focus()) : !d.shiftKey && document.activeElement === C && (d.preventDefault(), g.focus());
2305
+ const D = p[0], C = p[p.length - 1];
2306
+ d.shiftKey && document.activeElement === D ? (d.preventDefault(), C.focus()) : !d.shiftKey && document.activeElement === C && (d.preventDefault(), D.focus());
2296
2307
  }
2297
2308
  return Te(
2298
2309
  () => t.open,
2299
2310
  (d) => {
2300
- d ? (o = document.activeElement instanceof HTMLElement ? document.activeElement : null, r()) : (o == null || o.focus(), o = null);
2311
+ d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null, r()) : (i == null || i.focus(), i = null);
2301
2312
  },
2302
2313
  { immediate: !0 }
2303
- ), Le(() => document.addEventListener("keydown", s)), Ie(() => {
2304
- document.removeEventListener("keydown", s), o = null;
2314
+ ), Le(() => document.addEventListener("keydown", o)), Ie(() => {
2315
+ document.removeEventListener("keydown", o), i = null;
2305
2316
  }), (d, p) => e.open ? (b(), k("div", {
2306
2317
  key: 0,
2307
2318
  class: "modal-overlay open",
2308
- onClick: p[0] || (p[0] = va((g) => n("close"), ["self"]))
2319
+ onClick: p[0] || (p[0] = va((D) => n("close"), ["self"]))
2309
2320
  }, [
2310
2321
  x("div", {
2311
2322
  id: e.id,
2312
2323
  ref_key: "panel",
2313
- ref: i,
2324
+ ref: s,
2314
2325
  class: pe(["schedule-modal-panel", e.panelClass]),
2315
2326
  style: ga(e.panelStyle),
2316
2327
  role: "dialog",
@@ -2320,21 +2331,21 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2320
2331
  tabindex: "-1"
2321
2332
  }, [
2322
2333
  Ve(d.$slots, "default")
2323
- ], 14, Un)
2334
+ ], 14, Fn)
2324
2335
  ])) : z("", !0);
2325
2336
  }
2326
2337
  });
2327
2338
  export {
2328
2339
  H as $,
2329
2340
  Lo as A,
2330
- Jn as B,
2331
- ao as C,
2341
+ Xn as B,
2342
+ eo as C,
2332
2343
  se as D,
2333
2344
  je as E,
2334
2345
  ke as F,
2335
2346
  ba as G,
2336
- no as H,
2337
- yo as I,
2347
+ to as H,
2348
+ mo as I,
2338
2349
  Oo as J,
2339
2350
  Ea as K,
2340
2351
  No as L,
@@ -2342,78 +2353,78 @@ export {
2342
2353
  bo as N,
2343
2354
  Ze as O,
2344
2355
  Na as P,
2345
- io as Q,
2346
- eo as R,
2356
+ so as Q,
2357
+ qn as R,
2347
2358
  Io as S,
2348
2359
  F as T,
2349
2360
  aa as U,
2350
2361
  Ia as V,
2351
- So as W,
2362
+ Mo as W,
2352
2363
  Be as X,
2353
2364
  xo as Y,
2354
- to as Z,
2365
+ ao as Z,
2355
2366
  K as _,
2356
2367
  _o as a,
2357
2368
  le as a0,
2358
2369
  ie as a1,
2359
- Cn as a2,
2370
+ Nn as a2,
2360
2371
  oe as a3,
2361
- lo as a4,
2362
- co as a5,
2363
- Se as a6,
2364
- ro as a7,
2372
+ ro as a4,
2373
+ uo as a5,
2374
+ Me as a6,
2375
+ io as a7,
2365
2376
  Ta as a8,
2366
- mo as a9,
2367
- fo as aA,
2368
- Dn as aa,
2377
+ co as a9,
2378
+ po as aA,
2379
+ gn as aa,
2369
2380
  j as ab,
2370
- Ao as ac,
2371
- wo as ad,
2372
- Ho as ae,
2381
+ wo as ac,
2382
+ go as ad,
2383
+ Do as ae,
2373
2384
  $o as af,
2374
2385
  xa as ag,
2375
- Do as ah,
2386
+ Ao as ah,
2376
2387
  Ca as ai,
2377
- Xn as aj,
2378
- Ba as ak,
2388
+ Qn as aj,
2389
+ vo as ak,
2379
2390
  xe as al,
2380
2391
  Uo as am,
2381
- go as an,
2382
- Ye as ao,
2383
- fe as ap,
2384
- Me as aq,
2392
+ Ye as an,
2393
+ fe as ao,
2394
+ Se as ap,
2395
+ Eo as aq,
2385
2396
  zo as ar,
2386
2397
  Vo as as,
2387
2398
  Ko as at,
2388
2399
  B as au,
2389
- Qn as av,
2400
+ jn as av,
2390
2401
  Wo as aw,
2391
- ho as ax,
2392
- po as ay,
2402
+ fo as ax,
2403
+ yo as ay,
2393
2404
  re as az,
2394
2405
  N as b,
2395
2406
  Fo as c,
2396
2407
  G as d,
2397
2408
  To as e,
2398
- Zn as f,
2399
- pn as g,
2400
- Mo as h,
2401
- Sa as i,
2402
- vo as j,
2409
+ Jn as f,
2410
+ yn as g,
2411
+ So as h,
2412
+ Ma as i,
2413
+ ho as j,
2403
2414
  Yo as k,
2404
- Eo as l,
2415
+ Ho as l,
2405
2416
  Po as m,
2406
2417
  Co as n,
2407
2418
  m as o,
2408
2419
  l as p,
2409
2420
  Ce as q,
2410
- uo as r,
2421
+ lo as r,
2411
2422
  Pa as s,
2412
- so as t,
2423
+ oo as t,
2413
2424
  Ro as u,
2414
2425
  Ne as v,
2415
- oo as w,
2416
- hn as x,
2417
- qn as y,
2426
+ no as w,
2427
+ fn as x,
2428
+ Zn as y,
2418
2429
  Bo as z
2419
2430
  };