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

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 (48) hide show
  1. package/dist/{ApprovalCodeList-CQp5AXmP.js → ApprovalCodeList-B10IvyLu.js} +4 -4
  2. package/dist/{AuditLogList-CBOp_hDR.js → AuditLogList-BJ8GXIzu.js} +4 -4
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-_2_usHCJ.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DfXqKPnU.js} +2 -2
  4. package/dist/{EmployeeList-1vR0zMMp.js → EmployeeList-CNj262HG.js} +6 -6
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-NR_aWS7l.js → FormItem.vue_vue_type_script_setup_true_lang-BvSLGM1C.js} +1 -1
  6. package/dist/{GrantUserList-CmeAG1Gy.js → GrantUserList-R259wy0R.js} +5 -5
  7. package/dist/{Main-BUTiZtwj.js → Main-DLgW7BX_.js} +2 -2
  8. package/dist/{Main-DTAb8QWQ.js → Main-DZ5T4TP1.js} +9 -9
  9. package/dist/{Main-DLh6VmQX.js → Main-yUEWFlC3.js} +5 -5
  10. package/dist/{PermissionSetList-BtaX2k3V.js → PermissionSetList-Xrzkx52n.js} +5 -5
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B6dR75q1.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BhR3MM-s.js} +732 -732
  12. package/dist/{RoleList-Qyyi7w2u.js → RoleList-RRDkrVmu.js} +7 -7
  13. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-EPVMITc0.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BhkmMQxt.js} +1 -1
  14. package/dist/{ScheduleGeneralPage-CjZ8OFnN.js → ScheduleGeneralPage-CfcIh0Fy.js} +2 -2
  15. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-KOLBDv21.js → ScheduleModal.vue_vue_type_script_setup_true_lang-WYuVJxed.js} +211 -206
  16. package/dist/SchedulePage-CHu1VI-U.js +19201 -0
  17. package/dist/{SchedulePositionPage-Cu6rRBlZ.js → SchedulePositionPage-Dx2fZ1QI.js} +27 -27
  18. package/dist/{SelectFilter-D58Vrs_W.js → SelectFilter-DoeKbbjT.js} +1 -1
  19. package/dist/{TeamMemberList-CC_okKtX.js → TeamMemberList-CPpBsvi7.js} +7 -7
  20. package/dist/{TimesheetList-ULjiy1OT.js → TimesheetList-CWl2faUZ.js} +6 -6
  21. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D9xXvYuA.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dc0_djRp.js} +2 -2
  22. package/dist/{app-COD0IHk1.js → app-COWpQb6i.js} +8 -8
  23. package/dist/app.js +1 -1
  24. package/dist/{dayjs.min-jNfjc_8X.js → dayjs.min-Dv2S110T.js} +1 -1
  25. package/dist/{employee-Db1gyZQZ.js → employee-Drs22uVf.js} +3 -3
  26. package/dist/{iteration-z1uPD-7T.js → iteration-B23jisFZ.js} +1 -1
  27. package/dist/{lodash-uwLYB3oL.js → lodash-CQM_jgZN.js} +1 -1
  28. package/dist/{role-BhO6Cl-l.js → role-k4mdt-op.js} +1 -1
  29. package/dist/{rule-BZ340_dr.js → rule-xOAXApqp.js} +2 -2
  30. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +4 -2
  31. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +1 -0
  32. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +5 -0
  33. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +5 -0
  34. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +3 -0
  35. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +0 -1
  36. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +1 -0
  37. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +2 -1
  38. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +14 -0
  39. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +1 -1
  40. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +2 -1
  41. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +1 -0
  42. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +3 -1
  43. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +6 -1
  44. package/dist/style.css +1 -1
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/{useReportPermissions-BjkeMcNA.js → useReportPermissions-BB4JiYDf.js} +3 -3
  47. package/package.json +1 -1
  48. package/dist/SchedulePage-BWpgAx3a.js +0 -18831
@@ -1,9 +1,9 @@
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";
1
+ import { onMounted as Le, onBeforeUnmount as Ie, ref as E, reactive as I, shallowRef as we, watch as Te, computed as B, defineComponent as Re, createElementBlock as k, openBlock as b, renderSlot as Ve, useAttrs as ua, nextTick as Pe, normalizeClass as pe, createElementVNode as Y, createBlock as da, mergeProps as ca, toDisplayString as V, Teleport as ma, createCommentVNode as K, 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
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";
5
+ import { E as be, u as Ge } from "./employee-Drs22uVf.js";
6
+ import { t as Oe, q as Aa } from "./rule-xOAXApqp.js";
7
7
  function jn(e) {
8
8
  let a = null;
9
9
  function t() {
@@ -271,28 +271,28 @@ const te = 500, ka = 10, $e = 6, Zn = 1500, Xe = 1e6, H = {
271
271
  }
272
272
  }, Je = {
273
273
  payload: we(null),
274
- loading: P(!1),
275
- rosterLoading: P(!1),
276
- loadError: P(null),
277
- scheduleSetupCompleted: P(!1),
278
- dataVersion: P(0),
279
- outletId: P(""),
280
- restaurantEmployees: P([]),
281
- employeeConfigs: P([]),
274
+ loading: E(!1),
275
+ rosterLoading: E(!1),
276
+ loadError: E(null),
277
+ scheduleSetupCompleted: E(!1),
278
+ dataVersion: E(0),
279
+ outletId: E(""),
280
+ restaurantEmployees: E([]),
281
+ employeeConfigs: E([]),
282
282
  employeeOutletIds: we({}),
283
283
  businessEmployees: we([]),
284
- positions: T([]),
285
- positionRecords: T([]),
286
- rolePositions: T({}),
287
- outlet: T({ name: "" }),
288
- locationOptions: T([]),
289
- locationLabelById: T({}),
290
- departmentOptions: T([]),
291
- compensationGroupOptions: T([]),
292
- compensationGroupMeta: T({}),
293
- existingStaff: T([]),
294
- shiftTemplates: T([]),
295
- rules: T({
284
+ positions: I([]),
285
+ positionRecords: I([]),
286
+ rolePositions: I({}),
287
+ outlet: I({ name: "" }),
288
+ locationOptions: I([]),
289
+ locationLabelById: I({}),
290
+ departmentOptions: I([]),
291
+ compensationGroupOptions: I([]),
292
+ compensationGroupMeta: I({}),
293
+ existingStaff: I([]),
294
+ shiftTemplates: I([]),
295
+ rules: I({
296
296
  coverage: {},
297
297
  openFrom: "00:00",
298
298
  openTo: "24:00",
@@ -327,16 +327,16 @@ const te = 500, ka = 10, $e = 6, Zn = 1500, Xe = 1e6, H = {
327
327
  rosterLoading: Ye,
328
328
  loadError: fe,
329
329
  scheduleSetupCompleted: Ze,
330
- dataVersion: G,
330
+ dataVersion: Q,
331
331
  outletId: m,
332
332
  restaurantEmployees: re,
333
- employeeConfigs: F,
333
+ employeeConfigs: W,
334
334
  employeeOutletIds: qe,
335
335
  businessEmployees: Ae,
336
336
  positions: Na,
337
- positionRecords: B,
337
+ positionRecords: F,
338
338
  rolePositions: qn,
339
- outlet: Ca,
339
+ outlet: Sa,
340
340
  locationOptions: Be,
341
341
  locationLabelById: oe,
342
342
  compensationGroupMeta: eo,
@@ -344,7 +344,7 @@ const te = 500, ka = 10, $e = 6, Zn = 1500, Xe = 1e6, H = {
344
344
  shiftTemplates: to,
345
345
  rules: N
346
346
  } = Je;
347
- function Sa() {
347
+ function Ca() {
348
348
  const e = Je.rules;
349
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 = {
350
350
  minHoursPerDay: null,
@@ -366,24 +366,24 @@ function se(e, a) {
366
366
  const t = new Date(e);
367
367
  return t.setDate(t.getDate() + a), t;
368
368
  }
369
- function Ce(e) {
369
+ function Se(e) {
370
370
  const a = new Date(e);
371
371
  return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
372
372
  }
373
373
  function no(e, a = /* @__PURE__ */ new Date()) {
374
- const t = se(Ce(a), e * Ne);
374
+ const t = se(Se(a), e * Ne);
375
375
  return Array.from({ length: Ne }, (n, s) => se(t, s));
376
376
  }
377
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));
378
+ const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Se(e)), s = t(Se(a));
379
379
  return Math.trunc((s - n) / (Ne * 24 * 60 * 60 * 1e3));
380
380
  }
381
- const j = Ma;
382
- let Q = null, X = null, V = null, ne = 0, he = null;
381
+ const X = Ma;
382
+ let J = null, Z = null, G = null, ne = 0, he = null;
383
383
  function _e(e) {
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);
384
+ return e === m.value ? !1 : (Ca(), m.value = e, l.value = null, J = null, Z = null, fe.value = null, he = null, Ze.value = !1, re.value = [], W.value = [], G = null, ne += 1, Q.value += 1, !0);
385
385
  }
386
- async function Se(e) {
386
+ async function Ce(e) {
387
387
  if (!(!e || he === e)) {
388
388
  Ye.value = !0;
389
389
  try {
@@ -399,15 +399,15 @@ async function La(e) {
399
399
  offset: 0,
400
400
  restaurantIds: [e]
401
401
  });
402
- e === m.value && (re.value = a.items, F.value = await H.listEmployeeConfigs(e), he = e, G.value += 1, $a().then((t) => {
403
- e === m.value && (qe.value = t, G.value += 1);
402
+ e === m.value && (re.value = a.items, W.value = await H.listEmployeeConfigs(e), he = e, Q.value += 1, $a().then((t) => {
403
+ e === m.value && (qe.value = t, Q.value += 1);
404
404
  }));
405
405
  }
406
406
  async function Ia(e) {
407
407
  const a = m.value;
408
408
  if (!a || !e.length) return;
409
409
  const t = await H.saveEmployeeConfigs(a, { configs: e });
410
- F.value = t, G.value += 1;
410
+ W.value = t, Q.value += 1;
411
411
  }
412
412
  async function so(e) {
413
413
  const a = m.value;
@@ -416,9 +416,9 @@ async function so(e) {
416
416
  return m.value === a && l.value && (l.value = { ...l.value, settings: t }), t;
417
417
  }
418
418
  async function Ta(e, a) {
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(
419
+ const t = W.value.find((s) => s.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && W.value.some((s) => s.displayOrder !== null) ? Math.max(
420
420
  0,
421
- ...F.value.filter(
421
+ ...W.value.filter(
422
422
  (s) => s.displayOrder !== null
423
423
  ).map((s) => s.displayOrder)
424
424
  ) + 100 : null);
@@ -426,10 +426,10 @@ async function Ta(e, a) {
426
426
  }
427
427
  async function Me() {
428
428
  const e = m.value;
429
- e && (he = null, await Se(e));
429
+ e && (he = null, await Ce(e));
430
430
  }
431
431
  async function Ra(e, a) {
432
- const t = Ge(), n = (await K(!0)).find((o) => o._id === e);
432
+ const t = Ge(), n = (await j(!0)).find((o) => o._id === e);
433
433
  if (!n) throw new Error("Could not find this employee");
434
434
  const s = n.restaurantRole.map((o) => ({
435
435
  restaurantId: o.restaurantId,
@@ -447,7 +447,7 @@ async function Ra(e, a) {
447
447
  user: { name: n.name, passcode: n.passcode },
448
448
  roles: i,
449
449
  previousRoles: s
450
- }), await K(!0);
450
+ }), await j(!0);
451
451
  }
452
452
  async function io(e, a, t = "", n = !0) {
453
453
  const s = [...new Set(a.filter(Boolean))];
@@ -457,18 +457,18 @@ async function io(e, a, t = "", n = !0) {
457
457
  ]), n && m.value && s.includes(m.value) && await Ta(e, !0), await Me());
458
458
  }
459
459
  async function ro(e, a) {
460
- const t = Ge(), n = (await K(!0)).find(
461
- (p) => p._id === e
460
+ const t = Ge(), n = (await j(!0)).find(
461
+ (f) => f._id === e
462
462
  );
463
463
  if (!n) throw new Error("Could not find this employee");
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;
464
+ const s = (f) => f.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
465
  if (!i && !r) return;
466
- const o = n.restaurantRole.map((p) => ({
467
- restaurantId: p.restaurantId,
468
- roleId: p.roleId
469
- })), d = n.isMasterUser ? (await Oe.readTeamMembers()).find((p) => p.doc.posUserId === e) : void 0;
466
+ const o = n.restaurantRole.map((f) => ({
467
+ restaurantId: f.restaurantId,
468
+ roleId: f.roleId
469
+ })), d = n.isMasterUser ? (await Oe.readTeamMembers()).find((f) => f.doc.posUserId === e) : void 0;
470
470
  if (d) {
471
- const p = Aa(), D = p.getPermissionAssignmentByUserId(d.id) ?? await p.readPermissionAssignmentByUserId(d.id), C = a.masterUser ? {
471
+ const f = Aa(), D = f.getPermissionAssignmentByUserId(d.id) ?? await f.readPermissionAssignmentByUserId(d.id), C = a.masterUser ? {
472
472
  code: a.masterCode,
473
473
  name: a.name,
474
474
  passcode: a.passcode,
@@ -479,16 +479,16 @@ async function ro(e, a) {
479
479
  customPermissions: (D == null ? void 0 : D.customPermissions) ?? d.permissions,
480
480
  permissionSetIds: (D == null ? void 0 : D.permissionSetIds) ?? d.doc.permissionSetIds ?? [],
481
481
  posUser: C
482
- }), await K(!0), await Me();
482
+ }), await j(!0), await Me();
483
483
  return;
484
484
  }
485
485
  if (a.masterUser) {
486
- const p = {
486
+ const f = {
487
487
  user: { name: a.name, passcode: a.passcode, code: a.masterCode },
488
488
  roles: a.roles,
489
489
  previousRoles: o
490
490
  };
491
- n.isMasterUser ? await t.updateMasterEmployee(e, p) : await t.migrateToMasterUser(e, p);
491
+ n.isMasterUser ? await t.updateMasterEmployee(e, f) : await t.migrateToMasterUser(e, f);
492
492
  } else
493
493
  n.isMasterUser ? await t.updateMasterEmployee(e, {
494
494
  user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
@@ -499,7 +499,7 @@ async function ro(e, a) {
499
499
  roles: a.roles,
500
500
  previousRoles: o
501
501
  });
502
- await K(!0), await Me();
502
+ await j(!0), await Me();
503
503
  }
504
504
  let ae = null;
505
505
  async function Oa() {
@@ -519,7 +519,7 @@ async function Oa() {
519
519
  );
520
520
  return [...e.items, ...t.flatMap((n) => n.items)];
521
521
  }
522
- function K(e = !1) {
522
+ function j(e = !1) {
523
523
  if (!e) {
524
524
  if (ae) return ae;
525
525
  if (Ae.value.length) return Promise.resolve(Ae.value);
@@ -532,7 +532,7 @@ function K(e = !1) {
532
532
  async function $a() {
533
533
  const e = {};
534
534
  try {
535
- (await K()).forEach((a) => {
535
+ (await j()).forEach((a) => {
536
536
  e[a._id] = [...new Set(a.restaurantRole.map((t) => t.restaurantId))];
537
537
  });
538
538
  } catch {
@@ -541,22 +541,22 @@ async function $a() {
541
541
  return e;
542
542
  }
543
543
  function Fe(e, a) {
544
- return Q !== null && X !== null && Q <= e && X >= a;
544
+ return J !== null && Z !== null && J <= e && Z >= a;
545
545
  }
546
546
  async function xa(e) {
547
- const a = j(e), t = j(se(e, 6));
548
- Fe(a, t) || V && (await V, Fe(a, t)) || await ea(
547
+ const a = X(e), t = X(se(e, 6));
548
+ Fe(a, t) || G && (await G, Fe(a, t)) || await ea(
549
549
  se(e, -7 * $e),
550
550
  se(e, 7 * $e)
551
551
  );
552
552
  }
553
553
  async function lo() {
554
- !Q || !X || await ea(/* @__PURE__ */ new Date(`${Q}T00:00:00`), /* @__PURE__ */ new Date(`${X}T00:00:00`));
554
+ !J || !Z || await ea(/* @__PURE__ */ new Date(`${J}T00:00:00`), /* @__PURE__ */ new Date(`${Z}T00:00:00`));
555
555
  }
556
556
  async function uo(e) {
557
557
  if (!m.value) throw new Error("No outlet selected");
558
558
  const a = await H.createEmployeeProfile(m.value, e);
559
- l.value && (l.value.employees.push(a), G.value += 1);
559
+ l.value && (l.value.employees.push(a), Q.value += 1);
560
560
  }
561
561
  async function co(e) {
562
562
  await H.validatePosAccess(e);
@@ -716,7 +716,7 @@ async function No(e) {
716
716
  timeOff: l.value.timeOff.filter((a) => a.id !== e)
717
717
  });
718
718
  }
719
- async function Co(e) {
719
+ async function So(e) {
720
720
  if (!m.value) throw new Error("No outlet selected");
721
721
  const a = await H.bulkUpdateAssignmentStatus(m.value, e);
722
722
  if (l.value && a.length) {
@@ -736,13 +736,13 @@ async function ea(e, a) {
736
736
  fe.value = "No outlet selected";
737
737
  return;
738
738
  }
739
- const n = j(e), s = j(a), i = ++ne;
739
+ const n = X(e), s = X(a), i = ++ne;
740
740
  xe.value = !0, fe.value = null;
741
741
  const r = (async () => {
742
742
  try {
743
743
  const o = await H.readBoard(t, n, s);
744
744
  if (m.value !== t || i !== ne) return;
745
- l.value = o, Ze.value = o.settings.setupCompleted, Q = n, X = s, G.value += 1;
745
+ l.value = o, Ze.value = o.settings.setupCompleted, J = n, Z = s, Q.value += 1;
746
746
  } catch (o) {
747
747
  if (m.value !== t || i !== ne) return;
748
748
  fe.value = o instanceof Error ? o.message : "Could not load the schedule";
@@ -750,11 +750,11 @@ async function ea(e, a) {
750
750
  m.value === t && i === ne && (xe.value = !1);
751
751
  }
752
752
  })();
753
- V = r;
753
+ G = r;
754
754
  try {
755
755
  await r;
756
756
  } finally {
757
- V === r && (V = null);
757
+ G === r && (G = null);
758
758
  }
759
759
  }
760
760
  const Ba = "AE", _a = "Asia/Dubai", Fa = {
@@ -1234,9 +1234,9 @@ const Ba = "AE", _a = "Asia/Dubai", Fa = {
1234
1234
  regular: 2,
1235
1235
  overtime: 3
1236
1236
  }
1237
- }, Ct = {
1238
- maxHoursPerMonth: 104
1239
1237
  }, St = {
1238
+ maxHoursPerMonth: 104
1239
+ }, Ct = {
1240
1240
  fullTime: {
1241
1241
  minHoursPerDay: null,
1242
1242
  maxHoursPerDay: 8,
@@ -1313,8 +1313,8 @@ const Ba = "AE", _a = "Asia/Dubai", Fa = {
1313
1313
  countryCode: bt,
1314
1314
  timezone: kt,
1315
1315
  payRate: Nt,
1316
- overtime: Ct,
1317
- workingHours: St,
1316
+ overtime: St,
1317
+ workingHours: Ct,
1318
1318
  recurringPublicHolidays: Mt,
1319
1319
  publicHolidays: Lt
1320
1320
  }, Tt = "PK", Rt = "Asia/Karachi", Ot = {
@@ -1696,7 +1696,7 @@ function mn(e) {
1696
1696
  function yn(e) {
1697
1697
  return Ue[mn(e)] ?? Ue.MY;
1698
1698
  }
1699
- function So(e, a) {
1699
+ function Co(e, a) {
1700
1700
  var i, r;
1701
1701
  const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
1702
1702
  if (t) return t;
@@ -1716,24 +1716,24 @@ const pn = Ke(), aa = "unassigned", Mo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sa
1716
1716
  function fn(e) {
1717
1717
  var t;
1718
1718
  const a = e.trim().toLocaleLowerCase();
1719
- return (t = B.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
1719
+ return (t = F.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
1720
1720
  }
1721
1721
  function To(e, a) {
1722
1722
  if (e)
1723
1723
  return { positionId: a ?? fn(e), positionName: e };
1724
1724
  }
1725
- function ie(e, a = B) {
1725
+ function ie(e, a = F) {
1726
1726
  var t;
1727
1727
  if (e)
1728
1728
  return (e.positionId && ((t = a.find((n) => n.id === e.positionId)) == null ? void 0 : t.name)) ?? e.positionName;
1729
1729
  }
1730
- function Ro(e, a = B) {
1730
+ function Ro(e, a = F) {
1731
1731
  var t, n;
1732
1732
  if (e)
1733
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;
1734
1734
  }
1735
1735
  function Oo(e, a) {
1736
- return a ? !B.some((t) => t.id === a) : !!e && !B.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
1736
+ return a ? !F.some((t) => t.id === a) : !!e && !F.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
1737
1737
  }
1738
1738
  const $o = [1, 1, 1, 1, 1, 1, 1];
1739
1739
  function le(e) {
@@ -1767,7 +1767,7 @@ function Bo(e) {
1767
1767
  return e.sourceId || String(e.id);
1768
1768
  }
1769
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) ?? []);
1770
+ Sa.name = (e == null ? void 0 : e.outlet.name) ?? "", ye(Na, (e == null ? void 0 : e.positions.map((o) => o.name)) ?? []), ye(F, (e == null ? void 0 : e.positions) ?? []);
1771
1771
  const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
1772
1772
  for (const o of a) t[le(o.dayOfWeek)] = o.closed ? [] : o.hours;
1773
1773
  ye(N.dayHours, t);
@@ -1864,7 +1864,7 @@ function Nn(e) {
1864
1864
  const a = oe[m.value];
1865
1865
  return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
1866
1866
  }
1867
- function Cn(e) {
1867
+ function Sn(e) {
1868
1868
  var n;
1869
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
1870
  return t.length ? Nn([...new Set(t)]) : void 0;
@@ -1873,14 +1873,14 @@ function _o(e = []) {
1873
1873
  const a = l.value;
1874
1874
  if (!a) return [];
1875
1875
  const t = new Map(a.employees.map((o) => [o.employeeId, o])), n = new Map(
1876
- F.value.map((o) => [o.employeeId, o])
1876
+ W.value.map((o) => [o.employeeId, o])
1877
1877
  ), s = re.value.filter((o) => {
1878
1878
  var d;
1879
1879
  return ((d = n.get(o._id)) == null ? void 0 : d.enabled) !== !1;
1880
1880
  }).map((o) => t.get(o._id) ?? kn(o)), i = wn(s), r = /* @__PURE__ */ new Map();
1881
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]);
1882
+ const d = `${o.employeeId}|${o.date}`, f = r.get(d);
1883
+ f ? f.push(o) : r.set(d, [o]);
1884
1884
  }
1885
1885
  return s.map((o) => {
1886
1886
  const d = re.value.find((v) => v._id === o.employeeId) ?? {
@@ -1888,20 +1888,20 @@ function _o(e = []) {
1888
1888
  code: void 0,
1889
1889
  passcode: "",
1890
1890
  isMasterUser: !1
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));
1899
- return R.length ? R.length === 1 ? R[0] : R : null;
1891
+ }, f = ve(o), D = gn(o.employeeId), C = new Set(F.map((v) => v.id)), q = new Set(F.map((v) => v.name.toLocaleLowerCase())), O = (v) => v.positionId ? C.has(v.positionId) : q.has(v.positionName.toLocaleLowerCase()), $ = ie(o.primaryPosition), p = !!o.primaryPosition && O(o.primaryPosition), P = o.secondaryPositions.filter(O).map((v) => ie(v)).filter((v) => !!v), _ = $ ? p ? [$, ...P] : [] : P, M = [
1892
+ ...$ && !p ? [$] : [],
1893
+ ...o.secondaryPositions.filter((v) => !O(v)).map((v) => ie(v)).filter((v) => !!v)
1894
+ ], U = _[0] ?? "", L = e.map((v) => {
1895
+ const A = X(v);
1896
+ return (a.timeOff ?? []).filter((w) => w.employeeId === o.employeeId).map((w) => bn(w, A)).find((w) => w !== null) ?? null;
1897
+ }), z = e.map((v) => {
1898
+ const A = X(v), T = (r.get(`${o.employeeId}|${A}`) ?? []).filter((x) => x.startTime && x.endTime).map((x) => En(x)).sort((x, ce) => x.start.localeCompare(ce.start));
1899
+ return T.length ? T.length === 1 ? T[0] : T : null;
1900
1900
  }), ue = o.availability.length > 0, de = Array.from(
1901
1901
  { length: 7 },
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);
1902
+ (v, A) => ue ? o.availability.some((w) => le(w.dayOfWeek) === A) : !0
1903
+ ), ge = Array.from({ length: 7 }, (v, A) => {
1904
+ const w = o.availability.find((T) => le(T.dayOfWeek) === A);
1905
1905
  return { from: (w == null ? void 0 : w.start) ?? "", to: (w == null ? void 0 : w.end) ?? "" };
1906
1906
  });
1907
1907
  return {
@@ -1917,7 +1917,7 @@ function _o(e = []) {
1917
1917
  code: d.code,
1918
1918
  masterUser: d.isMasterUser,
1919
1919
  employmentType: o.employmentType,
1920
- role: _,
1920
+ role: U,
1921
1921
  initials: vn(d.name),
1922
1922
  color: We[(D - Xe - 1) % We.length],
1923
1923
  // Gross hours actually rostered this week — the figure the cost rail multiplies by
@@ -1926,28 +1926,28 @@ function _o(e = []) {
1926
1926
  // as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
1927
1927
  // verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
1928
1928
  weekHours: Math.round(
1929
- U.reduce(
1930
- (v, E) => v + (Array.isArray(E) ? E : E && "start" in E ? [E] : []).reduce(
1931
- (w, R) => w + hn(R.start, R.end),
1929
+ z.reduce(
1930
+ (v, A) => v + (Array.isArray(A) ? A : A && "start" in A ? [A] : []).reduce(
1931
+ (w, T) => w + hn(T.start, T.end),
1932
1932
  0
1933
1933
  ),
1934
1934
  0
1935
1935
  ) * 10
1936
1936
  ) / 10,
1937
1937
  pct: An(o, i),
1938
- contractHours: p.maxHoursPerWeek ?? void 0,
1939
- minHoursPerDay: p.minHoursPerDay ?? void 0,
1938
+ contractHours: f.maxHoursPerWeek ?? void 0,
1939
+ minHoursPerDay: f.minHoursPerDay ?? void 0,
1940
1940
  // Keep the persisted override shape here. Consumers that need the effective value use
1941
1941
  // effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
1942
1942
  workingHours: o.workingHours,
1943
1943
  // Every outlet the POS says this person works at, not just this one — the Add / Edit form
1944
1944
  // shows them, and saving keeps them.
1945
- locations: Cn(o.employeeId),
1945
+ locations: Sn(o.employeeId),
1946
1946
  rate: Hn(o, i),
1947
- positions: Z,
1948
- archivedPositions: q.length ? q : void 0,
1949
- shifts: U,
1950
- timeOff: I,
1947
+ positions: _,
1948
+ archivedPositions: M.length ? M : void 0,
1949
+ shifts: z,
1950
+ timeOff: L,
1951
1951
  // Remarks live in their own collection in the older scheduling design and are not
1952
1952
  // part of this board's payload yet.
1953
1953
  remarks: [],
@@ -1978,32 +1978,37 @@ function Uo() {
1978
1978
  return { byDate: a, byWeekday: t };
1979
1979
  }
1980
1980
  function Wo() {
1981
- const e = Ke(), { restaurants: a, readRestaurants: t } = Ha(), n = Da(), s = wa(), i = P(!1), r = Y(
1982
- () => a.value.filter((f) => f.managable).map((f) => ({ value: f._id, label: f.profile.name })).sort((f, A) => f.label.localeCompare(A.label))
1983
- ), o = () => {
1984
- var f;
1985
- return `hrm-schedule-outlet:${((f = e.currentBusiness.value) == null ? void 0 : f._id) ?? ""}`;
1986
- }, d = Y(() => {
1987
- var f;
1988
- return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
1981
+ const e = Ke(), { restaurants: a, readRestaurants: t } = Ha(), n = Da(), s = wa(), i = E(!1);
1982
+ let r = () => !0;
1983
+ const o = B(
1984
+ () => a.value.filter((p) => p.managable).map((p) => ({ value: p._id, label: p.profile.name })).sort((p, P) => p.label.localeCompare(P.label))
1985
+ ), d = () => {
1986
+ var p;
1987
+ return `hrm-schedule-outlet:${((p = e.currentBusiness.value) == null ? void 0 : p._id) ?? ""}`;
1988
+ }, f = B(() => {
1989
+ var p;
1990
+ return ((p = e.currentRestaurant.value) == null ? void 0 : p._id) ?? "";
1989
1991
  });
1990
- async function p(f, A) {
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;
1992
+ async function D(p, P) {
1993
+ return p !== m.value && !await r(p) || !_e(p) ? !1 : (localStorage.setItem(d(), p), n.query.restaurantId !== p && s.replace({ query: { ...n.query, restaurantId: p } }), await Promise.all([Ce(p), xa(P)]), !0);
1994
+ }
1995
+ function C(p) {
1996
+ r = p;
1992
1997
  }
1993
- const D = (f) => !!f && r.value.some((A) => A.value === f);
1994
- async function C() {
1995
- var M;
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);
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;
1998
+ const q = (p) => !!p && o.value.some((P) => P.value === p);
1999
+ async function O() {
2000
+ var _;
2001
+ await t(), Be.splice(0, Be.length, ...o.value.map((M) => M.label)), Object.keys(oe).forEach((M) => delete oe[M]), a.value.forEach((M) => oe[M._id] = M.profile.name);
2002
+ const p = localStorage.getItem(d()) ?? "", P = [m.value, p, f.value].find(q) ?? ((_ = o.value[0]) == null ? void 0 : _.value) ?? "";
2003
+ return P && _e(P), i.value = !0, P;
1999
2004
  }
2000
- async function J() {
2001
- const f = await C();
2002
- return f && await Se(f), f;
2005
+ async function $() {
2006
+ const p = await O();
2007
+ return p && await Ce(p), p;
2003
2008
  }
2004
- return { options: r, ready: i, outletId: m, resolve: J, resolveOutlet: C, switchTo: p };
2009
+ return { options: o, ready: i, outletId: m, resolve: $, resolveOutlet: O, switchTo: D, setBeforeSwitch: C };
2005
2010
  }
2006
- const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re({
2011
+ const Cn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re({
2007
2012
  __name: "ScheduleButton",
2008
2013
  props: {
2009
2014
  hierarchy: { default: "primary" },
@@ -2019,7 +2024,7 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2019
2024
  "data-icon": e.iconOnly ? "only" : void 0
2020
2025
  }, [
2021
2026
  Ve(a.$slots, "default")
2022
- ], 8, Sn));
2027
+ ], 8, Cn));
2023
2028
  }
2024
2029
  }), Mn = ["disabled", "aria-expanded"], Ln = { class: "fx-btn-label" }, In = { class: "sch" }, Tn = ["aria-multiselectable"], Rn = {
2025
2030
  key: 0,
@@ -2054,11 +2059,11 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2054
2059
  },
2055
2060
  emits: ["update:modelValue", "toggle"],
2056
2061
  setup(e, { emit: a }) {
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);
2062
+ const t = e, n = a, s = ua(), i = B(() => s.class ?? ""), r = E(!1), o = E(!1), d = E(null), f = E(null), D = E(null), C = B(() => t.teleport !== !1 && o.value);
2058
2063
  Le(() => {
2059
2064
  o.value = typeof document < "u" && !!document.body;
2060
2065
  });
2061
- const J = Y(() => {
2066
+ const q = B(() => {
2062
2067
  var u, y;
2063
2068
  if (t.selectedLabel != null) return t.selectedLabel;
2064
2069
  if (t.multiple) {
@@ -2067,31 +2072,31 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2067
2072
  }
2068
2073
  return ((y = t.options.find((c) => c.value === t.modelValue)) == null ? void 0 : y.label) ?? t.placeholder ?? "";
2069
2074
  });
2070
- function f(u) {
2075
+ function O(u) {
2071
2076
  var y;
2072
2077
  return t.multiple ? !!((y = t.selected) != null && y.includes(u.value)) : t.selectedId != null ? u.id === t.selectedId : u.value === t.modelValue;
2073
2078
  }
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();
2079
+ const $ = B(() => !!t.menuTitle || t.options.some((u) => u.hint)), p = E(""), P = E(null), _ = B(() => {
2080
+ const u = p.value.trim().toLowerCase();
2076
2081
  return !t.searchable || !u ? t.options : t.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(u));
2077
- }), q = Y(() => {
2082
+ }), M = B(() => {
2078
2083
  const u = [];
2079
2084
  let y;
2080
- for (const c of Z.value)
2085
+ for (const c of _.value)
2081
2086
  c.group !== y && (y = c.group, y && u.push({ heading: y })), u.push({ option: c });
2082
2087
  return u;
2083
- }), _ = 5, I = 8;
2084
- function U() {
2085
- const u = D.value, y = p.value;
2088
+ }), U = 5, L = 8;
2089
+ function z() {
2090
+ const u = D.value, y = f.value;
2086
2091
  if (!u || !y) return;
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`;
2089
- const ee = O - c.bottom - _ - I, ia = c.top - _ - I;
2092
+ const c = y.getBoundingClientRect(), S = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
2093
+ u.style.minWidth = `${Math.round(c.width)}px`, u.style.maxWidth = `${Math.max(180, Math.round(S - L * 2))}px`;
2094
+ const ee = R - c.bottom - U - L, ia = c.top - U - L;
2090
2095
  u.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ee, ia)))}px`;
2091
2096
  const me = u.offsetHeight, ra = u.offsetWidth;
2092
- let De = c.bottom + _;
2093
- De + me > O - I && (De = c.top - _ - me >= I ? c.top - _ - me : Math.max(I, O - me - I));
2094
- const la = Math.min(Math.max(I, c.left), Math.max(I, S - ra - I));
2097
+ let De = c.bottom + U;
2098
+ De + me > R - L && (De = c.top - U - me >= L ? c.top - U - me : Math.max(L, R - me - L));
2099
+ const la = Math.min(Math.max(L, c.left), Math.max(L, S - ra - L));
2095
2100
  u.style.top = `${Math.round(De)}px`, u.style.left = `${Math.round(la)}px`, u.style.visibility = "visible";
2096
2101
  }
2097
2102
  function ue(u) {
@@ -2102,14 +2107,14 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2102
2107
  function de(u) {
2103
2108
  const y = D.value, c = u.target;
2104
2109
  if (y && c && c !== document && y.contains(c)) return;
2105
- const S = p.value;
2110
+ const S = f.value;
2106
2111
  if (!S) return;
2107
- const O = S.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
2108
- if (O.bottom < 0 || O.top > ee) {
2112
+ const R = S.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
2113
+ if (R.bottom < 0 || R.top > ee) {
2109
2114
  w();
2110
2115
  return;
2111
2116
  }
2112
- U();
2117
+ z();
2113
2118
  }
2114
2119
  function ge() {
2115
2120
  document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize", w);
@@ -2117,28 +2122,28 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2117
2122
  function v() {
2118
2123
  document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize", w);
2119
2124
  }
2120
- async function E() {
2125
+ async function A() {
2121
2126
  var u, y, c;
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());
2127
+ t.disabled || r.value || (p.value = "", r.value = !0, await Pe(), z(), (u = P.value) == null || u.focus(), (c = (y = D.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), ge());
2123
2128
  }
2124
2129
  function w() {
2125
- r.value && (r.value = !1, M.value = "", v());
2130
+ r.value && (r.value = !1, p.value = "", v());
2126
2131
  }
2127
- Te(M, async () => {
2128
- r.value && (await Pe(), U());
2132
+ Te(p, async () => {
2133
+ r.value && (await Pe(), z());
2129
2134
  });
2130
- function R(u) {
2135
+ function T(u) {
2131
2136
  var y;
2132
2137
  if (u.key === "Escape")
2133
- u.preventDefault(), w(), (y = p.value) == null || y.focus();
2138
+ u.preventDefault(), w(), (y = f.value) == null || y.focus();
2134
2139
  else if (u.key === "Enter") {
2135
2140
  u.preventDefault();
2136
- const c = Z.value.find((S) => !S.disabled);
2141
+ const c = _.value.find((S) => !S.disabled);
2137
2142
  c && ce(c);
2138
2143
  }
2139
2144
  }
2140
- function $() {
2141
- r.value ? w() : E();
2145
+ function x() {
2146
+ r.value ? w() : A();
2142
2147
  }
2143
2148
  function ce(u) {
2144
2149
  if (!u.disabled) {
@@ -2153,25 +2158,25 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2153
2158
  u.value !== t.modelValue && n("update:modelValue", u.value);
2154
2159
  }
2155
2160
  }
2156
- const na = Y(() => t.options.filter((u) => !u.disabled));
2161
+ const na = B(() => t.options.filter((u) => !u.disabled));
2157
2162
  function oa(u) {
2158
2163
  const y = na.value;
2159
2164
  if (t.multiple || !y.length) {
2160
- E();
2165
+ A();
2161
2166
  return;
2162
2167
  }
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];
2164
- O && O.value !== t.modelValue ? n("update:modelValue", O.value) : E();
2168
+ 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), R = y[S];
2169
+ R && R.value !== t.modelValue ? n("update:modelValue", R.value) : A();
2165
2170
  }
2166
2171
  function sa(u) {
2167
2172
  var y;
2168
2173
  if (u.key === "Escape") {
2169
2174
  if (!r.value) return;
2170
- u.preventDefault(), w(), (y = p.value) == null || y.focus();
2175
+ u.preventDefault(), w(), (y = f.value) == null || y.focus();
2171
2176
  return;
2172
2177
  }
2173
2178
  if (u.key === "Enter" || u.key === " ") {
2174
- u.preventDefault(), $();
2179
+ u.preventDefault(), x();
2175
2180
  return;
2176
2181
  }
2177
2182
  u.key !== "ArrowDown" && u.key !== "ArrowUp" && u.key !== "Home" && u.key !== "End" || (u.preventDefault(), oa(u.key));
@@ -2181,77 +2186,77 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2181
2186
  ref: d,
2182
2187
  class: pe(["fx-sel", i.value])
2183
2188
  }, [
2184
- x("button", ca({
2189
+ Y("button", ca({
2185
2190
  ref_key: "btnEl",
2186
- ref: p
2191
+ ref: f
2187
2192
  }, u.$attrs, {
2188
2193
  type: "button",
2189
2194
  class: ["sch-input fx-btn", { "is-open": r.value }],
2190
2195
  disabled: e.disabled,
2191
2196
  "aria-haspopup": "listbox",
2192
2197
  "aria-expanded": r.value,
2193
- onClick: y[0] || (y[0] = (c) => $()),
2198
+ onClick: y[0] || (y[0] = (c) => x()),
2194
2199
  onKeydown: sa
2195
2200
  }), [
2196
- x("span", Ln, W(J.value), 1)
2201
+ Y("span", Ln, V(q.value), 1)
2197
2202
  ], 16, Mn),
2198
2203
  (b(), da(ma, {
2199
2204
  to: "body",
2200
2205
  disabled: !C.value
2201
2206
  }, [
2202
- x("div", In, [
2207
+ Y("div", In, [
2203
2208
  r.value ? (b(), k("div", {
2204
2209
  key: 0,
2205
2210
  ref_key: "popEl",
2206
2211
  ref: D,
2207
- class: pe(["fx-pop", { "fx-pop-rich": A.value }]),
2212
+ class: pe(["fx-pop", { "fx-pop-rich": $.value }]),
2208
2213
  role: "listbox",
2209
2214
  "aria-multiselectable": e.multiple || void 0,
2210
2215
  style: { visibility: "hidden" }
2211
2216
  }, [
2212
- e.menuTitle ? (b(), k("div", Rn, W(e.menuTitle), 1)) : z("", !0),
2217
+ e.menuTitle ? (b(), k("div", Rn, V(e.menuTitle), 1)) : K("", !0),
2213
2218
  e.searchable ? (b(), k("div", On, [
2214
- ya(x("input", {
2219
+ ya(Y("input", {
2215
2220
  ref_key: "searchEl",
2216
- ref: L,
2217
- "onUpdate:modelValue": y[1] || (y[1] = (c) => M.value = c),
2221
+ ref: P,
2222
+ "onUpdate:modelValue": y[1] || (y[1] = (c) => p.value = c),
2218
2223
  class: "sch-input fx-pop-q",
2219
2224
  type: "search",
2220
2225
  placeholder: "Search",
2221
2226
  autocomplete: "off",
2222
2227
  spellcheck: "false",
2223
2228
  "aria-label": "Search",
2224
- onKeydown: R
2229
+ onKeydown: T
2225
2230
  }, null, 544), [
2226
- [pa, M.value]
2231
+ [pa, p.value]
2227
2232
  ])
2228
- ])) : z("", !0),
2229
- e.searchable && !q.value.length ? (b(), k("div", $n, "No matches")) : z("", !0),
2230
- (b(!0), k(He, null, fa(q.value, (c) => (b(), k(He, {
2233
+ ])) : K("", !0),
2234
+ e.searchable && !M.value.length ? (b(), k("div", $n, "No matches")) : K("", !0),
2235
+ (b(!0), k(He, null, fa(M.value, (c) => (b(), k(He, {
2231
2236
  key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
2232
2237
  }, [
2233
- "heading" in c ? (b(), k("div", xn, W(c.heading), 1)) : (b(), k("div", {
2238
+ "heading" in c ? (b(), k("div", xn, V(c.heading), 1)) : (b(), k("div", {
2234
2239
  key: 1,
2235
2240
  class: pe(["fx-opt", {
2236
- "is-on": f(c.option),
2241
+ "is-on": O(c.option),
2237
2242
  "is-off": c.option.disabled,
2238
2243
  "is-new": c.option.command
2239
2244
  }]),
2240
2245
  role: "option",
2241
- "aria-selected": f(c.option),
2246
+ "aria-selected": O(c.option),
2242
2247
  onClick: (S) => ce(c.option)
2243
2248
  }, [
2244
- y[2] || (y[2] = x("span", {
2249
+ y[2] || (y[2] = Y("span", {
2245
2250
  class: "fx-tick",
2246
2251
  "aria-hidden": "true"
2247
2252
  }, [
2248
- x("svg", {
2253
+ Y("svg", {
2249
2254
  width: "11",
2250
2255
  height: "11",
2251
2256
  viewBox: "0 0 16 16",
2252
2257
  fill: "none"
2253
2258
  }, [
2254
- x("path", {
2259
+ Y("path", {
2255
2260
  d: "m3.5 8.4 3 3 6-7",
2256
2261
  stroke: "currentColor",
2257
2262
  "stroke-width": "2.2",
@@ -2260,15 +2265,15 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2260
2265
  })
2261
2266
  ])
2262
2267
  ], -1)),
2263
- A.value ? (b(), k("span", Bn, [
2264
- x("b", null, W(c.option.label), 1),
2265
- c.option.hint ? (b(), k("small", _n, W(c.option.hint), 1)) : z("", !0)
2268
+ $.value ? (b(), k("span", Bn, [
2269
+ Y("b", null, V(c.option.label), 1),
2270
+ c.option.hint ? (b(), k("small", _n, V(c.option.hint), 1)) : K("", !0)
2266
2271
  ])) : (b(), k(He, { key: 1 }, [
2267
- ha(W(c.option.label), 1)
2272
+ ha(V(c.option.label), 1)
2268
2273
  ], 64))
2269
2274
  ], 10, Yn))
2270
2275
  ], 64))), 128))
2271
- ], 10, Tn)) : z("", !0)
2276
+ ], 10, Tn)) : K("", !0)
2272
2277
  ])
2273
2278
  ], 8, ["disabled"]))
2274
2279
  ], 2));
@@ -2285,7 +2290,7 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2285
2290
  },
2286
2291
  emits: ["close"],
2287
2292
  setup(e, { emit: a }) {
2288
- const t = e, n = a, s = P(null);
2293
+ const t = e, n = a, s = E(null);
2289
2294
  let i = null;
2290
2295
  function r() {
2291
2296
  Pe(() => {
@@ -2300,9 +2305,9 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2300
2305
  return;
2301
2306
  }
2302
2307
  if (d.key !== "Tab" || !s.value) return;
2303
- const p = Array.from(s.value.querySelectorAll(ze));
2304
- if (!p.length) return;
2305
- const D = p[0], C = p[p.length - 1];
2308
+ const f = Array.from(s.value.querySelectorAll(ze));
2309
+ if (!f.length) return;
2310
+ const D = f[0], C = f[f.length - 1];
2306
2311
  d.shiftKey && document.activeElement === D ? (d.preventDefault(), C.focus()) : !d.shiftKey && document.activeElement === C && (d.preventDefault(), D.focus());
2307
2312
  }
2308
2313
  return Te(
@@ -2313,12 +2318,12 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2313
2318
  { immediate: !0 }
2314
2319
  ), Le(() => document.addEventListener("keydown", o)), Ie(() => {
2315
2320
  document.removeEventListener("keydown", o), i = null;
2316
- }), (d, p) => e.open ? (b(), k("div", {
2321
+ }), (d, f) => e.open ? (b(), k("div", {
2317
2322
  key: 0,
2318
2323
  class: "modal-overlay open",
2319
- onClick: p[0] || (p[0] = va((D) => n("close"), ["self"]))
2324
+ onClick: f[0] || (f[0] = va((D) => n("close"), ["self"]))
2320
2325
  }, [
2321
- x("div", {
2326
+ Y("div", {
2322
2327
  id: e.id,
2323
2328
  ref_key: "panel",
2324
2329
  ref: s,
@@ -2332,7 +2337,7 @@ const Sn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re
2332
2337
  }, [
2333
2338
  Ve(d.$slots, "default")
2334
2339
  ], 14, Fn)
2335
- ])) : z("", !0);
2340
+ ])) : K("", !0);
2336
2341
  }
2337
2342
  });
2338
2343
  export {
@@ -2356,14 +2361,14 @@ export {
2356
2361
  so as Q,
2357
2362
  qn as R,
2358
2363
  Io as S,
2359
- F as T,
2364
+ W as T,
2360
2365
  aa as U,
2361
2366
  Ia as V,
2362
2367
  Mo as W,
2363
2368
  Be as X,
2364
2369
  xo as Y,
2365
2370
  ao as Z,
2366
- K as _,
2371
+ j as _,
2367
2372
  _o as a,
2368
2373
  le as a0,
2369
2374
  ie as a1,
@@ -2377,26 +2382,26 @@ export {
2377
2382
  co as a9,
2378
2383
  po as aA,
2379
2384
  gn as aa,
2380
- j as ab,
2385
+ X as ab,
2381
2386
  wo as ac,
2382
2387
  go as ad,
2383
2388
  Do as ae,
2384
2389
  $o as af,
2385
2390
  xa as ag,
2386
2391
  Ao as ah,
2387
- Ca as ai,
2392
+ Sa as ai,
2388
2393
  Qn as aj,
2389
2394
  vo as ak,
2390
2395
  xe as al,
2391
2396
  Uo as am,
2392
2397
  Ye as an,
2393
2398
  fe as ao,
2394
- Se as ap,
2399
+ Ce as ap,
2395
2400
  Eo as aq,
2396
2401
  zo as ar,
2397
2402
  Vo as as,
2398
2403
  Ko as at,
2399
- B as au,
2404
+ F as au,
2400
2405
  jn as av,
2401
2406
  Wo as aw,
2402
2407
  fo as ax,
@@ -2404,20 +2409,20 @@ export {
2404
2409
  re as az,
2405
2410
  N as b,
2406
2411
  Fo as c,
2407
- G as d,
2412
+ Q as d,
2408
2413
  To as e,
2409
2414
  Jn as f,
2410
2415
  yn as g,
2411
- So as h,
2416
+ Co as h,
2412
2417
  Ma as i,
2413
2418
  ho as j,
2414
2419
  Yo as k,
2415
2420
  Ho as l,
2416
2421
  Po as m,
2417
- Co as n,
2422
+ So as n,
2418
2423
  m as o,
2419
2424
  l as p,
2420
- Ce as q,
2425
+ Se as q,
2421
2426
  lo as r,
2422
2427
  Pa as s,
2423
2428
  oo as t,