@feedmepos/mf-hrm-portal 2.3.2-dev.7 → 2.3.2-dev.9

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 (64) hide show
  1. package/dist/{ApprovalCodeList-Bw0E-hZl.js → ApprovalCodeList-gb0bre9J.js} +7 -7
  2. package/dist/{AuditLogList-CA-_t77n.js → AuditLogList-9cwS6bL7.js} +795 -719
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-LtjNCAFN.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DR-c15gr.js} +2 -2
  4. package/dist/{EmployeeList-D_bX0EhQ.js → EmployeeList-DjyoW1we.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CyZxQa-b.js → FormSection.vue_vue_type_script_setup_true_lang-BBWlADve.js} +1 -1
  6. package/dist/{GrantUserList-Cg7ITk_M.js → GrantUserList-yU2NqFVO.js} +8 -8
  7. package/dist/{Main-Bl-Ocx1G.js → Main-4KwMqF3h.js} +5 -5
  8. package/dist/{Main-BaB4vgI5.js → Main-BS_Lk_eB.js} +1005 -999
  9. package/dist/{Main-D5wi42fp.js → Main-BuG7SPnC.js} +10 -10
  10. package/dist/MyPosProfile-CuDzRaRS.js +360 -0
  11. package/dist/{PermissionSetList-kgG9H3DX.js → PermissionSetList-D7SS1iAr.js} +30 -29
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-y1YcZpGA.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js} +902 -901
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fQyCtDXM.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js} +1 -1
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-3Q8udk43.js → RoleForm.vue_vue_type_script_setup_true_lang-hiMgwiya.js} +9 -9
  15. package/dist/{RoleList-Cmz97HHP.js → RoleList-B3P-LQYV.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CggEy3OI.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang--dsZOhnv.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-B39k3SQH.js → ScheduleGeneralPage-Pq6ufiDu.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-C5j3D4eF.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DKFJLsTW.js} +4 -4
  19. package/dist/{SchedulePage-AVmRkFi1.js → SchedulePage-8EAOfiJx.js} +189 -201
  20. package/dist/{SchedulePositionPage-3rE-O8CG.js → SchedulePositionPage-CGXeUnju.js} +3 -3
  21. package/dist/{SelectFilter-R7ry_GEg.js → SelectFilter-C-UEVLla.js} +1 -1
  22. package/dist/{TeamMemberList-CvDnIILn.js → TeamMemberList-Bd1O44Ur.js} +102 -101
  23. package/dist/TimesheetList-CSCmigCM.js +437 -0
  24. package/dist/{app-DKUCzcrc.js → app-BohKQtlz.js} +82 -14
  25. package/dist/app.js +1 -1
  26. package/dist/{approval-code-nsETgIry.js → approval-code-Bfvxsg8h.js} +4 -4
  27. package/dist/{dayjs.min-CtULWW1N.js → dayjs.min-C0MqTPg1.js} +1 -1
  28. package/dist/employee-DWxT78W2.js +172 -0
  29. package/dist/{grant-user-Dpa_Rl6j.js → grant-user-LZ3b6siI.js} +2 -2
  30. package/dist/{iteration-DpHBtiyr.js → index-DDDG-LHm.js} +698 -726
  31. package/dist/iteration-CcXrOMQe.js +30 -0
  32. package/dist/{lodash-YaHCUo_F.js → lodash-BRqMda7F.js} +1 -1
  33. package/dist/{member-grant-CEokFI3_.js → member-grant-a3AGCWfT.js} +2 -2
  34. package/dist/{restaurant-CDFKqEFm.js → restaurant-pL7vHt-H.js} +2 -2
  35. package/dist/{role-DyBVVlEA.js → role--EKCVqho.js} +8 -7
  36. package/dist/{rule-xErZqYmH.js → rule-Db3gFVHx.js} +83 -82
  37. package/dist/src/api/audit-log/index.d.ts +2 -0
  38. package/dist/src/api/employee/index.d.ts +1 -2
  39. package/dist/src/stores/approval-code.d.ts +1 -1
  40. package/dist/src/stores/employee.d.ts +3 -9
  41. package/dist/src/stores/grant-user.d.ts +1 -1
  42. package/dist/src/stores/permission-assignment.d.ts +2 -2
  43. package/dist/src/stores/permission-set.d.ts +2 -2
  44. package/dist/src/stores/restaurant.d.ts +2 -2
  45. package/dist/src/stores/role.d.ts +2 -2
  46. package/dist/src/stores/team.d.ts +1 -1
  47. package/dist/src/stores/timesheet.d.ts +62 -47
  48. package/dist/src/types/timesheet.d.ts +3 -0
  49. package/dist/src/views/audit-log/locales/index.d.ts +28 -0
  50. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  51. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  52. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -0
  53. package/dist/style.css +1 -1
  54. package/dist/timesheet-NYW1P4rf.js +76 -0
  55. package/dist/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/{useAppStore-BqsvPsPB.js → useAppStore-DV13z6oc.js} +1 -1
  57. package/dist/{useLoading-BS1bnZg1.js → useLoading-Fcnnfywt.js} +1 -1
  58. package/dist/useMessage-_ywT_N9X.js +17 -0
  59. package/dist/{useReportPermissions-DJEhkyGc.js → useReportPermissions-BcyVoKVq.js} +13 -13
  60. package/package.json +3 -3
  61. package/dist/MyPosProfile-CUG_201f.js +0 -290
  62. package/dist/TimesheetList-DYoglTi8.js +0 -401
  63. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_d0c6fd51_lang-DBpzyQ17.js +0 -63
  64. package/dist/employee-DlsSqR3i.js +0 -210
@@ -1,17 +1,19 @@
1
- import { defineComponent as Vt, ref as S, computed as I, onMounted as Eo, onBeforeUnmount as No, watch as ie, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Oe, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as g, toDisplayString as l, unref as u, nextTick as Ro, onUnmounted as Uo, createTextVNode as Ae, normalizeClass as Ko } from "vue";
2
- import { d as O } from "./dayjs.min-CtULWW1N.js";
3
- import { defineStore as Bo, storeToRefs as Yo } from "pinia";
4
- import { useI18n as $t, useCoreStore as zo } from "@feedmepos/mf-common";
5
- import { g as st, b as at, G as Ft, _ as qo, a as Jo } from "./app-DKUCzcrc.js";
1
+ import { defineComponent as $t, ref as w, computed as A, onMounted as Uo, onBeforeUnmount as Ko, watch as oe, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Ce, createCommentVNode as M, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as h, toDisplayString as l, unref as u, nextTick as Bo, onUnmounted as Yo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
+ import { d as j } from "./dayjs.min-C0MqTPg1.js";
3
+ import { defineStore as qo, storeToRefs as Jo } from "pinia";
4
+ import { useI18n as dt, useCoreStore as Ho } from "@feedmepos/mf-common";
5
+ import { g as st, b as at, G as Mt, _ as Wo, a as Go } from "./app-BohKQtlz.js";
6
6
  import { components as ve } from "@feedmepos/ui-library";
7
- import { S as Fe } from "./SelectFilter-R7ry_GEg.js";
8
- import { _ as Ho } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
- import { _ as Wo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
- import { t as Go, p as Mt } from "./rule-xErZqYmH.js";
11
- import { u as Xo } from "./restaurant-CDFKqEFm.js";
12
- import { u as Qo } from "./useDebounce-B8ZPVS5C.js";
13
- import { n as Zo } from "./string-DZQ1uNjn.js";
14
- const es = {
7
+ import { S as Fe } from "./SelectFilter-C-UEVLla.js";
8
+ import { _ as Xo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
+ import { _ as Qo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
+ import { t as Zo, p as Dt } from "./rule-Db3gFVHx.js";
11
+ import { u as es } from "./restaurant-pL7vHt-H.js";
12
+ import { u as ts } from "./useDebounce-B8ZPVS5C.js";
13
+ import { n as os } from "./string-DZQ1uNjn.js";
14
+ import { useRoute as ss, useRouter as as } from "vue-router";
15
+ import { u as ns } from "./useMessage-_ywT_N9X.js";
16
+ const ls = {
15
17
  order: "Order",
16
18
  refund: "Refund",
17
19
  drawer: "Cash drawer",
@@ -41,40 +43,41 @@ const es = {
41
43
  { key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"], sources: ["portal"] },
42
44
  { key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"], sources: ["portal"] },
43
45
  { key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
44
- ], nt = "/audit-logs", Ke = {
46
+ ], nt = "/audit-logs", Oe = {
45
47
  async count(t) {
46
- var r, d, h, b, y, A, C, i, V;
48
+ var r, d, y, _, g, S, O, i, V;
47
49
  const o = {
48
50
  ...t != null && t.from ? { from: t.from } : {},
49
51
  ...t != null && t.to ? { to: t.to } : {},
50
52
  ...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
51
53
  ...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
52
- ...(h = t == null ? void 0 : t.subjectPrefixes) != null && h.length ? { subjectPrefixes: t.subjectPrefixes } : {},
53
- ...(b = t == null ? void 0 : t.actions) != null && b.length ? { actions: t.actions } : {},
54
- ...(y = t == null ? void 0 : t.outcomes) != null && y.length ? { outcomes: t.outcomes } : {},
54
+ ...(y = t == null ? void 0 : t.subjectPrefixes) != null && y.length ? { subjectPrefixes: t.subjectPrefixes } : {},
55
+ ...(_ = t == null ? void 0 : t.actions) != null && _.length ? { actions: t.actions } : {},
56
+ ...(g = t == null ? void 0 : t.outcomes) != null && g.length ? { outcomes: t.outcomes } : {},
55
57
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
56
58
  ...t != null && t.search ? { search: t.search } : {},
57
- ...(A = t == null ? void 0 : t.searchUserIds) != null && A.length ? { searchUserIds: t.searchUserIds } : {},
58
- ...(C = t == null ? void 0 : t.searchSubjects) != null && C.length ? { searchSubjects: t.searchSubjects } : {},
59
+ ...(S = t == null ? void 0 : t.searchUserIds) != null && S.length ? { searchUserIds: t.searchUserIds } : {},
60
+ ...(O = t == null ? void 0 : t.searchSubjects) != null && O.length ? { searchSubjects: t.searchSubjects } : {},
59
61
  ...(i = t == null ? void 0 : t.sources) != null && i.length ? { sources: t.sources } : {},
60
- ...(V = t == null ? void 0 : t.restaurantIds) != null && V.length ? { restaurantIds: t.restaurantIds } : {}
62
+ ...(V = t == null ? void 0 : t.restaurantIds) != null && V.length ? { restaurantIds: t.restaurantIds } : {},
63
+ ...t != null && t.traceId ? { traceId: t.traceId } : {}
61
64
  };
62
65
  return (await st(
63
66
  await at().get(`${nt}/count`, {
64
67
  params: o,
65
- paramsSerializer: (R) => {
68
+ paramsSerializer: (P) => {
66
69
  const m = new URLSearchParams();
67
- for (const [w, j] of Object.entries(R))
68
- if (Array.isArray(j))
69
- for (const T of j) m.append(w, String(T));
70
- else j != null && m.append(w, String(j));
70
+ for (const [x, D] of Object.entries(P))
71
+ if (Array.isArray(D))
72
+ for (const F of D) m.append(x, String(F));
73
+ else D != null && m.append(x, String(D));
71
74
  return m.toString();
72
75
  }
73
76
  })
74
77
  )).total;
75
78
  },
76
79
  async read(t) {
77
- var n, r, d, h, b, y, A, C, i;
80
+ var n, r, d, y, _, g, S, O, i;
78
81
  const o = {
79
82
  limit: (t == null ? void 0 : t.limit) ?? 100,
80
83
  offset: (t == null ? void 0 : t.offset) ?? 0,
@@ -84,13 +87,14 @@ const es = {
84
87
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
85
88
  ...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
86
89
  ...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
87
- ...(h = t == null ? void 0 : t.actions) != null && h.length ? { actions: t.actions } : {},
88
- ...(b = t == null ? void 0 : t.outcomes) != null && b.length ? { outcomes: t.outcomes } : {},
90
+ ...(y = t == null ? void 0 : t.actions) != null && y.length ? { actions: t.actions } : {},
91
+ ...(_ = t == null ? void 0 : t.outcomes) != null && _.length ? { outcomes: t.outcomes } : {},
89
92
  ...t != null && t.search ? { search: t.search } : {},
90
- ...(y = t == null ? void 0 : t.searchUserIds) != null && y.length ? { searchUserIds: t.searchUserIds } : {},
91
- ...(A = t == null ? void 0 : t.searchSubjects) != null && A.length ? { searchSubjects: t.searchSubjects } : {},
92
- ...(C = t == null ? void 0 : t.sources) != null && C.length ? { sources: t.sources } : {},
93
- ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {}
93
+ ...(g = t == null ? void 0 : t.searchUserIds) != null && g.length ? { searchUserIds: t.searchUserIds } : {},
94
+ ...(S = t == null ? void 0 : t.searchSubjects) != null && S.length ? { searchSubjects: t.searchSubjects } : {},
95
+ ...(O = t == null ? void 0 : t.sources) != null && O.length ? { sources: t.sources } : {},
96
+ ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
97
+ ...t != null && t.traceId ? { traceId: t.traceId } : {}
94
98
  };
95
99
  return st(
96
100
  await at().get(nt, {
@@ -98,12 +102,12 @@ const es = {
98
102
  // Serialize arrays as repeated params: key=val1&key=val2
99
103
  // (NestJS @Query expects this; axios default adds brackets which break matching)
100
104
  paramsSerializer: (V) => {
101
- const R = new URLSearchParams();
102
- for (const [m, w] of Object.entries(V))
103
- if (Array.isArray(w))
104
- for (const j of w) R.append(m, String(j));
105
- else w != null && R.append(m, String(w));
106
- return R.toString();
105
+ const P = new URLSearchParams();
106
+ for (const [m, x] of Object.entries(V))
107
+ if (Array.isArray(x))
108
+ for (const D of x) P.append(m, String(D));
109
+ else x != null && P.append(m, String(x));
110
+ return P.toString();
107
111
  }
108
112
  })
109
113
  );
@@ -122,10 +126,10 @@ const es = {
122
126
  await at().get(`${nt}/actors`, { params: o })
123
127
  );
124
128
  }
125
- }, ts = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, os = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ss = {
129
+ }, rs = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, us = {
126
130
  "data-more-measure": "",
127
131
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
128
- }, as = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ns = /* @__PURE__ */ Vt({
132
+ }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, cs = /* @__PURE__ */ $t({
129
133
  __name: "AuditLogModuleTabs",
130
134
  props: {
131
135
  modelValue: {},
@@ -133,136 +137,136 @@ const es = {
133
137
  },
134
138
  emits: ["update:modelValue"],
135
139
  setup(t, { emit: o }) {
136
- const n = t, r = o, { t: d } = $t(), h = S(!1), b = S(null), y = S(null), A = S([]), C = S(0), i = S(0);
140
+ const n = t, r = o, { t: d } = dt(), y = w(!1), _ = w(null), g = w(null), S = w([]), O = w(0), i = w(0);
137
141
  let V = null;
138
- async function R() {
139
- if (await Ro(), !y.value) return;
140
- const _ = y.value.querySelectorAll("[data-tab-measure]");
141
- A.value = Array.from(_).map((B) => B.offsetWidth);
142
- const D = y.value.querySelector("[data-more-measure]");
143
- C.value = (D == null ? void 0 : D.offsetWidth) ?? 0;
142
+ async function P() {
143
+ if (await Bo(), !g.value) return;
144
+ const b = g.value.querySelectorAll("[data-tab-measure]");
145
+ S.value = Array.from(b).map((B) => B.offsetWidth);
146
+ const T = g.value.querySelector("[data-more-measure]");
147
+ O.value = (T == null ? void 0 : T.offsetWidth) ?? 0;
144
148
  }
145
- const m = I(() => {
146
- const _ = n.items.length;
147
- if (_ === 0) return 0;
148
- if (!i.value || A.value.length !== _) return _;
149
- const D = A.value;
150
- if (D.reduce((k, X) => k + X, 0) <= i.value) return _;
151
- const P = C.value;
149
+ const m = A(() => {
150
+ const b = n.items.length;
151
+ if (b === 0) return 0;
152
+ if (!i.value || S.value.length !== b) return b;
153
+ const T = S.value;
154
+ if (T.reduce((I, X) => I + X, 0) <= i.value) return b;
155
+ const E = O.value;
152
156
  let H = 0, U = 0;
153
- for (let k = 0; k < _ && !(H + D[k] + P > i.value); k++)
154
- H += D[k], U++;
157
+ for (let I = 0; I < b && !(H + T[I] + E > i.value); I++)
158
+ H += T[I], U++;
155
159
  return U;
156
- }), w = I(() => {
157
- const _ = m.value, D = n.items.length;
158
- if (_ >= D) return [...n.items];
159
- const B = n.items.slice(0, _), P = n.items.find((W) => W.value === n.modelValue);
160
- if (!P || B.some((W) => W.value === P.value)) return B;
161
- if (_ === 0) return [P];
162
- const H = n.items.findIndex((W) => W.value === P.value), U = A.value, k = C.value, X = U[H] ?? 0;
163
- let ue = _, je = U.slice(0, ue - 1).reduce((W, _e) => W + _e, 0);
164
- for (; ue > 1 && je + X + k > i.value; )
165
- ue--, je = U.slice(0, ue - 1).reduce((W, _e) => W + _e, 0);
166
- return [...n.items.slice(0, Math.max(ue - 1, 0)), P];
167
- }), j = I(() => {
168
- const _ = new Set(w.value.map((D) => D.value));
169
- return n.items.filter((D) => !_.has(D.value));
160
+ }), x = A(() => {
161
+ const b = m.value, T = n.items.length;
162
+ if (b >= T) return [...n.items];
163
+ const B = n.items.slice(0, b), E = n.items.find((W) => W.value === n.modelValue);
164
+ if (!E || B.some((W) => W.value === E.value)) return B;
165
+ if (b === 0) return [E];
166
+ const H = n.items.findIndex((W) => W.value === E.value), U = S.value, I = O.value, X = U[H] ?? 0;
167
+ let ue = b, je = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
168
+ for (; ue > 1 && je + X + I > i.value; )
169
+ ue--, je = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
170
+ return [...n.items.slice(0, Math.max(ue - 1, 0)), E];
171
+ }), D = A(() => {
172
+ const b = new Set(x.value.map((T) => T.value));
173
+ return n.items.filter((T) => !b.has(T.value));
170
174
  });
171
- function T(_) {
172
- h.value = !1, r("update:modelValue", _);
175
+ function F(b) {
176
+ y.value = !1, r("update:modelValue", b);
173
177
  }
174
- return Eo(async () => {
175
- await R(), b.value && (i.value = b.value.clientWidth, V = new ResizeObserver(() => {
176
- b.value && (i.value = b.value.clientWidth);
177
- }), V.observe(b.value));
178
- }), No(() => {
178
+ return Uo(async () => {
179
+ await P(), _.value && (i.value = _.value.clientWidth, V = new ResizeObserver(() => {
180
+ _.value && (i.value = _.value.clientWidth);
181
+ }), V.observe(_.value));
182
+ }), Ko(() => {
179
183
  V == null || V.disconnect(), V = null;
180
- }), ie(
184
+ }), oe(
181
185
  () => n.items,
182
186
  () => {
183
- R();
187
+ P();
184
188
  },
185
189
  { deep: !0 }
186
- ), (_, D) => {
187
- const B = N("FmTab"), P = N("FmIcon"), H = N("FmMenuItem"), U = N("FmMenu");
190
+ ), (b, T) => {
191
+ const B = N("FmTab"), E = N("FmIcon"), H = N("FmMenuItem"), U = N("FmMenu");
188
192
  return f(), v("div", {
189
193
  ref_key: "containerRef",
190
- ref: b,
194
+ ref: _,
191
195
  class: "relative flex w-full flex-row items-center"
192
196
  }, [
193
- (f(!0), v(z, null, ce(w.value, (k) => (f(), Oe(B, {
194
- key: k.value,
197
+ (f(!0), v(z, null, ce(x.value, (I) => (f(), Ce(B, {
198
+ key: I.value,
195
199
  "model-value": t.modelValue,
196
- label: k.label,
197
- badge: k.badge,
198
- disabled: k.disabled,
199
- value: k.value,
200
- "onUpdate:modelValue": T
200
+ label: I.label,
201
+ badge: I.badge,
202
+ disabled: I.disabled,
203
+ value: I.value,
204
+ "onUpdate:modelValue": F
201
205
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
202
- j.value.length > 0 ? (f(), Oe(U, {
206
+ D.value.length > 0 ? (f(), Ce(U, {
203
207
  key: 0,
204
- "show-menu": h.value,
208
+ "show-menu": y.value,
205
209
  class: "max-w-[360px] min-w-[90px] rounded-sm",
206
210
  placement: "bottom-start",
207
- onMenuChanged: D[0] || (D[0] = (k) => h.value = k)
211
+ onMenuChanged: T[0] || (T[0] = (I) => y.value = I)
208
212
  }, {
209
213
  "menu-button": Y(() => [
210
- a("div", ts, [
211
- g(P, { name: "more_vert" }),
212
- a("span", os, l(u(d)("auditLog.modules.more")), 1)
214
+ a("div", rs, [
215
+ h(E, { name: "more_vert" }),
216
+ a("span", is, l(u(d)("auditLog.modules.more")), 1)
213
217
  ])
214
218
  ]),
215
219
  default: Y(() => [
216
- (f(!0), v(z, null, ce(j.value, (k) => (f(), Oe(H, {
217
- key: k.value,
218
- "model-value": t.modelValue === k.value,
219
- label: k.label,
220
- disabled: k.disabled,
221
- onClick: (X) => T(k.value)
220
+ (f(!0), v(z, null, ce(D.value, (I) => (f(), Ce(H, {
221
+ key: I.value,
222
+ "model-value": t.modelValue === I.value,
223
+ label: I.label,
224
+ disabled: I.disabled,
225
+ onClick: (X) => F(I.value)
222
226
  }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
223
227
  ]),
224
228
  _: 1
225
- }, 8, ["show-menu"])) : F("", !0),
229
+ }, 8, ["show-menu"])) : M("", !0),
226
230
  a("div", {
227
231
  ref_key: "measurerRef",
228
- ref: y,
232
+ ref: g,
229
233
  "aria-hidden": "true",
230
234
  class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
231
235
  }, [
232
- (f(!0), v(z, null, ce(t.items, (k) => (f(), v("div", {
233
- key: `measure-${k.value}`,
236
+ (f(!0), v(z, null, ce(t.items, (I) => (f(), v("div", {
237
+ key: `measure-${I.value}`,
234
238
  "data-tab-measure": ""
235
239
  }, [
236
- g(B, {
240
+ h(B, {
237
241
  "model-value": t.modelValue,
238
- label: k.label,
239
- badge: k.badge,
240
- disabled: k.disabled,
241
- value: k.value
242
+ label: I.label,
243
+ badge: I.badge,
244
+ disabled: I.disabled,
245
+ value: I.value
242
246
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
243
247
  ]))), 128)),
244
- a("div", ss, [
245
- g(P, { name: "more_vert" }),
246
- a("span", as, l(u(d)("auditLog.modules.more")), 1)
248
+ a("div", us, [
249
+ h(E, { name: "more_vert" }),
250
+ a("span", ds, l(u(d)("auditLog.modules.more")), 1)
247
251
  ])
248
252
  ], 512)
249
253
  ], 512);
250
254
  };
251
255
  }
252
- }), ls = Bo("team", () => {
253
- const t = S([]), o = S(!1), n = S(!1), r = I(
254
- () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.name]))
255
- ), d = I(
256
- () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.email]))
257
- ), h = I(
258
- () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.phoneNumber]))
256
+ }), fs = qo("hrm-team", () => {
257
+ const t = w([]), o = w(!1), n = w(!1), r = A(
258
+ () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.name]))
259
+ ), d = A(
260
+ () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.email]))
261
+ ), y = A(
262
+ () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.phoneNumber]))
259
263
  );
260
- async function b({ force: y = !1 } = {}) {
261
- if (!(!y && t.value.length > 0))
264
+ async function _({ force: g = !1 } = {}) {
265
+ if (!(!g && t.value.length > 0))
262
266
  try {
263
267
  o.value = !0;
264
- const A = await Go.readTeamMembers();
265
- t.value = A.sort((C, i) => C.doc.isOwner ? -1 : C.name.localeCompare(i.name)), n.value = !0;
268
+ const S = await Zo.readTeamMembers();
269
+ t.value = S.sort((O, i) => O.doc.isOwner ? -1 : O.name.localeCompare(i.name)), n.value = !0;
266
270
  } finally {
267
271
  o.value = !1;
268
272
  }
@@ -273,39 +277,93 @@ const es = {
273
277
  hasLoaded: n,
274
278
  userIdToName: r,
275
279
  userIdToEmail: d,
276
- userIdToPhone: h,
277
- readTeamMembers: b
280
+ userIdToPhone: y,
281
+ readTeamMembers: _
278
282
  };
279
283
  });
280
- function rs(t) {
284
+ function ms(t) {
281
285
  const o = t.indexOf(".");
282
286
  return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
283
287
  }
284
- function Dt(t) {
288
+ function Ot(t) {
285
289
  const o = t.split("-").join(" ");
286
290
  return o.charAt(0).toUpperCase() + o.slice(1);
287
291
  }
288
- function is(t, o, n) {
292
+ function vs(t, o, n) {
289
293
  const r = t(o, n);
290
294
  return r === o ? null : r;
291
295
  }
292
296
  function ut(t, o) {
293
297
  const { eventKey: n, params: r, operationLabel: d } = o;
294
298
  if (n) {
295
- const h = is(t, `auditLog.event.sentence.${n}`, r);
296
- if (h) return h;
297
- const b = rs(n);
298
- if (b) {
299
- const y = `${Dt(b.verb)} ${Dt(b.entity)}`, A = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
300
- return A !== void 0 && A !== "" ? `${y} — ${A}` : y;
299
+ const y = vs(t, `auditLog.event.sentence.${n}`, r);
300
+ if (y) return y;
301
+ const _ = ms(n);
302
+ if (_) {
303
+ const g = `${Ot(_.verb)} ${Ot(_.entity)}`, S = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
304
+ return S !== void 0 && S !== "" ? `${g} — ${S}` : g;
301
305
  }
302
306
  }
303
307
  return d ?? "";
304
308
  }
305
- function be(t) {
309
+ function ps({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
310
+ const d = ss(), y = as(), { t: _ } = dt(), g = ns();
311
+ let S = 0;
312
+ function O(x) {
313
+ const { traceId: D, ...F } = d.query;
314
+ (D ?? void 0) !== x && y.replace({ query: x ? { ...F, traceId: x } : F });
315
+ }
316
+ function i(x) {
317
+ O(x.traceId || void 0);
318
+ }
319
+ function V() {
320
+ S++, O(void 0);
321
+ }
322
+ async function P(x) {
323
+ var b;
324
+ if (((b = o.value) == null ? void 0 : b.traceId) === x) return;
325
+ const D = ++S;
326
+ let F = t.value.find((T) => T.traceId === x);
327
+ if (!F) {
328
+ try {
329
+ [F] = await Oe.read({ traceId: x, limit: 1 });
330
+ } catch {
331
+ D === S && g.error(_("auditLog.deepLink.loadFailed"));
332
+ return;
333
+ }
334
+ if (D !== S) return;
335
+ }
336
+ if (!F) {
337
+ g.error(_("auditLog.deepLink.notFound")), O(void 0);
338
+ return;
339
+ }
340
+ o.value = F, n.value = !0;
341
+ }
342
+ oe(
343
+ () => [d.query.traceId, r()],
344
+ ([x, D], F) => {
345
+ var b;
346
+ if (F != null && F[1] && D !== F[1]) {
347
+ S++, n.value = !1, o.value = null, O(void 0);
348
+ return;
349
+ }
350
+ typeof x == "string" && x ? D && P(x) : (S++, (b = o.value) != null && b.traceId && n.value && (n.value = !1, o.value = null));
351
+ },
352
+ { immediate: !0 }
353
+ );
354
+ async function m() {
355
+ try {
356
+ await navigator.clipboard.writeText(window.location.href), g.success(_("auditLog.detail.linkCopied"));
357
+ } catch {
358
+ g.error(_("auditLog.detail.linkCopyFailed"));
359
+ }
360
+ }
361
+ return { onSheetOpened: i, onSheetClosed: V, copyLink: m };
362
+ }
363
+ function _e(t) {
306
364
  return typeof t == "object" && t !== null && !Array.isArray(t);
307
365
  }
308
- function Ce(t) {
366
+ function Te(t) {
309
367
  return Array.isArray(t);
310
368
  }
311
369
  function Be(t) {
@@ -318,28 +376,28 @@ function Be(t) {
318
376
  }
319
377
  return String(t);
320
378
  }
321
- function us(t, o) {
379
+ function gs(t, o) {
322
380
  return t ? `${t}.${o}` : o;
323
381
  }
324
- function Ot(t) {
382
+ function Ct(t) {
325
383
  if (typeof t != "string") return { ok: !1, value: void 0 };
326
384
  const o = t.trim();
327
385
  if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
328
386
  try {
329
387
  const n = JSON.parse(o);
330
- return be(n) || Ce(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
388
+ return _e(n) || Te(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
331
389
  } catch {
332
390
  return { ok: !1, value: void 0 };
333
391
  }
334
392
  }
335
- const ds = ["_id", "id", "subject", "key", "name"];
336
- function cs(t, o) {
393
+ const hs = ["_id", "id", "subject", "key", "name"];
394
+ function ys(t, o) {
337
395
  if (t.length === 0 || o.length === 0) return null;
338
- const n = (d, h) => d.every((b) => be(b) && b[h] !== void 0), r = (d, h) => {
339
- const b = d.map((y) => y[h]);
340
- return b.length === new Set(b).size;
396
+ const n = (d, y) => d.every((_) => _e(_) && _[y] !== void 0), r = (d, y) => {
397
+ const _ = d.map((g) => g[y]);
398
+ return _.length === new Set(_).size;
341
399
  };
342
- for (const d of ds)
400
+ for (const d of hs)
343
401
  if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
344
402
  return d;
345
403
  return null;
@@ -350,104 +408,104 @@ function Pt(t, o, n) {
350
408
  function Et(t, o, n) {
351
409
  n.push({ path: t, type: "removed", before: Be(o), after: null });
352
410
  }
353
- function fs(t, o, n, r) {
411
+ function bs(t, o, n, r) {
354
412
  const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
355
- for (const h of Array.from(d)) {
356
- const b = Object.prototype.hasOwnProperty.call(o, h), y = Object.prototype.hasOwnProperty.call(n, h);
357
- Ye(us(t, h), o[h], b, n[h], y, r);
413
+ for (const y of Array.from(d)) {
414
+ const _ = Object.prototype.hasOwnProperty.call(o, y), g = Object.prototype.hasOwnProperty.call(n, y);
415
+ Ye(gs(t, y), o[y], _, n[y], g, r);
358
416
  }
359
417
  }
360
- function ms(t, o, n, r) {
361
- const d = cs(o, n);
418
+ function _s(t, o, n, r) {
419
+ const d = ys(o, n);
362
420
  if (d) {
363
421
  const m = new Map(
364
- o.map((_) => [_[d], _])
365
- ), w = new Map(
366
- n.map((_) => [_[d], _])
367
- ), j = Array.from(m.keys()).concat(Array.from(w.keys())), T = Array.from(new Set(j));
368
- for (const _ of T) {
369
- const D = m.has(_), B = w.has(_), P = `${t}[${String(_)}]`;
422
+ o.map((b) => [b[d], b])
423
+ ), x = new Map(
424
+ n.map((b) => [b[d], b])
425
+ ), D = Array.from(m.keys()).concat(Array.from(x.keys())), F = Array.from(new Set(D));
426
+ for (const b of F) {
427
+ const T = m.has(b), B = x.has(b), E = `${t}[${String(b)}]`;
370
428
  Ye(
371
- P,
372
- m.get(_),
373
- D,
374
- w.get(_),
429
+ E,
430
+ m.get(b),
431
+ T,
432
+ x.get(b),
375
433
  B,
376
434
  r
377
435
  );
378
436
  }
379
437
  return;
380
438
  }
381
- const h = o.map((m, w) => ({ sig: JSON.stringify(m), idx: w, item: m })), b = n.map((m, w) => ({ sig: JSON.stringify(m), idx: w, item: m })), y = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
382
- for (const m of h)
383
- y.has(m.sig) || y.set(m.sig, []), y.get(m.sig).push(m);
384
- for (const m of b)
385
- A.has(m.sig) || A.set(m.sig, []), A.get(m.sig).push(m);
386
- const C = [], i = [], V = Array.from(y.keys()).concat(Array.from(A.keys())), R = Array.from(new Set(V));
387
- for (const m of R) {
388
- const w = y.get(m) || [], j = A.get(m) || [], T = Math.min(w.length, j.length);
389
- for (let _ = T; _ < w.length; _++)
390
- C.push({ idx: w[_].idx, item: w[_].item });
391
- for (let _ = T; _ < j.length; _++)
392
- i.push({ idx: j[_].idx, item: j[_].item });
439
+ const y = o.map((m, x) => ({ sig: JSON.stringify(m), idx: x, item: m })), _ = n.map((m, x) => ({ sig: JSON.stringify(m), idx: x, item: m })), g = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
440
+ for (const m of y)
441
+ g.has(m.sig) || g.set(m.sig, []), g.get(m.sig).push(m);
442
+ for (const m of _)
443
+ S.has(m.sig) || S.set(m.sig, []), S.get(m.sig).push(m);
444
+ const O = [], i = [], V = Array.from(g.keys()).concat(Array.from(S.keys())), P = Array.from(new Set(V));
445
+ for (const m of P) {
446
+ const x = g.get(m) || [], D = S.get(m) || [], F = Math.min(x.length, D.length);
447
+ for (let b = F; b < x.length; b++)
448
+ O.push({ idx: x[b].idx, item: x[b].item });
449
+ for (let b = F; b < D.length; b++)
450
+ i.push({ idx: D[b].idx, item: D[b].item });
393
451
  }
394
- for (const { idx: m, item: w } of C)
395
- Et(`${t}[${m}]`, w, r);
396
- for (const { idx: m, item: w } of i)
397
- Pt(`${t}[${m}]`, w, r);
452
+ for (const { idx: m, item: x } of O)
453
+ Et(`${t}[${m}]`, x, r);
454
+ for (const { idx: m, item: x } of i)
455
+ Pt(`${t}[${m}]`, x, r);
398
456
  }
399
- function Ye(t, o, n, r, d, h) {
457
+ function Ye(t, o, n, r, d, y) {
400
458
  if (!n && !d) return;
401
459
  if (n && !d) {
402
- Et(t, o, h);
460
+ Et(t, o, y);
403
461
  return;
404
462
  }
405
463
  if (!n && d) {
406
- Pt(t, r, h);
464
+ Pt(t, r, y);
407
465
  return;
408
466
  }
409
467
  if (JSON.stringify(o) === JSON.stringify(r)) return;
410
- if (be(o) && be(r)) {
411
- fs(t, o, r, h);
468
+ if (_e(o) && _e(r)) {
469
+ bs(t, o, r, y);
412
470
  return;
413
471
  }
414
- if (Ce(o) && Ce(r)) {
415
- ms(t, o, r, h);
472
+ if (Te(o) && Te(r)) {
473
+ _s(t, o, r, y);
416
474
  return;
417
475
  }
418
- const b = Ot(o), y = Ot(r);
419
- if (b.ok && y.ok) {
420
- Ye(t, b.value, !0, y.value, !0, h);
476
+ const _ = Ct(o), g = Ct(r);
477
+ if (_.ok && g.ok) {
478
+ Ye(t, _.value, !0, g.value, !0, y);
421
479
  return;
422
480
  }
423
- h.push({
481
+ y.push({
424
482
  path: t,
425
483
  type: "changed",
426
484
  before: Be(o),
427
485
  after: Be(r)
428
486
  });
429
487
  }
430
- function vs(t, o) {
488
+ function xs(t, o) {
431
489
  if (JSON.stringify(t) === JSON.stringify(o)) return [];
432
490
  const n = t == null, r = o == null;
433
491
  let d = t;
434
- n && (be(o) ? d = {} : Ce(o) && (d = []));
435
- let h = o;
436
- r && (be(t) ? h = {} : Ce(t) && (h = []));
437
- const b = [];
438
- return Ye("", d, !0, h, !0, b), b;
492
+ n && (_e(o) ? d = {} : Te(o) && (d = []));
493
+ let y = o;
494
+ r && (_e(t) ? y = {} : Te(t) && (y = []));
495
+ const _ = [];
496
+ return Ye("", d, !0, y, !0, _), _;
439
497
  }
440
- function Ct(t) {
498
+ function Tt(t) {
441
499
  const o = t.operations;
442
500
  return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
443
501
  }
444
502
  function lt(t, o) {
445
- var d, h;
503
+ var d, y;
446
504
  if (t.source === "hrm-validate") return o("auditLog.pos.device.posV7");
447
- const n = (h = (d = t.metadata) == null ? void 0 : d.pos) == null ? void 0 : h.posMode, r = t.deviceId || "-";
505
+ const n = (y = (d = t.metadata) == null ? void 0 : d.pos) == null ? void 0 : y.posMode, r = t.deviceId || "-";
448
506
  return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
449
507
  }
450
- function ps(t, o) {
508
+ function Ls(t, o) {
451
509
  var r;
452
510
  const n = t.actorName || t.userId || "-";
453
511
  return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
@@ -460,394 +518,394 @@ function jt(t, o) {
460
518
  const r = ((d = t.metadata) == null ? void 0 : d.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
461
519
  return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
462
520
  }
463
- function gs(t, o) {
521
+ function ks(t, o) {
464
522
  const n = t.approverName || t.approverId;
465
523
  return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
466
524
  }
467
- function hs(t, o, n) {
525
+ function Ss(t, o, n) {
468
526
  return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
469
527
  userIds: t.filter((r) => r !== n),
470
528
  feedmeAdminActors: t.includes(n)
471
529
  };
472
530
  }
473
- function ye(t) {
531
+ function be(t) {
474
532
  return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
475
533
  }
476
- function ys(t) {
534
+ function ws(t) {
477
535
  return {
478
536
  label: t.label,
479
537
  labelKey: t.labelKey,
480
538
  type: t.type,
481
- beforeDisplay: ye(t.before),
482
- afterDisplay: ye(t.after)
539
+ beforeDisplay: be(t.before),
540
+ afterDisplay: be(t.after)
483
541
  };
484
542
  }
485
- function bs(t) {
543
+ function Is(t) {
486
544
  return Array.isArray(t) && t.length > 0;
487
545
  }
488
- function Nt(t, o, n) {
546
+ function Rt(t, o, n) {
489
547
  return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
490
548
  }
491
- function Rt(t, o) {
549
+ function Nt(t, o) {
492
550
  return ut(t, o) || t("auditLog.operation.unlabeled");
493
551
  }
494
- function _s(t, o) {
552
+ function As(t, o) {
495
553
  return !o || o.length === 0 ? "" : o.map((n) => {
496
- const r = Rt(t, n), d = t(`auditLog.outcome.${n.status}`);
497
- let h = `${r}: ${d}`;
498
- return n.status === "failed" && n.errorMessage && (h += ` — ${n.errorMessage}`), h;
554
+ const r = Nt(t, n), d = t(`auditLog.outcome.${n.status}`);
555
+ let y = `${r}: ${d}`;
556
+ return n.status === "failed" && n.errorMessage && (y += ` — ${n.errorMessage}`), y;
499
557
  }).join(`
500
558
  `);
501
559
  }
502
- function xs(t, o, n) {
503
- const r = Nt(t, o, n);
504
- return n.type === "add" ? `${r}: + ${ye(n.after)}` : n.type === "remove" ? `${r}: - ${ye(n.before)}` : `${r}: ${ye(n.before)} → ${ye(n.after)}`;
560
+ function Fs(t, o, n) {
561
+ const r = Rt(t, o, n);
562
+ return n.type === "add" ? `${r}: + ${be(n.after)}` : n.type === "remove" ? `${r}: - ${be(n.before)}` : `${r}: ${be(n.before)} → ${be(n.after)}`;
505
563
  }
506
- function Ls(t, o, n) {
564
+ function Ms(t, o, n) {
507
565
  if (!n || n.length === 0) return "";
508
- const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
566
+ const r = n.filter((_) => _.changeNodes && _.changeNodes.length > 0);
509
567
  if (r.length === 0) return "";
510
568
  const d = r.length > 1;
511
- return r.map((b) => {
512
- const y = (b.changeNodes ?? []).map((A) => xs(t, o, A));
513
- return d ? [`[${Rt(t, b)}]`, ...y].join(`
514
- `) : y.join(`
569
+ return r.map((_) => {
570
+ const g = (_.changeNodes ?? []).map((S) => Fs(t, o, S));
571
+ return d ? [`[${Nt(t, _)}]`, ...g].join(`
572
+ `) : g.join(`
515
573
  `);
516
574
  }).join(`
517
575
  `);
518
576
  }
519
- const Ss = {
577
+ const Ds = {
520
578
  class: "flex flex-col gap-4 p-12 w-[260px]"
521
- }, ks = {
579
+ }, Os = {
522
580
  class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
523
- }, ws = {
581
+ }, Cs = {
524
582
  class: "flex min-h-0 flex-1 flex-col gap-16"
525
- }, Is = {
583
+ }, Ts = {
526
584
  class: "space-y-16"
527
- }, As = {
585
+ }, js = {
528
586
  class: "flex flex-wrap items-center gap-8"
529
- }, Fs = {
587
+ }, Vs = {
530
588
  key: 0,
531
589
  class: "w-fit"
532
- }, Ms = {
590
+ }, $s = {
533
591
  key: 1,
534
592
  class: "w-fit"
535
- }, Ds = {
593
+ }, Ps = {
536
594
  class: "w-fit"
537
- }, Os = {
595
+ }, Es = {
538
596
  class: "w-fit"
539
- }, Cs = {
597
+ }, Rs = {
540
598
  key: 2,
541
599
  class: "w-fit"
542
- }, js = {
600
+ }, Ns = {
543
601
  class: "flex h-full flex-col overflow-auto"
544
- }, Ts = {
602
+ }, Us = {
545
603
  key: 0,
546
604
  class: "space-y-12 p-4 text-sm"
547
- }, Vs = {
605
+ }, Ks = {
548
606
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
549
- }, $s = {
607
+ }, Bs = {
550
608
  class: "min-w-0 flex-1"
551
- }, Ps = {
609
+ }, Ys = {
552
610
  class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
553
- }, Es = {
611
+ }, zs = {
554
612
  key: 0,
555
613
  class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
556
- }, Ns = {
614
+ }, qs = {
557
615
  key: 1,
558
616
  class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
559
- }, Rs = {
617
+ }, Js = {
560
618
  class: "flex items-center gap-4"
561
- }, Us = {
619
+ }, Hs = {
562
620
  class: "rounded-lg border border-fm-color-border-default p-12"
563
- }, Ks = {
621
+ }, Ws = {
564
622
  class: "space-y-12"
565
- }, Bs = {
623
+ }, Gs = {
566
624
  class: "text-xs text-fm-color-typo-secondary"
567
- }, Ys = {
625
+ }, Xs = {
568
626
  class: "font-semibold"
569
- }, zs = {
627
+ }, Qs = {
570
628
  class: "text-xs text-fm-color-typo-secondary"
571
- }, qs = {
629
+ }, Zs = {
572
630
  class: "font-semibold"
573
- }, Js = {
631
+ }, ea = {
574
632
  class: "text-xs text-fm-color-typo-secondary"
575
- }, Hs = {
633
+ }, ta = {
576
634
  class: "break-all font-semibold"
577
- }, Ws = {
635
+ }, oa = {
578
636
  key: 0
579
- }, Gs = {
637
+ }, sa = {
580
638
  class: "text-xs text-fm-color-typo-secondary"
581
- }, Xs = {
639
+ }, aa = {
582
640
  class: "break-all font-mono text-xs font-semibold"
583
- }, Qs = {
641
+ }, na = {
584
642
  class: "text-xs text-fm-color-typo-secondary"
585
- }, Zs = {
643
+ }, la = {
586
644
  class: "break-all font-mono text-xs font-semibold"
587
- }, ea = {
645
+ }, ra = {
588
646
  class: "text-xs text-fm-color-typo-secondary"
589
- }, ta = {
647
+ }, ia = {
590
648
  class: "font-semibold"
591
- }, oa = {
649
+ }, ua = {
592
650
  class: "rounded-lg border border-fm-color-border-default"
593
- }, sa = {
651
+ }, da = {
594
652
  class: "p-12"
595
- }, aa = {
653
+ }, ca = {
596
654
  class: "text-base font-bold text-fm-color-typo-primary"
597
- }, na = {
655
+ }, fa = {
598
656
  class: "space-y-12 p-12"
599
- }, la = {
657
+ }, ma = {
600
658
  class: "text-xs text-fm-color-typo-secondary"
601
- }, ra = {
659
+ }, va = {
602
660
  class: "font-semibold"
603
- }, ia = {
661
+ }, pa = {
604
662
  class: "rounded-lg border border-fm-color-border-default"
605
- }, ua = {
663
+ }, ga = {
606
664
  class: "p-12"
607
- }, da = {
665
+ }, ha = {
608
666
  class: "text-base font-bold text-fm-color-typo-primary"
609
- }, ca = {
667
+ }, ya = {
610
668
  class: "space-y-12 p-12"
611
- }, fa = {
669
+ }, ba = {
612
670
  class: "text-xs text-fm-color-typo-secondary"
613
- }, ma = {
671
+ }, _a = {
614
672
  class: "font-semibold"
615
- }, va = {
673
+ }, xa = {
616
674
  key: 0
617
- }, pa = {
675
+ }, La = {
618
676
  class: "text-xs text-fm-color-typo-secondary"
619
- }, ga = {
677
+ }, ka = {
620
678
  key: 0,
621
679
  class: "font-semibold"
622
- }, ha = {
680
+ }, Sa = {
623
681
  key: 1,
624
682
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
625
- }, ya = {
683
+ }, wa = {
626
684
  key: 1
627
- }, ba = {
685
+ }, Ia = {
628
686
  class: "text-xs text-fm-color-typo-secondary"
629
- }, _a = {
687
+ }, Aa = {
630
688
  class: "font-semibold whitespace-pre-line"
631
- }, xa = {
689
+ }, Fa = {
632
690
  class: "text-xs text-fm-color-typo-secondary"
633
- }, La = {
691
+ }, Ma = {
634
692
  class: "font-semibold"
635
- }, Sa = {
693
+ }, Da = {
636
694
  class: "text-xs text-fm-color-typo-secondary"
637
- }, ka = {
695
+ }, Oa = {
638
696
  class: "break-all font-mono text-xs font-semibold"
639
- }, wa = {
697
+ }, Ca = {
640
698
  class: "text-xs text-fm-color-typo-secondary"
641
- }, Ia = {
699
+ }, Ta = {
642
700
  class: "break-all font-mono text-xs font-semibold"
643
- }, Aa = {
701
+ }, ja = {
644
702
  class: "text-xs text-fm-color-typo-secondary"
645
- }, Fa = {
703
+ }, Va = {
646
704
  class: "font-semibold"
647
- }, Ma = {
705
+ }, $a = {
648
706
  key: 0,
649
707
  class: "break-all font-mono text-xs"
650
- }, Da = {
708
+ }, Pa = {
651
709
  key: 0
652
- }, Oa = {
710
+ }, Ea = {
653
711
  class: "text-xs text-fm-color-typo-secondary"
654
- }, Ca = {
712
+ }, Ra = {
655
713
  class: "font-semibold"
656
- }, ja = {
714
+ }, Na = {
657
715
  class: "text-xs text-fm-color-typo-secondary"
658
- }, Ta = {
716
+ }, Ua = {
659
717
  class: "font-semibold"
660
- }, Va = {
718
+ }, Ka = {
661
719
  class: "text-xs text-fm-color-typo-secondary"
662
- }, $a = {
720
+ }, Ba = {
663
721
  class: "font-semibold"
664
- }, Pa = {
722
+ }, Ya = {
665
723
  key: 0
666
- }, Ea = {
724
+ }, za = {
667
725
  key: 1
668
- }, Na = {
726
+ }, qa = {
669
727
  class: "text-xs text-fm-color-typo-secondary"
670
- }, Ra = {
728
+ }, Ja = {
671
729
  class: "whitespace-pre-wrap break-all font-mono text-xs"
672
- }, Ua = {
730
+ }, Ha = {
673
731
  key: 3
674
- }, Ka = {
732
+ }, Wa = {
675
733
  class: "text-xs text-fm-color-typo-secondary"
676
- }, Ba = {
734
+ }, Ga = {
677
735
  class: "mt-4 space-y-4"
678
- }, Ya = {
736
+ }, Xa = {
679
737
  class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
680
- }, za = {
738
+ }, Qa = {
681
739
  class: "text-xs font-semibold"
682
- }, qa = {
740
+ }, Za = {
683
741
  key: 0,
684
742
  class: "text-fm-color-typo-secondary"
685
- }, Ja = {
743
+ }, en = {
686
744
  key: 4
687
- }, Ha = {
745
+ }, tn = {
688
746
  class: "text-xs text-fm-color-typo-secondary"
689
- }, Wa = {
747
+ }, on = {
690
748
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
691
- }, Ga = {
749
+ }, sn = {
692
750
  key: 0,
693
751
  class: "space-y-12 p-4 text-sm"
694
- }, Xa = {
752
+ }, an = {
695
753
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
696
- }, Qa = {
754
+ }, nn = {
697
755
  class: "min-w-0 flex-1"
698
- }, Za = {
756
+ }, ln = {
699
757
  class: "text-base font-bold leading-snug text-fm-color-typo-primary"
700
- }, en = {
758
+ }, rn = {
701
759
  key: 0,
702
760
  class: "text-xs text-fm-color-typo-secondary"
703
- }, tn = {
761
+ }, un = {
704
762
  class: "rounded-lg border border-fm-color-border-default p-12"
705
- }, on = {
763
+ }, dn = {
706
764
  class: "space-y-12"
707
- }, sn = {
765
+ }, cn = {
708
766
  class: "text-xs text-fm-color-typo-secondary"
709
- }, an = {
767
+ }, fn = {
710
768
  class: "font-semibold"
711
- }, nn = {
769
+ }, mn = {
712
770
  key: 0
713
- }, ln = {
771
+ }, vn = {
714
772
  class: "text-xs text-fm-color-typo-secondary"
715
- }, rn = {
773
+ }, pn = {
716
774
  class: "font-semibold"
717
- }, un = {
775
+ }, gn = {
718
776
  key: 1
719
- }, dn = {
777
+ }, hn = {
720
778
  class: "text-xs text-fm-color-typo-secondary"
721
- }, cn = {
779
+ }, yn = {
722
780
  class: "font-semibold"
723
- }, fn = {
781
+ }, bn = {
724
782
  key: 0,
725
783
  class: "rounded-lg border border-fm-color-border-default p-12"
726
- }, mn = {
784
+ }, _n = {
727
785
  class: "text-xs text-fm-color-typo-secondary"
728
- }, vn = {
786
+ }, xn = {
729
787
  class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
730
- }, pn = {
788
+ }, Ln = {
731
789
  class: "rounded-lg border border-fm-color-border-default"
732
- }, gn = {
790
+ }, kn = {
733
791
  class: "p-12"
734
- }, hn = {
792
+ }, Sn = {
735
793
  class: "text-base font-bold text-fm-color-typo-primary"
736
- }, yn = {
794
+ }, wn = {
737
795
  class: "p-12"
738
- }, bn = {
796
+ }, In = {
739
797
  key: 0,
740
798
  class: "divide-y divide-fm-color-border-default"
741
- }, _n = {
799
+ }, An = {
742
800
  class: "flex flex-wrap items-center gap-8"
743
- }, xn = {
801
+ }, Fn = {
744
802
  class: "break-all text-xs"
745
- }, Ln = {
803
+ }, Mn = {
746
804
  class: "break-all font-mono text-xs"
747
- }, Sn = {
805
+ }, Dn = {
748
806
  key: 0,
749
807
  class: "text-fm-color-typo-success"
750
- }, kn = {
808
+ }, On = {
751
809
  key: 1,
752
810
  class: "text-fm-color-typo-error"
753
- }, wn = {
811
+ }, Cn = {
754
812
  class: "text-fm-color-typo-error"
755
- }, In = {
813
+ }, Tn = {
756
814
  class: "text-fm-color-typo-success"
757
- }, An = {
815
+ }, jn = {
758
816
  key: 1,
759
817
  class: "divide-y divide-fm-color-border-default"
760
- }, Fn = {
818
+ }, Vn = {
761
819
  class: "flex flex-wrap items-center gap-8"
762
- }, Mn = {
820
+ }, $n = {
763
821
  class: "break-all font-mono text-xs"
764
- }, Dn = {
822
+ }, Pn = {
765
823
  class: "space-y-4"
766
- }, On = {
824
+ }, En = {
767
825
  key: 0,
768
826
  class: "text-fm-color-typo-success"
769
- }, Cn = {
827
+ }, Rn = {
770
828
  key: 1,
771
829
  class: "text-fm-color-typo-error"
772
- }, jn = {
830
+ }, Nn = {
773
831
  class: "text-fm-color-typo-error"
774
- }, Tn = {
832
+ }, Un = {
775
833
  class: "text-fm-color-typo-success"
776
- }, Vn = {
834
+ }, Kn = {
777
835
  key: 2,
778
836
  class: "text-fm-color-typo-secondary"
779
- }, $n = {
837
+ }, Bn = {
780
838
  key: 1,
781
839
  class: "rounded-lg border border-fm-color-border-default"
782
- }, Pn = {
840
+ }, Yn = {
783
841
  class: "text-base font-bold text-fm-color-typo-primary"
784
- }, En = {
842
+ }, zn = {
785
843
  class: "space-y-12 p-12"
786
- }, Nn = {
844
+ }, qn = {
787
845
  key: 0
788
- }, Rn = {
846
+ }, Jn = {
789
847
  class: "text-xs text-fm-color-typo-secondary"
790
- }, Un = {
848
+ }, Hn = {
791
849
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
792
- }, Kn = {
850
+ }, Wn = {
793
851
  key: 1
794
- }, Bn = {
852
+ }, Gn = {
795
853
  class: "text-xs text-fm-color-typo-secondary"
796
- }, Yn = {
854
+ }, Xn = {
797
855
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
798
- }, De = 100, rt = 1e3, it = "__feedmeAdmin__", zn = "D MMM YYYY h:mm A", qn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Tt = "audit-log-export-fields-v3", Jn = /* @__PURE__ */ Vt({
856
+ }, De = 100, rt = 1e3, it = "__feedmeAdmin__", Qn = "D MMM YYYY h:mm A", Zn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Vt = "audit-log-export-fields-v3", el = /* @__PURE__ */ $t({
799
857
  __name: "AuditLogList",
800
858
  setup(t) {
801
859
  const {
802
860
  t: o,
803
861
  te: n
804
- } = $t(), r = zo(), d = ls(), h = Xo(), {
805
- restaurants: b
806
- } = Yo(h), y = S(!1), A = S(!1), C = S([]), i = S(null), V = S(!1), R = S({}), m = S(null), w = S(!1);
807
- async function j(e) {
808
- const s = Uint8Array.from(atob(e), (L) => L.charCodeAt(0)), c = new DecompressionStream("gzip"), x = c.writable.getWriter();
809
- return await x.write(s), await x.close(), new Response(c.readable).text();
862
+ } = dt(), r = Ho(), d = fs(), y = es(), {
863
+ restaurants: _
864
+ } = Jo(y), g = w(!1), S = w(!1), O = w([]), i = w(null), V = w(!1), P = w({}), m = w(null), x = w(!1);
865
+ async function D(e) {
866
+ const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), c = new DecompressionStream("gzip"), L = c.writable.getWriter();
867
+ return await L.write(s), await L.close(), new Response(c.readable).text();
810
868
  }
811
- const T = S("");
812
- let _ = 0;
813
- ie(() => {
869
+ const F = w("");
870
+ let b = 0;
871
+ oe(() => {
814
872
  var e, s;
815
873
  return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
816
874
  }, async (e) => {
817
- const s = ++_;
875
+ const s = ++b;
818
876
  if (!e) {
819
- T.value = "";
877
+ F.value = "";
820
878
  return;
821
879
  }
822
880
  if (typeof e == "object") {
823
- T.value = JSON.stringify(e, null, 2);
881
+ F.value = JSON.stringify(e, null, 2);
824
882
  return;
825
883
  }
826
884
  if (e.startsWith("gzip:")) {
827
885
  try {
828
- const c = await j(e.slice(5));
829
- if (s !== _) return;
830
- T.value = JSON.stringify(JSON.parse(c), null, 2);
886
+ const c = await D(e.slice(5));
887
+ if (s !== b) return;
888
+ F.value = JSON.stringify(JSON.parse(c), null, 2);
831
889
  } catch {
832
- if (s !== _) return;
833
- T.value = e;
890
+ if (s !== b) return;
891
+ F.value = e;
834
892
  }
835
893
  return;
836
894
  }
837
895
  try {
838
- T.value = JSON.stringify(JSON.parse(e), null, 2);
896
+ F.value = JSON.stringify(JSON.parse(e), null, 2);
839
897
  } catch {
840
- T.value = e;
898
+ F.value = e;
841
899
  }
842
900
  }, {
843
901
  immediate: !0
844
902
  });
845
- async function D(e) {
903
+ async function T(e) {
846
904
  if (!e) return;
847
905
  let s = e;
848
906
  if (e.startsWith("gzip:"))
849
907
  try {
850
- s = await j(e.slice(5));
908
+ s = await D(e.slice(5));
851
909
  } catch {
852
910
  return e;
853
911
  }
@@ -867,140 +925,152 @@ const Ss = {
867
925
  }
868
926
  return String(e);
869
927
  }
870
- const P = S([]), H = S([]), U = S(""), k = S(""), X = S(!1);
928
+ const E = w([]), H = w([]), U = w(""), I = w(""), X = w(!1);
871
929
  let ue = 0;
872
- ie(m, async (e) => {
930
+ oe(m, async (e) => {
873
931
  const s = ++ue;
874
- if (P.value = [], H.value = [], U.value = "", k.value = "", X.value = !1, !e) return;
875
- const [c, x] = await Promise.all([D(e.before), D(e.after)]);
876
- s === ue && (bs(e.changeNodes) ? H.value = e.changeNodes.map(ys) : P.value = vs(c, x), U.value = B(c), k.value = B(x));
932
+ if (E.value = [], H.value = [], U.value = "", I.value = "", X.value = !1, !e) return;
933
+ const [c, L] = await Promise.all([T(e.before), T(e.after)]);
934
+ s === ue && (Is(e.changeNodes) ? H.value = e.changeNodes.map(ws) : E.value = xs(c, L), U.value = B(c), I.value = B(L));
877
935
  });
878
936
  function je(e) {
879
937
  return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
880
938
  }
881
- function dt(e) {
939
+ function ct(e) {
882
940
  return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
883
941
  }
884
942
  function W(e) {
885
943
  return e.replace(/\[[^\]]*\]/g, "");
886
944
  }
887
- function _e(e) {
945
+ function xe(e) {
888
946
  return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
889
947
  }
890
948
  function Ut(e) {
891
949
  return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
892
950
  }
893
951
  function Kt(e) {
894
- return Nt(o, n, e);
952
+ return Rt(o, n, e);
895
953
  }
896
- const ct = I(() => {
954
+ const ft = A(() => {
897
955
  const e = [], s = /* @__PURE__ */ new Map();
898
- for (const c of P.value) {
899
- const x = W(c.path), L = `${c.type}::${x}`;
900
- let M = s.get(L);
901
- M || (M = {
902
- groupKey: L,
903
- displayKey: x,
956
+ for (const c of E.value) {
957
+ const L = W(c.path), k = `${c.type}::${L}`;
958
+ let C = s.get(k);
959
+ C || (C = {
960
+ groupKey: k,
961
+ displayKey: L,
904
962
  type: c.type,
905
963
  rows: []
906
- }, s.set(L, M), e.push(M)), M.rows.push(c);
964
+ }, s.set(k, C), e.push(C)), C.rows.push(c);
907
965
  }
908
966
  return e;
909
- }), Te = S(1), Bt = S(!1), ze = S(0), ft = I(() => Math.max(1, Math.ceil(ze.value / De))), mt = O().format("YYYY-MM-DD"), oe = S({
910
- startDate: `${mt} 00:00`,
911
- endDate: `${mt} 23:59`
912
- }), fe = S(), Q = S(), se = S(), ae = S(), ne = S("all");
967
+ }), Ve = w(1), Bt = w(!1), ze = w(0), mt = A(() => Math.max(1, Math.ceil(ze.value / De))), vt = j().format("YYYY-MM-DD"), se = w({
968
+ startDate: `${vt} 00:00`,
969
+ endDate: `${vt} 23:59`
970
+ }), fe = w(), Q = w(), ae = w(), ne = w(), le = w("all");
913
971
  function Yt(e) {
914
972
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
915
973
  }
916
- const vt = Me.filter((e) => e.key !== "all").map((e) => e.key);
917
- function Ve(e) {
918
- const s = Me.find((c) => c.key !== "all" && c.subjectPrefixes.some((x) => e.startsWith(x)));
974
+ const pt = Me.filter((e) => e.key !== "all").map((e) => e.key);
975
+ function $e(e) {
976
+ const s = Me.find((c) => c.key !== "all" && c.subjectPrefixes.some((L) => e.startsWith(L)));
919
977
  return (s == null ? void 0 : s.key) ?? "other";
920
978
  }
921
- function pt(e) {
922
- const s = vt.indexOf(e);
923
- return s === -1 ? vt.length : s;
979
+ function gt(e) {
980
+ const s = pt.indexOf(e);
981
+ return s === -1 ? pt.length : s;
924
982
  }
925
- const zt = I(() => Me.map(({
983
+ const zt = A(() => Me.map(({
926
984
  key: e
927
985
  }) => ({
928
986
  label: o(`auditLog.modules.${e}`),
929
987
  value: e
930
- }))), $e = I(() => Me.find((e) => e.key === ne.value) ?? Me[0]), qt = I(() => ne.value === "all"), q = I(() => ne.value === "pos"), pe = I(() => $e.value.sources ?? []);
931
- ie(q, (e) => {
932
- e && h.readRestaurants();
988
+ }))), Pe = A(() => Me.find((e) => e.key === le.value) ?? Me[0]), qt = A(() => le.value === "all"), q = A(() => le.value === "pos"), pe = A(() => Pe.value.sources ?? []);
989
+ oe(q, (e) => {
990
+ e && y.readRestaurants();
933
991
  }, {
934
992
  immediate: !0
935
993
  });
936
- const Z = S([]), Jt = I(() => b.value.map((e) => ({
994
+ const Z = w([]), Jt = A(() => _.value.map((e) => ({
937
995
  label: e.profile.name,
938
996
  value: String(e._id)
939
- }))), Ht = I(() => Object.fromEntries(b.value.map((e) => [String(e._id), e.profile.name])));
940
- ie(ne, () => {
997
+ }))), Ht = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
998
+ oe(le, () => {
941
999
  Z.value = [];
942
1000
  });
943
- const xe = S([]), Pe = S(!1), Wt = I(() => [...Pe.value ? [{
1001
+ const Le = w([]), Ee = w(!1), Wt = A(() => [...Ee.value ? [{
944
1002
  label: o("auditLog.user.feedmeAdmin"),
945
1003
  value: it
946
1004
  }] : [], ...d.members.map((e) => ({
947
1005
  label: e.name,
948
1006
  value: e.doc.userId
949
- })), ...xe.value.map((e) => ({
1007
+ })), ...Le.value.map((e) => ({
950
1008
  label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
951
1009
  value: e.userId
952
- }))]), le = I(() => hs(fe.value, q.value, it)), qe = S(""), ee = S(""), Gt = Qo(qe, (e) => {
1010
+ }))]), re = A(() => Ss(fe.value, q.value, it)), qe = w(""), ee = w(""), Gt = ts(qe, (e) => {
953
1011
  ee.value = e.trim();
954
1012
  });
955
- Uo(Gt);
956
- const me = I(() => {
1013
+ Yo(Gt);
1014
+ const {
1015
+ onSheetOpened: Xt,
1016
+ onSheetClosed: Qt,
1017
+ copyLink: Zt
1018
+ } = ps({
1019
+ logs: O,
1020
+ selectedLog: i,
1021
+ isSheetOpen: V,
1022
+ businessId: () => {
1023
+ var e;
1024
+ return (e = r.currentBusiness.value) == null ? void 0 : e._id;
1025
+ }
1026
+ }), me = A(() => {
957
1027
  const e = ee.value.toLowerCase();
958
1028
  if (!e) return [];
959
1029
  const s = /* @__PURE__ */ new Set();
960
1030
  for (const c of d.members) {
961
- const x = c.doc.userId;
962
- ((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
1031
+ const L = c.doc.userId;
1032
+ ((d.userIdToName[L] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[L] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[L] ?? "").toLowerCase().includes(e)) && s.add(L);
963
1033
  }
964
- for (const c of xe.value)
1034
+ for (const c of Le.value)
965
1035
  c.name.toLowerCase().includes(e) && s.add(c.userId);
966
1036
  return [...s];
967
- }), Je = I(() => {
968
- const e = Mt.flatMap((L) => Yt(L.subject).map((M) => ({
969
- label: L.label,
970
- value: M
971
- }))), s = Object.entries(Ft).map(([L, M]) => ({
972
- label: M,
973
- value: L
974
- })), c = /* @__PURE__ */ new Set(), x = [];
975
- for (const L of [...e, ...s])
976
- if (!c.has(L.value)) {
977
- c.add(L.value);
978
- const M = Ve(L.value);
979
- x.push({
980
- ...L,
981
- group: o(`auditLog.modules.${M}`)
1037
+ }), Je = A(() => {
1038
+ const e = Dt.flatMap((k) => Yt(k.subject).map((C) => ({
1039
+ label: k.label,
1040
+ value: C
1041
+ }))), s = Object.entries(Mt).map(([k, C]) => ({
1042
+ label: C,
1043
+ value: k
1044
+ })), c = /* @__PURE__ */ new Set(), L = [];
1045
+ for (const k of [...e, ...s])
1046
+ if (!c.has(k.value)) {
1047
+ c.add(k.value);
1048
+ const C = $e(k.value);
1049
+ L.push({
1050
+ ...k,
1051
+ group: o(`auditLog.modules.${C}`)
982
1052
  });
983
1053
  }
984
- return x.sort((L, M) => pt(Ve(L.value)) - pt(Ve(M.value)));
985
- }), ge = I(() => {
1054
+ return L.sort((k, C) => gt($e(k.value)) - gt($e(C.value)));
1055
+ }), ge = A(() => {
986
1056
  const e = ee.value.toLowerCase();
987
1057
  if (!e) return [];
988
1058
  const s = /* @__PURE__ */ new Set();
989
1059
  for (const c of Je.value)
990
1060
  c.label.toLowerCase().includes(e) && s.add(c.value);
991
1061
  return [...s];
992
- }), Xt = I(() => qt.value ? Je.value : Je.value.filter((e) => Ve(e.value) === ne.value));
993
- function Qt(e, s) {
1062
+ }), eo = A(() => qt.value ? Je.value : Je.value.filter((e) => $e(e.value) === le.value));
1063
+ function to(e, s) {
994
1064
  const c = s.toLowerCase();
995
1065
  return e.label.toLowerCase().includes(c) || e.value.replace(/^business::/, "").toLowerCase().includes(c) ? !0 : e.value.toLowerCase().includes(c);
996
1066
  }
997
- const G = I(() => ({
1067
+ const G = A(() => ({
998
1068
  manage: o("auditLog.action.manage"),
999
1069
  create: o("auditLog.action.create"),
1000
1070
  read: o("auditLog.action.read"),
1001
1071
  update: o("auditLog.action.update"),
1002
1072
  delete: o("auditLog.action.delete")
1003
- })), Zt = I(() => [{
1073
+ })), oo = A(() => [{
1004
1074
  label: G.value.manage,
1005
1075
  value: "manage"
1006
1076
  }, {
@@ -1015,30 +1085,30 @@ const Ss = {
1015
1085
  }, {
1016
1086
  label: G.value.delete,
1017
1087
  value: "delete"
1018
- }]), Ee = I(() => ({
1088
+ }]), Re = A(() => ({
1019
1089
  allowed: o("auditLog.outcome.success"),
1020
1090
  denied: o("auditLog.outcome.failed"),
1021
1091
  skipped: o("auditLog.outcome.skipped")
1022
- })), He = I(() => {
1092
+ })), He = A(() => {
1023
1093
  var e;
1024
1094
  return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
1025
1095
  });
1026
- function gt(e) {
1096
+ function ht(e) {
1027
1097
  return !He.value && e === "skipped" ? "allowed" : e;
1028
1098
  }
1029
1099
  function We(e) {
1030
1100
  return !(e != null && e.length) || He.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
1031
1101
  }
1032
- const eo = I(() => [{
1033
- label: Ee.value.allowed,
1102
+ const so = A(() => [{
1103
+ label: Re.value.allowed,
1034
1104
  value: "allowed"
1035
1105
  }, {
1036
- label: Ee.value.denied,
1106
+ label: Re.value.denied,
1037
1107
  value: "denied"
1038
1108
  }, ...He.value ? [{
1039
- label: Ee.value.skipped,
1109
+ label: Re.value.skipped,
1040
1110
  value: "skipped"
1041
- }] : []]), to = I(() => ({
1111
+ }] : []]), ao = A(() => ({
1042
1112
  admin: o("auditLog.detail.resolvedFromValue.admin"),
1043
1113
  staff: o("auditLog.detail.resolvedFromValue.staff"),
1044
1114
  permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
@@ -1046,124 +1116,124 @@ const Ss = {
1046
1116
  custom: o("auditLog.detail.resolvedFromValue.custom"),
1047
1117
  "no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
1048
1118
  unknown: o("auditLog.detail.resolvedFromValue.unknown")
1049
- })), oo = I(() => ({
1119
+ })), no = A(() => ({
1050
1120
  GET: G.value.read,
1051
1121
  POST: G.value.create,
1052
1122
  PUT: G.value.update,
1053
1123
  PATCH: G.value.update,
1054
1124
  DELETE: G.value.delete
1055
- })), so = {
1125
+ })), lo = {
1056
1126
  allowed: "success",
1057
1127
  denied: "critical",
1058
1128
  skipped: "warning"
1059
1129
  };
1060
1130
  function Ne(e) {
1061
- return O(e).format(zn);
1131
+ return j(e).format(Qn);
1062
1132
  }
1063
- const ao = I(() => {
1133
+ const ro = A(() => {
1064
1134
  const {
1065
1135
  startDate: e,
1066
1136
  endDate: s
1067
- } = oe.value;
1137
+ } = se.value;
1068
1138
  return e && s ? `${Ne(e)} – ${Ne(s)}` : e ? Ne(e) : s ? Ne(s) : o("auditLog.dateRange.placeholder");
1069
- }), no = I(() => [{
1139
+ }), io = A(() => [{
1070
1140
  label: o("date.predefinedRanges.today"),
1071
1141
  value: {
1072
- startDate: O().format(K),
1073
- endDate: O().format(K)
1142
+ startDate: j().format(K),
1143
+ endDate: j().format(K)
1074
1144
  }
1075
1145
  }, {
1076
1146
  label: o("date.predefinedRanges.yesterday"),
1077
1147
  value: {
1078
- startDate: O().subtract(1, "day").format(K),
1079
- endDate: O().subtract(1, "day").format(K)
1148
+ startDate: j().subtract(1, "day").format(K),
1149
+ endDate: j().subtract(1, "day").format(K)
1080
1150
  }
1081
1151
  }, {
1082
1152
  label: o("date.predefinedRanges.thisWeek"),
1083
1153
  value: {
1084
- startDate: O().startOf("week").format(K),
1085
- endDate: O().endOf("week").format(K)
1154
+ startDate: j().startOf("week").format(K),
1155
+ endDate: j().endOf("week").format(K)
1086
1156
  }
1087
1157
  }, {
1088
1158
  label: o("date.predefinedRanges.lastWeek"),
1089
1159
  value: {
1090
- startDate: O().subtract(1, "week").startOf("week").format(K),
1091
- endDate: O().subtract(1, "week").endOf("week").format(K)
1160
+ startDate: j().subtract(1, "week").startOf("week").format(K),
1161
+ endDate: j().subtract(1, "week").endOf("week").format(K)
1092
1162
  }
1093
1163
  }, {
1094
1164
  label: o("date.predefinedRanges.last7Days"),
1095
1165
  value: {
1096
- startDate: O().subtract(7, "day").format(K),
1097
- endDate: O().subtract(1, "day").format(K)
1166
+ startDate: j().subtract(7, "day").format(K),
1167
+ endDate: j().subtract(1, "day").format(K)
1098
1168
  }
1099
1169
  }, {
1100
1170
  label: o("date.predefinedRanges.thisMonth"),
1101
1171
  value: {
1102
- startDate: O().startOf("month").format(K),
1103
- endDate: O().endOf("month").format(K)
1172
+ startDate: j().startOf("month").format(K),
1173
+ endDate: j().endOf("month").format(K)
1104
1174
  }
1105
1175
  }, {
1106
1176
  label: o("date.predefinedRanges.lastMonth"),
1107
1177
  value: {
1108
- startDate: O().subtract(1, "month").startOf("month").format(K),
1109
- endDate: O().subtract(1, "month").endOf("month").format(K)
1178
+ startDate: j().subtract(1, "month").startOf("month").format(K),
1179
+ endDate: j().subtract(1, "month").endOf("month").format(K)
1110
1180
  }
1111
1181
  }]);
1112
1182
  function Ge(e) {
1113
1183
  var s;
1114
- return ((s = Mt.find((c) => c.subject === e)) == null ? void 0 : s.label) ?? Ft[e] ?? es[e];
1184
+ return ((s = Dt.find((c) => c.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? ls[e];
1115
1185
  }
1116
- function Le(e) {
1117
- var c, x;
1186
+ function ke(e) {
1187
+ var c, L;
1118
1188
  if (e.actorType === "posUser")
1119
- return ps(e, o);
1189
+ return Ls(e, o);
1120
1190
  if (e.actorType === "portalUser")
1121
1191
  return e.actorName ?? e.userId;
1122
1192
  if (e.actorType === "feedmeAdmin")
1123
1193
  return (c = r.sessionUser.value) != null && c.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1124
1194
  const s = d.userIdToName[e.userId];
1125
- return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1195
+ return s || (d.hasLoaded ? (L = r.sessionUser.value) != null && L.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1126
1196
  }
1127
- function ht(e) {
1197
+ function yt(e) {
1128
1198
  return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
1129
1199
  }
1130
- function lo(e) {
1200
+ function uo(e) {
1131
1201
  return d.userIdToEmail[e.userId] || "-";
1132
1202
  }
1133
- function yt(e) {
1134
- return O(e).format("DD MMM YYYY, HH:mm");
1203
+ function bt(e) {
1204
+ return j(e).format("DD MMM YYYY, HH:mm");
1135
1205
  }
1136
1206
  function Xe(e) {
1137
- return O(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1207
+ return j(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1138
1208
  }
1139
- function bt(e) {
1209
+ function _t(e) {
1140
1210
  return G.value[e] ?? e;
1141
1211
  }
1142
- function _t(e) {
1212
+ function xt(e) {
1143
1213
  const s = ut(o, {
1144
1214
  eventKey: e.eventKey,
1145
1215
  params: e.params,
1146
- operationLabel: e.metadata.operationLabel ?? bt(e.action)
1216
+ operationLabel: e.metadata.operationLabel ?? _t(e.action)
1147
1217
  });
1148
- return e.actorType === "posUser" && !q.value ? s + gs(e, o) : s;
1218
+ return e.actorType === "posUser" && !q.value ? s + ks(e, o) : s;
1149
1219
  }
1150
- function xt(e) {
1220
+ function Lt(e) {
1151
1221
  return ut(o, e) || o("auditLog.operation.unlabeled");
1152
1222
  }
1153
- function ro(e) {
1223
+ function co(e) {
1154
1224
  return Ge(e.subject) ?? e.subject;
1155
1225
  }
1156
1226
  function Qe(e) {
1157
- return Ee.value[gt(e)];
1227
+ return Re.value[ht(e)];
1158
1228
  }
1159
- function Lt(e) {
1160
- return so[gt(e)] ?? "neutral";
1229
+ function kt(e) {
1230
+ return lo[ht(e)] ?? "neutral";
1161
1231
  }
1162
- function io(e) {
1163
- return to.value[e] ?? e;
1232
+ function fo(e) {
1233
+ return ao.value[e] ?? e;
1164
1234
  }
1165
- function uo(e) {
1166
- return e.metadata.requestMethod ? oo.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : bt(e.action);
1235
+ function mo(e) {
1236
+ return e.metadata.requestMethod ? no.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
1167
1237
  }
1168
1238
  function St(e) {
1169
1239
  const s = String(e ?? "");
@@ -1172,17 +1242,17 @@ const Ss = {
1172
1242
  const Ze = [{
1173
1243
  key: "timestamp",
1174
1244
  labelKey: "auditLog.exportFields.timestamp",
1175
- getValue: (e) => yt(e.timestamp),
1245
+ getValue: (e) => bt(e.timestamp),
1176
1246
  defaultSelected: !0
1177
1247
  }, {
1178
1248
  key: "userName",
1179
1249
  labelKey: "auditLog.exportFields.userName",
1180
- getValue: (e) => Le(e),
1250
+ getValue: (e) => ke(e),
1181
1251
  defaultSelected: !0
1182
1252
  }, {
1183
1253
  key: "userPhone",
1184
1254
  labelKey: "auditLog.exportFields.userPhone",
1185
- getValue: (e) => ht(e),
1255
+ getValue: (e) => yt(e),
1186
1256
  defaultSelected: !0
1187
1257
  }, {
1188
1258
  key: "subject",
@@ -1197,7 +1267,7 @@ const Ss = {
1197
1267
  }, {
1198
1268
  key: "operation",
1199
1269
  labelKey: "auditLog.exportFields.operation",
1200
- getValue: (e) => _t(e),
1270
+ getValue: (e) => xt(e),
1201
1271
  defaultSelected: !0
1202
1272
  }, {
1203
1273
  key: "outcome",
@@ -1207,12 +1277,12 @@ const Ss = {
1207
1277
  }, {
1208
1278
  key: "operationEvents",
1209
1279
  labelKey: "auditLog.exportFields.operationEvents",
1210
- getValue: (e) => _s(o, e.operations),
1280
+ getValue: (e) => As(o, e.operations),
1211
1281
  defaultSelected: !0
1212
1282
  }, {
1213
1283
  key: "changes",
1214
1284
  labelKey: "auditLog.exportFields.changes",
1215
- getValue: (e) => Ls(o, n, e.operations),
1285
+ getValue: (e) => Ms(o, n, e.operations),
1216
1286
  defaultSelected: !1
1217
1287
  }, {
1218
1288
  key: "businessId",
@@ -1259,9 +1329,9 @@ const Ss = {
1259
1329
  getValue: (e) => e.traceId ?? "",
1260
1330
  defaultSelected: !1
1261
1331
  }];
1262
- function co() {
1332
+ function vo() {
1263
1333
  try {
1264
- const e = localStorage.getItem(Tt);
1334
+ const e = localStorage.getItem(Vt);
1265
1335
  if (e) {
1266
1336
  const s = JSON.parse(e);
1267
1337
  if (Array.isArray(s) && s.length > 0) return new Set(s);
@@ -1270,8 +1340,8 @@ const Ss = {
1270
1340
  }
1271
1341
  return new Set(Ze.filter((e) => e.defaultSelected).map((e) => e.key));
1272
1342
  }
1273
- const he = S(co());
1274
- function fo(e) {
1343
+ const he = w(vo());
1344
+ function po(e) {
1275
1345
  const s = new Set(he.value);
1276
1346
  if (s.has(e)) {
1277
1347
  if (s.size <= 1) return;
@@ -1280,34 +1350,34 @@ const Ss = {
1280
1350
  s.add(e);
1281
1351
  he.value = s;
1282
1352
  try {
1283
- localStorage.setItem(Tt, JSON.stringify([...s]));
1353
+ localStorage.setItem(Vt, JSON.stringify([...s]));
1284
1354
  } catch {
1285
1355
  }
1286
1356
  }
1287
- async function mo() {
1288
- var e, s, c, x, L;
1289
- if (!A.value) {
1290
- A.value = !0;
1357
+ async function go() {
1358
+ var e, s, c, L, k;
1359
+ if (!S.value) {
1360
+ S.value = !0;
1291
1361
  try {
1292
1362
  const {
1293
- startDate: M,
1294
- endDate: E
1295
- } = oe.value, re = $e.value.subjectPrefixes, Re = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ke = E ? de(E) : null, Ue = ke && ke < Re ? ke : Re, tt = {
1296
- ...M ? {
1297
- from: de(M)
1363
+ startDate: C,
1364
+ endDate: R
1365
+ } = se.value, ie = Pe.value.subjectPrefixes, Ue = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), we = R ? de(R) : null, Ke = we && we < Ue ? we : Ue, tt = {
1366
+ ...C ? {
1367
+ from: de(C)
1298
1368
  } : {},
1299
- to: Ue,
1300
- ...le.value.userIds.length ? {
1301
- userIds: le.value.userIds
1369
+ to: Ke,
1370
+ ...re.value.userIds.length ? {
1371
+ userIds: re.value.userIds
1302
1372
  } : {},
1303
- ...le.value.feedmeAdminActors ? {
1373
+ ...re.value.feedmeAdminActors ? {
1304
1374
  feedmeAdminActors: !0
1305
1375
  } : {},
1306
1376
  ...(e = Q.value) != null && e.length ? {
1307
1377
  subjects: Q.value
1308
1378
  } : {},
1309
- ...re.length ? {
1310
- subjectPrefixes: [...re]
1379
+ ...ie.length ? {
1380
+ subjectPrefixes: [...ie]
1311
1381
  } : {},
1312
1382
  ...pe.value.length ? {
1313
1383
  sources: [...pe.value]
@@ -1315,11 +1385,11 @@ const Ss = {
1315
1385
  ...q.value && Z.value.length ? {
1316
1386
  restaurantIds: [...Z.value]
1317
1387
  } : {},
1318
- ...(s = ae.value) != null && s.length ? {
1319
- actions: ae.value
1388
+ ...(s = ne.value) != null && s.length ? {
1389
+ actions: ne.value
1320
1390
  } : {},
1321
- ...(c = se.value) != null && c.length ? {
1322
- outcomes: We(se.value)
1391
+ ...(c = ae.value) != null && c.length ? {
1392
+ outcomes: We(ae.value)
1323
1393
  } : {},
1324
1394
  ...ee.value ? {
1325
1395
  search: ee.value
@@ -1330,36 +1400,36 @@ const Ss = {
1330
1400
  ...ge.value.length ? {
1331
1401
  searchSubjects: ge.value
1332
1402
  } : {}
1333
- }, we = [];
1403
+ }, Ie = [];
1334
1404
  let p = 0;
1335
1405
  for (; ; ) {
1336
- const J = await Ke.read({
1406
+ const J = await Oe.read({
1337
1407
  ...tt,
1338
1408
  limit: rt,
1339
1409
  offset: p
1340
1410
  });
1341
- if (we.push(...J), J.length < rt) break;
1411
+ if (Ie.push(...J), J.length < rt) break;
1342
1412
  p += rt;
1343
1413
  }
1344
- const $ = Ze.filter((J) => he.value.has(J.key)), Ao = $.map((J) => o(J.labelKey)), Fo = we.map((J) => $.map((Po) => Po.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Mo = ot >= 0 ? "+" : "-", Do = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), Oo = String(Math.abs(ot) % 60).padStart(2, "0"), Co = `UTC${Mo}${Do}:${Oo}`, It = ((x = r.currentBusiness.value) == null ? void 0 : x.name) || "", jo = [M, E].filter(Boolean).join(" – "), To = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${jo}`], ...It ? [[`${o("auditLog.frontMatter.business")}: ${It}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${O().format("DD MMM YYYY, HH:mm")} (${Co})`], []].map((J) => J.map(St).join(",")), ...[Ao, ...Fo].map((J) => J.map(St).join(","))].join(`
1345
- `), Vo = `audit-log_${(((L = r.currentBusiness.value) == null ? void 0 : L.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${O().format("YYYYMMDD_HHmmss")}.csv`, $o = new Blob([`\uFEFF${To}`], {
1414
+ const $ = Ze.filter((J) => he.value.has(J.key)), Do = $.map((J) => o(J.labelKey)), Oo = Ie.map((J) => $.map((No) => No.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Vo = `UTC${Co}${To}:${jo}`, At = ((L = r.currentBusiness.value) == null ? void 0 : L.name) || "", $o = [C, R].filter(Boolean).join(" – "), Po = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${$o}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${j().format("DD MMM YYYY, HH:mm")} (${Vo})`], []].map((J) => J.map(St).join(",")), ...[Do, ...Oo].map((J) => J.map(St).join(","))].join(`
1415
+ `), Eo = `audit-log_${(((k = r.currentBusiness.value) == null ? void 0 : k.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${j().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${Po}`], {
1346
1416
  type: "text/csv;charset=utf-8;"
1347
- }), At = window.URL.createObjectURL($o), Ie = document.createElement("a");
1348
- Ie.href = At, Ie.download = Vo, document.body.appendChild(Ie), Ie.click(), Ie.remove(), window.URL.revokeObjectURL(At);
1417
+ }), Ft = window.URL.createObjectURL(Ro), Ae = document.createElement("a");
1418
+ Ae.href = Ft, Ae.download = Eo, document.body.appendChild(Ae), Ae.click(), Ae.remove(), window.URL.revokeObjectURL(Ft);
1349
1419
  } finally {
1350
- A.value = !1;
1420
+ S.value = !1;
1351
1421
  }
1352
1422
  }
1353
1423
  }
1354
1424
  function te(e) {
1355
1425
  return "status" in e;
1356
1426
  }
1357
- function vo(e) {
1358
- return Ct(e) ? g(ve.FmTooltip, {
1427
+ function ho(e) {
1428
+ return Tt(e) ? h(ve.FmTooltip, {
1359
1429
  variant: "plain",
1360
1430
  placement: "top"
1361
1431
  }, {
1362
- default: () => g(ve.FmIcon, {
1432
+ default: () => h(ve.FmIcon, {
1363
1433
  name: "error",
1364
1434
  size: "sm",
1365
1435
  class: "cursor-help text-fm-color-typo-error"
@@ -1367,19 +1437,19 @@ const Ss = {
1367
1437
  content: () => o("auditLog.operation.partialFailure")
1368
1438
  }) : null;
1369
1439
  }
1370
- function po(e) {
1440
+ function yo(e) {
1371
1441
  var c;
1372
1442
  const s = e.original;
1373
1443
  return e.depth === 0 && !te(s) && !!((c = s.operations) != null && c.length);
1374
1444
  }
1375
- function go(e) {
1445
+ function bo(e) {
1376
1446
  return te(e) ? void 0 : e.operations;
1377
1447
  }
1378
1448
  const Se = [{
1379
1449
  accessorKey: "timestamp",
1380
1450
  header: () => o("auditLog.columns.timestamp"),
1381
1451
  cell(e) {
1382
- return yt(e.row.original.timestamp);
1452
+ return bt(e.row.original.timestamp);
1383
1453
  }
1384
1454
  }, {
1385
1455
  accessorKey: "userId",
@@ -1388,27 +1458,27 @@ const Ss = {
1388
1458
  size: 220,
1389
1459
  cell(e) {
1390
1460
  const s = e.row.original;
1391
- return te(s) ? null : g("div", {
1461
+ return te(s) ? null : h("div", {
1392
1462
  class: "flex items-center gap-8"
1393
- }, [g(ve.FmAvatar, {
1394
- name: Le(s),
1395
- initials: Zo(Le(s)),
1463
+ }, [h(ve.FmAvatar, {
1464
+ name: ke(s),
1465
+ initials: os(ke(s)),
1396
1466
  size: "sm",
1397
1467
  class: "shrink-0"
1398
- }, null), g("div", {
1468
+ }, null), h("div", {
1399
1469
  class: "min-w-0"
1400
- }, [g("p", {
1470
+ }, [h("p", {
1401
1471
  class: "truncate font-semibold"
1402
- }, [Le(s)]), g("p", {
1472
+ }, [ke(s)]), h("p", {
1403
1473
  class: "truncate text-fm-color-typo-secondary"
1404
- }, [ht(s)])])]);
1474
+ }, [yt(s)])])]);
1405
1475
  }
1406
1476
  }, {
1407
1477
  accessorKey: "subject",
1408
1478
  header: () => o("auditLog.columns.subject"),
1409
1479
  cell(e) {
1410
1480
  const s = e.row.original;
1411
- return te(s) ? g("span", {
1481
+ return te(s) ? h("span", {
1412
1482
  class: "text-fm-color-typo-secondary"
1413
1483
  }, [o("auditLog.operation.rowHint")]) : Ge(s.subject) ?? s.subject;
1414
1484
  }
@@ -1421,41 +1491,41 @@ const Ss = {
1421
1491
  cellSpanClass: "audit-log-action-label"
1422
1492
  },
1423
1493
  cell(e) {
1424
- var E;
1494
+ var R;
1425
1495
  const s = e.row.original;
1426
1496
  if (te(s))
1427
- return g("span", {
1497
+ return h("span", {
1428
1498
  class: "audit-op-marker flex flex-wrap items-baseline gap-4"
1429
- }, [g("span", {
1499
+ }, [h("span", {
1430
1500
  class: "text-fm-color-typo-secondary"
1431
- }, [Ae("↳")]), g("span", {
1501
+ }, [ye("↳")]), h("span", {
1432
1502
  class: "font-semibold"
1433
- }, [xt(s)]), s.entityId ? g("span", {
1503
+ }, [Lt(s)]), s.entityId ? h("span", {
1434
1504
  class: "text-fm-color-typo-secondary"
1435
- }, [Ae("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? g("span", {
1505
+ }, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? h("span", {
1436
1506
  class: "text-fm-color-typo-error"
1437
- }, [Ae("· "), s.errorMessage]) : null]);
1438
- const c = ((E = s.operations) == null ? void 0 : E.length) ?? 0, x = (re) => {
1439
- re.stopPropagation(), e.row.getToggleExpandedHandler()();
1440
- }, L = {
1507
+ }, [ye("· "), s.errorMessage]) : null]);
1508
+ const c = ((R = s.operations) == null ? void 0 : R.length) ?? 0, L = (ie) => {
1509
+ ie.stopPropagation(), e.row.getToggleExpandedHandler()();
1510
+ }, k = {
1441
1511
  variant: "tertiary",
1442
1512
  icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
1443
1513
  "aria-label": o("auditLog.operation.toggle"),
1444
1514
  class: "ml-auto shrink-0",
1445
- onClick: x
1446
- }, M = ve.FmButton;
1447
- return g("span", {
1515
+ onClick: L
1516
+ }, C = ve.FmButton;
1517
+ return h("span", {
1448
1518
  class: "flex items-center gap-8"
1449
- }, [g("span", null, [_t(s)]), c > 0 ? g("span", {
1519
+ }, [h("span", null, [xt(s)]), c > 0 ? h("span", {
1450
1520
  class: "cursor-pointer",
1451
- onClick: x
1452
- }, [g(ve.FmChip, {
1521
+ onClick: L
1522
+ }, [h(ve.FmChip, {
1453
1523
  variant: "neutral",
1454
1524
  compact: !0,
1455
1525
  label: o("auditLog.operation.badge", {
1456
1526
  count: c
1457
1527
  })
1458
- }, null)]) : null, e.row.getCanExpand() ? g(M, L, null) : null]);
1528
+ }, null)]) : null, e.row.getCanExpand() ? h(C, k, null) : null]);
1459
1529
  }
1460
1530
  }, {
1461
1531
  accessorKey: "outcome",
@@ -1463,19 +1533,19 @@ const Ss = {
1463
1533
  enableSorting: !1,
1464
1534
  cell(e) {
1465
1535
  const s = e.row.original;
1466
- return te(s) ? g(ve.FmChip, {
1536
+ return te(s) ? h(ve.FmChip, {
1467
1537
  variant: s.status === "failed" ? "critical" : "success",
1468
1538
  label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1469
1539
  compact: !0
1470
- }, null) : g("span", {
1540
+ }, null) : h("span", {
1471
1541
  class: "flex items-center gap-4"
1472
- }, [g(ve.FmChip, {
1473
- variant: Lt(s.outcome),
1542
+ }, [h(ve.FmChip, {
1543
+ variant: kt(s.outcome),
1474
1544
  label: Qe(s.outcome),
1475
1545
  compact: !0
1476
- }, null), vo(s)]);
1546
+ }, null), ho(s)]);
1477
1547
  }
1478
- }], ho = [
1548
+ }], _o = [
1479
1549
  Se[0],
1480
1550
  // timestamp: Date
1481
1551
  Se.find((e) => e.accessorKey === "userId"),
@@ -1511,38 +1581,38 @@ const Ss = {
1511
1581
  // Action Description: event line
1512
1582
  Se.find((e) => e.accessorKey === "outcome")
1513
1583
  // Status
1514
- ], yo = I(() => q.value ? ho : Se);
1584
+ ], xo = A(() => q.value ? _o : Se);
1515
1585
  function de(e) {
1516
- const s = O(e, qn);
1586
+ const s = j(e, Zn);
1517
1587
  return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1518
1588
  }
1519
- async function kt() {
1589
+ async function wt() {
1520
1590
  var e, s, c;
1521
- y.value = !0;
1591
+ g.value = !0;
1522
1592
  try {
1523
1593
  const {
1524
- startDate: x,
1525
- endDate: L
1526
- } = oe.value, M = (Te.value - 1) * De, E = $e.value.subjectPrefixes, re = await Ke.read({
1594
+ startDate: L,
1595
+ endDate: k
1596
+ } = se.value, C = (Ve.value - 1) * De, R = Pe.value.subjectPrefixes, ie = await Oe.read({
1527
1597
  limit: De,
1528
- offset: M,
1529
- ...x ? {
1530
- from: de(x)
1531
- } : {},
1598
+ offset: C,
1532
1599
  ...L ? {
1533
- to: de(L)
1600
+ from: de(L)
1534
1601
  } : {},
1535
- ...le.value.userIds.length ? {
1536
- userIds: le.value.userIds
1602
+ ...k ? {
1603
+ to: de(k)
1537
1604
  } : {},
1538
- ...le.value.feedmeAdminActors ? {
1605
+ ...re.value.userIds.length ? {
1606
+ userIds: re.value.userIds
1607
+ } : {},
1608
+ ...re.value.feedmeAdminActors ? {
1539
1609
  feedmeAdminActors: !0
1540
1610
  } : {},
1541
1611
  ...(e = Q.value) != null && e.length ? {
1542
1612
  subjects: Q.value
1543
1613
  } : {},
1544
- ...E.length ? {
1545
- subjectPrefixes: [...E]
1614
+ ...R.length ? {
1615
+ subjectPrefixes: [...R]
1546
1616
  } : {},
1547
1617
  ...pe.value.length ? {
1548
1618
  sources: [...pe.value]
@@ -1550,11 +1620,11 @@ const Ss = {
1550
1620
  ...q.value && Z.value.length ? {
1551
1621
  restaurantIds: [...Z.value]
1552
1622
  } : {},
1553
- ...(s = ae.value) != null && s.length ? {
1554
- actions: ae.value
1623
+ ...(s = ne.value) != null && s.length ? {
1624
+ actions: ne.value
1555
1625
  } : {},
1556
- ...(c = se.value) != null && c.length ? {
1557
- outcomes: We(se.value)
1626
+ ...(c = ae.value) != null && c.length ? {
1627
+ outcomes: We(ae.value)
1558
1628
  } : {},
1559
1629
  ...ee.value ? {
1560
1630
  search: ee.value
@@ -1566,21 +1636,21 @@ const Ss = {
1566
1636
  searchSubjects: ge.value
1567
1637
  } : {}
1568
1638
  });
1569
- C.value = re, Bt.value = re.length === De, R.value = {};
1639
+ O.value = ie, Bt.value = ie.length === De, P.value = {};
1570
1640
  } finally {
1571
- y.value = !1;
1641
+ g.value = !1;
1572
1642
  }
1573
1643
  }
1574
- const wt = I(() => {
1644
+ const It = A(() => {
1575
1645
  var e;
1576
1646
  return JSON.stringify({
1577
1647
  businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1578
- dateRange: oe.value,
1648
+ dateRange: se.value,
1579
1649
  users: [...fe.value ?? []].sort(),
1580
1650
  subjects: [...Q.value ?? []].sort(),
1581
- outcomes: [...se.value ?? []].sort(),
1582
- actions: [...ae.value ?? []].sort(),
1583
- moduleKey: ne.value,
1651
+ outcomes: [...ae.value ?? []].sort(),
1652
+ actions: [...ne.value ?? []].sort(),
1653
+ moduleKey: le.value,
1584
1654
  restaurantIds: [...Z.value].sort(),
1585
1655
  search: ee.value,
1586
1656
  // Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
@@ -1589,26 +1659,26 @@ const Ss = {
1589
1659
  searchUserIds: [...me.value].sort()
1590
1660
  });
1591
1661
  });
1592
- async function bo() {
1593
- var x, L, M;
1662
+ async function Lo() {
1663
+ var L, k, C;
1594
1664
  const {
1595
1665
  startDate: e,
1596
1666
  endDate: s
1597
- } = oe.value, c = $e.value.subjectPrefixes;
1598
- ze.value = await Ke.count({
1667
+ } = se.value, c = Pe.value.subjectPrefixes;
1668
+ ze.value = await Oe.count({
1599
1669
  ...e ? {
1600
1670
  from: de(e)
1601
1671
  } : {},
1602
1672
  ...s ? {
1603
1673
  to: de(s)
1604
1674
  } : {},
1605
- ...le.value.userIds.length ? {
1606
- userIds: le.value.userIds
1675
+ ...re.value.userIds.length ? {
1676
+ userIds: re.value.userIds
1607
1677
  } : {},
1608
- ...le.value.feedmeAdminActors ? {
1678
+ ...re.value.feedmeAdminActors ? {
1609
1679
  feedmeAdminActors: !0
1610
1680
  } : {},
1611
- ...(x = Q.value) != null && x.length ? {
1681
+ ...(L = Q.value) != null && L.length ? {
1612
1682
  subjects: Q.value
1613
1683
  } : {},
1614
1684
  ...c.length ? {
@@ -1620,11 +1690,11 @@ const Ss = {
1620
1690
  ...q.value && Z.value.length ? {
1621
1691
  restaurantIds: [...Z.value]
1622
1692
  } : {},
1623
- ...(L = ae.value) != null && L.length ? {
1624
- actions: ae.value
1693
+ ...(k = ne.value) != null && k.length ? {
1694
+ actions: ne.value
1625
1695
  } : {},
1626
- ...(M = se.value) != null && M.length ? {
1627
- outcomes: We(se.value)
1696
+ ...(C = ae.value) != null && C.length ? {
1697
+ outcomes: We(ae.value)
1628
1698
  } : {},
1629
1699
  ...ee.value ? {
1630
1700
  search: ee.value
@@ -1637,67 +1707,67 @@ const Ss = {
1637
1707
  } : {}
1638
1708
  });
1639
1709
  }
1640
- ie(wt, async () => {
1710
+ oe(It, async () => {
1641
1711
  var e;
1642
- Te.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([bo(), kt()]);
1712
+ Ve.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([Lo(), wt()]);
1643
1713
  }, {
1644
1714
  immediate: !0
1645
- }), ie(ne, () => {
1715
+ }), oe(le, () => {
1646
1716
  Q.value = void 0, q.value && (fe.value = void 0);
1647
1717
  });
1648
1718
  let et = !1;
1649
- async function _o({
1719
+ async function ko({
1650
1720
  pageIndex: e
1651
1721
  }) {
1652
1722
  var s;
1653
- if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Te.value === 1) && !et) {
1654
- et = !0, Te.value = e + 1;
1723
+ if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Ve.value === 1) && !et) {
1724
+ et = !0, Ve.value = e + 1;
1655
1725
  try {
1656
- await kt();
1726
+ await wt();
1657
1727
  } finally {
1658
1728
  et = !1;
1659
1729
  }
1660
1730
  }
1661
1731
  }
1662
- function xo(e) {
1732
+ function So(e) {
1663
1733
  if (te(e)) {
1664
- So(e);
1734
+ Io(e);
1665
1735
  return;
1666
1736
  }
1667
- i.value = e, V.value = !0;
1737
+ i.value = e, V.value = !0, Xt(e);
1668
1738
  }
1669
- function Lo() {
1670
- V.value = !1, i.value = null;
1739
+ function wo() {
1740
+ V.value = !1, i.value = null, Qt();
1671
1741
  }
1672
- function So(e) {
1673
- m.value = e, w.value = !0;
1742
+ function Io(e) {
1743
+ m.value = e, x.value = !0;
1674
1744
  }
1675
- function ko() {
1676
- w.value = !1, m.value = null;
1745
+ function Ao() {
1746
+ x.value = !1, m.value = null;
1677
1747
  }
1678
- ie(r.currentBusiness, (e) => {
1748
+ oe(r.currentBusiness, (e) => {
1679
1749
  e && d.readTeamMembers();
1680
1750
  }, {
1681
1751
  immediate: !0
1682
1752
  });
1683
- function wo() {
1753
+ function Fo() {
1684
1754
  const e = fe.value;
1685
1755
  if (!(e != null && e.length)) return;
1686
- const s = new Set(xe.value.map((L) => L.userId)), c = new Set(d.members.map((L) => L.doc.userId)), x = e.filter((L) => L === it ? Pe.value : d.hasLoaded ? c.has(L) || s.has(L) : !0);
1687
- x.length !== e.length && (fe.value = x.length ? x : void 0);
1756
+ const s = new Set(Le.value.map((k) => k.userId)), c = new Set(d.members.map((k) => k.doc.userId)), L = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? c.has(k) || s.has(k) : !0);
1757
+ L.length !== e.length && (fe.value = L.length ? L : void 0);
1688
1758
  }
1689
- async function Io() {
1759
+ async function Mo() {
1690
1760
  var c;
1691
1761
  if (!((c = r.currentBusiness.value) != null && c._id)) return;
1692
1762
  const {
1693
1763
  startDate: e,
1694
1764
  endDate: s
1695
- } = oe.value;
1765
+ } = se.value;
1696
1766
  try {
1697
1767
  const {
1698
- actors: x,
1699
- showFeedmeAdminFilter: L
1700
- } = await Ke.getFeedmeAdminFilter({
1768
+ actors: L,
1769
+ showFeedmeAdminFilter: k
1770
+ } = await Oe.getFeedmeAdminFilter({
1701
1771
  ...e ? {
1702
1772
  from: de(e)
1703
1773
  } : {},
@@ -1705,70 +1775,70 @@ const Ss = {
1705
1775
  to: de(s)
1706
1776
  } : {}
1707
1777
  });
1708
- xe.value = x, Pe.value = L;
1778
+ Le.value = L, Ee.value = k;
1709
1779
  } catch {
1710
- xe.value = [], Pe.value = !1;
1780
+ Le.value = [], Ee.value = !1;
1711
1781
  }
1712
- wo();
1782
+ Fo();
1713
1783
  }
1714
- return ie(() => {
1784
+ return oe(() => {
1715
1785
  var e;
1716
1786
  return {
1717
1787
  businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
1718
- range: oe.value
1788
+ range: se.value
1719
1789
  };
1720
- }, () => Io(), {
1790
+ }, () => Mo(), {
1721
1791
  immediate: !0,
1722
1792
  deep: !0
1723
1793
  }), (e, s) => {
1724
- const c = N("FmSpacer"), x = N("FmButton"), L = N("FmMenuItem"), M = N("FmMenu"), E = N("FmChip"), re = N("FmDateRangePicker"), Re = N("FmSearch"), ke = N("FmTable"), Ue = N("FmIcon"), tt = N("FmTooltip"), we = N("FmSideSheet");
1725
- return f(), v(z, null, [g(Ho, {
1794
+ const c = N("FmSpacer"), L = N("FmButton"), k = N("FmMenuItem"), C = N("FmMenu"), R = N("FmChip"), ie = N("FmDateRangePicker"), Ue = N("FmSearch"), we = N("FmTable"), Ke = N("FmIcon"), tt = N("FmTooltip"), Ie = N("FmSideSheet");
1795
+ return f(), v(z, null, [h(Xo, {
1726
1796
  heading: u(o)("auditLog.title")
1727
1797
  }, {
1728
- "append-heading": Y(() => [g(c), g(x, {
1798
+ "append-heading": Y(() => [h(c), h(L, {
1729
1799
  variant: "primary",
1730
1800
  "prepend-icon": "upload",
1731
1801
  label: u(o)("auditLog.export"),
1732
- disabled: C.value.length === 0 || A.value || u(d).isLoading || u(d).members.length === 0,
1733
- loading: A.value,
1734
- onClick: mo
1735
- }, null, 8, ["label", "disabled", "loading"]), g(M, {
1802
+ disabled: O.value.length === 0 || S.value || u(d).isLoading || u(d).members.length === 0,
1803
+ loading: S.value,
1804
+ onClick: go
1805
+ }, null, 8, ["label", "disabled", "loading"]), h(C, {
1736
1806
  "close-on-click": !1,
1737
1807
  "z-index": 50
1738
1808
  }, {
1739
- "menu-button": Y(() => [g(x, {
1809
+ "menu-button": Y(() => [h(L, {
1740
1810
  variant: "tertiary",
1741
1811
  icon: "settings",
1742
1812
  "aria-label": u(o)("auditLog.exportSettings.title"),
1743
- disabled: A.value
1813
+ disabled: S.value
1744
1814
  }, null, 8, ["aria-label", "disabled"])]),
1745
- default: Y(() => [a("div", Ss, [a("p", ks, l(u(o)("auditLog.exportSettings.title")), 1), (f(), v(z, null, ce(Ze, (p) => g(L, {
1815
+ default: Y(() => [a("div", Ds, [a("p", Os, l(u(o)("auditLog.exportSettings.title")), 1), (f(), v(z, null, ce(Ze, (p) => h(k, {
1746
1816
  key: p.key,
1747
1817
  label: u(o)(p.labelKey),
1748
1818
  "has-checkbox": "",
1749
1819
  "model-value": he.value.has(p.key),
1750
1820
  disabled: he.value.has(p.key) && he.value.size === 1,
1751
- onClick: ($) => fo(p.key)
1821
+ onClick: ($) => po(p.key)
1752
1822
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1753
1823
  _: 1
1754
1824
  })]),
1755
- default: Y(() => [a("div", ws, [a("div", Is, [g(ns, {
1756
- modelValue: ne.value,
1757
- "onUpdate:modelValue": s[0] || (s[0] = (p) => ne.value = p),
1825
+ default: Y(() => [a("div", Cs, [a("div", Ts, [h(cs, {
1826
+ modelValue: le.value,
1827
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => le.value = p),
1758
1828
  items: zt.value
1759
- }, null, 8, ["modelValue", "items"]), a("div", As, [g(re, {
1760
- modelValue: oe.value,
1761
- "onUpdate:modelValue": s[1] || (s[1] = (p) => oe.value = p),
1829
+ }, null, 8, ["modelValue", "items"]), a("div", js, [h(ie, {
1830
+ modelValue: se.value,
1831
+ "onUpdate:modelValue": s[1] || (s[1] = (p) => se.value = p),
1762
1832
  "show-predefined-range": "",
1763
1833
  "show-time": "",
1764
- "predefined-range": no.value
1834
+ "predefined-range": io.value
1765
1835
  }, {
1766
- "trigger-button": Y(() => [g(E, {
1767
- label: ao.value,
1836
+ "trigger-button": Y(() => [h(R, {
1837
+ label: ro.value,
1768
1838
  icon: "calendar_month"
1769
1839
  }, null, 8, ["label"])]),
1770
1840
  _: 1
1771
- }, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (f(), v("div", Fs, [g(Fe, {
1841
+ }, 8, ["modelValue", "predefined-range"]), q.value ? M("", !0) : (f(), v("div", Vs, [h(Fe, {
1772
1842
  modelValue: fe.value,
1773
1843
  "onUpdate:modelValue": s[2] || (s[2] = (p) => fe.value = p),
1774
1844
  items: Wt.value,
@@ -1777,36 +1847,36 @@ const Ss = {
1777
1847
  placeholder: u(o)("auditLog.filter.user_placeholder"),
1778
1848
  "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1779
1849
  "chip-icon": "account_circle"
1780
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (f(), v("div", Ms, [g(Fe, {
1850
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? M("", !0) : (f(), v("div", $s, [h(Fe, {
1781
1851
  modelValue: Q.value,
1782
1852
  "onUpdate:modelValue": s[3] || (s[3] = (p) => Q.value = p),
1783
- items: Xt.value,
1784
- "filter-fn": Qt,
1853
+ items: eo.value,
1854
+ "filter-fn": to,
1785
1855
  multiple: "",
1786
1856
  variant: "dark",
1787
1857
  placeholder: u(o)("auditLog.filter.subject_placeholder"),
1788
1858
  "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1789
1859
  "chip-icon": "badge"
1790
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Ds, [g(Fe, {
1791
- modelValue: ae.value,
1792
- "onUpdate:modelValue": s[4] || (s[4] = (p) => ae.value = p),
1793
- items: Zt.value,
1860
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Ps, [h(Fe, {
1861
+ modelValue: ne.value,
1862
+ "onUpdate:modelValue": s[4] || (s[4] = (p) => ne.value = p),
1863
+ items: oo.value,
1794
1864
  multiple: "",
1795
1865
  variant: "dark",
1796
1866
  placeholder: u(o)("auditLog.filter.action_placeholder"),
1797
1867
  "selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
1798
1868
  searchable: !1
1799
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Os, [g(Fe, {
1800
- modelValue: se.value,
1801
- "onUpdate:modelValue": s[5] || (s[5] = (p) => se.value = p),
1802
- items: eo.value,
1869
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Es, [h(Fe, {
1870
+ modelValue: ae.value,
1871
+ "onUpdate:modelValue": s[5] || (s[5] = (p) => ae.value = p),
1872
+ items: so.value,
1803
1873
  multiple: "",
1804
1874
  variant: "dark",
1805
1875
  placeholder: u(o)("auditLog.filter.status_placeholder"),
1806
1876
  "selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
1807
1877
  searchable: !1,
1808
1878
  "chip-icon": "check_circle"
1809
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (f(), v("div", Cs, [g(Fe, {
1879
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (f(), v("div", Rs, [h(Fe, {
1810
1880
  modelValue: Z.value,
1811
1881
  "onUpdate:modelValue": s[6] || (s[6] = (p) => Z.value = p),
1812
1882
  items: Jt.value,
@@ -1815,136 +1885,142 @@ const Ss = {
1815
1885
  placeholder: u(o)("auditLog.filter.restaurant_placeholder"),
1816
1886
  "selected-prefix": u(o)("auditLog.filter.selected_restaurant_prefix"),
1817
1887
  "chip-icon": "storefront"
1818
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), g(Re, {
1888
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : M("", !0), h(Ue, {
1819
1889
  modelValue: qe.value,
1820
1890
  "onUpdate:modelValue": s[7] || (s[7] = (p) => qe.value = p),
1821
1891
  class: "ml-auto w-[280px]",
1822
1892
  placeholder: u(o)("auditLog.search.placeholder")
1823
- }, null, 8, ["modelValue", "placeholder"])])]), g(qo, null, {
1824
- default: Y(() => [a("div", js, [g(Wo, {
1825
- "is-loading": y.value,
1826
- "is-empty": C.value.length === 0,
1893
+ }, null, 8, ["modelValue", "placeholder"])])]), h(Wo, null, {
1894
+ default: Y(() => [a("div", Ns, [h(Qo, {
1895
+ "is-loading": g.value,
1896
+ "is-empty": O.value.length === 0,
1827
1897
  title: u(o)("auditLog.noData.title"),
1828
1898
  subtitle: u(o)("auditLog.noData.subtitle")
1829
1899
  }, {
1830
- default: Y(() => [(f(), Oe(ke, {
1831
- key: wt.value,
1832
- "column-defs": yo.value,
1833
- "row-data": C.value,
1900
+ default: Y(() => [(f(), Ce(we, {
1901
+ key: It.value,
1902
+ "column-defs": xo.value,
1903
+ "row-data": O.value,
1834
1904
  "page-size": De,
1835
- "page-count": ft.value,
1905
+ "page-count": mt.value,
1836
1906
  "row-count": ze.value,
1837
- "fetch-fn": _o,
1838
- "hide-footer": ft.value <= 1,
1839
- loading: y.value,
1840
- "expanded-state": R.value,
1841
- "get-row-can-expand": po,
1842
- "get-sub-row": go,
1907
+ "fetch-fn": ko,
1908
+ "hide-footer": mt.value <= 1,
1909
+ loading: g.value,
1910
+ "expanded-state": P.value,
1911
+ "get-row-can-expand": yo,
1912
+ "get-sub-row": bo,
1843
1913
  "pin-header-row": "",
1844
1914
  class: "audit-log-list-table cursor-pointer",
1845
- "onUpdate:expandedState": s[8] || (s[8] = (p) => R.value = p),
1846
- onRowClick: s[9] || (s[9] = (p) => xo(p.original))
1915
+ "onUpdate:expandedState": s[8] || (s[8] = (p) => P.value = p),
1916
+ onRowClick: s[9] || (s[9] = (p) => So(p.original))
1847
1917
  }, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1848
1918
  _: 1
1849
1919
  }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
1850
1920
  _: 1
1851
1921
  })])]),
1852
1922
  _: 1
1853
- }, 8, ["heading"]), g(we, {
1923
+ }, 8, ["heading"]), h(Ie, {
1854
1924
  header: u(o)("auditLog.detail.header"),
1855
1925
  "model-value": V.value,
1856
1926
  "max-width": 768,
1857
1927
  "dismiss-away": "",
1858
1928
  "onUpdate:modelValue": s[10] || (s[10] = (p) => {
1859
- p || Lo();
1929
+ p || wo();
1860
1930
  })
1861
1931
  }, {
1862
- default: Y(() => [i.value ? (f(), v("div", Ts, [a("div", Vs, [a("div", $s, [a("p", Ps, l(ro(i.value)), 1), i.value.traceId ? (f(), v("p", Es, " Trace ID: " + l(i.value.traceId), 1)) : F("", !0), i.value.eventId ? (f(), v("p", Ns, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Rs, [g(E, {
1863
- variant: Lt(i.value.outcome),
1932
+ default: Y(() => [i.value ? (f(), v("div", Us, [a("div", Ks, [a("div", Bs, [a("p", Ys, l(co(i.value)), 1), i.value.traceId ? (f(), v("p", zs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), h(L, {
1933
+ variant: "tertiary",
1934
+ icon: "link",
1935
+ class: "ml-4 align-middle",
1936
+ "aria-label": u(o)("auditLog.detail.copyLink"),
1937
+ onClick: u(Zt)
1938
+ }, null, 8, ["aria-label", "onClick"])])) : M("", !0), i.value.eventId ? (f(), v("p", qs, " Event ID: " + l(i.value.eventId), 1)) : M("", !0)]), a("div", Js, [h(R, {
1939
+ variant: kt(i.value.outcome),
1864
1940
  label: Qe(i.value.outcome),
1865
1941
  compact: ""
1866
- }, null, 8, ["variant", "label"]), u(Ct)(i.value) ? (f(), Oe(tt, {
1942
+ }, null, 8, ["variant", "label"]), u(Tt)(i.value) ? (f(), Ce(tt, {
1867
1943
  key: 0,
1868
1944
  variant: "plain",
1869
1945
  placement: "top"
1870
1946
  }, {
1871
- content: Y(() => [Ae(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1872
- default: Y(() => [g(Ue, {
1947
+ content: Y(() => [ye(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1948
+ default: Y(() => [h(Ke, {
1873
1949
  name: "error",
1874
1950
  size: "sm",
1875
1951
  class: "cursor-help text-fm-color-typo-error"
1876
1952
  })]),
1877
1953
  _: 1
1878
- })) : F("", !0)])]), a("div", Us, [a("div", Ks, [a("div", null, [a("p", Bs, l(u(o)("auditLog.detail.date")), 1), a("p", Ys, l(Xe(i.value.timestamp)), 1)]), a("div", null, [a("p", zs, l(u(o)("auditLog.detail.user")), 1), a("p", qs, l(Le(i.value)), 1)]), a("div", null, [a("p", Js, l(u(o)("auditLog.detail.email")), 1), a("p", Hs, l(lo(i.value)), 1)]), i.value.field ? (f(), v("div", Ws, [a("p", Gs, l(u(o)("auditLog.detail.field")), 1), a("p", Xs, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", Qs, l(u(o)("auditLog.detail.business")), 1), a("p", Zs, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ea, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ta, l(i.value.restaurantId || "-"), 1)])])]), a("div", oa, [a("div", sa, [a("p", aa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1954
+ })) : M("", !0)])]), a("div", Hs, [a("div", Ws, [a("div", null, [a("p", Gs, l(u(o)("auditLog.detail.date")), 1), a("p", Xs, l(Xe(i.value.timestamp)), 1)]), a("div", null, [a("p", Qs, l(u(o)("auditLog.detail.user")), 1), a("p", Zs, l(ke(i.value)), 1)]), a("div", null, [a("p", ea, l(u(o)("auditLog.detail.email")), 1), a("p", ta, l(uo(i.value)), 1)]), i.value.field ? (f(), v("div", oa, [a("p", sa, l(u(o)("auditLog.detail.field")), 1), a("p", aa, l(i.value.field), 1)])) : M("", !0), a("div", null, [a("p", na, l(u(o)("auditLog.detail.business")), 1), a("p", la, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ra, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ia, l(i.value.restaurantId || "-"), 1)])])]), a("div", ua, [a("div", da, [a("p", ca, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1879
1955
  class: "border-fm-color-border-default"
1880
- }, null, -1)), a("div", na, [a("div", null, [a("p", la, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", ra, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ia, [a("div", ua, [a("p", da, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1956
+ }, null, -1)), a("div", fa, [a("div", null, [a("p", ma, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", va, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", pa, [a("div", ga, [a("p", ha, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1881
1957
  class: "border-fm-color-border-default"
1882
- }, null, -1)), a("div", ca, [a("div", null, [a("p", fa, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", ma, l(io(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (f(), v("div", va, [a("p", pa, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (f(), v("p", ga, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (f(), v("p", ha, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (f(), v("div", ya, [a("p", ba, l(u(o)("auditLog.detail.reason")), 1), a("p", _a, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", xa, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", La, l(uo(i.value)), 1)]), a("div", null, [a("p", Sa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", ka, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (f(), v(z, {
1958
+ }, null, -1)), a("div", ya, [a("div", null, [a("p", ba, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", _a, l(fo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (f(), v("div", xa, [a("p", La, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (f(), v("p", ka, l(i.value.metadata.permissionSetName), 1)) : M("", !0), i.value.metadata.permissionSetId ? (f(), v("p", Sa, l(i.value.metadata.permissionSetId), 1)) : M("", !0)])) : M("", !0), i.value.metadata.reason ? (f(), v("div", wa, [a("p", Ia, l(u(o)("auditLog.detail.reason")), 1), a("p", Aa, l(i.value.metadata.reason), 1)])) : M("", !0), a("div", null, [a("p", Fa, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Ma, l(mo(i.value)), 1)]), a("div", null, [a("p", Da, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Oa, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (f(), v(z, {
1883
1959
  key: 2
1884
- }, [a("div", null, [a("p", wa, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", Ia, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Aa, l(u(o)("auditLog.columns.device")), 1), a("p", Fa, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", Ma, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", Da, [a("p", Oa, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ca, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", ja, l(u(o)("auditLog.columns.approver")), 1), a("p", Ta, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Va, l(u(o)("auditLog.pos.details.clock")), 1), a("p", $a, [Ae(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Pa, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (f(), v("div", Ea, [a("p", Na, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ra, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ua, [a("p", Ka, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ba, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, $) => (f(), v("li", {
1960
+ }, [a("div", null, [a("p", Ca, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", Ta, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", ja, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", $a, l(i.value.metadata.pos.machineId), 1)) : M("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", Pa, [a("p", Ea, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ra, l(i.value.metadata.pos.appVersion), 1)])) : M("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ua, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ka, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Ya, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : M("", !0)])]), i.value.params ? (f(), v("div", za, [a("p", qa, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ja, l(i.value.params), 1)])) : M("", !0)], 64)) : M("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ha, [a("p", Wa, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ga, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, $) => (f(), v("li", {
1885
1961
  key: $,
1886
1962
  class: "flex items-center gap-6"
1887
- }, [a("span", Ya, l($ + 1), 1), a("span", za, l(p), 1), $ < i.value.metadata.trace.length - 1 ? (f(), v("span", qa, "→")) : F("", !0)]))), 128))])])) : F("", !0), T.value ? (f(), v("div", Ja, [a("p", Ha, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", Wa, l(T.value), 1)])) : F("", !0)])])])) : F("", !0)]),
1963
+ }, [a("span", Xa, l($ + 1), 1), a("span", Qa, l(p), 1), $ < i.value.metadata.trace.length - 1 ? (f(), v("span", Za, "→")) : M("", !0)]))), 128))])])) : M("", !0), F.value ? (f(), v("div", en, [a("p", tn, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", on, l(F.value), 1)])) : M("", !0)])])])) : M("", !0)]),
1888
1964
  _: 1
1889
- }, 8, ["header", "model-value"]), g(we, {
1965
+ }, 8, ["header", "model-value"]), h(Ie, {
1890
1966
  header: u(o)("auditLog.operation.sheetHeader"),
1891
- "model-value": w.value,
1967
+ "model-value": x.value,
1892
1968
  "max-width": 768,
1893
1969
  "dismiss-away": "",
1894
1970
  "onUpdate:modelValue": s[12] || (s[12] = (p) => {
1895
- p || ko();
1971
+ p || Ao();
1896
1972
  })
1897
1973
  }, {
1898
- default: Y(() => [m.value ? (f(), v("div", Ga, [a("div", Xa, [a("div", Qa, [a("p", Za, l(xt(m.value)), 1), m.value.entityId ? (f(), v("p", en, l(m.value.entityId), 1)) : F("", !0)]), g(E, {
1974
+ default: Y(() => [m.value ? (f(), v("div", sn, [a("div", an, [a("div", nn, [a("p", ln, l(Lt(m.value)), 1), m.value.entityId ? (f(), v("p", rn, l(m.value.entityId), 1)) : M("", !0)]), h(R, {
1899
1975
  variant: m.value.status === "failed" ? "critical" : "success",
1900
1976
  label: m.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1901
1977
  compact: ""
1902
- }, null, 8, ["variant", "label"])]), a("div", tn, [a("div", on, [a("div", null, [a("p", sn, l(u(o)("auditLog.detail.date")), 1), a("p", an, l(Xe(m.value.timestamp)), 1)]), m.value.entityId ? (f(), v("div", nn, [a("p", ln, l(u(o)("auditLog.operation.entity")), 1), a("p", rn, l(m.value.entityId), 1)])) : F("", !0), m.value.durationMs !== void 0 ? (f(), v("div", un, [a("p", dn, l(u(o)("auditLog.operation.duration")), 1), a("p", cn, l(u(o)("auditLog.operation.durationValue", {
1978
+ }, null, 8, ["variant", "label"])]), a("div", un, [a("div", dn, [a("div", null, [a("p", cn, l(u(o)("auditLog.detail.date")), 1), a("p", fn, l(Xe(m.value.timestamp)), 1)]), m.value.entityId ? (f(), v("div", mn, [a("p", vn, l(u(o)("auditLog.operation.entity")), 1), a("p", pn, l(m.value.entityId), 1)])) : M("", !0), m.value.durationMs !== void 0 ? (f(), v("div", gn, [a("p", hn, l(u(o)("auditLog.operation.duration")), 1), a("p", yn, l(u(o)("auditLog.operation.durationValue", {
1903
1979
  ms: m.value.durationMs
1904
- })), 1)])) : F("", !0)])]), m.value.status === "failed" ? (f(), v("div", fn, [a("p", mn, l(u(o)("auditLog.operation.error")), 1), a("p", vn, l(m.value.errorMessage || "-"), 1)])) : F("", !0), a("div", pn, [a("div", gn, [a("p", hn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1980
+ })), 1)])) : M("", !0)])]), m.value.status === "failed" ? (f(), v("div", bn, [a("p", _n, l(u(o)("auditLog.operation.error")), 1), a("p", xn, l(m.value.errorMessage || "-"), 1)])) : M("", !0), a("div", Ln, [a("div", kn, [a("p", Sn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1905
1981
  class: "border-fm-color-border-default"
1906
- }, null, -1)), a("div", yn, [H.value.length ? (f(), v("div", bn, [(f(!0), v(z, null, ce(H.value, (p, $) => (f(), v("div", {
1982
+ }, null, -1)), a("div", wn, [H.value.length ? (f(), v("div", In, [(f(!0), v(z, null, ce(H.value, (p, $) => (f(), v("div", {
1907
1983
  key: $,
1908
1984
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1909
- }, [a("div", _n, [g(E, {
1910
- variant: _e(p.type),
1985
+ }, [a("div", An, [h(R, {
1986
+ variant: xe(p.type),
1911
1987
  label: Ut(p.type),
1912
1988
  compact: ""
1913
- }, null, 8, ["variant", "label"]), a("span", xn, l(Kt(p)), 1)]), a("p", Ln, [p.type === "add" ? (f(), v("span", Sn, l(p.afterDisplay), 1)) : p.type === "remove" ? (f(), v("span", kn, l(p.beforeDisplay), 1)) : (f(), v(z, {
1989
+ }, null, 8, ["variant", "label"]), a("span", Fn, l(Kt(p)), 1)]), a("p", Mn, [p.type === "add" ? (f(), v("span", Dn, l(p.afterDisplay), 1)) : p.type === "remove" ? (f(), v("span", On, l(p.beforeDisplay), 1)) : (f(), v(z, {
1914
1990
  key: 2
1915
- }, [a("span", wn, l(p.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1991
+ }, [a("span", Cn, l(p.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1916
1992
  class: "text-fm-color-typo-secondary"
1917
- }, " → ", -1)), a("span", In, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ct.value.length ? (f(), v("div", An, [(f(!0), v(z, null, ce(ct.value, (p) => (f(), v("div", {
1993
+ }, " → ", -1)), a("span", Tn, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (f(), v("div", jn, [(f(!0), v(z, null, ce(ft.value, (p) => (f(), v("div", {
1918
1994
  key: p.groupKey,
1919
1995
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1920
- }, [a("div", Fn, [g(E, {
1996
+ }, [a("div", Vn, [h(R, {
1921
1997
  variant: je(p.type),
1922
- label: dt(p.type),
1998
+ label: ct(p.type),
1923
1999
  compact: ""
1924
- }, null, 8, ["variant", "label"]), a("span", Mn, l(p.displayKey), 1)]), a("div", Dn, [(f(!0), v(z, null, ce(p.rows, ($) => (f(), v("p", {
2000
+ }, null, 8, ["variant", "label"]), a("span", $n, l(p.displayKey), 1)]), a("div", Pn, [(f(!0), v(z, null, ce(p.rows, ($) => (f(), v("p", {
1925
2001
  key: $.path,
1926
2002
  class: "break-all font-mono text-xs"
1927
- }, [$.type === "added" ? (f(), v("span", On, l($.after ?? "—"), 1)) : $.type === "removed" ? (f(), v("span", Cn, l($.before ?? "—"), 1)) : (f(), v(z, {
2003
+ }, [$.type === "added" ? (f(), v("span", En, l($.after ?? "—"), 1)) : $.type === "removed" ? (f(), v("span", Rn, l($.before ?? "—"), 1)) : (f(), v(z, {
1928
2004
  key: 2
1929
- }, [a("span", jn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
2005
+ }, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
1930
2006
  class: "text-fm-color-typo-secondary"
1931
- }, " → ", -1)), a("span", Tn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Vn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || k.value ? (f(), v("div", $n, [a("button", {
2007
+ }, " → ", -1)), a("span", Un, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Kn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || I.value ? (f(), v("div", Bn, [a("button", {
1932
2008
  type: "button",
1933
2009
  class: "flex w-full items-center justify-between p-12 text-left",
1934
2010
  onClick: s[11] || (s[11] = (p) => X.value = !X.value)
1935
- }, [a("p", Pn, l(u(o)("auditLog.operation.showData")), 1), g(Ue, {
2011
+ }, [a("p", Yn, l(u(o)("auditLog.operation.showData")), 1), h(Ke, {
1936
2012
  name: "keyboard_arrow_down",
1937
- class: Ko(["shrink-0 transition-transform", X.value ? "rotate-180" : ""])
2013
+ class: zo(["shrink-0 transition-transform", X.value ? "rotate-180" : ""])
1938
2014
  }, null, 8, ["class"])]), X.value ? (f(), v(z, {
1939
2015
  key: 0
1940
2016
  }, [s[18] || (s[18] = a("hr", {
1941
2017
  class: "border-fm-color-border-default"
1942
- }, null, -1)), a("div", En, [U.value ? (f(), v("div", Nn, [a("p", Rn, l(u(o)("auditLog.operation.before")), 1), a("pre", Un, l(U.value), 1)])) : F("", !0), k.value ? (f(), v("div", Kn, [a("p", Bn, l(u(o)("auditLog.operation.after")), 1), a("pre", Yn, l(k.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
2018
+ }, null, -1)), a("div", zn, [U.value ? (f(), v("div", qn, [a("p", Jn, l(u(o)("auditLog.operation.before")), 1), a("pre", Hn, l(U.value), 1)])) : M("", !0), I.value ? (f(), v("div", Wn, [a("p", Gn, l(u(o)("auditLog.operation.after")), 1), a("pre", Xn, l(I.value), 1)])) : M("", !0)])], 64)) : M("", !0)])) : M("", !0)])) : M("", !0)]),
1943
2019
  _: 1
1944
2020
  }, 8, ["header", "model-value"])], 64);
1945
2021
  };
1946
2022
  }
1947
- }), ul = /* @__PURE__ */ Jo(Jn, [["__scopeId", "data-v-2fab18d4"]]);
2023
+ }), yl = /* @__PURE__ */ Go(el, [["__scopeId", "data-v-277a4ae7"]]);
1948
2024
  export {
1949
- ul as default
2025
+ yl as default
1950
2026
  };