@feedmepos/mf-hrm-portal 2.1.1-dev → 2.1.1-dev.3

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 (83) hide show
  1. package/dist/ApprovalCodeList-BH5sgVMU.js +638 -0
  2. package/dist/AuditLogList-Q4L5Te8O.js +1145 -0
  3. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
  4. package/dist/EmployeeList-GtKmJZbf.js +899 -0
  5. package/dist/GrantUserList-CnLjOi5_.js +468 -0
  6. package/dist/Main-Cn7Dawg4.js +120 -0
  7. package/dist/{Main-mTxcltDY.js → Main-DLlpEU3j.js} +11 -9
  8. package/dist/{Main-BLRr_ORG.js → Main-cskEZ3k_.js} +1033 -1035
  9. package/dist/PermissionSetList-C2fK2pTz.js +357 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js +3458 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-Czo3FLbc.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js} +1 -2
  12. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  13. package/dist/RoleList-CcuT1ERb.js +567 -0
  14. package/dist/TeamMemberList-Dfs2iNdC.js +1131 -0
  15. package/dist/{TimesheetList-D21j4zLV.js → TimesheetList-B1H_6zfP.js} +136 -141
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CRmmIfTk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js} +14 -13
  17. package/dist/{app-CX-St7pv.js → app-DX-PG6wx.js} +2725 -5281
  18. package/dist/app.js +1 -1
  19. package/dist/approval-code-Q4666xp5.js +58 -0
  20. package/dist/{dayjs.min-MDoe5X-P.js → dayjs.min-BJrHE7oz.js} +1 -1
  21. package/dist/{employee-B2cdx2t4.js → employee-BJcqtqLM.js} +27 -26
  22. package/dist/grant-user-CQZaTzVt.js +67 -0
  23. package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
  24. package/dist/iteration-Cfaqt-0s.js +7682 -0
  25. package/dist/{lodash-DZAGPZLQ.js → lodash-ClKqCmlZ.js} +1 -1
  26. package/dist/restaurant-YOVMuuFY.js +1876 -0
  27. package/dist/role-CR_-nBDY.js +82 -0
  28. package/dist/rule-BB-3S-2R.js +996 -0
  29. package/dist/src/api/approval-code/index.d.ts +7 -0
  30. package/dist/src/api/audit-log/index.d.ts +0 -6
  31. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  32. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +1 -7
  33. package/dist/src/components/table/TableEmptyState.vue.d.ts +15 -7
  34. package/dist/src/composables/useBasePermission.d.ts +1 -2
  35. package/dist/src/helpers/permission-set.d.ts +4 -8
  36. package/dist/src/helpers/rule.d.ts +1 -2
  37. package/dist/src/router/shared.d.ts +3 -1
  38. package/dist/src/stores/approval-code.d.ts +140 -0
  39. package/dist/src/stores/permission-set.d.ts +3 -12
  40. package/dist/src/types/approval-code.d.ts +99 -0
  41. package/dist/src/types/audit-log.d.ts +1 -1
  42. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
  43. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +17 -0
  44. package/dist/src/views/approval-code/locales/index.d.ts +320 -0
  45. package/dist/src/views/audit-log/locales/index.d.ts +0 -296
  46. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +0 -1
  47. package/dist/src/views/pos-access/locales/index.d.ts +48 -0
  48. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -13
  49. package/dist/src/views/team/locales/index.d.ts +0 -72
  50. package/dist/style.css +1 -1
  51. package/dist/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/useAppStore-DNTlIeMv.js +93 -0
  53. package/dist/useDebounce-CWb5QR9G.js +28 -0
  54. package/dist/{useLoading-qgSjOzRD.js → useLoading-BH02lYns.js} +1 -1
  55. package/dist/{useReportPermissions-CIhkjN3B.js → useReportPermissions-ybHA26cJ.js} +3 -3
  56. package/package.json +2 -2
  57. package/dist/AuditLogList-Cvp-5_0y.js +0 -1608
  58. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js +0 -387
  59. package/dist/EmployeeList-DgrD3Hjm.js +0 -884
  60. package/dist/Main-G3am-0Xi.js +0 -577
  61. package/dist/PermissionSetList-OzyfE-Yg.js +0 -392
  62. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js +0 -4121
  63. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +0 -42
  64. package/dist/RoleList-DOZ5RJ6A.js +0 -684
  65. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  66. package/dist/TeamMemberList-CAqLUyQK.js +0 -1186
  67. package/dist/iteration-B38iapI_.js +0 -9556
  68. package/dist/rule-DftQBR76.js +0 -1057
  69. package/dist/src/composables/useConditionDraft.d.ts +0 -40
  70. package/dist/src/composables/useCoverConditionOverride.d.ts +0 -61
  71. package/dist/src/helpers/business-timezone.d.ts +0 -22
  72. package/dist/src/helpers/filter.d.ts +0 -15
  73. package/dist/src/helpers/permission-reconcile.d.ts +0 -15
  74. package/dist/src/helpers/permission-reconcile.test.d.ts +0 -1
  75. package/dist/src/views/audit-log/event-line.d.ts +0 -13
  76. package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
  77. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +0 -22
  78. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +0 -23
  79. package/dist/src/views/team/condition-builders/component-map.d.ts +0 -4
  80. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +0 -23
  81. package/dist/useAppStore-BBsP5C3E.js +0 -169
  82. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  83. /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
@@ -1,4121 +0,0 @@
1
- import { getCurrentInstance as Bt, inject as cs, ref as dt, shallowRef as us, computed as ee, watch as Mt, onMounted as Vn, onUnmounted as ds, defineComponent as Pe, h as xn, createVNode as fe, Text as ms, Fragment as Le, resolveComponent as Fe, createBlock as Me, openBlock as z, withCtx as be, createElementVNode as le, createElementBlock as ue, toDisplayString as ke, unref as H, renderList as Te, toRef as en, normalizeStyle as Qe, renderSlot as Re, createCommentVNode as Ae, createTextVNode as fs, useSlots as _s, normalizeClass as ot, createSlots as Ke, mergeModels as tn, useModel as ps } from "vue";
2
- import { useI18n as nt, useCoreStore as vs } from "@feedmepos/mf-common";
3
- import { useDialog as bs, useBreakpoints as hs } from "@feedmepos/ui-library";
4
- import "@vue/devtools-api";
5
- import { p as Wn, N as Gn, i as gs, P as Is, x as St, l as ys, k as Es } from "./rule-DftQBR76.js";
6
- import { _ as Xt, u as Ns, a as nn } from "./ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js";
7
- import { u as Ts, v as Cs, P as Yn, S as wt, A as ze, d as he, k as sn, b as ks } from "./app-CX-St7pv.js";
8
- import { d as It, g as Os, b as Ss } from "./iteration-B38iapI_.js";
9
- import { u as Ls } from "./useAppStore-BBsP5C3E.js";
10
- function Zn(e, t) {
11
- return Array.isArray(e) ? e.includes(t) : e === t;
12
- }
13
- function Rs(e) {
14
- return Array.isArray(e) ? e[0] : e;
15
- }
16
- function As(e, t) {
17
- const n = t.find((o) => Zn(o.subject, e));
18
- if (!(n != null && n.category) || n.isCategoryCover) return;
19
- const s = t.find((o) => o.category === n.category && o.isCategoryCover);
20
- if (s)
21
- return Rs(s.subject);
22
- }
23
- function rn(e, t) {
24
- const n = t.find((s) => Zn(s.subject, e));
25
- return !!(n != null && n.isCategoryCover);
26
- }
27
- /*!
28
- * shared v10.0.5
29
- * (c) 2024 kazuya kawaguchi
30
- * Released under the MIT License.
31
- */
32
- const an = typeof window < "u", He = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Ds = (e, t, n) => Ms({ l: e, k: t, s: n }), Ms = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), Ie = (e) => typeof e == "number" && isFinite(e), ws = (e) => Ht(e) === "[object Date]", Et = (e) => Ht(e) === "[object RegExp]", Tt = (e) => ne(e) && Object.keys(e).length === 0, ye = Object.assign, Fs = Object.create, ie = (e = null) => Fs(e);
33
- let on;
34
- const Xe = () => on || (on = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : ie());
35
- function ln(e) {
36
- return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
37
- }
38
- const Ps = Object.prototype.hasOwnProperty;
39
- function De(e, t) {
40
- return Ps.call(e, t);
41
- }
42
- const ge = Array.isArray, me = (e) => typeof e == "function", Z = (e) => typeof e == "string", pe = (e) => typeof e == "boolean", se = (e) => e !== null && typeof e == "object", js = (e) => se(e) && me(e.then) && me(e.catch), Bn = Object.prototype.toString, Ht = (e) => Bn.call(e), ne = (e) => Ht(e) === "[object Object]", Us = (e) => e == null ? "" : ge(e) || ne(e) && e.toString === Bn ? JSON.stringify(e, null, 2) : String(e);
43
- function $t(e, t = "") {
44
- return e.reduce((n, s, o) => o === 0 ? n + s : n + t + s, "");
45
- }
46
- function Vs(e, t) {
47
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
48
- }
49
- const ft = (e) => !se(e) || ge(e);
50
- function yt(e, t) {
51
- if (ft(e) || ft(t))
52
- throw new Error("Invalid value");
53
- const n = [{ src: e, des: t }];
54
- for (; n.length; ) {
55
- const { src: s, des: o } = n.pop();
56
- Object.keys(s).forEach((a) => {
57
- a !== "__proto__" && (se(s[a]) && !se(o[a]) && (o[a] = Array.isArray(s[a]) ? [] : ie()), ft(o[a]) || ft(s[a]) ? o[a] = s[a] : n.push({ src: s[a], des: o[a] }));
58
- });
59
- }
60
- }
61
- function xs(e, t, n) {
62
- return { line: e, column: t, offset: n };
63
- }
64
- function Ft(e, t, n) {
65
- return { start: e, end: t };
66
- }
67
- const oe = {
68
- // tokenizer error codes
69
- EXPECTED_TOKEN: 1,
70
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
71
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
72
- UNKNOWN_ESCAPE_SEQUENCE: 4,
73
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
74
- UNBALANCED_CLOSING_BRACE: 6,
75
- UNTERMINATED_CLOSING_BRACE: 7,
76
- EMPTY_PLACEHOLDER: 8,
77
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
78
- INVALID_LINKED_FORMAT: 10,
79
- // parser error codes
80
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
81
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
82
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
83
- UNEXPECTED_LEXICAL_ANALYSIS: 14
84
- }, Ws = 17;
85
- function Ct(e, t, n = {}) {
86
- const { domain: s, messages: o, args: a } = n, d = e, u = new SyntaxError(String(d));
87
- return u.code = e, t && (u.location = t), u.domain = s, u;
88
- }
89
- function Gs(e) {
90
- throw e;
91
- }
92
- const Ue = " ", Ys = "\r", Ne = `
93
- `, Zs = "\u2028", Bs = "\u2029";
94
- function Xs(e) {
95
- const t = e;
96
- let n = 0, s = 1, o = 1, a = 0;
97
- const d = (_) => t[_] === Ys && t[_ + 1] === Ne, u = (_) => t[_] === Ne, c = (_) => t[_] === Bs, h = (_) => t[_] === Zs, y = (_) => d(_) || u(_) || c(_) || h(_), C = () => n, N = () => s, w = () => o, M = () => a, A = (_) => d(_) || c(_) || h(_) ? Ne : t[_], F = () => A(n), f = () => A(n + a);
98
- function p() {
99
- return a = 0, y(n) && (s++, o = 0), d(n) && n++, n++, o++, t[n];
100
- }
101
- function S() {
102
- return d(n + a) && a++, a++, t[n + a];
103
- }
104
- function i() {
105
- n = 0, s = 1, o = 1, a = 0;
106
- }
107
- function v(_ = 0) {
108
- a = _;
109
- }
110
- function g() {
111
- const _ = n + a;
112
- for (; _ !== n; )
113
- p();
114
- a = 0;
115
- }
116
- return {
117
- index: C,
118
- line: N,
119
- column: w,
120
- peekOffset: M,
121
- charAt: A,
122
- currentChar: F,
123
- currentPeek: f,
124
- next: p,
125
- peek: S,
126
- reset: i,
127
- resetPeek: v,
128
- skipToPeek: g
129
- };
130
- }
131
- const Ge = void 0, Hs = ".", cn = "'", $s = "tokenizer";
132
- function Js(e, t = {}) {
133
- const n = t.location !== !1, s = Xs(e), o = () => s.index(), a = () => xs(s.line(), s.column(), s.index()), d = a(), u = o(), c = {
134
- currentType: 13,
135
- offset: u,
136
- startLoc: d,
137
- endLoc: d,
138
- lastType: 13,
139
- lastOffset: u,
140
- lastStartLoc: d,
141
- lastEndLoc: d,
142
- braceNest: 0,
143
- inLinked: !1,
144
- text: ""
145
- }, h = () => c, { onError: y } = t;
146
- function C(r, l, I, ...j) {
147
- const Y = h();
148
- if (l.column += I, l.offset += I, y) {
149
- const X = n ? Ft(Y.startLoc, l) : null, b = Ct(r, X, {
150
- domain: $s,
151
- args: j
152
- });
153
- y(b);
154
- }
155
- }
156
- function N(r, l, I) {
157
- r.endLoc = a(), r.currentType = l;
158
- const j = { type: l };
159
- return n && (j.loc = Ft(r.startLoc, r.endLoc)), I != null && (j.value = I), j;
160
- }
161
- const w = (r) => N(
162
- r,
163
- 13
164
- /* TokenTypes.EOF */
165
- );
166
- function M(r, l) {
167
- return r.currentChar() === l ? (r.next(), l) : (C(oe.EXPECTED_TOKEN, a(), 0, l), "");
168
- }
169
- function A(r) {
170
- let l = "";
171
- for (; r.currentPeek() === Ue || r.currentPeek() === Ne; )
172
- l += r.currentPeek(), r.peek();
173
- return l;
174
- }
175
- function F(r) {
176
- const l = A(r);
177
- return r.skipToPeek(), l;
178
- }
179
- function f(r) {
180
- if (r === Ge)
181
- return !1;
182
- const l = r.charCodeAt(0);
183
- return l >= 97 && l <= 122 || // a-z
184
- l >= 65 && l <= 90 || // A-Z
185
- l === 95;
186
- }
187
- function p(r) {
188
- if (r === Ge)
189
- return !1;
190
- const l = r.charCodeAt(0);
191
- return l >= 48 && l <= 57;
192
- }
193
- function S(r, l) {
194
- const { currentType: I } = l;
195
- if (I !== 2)
196
- return !1;
197
- A(r);
198
- const j = f(r.currentPeek());
199
- return r.resetPeek(), j;
200
- }
201
- function i(r, l) {
202
- const { currentType: I } = l;
203
- if (I !== 2)
204
- return !1;
205
- A(r);
206
- const j = r.currentPeek() === "-" ? r.peek() : r.currentPeek(), Y = p(j);
207
- return r.resetPeek(), Y;
208
- }
209
- function v(r, l) {
210
- const { currentType: I } = l;
211
- if (I !== 2)
212
- return !1;
213
- A(r);
214
- const j = r.currentPeek() === cn;
215
- return r.resetPeek(), j;
216
- }
217
- function g(r, l) {
218
- const { currentType: I } = l;
219
- if (I !== 7)
220
- return !1;
221
- A(r);
222
- const j = r.currentPeek() === ".";
223
- return r.resetPeek(), j;
224
- }
225
- function _(r, l) {
226
- const { currentType: I } = l;
227
- if (I !== 8)
228
- return !1;
229
- A(r);
230
- const j = f(r.currentPeek());
231
- return r.resetPeek(), j;
232
- }
233
- function D(r, l) {
234
- const { currentType: I } = l;
235
- if (!(I === 7 || I === 11))
236
- return !1;
237
- A(r);
238
- const j = r.currentPeek() === ":";
239
- return r.resetPeek(), j;
240
- }
241
- function L(r, l) {
242
- const { currentType: I } = l;
243
- if (I !== 9)
244
- return !1;
245
- const j = () => {
246
- const X = r.currentPeek();
247
- return X === "{" ? f(r.peek()) : X === "@" || X === "|" || X === ":" || X === "." || X === Ue || !X ? !1 : X === Ne ? (r.peek(), j()) : W(r, !1);
248
- }, Y = j();
249
- return r.resetPeek(), Y;
250
- }
251
- function $(r) {
252
- A(r);
253
- const l = r.currentPeek() === "|";
254
- return r.resetPeek(), l;
255
- }
256
- function W(r, l = !0) {
257
- const I = (Y = !1, X = "") => {
258
- const b = r.currentPeek();
259
- return b === "{" || b === "@" || !b ? Y : b === "|" ? !(X === Ue || X === Ne) : b === Ue ? (r.peek(), I(!0, Ue)) : b === Ne ? (r.peek(), I(!0, Ne)) : !0;
260
- }, j = I();
261
- return l && r.resetPeek(), j;
262
- }
263
- function m(r, l) {
264
- const I = r.currentChar();
265
- return I === Ge ? Ge : l(I) ? (r.next(), I) : null;
266
- }
267
- function E(r) {
268
- const l = r.charCodeAt(0);
269
- return l >= 97 && l <= 122 || // a-z
270
- l >= 65 && l <= 90 || // A-Z
271
- l >= 48 && l <= 57 || // 0-9
272
- l === 95 || // _
273
- l === 36;
274
- }
275
- function V(r) {
276
- return m(r, E);
277
- }
278
- function U(r) {
279
- const l = r.charCodeAt(0);
280
- return l >= 97 && l <= 122 || // a-z
281
- l >= 65 && l <= 90 || // A-Z
282
- l >= 48 && l <= 57 || // 0-9
283
- l === 95 || // _
284
- l === 36 || // $
285
- l === 45;
286
- }
287
- function P(r) {
288
- return m(r, U);
289
- }
290
- function G(r) {
291
- const l = r.charCodeAt(0);
292
- return l >= 48 && l <= 57;
293
- }
294
- function x(r) {
295
- return m(r, G);
296
- }
297
- function B(r) {
298
- const l = r.charCodeAt(0);
299
- return l >= 48 && l <= 57 || // 0-9
300
- l >= 65 && l <= 70 || // A-F
301
- l >= 97 && l <= 102;
302
- }
303
- function J(r) {
304
- return m(r, B);
305
- }
306
- function ae(r) {
307
- let l = "", I = "";
308
- for (; l = x(r); )
309
- I += l;
310
- return I;
311
- }
312
- function Q(r) {
313
- let l = "";
314
- for (; ; ) {
315
- const I = r.currentChar();
316
- if (I === "{" || I === "}" || I === "@" || I === "|" || !I)
317
- break;
318
- if (I === Ue || I === Ne)
319
- if (W(r))
320
- l += I, r.next();
321
- else {
322
- if ($(r))
323
- break;
324
- l += I, r.next();
325
- }
326
- else
327
- l += I, r.next();
328
- }
329
- return l;
330
- }
331
- function re(r) {
332
- F(r);
333
- let l = "", I = "";
334
- for (; l = P(r); )
335
- I += l;
336
- return r.currentChar() === Ge && C(oe.UNTERMINATED_CLOSING_BRACE, a(), 0), I;
337
- }
338
- function ce(r) {
339
- F(r);
340
- let l = "";
341
- return r.currentChar() === "-" ? (r.next(), l += `-${ae(r)}`) : l += ae(r), r.currentChar() === Ge && C(oe.UNTERMINATED_CLOSING_BRACE, a(), 0), l;
342
- }
343
- function q(r) {
344
- return r !== cn && r !== Ne;
345
- }
346
- function _e(r) {
347
- F(r), M(r, "'");
348
- let l = "", I = "";
349
- for (; l = m(r, q); )
350
- l === "\\" ? I += Ee(r) : I += l;
351
- const j = r.currentChar();
352
- return j === Ne || j === Ge ? (C(oe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), j === Ne && (r.next(), M(r, "'")), I) : (M(r, "'"), I);
353
- }
354
- function Ee(r) {
355
- const l = r.currentChar();
356
- switch (l) {
357
- case "\\":
358
- case "'":
359
- return r.next(), `\\${l}`;
360
- case "u":
361
- return je(r, l, 4);
362
- case "U":
363
- return je(r, l, 6);
364
- default:
365
- return C(oe.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, l), "";
366
- }
367
- }
368
- function je(r, l, I) {
369
- M(r, l);
370
- let j = "";
371
- for (let Y = 0; Y < I; Y++) {
372
- const X = J(r);
373
- if (!X) {
374
- C(oe.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${l}${j}${r.currentChar()}`);
375
- break;
376
- }
377
- j += X;
378
- }
379
- return `\\${l}${j}`;
380
- }
381
- function te(r) {
382
- return r !== "{" && r !== "}" && r !== Ue && r !== Ne;
383
- }
384
- function ve(r) {
385
- F(r);
386
- let l = "", I = "";
387
- for (; l = m(r, te); )
388
- I += l;
389
- return I;
390
- }
391
- function st(r) {
392
- let l = "", I = "";
393
- for (; l = V(r); )
394
- I += l;
395
- return I;
396
- }
397
- function rt(r) {
398
- const l = (I) => {
399
- const j = r.currentChar();
400
- return j === "{" || j === "@" || j === "|" || j === "(" || j === ")" || !j || j === Ue ? I : (I += j, r.next(), l(I));
401
- };
402
- return l("");
403
- }
404
- function Se(r) {
405
- F(r);
406
- const l = M(
407
- r,
408
- "|"
409
- /* TokenChars.Pipe */
410
- );
411
- return F(r), l;
412
- }
413
- function We(r, l) {
414
- let I = null;
415
- switch (r.currentChar()) {
416
- case "{":
417
- return l.braceNest >= 1 && C(oe.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), r.next(), I = N(
418
- l,
419
- 2,
420
- "{"
421
- /* TokenChars.BraceLeft */
422
- ), F(r), l.braceNest++, I;
423
- case "}":
424
- return l.braceNest > 0 && l.currentType === 2 && C(oe.EMPTY_PLACEHOLDER, a(), 0), r.next(), I = N(
425
- l,
426
- 3,
427
- "}"
428
- /* TokenChars.BraceRight */
429
- ), l.braceNest--, l.braceNest > 0 && F(r), l.inLinked && l.braceNest === 0 && (l.inLinked = !1), I;
430
- case "@":
431
- return l.braceNest > 0 && C(oe.UNTERMINATED_CLOSING_BRACE, a(), 0), I = k(r, l) || w(l), l.braceNest = 0, I;
432
- default: {
433
- let Y = !0, X = !0, b = !0;
434
- if ($(r))
435
- return l.braceNest > 0 && C(oe.UNTERMINATED_CLOSING_BRACE, a(), 0), I = N(l, 1, Se(r)), l.braceNest = 0, l.inLinked = !1, I;
436
- if (l.braceNest > 0 && (l.currentType === 4 || l.currentType === 5 || l.currentType === 6))
437
- return C(oe.UNTERMINATED_CLOSING_BRACE, a(), 0), l.braceNest = 0, T(r, l);
438
- if (Y = S(r, l))
439
- return I = N(l, 4, re(r)), F(r), I;
440
- if (X = i(r, l))
441
- return I = N(l, 5, ce(r)), F(r), I;
442
- if (b = v(r, l))
443
- return I = N(l, 6, _e(r)), F(r), I;
444
- if (!Y && !X && !b)
445
- return I = N(l, 12, ve(r)), C(oe.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, I.value), F(r), I;
446
- break;
447
- }
448
- }
449
- return I;
450
- }
451
- function k(r, l) {
452
- const { currentType: I } = l;
453
- let j = null;
454
- const Y = r.currentChar();
455
- switch ((I === 7 || I === 8 || I === 11 || I === 9) && (Y === Ne || Y === Ue) && C(oe.INVALID_LINKED_FORMAT, a(), 0), Y) {
456
- case "@":
457
- return r.next(), j = N(
458
- l,
459
- 7,
460
- "@"
461
- /* TokenChars.LinkedAlias */
462
- ), l.inLinked = !0, j;
463
- case ".":
464
- return F(r), r.next(), N(
465
- l,
466
- 8,
467
- "."
468
- /* TokenChars.LinkedDot */
469
- );
470
- case ":":
471
- return F(r), r.next(), N(
472
- l,
473
- 9,
474
- ":"
475
- /* TokenChars.LinkedDelimiter */
476
- );
477
- default:
478
- return $(r) ? (j = N(l, 1, Se(r)), l.braceNest = 0, l.inLinked = !1, j) : g(r, l) || D(r, l) ? (F(r), k(r, l)) : _(r, l) ? (F(r), N(l, 11, st(r))) : L(r, l) ? (F(r), Y === "{" ? We(r, l) || j : N(l, 10, rt(r))) : (I === 7 && C(oe.INVALID_LINKED_FORMAT, a(), 0), l.braceNest = 0, l.inLinked = !1, T(r, l));
479
- }
480
- }
481
- function T(r, l) {
482
- let I = {
483
- type: 13
484
- /* TokenTypes.EOF */
485
- };
486
- if (l.braceNest > 0)
487
- return We(r, l) || w(l);
488
- if (l.inLinked)
489
- return k(r, l) || w(l);
490
- switch (r.currentChar()) {
491
- case "{":
492
- return We(r, l) || w(l);
493
- case "}":
494
- return C(oe.UNBALANCED_CLOSING_BRACE, a(), 0), r.next(), N(
495
- l,
496
- 3,
497
- "}"
498
- /* TokenChars.BraceRight */
499
- );
500
- case "@":
501
- return k(r, l) || w(l);
502
- default: {
503
- if ($(r))
504
- return I = N(l, 1, Se(r)), l.braceNest = 0, l.inLinked = !1, I;
505
- if (W(r))
506
- return N(l, 0, Q(r));
507
- break;
508
- }
509
- }
510
- return I;
511
- }
512
- function R() {
513
- const { currentType: r, offset: l, startLoc: I, endLoc: j } = c;
514
- return c.lastType = r, c.lastOffset = l, c.lastStartLoc = I, c.lastEndLoc = j, c.offset = o(), c.startLoc = a(), s.currentChar() === Ge ? N(
515
- c,
516
- 13
517
- /* TokenTypes.EOF */
518
- ) : T(s, c);
519
- }
520
- return {
521
- nextToken: R,
522
- currentOffset: o,
523
- currentPosition: a,
524
- context: h
525
- };
526
- }
527
- const Ks = "parser", zs = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
528
- function Qs(e, t, n) {
529
- switch (e) {
530
- case "\\\\":
531
- return "\\";
532
- case "\\'":
533
- return "'";
534
- default: {
535
- const s = parseInt(t || n, 16);
536
- return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
537
- }
538
- }
539
- }
540
- function qs(e = {}) {
541
- const t = e.location !== !1, { onError: n } = e;
542
- function s(f, p, S, i, ...v) {
543
- const g = f.currentPosition();
544
- if (g.offset += i, g.column += i, n) {
545
- const _ = t ? Ft(S, g) : null, D = Ct(p, _, {
546
- domain: Ks,
547
- args: v
548
- });
549
- n(D);
550
- }
551
- }
552
- function o(f, p, S) {
553
- const i = { type: f };
554
- return t && (i.start = p, i.end = p, i.loc = { start: S, end: S }), i;
555
- }
556
- function a(f, p, S, i) {
557
- t && (f.end = p, f.loc && (f.loc.end = S));
558
- }
559
- function d(f, p) {
560
- const S = f.context(), i = o(3, S.offset, S.startLoc);
561
- return i.value = p, a(i, f.currentOffset(), f.currentPosition()), i;
562
- }
563
- function u(f, p) {
564
- const S = f.context(), { lastOffset: i, lastStartLoc: v } = S, g = o(5, i, v);
565
- return g.index = parseInt(p, 10), f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
566
- }
567
- function c(f, p) {
568
- const S = f.context(), { lastOffset: i, lastStartLoc: v } = S, g = o(4, i, v);
569
- return g.key = p, f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
570
- }
571
- function h(f, p) {
572
- const S = f.context(), { lastOffset: i, lastStartLoc: v } = S, g = o(9, i, v);
573
- return g.value = p.replace(zs, Qs), f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
574
- }
575
- function y(f) {
576
- const p = f.nextToken(), S = f.context(), { lastOffset: i, lastStartLoc: v } = S, g = o(8, i, v);
577
- return p.type !== 11 ? (s(f, oe.UNEXPECTED_EMPTY_LINKED_MODIFIER, S.lastStartLoc, 0), g.value = "", a(g, i, v), {
578
- nextConsumeToken: p,
579
- node: g
580
- }) : (p.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, we(p)), g.value = p.value || "", a(g, f.currentOffset(), f.currentPosition()), {
581
- node: g
582
- });
583
- }
584
- function C(f, p) {
585
- const S = f.context(), i = o(7, S.offset, S.startLoc);
586
- return i.value = p, a(i, f.currentOffset(), f.currentPosition()), i;
587
- }
588
- function N(f) {
589
- const p = f.context(), S = o(6, p.offset, p.startLoc);
590
- let i = f.nextToken();
591
- if (i.type === 8) {
592
- const v = y(f);
593
- S.modifier = v.node, i = v.nextConsumeToken || f.nextToken();
594
- }
595
- switch (i.type !== 9 && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(i)), i = f.nextToken(), i.type === 2 && (i = f.nextToken()), i.type) {
596
- case 10:
597
- i.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(i)), S.key = C(f, i.value || "");
598
- break;
599
- case 4:
600
- i.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(i)), S.key = c(f, i.value || "");
601
- break;
602
- case 5:
603
- i.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(i)), S.key = u(f, i.value || "");
604
- break;
605
- case 6:
606
- i.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(i)), S.key = h(f, i.value || "");
607
- break;
608
- default: {
609
- s(f, oe.UNEXPECTED_EMPTY_LINKED_KEY, p.lastStartLoc, 0);
610
- const v = f.context(), g = o(7, v.offset, v.startLoc);
611
- return g.value = "", a(g, v.offset, v.startLoc), S.key = g, a(S, v.offset, v.startLoc), {
612
- nextConsumeToken: i,
613
- node: S
614
- };
615
- }
616
- }
617
- return a(S, f.currentOffset(), f.currentPosition()), {
618
- node: S
619
- };
620
- }
621
- function w(f) {
622
- const p = f.context(), S = p.currentType === 1 ? f.currentOffset() : p.offset, i = p.currentType === 1 ? p.endLoc : p.startLoc, v = o(2, S, i);
623
- v.items = [];
624
- let g = null;
625
- do {
626
- const L = g || f.nextToken();
627
- switch (g = null, L.type) {
628
- case 0:
629
- L.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(L)), v.items.push(d(f, L.value || ""));
630
- break;
631
- case 5:
632
- L.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(L)), v.items.push(u(f, L.value || ""));
633
- break;
634
- case 4:
635
- L.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(L)), v.items.push(c(f, L.value || ""));
636
- break;
637
- case 6:
638
- L.value == null && s(f, oe.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, we(L)), v.items.push(h(f, L.value || ""));
639
- break;
640
- case 7: {
641
- const $ = N(f);
642
- v.items.push($.node), g = $.nextConsumeToken || null;
643
- break;
644
- }
645
- }
646
- } while (p.currentType !== 13 && p.currentType !== 1);
647
- const _ = p.currentType === 1 ? p.lastOffset : f.currentOffset(), D = p.currentType === 1 ? p.lastEndLoc : f.currentPosition();
648
- return a(v, _, D), v;
649
- }
650
- function M(f, p, S, i) {
651
- const v = f.context();
652
- let g = i.items.length === 0;
653
- const _ = o(1, p, S);
654
- _.cases = [], _.cases.push(i);
655
- do {
656
- const D = w(f);
657
- g || (g = D.items.length === 0), _.cases.push(D);
658
- } while (v.currentType !== 13);
659
- return g && s(f, oe.MUST_HAVE_MESSAGES_IN_PLURAL, S, 0), a(_, f.currentOffset(), f.currentPosition()), _;
660
- }
661
- function A(f) {
662
- const p = f.context(), { offset: S, startLoc: i } = p, v = w(f);
663
- return p.currentType === 13 ? v : M(f, S, i, v);
664
- }
665
- function F(f) {
666
- const p = Js(f, ye({}, e)), S = p.context(), i = o(0, S.offset, S.startLoc);
667
- return t && i.loc && (i.loc.source = f), i.body = A(p), e.onCacheKey && (i.cacheKey = e.onCacheKey(f)), S.currentType !== 13 && s(p, oe.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, f[S.offset] || ""), a(i, p.currentOffset(), p.currentPosition()), i;
668
- }
669
- return { parse: F };
670
- }
671
- function we(e) {
672
- if (e.type === 13)
673
- return "EOF";
674
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
675
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
676
- }
677
- function er(e, t = {}) {
678
- const n = {
679
- ast: e,
680
- helpers: /* @__PURE__ */ new Set()
681
- };
682
- return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
683
- }
684
- function un(e, t) {
685
- for (let n = 0; n < e.length; n++)
686
- Jt(e[n], t);
687
- }
688
- function Jt(e, t) {
689
- switch (e.type) {
690
- case 1:
691
- un(e.cases, t), t.helper(
692
- "plural"
693
- /* HelperNameMap.PLURAL */
694
- );
695
- break;
696
- case 2:
697
- un(e.items, t);
698
- break;
699
- case 6: {
700
- Jt(e.key, t), t.helper(
701
- "linked"
702
- /* HelperNameMap.LINKED */
703
- ), t.helper(
704
- "type"
705
- /* HelperNameMap.TYPE */
706
- );
707
- break;
708
- }
709
- case 5:
710
- t.helper(
711
- "interpolate"
712
- /* HelperNameMap.INTERPOLATE */
713
- ), t.helper(
714
- "list"
715
- /* HelperNameMap.LIST */
716
- );
717
- break;
718
- case 4:
719
- t.helper(
720
- "interpolate"
721
- /* HelperNameMap.INTERPOLATE */
722
- ), t.helper(
723
- "named"
724
- /* HelperNameMap.NAMED */
725
- );
726
- break;
727
- }
728
- }
729
- function tr(e, t = {}) {
730
- const n = er(e);
731
- n.helper(
732
- "normalize"
733
- /* HelperNameMap.NORMALIZE */
734
- ), e.body && Jt(e.body, n);
735
- const s = n.context();
736
- e.helpers = Array.from(s.helpers);
737
- }
738
- function nr(e) {
739
- const t = e.body;
740
- return t.type === 2 ? dn(t) : t.cases.forEach((n) => dn(n)), e;
741
- }
742
- function dn(e) {
743
- if (e.items.length === 1) {
744
- const t = e.items[0];
745
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
746
- } else {
747
- const t = [];
748
- for (let n = 0; n < e.items.length; n++) {
749
- const s = e.items[n];
750
- if (!(s.type === 3 || s.type === 9) || s.value == null)
751
- break;
752
- t.push(s.value);
753
- }
754
- if (t.length === e.items.length) {
755
- e.static = $t(t);
756
- for (let n = 0; n < e.items.length; n++) {
757
- const s = e.items[n];
758
- (s.type === 3 || s.type === 9) && delete s.value;
759
- }
760
- }
761
- }
762
- }
763
- function Je(e) {
764
- switch (e.t = e.type, e.type) {
765
- case 0: {
766
- const t = e;
767
- Je(t.body), t.b = t.body, delete t.body;
768
- break;
769
- }
770
- case 1: {
771
- const t = e, n = t.cases;
772
- for (let s = 0; s < n.length; s++)
773
- Je(n[s]);
774
- t.c = n, delete t.cases;
775
- break;
776
- }
777
- case 2: {
778
- const t = e, n = t.items;
779
- for (let s = 0; s < n.length; s++)
780
- Je(n[s]);
781
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
782
- break;
783
- }
784
- case 3:
785
- case 9:
786
- case 8:
787
- case 7: {
788
- const t = e;
789
- t.value && (t.v = t.value, delete t.value);
790
- break;
791
- }
792
- case 6: {
793
- const t = e;
794
- Je(t.key), t.k = t.key, delete t.key, t.modifier && (Je(t.modifier), t.m = t.modifier, delete t.modifier);
795
- break;
796
- }
797
- case 5: {
798
- const t = e;
799
- t.i = t.index, delete t.index;
800
- break;
801
- }
802
- case 4: {
803
- const t = e;
804
- t.k = t.key, delete t.key;
805
- break;
806
- }
807
- }
808
- delete e.type;
809
- }
810
- function sr(e, t) {
811
- const { filename: n, breakLineCode: s, needIndent: o } = t, a = t.location !== !1, d = {
812
- filename: n,
813
- code: "",
814
- column: 1,
815
- line: 1,
816
- offset: 0,
817
- map: void 0,
818
- breakLineCode: s,
819
- needIndent: o,
820
- indentLevel: 0
821
- };
822
- a && e.loc && (d.source = e.loc.source);
823
- const u = () => d;
824
- function c(A, F) {
825
- d.code += A;
826
- }
827
- function h(A, F = !0) {
828
- const f = F ? s : "";
829
- c(o ? f + " ".repeat(A) : f);
830
- }
831
- function y(A = !0) {
832
- const F = ++d.indentLevel;
833
- A && h(F);
834
- }
835
- function C(A = !0) {
836
- const F = --d.indentLevel;
837
- A && h(F);
838
- }
839
- function N() {
840
- h(d.indentLevel);
841
- }
842
- return {
843
- context: u,
844
- push: c,
845
- indent: y,
846
- deindent: C,
847
- newline: N,
848
- helper: (A) => `_${A}`,
849
- needIndent: () => d.needIndent
850
- };
851
- }
852
- function rr(e, t) {
853
- const { helper: n } = e;
854
- e.push(`${n(
855
- "linked"
856
- /* HelperNameMap.LINKED */
857
- )}(`), qe(e, t.key), t.modifier ? (e.push(", "), qe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
858
- }
859
- function ar(e, t) {
860
- const { helper: n, needIndent: s } = e;
861
- e.push(`${n(
862
- "normalize"
863
- /* HelperNameMap.NORMALIZE */
864
- )}([`), e.indent(s());
865
- const o = t.items.length;
866
- for (let a = 0; a < o && (qe(e, t.items[a]), a !== o - 1); a++)
867
- e.push(", ");
868
- e.deindent(s()), e.push("])");
869
- }
870
- function or(e, t) {
871
- const { helper: n, needIndent: s } = e;
872
- if (t.cases.length > 1) {
873
- e.push(`${n(
874
- "plural"
875
- /* HelperNameMap.PLURAL */
876
- )}([`), e.indent(s());
877
- const o = t.cases.length;
878
- for (let a = 0; a < o && (qe(e, t.cases[a]), a !== o - 1); a++)
879
- e.push(", ");
880
- e.deindent(s()), e.push("])");
881
- }
882
- }
883
- function lr(e, t) {
884
- t.body ? qe(e, t.body) : e.push("null");
885
- }
886
- function qe(e, t) {
887
- const { helper: n } = e;
888
- switch (t.type) {
889
- case 0:
890
- lr(e, t);
891
- break;
892
- case 1:
893
- or(e, t);
894
- break;
895
- case 2:
896
- ar(e, t);
897
- break;
898
- case 6:
899
- rr(e, t);
900
- break;
901
- case 8:
902
- e.push(JSON.stringify(t.value), t);
903
- break;
904
- case 7:
905
- e.push(JSON.stringify(t.value), t);
906
- break;
907
- case 5:
908
- e.push(`${n(
909
- "interpolate"
910
- /* HelperNameMap.INTERPOLATE */
911
- )}(${n(
912
- "list"
913
- /* HelperNameMap.LIST */
914
- )}(${t.index}))`, t);
915
- break;
916
- case 4:
917
- e.push(`${n(
918
- "interpolate"
919
- /* HelperNameMap.INTERPOLATE */
920
- )}(${n(
921
- "named"
922
- /* HelperNameMap.NAMED */
923
- )}(${JSON.stringify(t.key)}))`, t);
924
- break;
925
- case 9:
926
- e.push(JSON.stringify(t.value), t);
927
- break;
928
- case 3:
929
- e.push(JSON.stringify(t.value), t);
930
- break;
931
- }
932
- }
933
- const ir = (e, t = {}) => {
934
- const n = Z(t.mode) ? t.mode : "normal", s = Z(t.filename) ? t.filename : "message.intl";
935
- t.sourceMap;
936
- const o = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
937
- `, a = t.needIndent ? t.needIndent : n !== "arrow", d = e.helpers || [], u = sr(e, {
938
- filename: s,
939
- breakLineCode: o,
940
- needIndent: a
941
- });
942
- u.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), u.indent(a), d.length > 0 && (u.push(`const { ${$t(d.map((y) => `${y}: _${y}`), ", ")} } = ctx`), u.newline()), u.push("return "), qe(u, e), u.deindent(a), u.push("}"), delete e.helpers;
943
- const { code: c, map: h } = u.context();
944
- return {
945
- ast: e,
946
- code: c,
947
- map: h ? h.toJSON() : void 0
948
- // eslint-disable-line @typescript-eslint/no-explicit-any
949
- };
950
- };
951
- function cr(e, t = {}) {
952
- const n = ye({}, t), s = !!n.jit, o = !!n.minify, a = n.optimize == null ? !0 : n.optimize, u = qs(n).parse(e);
953
- return s ? (a && nr(u), o && Je(u), { ast: u, code: "" }) : (tr(u, n), ir(u, n));
954
- }
955
- var ur = { env: { NODE_ENV: "production" } };
956
- function dr() {
957
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Xe().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Xe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
958
- }
959
- function Lt(e) {
960
- return (n) => mr(n, e);
961
- }
962
- function mr(e, t) {
963
- const n = _r(t);
964
- if (n == null)
965
- throw lt(
966
- 0
967
- /* NodeTypes.Resource */
968
- );
969
- if (Kt(n) === 1) {
970
- const a = vr(n);
971
- return e.plural(a.reduce((d, u) => [
972
- ...d,
973
- mn(e, u)
974
- ], []));
975
- } else
976
- return mn(e, n);
977
- }
978
- const fr = ["b", "body"];
979
- function _r(e) {
980
- return Ze(e, fr);
981
- }
982
- const pr = ["c", "cases"];
983
- function vr(e) {
984
- return Ze(e, pr, []);
985
- }
986
- function mn(e, t) {
987
- const n = hr(t);
988
- if (n != null)
989
- return e.type === "text" ? n : e.normalize([n]);
990
- {
991
- const s = Ir(t).reduce((o, a) => [...o, Pt(e, a)], []);
992
- return e.normalize(s);
993
- }
994
- }
995
- const br = ["s", "static"];
996
- function hr(e) {
997
- return Ze(e, br);
998
- }
999
- const gr = ["i", "items"];
1000
- function Ir(e) {
1001
- return Ze(e, gr, []);
1002
- }
1003
- function Pt(e, t) {
1004
- const n = Kt(t);
1005
- switch (n) {
1006
- case 3:
1007
- return _t(t, n);
1008
- case 9:
1009
- return _t(t, n);
1010
- case 4: {
1011
- const s = t;
1012
- if (De(s, "k") && s.k)
1013
- return e.interpolate(e.named(s.k));
1014
- if (De(s, "key") && s.key)
1015
- return e.interpolate(e.named(s.key));
1016
- throw lt(n);
1017
- }
1018
- case 5: {
1019
- const s = t;
1020
- if (De(s, "i") && Ie(s.i))
1021
- return e.interpolate(e.list(s.i));
1022
- if (De(s, "index") && Ie(s.index))
1023
- return e.interpolate(e.list(s.index));
1024
- throw lt(n);
1025
- }
1026
- case 6: {
1027
- const s = t, o = Tr(s), a = kr(s);
1028
- return e.linked(Pt(e, a), o ? Pt(e, o) : void 0, e.type);
1029
- }
1030
- case 7:
1031
- return _t(t, n);
1032
- case 8:
1033
- return _t(t, n);
1034
- default:
1035
- throw new Error(`unhandled node on format message part: ${n}`);
1036
- }
1037
- }
1038
- const yr = ["t", "type"];
1039
- function Kt(e) {
1040
- return Ze(e, yr);
1041
- }
1042
- const Er = ["v", "value"];
1043
- function _t(e, t) {
1044
- const n = Ze(e, Er);
1045
- if (n)
1046
- return n;
1047
- throw lt(t);
1048
- }
1049
- const Nr = ["m", "modifier"];
1050
- function Tr(e) {
1051
- return Ze(e, Nr);
1052
- }
1053
- const Cr = ["k", "key"];
1054
- function kr(e) {
1055
- const t = Ze(e, Cr);
1056
- if (t)
1057
- return t;
1058
- throw lt(
1059
- 6
1060
- /* NodeTypes.Linked */
1061
- );
1062
- }
1063
- function Ze(e, t, n) {
1064
- for (let s = 0; s < t.length; s++) {
1065
- const o = t[s];
1066
- if (De(e, o) && e[o] != null)
1067
- return e[o];
1068
- }
1069
- return n;
1070
- }
1071
- function lt(e) {
1072
- return new Error(`unhandled node type: ${e}`);
1073
- }
1074
- const Or = (e) => e;
1075
- let pt = ie();
1076
- function et(e) {
1077
- return se(e) && Kt(e) === 0 && (De(e, "b") || De(e, "body"));
1078
- }
1079
- function Sr(e, t = {}) {
1080
- let n = !1;
1081
- const s = t.onError || Gs;
1082
- return t.onError = (o) => {
1083
- n = !0, s(o);
1084
- }, { ...cr(e, t), detectError: n };
1085
- }
1086
- // @__NO_SIDE_EFFECTS__
1087
- function Lr(e, t) {
1088
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && Z(e)) {
1089
- pe(t.warnHtmlMessage) && t.warnHtmlMessage;
1090
- const s = (t.onCacheKey || Or)(e), o = pt[s];
1091
- if (o)
1092
- return o;
1093
- const { ast: a, detectError: d } = Sr(e, {
1094
- ...t,
1095
- location: ur.env.NODE_ENV !== "production",
1096
- jit: !0
1097
- }), u = Lt(a);
1098
- return d ? u : pt[s] = u;
1099
- } else {
1100
- const n = e.cacheKey;
1101
- if (n) {
1102
- const s = pt[n];
1103
- return s || (pt[n] = Lt(e));
1104
- } else
1105
- return Lt(e);
1106
- }
1107
- }
1108
- let it = null;
1109
- function Rr(e) {
1110
- it = e;
1111
- }
1112
- function Ar(e, t, n) {
1113
- it && it.emit("i18n:init", {
1114
- timestamp: Date.now(),
1115
- i18n: e,
1116
- version: t,
1117
- meta: n
1118
- });
1119
- }
1120
- const Dr = /* @__PURE__ */ Mr("function:translate");
1121
- function Mr(e) {
1122
- return (t) => it && it.emit(e, t);
1123
- }
1124
- const Ve = {
1125
- INVALID_ARGUMENT: Ws,
1126
- // 17
1127
- INVALID_DATE_ARGUMENT: 18,
1128
- INVALID_ISO_DATE_ARGUMENT: 19,
1129
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1130
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1131
- NOT_SUPPORT_LOCALE_TYPE: 23
1132
- }, wr = 24;
1133
- function xe(e) {
1134
- return Ct(e, null, void 0);
1135
- }
1136
- function zt(e, t) {
1137
- return t.locale != null ? fn(t.locale) : fn(e.locale);
1138
- }
1139
- let Rt;
1140
- function fn(e) {
1141
- if (Z(e))
1142
- return e;
1143
- if (me(e)) {
1144
- if (e.resolvedOnce && Rt != null)
1145
- return Rt;
1146
- if (e.constructor.name === "Function") {
1147
- const t = e();
1148
- if (js(t))
1149
- throw xe(Ve.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1150
- return Rt = t;
1151
- } else
1152
- throw xe(Ve.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1153
- } else
1154
- throw xe(Ve.NOT_SUPPORT_LOCALE_TYPE);
1155
- }
1156
- function Fr(e, t, n) {
1157
- return [.../* @__PURE__ */ new Set([
1158
- n,
1159
- ...ge(t) ? t : se(t) ? Object.keys(t) : Z(t) ? [t] : [n]
1160
- ])];
1161
- }
1162
- function Xn(e, t, n) {
1163
- const s = Z(n) ? n : Nt, o = e;
1164
- o.__localeChainCache || (o.__localeChainCache = /* @__PURE__ */ new Map());
1165
- let a = o.__localeChainCache.get(s);
1166
- if (!a) {
1167
- a = [];
1168
- let d = [n];
1169
- for (; ge(d); )
1170
- d = _n(a, d, t);
1171
- const u = ge(t) || !ne(t) ? t : t.default ? t.default : null;
1172
- d = Z(u) ? [u] : u, ge(d) && _n(a, d, !1), o.__localeChainCache.set(s, a);
1173
- }
1174
- return a;
1175
- }
1176
- function _n(e, t, n) {
1177
- let s = !0;
1178
- for (let o = 0; o < t.length && pe(s); o++) {
1179
- const a = t[o];
1180
- Z(a) && (s = Pr(e, t[o], n));
1181
- }
1182
- return s;
1183
- }
1184
- function Pr(e, t, n) {
1185
- let s;
1186
- const o = t.split("-");
1187
- do {
1188
- const a = o.join("-");
1189
- s = jr(e, a, n), o.splice(-1, 1);
1190
- } while (o.length && s === !0);
1191
- return s;
1192
- }
1193
- function jr(e, t, n) {
1194
- let s = !1;
1195
- if (!e.includes(t) && (s = !0, t)) {
1196
- s = t[t.length - 1] !== "!";
1197
- const o = t.replace(/!/g, "");
1198
- e.push(o), (ge(n) || ne(n)) && n[o] && (s = n[o]);
1199
- }
1200
- return s;
1201
- }
1202
- const Be = [];
1203
- Be[
1204
- 0
1205
- /* States.BEFORE_PATH */
1206
- ] = {
1207
- w: [
1208
- 0
1209
- /* States.BEFORE_PATH */
1210
- ],
1211
- i: [
1212
- 3,
1213
- 0
1214
- /* Actions.APPEND */
1215
- ],
1216
- "[": [
1217
- 4
1218
- /* States.IN_SUB_PATH */
1219
- ],
1220
- o: [
1221
- 7
1222
- /* States.AFTER_PATH */
1223
- ]
1224
- };
1225
- Be[
1226
- 1
1227
- /* States.IN_PATH */
1228
- ] = {
1229
- w: [
1230
- 1
1231
- /* States.IN_PATH */
1232
- ],
1233
- ".": [
1234
- 2
1235
- /* States.BEFORE_IDENT */
1236
- ],
1237
- "[": [
1238
- 4
1239
- /* States.IN_SUB_PATH */
1240
- ],
1241
- o: [
1242
- 7
1243
- /* States.AFTER_PATH */
1244
- ]
1245
- };
1246
- Be[
1247
- 2
1248
- /* States.BEFORE_IDENT */
1249
- ] = {
1250
- w: [
1251
- 2
1252
- /* States.BEFORE_IDENT */
1253
- ],
1254
- i: [
1255
- 3,
1256
- 0
1257
- /* Actions.APPEND */
1258
- ],
1259
- 0: [
1260
- 3,
1261
- 0
1262
- /* Actions.APPEND */
1263
- ]
1264
- };
1265
- Be[
1266
- 3
1267
- /* States.IN_IDENT */
1268
- ] = {
1269
- i: [
1270
- 3,
1271
- 0
1272
- /* Actions.APPEND */
1273
- ],
1274
- 0: [
1275
- 3,
1276
- 0
1277
- /* Actions.APPEND */
1278
- ],
1279
- w: [
1280
- 1,
1281
- 1
1282
- /* Actions.PUSH */
1283
- ],
1284
- ".": [
1285
- 2,
1286
- 1
1287
- /* Actions.PUSH */
1288
- ],
1289
- "[": [
1290
- 4,
1291
- 1
1292
- /* Actions.PUSH */
1293
- ],
1294
- o: [
1295
- 7,
1296
- 1
1297
- /* Actions.PUSH */
1298
- ]
1299
- };
1300
- Be[
1301
- 4
1302
- /* States.IN_SUB_PATH */
1303
- ] = {
1304
- "'": [
1305
- 5,
1306
- 0
1307
- /* Actions.APPEND */
1308
- ],
1309
- '"': [
1310
- 6,
1311
- 0
1312
- /* Actions.APPEND */
1313
- ],
1314
- "[": [
1315
- 4,
1316
- 2
1317
- /* Actions.INC_SUB_PATH_DEPTH */
1318
- ],
1319
- "]": [
1320
- 1,
1321
- 3
1322
- /* Actions.PUSH_SUB_PATH */
1323
- ],
1324
- o: 8,
1325
- l: [
1326
- 4,
1327
- 0
1328
- /* Actions.APPEND */
1329
- ]
1330
- };
1331
- Be[
1332
- 5
1333
- /* States.IN_SINGLE_QUOTE */
1334
- ] = {
1335
- "'": [
1336
- 4,
1337
- 0
1338
- /* Actions.APPEND */
1339
- ],
1340
- o: 8,
1341
- l: [
1342
- 5,
1343
- 0
1344
- /* Actions.APPEND */
1345
- ]
1346
- };
1347
- Be[
1348
- 6
1349
- /* States.IN_DOUBLE_QUOTE */
1350
- ] = {
1351
- '"': [
1352
- 4,
1353
- 0
1354
- /* Actions.APPEND */
1355
- ],
1356
- o: 8,
1357
- l: [
1358
- 6,
1359
- 0
1360
- /* Actions.APPEND */
1361
- ]
1362
- };
1363
- const Ur = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1364
- function Vr(e) {
1365
- return Ur.test(e);
1366
- }
1367
- function xr(e) {
1368
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1369
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1370
- }
1371
- function Wr(e) {
1372
- if (e == null)
1373
- return "o";
1374
- switch (e.charCodeAt(0)) {
1375
- case 91:
1376
- case 93:
1377
- case 46:
1378
- case 34:
1379
- case 39:
1380
- return e;
1381
- case 95:
1382
- case 36:
1383
- case 45:
1384
- return "i";
1385
- case 9:
1386
- case 10:
1387
- case 13:
1388
- case 160:
1389
- case 65279:
1390
- case 8232:
1391
- case 8233:
1392
- return "w";
1393
- }
1394
- return "i";
1395
- }
1396
- function Gr(e) {
1397
- const t = e.trim();
1398
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Vr(t) ? xr(t) : "*" + t;
1399
- }
1400
- function Yr(e) {
1401
- const t = [];
1402
- let n = -1, s = 0, o = 0, a, d, u, c, h, y, C;
1403
- const N = [];
1404
- N[
1405
- 0
1406
- /* Actions.APPEND */
1407
- ] = () => {
1408
- d === void 0 ? d = u : d += u;
1409
- }, N[
1410
- 1
1411
- /* Actions.PUSH */
1412
- ] = () => {
1413
- d !== void 0 && (t.push(d), d = void 0);
1414
- }, N[
1415
- 2
1416
- /* Actions.INC_SUB_PATH_DEPTH */
1417
- ] = () => {
1418
- N[
1419
- 0
1420
- /* Actions.APPEND */
1421
- ](), o++;
1422
- }, N[
1423
- 3
1424
- /* Actions.PUSH_SUB_PATH */
1425
- ] = () => {
1426
- if (o > 0)
1427
- o--, s = 4, N[
1428
- 0
1429
- /* Actions.APPEND */
1430
- ]();
1431
- else {
1432
- if (o = 0, d === void 0 || (d = Gr(d), d === !1))
1433
- return !1;
1434
- N[
1435
- 1
1436
- /* Actions.PUSH */
1437
- ]();
1438
- }
1439
- };
1440
- function w() {
1441
- const M = e[n + 1];
1442
- if (s === 5 && M === "'" || s === 6 && M === '"')
1443
- return n++, u = "\\" + M, N[
1444
- 0
1445
- /* Actions.APPEND */
1446
- ](), !0;
1447
- }
1448
- for (; s !== null; )
1449
- if (n++, a = e[n], !(a === "\\" && w())) {
1450
- if (c = Wr(a), C = Be[s], h = C[c] || C.l || 8, h === 8 || (s = h[0], h[1] !== void 0 && (y = N[h[1]], y && (u = a, y() === !1))))
1451
- return;
1452
- if (s === 7)
1453
- return t;
1454
- }
1455
- }
1456
- const pn = /* @__PURE__ */ new Map();
1457
- function Zr(e, t) {
1458
- return se(e) ? e[t] : null;
1459
- }
1460
- function Br(e, t) {
1461
- if (!se(e))
1462
- return null;
1463
- let n = pn.get(t);
1464
- if (n || (n = Yr(t), n && pn.set(t, n)), !n)
1465
- return null;
1466
- const s = n.length;
1467
- let o = e, a = 0;
1468
- for (; a < s; ) {
1469
- const d = o[n[a]];
1470
- if (d === void 0 || me(o))
1471
- return null;
1472
- o = d, a++;
1473
- }
1474
- return o;
1475
- }
1476
- const Xr = "10.0.5", kt = -1, Nt = "en-US", vn = "", bn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1477
- function Hr() {
1478
- return {
1479
- upper: (e, t) => t === "text" && Z(e) ? e.toUpperCase() : t === "vnode" && se(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1480
- lower: (e, t) => t === "text" && Z(e) ? e.toLowerCase() : t === "vnode" && se(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1481
- capitalize: (e, t) => t === "text" && Z(e) ? bn(e) : t === "vnode" && se(e) && "__v_isVNode" in e ? bn(e.children) : e
1482
- };
1483
- }
1484
- let Hn;
1485
- function $r(e) {
1486
- Hn = e;
1487
- }
1488
- let $n;
1489
- function Jr(e) {
1490
- $n = e;
1491
- }
1492
- let Jn;
1493
- function Kr(e) {
1494
- Jn = e;
1495
- }
1496
- let Kn = null;
1497
- const zr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1498
- Kn = e;
1499
- }, Qr = /* @__NO_SIDE_EFFECTS__ */ () => Kn;
1500
- let zn = null;
1501
- const hn = (e) => {
1502
- zn = e;
1503
- }, qr = () => zn;
1504
- let gn = 0;
1505
- function ea(e = {}) {
1506
- const t = me(e.onWarn) ? e.onWarn : Vs, n = Z(e.version) ? e.version : Xr, s = Z(e.locale) || me(e.locale) ? e.locale : Nt, o = me(s) ? Nt : s, a = ge(e.fallbackLocale) || ne(e.fallbackLocale) || Z(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o, d = ne(e.messages) ? e.messages : At(o), u = ne(e.datetimeFormats) ? e.datetimeFormats : At(o), c = ne(e.numberFormats) ? e.numberFormats : At(o), h = ye(ie(), e.modifiers, Hr()), y = e.pluralRules || ie(), C = me(e.missing) ? e.missing : null, N = pe(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, w = pe(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, M = !!e.fallbackFormat, A = !!e.unresolving, F = me(e.postTranslation) ? e.postTranslation : null, f = ne(e.processor) ? e.processor : null, p = pe(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, S = !!e.escapeParameter, i = me(e.messageCompiler) ? e.messageCompiler : Hn, v = me(e.messageResolver) ? e.messageResolver : $n || Zr, g = me(e.localeFallbacker) ? e.localeFallbacker : Jn || Fr, _ = se(e.fallbackContext) ? e.fallbackContext : void 0, D = e, L = se(D.__datetimeFormatters) ? D.__datetimeFormatters : /* @__PURE__ */ new Map(), $ = se(D.__numberFormatters) ? D.__numberFormatters : /* @__PURE__ */ new Map(), W = se(D.__meta) ? D.__meta : {};
1507
- gn++;
1508
- const m = {
1509
- version: n,
1510
- cid: gn,
1511
- locale: s,
1512
- fallbackLocale: a,
1513
- messages: d,
1514
- modifiers: h,
1515
- pluralRules: y,
1516
- missing: C,
1517
- missingWarn: N,
1518
- fallbackWarn: w,
1519
- fallbackFormat: M,
1520
- unresolving: A,
1521
- postTranslation: F,
1522
- processor: f,
1523
- warnHtmlMessage: p,
1524
- escapeParameter: S,
1525
- messageCompiler: i,
1526
- messageResolver: v,
1527
- localeFallbacker: g,
1528
- fallbackContext: _,
1529
- onWarn: t,
1530
- __meta: W
1531
- };
1532
- return m.datetimeFormats = u, m.numberFormats = c, m.__datetimeFormatters = L, m.__numberFormatters = $, __INTLIFY_PROD_DEVTOOLS__ && Ar(m, n, W), m;
1533
- }
1534
- const At = (e) => ({ [e]: ie() });
1535
- function Qt(e, t, n, s, o) {
1536
- const { missing: a, onWarn: d } = e;
1537
- if (a !== null) {
1538
- const u = a(e, n, t, o);
1539
- return Z(u) ? u : t;
1540
- } else
1541
- return t;
1542
- }
1543
- function at(e, t, n) {
1544
- const s = e;
1545
- s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1546
- }
1547
- function ta(e, t) {
1548
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1549
- }
1550
- function na(e, t) {
1551
- const n = t.indexOf(e);
1552
- if (n === -1)
1553
- return !1;
1554
- for (let s = n + 1; s < t.length; s++)
1555
- if (ta(e, t[s]))
1556
- return !0;
1557
- return !1;
1558
- }
1559
- function In(e, ...t) {
1560
- const { datetimeFormats: n, unresolving: s, fallbackLocale: o, onWarn: a, localeFallbacker: d } = e, { __datetimeFormatters: u } = e, [c, h, y, C] = jt(...t), N = pe(y.missingWarn) ? y.missingWarn : e.missingWarn;
1561
- pe(y.fallbackWarn) ? y.fallbackWarn : e.fallbackWarn;
1562
- const w = !!y.part, M = zt(e, y), A = d(
1563
- e,
1564
- // eslint-disable-line @typescript-eslint/no-explicit-any
1565
- o,
1566
- M
1567
- );
1568
- if (!Z(c) || c === "")
1569
- return new Intl.DateTimeFormat(M, C).format(h);
1570
- let F = {}, f, p = null;
1571
- const S = "datetime format";
1572
- for (let g = 0; g < A.length && (f = A[g], F = n[f] || {}, p = F[c], !ne(p)); g++)
1573
- Qt(e, c, f, N, S);
1574
- if (!ne(p) || !Z(f))
1575
- return s ? kt : c;
1576
- let i = `${f}__${c}`;
1577
- Tt(C) || (i = `${i}__${JSON.stringify(C)}`);
1578
- let v = u.get(i);
1579
- return v || (v = new Intl.DateTimeFormat(f, ye({}, p, C)), u.set(i, v)), w ? v.formatToParts(h) : v.format(h);
1580
- }
1581
- const Qn = [
1582
- "localeMatcher",
1583
- "weekday",
1584
- "era",
1585
- "year",
1586
- "month",
1587
- "day",
1588
- "hour",
1589
- "minute",
1590
- "second",
1591
- "timeZoneName",
1592
- "formatMatcher",
1593
- "hour12",
1594
- "timeZone",
1595
- "dateStyle",
1596
- "timeStyle",
1597
- "calendar",
1598
- "dayPeriod",
1599
- "numberingSystem",
1600
- "hourCycle",
1601
- "fractionalSecondDigits"
1602
- ];
1603
- function jt(...e) {
1604
- const [t, n, s, o] = e, a = ie();
1605
- let d = ie(), u;
1606
- if (Z(t)) {
1607
- const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1608
- if (!c)
1609
- throw xe(Ve.INVALID_ISO_DATE_ARGUMENT);
1610
- const h = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
1611
- u = new Date(h);
1612
- try {
1613
- u.toISOString();
1614
- } catch {
1615
- throw xe(Ve.INVALID_ISO_DATE_ARGUMENT);
1616
- }
1617
- } else if (ws(t)) {
1618
- if (isNaN(t.getTime()))
1619
- throw xe(Ve.INVALID_DATE_ARGUMENT);
1620
- u = t;
1621
- } else if (Ie(t))
1622
- u = t;
1623
- else
1624
- throw xe(Ve.INVALID_ARGUMENT);
1625
- return Z(n) ? a.key = n : ne(n) && Object.keys(n).forEach((c) => {
1626
- Qn.includes(c) ? d[c] = n[c] : a[c] = n[c];
1627
- }), Z(s) ? a.locale = s : ne(s) && (d = s), ne(o) && (d = o), [a.key || "", u, a, d];
1628
- }
1629
- function yn(e, t, n) {
1630
- const s = e;
1631
- for (const o in n) {
1632
- const a = `${t}__${o}`;
1633
- s.__datetimeFormatters.has(a) && s.__datetimeFormatters.delete(a);
1634
- }
1635
- }
1636
- function En(e, ...t) {
1637
- const { numberFormats: n, unresolving: s, fallbackLocale: o, onWarn: a, localeFallbacker: d } = e, { __numberFormatters: u } = e, [c, h, y, C] = Ut(...t), N = pe(y.missingWarn) ? y.missingWarn : e.missingWarn;
1638
- pe(y.fallbackWarn) ? y.fallbackWarn : e.fallbackWarn;
1639
- const w = !!y.part, M = zt(e, y), A = d(
1640
- e,
1641
- // eslint-disable-line @typescript-eslint/no-explicit-any
1642
- o,
1643
- M
1644
- );
1645
- if (!Z(c) || c === "")
1646
- return new Intl.NumberFormat(M, C).format(h);
1647
- let F = {}, f, p = null;
1648
- const S = "number format";
1649
- for (let g = 0; g < A.length && (f = A[g], F = n[f] || {}, p = F[c], !ne(p)); g++)
1650
- Qt(e, c, f, N, S);
1651
- if (!ne(p) || !Z(f))
1652
- return s ? kt : c;
1653
- let i = `${f}__${c}`;
1654
- Tt(C) || (i = `${i}__${JSON.stringify(C)}`);
1655
- let v = u.get(i);
1656
- return v || (v = new Intl.NumberFormat(f, ye({}, p, C)), u.set(i, v)), w ? v.formatToParts(h) : v.format(h);
1657
- }
1658
- const qn = [
1659
- "localeMatcher",
1660
- "style",
1661
- "currency",
1662
- "currencyDisplay",
1663
- "currencySign",
1664
- "useGrouping",
1665
- "minimumIntegerDigits",
1666
- "minimumFractionDigits",
1667
- "maximumFractionDigits",
1668
- "minimumSignificantDigits",
1669
- "maximumSignificantDigits",
1670
- "compactDisplay",
1671
- "notation",
1672
- "signDisplay",
1673
- "unit",
1674
- "unitDisplay",
1675
- "roundingMode",
1676
- "roundingPriority",
1677
- "roundingIncrement",
1678
- "trailingZeroDisplay"
1679
- ];
1680
- function Ut(...e) {
1681
- const [t, n, s, o] = e, a = ie();
1682
- let d = ie();
1683
- if (!Ie(t))
1684
- throw xe(Ve.INVALID_ARGUMENT);
1685
- const u = t;
1686
- return Z(n) ? a.key = n : ne(n) && Object.keys(n).forEach((c) => {
1687
- qn.includes(c) ? d[c] = n[c] : a[c] = n[c];
1688
- }), Z(s) ? a.locale = s : ne(s) && (d = s), ne(o) && (d = o), [a.key || "", u, a, d];
1689
- }
1690
- function Nn(e, t, n) {
1691
- const s = e;
1692
- for (const o in n) {
1693
- const a = `${t}__${o}`;
1694
- s.__numberFormatters.has(a) && s.__numberFormatters.delete(a);
1695
- }
1696
- }
1697
- const sa = (e) => e, ra = (e) => "", aa = "text", oa = (e) => e.length === 0 ? "" : $t(e), la = Us;
1698
- function Tn(e, t) {
1699
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1700
- }
1701
- function ia(e) {
1702
- const t = Ie(e.pluralIndex) ? e.pluralIndex : -1;
1703
- return e.named && (Ie(e.named.count) || Ie(e.named.n)) ? Ie(e.named.count) ? e.named.count : Ie(e.named.n) ? e.named.n : t : t;
1704
- }
1705
- function ca(e, t) {
1706
- t.count || (t.count = e), t.n || (t.n = e);
1707
- }
1708
- function ua(e = {}) {
1709
- const t = e.locale, n = ia(e), s = se(e.pluralRules) && Z(t) && me(e.pluralRules[t]) ? e.pluralRules[t] : Tn, o = se(e.pluralRules) && Z(t) && me(e.pluralRules[t]) ? Tn : void 0, a = (f) => f[s(n, f.length, o)], d = e.list || [], u = (f) => d[f], c = e.named || ie();
1710
- Ie(e.pluralIndex) && ca(n, c);
1711
- const h = (f) => c[f];
1712
- function y(f, p) {
1713
- const S = me(e.messages) ? e.messages(f, !!p) : se(e.messages) ? e.messages[f] : !1;
1714
- return S || (e.parent ? e.parent.message(f) : ra);
1715
- }
1716
- const C = (f) => e.modifiers ? e.modifiers[f] : sa, N = ne(e.processor) && me(e.processor.normalize) ? e.processor.normalize : oa, w = ne(e.processor) && me(e.processor.interpolate) ? e.processor.interpolate : la, M = ne(e.processor) && Z(e.processor.type) ? e.processor.type : aa, F = {
1717
- list: u,
1718
- named: h,
1719
- plural: a,
1720
- linked: (f, ...p) => {
1721
- const [S, i] = p;
1722
- let v = "text", g = "";
1723
- p.length === 1 ? se(S) ? (g = S.modifier || g, v = S.type || v) : Z(S) && (g = S || g) : p.length === 2 && (Z(S) && (g = S || g), Z(i) && (v = i || v));
1724
- const _ = y(f, !0)(F), D = (
1725
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1726
- v === "vnode" && ge(_) && g ? _[0] : _
1727
- );
1728
- return g ? C(g)(D, v) : D;
1729
- },
1730
- message: y,
1731
- type: M,
1732
- interpolate: w,
1733
- normalize: N,
1734
- values: ye(ie(), d, c)
1735
- };
1736
- return F;
1737
- }
1738
- const Cn = () => "", Oe = (e) => me(e);
1739
- function kn(e, ...t) {
1740
- const { fallbackFormat: n, postTranslation: s, unresolving: o, messageCompiler: a, fallbackLocale: d, messages: u } = e, [c, h] = Vt(...t), y = pe(h.missingWarn) ? h.missingWarn : e.missingWarn, C = pe(h.fallbackWarn) ? h.fallbackWarn : e.fallbackWarn, N = pe(h.escapeParameter) ? h.escapeParameter : e.escapeParameter, w = !!h.resolvedMessage, M = Z(h.default) || pe(h.default) ? pe(h.default) ? a ? c : () => c : h.default : n ? a ? c : () => c : null, A = n || M != null && (Z(M) || me(M)), F = zt(e, h);
1741
- N && da(h);
1742
- let [f, p, S] = w ? [
1743
- c,
1744
- F,
1745
- u[F] || ie()
1746
- ] : es(e, c, F, d, C, y), i = f, v = c;
1747
- if (!w && !(Z(i) || et(i) || Oe(i)) && A && (i = M, v = i), !w && (!(Z(i) || et(i) || Oe(i)) || !Z(p)))
1748
- return o ? kt : c;
1749
- let g = !1;
1750
- const _ = () => {
1751
- g = !0;
1752
- }, D = Oe(i) ? i : ts(e, c, p, i, v, _);
1753
- if (g)
1754
- return i;
1755
- const L = _a(e, p, S, h), $ = ua(L), W = ma(e, D, $), m = s ? s(W, c) : W;
1756
- if (__INTLIFY_PROD_DEVTOOLS__) {
1757
- const E = {
1758
- timestamp: Date.now(),
1759
- key: Z(c) ? c : Oe(i) ? i.key : "",
1760
- locale: p || (Oe(i) ? i.locale : ""),
1761
- format: Z(i) ? i : Oe(i) ? i.source : "",
1762
- message: m
1763
- };
1764
- E.meta = ye({}, e.__meta, /* @__PURE__ */ Qr() || {}), Dr(E);
1765
- }
1766
- return m;
1767
- }
1768
- function da(e) {
1769
- ge(e.list) ? e.list = e.list.map((t) => Z(t) ? ln(t) : t) : se(e.named) && Object.keys(e.named).forEach((t) => {
1770
- Z(e.named[t]) && (e.named[t] = ln(e.named[t]));
1771
- });
1772
- }
1773
- function es(e, t, n, s, o, a) {
1774
- const { messages: d, onWarn: u, messageResolver: c, localeFallbacker: h } = e, y = h(e, s, n);
1775
- let C = ie(), N, w = null;
1776
- const M = "translate";
1777
- for (let A = 0; A < y.length && (N = y[A], C = d[N] || ie(), (w = c(C, t)) === null && (w = C[t]), !(Z(w) || et(w) || Oe(w))); A++)
1778
- if (!na(N, y)) {
1779
- const F = Qt(
1780
- e,
1781
- // eslint-disable-line @typescript-eslint/no-explicit-any
1782
- t,
1783
- N,
1784
- a,
1785
- M
1786
- );
1787
- F !== t && (w = F);
1788
- }
1789
- return [w, N, C];
1790
- }
1791
- function ts(e, t, n, s, o, a) {
1792
- const { messageCompiler: d, warnHtmlMessage: u } = e;
1793
- if (Oe(s)) {
1794
- const h = s;
1795
- return h.locale = h.locale || n, h.key = h.key || t, h;
1796
- }
1797
- if (d == null) {
1798
- const h = () => s;
1799
- return h.locale = n, h.key = t, h;
1800
- }
1801
- const c = d(s, fa(e, n, o, s, u, a));
1802
- return c.locale = n, c.key = t, c.source = s, c;
1803
- }
1804
- function ma(e, t, n) {
1805
- return t(n);
1806
- }
1807
- function Vt(...e) {
1808
- const [t, n, s] = e, o = ie();
1809
- if (!Z(t) && !Ie(t) && !Oe(t) && !et(t))
1810
- throw xe(Ve.INVALID_ARGUMENT);
1811
- const a = Ie(t) ? String(t) : (Oe(t), t);
1812
- return Ie(n) ? o.plural = n : Z(n) ? o.default = n : ne(n) && !Tt(n) ? o.named = n : ge(n) && (o.list = n), Ie(s) ? o.plural = s : Z(s) ? o.default = s : ne(s) && ye(o, s), [a, o];
1813
- }
1814
- function fa(e, t, n, s, o, a) {
1815
- return {
1816
- locale: t,
1817
- key: n,
1818
- warnHtmlMessage: o,
1819
- onError: (d) => {
1820
- throw a && a(d), d;
1821
- },
1822
- onCacheKey: (d) => Ds(t, n, d)
1823
- };
1824
- }
1825
- function _a(e, t, n, s) {
1826
- const { modifiers: o, pluralRules: a, messageResolver: d, fallbackLocale: u, fallbackWarn: c, missingWarn: h, fallbackContext: y } = e, N = {
1827
- locale: t,
1828
- modifiers: o,
1829
- pluralRules: a,
1830
- messages: (w, M) => {
1831
- let A = d(n, w);
1832
- if (A == null && (y || M)) {
1833
- const [, , F] = es(
1834
- y || e,
1835
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1836
- w,
1837
- t,
1838
- u,
1839
- c,
1840
- h
1841
- );
1842
- A = d(F, w);
1843
- }
1844
- if (Z(A) || et(A)) {
1845
- let F = !1;
1846
- const p = ts(e, w, t, A, w, () => {
1847
- F = !0;
1848
- });
1849
- return F ? Cn : p;
1850
- } else return Oe(A) ? A : Cn;
1851
- }
1852
- };
1853
- return e.processor && (N.processor = e.processor), s.list && (N.list = s.list), s.named && (N.named = s.named), Ie(s.plural) && (N.pluralIndex = s.plural), N;
1854
- }
1855
- dr();
1856
- var pa = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_082c4127-8af5-48e1-b700-ad0e205627b8", npm_package_devDependencies__types_node: "^18.17.17", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^1.2.0", USER: "runner", npm_config_always_auth: "", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v24.5.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.16", npm_package_devDependencies_vue_i18n: "10.0.5", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_082c4127-8af5-48e1-b700-ad0e205627b8", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.2.0", npm_node_execpath: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", npm_package_files_0: "dist", npm_package_devDependencies_eslint_import_resolver_typescript: "^4.4.4", HOME: "/home/runner", npm_package_devDependencies__eslint_js: "^9.39.2", npm_package_devDependencies__typescript_eslint_parser: "^8.52.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_devDependencies_eslint_config_prettier: "^10.1.8", npm_config_save_workspace_protocol: "true", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", NODE_OPTIONS: "--max-old-space-size=10240", GRADLE_HOME: "/usr/share/gradle-9.6.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --noEmit -p tsconfig.app.json --composite false", npm_package_dependencies__feedmepos_mf_common: "^1.29.10", npm_package_devDependencies_code_inspector_plugin: "^0.20.16", npm_package_devDependencies_npm_run_all2: "^6.0.6", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1782", ACTIONS_ORCHESTRATION_ID: "ab5ae28d-356d-4792-8925-233d76556c0a.publish.publish.__default", npm_package_dependencies__feedmepos_ui_library: "^1.10.6", npm_package_dependencies_dayjs: "^1.11.10", npm_package_devDependencies__tsconfig_node18: "^18.2.2", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "VITE_TARGET_ENV=dev pnpm build:mf && pnpm build:dts", npm_package_devDependencies_tailwindcss: "^3.3.3", npm_package_devDependencies_typescript: "^5.9.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.6", npm_config_prefer_workspace_packages: "true", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260720.247.2", npm_package_scripts_dev: "vite", npm_package_devDependencies_prettier: "^3.7.4", npm_package_devDependencies_sass_embedded: "^1.93.3", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_082c4127-8af5-48e1-b700-ad0e205627b8", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_devDependencies__vue_tsconfig: "^0.4.0", npm_package_devDependencies_eslint_plugin_import: "^2.32.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:10756", GITHUB_WORKFLOW: "Publish hrm-portal", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.16", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^8.52.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.12/x64", GITHUB_RUN_ID: "30419522722", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "c866b8d138732aab167d2199e6793faec3660679", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.5/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/KDI-4965-audit-log-trace", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9LREktNDk2NS1hdWRpdC1sb2ctdHJhY2VcIixcIlBlcm1pc3Npb25cIjozfSx7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6MX1dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3ODUzMTc3MjEsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc4NTI5NTUyMSwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjJkOThlN2JjLTk3YmYtNTFiOS1hNGQ5LTE4NDUwMWZiNzViMyIsImpvYl93b3JrZmxvd19yZWYiOiJmZWVkbWVwb3MvYWN0aW9ucy8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLW5wbS1naXRodWIueWFtbEByZWZzL2hlYWRzL21haW4iLCJqb2Jfd29ya2Zsb3dfc2hhIjoiYjY2NzFmYjU0YzE4MzA2NTFjMjhjZTA4MTc2OGRhZDUzY2UwZjliZSIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc4NTI5NTIyMSwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJqdW4tbGVlLWZlZWRtZVwiLFwiYWN0b3JfaWRcIjpcIjIzOTI4Mjg2MlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI5MDQ3MzIyOTc0N1wiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiYjY2NzFmYjU0YzE4MzA2NTFjMjhjZTA4MTc2OGRhZDUzY2UwZjliZVwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL0tESS00OTY1LWF1ZGl0LWxvZy10cmFjZVwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCIzMDQxOTUyMjcyMlwiLFwicnVuX251bWJlclwiOlwiMTQ0XCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiYzg2NmI4ZDEzODczMmFhYjE2N2QyMTk5ZTY3OTNmYWVjMzY2MDY3OVwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggaHJtLXBvcnRhbFwiLFwid29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvaHJtLXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcHVibGlzaC1ocm0tcG9ydGFsLXRydXN0ZWQueW1sQHJlZnMvaGVhZHMvS0RJLTQ5NjUtYXVkaXQtbG9nLXRyYWNlXCIsXCJ3b3JrZmxvd19zaGFcIjpcImM4NjZiOGQxMzg3MzJhYWIxNjdkMjE5OWU2NzkzZmFlYzM2NjA2NzlcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL2hybS1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL0tESS00OTY1LWF1ZGl0LWxvZy10cmFjZSIsIm9yY2hfaWQiOiJhYjVhZTI4ZC0zNTZkLTQ3OTItODkyNS0yMzNkNzY1NTZjMGEucHVibGlzaC5wdWJsaXNoLl9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6ImFiNWFlMjhkLTM1NmQtNDc5Mi04OTI1LTIzM2Q3NjU1NmMwYSIsInJlcG9zaXRvcnlfaWQiOiIxMTI0NjcyMjM1IiwicmVwb3NpdG9yeV9vd25lcl9pZCI6IjU0ODMxNTE1IiwicmVwb3NpdG9yeV92aXNpYmlsaXR5IjoicHJpdmF0ZSIsInJ1bl9pZCI6IjMwNDE5NTIyNzIyIiwicnVuX251bWJlciI6IjE0NCIsInJ1bl90eXBlIjoiZnVsbCIsInJ1bm5lcl9pZCI6IjEwMDAwOTkyNTMiLCJydW5uZXJfdHlwZSI6Imhvc3RlZCIsInNjcCI6IkFjdGlvbnMuUmVzdWx0czphYjVhZTI4ZC0zNTZkLTQ3OTItODkyNS0yMzNkNzY1NTZjMGE6MmQ5OGU3YmMtOTdiZi01MWI5LWE0ZDktMTg0NTAxZmI3NWIzIEFjdGlvbnMuUnVubmVyOmFiNWFlMjhkLTM1NmQtNDc5Mi04OTI1LTIzM2Q3NjU1NmMwYToyZDk4ZTdiYy05N2JmLTUxYjktYTRkOS0xODQ1MDFmYjc1YjMgQWN0aW9ucy5VcGxvYWRBcnRpZmFjdHM6YWI1YWUyOGQtMzU2ZC00NzkyLTg5MjUtMjMzZDc2NTU2YzBhOjJkOThlN2JjLTk3YmYtNTFiOS1hNGQ5LTE4NDUwMWZiNzViMyBnZW5lcmF0ZV9pZF90b2tlbjphYjVhZTI4ZC0zNTZkLTQ3OTItODkyNS0yMzNkNzY1NTZjMGE6MmQ5OGU3YmMtOTdiZi01MWI5LWE0ZDktMTg0NTAxZmI3NWIzIEFjdGlvbnMuR2VuZXJpY1JlYWQ6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwic2hhIjoiYzg2NmI4ZDEzODczMmFhYjE2N2QyMTk5ZTY3OTNmYWVjMzY2MDY3OSIsInRydXN0X3RpZXIiOiIxIn0.lpLsRqWxv92GEYPsAyPbEFDq-5l-IGO8wCGBW2_sGccKcs-PeqmwQQ1DBrxCrdXr_2nV0781yD2JD8Bu9CPcLp0WD5wARjWi62Y2deD6cD7A-LVs2Q0AQ5smwudnewSdd13VSutuSYT3VudwLlVe5xFUI17lD2KUG-TNTim_WAGl1-OAI_rEqCOL2tG5e7qElGICTpCHvxY0PCQxzPZK8nHJ1QjDV-Bf4fwKJS4DMrT3t_WBrv7PRl-TSa-np8qWV4Yc_KDYe5ntoz3PAzF6nnvceeRQE7Vkl8dfF89TrzwdnGKHoWGgXOh-me7DKTSiEzdUycA3l-H4qgc9hSryyQ", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.7", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.5.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_2c7305c7-ce7d-4584-8502-56315a759d1b", INVOCATION_ID: "d7f7dd3bb2cf46bfbb92916bcfa9c113", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", npm_package_name: "@feedmepos/mf-hrm-portal", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "144", GITHUB_TRIGGERING_ACTOR: "jun-lee-feedme", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_publish_npm: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag latest --no-git-checks", npm_package_scripts_publish_npm_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag beta --no-git-checks", npm_package_scripts_publish_github: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag latest --no-git-checks", npm_package_scripts_publish_github_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag beta --no-git-checks", npm_config_frozen_lockfile: "", npm_package_devDependencies__vitest_ui: "^1.2.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies__vue_eslint_config_typescript: "^12.0.0", npm_package_devDependencies_eslint: "^9.39.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000099253", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "KDI-4965-audit-log-trace", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist", npm_package_dependencies__feedmepos_core: "^2.14.36", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest", npm_package_dependencies_vue3_lottie: "^3.3.0", npm_package_devDependencies__casl_ability: "^3.4.0", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^4.0.0", npm_package_devDependencies__vue_eslint_config_prettier: "^8.0.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "1124672235", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/bin/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "2.1.1-dev", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts", npm_package_dependencies__feedmepos_hrm_permission: "workspace:*", npm_package_devDependencies__rushstack_eslint_patch: "^1.3.3", npm_package_devDependencies_eslint_plugin_unused_imports: "^4.3.0", npm_package_devDependencies_jsdom: "^24.0.0", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: 'run-p type-check "build-only {@}" --', npm_package_dependencies_uuid: "^10.0.0", GITHUB_WORKSPACE: "/home/runner/work/hrm-service/hrm-service", ACCEPT_EULA: "Y", GITHUB_JOB: "publish", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "c866b8d138732aab167d2199e6793faec3660679", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.2", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/KDI-4965-audit-log-trace", GITHUB_ACTOR: "jun-lee-feedme", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", VITE_TARGET_ENV: "dev", npm_package_devDependencies_globals: "^16.5.0", npm_package_scripts_format: "prettier --write src/", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_082c4127-8af5-48e1-b700-ad0e205627b8", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", GITHUB_ACTOR_ID: "239282862", RUNNER_WORKSPACE: "/home/runner/work/hrm-service", npm_package_devDependencies_vue_eslint_parser: "^10.2.0", npm_config_link_workspace_packages: "true", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-1-azure-eastus.actions.githubusercontent.com/215//idtoken/ab5ae28d-356d-4792-8925-233d76556c0a/2d98e7bc-97bf-51b9-a4d9-184501fb75b3?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_082c4127-8af5-48e1-b700-ad0e205627b8", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_auth: "^1.1.14", npm_package_dependencies__feedmepos_feature_flag: "^0.0.15", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_devDependencies_eslint_plugin_vue: "^9.33.0", npm_package_devDependencies_postcss: "^8.4.31", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ARTIFACTS_LIST: "/home/runner/work/_temp/_runner_file_commands/artifacts_list_082c4127-8af5-48e1-b700-ad0e205627b8", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_082c4127-8af5-48e1-b700-ad0e205627b8", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_dependencies_libphonenumber_js: "^1.11.1", NODE_ENV: "production" } };
1857
- const va = "10.0.5";
1858
- function ba() {
1859
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Xe().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Xe().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Xe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Xe().__INTLIFY_PROD_DEVTOOLS__ = !1);
1860
- }
1861
- const tt = {
1862
- // composer module errors
1863
- UNEXPECTED_RETURN_TYPE: wr,
1864
- // 24
1865
- // legacy module errors
1866
- INVALID_ARGUMENT: 25,
1867
- // i18n module errors
1868
- MUST_BE_CALL_SETUP_TOP: 26,
1869
- NOT_INSTALLED: 27,
1870
- NOT_INSTALLED_WITH_PROVIDE: 31,
1871
- // unexpected error
1872
- UNEXPECTED_ERROR: 32
1873
- };
1874
- function ct(e, ...t) {
1875
- return Ct(e, null, void 0);
1876
- }
1877
- const xt = /* @__PURE__ */ He("__translateVNode"), Wt = /* @__PURE__ */ He("__datetimeParts"), Gt = /* @__PURE__ */ He("__numberParts"), ha = He("__setPluralRules"), ns = /* @__PURE__ */ He("__injectWithOption"), Yt = /* @__PURE__ */ He("__dispose");
1878
- function ut(e) {
1879
- if (!se(e))
1880
- return e;
1881
- for (const t in e)
1882
- if (De(e, t))
1883
- if (!t.includes("."))
1884
- se(e[t]) && ut(e[t]);
1885
- else {
1886
- const n = t.split("."), s = n.length - 1;
1887
- let o = e, a = !1;
1888
- for (let d = 0; d < s; d++) {
1889
- if (n[d] in o || (o[n[d]] = ie()), !se(o[n[d]])) {
1890
- a = !0;
1891
- break;
1892
- }
1893
- o = o[n[d]];
1894
- }
1895
- a || (o[n[s]] = e[t], delete e[t]), se(o[n[s]]) && ut(o[n[s]]);
1896
- }
1897
- return e;
1898
- }
1899
- function ss(e, t) {
1900
- const { messages: n, __i18n: s, messageResolver: o, flatJson: a } = t, d = ne(n) ? n : ge(s) ? ie() : { [e]: ie() };
1901
- if (ge(s) && s.forEach((u) => {
1902
- if ("locale" in u && "resource" in u) {
1903
- const { locale: c, resource: h } = u;
1904
- c ? (d[c] = d[c] || ie(), yt(h, d[c])) : yt(h, d);
1905
- } else
1906
- Z(u) && yt(JSON.parse(u), d);
1907
- }), o == null && a)
1908
- for (const u in d)
1909
- De(d, u) && ut(d[u]);
1910
- return d;
1911
- }
1912
- function rs(e) {
1913
- return e.type;
1914
- }
1915
- function ga(e, t, n) {
1916
- let s = se(t.messages) ? t.messages : ie();
1917
- "__i18nGlobal" in n && (s = ss(e.locale.value, {
1918
- messages: s,
1919
- __i18n: n.__i18nGlobal
1920
- }));
1921
- const o = Object.keys(s);
1922
- o.length && o.forEach((a) => {
1923
- e.mergeLocaleMessage(a, s[a]);
1924
- });
1925
- {
1926
- if (se(t.datetimeFormats)) {
1927
- const a = Object.keys(t.datetimeFormats);
1928
- a.length && a.forEach((d) => {
1929
- e.mergeDateTimeFormat(d, t.datetimeFormats[d]);
1930
- });
1931
- }
1932
- if (se(t.numberFormats)) {
1933
- const a = Object.keys(t.numberFormats);
1934
- a.length && a.forEach((d) => {
1935
- e.mergeNumberFormat(d, t.numberFormats[d]);
1936
- });
1937
- }
1938
- }
1939
- }
1940
- function On(e) {
1941
- return fe(ms, null, e, 0);
1942
- }
1943
- const Sn = "__INTLIFY_META__", Ln = () => [], Ia = () => !1;
1944
- let Rn = 0;
1945
- function An(e) {
1946
- return (t, n, s, o) => e(n, s, Bt() || void 0, o);
1947
- }
1948
- const ya = /* @__NO_SIDE_EFFECTS__ */ () => {
1949
- const e = Bt();
1950
- let t = null;
1951
- return e && (t = rs(e)[Sn]) ? { [Sn]: t } : null;
1952
- };
1953
- function Ea(e = {}) {
1954
- const { __root: t, __injectWithOption: n } = e, s = t === void 0, o = e.flatJson, a = an ? dt : us;
1955
- let d = pe(e.inheritLocale) ? e.inheritLocale : !0;
1956
- const u = a(
1957
- // prettier-ignore
1958
- t && d ? t.locale.value : Z(e.locale) ? e.locale : Nt
1959
- ), c = a(
1960
- // prettier-ignore
1961
- t && d ? t.fallbackLocale.value : Z(e.fallbackLocale) || ge(e.fallbackLocale) || ne(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : u.value
1962
- ), h = a(ss(u.value, e)), y = a(ne(e.datetimeFormats) ? e.datetimeFormats : { [u.value]: {} }), C = a(ne(e.numberFormats) ? e.numberFormats : { [u.value]: {} });
1963
- let N = t ? t.missingWarn : pe(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, w = t ? t.fallbackWarn : pe(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, M = t ? t.fallbackRoot : pe(e.fallbackRoot) ? e.fallbackRoot : !0, A = !!e.fallbackFormat, F = me(e.missing) ? e.missing : null, f = me(e.missing) ? An(e.missing) : null, p = me(e.postTranslation) ? e.postTranslation : null, S = t ? t.warnHtmlMessage : pe(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, i = !!e.escapeParameter;
1964
- const v = t ? t.modifiers : ne(e.modifiers) ? e.modifiers : {};
1965
- let g = e.pluralRules || t && t.pluralRules, _;
1966
- _ = (() => {
1967
- s && hn(null);
1968
- const b = {
1969
- version: va,
1970
- locale: u.value,
1971
- fallbackLocale: c.value,
1972
- messages: h.value,
1973
- modifiers: v,
1974
- pluralRules: g,
1975
- missing: f === null ? void 0 : f,
1976
- missingWarn: N,
1977
- fallbackWarn: w,
1978
- fallbackFormat: A,
1979
- unresolving: !0,
1980
- postTranslation: p === null ? void 0 : p,
1981
- warnHtmlMessage: S,
1982
- escapeParameter: i,
1983
- messageResolver: e.messageResolver,
1984
- messageCompiler: e.messageCompiler,
1985
- __meta: { framework: "vue" }
1986
- };
1987
- b.datetimeFormats = y.value, b.numberFormats = C.value, b.__datetimeFormatters = ne(_) ? _.__datetimeFormatters : void 0, b.__numberFormatters = ne(_) ? _.__numberFormatters : void 0;
1988
- const O = ea(b);
1989
- return s && hn(O), O;
1990
- })(), at(_, u.value, c.value);
1991
- function L() {
1992
- return [
1993
- u.value,
1994
- c.value,
1995
- h.value,
1996
- y.value,
1997
- C.value
1998
- ];
1999
- }
2000
- const $ = ee({
2001
- get: () => u.value,
2002
- set: (b) => {
2003
- u.value = b, _.locale = u.value;
2004
- }
2005
- }), W = ee({
2006
- get: () => c.value,
2007
- set: (b) => {
2008
- c.value = b, _.fallbackLocale = c.value, at(_, u.value, b);
2009
- }
2010
- }), m = ee(() => h.value), E = /* @__PURE__ */ ee(() => y.value), V = /* @__PURE__ */ ee(() => C.value);
2011
- function U() {
2012
- return me(p) ? p : null;
2013
- }
2014
- function P(b) {
2015
- p = b, _.postTranslation = b;
2016
- }
2017
- function G() {
2018
- return F;
2019
- }
2020
- function x(b) {
2021
- b !== null && (f = An(b)), F = b, _.missing = f;
2022
- }
2023
- const B = (b, O, K, de, Ce, mt) => {
2024
- L();
2025
- let $e;
2026
- try {
2027
- pa.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (_.fallbackContext = t ? qr() : void 0), $e = b(_);
2028
- } finally {
2029
- __INTLIFY_PROD_DEVTOOLS__, s || (_.fallbackContext = void 0);
2030
- }
2031
- if (K !== "translate exists" && // for not `te` (e.g `t`)
2032
- Ie($e) && $e === kt || K === "translate exists" && !$e) {
2033
- const [is, No] = O();
2034
- return t && M ? de(t) : Ce(is);
2035
- } else {
2036
- if (mt($e))
2037
- return $e;
2038
- throw ct(tt.UNEXPECTED_RETURN_TYPE);
2039
- }
2040
- };
2041
- function J(...b) {
2042
- return B((O) => Reflect.apply(kn, null, [O, ...b]), () => Vt(...b), "translate", (O) => Reflect.apply(O.t, O, [...b]), (O) => O, (O) => Z(O));
2043
- }
2044
- function ae(...b) {
2045
- const [O, K, de] = b;
2046
- if (de && !se(de))
2047
- throw ct(tt.INVALID_ARGUMENT);
2048
- return J(O, K, ye({ resolvedMessage: !0 }, de || {}));
2049
- }
2050
- function Q(...b) {
2051
- return B((O) => Reflect.apply(In, null, [O, ...b]), () => jt(...b), "datetime format", (O) => Reflect.apply(O.d, O, [...b]), () => vn, (O) => Z(O));
2052
- }
2053
- function re(...b) {
2054
- return B((O) => Reflect.apply(En, null, [O, ...b]), () => Ut(...b), "number format", (O) => Reflect.apply(O.n, O, [...b]), () => vn, (O) => Z(O));
2055
- }
2056
- function ce(b) {
2057
- return b.map((O) => Z(O) || Ie(O) || pe(O) ? On(String(O)) : O);
2058
- }
2059
- const _e = {
2060
- normalize: ce,
2061
- interpolate: (b) => b,
2062
- type: "vnode"
2063
- };
2064
- function Ee(...b) {
2065
- return B((O) => {
2066
- let K;
2067
- const de = O;
2068
- try {
2069
- de.processor = _e, K = Reflect.apply(kn, null, [de, ...b]);
2070
- } finally {
2071
- de.processor = null;
2072
- }
2073
- return K;
2074
- }, () => Vt(...b), "translate", (O) => O[xt](...b), (O) => [On(O)], (O) => ge(O));
2075
- }
2076
- function je(...b) {
2077
- return B((O) => Reflect.apply(En, null, [O, ...b]), () => Ut(...b), "number format", (O) => O[Gt](...b), Ln, (O) => Z(O) || ge(O));
2078
- }
2079
- function te(...b) {
2080
- return B((O) => Reflect.apply(In, null, [O, ...b]), () => jt(...b), "datetime format", (O) => O[Wt](...b), Ln, (O) => Z(O) || ge(O));
2081
- }
2082
- function ve(b) {
2083
- g = b, _.pluralRules = g;
2084
- }
2085
- function st(b, O) {
2086
- return B(() => {
2087
- if (!b)
2088
- return !1;
2089
- const K = Z(O) ? O : u.value, de = We(K), Ce = _.messageResolver(de, b);
2090
- return et(Ce) || Oe(Ce) || Z(Ce);
2091
- }, () => [b], "translate exists", (K) => Reflect.apply(K.te, K, [b, O]), Ia, (K) => pe(K));
2092
- }
2093
- function rt(b) {
2094
- let O = null;
2095
- const K = Xn(_, c.value, u.value);
2096
- for (let de = 0; de < K.length; de++) {
2097
- const Ce = h.value[K[de]] || {}, mt = _.messageResolver(Ce, b);
2098
- if (mt != null) {
2099
- O = mt;
2100
- break;
2101
- }
2102
- }
2103
- return O;
2104
- }
2105
- function Se(b) {
2106
- const O = rt(b);
2107
- return O ?? (t ? t.tm(b) || {} : {});
2108
- }
2109
- function We(b) {
2110
- return h.value[b] || {};
2111
- }
2112
- function k(b, O) {
2113
- if (o) {
2114
- const K = { [b]: O };
2115
- for (const de in K)
2116
- De(K, de) && ut(K[de]);
2117
- O = K[b];
2118
- }
2119
- h.value[b] = O, _.messages = h.value;
2120
- }
2121
- function T(b, O) {
2122
- h.value[b] = h.value[b] || {};
2123
- const K = { [b]: O };
2124
- if (o)
2125
- for (const de in K)
2126
- De(K, de) && ut(K[de]);
2127
- O = K[b], yt(O, h.value[b]), _.messages = h.value;
2128
- }
2129
- function R(b) {
2130
- return y.value[b] || {};
2131
- }
2132
- function r(b, O) {
2133
- y.value[b] = O, _.datetimeFormats = y.value, yn(_, b, O);
2134
- }
2135
- function l(b, O) {
2136
- y.value[b] = ye(y.value[b] || {}, O), _.datetimeFormats = y.value, yn(_, b, O);
2137
- }
2138
- function I(b) {
2139
- return C.value[b] || {};
2140
- }
2141
- function j(b, O) {
2142
- C.value[b] = O, _.numberFormats = C.value, Nn(_, b, O);
2143
- }
2144
- function Y(b, O) {
2145
- C.value[b] = ye(C.value[b] || {}, O), _.numberFormats = C.value, Nn(_, b, O);
2146
- }
2147
- Rn++, t && an && (Mt(t.locale, (b) => {
2148
- d && (u.value = b, _.locale = b, at(_, u.value, c.value));
2149
- }), Mt(t.fallbackLocale, (b) => {
2150
- d && (c.value = b, _.fallbackLocale = b, at(_, u.value, c.value));
2151
- }));
2152
- const X = {
2153
- id: Rn,
2154
- locale: $,
2155
- fallbackLocale: W,
2156
- get inheritLocale() {
2157
- return d;
2158
- },
2159
- set inheritLocale(b) {
2160
- d = b, b && t && (u.value = t.locale.value, c.value = t.fallbackLocale.value, at(_, u.value, c.value));
2161
- },
2162
- get availableLocales() {
2163
- return Object.keys(h.value).sort();
2164
- },
2165
- messages: m,
2166
- get modifiers() {
2167
- return v;
2168
- },
2169
- get pluralRules() {
2170
- return g || {};
2171
- },
2172
- get isGlobal() {
2173
- return s;
2174
- },
2175
- get missingWarn() {
2176
- return N;
2177
- },
2178
- set missingWarn(b) {
2179
- N = b, _.missingWarn = N;
2180
- },
2181
- get fallbackWarn() {
2182
- return w;
2183
- },
2184
- set fallbackWarn(b) {
2185
- w = b, _.fallbackWarn = w;
2186
- },
2187
- get fallbackRoot() {
2188
- return M;
2189
- },
2190
- set fallbackRoot(b) {
2191
- M = b;
2192
- },
2193
- get fallbackFormat() {
2194
- return A;
2195
- },
2196
- set fallbackFormat(b) {
2197
- A = b, _.fallbackFormat = A;
2198
- },
2199
- get warnHtmlMessage() {
2200
- return S;
2201
- },
2202
- set warnHtmlMessage(b) {
2203
- S = b, _.warnHtmlMessage = b;
2204
- },
2205
- get escapeParameter() {
2206
- return i;
2207
- },
2208
- set escapeParameter(b) {
2209
- i = b, _.escapeParameter = b;
2210
- },
2211
- t: J,
2212
- getLocaleMessage: We,
2213
- setLocaleMessage: k,
2214
- mergeLocaleMessage: T,
2215
- getPostTranslationHandler: U,
2216
- setPostTranslationHandler: P,
2217
- getMissingHandler: G,
2218
- setMissingHandler: x,
2219
- [ha]: ve
2220
- };
2221
- return X.datetimeFormats = E, X.numberFormats = V, X.rt = ae, X.te = st, X.tm = Se, X.d = Q, X.n = re, X.getDateTimeFormat = R, X.setDateTimeFormat = r, X.mergeDateTimeFormat = l, X.getNumberFormat = I, X.setNumberFormat = j, X.mergeNumberFormat = Y, X[ns] = n, X[xt] = Ee, X[Wt] = te, X[Gt] = je, X;
2222
- }
2223
- const qt = {
2224
- tag: {
2225
- type: [String, Object]
2226
- },
2227
- locale: {
2228
- type: String
2229
- },
2230
- scope: {
2231
- type: String,
2232
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2233
- validator: (e) => e === "parent" || e === "global",
2234
- default: "parent"
2235
- /* ComponentI18nScope */
2236
- },
2237
- i18n: {
2238
- type: Object
2239
- }
2240
- };
2241
- function Na({ slots: e }, t) {
2242
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, o) => [
2243
- ...s,
2244
- // prettier-ignore
2245
- ...o.type === Le ? o.children : [o]
2246
- ], []) : t.reduce((n, s) => {
2247
- const o = e[s];
2248
- return o && (n[s] = o()), n;
2249
- }, ie());
2250
- }
2251
- function as() {
2252
- return Le;
2253
- }
2254
- ye({
2255
- keypath: {
2256
- type: String,
2257
- required: !0
2258
- },
2259
- plural: {
2260
- type: [Number, String],
2261
- validator: (e) => Ie(e) || !isNaN(e)
2262
- }
2263
- }, qt);
2264
- function Ta(e) {
2265
- return ge(e) && !Z(e[0]);
2266
- }
2267
- function os(e, t, n, s) {
2268
- const { slots: o, attrs: a } = t;
2269
- return () => {
2270
- const d = { part: !0 };
2271
- let u = ie();
2272
- e.locale && (d.locale = e.locale), Z(e.format) ? d.key = e.format : se(e.format) && (Z(e.format.key) && (d.key = e.format.key), u = Object.keys(e.format).reduce((N, w) => n.includes(w) ? ye(ie(), N, { [w]: e.format[w] }) : N, ie()));
2273
- const c = s(e.value, d, u);
2274
- let h = [d.key];
2275
- ge(c) ? h = c.map((N, w) => {
2276
- const M = o[N.type], A = M ? M({ [N.type]: N.value, index: w, parts: c }) : [N.value];
2277
- return Ta(A) && (A[0].key = `${N.type}-${w}`), A;
2278
- }) : Z(c) && (h = [c]);
2279
- const y = ye(ie(), a), C = Z(e.tag) || se(e.tag) ? e.tag : as();
2280
- return xn(C, y, h);
2281
- };
2282
- }
2283
- ye({
2284
- value: {
2285
- type: Number,
2286
- required: !0
2287
- },
2288
- format: {
2289
- type: [String, Object]
2290
- }
2291
- }, qt);
2292
- ye({
2293
- value: {
2294
- type: [Number, Date],
2295
- required: !0
2296
- },
2297
- format: {
2298
- type: [String, Object]
2299
- }
2300
- }, qt);
2301
- const Ca = /* @__PURE__ */ He("global-vue-i18n");
2302
- function Ot(e = {}) {
2303
- const t = Bt();
2304
- if (t == null)
2305
- throw ct(tt.MUST_BE_CALL_SETUP_TOP);
2306
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2307
- throw ct(tt.NOT_INSTALLED);
2308
- const n = ka(t), s = Sa(n), o = rs(t), a = Oa(e, o);
2309
- if (a === "global")
2310
- return ga(s, e, o), s;
2311
- if (a === "parent") {
2312
- let c = La(n, t, e.__useComponent);
2313
- return c == null && (c = s), c;
2314
- }
2315
- const d = n;
2316
- let u = d.__getInstance(t);
2317
- if (u == null) {
2318
- const c = ye({}, e);
2319
- "__i18n" in o && (c.__i18n = o.__i18n), s && (c.__root = s), u = Ea(c), d.__composerExtend && (u[Yt] = d.__composerExtend(u)), Aa(d, t, u), d.__setInstance(t, u);
2320
- }
2321
- return u;
2322
- }
2323
- function ka(e) {
2324
- const t = cs(e.isCE ? Ca : e.appContext.app.__VUE_I18N_SYMBOL__);
2325
- if (!t)
2326
- throw ct(e.isCE ? tt.NOT_INSTALLED_WITH_PROVIDE : tt.UNEXPECTED_ERROR);
2327
- return t;
2328
- }
2329
- function Oa(e, t) {
2330
- return Tt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2331
- }
2332
- function Sa(e) {
2333
- return e.mode === "composition" ? e.global : e.global.__composer;
2334
- }
2335
- function La(e, t, n = !1) {
2336
- let s = null;
2337
- const o = t.root;
2338
- let a = Ra(t, n);
2339
- for (; a != null; ) {
2340
- const d = e;
2341
- if (e.mode === "composition")
2342
- s = d.__getInstance(a);
2343
- else if (__VUE_I18N_LEGACY_API__) {
2344
- const u = d.__getInstance(a);
2345
- u != null && (s = u.__composer, n && s && !s[ns] && (s = null));
2346
- }
2347
- if (s != null || o === a)
2348
- break;
2349
- a = a.parent;
2350
- }
2351
- return s;
2352
- }
2353
- function Ra(e, t = !1) {
2354
- return e == null ? null : t && e.vnode.ctx || e.parent;
2355
- }
2356
- function Aa(e, t, n) {
2357
- Vn(() => {
2358
- }, t), ds(() => {
2359
- const s = n;
2360
- e.__deleteInstance(t);
2361
- const o = s[Yt];
2362
- o && (o(), delete s[Yt]);
2363
- }, t);
2364
- }
2365
- ba();
2366
- $r(Lr);
2367
- Jr(Br);
2368
- Kr(Xn);
2369
- if (__INTLIFY_PROD_DEVTOOLS__) {
2370
- const e = Xe();
2371
- e.__INTLIFY__ = !0, Rr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2372
- }
2373
- const vt = /* @__PURE__ */ Pe({
2374
- __name: "InheritPermissionTooltip",
2375
- props: {
2376
- item: {
2377
- type: Object,
2378
- required: !0
2379
- }
2380
- },
2381
- setup(e) {
2382
- const { t } = Ot();
2383
- return (n, s) => {
2384
- const o = Fe("FmIcon"), a = Fe("FmTooltip");
2385
- return z(), Me(a, {
2386
- variant: "plain",
2387
- placement: "right",
2388
- "z-index": 50
2389
- }, {
2390
- content: be(() => [
2391
- le("div", null, ke(H(t)("team.memberForm.permissions.inherited")), 1),
2392
- (z(!0), ue(Le, null, Te(e.item.setNames, (d) => (z(), ue("div", { key: d }, [
2393
- le("div", null, "- " + ke(d), 1)
2394
- ]))), 128))
2395
- ]),
2396
- default: be(() => [
2397
- fe(o, {
2398
- name: "admin_panel_settings",
2399
- size: "sm",
2400
- class: "ml-1 text-fm-color-typo-info"
2401
- })
2402
- ]),
2403
- _: 1
2404
- });
2405
- };
2406
- }
2407
- });
2408
- function Dn(e, t, n) {
2409
- const s = n.filter((u) => u !== "manage");
2410
- if (s.length === 0) return;
2411
- const o = e.findIndex((u) => u.subject === t && !u.inverted);
2412
- if (o < 0) return;
2413
- const a = new Set(e[o].actions), d = s.every((u) => a.has(u));
2414
- d && !a.has("manage") ? (a.add("manage"), e[o] = {
2415
- ...e[o],
2416
- actions: Array.from(a)
2417
- }) : !d && a.has("manage") && (a.delete("manage"), a.size === 0 ? e.splice(o, 1) : e[o] = {
2418
- ...e[o],
2419
- actions: Array.from(a)
2420
- });
2421
- }
2422
- const Mn = Object.values(Cs), Da = {
2423
- read: "View",
2424
- create: "Duplicate",
2425
- update: "Edit"
2426
- };
2427
- function Ma(e, t, n, s) {
2428
- const { t: o } = nt(), { getFlagValue: a, getFlag: d } = Ts(), u = ee(() => {
2429
- var P;
2430
- const m = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map();
2431
- for (const G of t.value) {
2432
- const x = G.category;
2433
- if (!x) continue;
2434
- const B = G.subject;
2435
- if (n.value.includes(G.subject) || G.showByFeatureFlag && ((P = d(G.showByFeatureFlag)) == null ? void 0 : P.enabled) === !1 && a(G.showByFeatureFlag) === "true")
2436
- continue;
2437
- m.has(x) || m.set(x, []);
2438
- const J = V.get(B) ?? 0;
2439
- V.set(B, J + 1), m.get(x).push({
2440
- label: o(`permissionSet.permissionLabels.${B}`, G.label),
2441
- value: B,
2442
- optionKey: `${B}::${J}`
2443
- }), E.has(B) || E.set(B, G);
2444
- }
2445
- return [...m.keys()].sort((G, x) => {
2446
- const B = Mn.indexOf(G), J = Mn.indexOf(x);
2447
- return B === -1 && J === -1 ? G.localeCompare(x) : B === -1 ? 1 : J === -1 ? -1 : B - J;
2448
- }).map((G) => {
2449
- const x = m.get(G), B = o(`permissionSet.categoryLabels.${G}`, G), J = /* @__PURE__ */ new Map();
2450
- for (const te of x) {
2451
- const ve = E.get(te.value);
2452
- ve && J.set(te.value, ve.actions);
2453
- }
2454
- const ae = x.some((te) => {
2455
- const ve = J.get(te.value);
2456
- return ve && ve.length > 1;
2457
- }), Q = ae ? [
2458
- ...new Set(
2459
- x.flatMap((te) => J.get(te.value) ?? []).filter((te) => te !== "manage")
2460
- )
2461
- ] : [], re = /* @__PURE__ */ new Map();
2462
- for (const te of e.value)
2463
- x.some((ve) => ve.value === te.subject) && !te.inverted && re.set(te.subject, new Set(te.actions));
2464
- const ce = ae ? e.value.filter(
2465
- (te) => x.some((ve) => ve.value === te.subject) && !te.inverted && te.actions.includes("manage")
2466
- ).map((te) => te.subject) : e.value.filter((te) => x.some((ve) => ve.value === te.subject) && !te.inverted).map((te) => te.subject), q = x.find((te) => {
2467
- var ve;
2468
- return (ve = E.get(te.value)) == null ? void 0 : ve.isCategoryCover;
2469
- }), _e = (q == null ? void 0 : q.value) ?? null, Ee = _e ? re.get(_e) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), je = Ee.has("manage");
2470
- return {
2471
- category: G,
2472
- label: B,
2473
- options: x,
2474
- selectedSubjects: ce,
2475
- isMultiAction: ae,
2476
- actionColumns: Q,
2477
- permissionActionsMap: J,
2478
- selectedActionsMap: re,
2479
- coverSubject: _e,
2480
- coverSelectedActions: Ee,
2481
- coverCoversAll: je
2482
- };
2483
- });
2484
- });
2485
- function c(m, E) {
2486
- const V = u.value.find((Q) => Q.category === m), U = (V == null ? void 0 : V.options) ?? [], P = new Set(U.map((Q) => Q.value)), G = new Set(E), x = /* @__PURE__ */ new Map();
2487
- for (const Q of e.value)
2488
- P.has(Q.subject) && !Q.inverted && x.set(Q.subject, Q.conditions);
2489
- const B = V != null && V.coverSubject ? x.get(V.coverSubject) : void 0, J = /* @__PURE__ */ new Set(), ae = t.value.flatMap(
2490
- ({ category: Q, showByFeatureFlag: re, isCategoryCover: ce, ...q }) => {
2491
- const _e = q.subject;
2492
- if (!G.has(_e) || J.has(_e)) return [];
2493
- J.add(_e);
2494
- let Ee;
2495
- return x.has(_e) ? Ee = x.get(_e) : V != null && V.coverSubject && _e !== V.coverSubject && (Ee = B), [
2496
- { ...q, ...Ee !== void 0 && { conditions: Ee } }
2497
- ];
2498
- }
2499
- );
2500
- s("update:model-value", [
2501
- ...e.value.filter((Q) => !P.has(Q.subject)),
2502
- ...ae
2503
- ]);
2504
- }
2505
- function h(m, E) {
2506
- return w(m, E) || i(m, E);
2507
- }
2508
- function y(m) {
2509
- return m.options.length > 0 && m.options.every((E) => h(m, E.value));
2510
- }
2511
- function C(m) {
2512
- return m.options.length === 0 || y(m) ? !1 : m.options.some(
2513
- (E) => h(m, E.value) || M(m, E.value).length > 0
2514
- );
2515
- }
2516
- function N(m) {
2517
- const E = new Set(m.options.map((U) => U.value)), V = e.value.filter((U) => !E.has(U.subject));
2518
- if (y(m))
2519
- s("update:model-value", V);
2520
- else {
2521
- const U = /* @__PURE__ */ new Map();
2522
- for (const B of e.value)
2523
- E.has(B.subject) && !B.inverted && U.set(B.subject, B.conditions);
2524
- const P = m.coverSubject ? U.get(m.coverSubject) : void 0, G = /* @__PURE__ */ new Set(), x = t.value.flatMap(
2525
- ({ category: B, showByFeatureFlag: J, isCategoryCover: ae, ...Q }) => {
2526
- const re = Q.subject;
2527
- if (!E.has(re) || G.has(re)) return [];
2528
- G.add(re);
2529
- let ce;
2530
- return U.has(re) ? ce = U.get(re) : m.coverSubject && re !== m.coverSubject && (ce = P), [
2531
- { ...Q, ...ce !== void 0 && { conditions: ce } }
2532
- ];
2533
- }
2534
- );
2535
- s("update:model-value", [...V, ...x]);
2536
- }
2537
- }
2538
- function w(m, E) {
2539
- const V = m.selectedActionsMap.get(E);
2540
- return V ? V.has("manage") : !1;
2541
- }
2542
- function M(m, E) {
2543
- const V = m.permissionActionsMap.get(E);
2544
- return V ? V.filter((P) => P !== "manage").filter(
2545
- (P) => S(m, E, P) || v(m, E, P)
2546
- ) : [];
2547
- }
2548
- function A(m, E) {
2549
- return i(m, E) ? !1 : !w(m, E) && M(m, E).length > 0;
2550
- }
2551
- function F(m, E) {
2552
- if (!m.coverSubject || E === m.coverSubject) return;
2553
- const V = e.value.find(
2554
- (U) => !U.inverted && U.subject === m.coverSubject
2555
- );
2556
- return (V == null ? void 0 : V.conditions) || void 0;
2557
- }
2558
- function f(m, E, V) {
2559
- if (V) {
2560
- const U = t.value.find((Q) => Q.subject === E);
2561
- if (!U) return;
2562
- const {
2563
- category: P,
2564
- showByFeatureFlag: G,
2565
- isCategoryCover: x,
2566
- ...B
2567
- } = U, J = F(m, E), ae = e.value.filter((Q) => Q.subject !== E);
2568
- ae.push({
2569
- ...B,
2570
- ...J !== void 0 && { conditions: J }
2571
- }), s("update:model-value", ae);
2572
- } else
2573
- s(
2574
- "update:model-value",
2575
- e.value.filter((U) => U.subject !== E)
2576
- );
2577
- }
2578
- function p(m, E) {
2579
- const V = m.permissionActionsMap.get(E);
2580
- return V ? V.some((U) => U !== "manage") : !1;
2581
- }
2582
- function S(m, E, V) {
2583
- const U = m.selectedActionsMap.get(E);
2584
- return U ? U.has(V) : !1;
2585
- }
2586
- function i(m, E) {
2587
- return !m.coverSubject || E === m.coverSubject ? !1 : m.coverCoversAll;
2588
- }
2589
- function v(m, E, V) {
2590
- return !m.coverSubject || E === m.coverSubject ? !1 : m.coverCoversAll ? !0 : m.coverSelectedActions.has(V);
2591
- }
2592
- function g(m, E, V) {
2593
- const U = m.permissionActionsMap.get(E);
2594
- return U ? U.includes(V) : !1;
2595
- }
2596
- function _(m, E, V) {
2597
- const U = [...e.value], P = U.findIndex((x) => x.subject === m && !x.inverted);
2598
- if (V)
2599
- if (P >= 0) {
2600
- const x = { ...U[P] }, B = new Set(x.actions);
2601
- B.add(E), x.actions = Array.from(B), U[P] = x;
2602
- } else {
2603
- const x = t.value.find((q) => q.subject === m);
2604
- if (!x) return;
2605
- const {
2606
- category: B,
2607
- showByFeatureFlag: J,
2608
- isCategoryCover: ae,
2609
- ...Q
2610
- } = x, re = u.value.find(
2611
- (q) => q.options.some((_e) => _e.value === m)
2612
- ), ce = re ? F(re, m) : void 0;
2613
- U.push({
2614
- ...Q,
2615
- actions: [E],
2616
- ...ce !== void 0 && { conditions: ce }
2617
- });
2618
- }
2619
- else if (P >= 0) {
2620
- const x = { ...U[P] }, B = x.actions.filter((J) => J !== E);
2621
- B.length === 0 ? U.splice(P, 1) : (x.actions = B, U[P] = x);
2622
- }
2623
- const G = t.value.find((x) => x.subject === m);
2624
- G && Dn(U, m, G.actions), s("update:model-value", U);
2625
- }
2626
- function D(m, E) {
2627
- const V = m.options.filter(
2628
- (U) => g(m, U.value, E)
2629
- );
2630
- return V.length === 0 ? !1 : V.every(
2631
- (U) => S(m, U.value, E) || v(m, U.value, E)
2632
- );
2633
- }
2634
- function L(m, E) {
2635
- const V = m.options.filter(
2636
- (P) => g(m, P.value, E)
2637
- );
2638
- if (V.length === 0) return !1;
2639
- const U = V.filter(
2640
- (P) => S(m, P.value, E) || v(m, P.value, E)
2641
- ).length;
2642
- return U > 0 && U < V.length;
2643
- }
2644
- function $(m, E, V) {
2645
- const U = [...e.value];
2646
- for (const P of m.options) {
2647
- if (!g(m, P.value, E)) continue;
2648
- const G = P.value, x = U.findIndex(
2649
- (J) => J.subject === G && !J.inverted
2650
- );
2651
- if (V)
2652
- if (x >= 0) {
2653
- const J = { ...U[x] }, ae = new Set(J.actions);
2654
- ae.add(E), J.actions = Array.from(ae), U[x] = J;
2655
- } else {
2656
- const J = t.value.find((_e) => _e.subject === G);
2657
- if (!J) continue;
2658
- const {
2659
- category: ae,
2660
- showByFeatureFlag: Q,
2661
- isCategoryCover: re,
2662
- ...ce
2663
- } = J, q = F(m, G);
2664
- U.push({
2665
- ...ce,
2666
- actions: [E],
2667
- ...q !== void 0 && { conditions: q }
2668
- });
2669
- }
2670
- else if (x >= 0) {
2671
- const J = { ...U[x] }, ae = J.actions.filter((Q) => Q !== E);
2672
- ae.length === 0 ? U.splice(x, 1) : (J.actions = ae, U[x] = J);
2673
- }
2674
- const B = t.value.find((J) => J.subject === G);
2675
- B && Dn(U, G, B.actions);
2676
- }
2677
- s("update:model-value", U);
2678
- }
2679
- function W(m) {
2680
- const E = `permissionSet.actionLabels.${m}`, V = Da[m] ?? m.charAt(0).toUpperCase() + m.slice(1);
2681
- return o(E, V);
2682
- }
2683
- return {
2684
- categoryGroups: u,
2685
- toggleCategory: c,
2686
- isAllManageChecked: y,
2687
- isAllManageIndeterminate: C,
2688
- toggleAllManage: N,
2689
- isManageChecked: w,
2690
- isManageIndeterminate: A,
2691
- toggleManage: f,
2692
- hasNonManageActions: p,
2693
- isActionChecked: S,
2694
- isRowFullyCoveredByCover: i,
2695
- isActionCoveredByCover: v,
2696
- permissionDefinesAction: g,
2697
- toggleAction: _,
2698
- isAllActionChecked: D,
2699
- isAllActionIndeterminate: L,
2700
- toggleAllAction: $,
2701
- actionLabel: W
2702
- };
2703
- }
2704
- const wa = { class: "flex flex-col gap-16" }, Fa = { class: "fm-typo-en-title-sm-600" }, Pa = { class: "mt-16" }, ja = { class: "text-center text-sm font-semibold text-fm-color-typo-primary" }, Ua = ["onClick"], Va = { class: "flex justify-center" }, xa = { class: "flex items-center min-w-0 gap-8" }, Wa = ["title", "onClick"], Ga = { class: "flex justify-center" }, Ya = /* @__PURE__ */ Pe({
2705
- __name: "BasePermission",
2706
- props: {
2707
- modelValue: {
2708
- type: Array,
2709
- required: !0
2710
- },
2711
- disable: {
2712
- type: Boolean,
2713
- default: !1
2714
- },
2715
- excludedSubjects: {
2716
- type: Array,
2717
- required: !0
2718
- },
2719
- additionalPermissions: {
2720
- type: Array,
2721
- default: () => []
2722
- }
2723
- },
2724
- emits: ["update:model-value"],
2725
- setup(e, { emit: t }) {
2726
- const n = e, s = t, { t: o } = nt(), a = ee(() => [...Wn, ...n.additionalPermissions]), {
2727
- categoryGroups: d,
2728
- isAllManageChecked: u,
2729
- isAllManageIndeterminate: c,
2730
- toggleAllManage: h,
2731
- isManageChecked: y,
2732
- isManageIndeterminate: C,
2733
- toggleManage: N,
2734
- isActionChecked: w,
2735
- isRowFullyCoveredByCover: M,
2736
- isActionCoveredByCover: A,
2737
- permissionDefinesAction: F,
2738
- toggleAction: f,
2739
- isAllActionChecked: p,
2740
- isAllActionIndeterminate: S,
2741
- toggleAllAction: i,
2742
- actionLabel: v
2743
- } = Ma(
2744
- en(n, "modelValue"),
2745
- a,
2746
- en(n, "excludedSubjects"),
2747
- (D, L) => s("update:model-value", L)
2748
- );
2749
- function g(D) {
2750
- const L = D.selectedSubjects.length;
2751
- return L === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: L });
2752
- }
2753
- function _(D, L) {
2754
- return y(D, L) || M(D, L) ? !0 : D.actionColumns.some(
2755
- ($) => F(D, L, $) && (w(D, L, $) || A(D, L, $))
2756
- );
2757
- }
2758
- return (D, L) => {
2759
- const $ = Fe("FmCheckbox");
2760
- return z(), ue("div", wa, [
2761
- (z(!0), ue(Le, null, Te(H(d), (W) => (z(), Me(Xt, {
2762
- key: W.category,
2763
- subtitle: g(W)
2764
- }, {
2765
- title: be(() => [
2766
- le("p", Fa, ke(W.label), 1)
2767
- ]),
2768
- default: be(() => [
2769
- le("div", Pa, [
2770
- le("div", {
2771
- class: "grid items-center px-12 py-8",
2772
- style: Qe({
2773
- gridTemplateColumns: `minmax(0, 1fr) repeat(${W.actionColumns.length + 1}, 80px)`
2774
- })
2775
- }, [
2776
- L[0] || (L[0] = le("div", null, null, -1)),
2777
- le("div", ja, ke(H(o)("team.memberForm.permissions.columnManage")), 1),
2778
- (z(!0), ue(Le, null, Te(W.actionColumns, (m) => (z(), ue("div", {
2779
- key: `header-${m}`,
2780
- class: "text-center text-sm font-semibold text-fm-color-typo-primary"
2781
- }, ke(H(v)(m)), 1))), 128))
2782
- ], 4),
2783
- le("div", {
2784
- class: "grid items-center bg-fm-color-neutral-gray-100 px-12 py-8",
2785
- style: Qe({
2786
- gridTemplateColumns: `minmax(0, 1fr) repeat(${W.actionColumns.length + 1}, 80px)`
2787
- })
2788
- }, [
2789
- le("div", {
2790
- class: "cursor-pointer font-semibold",
2791
- onClick: (m) => !e.disable && H(h)(W)
2792
- }, ke(H(o)("team.labels.all")), 9, Ua),
2793
- le("div", Va, [
2794
- fe($, {
2795
- "model-value": H(u)(W),
2796
- indeterminate: H(c)(W),
2797
- value: !0,
2798
- disabled: e.disable,
2799
- size: "sm",
2800
- dense: "",
2801
- "onUpdate:modelValue": (m) => H(h)(W)
2802
- }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])
2803
- ]),
2804
- (z(!0), ue(Le, null, Te(W.actionColumns, (m) => (z(), ue("div", {
2805
- key: `all-${m}`,
2806
- class: "flex justify-center"
2807
- }, [
2808
- fe($, {
2809
- "model-value": H(p)(W, m),
2810
- indeterminate: H(S)(W, m),
2811
- value: m,
2812
- disabled: e.disable,
2813
- size: "sm",
2814
- dense: "",
2815
- "onUpdate:modelValue": (E) => H(i)(W, m, E)
2816
- }, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
2817
- ]))), 128))
2818
- ], 4),
2819
- L[1] || (L[1] = le("div", { class: "h-px bg-fm-color-neutral-gray-200" }, null, -1)),
2820
- (z(!0), ue(Le, null, Te(W.options, (m) => (z(), ue("div", {
2821
- key: m.optionKey,
2822
- class: "grid items-center rounded px-12 py-8 transition-colors hover:bg-fm-color-neutral-gray-100",
2823
- style: Qe({
2824
- gridTemplateColumns: `minmax(0, 1fr) repeat(${W.actionColumns.length + 1}, 80px)`
2825
- })
2826
- }, [
2827
- le("div", xa, [
2828
- le("span", {
2829
- class: "block truncate cursor-pointer",
2830
- title: m.label,
2831
- onClick: (E) => !e.disable && !H(M)(W, m.value) && H(N)(W, m.value, !H(y)(W, m.value))
2832
- }, ke(m.label), 9, Wa),
2833
- Re(D.$slots, `checkbox-${m.value}-append`, {
2834
- option: m,
2835
- isEffectiveSelected: _(W, m.value),
2836
- isCoveredByCover: H(M)(W, m.value) || W.actionColumns.some((E) => H(A)(W, m.value, E))
2837
- }),
2838
- Re(D.$slots, `checkbox-${m.value}-icon`, {
2839
- option: m,
2840
- isEffectiveSelected: _(W, m.value),
2841
- isCoveredByCover: H(M)(W, m.value) || W.actionColumns.some((E) => H(A)(W, m.value, E))
2842
- })
2843
- ]),
2844
- le("div", Ga, [
2845
- fe($, {
2846
- "model-value": H(y)(W, m.value) || H(M)(W, m.value),
2847
- value: m.value,
2848
- disabled: e.disable || H(M)(W, m.value),
2849
- indeterminate: H(C)(W, m.value),
2850
- size: "sm",
2851
- "onUpdate:modelValue": (E) => H(N)(W, m.value, E)
2852
- }, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"])
2853
- ]),
2854
- (z(!0), ue(Le, null, Te(W.actionColumns, (E) => (z(), ue("div", {
2855
- key: `${m.optionKey}-${E}`,
2856
- class: "flex justify-center"
2857
- }, [
2858
- H(F)(W, m.value, E) ? (z(), Me($, {
2859
- key: 0,
2860
- "model-value": H(w)(W, m.value, E) || H(A)(W, m.value, E),
2861
- value: E,
2862
- disabled: e.disable || H(A)(W, m.value, E),
2863
- size: "sm",
2864
- "onUpdate:modelValue": (V) => H(f)(m.value, E, V)
2865
- }, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Ae("", !0)
2866
- ]))), 128))
2867
- ], 4))), 128))
2868
- ])
2869
- ]),
2870
- _: 2
2871
- }, 1032, ["subtitle"]))), 128))
2872
- ]);
2873
- };
2874
- }
2875
- }), Za = { class: "space-y-16" }, Ba = {
2876
- key: 0,
2877
- class: "flex fm-typo-en-title-sm-600"
2878
- }, Xa = {
2879
- key: 0,
2880
- class: "q-mr-xs text-red col"
2881
- }, Ha = { class: "form-input" }, $a = /* @__PURE__ */ Pe({
2882
- __name: "AppForm",
2883
- props: {
2884
- title: {
2885
- type: String,
2886
- default: void 0
2887
- },
2888
- required: {
2889
- type: [Boolean, String],
2890
- default: !1
2891
- },
2892
- inline: {
2893
- type: Boolean,
2894
- default: !1
2895
- }
2896
- },
2897
- setup(e) {
2898
- const t = e;
2899
- return (n, s) => (z(), ue("div", Za, [
2900
- Re(n.$slots, "top", {}, () => [
2901
- t.title ? (z(), ue("div", Ba, [
2902
- le("div", null, [
2903
- t.required ? (z(), ue("span", Xa, "*")) : Ae("", !0),
2904
- fs(ke(t.title), 1)
2905
- ]),
2906
- Re(n.$slots, "title-right")
2907
- ])) : Ae("", !0)
2908
- ]),
2909
- le("div", Ha, [
2910
- Re(n.$slots, "default")
2911
- ])
2912
- ]));
2913
- }
2914
- });
2915
- function Ja(e, t) {
2916
- let n = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2917
- const o = s.length;
2918
- for (let a = 0; a < e; a++)
2919
- n += s.charAt(Math.floor(Math.random() * o));
2920
- return n;
2921
- }
2922
- const Ka = { class: "col flex items-center" }, za = {
2923
- key: 1,
2924
- class: "q-pa-sm form-error-message text-error"
2925
- }, ls = /* @__PURE__ */ Pe({
2926
- __name: "CheckboxInput",
2927
- props: {
2928
- options: {
2929
- type: Array,
2930
- required: !0
2931
- },
2932
- title: {
2933
- type: String,
2934
- required: !0
2935
- },
2936
- modelValue: {
2937
- type: Array,
2938
- required: !0
2939
- },
2940
- showAllToggle: {
2941
- type: [Boolean, String],
2942
- default: !0
2943
- },
2944
- includeDisabledOptionsWhenSelectAll: {
2945
- type: Boolean,
2946
- default: !1
2947
- },
2948
- disable: {
2949
- type: Boolean,
2950
- default: !1
2951
- },
2952
- min: {
2953
- type: Number,
2954
- default: 0
2955
- },
2956
- max: {
2957
- type: Number,
2958
- default: void 0
2959
- },
2960
- showIntermediate: {
2961
- type: Boolean,
2962
- default: !0
2963
- },
2964
- gutter: {
2965
- type: Number,
2966
- default: void 0
2967
- },
2968
- falsyShowSlot: {
2969
- type: Boolean,
2970
- default: !1
2971
- },
2972
- bottomSlotIndent: {
2973
- type: String,
2974
- default: "36px"
2975
- },
2976
- alignCenter: {
2977
- type: Boolean,
2978
- default: !0
2979
- }
2980
- },
2981
- emits: ["update:model-value"],
2982
- setup(e, { emit: t }) {
2983
- const n = e, s = t, { t: o } = nt(), a = dt(!1), d = _s(), u = ee(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), c = `checkbox-${Ja(6)}`, h = ee(() => u.value !== !0), y = ee(
2984
- () => n.modelValue.filter((A) => n.options.some((F) => F.value === A))
2985
- ), C = ee(
2986
- () => typeof n.showAllToggle == "boolean" ? o("team.labels.all") : n.showAllToggle
2987
- ), N = ee(() => n.options.length > 0 && n.options.length === y.value.length);
2988
- function w() {
2989
- const A = n.modelValue.filter((F) => !y.value.includes(F));
2990
- if (N.value === !0)
2991
- s("update:model-value", A);
2992
- else {
2993
- const F = n.includeDisabledOptionsWhenSelectAll ? n.options.map((f) => f.value) : n.options.filter((f) => !f.disabled).map((f) => f.value);
2994
- s("update:model-value", [...A, ...F]);
2995
- }
2996
- }
2997
- function M(A, F) {
2998
- let f = It(n.modelValue);
2999
- F ? f.every((p) => p !== A) && f.push(A) : f = f.filter((p) => p !== A), s("update:model-value", f);
3000
- }
3001
- return (A, F) => {
3002
- const f = Fe("FmCheckbox");
3003
- return z(), Me($a, {
3004
- id: c,
3005
- title: e.title,
3006
- required: !1
3007
- }, {
3008
- top: be(() => [
3009
- Re(A.$slots, "top")
3010
- ]),
3011
- default: be(() => [
3012
- n.showAllToggle ? (z(), Me(f, {
3013
- key: 0,
3014
- "model-value": N.value,
3015
- disabled: e.disable,
3016
- label: C.value,
3017
- style: Qe(`margin-bottom: ${n.gutter}px`),
3018
- size: "sm",
3019
- dense: "",
3020
- value: C.value,
3021
- "onUpdate:modelValue": w
3022
- }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Ae("", !0),
3023
- (z(!0), ue(Le, null, Te(e.options, (p, S) => (z(), ue("div", {
3024
- key: p.value,
3025
- style: Qe(`margin-bottom: ${S < e.options.length - 1 ? n.gutter : 0}px`),
3026
- class: ot(S < e.options.length - 1 ? "q-mb-sm" : "")
3027
- }, [
3028
- le("div", {
3029
- class: ot(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
3030
- }, [
3031
- le("div", Ka, [
3032
- fe(f, {
3033
- "model-value": e.modelValue.includes(p.value),
3034
- disabled: e.disable || p.disabled,
3035
- size: "sm",
3036
- label: p.label,
3037
- value: p.label,
3038
- "onUpdate:modelValue": (i) => M(p.value, i)
3039
- }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
3040
- Re(A.$slots, `checkbox-${p.key || p.value}-append`, {
3041
- option: p,
3042
- selected: e.modelValue.includes(p.value)
3043
- })
3044
- ]),
3045
- H(d)[`checkbox-${p.key || p.value}-end`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (z(), ue("div", {
3046
- key: 0,
3047
- class: ot([{ "q-checkbox disabled": e.disable || p.disabled }, "col"])
3048
- }, [
3049
- Re(A.$slots, `checkbox-${p.key || p.value}-end`, {
3050
- option: p,
3051
- value: e.modelValue.includes(p.value),
3052
- disable: e.disable || p.disabled
3053
- })
3054
- ], 2)) : Ae("", !0)
3055
- ], 2),
3056
- H(d)[`checkbox-${p.key || p.value}-bottom`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (z(), ue("div", {
3057
- key: 0,
3058
- class: ot(["q-mt-sm", { "q-checkbox disabled": e.disable || p.disabled }]),
3059
- style: Qe(`margin-left: ${e.bottomSlotIndent}`)
3060
- }, [
3061
- Re(A.$slots, `checkbox-${p.key || p.value}-bottom`, {
3062
- option: p,
3063
- disable: e.disable || p.disabled,
3064
- value: e.modelValue.includes(p.value)
3065
- })
3066
- ], 6)) : Ae("", !0)
3067
- ], 6))), 128)),
3068
- a.value && h.value ? (z(), ue("div", za, ke(u.value), 1)) : Ae("", !0)
3069
- ]),
3070
- _: 3
3071
- }, 8, ["title"]);
3072
- };
3073
- }
3074
- }), Qa = { class: "fm-typo-en-title-sm-600" }, bt = "includedFuture", wn = /* @__PURE__ */ Pe({
3075
- __name: "ConditionPermission",
3076
- props: {
3077
- modelValue: {
3078
- type: Array,
3079
- default: null
3080
- },
3081
- options: {
3082
- type: Array,
3083
- required: !0
3084
- },
3085
- disable: {
3086
- type: Boolean,
3087
- default: !1
3088
- },
3089
- context: {
3090
- type: String,
3091
- required: !0
3092
- }
3093
- },
3094
- emits: ["update:model-value"],
3095
- setup(e, { emit: t }) {
3096
- const n = e, s = t, { t: o } = nt(), a = ee(() => [
3097
- {
3098
- label: o("team.memberForm.permissions.includedFuture", { context: n.context }),
3099
- value: bt,
3100
- // Can only be selected if all other options are selected
3101
- disabled: !!n.modelValue && n.options.length > n.modelValue.length
3102
- },
3103
- ...n.options.filter(
3104
- (y) => y.label.toLocaleLowerCase().includes(h.value.toLocaleLowerCase())
3105
- )
3106
- ]), d = ee(() => n.modelValue ? n.modelValue : [bt, ...n.options.map((y) => y.value)]), u = ee(() => {
3107
- const y = d.value.filter((C) => C !== bt).length;
3108
- return y === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: y });
3109
- });
3110
- function c(y) {
3111
- const C = y.length === a.value.length;
3112
- s("update:model-value", C ? null : y.filter((N) => N !== bt));
3113
- }
3114
- const h = dt("");
3115
- return (y, C) => {
3116
- const N = Fe("fm-search");
3117
- return z(), Me(Xt, { subtitle: u.value }, {
3118
- title: be(() => [
3119
- le("p", Qa, ke(H(o)("team.memberForm.permissions.manageable", { context: e.context })), 1)
3120
- ]),
3121
- default: be(() => [
3122
- e.options.length > 1 ? (z(), Me(N, {
3123
- key: 0,
3124
- modelValue: h.value,
3125
- "onUpdate:modelValue": C[0] || (C[0] = (w) => h.value = w),
3126
- class: "mt-16",
3127
- placeholder: H(o)("team.memberForm.permissions.search", { context: e.context })
3128
- }, null, 8, ["modelValue", "placeholder"])) : Ae("", !0),
3129
- fe(ls, {
3130
- "model-value": d.value,
3131
- options: a.value,
3132
- "show-intermediate": !1,
3133
- "show-all-toggle": !0,
3134
- disable: e.disable,
3135
- "include-disabled-options-when-select-all": !0,
3136
- title: "",
3137
- class: "mt-16",
3138
- "onUpdate:modelValue": c
3139
- }, Ke({ _: 2 }, [
3140
- Te(a.value, (w) => ({
3141
- name: `checkbox-${w.value}-append`,
3142
- fn: be(({ option: M }) => [
3143
- Re(y.$slots, `checkbox-${w.value}-append`, { option: M })
3144
- ])
3145
- }))
3146
- ]), 1032, ["model-value", "options", "disable"])
3147
- ]),
3148
- _: 3
3149
- }, 8, ["subtitle"]);
3150
- };
3151
- }
3152
- }), qa = { class: "fm-typo-en-title-sm-600" }, ht = "includedNewRole", eo = /* @__PURE__ */ Pe({
3153
- __name: "PosRolePermission",
3154
- props: {
3155
- modelValue: {
3156
- type: Array,
3157
- default: null
3158
- },
3159
- roles: {
3160
- type: Array,
3161
- required: !0
3162
- },
3163
- restaurantIds: {
3164
- type: Array,
3165
- default: null
3166
- },
3167
- disable: {
3168
- type: Boolean,
3169
- default: !1
3170
- }
3171
- },
3172
- emits: ["update:model-value"],
3173
- setup(e, { emit: t }) {
3174
- const n = e, s = t, { t: o } = nt(), a = ee(() => {
3175
- const h = n.restaurantIds;
3176
- return [
3177
- {
3178
- label: o("team.memberForm.permissions.includedNewRole"),
3179
- value: ht,
3180
- disabled: !!n.modelValue && n.roles.length > n.modelValue.length
3181
- },
3182
- ...n.roles.map((y) => ({
3183
- label: y.name,
3184
- value: y._id,
3185
- disabled: !!h && y.restaurants.every(({ id: C }) => !h.includes(C))
3186
- }))
3187
- ];
3188
- }), d = ee(() => n.modelValue ? n.modelValue : [ht, ...n.roles.map((h) => h._id)]), u = ee(() => {
3189
- const h = d.value.filter((y) => y !== ht).length;
3190
- return h === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: h });
3191
- });
3192
- function c(h) {
3193
- const y = h.length === a.value.length;
3194
- s("update:model-value", y ? null : h.filter((C) => C !== ht));
3195
- }
3196
- return (h, y) => (z(), Me(Xt, { subtitle: u.value }, {
3197
- title: be(() => [
3198
- le("p", qa, ke(H(o)("team.memberForm.permissions.roles")), 1)
3199
- ]),
3200
- default: be(() => [
3201
- fe(ls, {
3202
- "model-value": d.value,
3203
- options: a.value,
3204
- "show-intermediate": !1,
3205
- "show-all-toggle": !1,
3206
- disable: e.disable,
3207
- title: "",
3208
- class: "mt-16",
3209
- "onUpdate:modelValue": c
3210
- }, Ke({ _: 2 }, [
3211
- Te(a.value, (C) => ({
3212
- name: `checkbox-${C.value}-append`,
3213
- fn: be(({ option: N }) => [
3214
- Re(h.$slots, `checkbox-${C.value}-append`, { option: N })
3215
- ])
3216
- }))
3217
- ]), 1032, ["model-value", "options", "disable"])
3218
- ]),
3219
- _: 3
3220
- }, 8, ["subtitle"]));
3221
- }
3222
- }), to = {
3223
- async readWarehouses() {
3224
- return Os(await Ss().get("/warehouses"));
3225
- }
3226
- };
3227
- function Fn(e, t) {
3228
- return Gn(e, Yn).some(
3229
- (n) => n.subject === t && !n.inverted && n.actions.includes("manage")
3230
- );
3231
- }
3232
- function Pn(e, t) {
3233
- return e.some((n) => n.subject === t && n.inverted) ? e : [...e, { subject: t, actions: ["manage"], inverted: !0 }];
3234
- }
3235
- function jn(e, t, n) {
3236
- const { category: s, showByFeatureFlag: o, isCategoryCover: a, ...d } = e;
3237
- return {
3238
- ...d,
3239
- actions: t,
3240
- ...n !== void 0 && { conditions: n }
3241
- };
3242
- }
3243
- function no(e, t, n, s) {
3244
- const o = new Set(
3245
- e.filter((c) => !c.inverted).map((c) => c.subject)
3246
- ), a = new Set(
3247
- t.filter((c) => !c.inverted).map((c) => c.subject)
3248
- ), d = new Set(
3249
- n.filter((c) => !c.inverted).map((c) => c.subject)
3250
- );
3251
- let u = [...n];
3252
- for (const c of o)
3253
- a.has(c) || (d.has(c) && (u = u.filter((y) => y.subject !== c)), (!d.has(c) || Fn(u, c)) && (u = Pn(u, c)));
3254
- for (const c of a)
3255
- if (!o.has(c)) {
3256
- const h = u.some((y) => y.subject === c && y.inverted);
3257
- if (u = u.filter((y) => !(y.subject === c && y.inverted)), !h && !d.has(c)) {
3258
- const y = t.find(
3259
- (N) => N.subject === c && !N.inverted
3260
- ), C = s(c);
3261
- C && y && u.push(jn(C, y.actions, y.conditions));
3262
- }
3263
- }
3264
- for (const c of a) {
3265
- if (!o.has(c)) continue;
3266
- const h = e.find((M) => M.subject === c && !M.inverted), y = t.find((M) => M.subject === c && !M.inverted);
3267
- if (!h || !y) continue;
3268
- const C = new Set(h.actions), N = new Set(y.actions);
3269
- if (C.size === N.size && [...C].every((M) => N.has(M)))
3270
- continue;
3271
- const w = u.findIndex((M) => M.subject === c && !M.inverted);
3272
- if (w >= 0)
3273
- u[w] = {
3274
- ...u[w],
3275
- actions: Array.from(N)
3276
- };
3277
- else {
3278
- const M = s(c);
3279
- M && u.push(jn(M, Array.from(N)));
3280
- }
3281
- C.has("manage") && !N.has("manage") && Fn(u, c) && (u = Pn(u, c)), !C.has("manage") && N.has("manage") && (u = u.filter((M) => !(M.subject === c && M.inverted)));
3282
- }
3283
- return u;
3284
- }
3285
- const so = {
3286
- MY: "Asia/Kuala_Lumpur",
3287
- SG: "Asia/Singapore",
3288
- TH: "Asia/Bangkok",
3289
- ID: "Asia/Jakarta",
3290
- MO: "Asia/Macau",
3291
- BN: "Asia/Brunei",
3292
- PK: "Asia/Karachi",
3293
- MV: "Indian/Maldives",
3294
- VN: "Asia/Ho_Chi_Minh",
3295
- JP: "Asia/Tokyo",
3296
- AU: "Australia/Sydney",
3297
- AE: "Asia/Dubai",
3298
- UK: "Europe/London"
3299
- };
3300
- function ro(e) {
3301
- const t = (e || "").toUpperCase();
3302
- return so[t] ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
3303
- }
3304
- function ao(e, t) {
3305
- return e != null && e.timezone ? e.timezone : e != null && e.timeZone ? e.timeZone : ro((e == null ? void 0 : e.country) ?? t);
3306
- }
3307
- function gt(e, t) {
3308
- return `${e}::${t.builderKey}`;
3309
- }
3310
- function Ye(e) {
3311
- try {
3312
- return e.conditions ? JSON.parse(e.conditions) : void 0;
3313
- } catch {
3314
- return;
3315
- }
3316
- }
3317
- function oo(e, t) {
3318
- return e.find((n) => !n.inverted && n.subject === t);
3319
- }
3320
- function Dt(e, t) {
3321
- const n = new Set(e.actions);
3322
- return n.has(he.Action.manage) ? !0 : t.actions.every((s) => n.has(s));
3323
- }
3324
- function Zt(e, t) {
3325
- const n = Ye(e);
3326
- return wt(n, [{ builder: t, formValue: t.fromCondition(void 0) }]);
3327
- }
3328
- function Un(e, t, n) {
3329
- return {
3330
- ...Zt(e, n),
3331
- ...ze(Ye(t), n)
3332
- };
3333
- }
3334
- function lo(e, t, n) {
3335
- const s = dt(/* @__PURE__ */ new Set());
3336
- function o(i) {
3337
- return As(i, t.value);
3338
- }
3339
- function a(i) {
3340
- return t.value.find((v) => v.subject === i);
3341
- }
3342
- function d(i) {
3343
- var g;
3344
- const v = o(i);
3345
- return v ? (g = a(v)) == null ? void 0 : g.label : void 0;
3346
- }
3347
- function u(i) {
3348
- return oo(e.value, i);
3349
- }
3350
- function c(i, v) {
3351
- return ze(Ye(i), v);
3352
- }
3353
- function h(i, v) {
3354
- var D;
3355
- if (!(((D = v.appliesToActions) == null ? void 0 : D.call(v, i.actions)) ?? !0)) return !1;
3356
- const g = o(i.subject);
3357
- if (!g) return !1;
3358
- const _ = u(g);
3359
- return _ ? Object.keys(c(_, v)).length > 0 : !1;
3360
- }
3361
- function y(i, v) {
3362
- if (!h(i, v) || s.value.has(gt(i.subject, v))) return "custom";
3363
- if (i.index === null) return "inherit";
3364
- const g = e.value[i.index], _ = o(i.subject), D = _ ? u(_) : void 0;
3365
- if (g && D) {
3366
- const L = ze(Ye(g), v), $ = c(D, v);
3367
- if (JSON.stringify(L) === JSON.stringify($)) return "inherit";
3368
- }
3369
- return "custom";
3370
- }
3371
- function C(i, v, g) {
3372
- if (!v.summarizeForm) return;
3373
- const _ = o(i.subject);
3374
- if (!_) return;
3375
- const D = u(_);
3376
- if (!D) return;
3377
- const L = v.fromCondition(c(D, v));
3378
- return v.summarizeForm(L, { timeZone: g });
3379
- }
3380
- function N(i, v) {
3381
- if (i.index === null) return;
3382
- const g = [...e.value], _ = { ...g[i.index] }, D = Zt(_, v), L = Object.keys(D).length === 0, $ = o(i.subject), W = $ ? u($) : void 0, m = W ? Dt(W, _) : !1;
3383
- if (L && m)
3384
- g.splice(i.index, 1);
3385
- else if (W) {
3386
- const E = Un(_, W, v);
3387
- Object.keys(E).length === 0 ? delete _.conditions : _.conditions = JSON.stringify(E), g[i.index] = _;
3388
- } else
3389
- L ? delete _.conditions : _.conditions = JSON.stringify(D), g[i.index] = _;
3390
- n(g);
3391
- }
3392
- function w(i, v, g) {
3393
- const _ = gt(i.subject, v);
3394
- if (g === "inherit") {
3395
- const L = new Set(s.value);
3396
- L.delete(_), s.value = L, N(i, v);
3397
- return;
3398
- }
3399
- const D = new Set(s.value);
3400
- D.add(_), s.value = D, i.index === null && p(i, v, v.fromCondition(void 0), {
3401
- forceCreateRule: !0
3402
- });
3403
- }
3404
- function M(i) {
3405
- const v = o(i);
3406
- if (!v) return [];
3407
- const g = u(v);
3408
- return (g == null ? void 0 : g.actions) ?? [];
3409
- }
3410
- function A(i, v) {
3411
- return e.value.filter((g) => {
3412
- if (g.inverted) return !1;
3413
- const _ = g.subject;
3414
- return _ === i || o(_) !== i ? !1 : s.value.has(gt(_, v)) ? !0 : Object.keys(ze(Ye(g), v)).length > 0;
3415
- });
3416
- }
3417
- function F(i, v) {
3418
- const g = `::${v.builderKey}`, _ = new Set(s.value);
3419
- for (const D of _) {
3420
- if (!D.endsWith(g)) continue;
3421
- const L = D.slice(0, -g.length);
3422
- o(L) === i && _.delete(D);
3423
- }
3424
- s.value = _;
3425
- }
3426
- function f(i, v, g) {
3427
- const _ = v.subject;
3428
- return i.reduce((D, L) => {
3429
- if (L.inverted)
3430
- return D.push(L), D;
3431
- const $ = L.subject;
3432
- if ($ === _ || o($) !== _)
3433
- return D.push(L), D;
3434
- if (Dt(v, L) && Object.keys(Zt(L, g)).length === 0)
3435
- return D;
3436
- const m = Un(L, v, g);
3437
- if (Object.keys(m).length === 0) {
3438
- const { conditions: E, ...V } = L;
3439
- D.push(V);
3440
- } else
3441
- D.push({ ...L, conditions: JSON.stringify(m) });
3442
- return D;
3443
- }, []);
3444
- }
3445
- function p(i, v, g, _ = {}) {
3446
- var U;
3447
- const D = [...e.value];
3448
- let L = i.index;
3449
- const $ = v.toCondition(g), W = Object.keys($).length > 0;
3450
- if (L === null && !W && !_.forceCreateRule) return;
3451
- if (L === null) {
3452
- const P = D.findIndex((G) => !G.inverted && G.subject === i.subject);
3453
- if (P !== -1)
3454
- L = P;
3455
- else {
3456
- const G = t.value.find((Q) => Q.subject === i.subject);
3457
- if (!G) return;
3458
- const {
3459
- category: x,
3460
- showByFeatureFlag: B,
3461
- isCategoryCover: J,
3462
- ...ae
3463
- } = G;
3464
- D.push({
3465
- ...ae,
3466
- actions: i.actions.length > 0 ? i.actions : ae.actions
3467
- }), L = D.length - 1;
3468
- }
3469
- }
3470
- const m = { ...D[L] };
3471
- m.actions = [
3472
- .../* @__PURE__ */ new Set([...m.actions, ...i.actions])
3473
- ];
3474
- const E = Ye(m), V = wt(E, [{ builder: v, formValue: g }]);
3475
- if (Object.keys(V).length === 0 ? delete m.conditions : m.conditions = JSON.stringify(V), D[L] = m, rn(i.subject, t.value)) {
3476
- const P = A(i.subject, v), G = () => {
3477
- var B;
3478
- F(i.subject, v), n(f(D, m, v)), (B = _.afterCommit) == null || B.call(_);
3479
- }, x = () => {
3480
- var B;
3481
- n(D), (B = _.afterCommit) == null || B.call(_);
3482
- };
3483
- if (P.length === 0) {
3484
- G();
3485
- return;
3486
- }
3487
- _.onOverridesConflict ? _.onOverridesConflict({ override: G, keep: x }) : x();
3488
- return;
3489
- }
3490
- n(D), (U = _.afterCommit) == null || U.call(_);
3491
- }
3492
- function S(i, v, g = {}) {
3493
- if (v.length === 0) return;
3494
- const _ = [...e.value];
3495
- let D = _.findIndex((P) => !P.inverted && P.subject === i.subject), L = D === -1 ? void 0 : { ..._[D] }, $ = Ye(L ?? {}) ?? {};
3496
- for (const P of v) {
3497
- const G = P.mode === "inherit" ? P.builder.fromCondition(void 0) : P.form;
3498
- $ = wt($, [{ builder: P.builder, formValue: G }]);
3499
- }
3500
- const W = v.some((P) => P.mode === "custom");
3501
- if (!L && (Object.keys($).length > 0 || W)) {
3502
- const P = t.value.find((ae) => ae.subject === i.subject);
3503
- if (!P) return;
3504
- const {
3505
- category: G,
3506
- showByFeatureFlag: x,
3507
- isCategoryCover: B,
3508
- ...J
3509
- } = P;
3510
- L = {
3511
- ...J,
3512
- actions: i.actions.length > 0 ? i.actions : J.actions
3513
- }, _.push(L), D = _.length - 1;
3514
- }
3515
- if (L) {
3516
- const P = o(i.subject), G = P ? u(P) : void 0;
3517
- if (!W && Object.keys($).length === 0 && !!G && Dt(G, L))
3518
- _.splice(D, 1), L = void 0;
3519
- else {
3520
- if (L.actions = [
3521
- .../* @__PURE__ */ new Set([...L.actions, ...i.actions])
3522
- ], G)
3523
- for (const B of v)
3524
- B.mode === "inherit" && ($ = {
3525
- ...$,
3526
- ...ze(Ye(G), B.builder)
3527
- });
3528
- Object.keys($).length === 0 ? delete L.conditions : L.conditions = JSON.stringify($), _[D] = L;
3529
- }
3530
- }
3531
- const m = () => {
3532
- const P = new Set(s.value);
3533
- for (const G of v) {
3534
- const x = gt(i.subject, G.builder);
3535
- G.mode === "custom" ? P.add(x) : P.delete(x);
3536
- }
3537
- s.value = P;
3538
- }, E = (P) => {
3539
- var G;
3540
- m(), n(P), (G = g.afterCommit) == null || G.call(g);
3541
- };
3542
- if (!rn(i.subject, t.value) || !L) {
3543
- E(_);
3544
- return;
3545
- }
3546
- const V = v.map((P) => P.builder).filter((P) => A(i.subject, P).length > 0), U = () => {
3547
- let P = _;
3548
- for (const G of v.map((x) => x.builder))
3549
- F(i.subject, G), P = f(P, L, G);
3550
- E(P);
3551
- };
3552
- if (V.length > 0 && g.onOverridesConflict) {
3553
- g.onOverridesConflict({ override: U, keep: () => E(_) });
3554
- return;
3555
- }
3556
- V.length > 0 ? E(_) : U();
3557
- }
3558
- return {
3559
- getCoverSubject: o,
3560
- coverLabel: d,
3561
- shouldShowInheritToggle: h,
3562
- inheritMode: y,
3563
- setInheritMode: w,
3564
- inheritedSummary: C,
3565
- getEffectiveActions: M,
3566
- updateBuilderCondition: p,
3567
- applyConditionDrafts: S
3568
- };
3569
- }
3570
- const io = { class: "flex flex-col gap-32" }, co = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, uo = { class: "h-[24px] w-[24px] flex items-center justify-center" }, mo = { class: "flex flex-col gap-12 p-16 w-[320px]" }, fo = { class: "fm-typo-en-title-sm-600" }, _o = {
3571
- key: 0,
3572
- class: "h-px w-full bg-fm-color-neutral-gray-200"
3573
- }, po = {
3574
- key: 1,
3575
- class: "flex flex-col gap-8"
3576
- }, vo = {
3577
- key: 0,
3578
- class: "ml-32",
3579
- style: { "font-size": "12px", "line-height": "16px", color: "#8a8f98", "font-weight": "400" }
3580
- }, bo = {
3581
- key: 0,
3582
- class: "ml-32"
3583
- }, ho = { class: "flex justify-end pt-8" }, go = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Io = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, yo = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Eo = "condition-form-select-menu", Mo = /* @__PURE__ */ Pe({
3584
- __name: "PortalPermissionEditor",
3585
- props: /* @__PURE__ */ tn({
3586
- disable: {
3587
- type: Boolean,
3588
- default: !1
3589
- },
3590
- inheritPermissions: {
3591
- type: Array,
3592
- default: () => []
3593
- }
3594
- }, {
3595
- modelValue: { default: () => [] },
3596
- modelModifiers: {}
3597
- }),
3598
- emits: /* @__PURE__ */ tn(["permissionChanged"], ["update:modelValue"]),
3599
- setup(e, { emit: t }) {
3600
- const n = ps(e, "modelValue"), s = e, o = t, { t: a } = nt(), d = vs(), u = bs(), { breakpoints: c } = hs(), {
3601
- fetchCustomReportPermissions: h,
3602
- customReportPermissions: y
3603
- } = gs(), C = ee(() => [
3604
- ...Wn,
3605
- ...y.value
3606
- ]), N = ee(() => {
3607
- const k = d.currentBusiness.value, T = d.currentCountry.value, R = T instanceof Object ? T.code : T;
3608
- return ao(k, R);
3609
- });
3610
- function w(k) {
3611
- return C.value.find((T) => T.subject === k);
3612
- }
3613
- function M(k, T) {
3614
- return sn(k).filter(
3615
- (R) => {
3616
- var r;
3617
- return ((r = R.appliesToActions) == null ? void 0 : r.call(R, T)) ?? !0;
3618
- }
3619
- );
3620
- }
3621
- const A = ee(() => {
3622
- const k = C.value.filter((R) => !S.includes(R.subject)).map((R) => R.subject);
3623
- return Is(
3624
- s.inheritPermissions.map((R) => ({
3625
- ...R,
3626
- permissions: R.permissions.filter((r) => k.includes(r.subject))
3627
- }))
3628
- ).map((R) => ({
3629
- id: R.subject,
3630
- setNames: R.setNames
3631
- }));
3632
- }), F = ee(() => {
3633
- const k = s.inheritPermissions.map((T) => ({
3634
- ...T,
3635
- permissions: T.permissions.filter(
3636
- (R) => R.subject === he.Subject.Business.inventory_stock
3637
- )
3638
- }));
3639
- return St(
3640
- k,
3641
- "warehouseId",
3642
- v.value.map((T) => T._id)
3643
- );
3644
- }), f = ee(() => {
3645
- const k = s.inheritPermissions.map((T) => ({
3646
- ...T,
3647
- permissions: T.permissions.filter(
3648
- (R) => R.subject === he.Subject.Restaurant.restaurant
3649
- )
3650
- }));
3651
- return St(
3652
- k,
3653
- "restaurantId",
3654
- L.value.map((T) => T._id)
3655
- );
3656
- }), p = ee(() => {
3657
- const k = s.inheritPermissions.map((T) => ({
3658
- ...T,
3659
- permissions: T.permissions.filter((R) => R.subject === he.Subject.Business.role)
3660
- }));
3661
- return St(
3662
- k,
3663
- "roleId",
3664
- $.value.map((T) => T._id)
3665
- );
3666
- }), S = [
3667
- he.Subject.Business.restaurant,
3668
- he.Subject.Business.role,
3669
- he.Subject.Restaurant.restaurant,
3670
- he.Subject.Business.inventory_stock
3671
- ], i = ee(() => {
3672
- var T;
3673
- const k = (T = n.value) == null ? void 0 : T.find(
3674
- (R) => R.subject === he.Subject.Business.inventory_stock
3675
- );
3676
- return k ? k.conditions ? JSON.parse(k.conditions).warehouseId.$in : null : [];
3677
- }), v = dt([]), g = ee(() => v.value.map((k) => ({
3678
- label: k.profile.name,
3679
- value: k._id
3680
- })));
3681
- function _(k) {
3682
- const T = D(n.value, k);
3683
- n.value = T;
3684
- }
3685
- function D(k, T) {
3686
- let R = It(
3687
- k.filter((r) => r.subject !== he.Subject.Business.inventory_stock)
3688
- );
3689
- if (!T || T.length > 0) {
3690
- const r = {
3691
- actions: [he.Action.manage],
3692
- subject: he.Subject.Business.inventory_stock
3693
- };
3694
- T && (r.conditions = JSON.stringify({ warehouseId: { $in: T } })), R.push(r);
3695
- }
3696
- return R;
3697
- }
3698
- const { restaurants: L } = d, $ = Ls().roles, W = ee(() => L.value.map((k) => ({
3699
- label: `${k.profile.code ? k.profile.code + "-" : ""}${k.profile.name}`,
3700
- value: k._id
3701
- }))), m = ee(() => L.value.reduce((k, T) => (k[T._id] = $.value.filter((R) => R.restaurants.some((r) => r.id === T._id)).map((R) => R._id), k), {})), E = ee(() => ys(n.value));
3702
- function V(k) {
3703
- const T = P(n.value, k);
3704
- n.value = T;
3705
- }
3706
- const U = ee(() => Es(n.value));
3707
- function P(k, T) {
3708
- var r;
3709
- let R = It(
3710
- k.filter(
3711
- (l) => l.subject !== he.Subject.Business.restaurant && l.subject !== he.Subject.Restaurant.restaurant
3712
- )
3713
- );
3714
- if (!T || T.length > 0) {
3715
- const {
3716
- category: l,
3717
- showByFeatureFlag: I,
3718
- ...j
3719
- } = ks.restaurant;
3720
- R.push(j);
3721
- const Y = {
3722
- actions: [he.Action.manage],
3723
- subject: he.Subject.Restaurant.restaurant
3724
- };
3725
- T && (Y.conditions = JSON.stringify({ restaurantId: { $in: T } })), R.push(Y);
3726
- }
3727
- if (T) {
3728
- const l = [
3729
- ...new Set(T.map((j) => m.value[j]).flatMap((j) => j))
3730
- ], I = $.value.map((j) => j._id);
3731
- l.length !== I.length && (R = x(
3732
- R,
3733
- (r = U.value || I) == null ? void 0 : r.filter((j) => l.includes(j))
3734
- ));
3735
- }
3736
- return R;
3737
- }
3738
- function G(k) {
3739
- const T = x(n.value, k);
3740
- n.value = T;
3741
- }
3742
- function x(k, T) {
3743
- let R = It(
3744
- k.filter((r) => r.subject !== he.Subject.Business.role)
3745
- );
3746
- if (T && T.length > 0) {
3747
- const r = {
3748
- actions: [he.Action.manage],
3749
- subject: he.Subject.Business.role,
3750
- conditions: JSON.stringify({ roleId: { $in: T } })
3751
- };
3752
- R.push(r);
3753
- }
3754
- return R;
3755
- }
3756
- Vn(async () => {
3757
- await Promise.all([
3758
- to.readWarehouses().then((k) => v.value = k),
3759
- h()
3760
- ]);
3761
- });
3762
- const B = ee(() => Gn(
3763
- n.value,
3764
- Yn
3765
- ).filter((R) => {
3766
- const r = R.source;
3767
- return (r == null ? void 0 : r.type) !== "systemPermissionSet" ? !0 : R.actions.includes("manage");
3768
- }).map((R) => {
3769
- if (R.inverted) return R;
3770
- const r = R.actions;
3771
- if (!r.includes("manage")) return R;
3772
- const l = w(R.subject);
3773
- if (!l) return R;
3774
- const I = l.actions;
3775
- return I.length <= 1 || I.filter((Y) => !r.includes(Y)).length === 0 ? R : { ...R, actions: [...I] };
3776
- }));
3777
- function J(k) {
3778
- n.value = no(
3779
- B.value,
3780
- k,
3781
- n.value,
3782
- w
3783
- );
3784
- }
3785
- const ae = ee(() => new Set(
3786
- C.value.filter((k) => sn(k.subject).length > 0).map((k) => k.subject)
3787
- )), Q = ee(() => {
3788
- const k = /* @__PURE__ */ new Map();
3789
- return B.value.map((T) => ({
3790
- rule: T,
3791
- index: n.value.findIndex(
3792
- (R) => !R.inverted && R.subject === T.subject
3793
- )
3794
- })).filter(({ rule: T }) => !T.inverted).forEach(({ rule: T, index: R }) => {
3795
- var j;
3796
- const r = T.actions, l = M(T.subject, r);
3797
- if (l.length === 0) return;
3798
- let I;
3799
- try {
3800
- I = T.conditions ? JSON.parse(T.conditions) : void 0;
3801
- } catch {
3802
- I = void 0;
3803
- }
3804
- k.set(T.subject, {
3805
- index: R >= 0 ? R : null,
3806
- subject: T.subject,
3807
- label: ((j = w(T.subject)) == null ? void 0 : j.label) ?? T.subject,
3808
- actions: r,
3809
- // Each builder only ever sees its own slice of the stored condition.
3810
- sections: l.map((Y) => ({
3811
- builder: Y,
3812
- formValue: Y.fromCondition(ze(I, Y))
3813
- }))
3814
- });
3815
- }), k;
3816
- }), re = lo(n, C, (k) => {
3817
- n.value = k;
3818
- }), ce = Ns(n);
3819
- function q(k, T) {
3820
- const R = Q.value.get(k);
3821
- if (R) return R;
3822
- const r = re.getEffectiveActions(k), l = M(k, r);
3823
- if (l.length !== 0)
3824
- return {
3825
- index: null,
3826
- subject: k,
3827
- label: T,
3828
- actions: r,
3829
- sections: l.map((I) => ({
3830
- builder: I,
3831
- formValue: I.fromCondition(void 0)
3832
- }))
3833
- };
3834
- }
3835
- function _e(k, T) {
3836
- const R = ce.getDraft({ subject: k.subject, builderKey: T.builderKey });
3837
- if (R) return R.formValue;
3838
- const r = k.sections.find((l) => l.builder.builderKey === T.builderKey);
3839
- return r == null ? void 0 : r.formValue;
3840
- }
3841
- function Ee(k, T) {
3842
- const R = ce.getDraft({ subject: k.subject, builderKey: T.builderKey });
3843
- return R != null && R.inheritMode ? R.inheritMode : re.inheritMode(k, T);
3844
- }
3845
- function je(k, T, R) {
3846
- const r = ce.getDraft({
3847
- subject: k.subject,
3848
- builderKey: T.builderKey
3849
- });
3850
- ce.setDraft(
3851
- { subject: k.subject, builderKey: T.builderKey },
3852
- {
3853
- formValue: R,
3854
- inheritMode: (r == null ? void 0 : r.inheritMode) ?? Ee(k, T)
3855
- }
3856
- );
3857
- }
3858
- function te(k, T, R) {
3859
- const r = ce.getDraft({
3860
- subject: k.subject,
3861
- builderKey: T.builderKey
3862
- }), l = k.sections.find((I) => I.builder.builderKey === T.builderKey);
3863
- ce.setDraft(
3864
- { subject: k.subject, builderKey: T.builderKey },
3865
- {
3866
- formValue: (r == null ? void 0 : r.formValue) ?? (l == null ? void 0 : l.formValue),
3867
- inheritMode: R
3868
- }
3869
- );
3870
- }
3871
- function ve(k) {
3872
- return ce.hasDraftsForSubject(k);
3873
- }
3874
- function st(k, T) {
3875
- const R = k.sections.flatMap((r) => {
3876
- const l = ce.getDraft({
3877
- subject: k.subject,
3878
- builderKey: r.builder.builderKey
3879
- });
3880
- return l ? [{ builder: r.builder, form: l.formValue, mode: l.inheritMode ?? "custom" }] : [];
3881
- });
3882
- re.applyConditionDrafts(k, R, {
3883
- afterCommit: () => {
3884
- ce.clearDraftsForSubject(k.subject), T();
3885
- },
3886
- onOverridesConflict: We(k).onOverridesConflict
3887
- });
3888
- }
3889
- function rt(k) {
3890
- return k.sections.some((T) => re.shouldShowInheritToggle(k, T.builder) ? re.inheritMode(k, T.builder) === "custom" : Object.keys(T.builder.toCondition(T.formValue)).length > 0);
3891
- }
3892
- let Se = !1;
3893
- function We(k, T = {}) {
3894
- return {
3895
- ...T,
3896
- onOverridesConflict: ({ override: R, keep: r }) => {
3897
- Se || (Se = !0, u.open({
3898
- title: a("team.memberForm.permissions.conditionCover.confirmTitle"),
3899
- message: a("team.memberForm.permissions.conditionCover.confirmMessage", {
3900
- cover: k.label
3901
- }),
3902
- minWidth: c.value.lg ? 588 : 0,
3903
- zIndex: 200,
3904
- primaryActions: {
3905
- text: a("team.memberForm.permissions.conditionCover.override"),
3906
- close: !1
3907
- },
3908
- secondaryActions: {
3909
- text: a("team.memberForm.permissions.conditionCover.keep"),
3910
- close: !1
3911
- }
3912
- }).onPrimary(() => {
3913
- R(), Se = !1, u.close();
3914
- }).onSecondary(() => {
3915
- r(), Se = !1, u.close();
3916
- }).onClose(() => {
3917
- Se = !1;
3918
- }));
3919
- }
3920
- };
3921
- }
3922
- return Mt(
3923
- n,
3924
- (k) => {
3925
- o("permissionChanged", k);
3926
- },
3927
- { deep: !0 }
3928
- ), (k, T) => {
3929
- const R = Fe("FmIcon"), r = Fe("FmRadio"), l = Fe("FmRadioGroup"), I = Fe("FmButton"), j = Fe("FmPopover");
3930
- return z(), ue("div", io, [
3931
- le("div", co, [
3932
- fe(Ya, {
3933
- "model-value": B.value,
3934
- "excluded-subjects": S,
3935
- "additional-permissions": H(y),
3936
- "onUpdate:modelValue": J
3937
- }, Ke({ _: 2 }, [
3938
- Te(A.value, (Y) => ({
3939
- name: `checkbox-${Y.id}-append`,
3940
- fn: be(() => [
3941
- fe(vt, { item: Y }, null, 8, ["item"])
3942
- ])
3943
- })),
3944
- Te(ae.value, (Y) => ({
3945
- name: `checkbox-${Y}-icon`,
3946
- fn: be(({ option: X, isEffectiveSelected: b }) => [
3947
- b && q(Y, X.label) ? (z(), Me(j, {
3948
- key: 0,
3949
- disabled: e.disable,
3950
- "z-index": 100,
3951
- "exclude-el-from-click-outside": [Eo],
3952
- class: "h-5 flex items-center",
3953
- onClose: () => H(ce).clearDraftsForSubject(Y)
3954
- }, {
3955
- "popover-button": be(() => [
3956
- le("div", uo, [
3957
- fe(R, {
3958
- name: "settings",
3959
- size: "sm",
3960
- class: ot([
3961
- "cursor-pointer transition-colors",
3962
- rt(q(Y, X.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
3963
- ])
3964
- }, null, 8, ["class"])
3965
- ])
3966
- ]),
3967
- default: be(({ hide: O }) => [
3968
- le("div", mo, [
3969
- le("p", fo, ke(H(a)("team.memberForm.permissions.conditionTitle", {
3970
- context: q(Y, X.label).label
3971
- })), 1),
3972
- (z(!0), ue(Le, null, Te(q(Y, X.label).sections, (K, de) => (z(), ue(Le, {
3973
- key: K.builder.builderKey
3974
- }, [
3975
- de > 0 ? (z(), ue("div", _o)) : Ae("", !0),
3976
- H(re).shouldShowInheritToggle(
3977
- q(Y, X.label),
3978
- K.builder
3979
- ) ? (z(), ue("div", po, [
3980
- fe(l, {
3981
- "model-value": Ee(q(Y, X.label), K.builder),
3982
- disabled: e.disable,
3983
- "onUpdate:modelValue": (Ce) => te(
3984
- q(Y, X.label),
3985
- K.builder,
3986
- Ce
3987
- )
3988
- }, {
3989
- default: be(() => [
3990
- le("div", null, [
3991
- fe(r, {
3992
- value: "inherit",
3993
- label: H(a)("team.memberForm.permissions.conditionCover.inherit", {
3994
- cover: H(re).coverLabel(Y)
3995
- })
3996
- }, null, 8, ["label"]),
3997
- H(re).inheritedSummary(
3998
- q(Y, X.label),
3999
- K.builder,
4000
- N.value
4001
- ) ? (z(), ue("p", vo, " (" + ke(H(a)(
4002
- H(re).inheritedSummary(
4003
- q(Y, X.label),
4004
- K.builder,
4005
- N.value
4006
- ).labelKey,
4007
- H(re).inheritedSummary(
4008
- q(Y, X.label),
4009
- K.builder,
4010
- N.value
4011
- ).params ?? {}
4012
- )) + ") ", 1)) : Ae("", !0)
4013
- ]),
4014
- fe(r, {
4015
- value: "custom",
4016
- label: H(a)("team.memberForm.permissions.conditionCover.custom")
4017
- }, null, 8, ["label"])
4018
- ]),
4019
- _: 2
4020
- }, 1032, ["model-value", "disabled", "onUpdate:modelValue"]),
4021
- Ee(
4022
- q(Y, X.label),
4023
- K.builder
4024
- ) === "custom" ? (z(), ue("div", bo, [
4025
- fe(nn, {
4026
- builder: K.builder,
4027
- "model-value": _e(q(Y, X.label), K.builder),
4028
- disable: e.disable,
4029
- "onUpdate:modelValue": (Ce) => je(
4030
- q(Y, X.label),
4031
- K.builder,
4032
- Ce
4033
- )
4034
- }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
4035
- ])) : Ae("", !0)
4036
- ])) : (z(), Me(nn, {
4037
- key: 2,
4038
- builder: K.builder,
4039
- "model-value": _e(q(Y, X.label), K.builder),
4040
- disable: e.disable,
4041
- "onUpdate:modelValue": (Ce) => je(
4042
- q(Y, X.label),
4043
- K.builder,
4044
- Ce
4045
- )
4046
- }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"]))
4047
- ], 64))), 128)),
4048
- le("div", ho, [
4049
- fe(I, {
4050
- label: H(a)("team.memberForm.permissions.conditionApply"),
4051
- size: "md",
4052
- variant: "primary",
4053
- disabled: e.disable || !ve(Y),
4054
- onClick: (K) => st(q(Y, X.label), O)
4055
- }, null, 8, ["label", "disabled", "onClick"])
4056
- ])
4057
- ])
4058
- ]),
4059
- _: 2
4060
- }, 1032, ["disabled", "exclude-el-from-click-outside", "onClose"])) : (z(), Me(R, {
4061
- key: 1,
4062
- name: "settings",
4063
- size: "sm",
4064
- class: "invisible"
4065
- }))
4066
- ])
4067
- }))
4068
- ]), 1032, ["model-value", "additional-permissions"])
4069
- ]),
4070
- le("div", go, [
4071
- fe(wn, {
4072
- "model-value": i.value,
4073
- options: g.value,
4074
- context: H(a)("team.labels.warehouse"),
4075
- "onUpdate:modelValue": _
4076
- }, Ke({ _: 2 }, [
4077
- Te(F.value, (Y) => ({
4078
- name: `checkbox-${Y.id}-append`,
4079
- fn: be(() => [
4080
- fe(vt, { item: Y }, null, 8, ["item"])
4081
- ])
4082
- }))
4083
- ]), 1032, ["model-value", "options", "context"])
4084
- ]),
4085
- le("div", Io, [
4086
- fe(wn, {
4087
- "model-value": E.value,
4088
- options: W.value,
4089
- context: H(a)("team.labels.restaurant"),
4090
- "onUpdate:modelValue": V
4091
- }, Ke({ _: 2 }, [
4092
- Te(f.value, (Y) => ({
4093
- name: `checkbox-${Y.id}-append`,
4094
- fn: be(() => [
4095
- fe(vt, { item: Y }, null, 8, ["item"])
4096
- ])
4097
- }))
4098
- ]), 1032, ["model-value", "options", "context"])
4099
- ]),
4100
- le("div", yo, [
4101
- fe(eo, {
4102
- roles: H($),
4103
- "model-value": U.value,
4104
- "restaurant-ids": E.value,
4105
- "onUpdate:modelValue": G
4106
- }, Ke({ _: 2 }, [
4107
- Te(p.value, (Y) => ({
4108
- name: `checkbox-${Y.id}-append`,
4109
- fn: be(() => [
4110
- fe(vt, { item: Y }, null, 8, ["item"])
4111
- ])
4112
- }))
4113
- ]), 1032, ["roles", "model-value", "restaurant-ids"])
4114
- ])
4115
- ]);
4116
- };
4117
- }
4118
- });
4119
- export {
4120
- Mo as _
4121
- };