@feedmepos/mf-hrm-portal 2.1.0-dev → 2.1.0-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 (54) hide show
  1. package/dist/AuditLogList-C8VefmfL.js +1608 -0
  2. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-tiuei7CA.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-B25U2YoL.js} +2 -2
  3. package/dist/EmployeeList-DDY8DxQr.js +884 -0
  4. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
  5. package/dist/{Main-BgOhmojO.js → Main-BQ36wEVl.js} +188 -185
  6. package/dist/Main-D7xrzW8p.js +94 -0
  7. package/dist/{Main-D2Wf__wM.js → Main-D8zj09ZS.js} +1987 -1979
  8. package/dist/PermissionSetList-zdFnxyCb.js +392 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DOgOa3cu.js +4042 -0
  10. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-D-14ca2J.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DqY-OTuj.js} +1 -1
  11. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
  12. package/dist/{RoleList-tSC8RJHe.js → RoleList-CRYU_eRb.js} +231 -221
  13. package/dist/SelectFilter-ATOm0hdn.js +269 -0
  14. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  15. package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js} +54 -20
  16. package/dist/{TeamMemberList-Bz-kDJ0e.js → TeamMemberList-CMK7Yfn6.js} +137 -131
  17. package/dist/{TimesheetList-BFVhmcRt.js → TimesheetList-C00-tU7K.js} +140 -134
  18. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CtHuL5tW.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-dT_CJJDV.js} +2 -2
  19. package/dist/{app-DRnSocX8.js → app-C-wWQrRY.js} +792 -475
  20. package/dist/app.js +1 -1
  21. package/dist/{dayjs.min-B8xOAypU.js → dayjs.min-Bk9YhjTx.js} +1 -1
  22. package/dist/{employee-UrXqUaik.js → employee-DzKKMXNo.js} +3 -3
  23. package/dist/{iteration-LEYoQKiI.js → iteration-BV93u72h.js} +1 -1
  24. package/dist/{lodash-Bq6_eZZ0.js → lodash-psyQLJ6h.js} +1 -1
  25. package/dist/{rule-CJC6Cq6S.js → rule-mNiIG4E8.js} +116 -110
  26. package/dist/src/api/audit-log/index.d.ts +23 -0
  27. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
  28. package/dist/src/components/form/SelectFilter.vue.d.ts +3 -0
  29. package/dist/src/components/table/EmptyDataTemplate/index.vue.d.ts +4 -1
  30. package/dist/src/components/table/TableEmptyState.vue.d.ts +31 -0
  31. package/dist/src/stores/permission-set.d.ts +12 -3
  32. package/dist/src/stores/team.d.ts +4 -1
  33. package/dist/src/types/audit-log.d.ts +1 -1
  34. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  35. package/dist/src/views/audit-log/locales/index.d.ts +320 -16
  36. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  37. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
  38. package/dist/src/views/hr/locales/index.d.ts +4 -0
  39. package/dist/src/views/team/locales/index.d.ts +4 -0
  40. package/dist/style.css +1 -1
  41. package/dist/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/{useAppStore-BGsfYWAR.js → useAppStore-CEgLVGO6.js} +1 -1
  43. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  44. package/dist/{useLoading-BUM5R2qV.js → useLoading-CJtXNU4d.js} +1 -1
  45. package/dist/{useReportPermissions-nlQ_BBL2.js → useReportPermissions-DoQyFUKj.js} +3 -3
  46. package/package.json +1 -1
  47. package/dist/AuditLogList-C1bGND8z.js +0 -1037
  48. package/dist/EmployeeList-DqQF9xEx.js +0 -851
  49. package/dist/Main-DcKVuIjB.js +0 -90
  50. package/dist/PermissionSetList-CQpTa0eY.js +0 -384
  51. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCKVpAwv.js +0 -4030
  52. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  53. package/dist/SelectFilter-DUj7GBtT.js +0 -251
  54. package/dist/useDebounce-CWb5QR9G.js +0 -28
@@ -0,0 +1,4042 @@
1
+ import { getCurrentInstance as Xt, inject as as, ref as dt, shallowRef as ls, computed as Q, watch as Ft, onMounted as jn, onUnmounted as os, defineComponent as we, h as Un, createVNode as ie, Text as is, Fragment as Oe, resolveComponent as Me, createBlock as Se, openBlock as J, withCtx as de, createElementVNode as se, createElementBlock as ae, toDisplayString as Ce, unref as X, renderList as ye, toRef as tn, normalizeStyle as Ke, renderSlot as Re, createCommentVNode as Le, createTextVNode as cs, useSlots as us, normalizeClass as lt, createSlots as Je, mergeModels as nn, useModel as ds } from "vue";
2
+ import { useI18n as et, useCoreStore as ms } from "@feedmepos/mf-common";
3
+ import { useDialog as fs, useBreakpoints as _s } from "@feedmepos/ui-library";
4
+ import "@vue/devtools-api";
5
+ import { p as Vn, i as ps, P as bs, x as Rt, l as vs, k as hs, N as Lt } from "./rule-mNiIG4E8.js";
6
+ import { _ as Ht, u as gs, a as sn } from "./ConditionFormHost.vue_vue_type_script_setup_true_lang-B25U2YoL.js";
7
+ import { u as Is, v as ys, S as Pt, A as gt, d as fe, k as rn, b as Es, P as At } from "./app-C-wWQrRY.js";
8
+ import { d as It, g as Ns, b as Cs } from "./iteration-BV93u72h.js";
9
+ import { u as Ts } from "./useAppStore-CEgLVGO6.js";
10
+ function xn(e, t) {
11
+ return Array.isArray(e) ? e.includes(t) : e === t;
12
+ }
13
+ function ks(e) {
14
+ return Array.isArray(e) ? e[0] : e;
15
+ }
16
+ function Os(e, t) {
17
+ const n = t.find((o) => xn(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 ks(s.subject);
22
+ }
23
+ function an(e, t) {
24
+ const n = t.find((s) => xn(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 ln = typeof window < "u", Ye = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Rs = (e, t, n) => Ls({ l: e, k: t, s: n }), Ls = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ve = (e) => typeof e == "number" && isFinite(e), As = (e) => $t(e) === "[object Date]", Et = (e) => $t(e) === "[object RegExp]", Ct = (e) => ee(e) && Object.keys(e).length === 0, he = Object.assign, Ss = Object.create, re = (e = null) => Ss(e);
33
+ let on;
34
+ const Ze = () => on || (on = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : re());
35
+ function cn(e) {
36
+ return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
37
+ }
38
+ const Ds = Object.prototype.hasOwnProperty;
39
+ function Ae(e, t) {
40
+ return Ds.call(e, t);
41
+ }
42
+ const _e = Array.isArray, le = (e) => typeof e == "function", W = (e) => typeof e == "string", ue = (e) => typeof e == "boolean", te = (e) => e !== null && typeof e == "object", Ms = (e) => te(e) && le(e.then) && le(e.catch), Gn = Object.prototype.toString, $t = (e) => Gn.call(e), ee = (e) => $t(e) === "[object Object]", ws = (e) => e == null ? "" : _e(e) || ee(e) && e.toString === Gn ? JSON.stringify(e, null, 2) : String(e);
43
+ function Jt(e, t = "") {
44
+ return e.reduce((n, s, o) => o === 0 ? n + s : n + t + s, "");
45
+ }
46
+ function Fs(e, t) {
47
+ typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
48
+ }
49
+ const mt = (e) => !te(e) || _e(e);
50
+ function yt(e, t) {
51
+ if (mt(e) || mt(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((l) => {
57
+ l !== "__proto__" && (te(s[l]) && !te(o[l]) && (o[l] = Array.isArray(s[l]) ? [] : re()), mt(o[l]) || mt(s[l]) ? o[l] = s[l] : n.push({ src: s[l], des: o[l] }));
58
+ });
59
+ }
60
+ }
61
+ function Ps(e, t, n) {
62
+ return { line: e, column: t, offset: n };
63
+ }
64
+ function jt(e, t, n) {
65
+ return { start: e, end: t };
66
+ }
67
+ const ne = {
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
+ }, js = 17;
85
+ function Tt(e, t, n = {}) {
86
+ const { domain: s, messages: o, args: l } = n, c = e, f = new SyntaxError(String(c));
87
+ return f.code = e, t && (f.location = t), f.domain = s, f;
88
+ }
89
+ function Us(e) {
90
+ throw e;
91
+ }
92
+ const Fe = " ", Vs = "\r", Ie = `
93
+ `, xs = "\u2028", Gs = "\u2029";
94
+ function Ws(e) {
95
+ const t = e;
96
+ let n = 0, s = 1, o = 1, l = 0;
97
+ const c = (b) => t[b] === Vs && t[b + 1] === Ie, f = (b) => t[b] === Ie, v = (b) => t[b] === Gs, I = (b) => t[b] === xs, O = (b) => c(b) || f(b) || v(b) || I(b), L = () => n, R = () => s, U = () => o, B = () => l, M = (b) => c(b) || v(b) || I(b) ? Ie : t[b], P = () => M(n), u = () => M(n + l);
98
+ function p() {
99
+ return l = 0, O(n) && (s++, o = 0), c(n) && n++, n++, o++, t[n];
100
+ }
101
+ function A() {
102
+ return c(n + l) && l++, l++, t[n + l];
103
+ }
104
+ function i() {
105
+ n = 0, s = 1, o = 1, l = 0;
106
+ }
107
+ function h(b = 0) {
108
+ l = b;
109
+ }
110
+ function y() {
111
+ const b = n + l;
112
+ for (; b !== n; )
113
+ p();
114
+ l = 0;
115
+ }
116
+ return {
117
+ index: L,
118
+ line: R,
119
+ column: U,
120
+ peekOffset: B,
121
+ charAt: M,
122
+ currentChar: P,
123
+ currentPeek: u,
124
+ next: p,
125
+ peek: A,
126
+ reset: i,
127
+ resetPeek: h,
128
+ skipToPeek: y
129
+ };
130
+ }
131
+ const Ve = void 0, Zs = ".", un = "'", Ys = "tokenizer";
132
+ function Bs(e, t = {}) {
133
+ const n = t.location !== !1, s = Ws(e), o = () => s.index(), l = () => Ps(s.line(), s.column(), s.index()), c = l(), f = o(), v = {
134
+ currentType: 13,
135
+ offset: f,
136
+ startLoc: c,
137
+ endLoc: c,
138
+ lastType: 13,
139
+ lastOffset: f,
140
+ lastStartLoc: c,
141
+ lastEndLoc: c,
142
+ braceNest: 0,
143
+ inLinked: !1,
144
+ text: ""
145
+ }, I = () => v, { onError: O } = t;
146
+ function L(r, a, d, ...F) {
147
+ const D = I();
148
+ if (a.column += d, a.offset += d, O) {
149
+ const x = n ? jt(D.startLoc, a) : null, _ = Tt(r, x, {
150
+ domain: Ys,
151
+ args: F
152
+ });
153
+ O(_);
154
+ }
155
+ }
156
+ function R(r, a, d) {
157
+ r.endLoc = l(), r.currentType = a;
158
+ const F = { type: a };
159
+ return n && (F.loc = jt(r.startLoc, r.endLoc)), d != null && (F.value = d), F;
160
+ }
161
+ const U = (r) => R(
162
+ r,
163
+ 13
164
+ /* TokenTypes.EOF */
165
+ );
166
+ function B(r, a) {
167
+ return r.currentChar() === a ? (r.next(), a) : (L(ne.EXPECTED_TOKEN, l(), 0, a), "");
168
+ }
169
+ function M(r) {
170
+ let a = "";
171
+ for (; r.currentPeek() === Fe || r.currentPeek() === Ie; )
172
+ a += r.currentPeek(), r.peek();
173
+ return a;
174
+ }
175
+ function P(r) {
176
+ const a = M(r);
177
+ return r.skipToPeek(), a;
178
+ }
179
+ function u(r) {
180
+ if (r === Ve)
181
+ return !1;
182
+ const a = r.charCodeAt(0);
183
+ return a >= 97 && a <= 122 || // a-z
184
+ a >= 65 && a <= 90 || // A-Z
185
+ a === 95;
186
+ }
187
+ function p(r) {
188
+ if (r === Ve)
189
+ return !1;
190
+ const a = r.charCodeAt(0);
191
+ return a >= 48 && a <= 57;
192
+ }
193
+ function A(r, a) {
194
+ const { currentType: d } = a;
195
+ if (d !== 2)
196
+ return !1;
197
+ M(r);
198
+ const F = u(r.currentPeek());
199
+ return r.resetPeek(), F;
200
+ }
201
+ function i(r, a) {
202
+ const { currentType: d } = a;
203
+ if (d !== 2)
204
+ return !1;
205
+ M(r);
206
+ const F = r.currentPeek() === "-" ? r.peek() : r.currentPeek(), D = p(F);
207
+ return r.resetPeek(), D;
208
+ }
209
+ function h(r, a) {
210
+ const { currentType: d } = a;
211
+ if (d !== 2)
212
+ return !1;
213
+ M(r);
214
+ const F = r.currentPeek() === un;
215
+ return r.resetPeek(), F;
216
+ }
217
+ function y(r, a) {
218
+ const { currentType: d } = a;
219
+ if (d !== 7)
220
+ return !1;
221
+ M(r);
222
+ const F = r.currentPeek() === ".";
223
+ return r.resetPeek(), F;
224
+ }
225
+ function b(r, a) {
226
+ const { currentType: d } = a;
227
+ if (d !== 8)
228
+ return !1;
229
+ M(r);
230
+ const F = u(r.currentPeek());
231
+ return r.resetPeek(), F;
232
+ }
233
+ function w(r, a) {
234
+ const { currentType: d } = a;
235
+ if (!(d === 7 || d === 11))
236
+ return !1;
237
+ M(r);
238
+ const F = r.currentPeek() === ":";
239
+ return r.resetPeek(), F;
240
+ }
241
+ function m(r, a) {
242
+ const { currentType: d } = a;
243
+ if (d !== 9)
244
+ return !1;
245
+ const F = () => {
246
+ const x = r.currentPeek();
247
+ return x === "{" ? u(r.peek()) : x === "@" || x === "|" || x === ":" || x === "." || x === Fe || !x ? !1 : x === Ie ? (r.peek(), F()) : E(r, !1);
248
+ }, D = F();
249
+ return r.resetPeek(), D;
250
+ }
251
+ function T(r) {
252
+ M(r);
253
+ const a = r.currentPeek() === "|";
254
+ return r.resetPeek(), a;
255
+ }
256
+ function E(r, a = !0) {
257
+ const d = (D = !1, x = "") => {
258
+ const _ = r.currentPeek();
259
+ return _ === "{" || _ === "@" || !_ ? D : _ === "|" ? !(x === Fe || x === Ie) : _ === Fe ? (r.peek(), d(!0, Fe)) : _ === Ie ? (r.peek(), d(!0, Ie)) : !0;
260
+ }, F = d();
261
+ return a && r.resetPeek(), F;
262
+ }
263
+ function g(r, a) {
264
+ const d = r.currentChar();
265
+ return d === Ve ? Ve : a(d) ? (r.next(), d) : null;
266
+ }
267
+ function Y(r) {
268
+ const a = r.charCodeAt(0);
269
+ return a >= 97 && a <= 122 || // a-z
270
+ a >= 65 && a <= 90 || // A-Z
271
+ a >= 48 && a <= 57 || // 0-9
272
+ a === 95 || // _
273
+ a === 36;
274
+ }
275
+ function H(r) {
276
+ return g(r, Y);
277
+ }
278
+ function Z(r) {
279
+ const a = r.charCodeAt(0);
280
+ return a >= 97 && a <= 122 || // a-z
281
+ a >= 65 && a <= 90 || // A-Z
282
+ a >= 48 && a <= 57 || // 0-9
283
+ a === 95 || // _
284
+ a === 36 || // $
285
+ a === 45;
286
+ }
287
+ function V(r) {
288
+ return g(r, Z);
289
+ }
290
+ function j(r) {
291
+ const a = r.charCodeAt(0);
292
+ return a >= 48 && a <= 57;
293
+ }
294
+ function $(r) {
295
+ return g(r, j);
296
+ }
297
+ function K(r) {
298
+ const a = r.charCodeAt(0);
299
+ return a >= 48 && a <= 57 || // 0-9
300
+ a >= 65 && a <= 70 || // A-F
301
+ a >= 97 && a <= 102;
302
+ }
303
+ function me(r) {
304
+ return g(r, K);
305
+ }
306
+ function pe(r) {
307
+ let a = "", d = "";
308
+ for (; a = $(r); )
309
+ d += a;
310
+ return d;
311
+ }
312
+ function Ne(r) {
313
+ let a = "";
314
+ for (; ; ) {
315
+ const d = r.currentChar();
316
+ if (d === "{" || d === "}" || d === "@" || d === "|" || !d)
317
+ break;
318
+ if (d === Fe || d === Ie)
319
+ if (E(r))
320
+ a += d, r.next();
321
+ else {
322
+ if (T(r))
323
+ break;
324
+ a += d, r.next();
325
+ }
326
+ else
327
+ a += d, r.next();
328
+ }
329
+ return a;
330
+ }
331
+ function be(r) {
332
+ P(r);
333
+ let a = "", d = "";
334
+ for (; a = V(r); )
335
+ d += a;
336
+ return r.currentChar() === Ve && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d;
337
+ }
338
+ function ge(r) {
339
+ P(r);
340
+ let a = "";
341
+ return r.currentChar() === "-" ? (r.next(), a += `-${pe(r)}`) : a += pe(r), r.currentChar() === Ve && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), a;
342
+ }
343
+ function ce(r) {
344
+ return r !== un && r !== Ie;
345
+ }
346
+ function z(r) {
347
+ P(r), B(r, "'");
348
+ let a = "", d = "";
349
+ for (; a = g(r, ce); )
350
+ a === "\\" ? d += oe(r) : d += a;
351
+ const F = r.currentChar();
352
+ return F === Ie || F === Ve ? (L(ne.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, l(), 0), F === Ie && (r.next(), B(r, "'")), d) : (B(r, "'"), d);
353
+ }
354
+ function oe(r) {
355
+ const a = r.currentChar();
356
+ switch (a) {
357
+ case "\\":
358
+ case "'":
359
+ return r.next(), `\\${a}`;
360
+ case "u":
361
+ return We(r, a, 4);
362
+ case "U":
363
+ return We(r, a, 6);
364
+ default:
365
+ return L(ne.UNKNOWN_ESCAPE_SEQUENCE, l(), 0, a), "";
366
+ }
367
+ }
368
+ function We(r, a, d) {
369
+ B(r, a);
370
+ let F = "";
371
+ for (let D = 0; D < d; D++) {
372
+ const x = me(r);
373
+ if (!x) {
374
+ L(ne.INVALID_UNICODE_ESCAPE_SEQUENCE, l(), 0, `\\${a}${F}${r.currentChar()}`);
375
+ break;
376
+ }
377
+ F += x;
378
+ }
379
+ return `\\${a}${F}`;
380
+ }
381
+ function tt(r) {
382
+ return r !== "{" && r !== "}" && r !== Fe && r !== Ie;
383
+ }
384
+ function nt(r) {
385
+ P(r);
386
+ let a = "", d = "";
387
+ for (; a = g(r, tt); )
388
+ d += a;
389
+ return d;
390
+ }
391
+ function st(r) {
392
+ let a = "", d = "";
393
+ for (; a = H(r); )
394
+ d += a;
395
+ return d;
396
+ }
397
+ function rt(r) {
398
+ const a = (d) => {
399
+ const F = r.currentChar();
400
+ return F === "{" || F === "@" || F === "|" || F === "(" || F === ")" || !F || F === Fe ? d : (d += F, r.next(), a(d));
401
+ };
402
+ return a("");
403
+ }
404
+ function ke(r) {
405
+ P(r);
406
+ const a = B(
407
+ r,
408
+ "|"
409
+ /* TokenChars.Pipe */
410
+ );
411
+ return P(r), a;
412
+ }
413
+ function Ue(r, a) {
414
+ let d = null;
415
+ switch (r.currentChar()) {
416
+ case "{":
417
+ return a.braceNest >= 1 && L(ne.NOT_ALLOW_NEST_PLACEHOLDER, l(), 0), r.next(), d = R(
418
+ a,
419
+ 2,
420
+ "{"
421
+ /* TokenChars.BraceLeft */
422
+ ), P(r), a.braceNest++, d;
423
+ case "}":
424
+ return a.braceNest > 0 && a.currentType === 2 && L(ne.EMPTY_PLACEHOLDER, l(), 0), r.next(), d = R(
425
+ a,
426
+ 3,
427
+ "}"
428
+ /* TokenChars.BraceRight */
429
+ ), a.braceNest--, a.braceNest > 0 && P(r), a.inLinked && a.braceNest === 0 && (a.inLinked = !1), d;
430
+ case "@":
431
+ return a.braceNest > 0 && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d = C(r, a) || U(a), a.braceNest = 0, d;
432
+ default: {
433
+ let D = !0, x = !0, _ = !0;
434
+ if (T(r))
435
+ return a.braceNest > 0 && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d = R(a, 1, ke(r)), a.braceNest = 0, a.inLinked = !1, d;
436
+ if (a.braceNest > 0 && (a.currentType === 4 || a.currentType === 5 || a.currentType === 6))
437
+ return L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), a.braceNest = 0, N(r, a);
438
+ if (D = A(r, a))
439
+ return d = R(a, 4, be(r)), P(r), d;
440
+ if (x = i(r, a))
441
+ return d = R(a, 5, ge(r)), P(r), d;
442
+ if (_ = h(r, a))
443
+ return d = R(a, 6, z(r)), P(r), d;
444
+ if (!D && !x && !_)
445
+ return d = R(a, 12, nt(r)), L(ne.INVALID_TOKEN_IN_PLACEHOLDER, l(), 0, d.value), P(r), d;
446
+ break;
447
+ }
448
+ }
449
+ return d;
450
+ }
451
+ function C(r, a) {
452
+ const { currentType: d } = a;
453
+ let F = null;
454
+ const D = r.currentChar();
455
+ switch ((d === 7 || d === 8 || d === 11 || d === 9) && (D === Ie || D === Fe) && L(ne.INVALID_LINKED_FORMAT, l(), 0), D) {
456
+ case "@":
457
+ return r.next(), F = R(
458
+ a,
459
+ 7,
460
+ "@"
461
+ /* TokenChars.LinkedAlias */
462
+ ), a.inLinked = !0, F;
463
+ case ".":
464
+ return P(r), r.next(), R(
465
+ a,
466
+ 8,
467
+ "."
468
+ /* TokenChars.LinkedDot */
469
+ );
470
+ case ":":
471
+ return P(r), r.next(), R(
472
+ a,
473
+ 9,
474
+ ":"
475
+ /* TokenChars.LinkedDelimiter */
476
+ );
477
+ default:
478
+ return T(r) ? (F = R(a, 1, ke(r)), a.braceNest = 0, a.inLinked = !1, F) : y(r, a) || w(r, a) ? (P(r), C(r, a)) : b(r, a) ? (P(r), R(a, 11, st(r))) : m(r, a) ? (P(r), D === "{" ? Ue(r, a) || F : R(a, 10, rt(r))) : (d === 7 && L(ne.INVALID_LINKED_FORMAT, l(), 0), a.braceNest = 0, a.inLinked = !1, N(r, a));
479
+ }
480
+ }
481
+ function N(r, a) {
482
+ let d = {
483
+ type: 13
484
+ /* TokenTypes.EOF */
485
+ };
486
+ if (a.braceNest > 0)
487
+ return Ue(r, a) || U(a);
488
+ if (a.inLinked)
489
+ return C(r, a) || U(a);
490
+ switch (r.currentChar()) {
491
+ case "{":
492
+ return Ue(r, a) || U(a);
493
+ case "}":
494
+ return L(ne.UNBALANCED_CLOSING_BRACE, l(), 0), r.next(), R(
495
+ a,
496
+ 3,
497
+ "}"
498
+ /* TokenChars.BraceRight */
499
+ );
500
+ case "@":
501
+ return C(r, a) || U(a);
502
+ default: {
503
+ if (T(r))
504
+ return d = R(a, 1, ke(r)), a.braceNest = 0, a.inLinked = !1, d;
505
+ if (E(r))
506
+ return R(a, 0, Ne(r));
507
+ break;
508
+ }
509
+ }
510
+ return d;
511
+ }
512
+ function S() {
513
+ const { currentType: r, offset: a, startLoc: d, endLoc: F } = v;
514
+ return v.lastType = r, v.lastOffset = a, v.lastStartLoc = d, v.lastEndLoc = F, v.offset = o(), v.startLoc = l(), s.currentChar() === Ve ? R(
515
+ v,
516
+ 13
517
+ /* TokenTypes.EOF */
518
+ ) : N(s, v);
519
+ }
520
+ return {
521
+ nextToken: S,
522
+ currentOffset: o,
523
+ currentPosition: l,
524
+ context: I
525
+ };
526
+ }
527
+ const Xs = "parser", Hs = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
528
+ function $s(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 Js(e = {}) {
541
+ const t = e.location !== !1, { onError: n } = e;
542
+ function s(u, p, A, i, ...h) {
543
+ const y = u.currentPosition();
544
+ if (y.offset += i, y.column += i, n) {
545
+ const b = t ? jt(A, y) : null, w = Tt(p, b, {
546
+ domain: Xs,
547
+ args: h
548
+ });
549
+ n(w);
550
+ }
551
+ }
552
+ function o(u, p, A) {
553
+ const i = { type: u };
554
+ return t && (i.start = p, i.end = p, i.loc = { start: A, end: A }), i;
555
+ }
556
+ function l(u, p, A, i) {
557
+ t && (u.end = p, u.loc && (u.loc.end = A));
558
+ }
559
+ function c(u, p) {
560
+ const A = u.context(), i = o(3, A.offset, A.startLoc);
561
+ return i.value = p, l(i, u.currentOffset(), u.currentPosition()), i;
562
+ }
563
+ function f(u, p) {
564
+ const A = u.context(), { lastOffset: i, lastStartLoc: h } = A, y = o(5, i, h);
565
+ return y.index = parseInt(p, 10), u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
566
+ }
567
+ function v(u, p) {
568
+ const A = u.context(), { lastOffset: i, lastStartLoc: h } = A, y = o(4, i, h);
569
+ return y.key = p, u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
570
+ }
571
+ function I(u, p) {
572
+ const A = u.context(), { lastOffset: i, lastStartLoc: h } = A, y = o(9, i, h);
573
+ return y.value = p.replace(Hs, $s), u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
574
+ }
575
+ function O(u) {
576
+ const p = u.nextToken(), A = u.context(), { lastOffset: i, lastStartLoc: h } = A, y = o(8, i, h);
577
+ return p.type !== 11 ? (s(u, ne.UNEXPECTED_EMPTY_LINKED_MODIFIER, A.lastStartLoc, 0), y.value = "", l(y, i, h), {
578
+ nextConsumeToken: p,
579
+ node: y
580
+ }) : (p.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, A.lastStartLoc, 0, De(p)), y.value = p.value || "", l(y, u.currentOffset(), u.currentPosition()), {
581
+ node: y
582
+ });
583
+ }
584
+ function L(u, p) {
585
+ const A = u.context(), i = o(7, A.offset, A.startLoc);
586
+ return i.value = p, l(i, u.currentOffset(), u.currentPosition()), i;
587
+ }
588
+ function R(u) {
589
+ const p = u.context(), A = o(6, p.offset, p.startLoc);
590
+ let i = u.nextToken();
591
+ if (i.type === 8) {
592
+ const h = O(u);
593
+ A.modifier = h.node, i = h.nextConsumeToken || u.nextToken();
594
+ }
595
+ switch (i.type !== 9 && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), i = u.nextToken(), i.type === 2 && (i = u.nextToken()), i.type) {
596
+ case 10:
597
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), A.key = L(u, i.value || "");
598
+ break;
599
+ case 4:
600
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), A.key = v(u, i.value || "");
601
+ break;
602
+ case 5:
603
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), A.key = f(u, i.value || "");
604
+ break;
605
+ case 6:
606
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), A.key = I(u, i.value || "");
607
+ break;
608
+ default: {
609
+ s(u, ne.UNEXPECTED_EMPTY_LINKED_KEY, p.lastStartLoc, 0);
610
+ const h = u.context(), y = o(7, h.offset, h.startLoc);
611
+ return y.value = "", l(y, h.offset, h.startLoc), A.key = y, l(A, h.offset, h.startLoc), {
612
+ nextConsumeToken: i,
613
+ node: A
614
+ };
615
+ }
616
+ }
617
+ return l(A, u.currentOffset(), u.currentPosition()), {
618
+ node: A
619
+ };
620
+ }
621
+ function U(u) {
622
+ const p = u.context(), A = p.currentType === 1 ? u.currentOffset() : p.offset, i = p.currentType === 1 ? p.endLoc : p.startLoc, h = o(2, A, i);
623
+ h.items = [];
624
+ let y = null;
625
+ do {
626
+ const m = y || u.nextToken();
627
+ switch (y = null, m.type) {
628
+ case 0:
629
+ m.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(m)), h.items.push(c(u, m.value || ""));
630
+ break;
631
+ case 5:
632
+ m.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(m)), h.items.push(f(u, m.value || ""));
633
+ break;
634
+ case 4:
635
+ m.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(m)), h.items.push(v(u, m.value || ""));
636
+ break;
637
+ case 6:
638
+ m.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(m)), h.items.push(I(u, m.value || ""));
639
+ break;
640
+ case 7: {
641
+ const T = R(u);
642
+ h.items.push(T.node), y = T.nextConsumeToken || null;
643
+ break;
644
+ }
645
+ }
646
+ } while (p.currentType !== 13 && p.currentType !== 1);
647
+ const b = p.currentType === 1 ? p.lastOffset : u.currentOffset(), w = p.currentType === 1 ? p.lastEndLoc : u.currentPosition();
648
+ return l(h, b, w), h;
649
+ }
650
+ function B(u, p, A, i) {
651
+ const h = u.context();
652
+ let y = i.items.length === 0;
653
+ const b = o(1, p, A);
654
+ b.cases = [], b.cases.push(i);
655
+ do {
656
+ const w = U(u);
657
+ y || (y = w.items.length === 0), b.cases.push(w);
658
+ } while (h.currentType !== 13);
659
+ return y && s(u, ne.MUST_HAVE_MESSAGES_IN_PLURAL, A, 0), l(b, u.currentOffset(), u.currentPosition()), b;
660
+ }
661
+ function M(u) {
662
+ const p = u.context(), { offset: A, startLoc: i } = p, h = U(u);
663
+ return p.currentType === 13 ? h : B(u, A, i, h);
664
+ }
665
+ function P(u) {
666
+ const p = Bs(u, he({}, e)), A = p.context(), i = o(0, A.offset, A.startLoc);
667
+ return t && i.loc && (i.loc.source = u), i.body = M(p), e.onCacheKey && (i.cacheKey = e.onCacheKey(u)), A.currentType !== 13 && s(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, A.lastStartLoc, 0, u[A.offset] || ""), l(i, p.currentOffset(), p.currentPosition()), i;
668
+ }
669
+ return { parse: P };
670
+ }
671
+ function De(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 Ks(e, t = {}) {
678
+ const n = {
679
+ ast: e,
680
+ helpers: /* @__PURE__ */ new Set()
681
+ };
682
+ return { context: () => n, helper: (l) => (n.helpers.add(l), l) };
683
+ }
684
+ function dn(e, t) {
685
+ for (let n = 0; n < e.length; n++)
686
+ Kt(e[n], t);
687
+ }
688
+ function Kt(e, t) {
689
+ switch (e.type) {
690
+ case 1:
691
+ dn(e.cases, t), t.helper(
692
+ "plural"
693
+ /* HelperNameMap.PLURAL */
694
+ );
695
+ break;
696
+ case 2:
697
+ dn(e.items, t);
698
+ break;
699
+ case 6: {
700
+ Kt(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 zs(e, t = {}) {
730
+ const n = Ks(e);
731
+ n.helper(
732
+ "normalize"
733
+ /* HelperNameMap.NORMALIZE */
734
+ ), e.body && Kt(e.body, n);
735
+ const s = n.context();
736
+ e.helpers = Array.from(s.helpers);
737
+ }
738
+ function Qs(e) {
739
+ const t = e.body;
740
+ return t.type === 2 ? mn(t) : t.cases.forEach((n) => mn(n)), e;
741
+ }
742
+ function mn(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 = Jt(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 He(e) {
764
+ switch (e.t = e.type, e.type) {
765
+ case 0: {
766
+ const t = e;
767
+ He(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
+ He(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
+ He(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
+ He(t.key), t.k = t.key, delete t.key, t.modifier && (He(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 qs(e, t) {
811
+ const { filename: n, breakLineCode: s, needIndent: o } = t, l = t.location !== !1, c = {
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
+ l && e.loc && (c.source = e.loc.source);
823
+ const f = () => c;
824
+ function v(M, P) {
825
+ c.code += M;
826
+ }
827
+ function I(M, P = !0) {
828
+ const u = P ? s : "";
829
+ v(o ? u + " ".repeat(M) : u);
830
+ }
831
+ function O(M = !0) {
832
+ const P = ++c.indentLevel;
833
+ M && I(P);
834
+ }
835
+ function L(M = !0) {
836
+ const P = --c.indentLevel;
837
+ M && I(P);
838
+ }
839
+ function R() {
840
+ I(c.indentLevel);
841
+ }
842
+ return {
843
+ context: f,
844
+ push: v,
845
+ indent: O,
846
+ deindent: L,
847
+ newline: R,
848
+ helper: (M) => `_${M}`,
849
+ needIndent: () => c.needIndent
850
+ };
851
+ }
852
+ function er(e, t) {
853
+ const { helper: n } = e;
854
+ e.push(`${n(
855
+ "linked"
856
+ /* HelperNameMap.LINKED */
857
+ )}(`), ze(e, t.key), t.modifier ? (e.push(", "), ze(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
858
+ }
859
+ function tr(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 l = 0; l < o && (ze(e, t.items[l]), l !== o - 1); l++)
867
+ e.push(", ");
868
+ e.deindent(s()), e.push("])");
869
+ }
870
+ function nr(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 l = 0; l < o && (ze(e, t.cases[l]), l !== o - 1); l++)
879
+ e.push(", ");
880
+ e.deindent(s()), e.push("])");
881
+ }
882
+ }
883
+ function sr(e, t) {
884
+ t.body ? ze(e, t.body) : e.push("null");
885
+ }
886
+ function ze(e, t) {
887
+ const { helper: n } = e;
888
+ switch (t.type) {
889
+ case 0:
890
+ sr(e, t);
891
+ break;
892
+ case 1:
893
+ nr(e, t);
894
+ break;
895
+ case 2:
896
+ tr(e, t);
897
+ break;
898
+ case 6:
899
+ er(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 rr = (e, t = {}) => {
934
+ const n = W(t.mode) ? t.mode : "normal", s = W(t.filename) ? t.filename : "message.intl";
935
+ t.sourceMap;
936
+ const o = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
937
+ `, l = t.needIndent ? t.needIndent : n !== "arrow", c = e.helpers || [], f = qs(e, {
938
+ filename: s,
939
+ breakLineCode: o,
940
+ needIndent: l
941
+ });
942
+ f.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), f.indent(l), c.length > 0 && (f.push(`const { ${Jt(c.map((O) => `${O}: _${O}`), ", ")} } = ctx`), f.newline()), f.push("return "), ze(f, e), f.deindent(l), f.push("}"), delete e.helpers;
943
+ const { code: v, map: I } = f.context();
944
+ return {
945
+ ast: e,
946
+ code: v,
947
+ map: I ? I.toJSON() : void 0
948
+ // eslint-disable-line @typescript-eslint/no-explicit-any
949
+ };
950
+ };
951
+ function ar(e, t = {}) {
952
+ const n = he({}, t), s = !!n.jit, o = !!n.minify, l = n.optimize == null ? !0 : n.optimize, f = Js(n).parse(e);
953
+ return s ? (l && Qs(f), o && He(f), { ast: f, code: "" }) : (zs(f, n), rr(f, n));
954
+ }
955
+ var lr = { env: { NODE_ENV: "production" } };
956
+ function or() {
957
+ typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ze().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ze().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
958
+ }
959
+ function St(e) {
960
+ return (n) => ir(n, e);
961
+ }
962
+ function ir(e, t) {
963
+ const n = ur(t);
964
+ if (n == null)
965
+ throw ot(
966
+ 0
967
+ /* NodeTypes.Resource */
968
+ );
969
+ if (zt(n) === 1) {
970
+ const l = mr(n);
971
+ return e.plural(l.reduce((c, f) => [
972
+ ...c,
973
+ fn(e, f)
974
+ ], []));
975
+ } else
976
+ return fn(e, n);
977
+ }
978
+ const cr = ["b", "body"];
979
+ function ur(e) {
980
+ return xe(e, cr);
981
+ }
982
+ const dr = ["c", "cases"];
983
+ function mr(e) {
984
+ return xe(e, dr, []);
985
+ }
986
+ function fn(e, t) {
987
+ const n = _r(t);
988
+ if (n != null)
989
+ return e.type === "text" ? n : e.normalize([n]);
990
+ {
991
+ const s = br(t).reduce((o, l) => [...o, Ut(e, l)], []);
992
+ return e.normalize(s);
993
+ }
994
+ }
995
+ const fr = ["s", "static"];
996
+ function _r(e) {
997
+ return xe(e, fr);
998
+ }
999
+ const pr = ["i", "items"];
1000
+ function br(e) {
1001
+ return xe(e, pr, []);
1002
+ }
1003
+ function Ut(e, t) {
1004
+ const n = zt(t);
1005
+ switch (n) {
1006
+ case 3:
1007
+ return ft(t, n);
1008
+ case 9:
1009
+ return ft(t, n);
1010
+ case 4: {
1011
+ const s = t;
1012
+ if (Ae(s, "k") && s.k)
1013
+ return e.interpolate(e.named(s.k));
1014
+ if (Ae(s, "key") && s.key)
1015
+ return e.interpolate(e.named(s.key));
1016
+ throw ot(n);
1017
+ }
1018
+ case 5: {
1019
+ const s = t;
1020
+ if (Ae(s, "i") && ve(s.i))
1021
+ return e.interpolate(e.list(s.i));
1022
+ if (Ae(s, "index") && ve(s.index))
1023
+ return e.interpolate(e.list(s.index));
1024
+ throw ot(n);
1025
+ }
1026
+ case 6: {
1027
+ const s = t, o = Ir(s), l = Er(s);
1028
+ return e.linked(Ut(e, l), o ? Ut(e, o) : void 0, e.type);
1029
+ }
1030
+ case 7:
1031
+ return ft(t, n);
1032
+ case 8:
1033
+ return ft(t, n);
1034
+ default:
1035
+ throw new Error(`unhandled node on format message part: ${n}`);
1036
+ }
1037
+ }
1038
+ const vr = ["t", "type"];
1039
+ function zt(e) {
1040
+ return xe(e, vr);
1041
+ }
1042
+ const hr = ["v", "value"];
1043
+ function ft(e, t) {
1044
+ const n = xe(e, hr);
1045
+ if (n)
1046
+ return n;
1047
+ throw ot(t);
1048
+ }
1049
+ const gr = ["m", "modifier"];
1050
+ function Ir(e) {
1051
+ return xe(e, gr);
1052
+ }
1053
+ const yr = ["k", "key"];
1054
+ function Er(e) {
1055
+ const t = xe(e, yr);
1056
+ if (t)
1057
+ return t;
1058
+ throw ot(
1059
+ 6
1060
+ /* NodeTypes.Linked */
1061
+ );
1062
+ }
1063
+ function xe(e, t, n) {
1064
+ for (let s = 0; s < t.length; s++) {
1065
+ const o = t[s];
1066
+ if (Ae(e, o) && e[o] != null)
1067
+ return e[o];
1068
+ }
1069
+ return n;
1070
+ }
1071
+ function ot(e) {
1072
+ return new Error(`unhandled node type: ${e}`);
1073
+ }
1074
+ const Nr = (e) => e;
1075
+ let _t = re();
1076
+ function Qe(e) {
1077
+ return te(e) && zt(e) === 0 && (Ae(e, "b") || Ae(e, "body"));
1078
+ }
1079
+ function Cr(e, t = {}) {
1080
+ let n = !1;
1081
+ const s = t.onError || Us;
1082
+ return t.onError = (o) => {
1083
+ n = !0, s(o);
1084
+ }, { ...ar(e, t), detectError: n };
1085
+ }
1086
+ // @__NO_SIDE_EFFECTS__
1087
+ function Tr(e, t) {
1088
+ if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && W(e)) {
1089
+ ue(t.warnHtmlMessage) && t.warnHtmlMessage;
1090
+ const s = (t.onCacheKey || Nr)(e), o = _t[s];
1091
+ if (o)
1092
+ return o;
1093
+ const { ast: l, detectError: c } = Cr(e, {
1094
+ ...t,
1095
+ location: lr.env.NODE_ENV !== "production",
1096
+ jit: !0
1097
+ }), f = St(l);
1098
+ return c ? f : _t[s] = f;
1099
+ } else {
1100
+ const n = e.cacheKey;
1101
+ if (n) {
1102
+ const s = _t[n];
1103
+ return s || (_t[n] = St(e));
1104
+ } else
1105
+ return St(e);
1106
+ }
1107
+ }
1108
+ let it = null;
1109
+ function kr(e) {
1110
+ it = e;
1111
+ }
1112
+ function Or(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 Rr = /* @__PURE__ */ Lr("function:translate");
1121
+ function Lr(e) {
1122
+ return (t) => it && it.emit(e, t);
1123
+ }
1124
+ const Pe = {
1125
+ INVALID_ARGUMENT: js,
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
+ }, Ar = 24;
1133
+ function je(e) {
1134
+ return Tt(e, null, void 0);
1135
+ }
1136
+ function Qt(e, t) {
1137
+ return t.locale != null ? _n(t.locale) : _n(e.locale);
1138
+ }
1139
+ let Dt;
1140
+ function _n(e) {
1141
+ if (W(e))
1142
+ return e;
1143
+ if (le(e)) {
1144
+ if (e.resolvedOnce && Dt != null)
1145
+ return Dt;
1146
+ if (e.constructor.name === "Function") {
1147
+ const t = e();
1148
+ if (Ms(t))
1149
+ throw je(Pe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1150
+ return Dt = t;
1151
+ } else
1152
+ throw je(Pe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1153
+ } else
1154
+ throw je(Pe.NOT_SUPPORT_LOCALE_TYPE);
1155
+ }
1156
+ function Sr(e, t, n) {
1157
+ return [.../* @__PURE__ */ new Set([
1158
+ n,
1159
+ ..._e(t) ? t : te(t) ? Object.keys(t) : W(t) ? [t] : [n]
1160
+ ])];
1161
+ }
1162
+ function Wn(e, t, n) {
1163
+ const s = W(n) ? n : Nt, o = e;
1164
+ o.__localeChainCache || (o.__localeChainCache = /* @__PURE__ */ new Map());
1165
+ let l = o.__localeChainCache.get(s);
1166
+ if (!l) {
1167
+ l = [];
1168
+ let c = [n];
1169
+ for (; _e(c); )
1170
+ c = pn(l, c, t);
1171
+ const f = _e(t) || !ee(t) ? t : t.default ? t.default : null;
1172
+ c = W(f) ? [f] : f, _e(c) && pn(l, c, !1), o.__localeChainCache.set(s, l);
1173
+ }
1174
+ return l;
1175
+ }
1176
+ function pn(e, t, n) {
1177
+ let s = !0;
1178
+ for (let o = 0; o < t.length && ue(s); o++) {
1179
+ const l = t[o];
1180
+ W(l) && (s = Dr(e, t[o], n));
1181
+ }
1182
+ return s;
1183
+ }
1184
+ function Dr(e, t, n) {
1185
+ let s;
1186
+ const o = t.split("-");
1187
+ do {
1188
+ const l = o.join("-");
1189
+ s = Mr(e, l, n), o.splice(-1, 1);
1190
+ } while (o.length && s === !0);
1191
+ return s;
1192
+ }
1193
+ function Mr(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), (_e(n) || ee(n)) && n[o] && (s = n[o]);
1199
+ }
1200
+ return s;
1201
+ }
1202
+ const Ge = [];
1203
+ Ge[
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
+ Ge[
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
+ Ge[
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
+ Ge[
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
+ Ge[
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
+ Ge[
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
+ Ge[
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 wr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1364
+ function Fr(e) {
1365
+ return wr.test(e);
1366
+ }
1367
+ function Pr(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 jr(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 Ur(e) {
1397
+ const t = e.trim();
1398
+ return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Fr(t) ? Pr(t) : "*" + t;
1399
+ }
1400
+ function Vr(e) {
1401
+ const t = [];
1402
+ let n = -1, s = 0, o = 0, l, c, f, v, I, O, L;
1403
+ const R = [];
1404
+ R[
1405
+ 0
1406
+ /* Actions.APPEND */
1407
+ ] = () => {
1408
+ c === void 0 ? c = f : c += f;
1409
+ }, R[
1410
+ 1
1411
+ /* Actions.PUSH */
1412
+ ] = () => {
1413
+ c !== void 0 && (t.push(c), c = void 0);
1414
+ }, R[
1415
+ 2
1416
+ /* Actions.INC_SUB_PATH_DEPTH */
1417
+ ] = () => {
1418
+ R[
1419
+ 0
1420
+ /* Actions.APPEND */
1421
+ ](), o++;
1422
+ }, R[
1423
+ 3
1424
+ /* Actions.PUSH_SUB_PATH */
1425
+ ] = () => {
1426
+ if (o > 0)
1427
+ o--, s = 4, R[
1428
+ 0
1429
+ /* Actions.APPEND */
1430
+ ]();
1431
+ else {
1432
+ if (o = 0, c === void 0 || (c = Ur(c), c === !1))
1433
+ return !1;
1434
+ R[
1435
+ 1
1436
+ /* Actions.PUSH */
1437
+ ]();
1438
+ }
1439
+ };
1440
+ function U() {
1441
+ const B = e[n + 1];
1442
+ if (s === 5 && B === "'" || s === 6 && B === '"')
1443
+ return n++, f = "\\" + B, R[
1444
+ 0
1445
+ /* Actions.APPEND */
1446
+ ](), !0;
1447
+ }
1448
+ for (; s !== null; )
1449
+ if (n++, l = e[n], !(l === "\\" && U())) {
1450
+ if (v = jr(l), L = Ge[s], I = L[v] || L.l || 8, I === 8 || (s = I[0], I[1] !== void 0 && (O = R[I[1]], O && (f = l, O() === !1))))
1451
+ return;
1452
+ if (s === 7)
1453
+ return t;
1454
+ }
1455
+ }
1456
+ const bn = /* @__PURE__ */ new Map();
1457
+ function xr(e, t) {
1458
+ return te(e) ? e[t] : null;
1459
+ }
1460
+ function Gr(e, t) {
1461
+ if (!te(e))
1462
+ return null;
1463
+ let n = bn.get(t);
1464
+ if (n || (n = Vr(t), n && bn.set(t, n)), !n)
1465
+ return null;
1466
+ const s = n.length;
1467
+ let o = e, l = 0;
1468
+ for (; l < s; ) {
1469
+ const c = o[n[l]];
1470
+ if (c === void 0 || le(o))
1471
+ return null;
1472
+ o = c, l++;
1473
+ }
1474
+ return o;
1475
+ }
1476
+ const Wr = "10.0.5", kt = -1, Nt = "en-US", vn = "", hn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1477
+ function Zr() {
1478
+ return {
1479
+ upper: (e, t) => t === "text" && W(e) ? e.toUpperCase() : t === "vnode" && te(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1480
+ lower: (e, t) => t === "text" && W(e) ? e.toLowerCase() : t === "vnode" && te(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1481
+ capitalize: (e, t) => t === "text" && W(e) ? hn(e) : t === "vnode" && te(e) && "__v_isVNode" in e ? hn(e.children) : e
1482
+ };
1483
+ }
1484
+ let Zn;
1485
+ function Yr(e) {
1486
+ Zn = e;
1487
+ }
1488
+ let Yn;
1489
+ function Br(e) {
1490
+ Yn = e;
1491
+ }
1492
+ let Bn;
1493
+ function Xr(e) {
1494
+ Bn = e;
1495
+ }
1496
+ let Xn = null;
1497
+ const Hr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1498
+ Xn = e;
1499
+ }, $r = /* @__NO_SIDE_EFFECTS__ */ () => Xn;
1500
+ let Hn = null;
1501
+ const gn = (e) => {
1502
+ Hn = e;
1503
+ }, Jr = () => Hn;
1504
+ let In = 0;
1505
+ function Kr(e = {}) {
1506
+ const t = le(e.onWarn) ? e.onWarn : Fs, n = W(e.version) ? e.version : Wr, s = W(e.locale) || le(e.locale) ? e.locale : Nt, o = le(s) ? Nt : s, l = _e(e.fallbackLocale) || ee(e.fallbackLocale) || W(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o, c = ee(e.messages) ? e.messages : Mt(o), f = ee(e.datetimeFormats) ? e.datetimeFormats : Mt(o), v = ee(e.numberFormats) ? e.numberFormats : Mt(o), I = he(re(), e.modifiers, Zr()), O = e.pluralRules || re(), L = le(e.missing) ? e.missing : null, R = ue(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, U = ue(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, B = !!e.fallbackFormat, M = !!e.unresolving, P = le(e.postTranslation) ? e.postTranslation : null, u = ee(e.processor) ? e.processor : null, p = ue(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, A = !!e.escapeParameter, i = le(e.messageCompiler) ? e.messageCompiler : Zn, h = le(e.messageResolver) ? e.messageResolver : Yn || xr, y = le(e.localeFallbacker) ? e.localeFallbacker : Bn || Sr, b = te(e.fallbackContext) ? e.fallbackContext : void 0, w = e, m = te(w.__datetimeFormatters) ? w.__datetimeFormatters : /* @__PURE__ */ new Map(), T = te(w.__numberFormatters) ? w.__numberFormatters : /* @__PURE__ */ new Map(), E = te(w.__meta) ? w.__meta : {};
1507
+ In++;
1508
+ const g = {
1509
+ version: n,
1510
+ cid: In,
1511
+ locale: s,
1512
+ fallbackLocale: l,
1513
+ messages: c,
1514
+ modifiers: I,
1515
+ pluralRules: O,
1516
+ missing: L,
1517
+ missingWarn: R,
1518
+ fallbackWarn: U,
1519
+ fallbackFormat: B,
1520
+ unresolving: M,
1521
+ postTranslation: P,
1522
+ processor: u,
1523
+ warnHtmlMessage: p,
1524
+ escapeParameter: A,
1525
+ messageCompiler: i,
1526
+ messageResolver: h,
1527
+ localeFallbacker: y,
1528
+ fallbackContext: b,
1529
+ onWarn: t,
1530
+ __meta: E
1531
+ };
1532
+ return g.datetimeFormats = f, g.numberFormats = v, g.__datetimeFormatters = m, g.__numberFormatters = T, __INTLIFY_PROD_DEVTOOLS__ && Or(g, n, E), g;
1533
+ }
1534
+ const Mt = (e) => ({ [e]: re() });
1535
+ function qt(e, t, n, s, o) {
1536
+ const { missing: l, onWarn: c } = e;
1537
+ if (l !== null) {
1538
+ const f = l(e, n, t, o);
1539
+ return W(f) ? f : 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 zr(e, t) {
1548
+ return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1549
+ }
1550
+ function Qr(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 (zr(e, t[s]))
1556
+ return !0;
1557
+ return !1;
1558
+ }
1559
+ function yn(e, ...t) {
1560
+ const { datetimeFormats: n, unresolving: s, fallbackLocale: o, onWarn: l, localeFallbacker: c } = e, { __datetimeFormatters: f } = e, [v, I, O, L] = Vt(...t), R = ue(O.missingWarn) ? O.missingWarn : e.missingWarn;
1561
+ ue(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1562
+ const U = !!O.part, B = Qt(e, O), M = c(
1563
+ e,
1564
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1565
+ o,
1566
+ B
1567
+ );
1568
+ if (!W(v) || v === "")
1569
+ return new Intl.DateTimeFormat(B, L).format(I);
1570
+ let P = {}, u, p = null;
1571
+ const A = "datetime format";
1572
+ for (let y = 0; y < M.length && (u = M[y], P = n[u] || {}, p = P[v], !ee(p)); y++)
1573
+ qt(e, v, u, R, A);
1574
+ if (!ee(p) || !W(u))
1575
+ return s ? kt : v;
1576
+ let i = `${u}__${v}`;
1577
+ Ct(L) || (i = `${i}__${JSON.stringify(L)}`);
1578
+ let h = f.get(i);
1579
+ return h || (h = new Intl.DateTimeFormat(u, he({}, p, L)), f.set(i, h)), U ? h.formatToParts(I) : h.format(I);
1580
+ }
1581
+ const $n = [
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 Vt(...e) {
1604
+ const [t, n, s, o] = e, l = re();
1605
+ let c = re(), f;
1606
+ if (W(t)) {
1607
+ const v = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1608
+ if (!v)
1609
+ throw je(Pe.INVALID_ISO_DATE_ARGUMENT);
1610
+ const I = v[3] ? v[3].trim().startsWith("T") ? `${v[1].trim()}${v[3].trim()}` : `${v[1].trim()}T${v[3].trim()}` : v[1].trim();
1611
+ f = new Date(I);
1612
+ try {
1613
+ f.toISOString();
1614
+ } catch {
1615
+ throw je(Pe.INVALID_ISO_DATE_ARGUMENT);
1616
+ }
1617
+ } else if (As(t)) {
1618
+ if (isNaN(t.getTime()))
1619
+ throw je(Pe.INVALID_DATE_ARGUMENT);
1620
+ f = t;
1621
+ } else if (ve(t))
1622
+ f = t;
1623
+ else
1624
+ throw je(Pe.INVALID_ARGUMENT);
1625
+ return W(n) ? l.key = n : ee(n) && Object.keys(n).forEach((v) => {
1626
+ $n.includes(v) ? c[v] = n[v] : l[v] = n[v];
1627
+ }), W(s) ? l.locale = s : ee(s) && (c = s), ee(o) && (c = o), [l.key || "", f, l, c];
1628
+ }
1629
+ function En(e, t, n) {
1630
+ const s = e;
1631
+ for (const o in n) {
1632
+ const l = `${t}__${o}`;
1633
+ s.__datetimeFormatters.has(l) && s.__datetimeFormatters.delete(l);
1634
+ }
1635
+ }
1636
+ function Nn(e, ...t) {
1637
+ const { numberFormats: n, unresolving: s, fallbackLocale: o, onWarn: l, localeFallbacker: c } = e, { __numberFormatters: f } = e, [v, I, O, L] = xt(...t), R = ue(O.missingWarn) ? O.missingWarn : e.missingWarn;
1638
+ ue(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1639
+ const U = !!O.part, B = Qt(e, O), M = c(
1640
+ e,
1641
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1642
+ o,
1643
+ B
1644
+ );
1645
+ if (!W(v) || v === "")
1646
+ return new Intl.NumberFormat(B, L).format(I);
1647
+ let P = {}, u, p = null;
1648
+ const A = "number format";
1649
+ for (let y = 0; y < M.length && (u = M[y], P = n[u] || {}, p = P[v], !ee(p)); y++)
1650
+ qt(e, v, u, R, A);
1651
+ if (!ee(p) || !W(u))
1652
+ return s ? kt : v;
1653
+ let i = `${u}__${v}`;
1654
+ Ct(L) || (i = `${i}__${JSON.stringify(L)}`);
1655
+ let h = f.get(i);
1656
+ return h || (h = new Intl.NumberFormat(u, he({}, p, L)), f.set(i, h)), U ? h.formatToParts(I) : h.format(I);
1657
+ }
1658
+ const Jn = [
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 xt(...e) {
1681
+ const [t, n, s, o] = e, l = re();
1682
+ let c = re();
1683
+ if (!ve(t))
1684
+ throw je(Pe.INVALID_ARGUMENT);
1685
+ const f = t;
1686
+ return W(n) ? l.key = n : ee(n) && Object.keys(n).forEach((v) => {
1687
+ Jn.includes(v) ? c[v] = n[v] : l[v] = n[v];
1688
+ }), W(s) ? l.locale = s : ee(s) && (c = s), ee(o) && (c = o), [l.key || "", f, l, c];
1689
+ }
1690
+ function Cn(e, t, n) {
1691
+ const s = e;
1692
+ for (const o in n) {
1693
+ const l = `${t}__${o}`;
1694
+ s.__numberFormatters.has(l) && s.__numberFormatters.delete(l);
1695
+ }
1696
+ }
1697
+ const qr = (e) => e, ea = (e) => "", ta = "text", na = (e) => e.length === 0 ? "" : Jt(e), sa = ws;
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 ra(e) {
1702
+ const t = ve(e.pluralIndex) ? e.pluralIndex : -1;
1703
+ return e.named && (ve(e.named.count) || ve(e.named.n)) ? ve(e.named.count) ? e.named.count : ve(e.named.n) ? e.named.n : t : t;
1704
+ }
1705
+ function aa(e, t) {
1706
+ t.count || (t.count = e), t.n || (t.n = e);
1707
+ }
1708
+ function la(e = {}) {
1709
+ const t = e.locale, n = ra(e), s = te(e.pluralRules) && W(t) && le(e.pluralRules[t]) ? e.pluralRules[t] : Tn, o = te(e.pluralRules) && W(t) && le(e.pluralRules[t]) ? Tn : void 0, l = (u) => u[s(n, u.length, o)], c = e.list || [], f = (u) => c[u], v = e.named || re();
1710
+ ve(e.pluralIndex) && aa(n, v);
1711
+ const I = (u) => v[u];
1712
+ function O(u, p) {
1713
+ const A = le(e.messages) ? e.messages(u, !!p) : te(e.messages) ? e.messages[u] : !1;
1714
+ return A || (e.parent ? e.parent.message(u) : ea);
1715
+ }
1716
+ const L = (u) => e.modifiers ? e.modifiers[u] : qr, R = ee(e.processor) && le(e.processor.normalize) ? e.processor.normalize : na, U = ee(e.processor) && le(e.processor.interpolate) ? e.processor.interpolate : sa, B = ee(e.processor) && W(e.processor.type) ? e.processor.type : ta, P = {
1717
+ list: f,
1718
+ named: I,
1719
+ plural: l,
1720
+ linked: (u, ...p) => {
1721
+ const [A, i] = p;
1722
+ let h = "text", y = "";
1723
+ p.length === 1 ? te(A) ? (y = A.modifier || y, h = A.type || h) : W(A) && (y = A || y) : p.length === 2 && (W(A) && (y = A || y), W(i) && (h = i || h));
1724
+ const b = O(u, !0)(P), w = (
1725
+ // The message in vnode resolved with linked are returned as an array by processor.nomalize
1726
+ h === "vnode" && _e(b) && y ? b[0] : b
1727
+ );
1728
+ return y ? L(y)(w, h) : w;
1729
+ },
1730
+ message: O,
1731
+ type: B,
1732
+ interpolate: U,
1733
+ normalize: R,
1734
+ values: he(re(), c, v)
1735
+ };
1736
+ return P;
1737
+ }
1738
+ const kn = () => "", Te = (e) => le(e);
1739
+ function On(e, ...t) {
1740
+ const { fallbackFormat: n, postTranslation: s, unresolving: o, messageCompiler: l, fallbackLocale: c, messages: f } = e, [v, I] = Gt(...t), O = ue(I.missingWarn) ? I.missingWarn : e.missingWarn, L = ue(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, R = ue(I.escapeParameter) ? I.escapeParameter : e.escapeParameter, U = !!I.resolvedMessage, B = W(I.default) || ue(I.default) ? ue(I.default) ? l ? v : () => v : I.default : n ? l ? v : () => v : null, M = n || B != null && (W(B) || le(B)), P = Qt(e, I);
1741
+ R && oa(I);
1742
+ let [u, p, A] = U ? [
1743
+ v,
1744
+ P,
1745
+ f[P] || re()
1746
+ ] : Kn(e, v, P, c, L, O), i = u, h = v;
1747
+ if (!U && !(W(i) || Qe(i) || Te(i)) && M && (i = B, h = i), !U && (!(W(i) || Qe(i) || Te(i)) || !W(p)))
1748
+ return o ? kt : v;
1749
+ let y = !1;
1750
+ const b = () => {
1751
+ y = !0;
1752
+ }, w = Te(i) ? i : zn(e, v, p, i, h, b);
1753
+ if (y)
1754
+ return i;
1755
+ const m = ua(e, p, A, I), T = la(m), E = ia(e, w, T), g = s ? s(E, v) : E;
1756
+ if (__INTLIFY_PROD_DEVTOOLS__) {
1757
+ const Y = {
1758
+ timestamp: Date.now(),
1759
+ key: W(v) ? v : Te(i) ? i.key : "",
1760
+ locale: p || (Te(i) ? i.locale : ""),
1761
+ format: W(i) ? i : Te(i) ? i.source : "",
1762
+ message: g
1763
+ };
1764
+ Y.meta = he({}, e.__meta, /* @__PURE__ */ $r() || {}), Rr(Y);
1765
+ }
1766
+ return g;
1767
+ }
1768
+ function oa(e) {
1769
+ _e(e.list) ? e.list = e.list.map((t) => W(t) ? cn(t) : t) : te(e.named) && Object.keys(e.named).forEach((t) => {
1770
+ W(e.named[t]) && (e.named[t] = cn(e.named[t]));
1771
+ });
1772
+ }
1773
+ function Kn(e, t, n, s, o, l) {
1774
+ const { messages: c, onWarn: f, messageResolver: v, localeFallbacker: I } = e, O = I(e, s, n);
1775
+ let L = re(), R, U = null;
1776
+ const B = "translate";
1777
+ for (let M = 0; M < O.length && (R = O[M], L = c[R] || re(), (U = v(L, t)) === null && (U = L[t]), !(W(U) || Qe(U) || Te(U))); M++)
1778
+ if (!Qr(R, O)) {
1779
+ const P = qt(
1780
+ e,
1781
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1782
+ t,
1783
+ R,
1784
+ l,
1785
+ B
1786
+ );
1787
+ P !== t && (U = P);
1788
+ }
1789
+ return [U, R, L];
1790
+ }
1791
+ function zn(e, t, n, s, o, l) {
1792
+ const { messageCompiler: c, warnHtmlMessage: f } = e;
1793
+ if (Te(s)) {
1794
+ const I = s;
1795
+ return I.locale = I.locale || n, I.key = I.key || t, I;
1796
+ }
1797
+ if (c == null) {
1798
+ const I = () => s;
1799
+ return I.locale = n, I.key = t, I;
1800
+ }
1801
+ const v = c(s, ca(e, n, o, s, f, l));
1802
+ return v.locale = n, v.key = t, v.source = s, v;
1803
+ }
1804
+ function ia(e, t, n) {
1805
+ return t(n);
1806
+ }
1807
+ function Gt(...e) {
1808
+ const [t, n, s] = e, o = re();
1809
+ if (!W(t) && !ve(t) && !Te(t) && !Qe(t))
1810
+ throw je(Pe.INVALID_ARGUMENT);
1811
+ const l = ve(t) ? String(t) : (Te(t), t);
1812
+ return ve(n) ? o.plural = n : W(n) ? o.default = n : ee(n) && !Ct(n) ? o.named = n : _e(n) && (o.list = n), ve(s) ? o.plural = s : W(s) ? o.default = s : ee(s) && he(o, s), [l, o];
1813
+ }
1814
+ function ca(e, t, n, s, o, l) {
1815
+ return {
1816
+ locale: t,
1817
+ key: n,
1818
+ warnHtmlMessage: o,
1819
+ onError: (c) => {
1820
+ throw l && l(c), c;
1821
+ },
1822
+ onCacheKey: (c) => Rs(t, n, c)
1823
+ };
1824
+ }
1825
+ function ua(e, t, n, s) {
1826
+ const { modifiers: o, pluralRules: l, messageResolver: c, fallbackLocale: f, fallbackWarn: v, missingWarn: I, fallbackContext: O } = e, R = {
1827
+ locale: t,
1828
+ modifiers: o,
1829
+ pluralRules: l,
1830
+ messages: (U, B) => {
1831
+ let M = c(n, U);
1832
+ if (M == null && (O || B)) {
1833
+ const [, , P] = Kn(
1834
+ O || e,
1835
+ // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1836
+ U,
1837
+ t,
1838
+ f,
1839
+ v,
1840
+ I
1841
+ );
1842
+ M = c(P, U);
1843
+ }
1844
+ if (W(M) || Qe(M)) {
1845
+ let P = !1;
1846
+ const p = zn(e, U, t, M, U, () => {
1847
+ P = !0;
1848
+ });
1849
+ return P ? kn : p;
1850
+ } else return Te(M) ? M : kn;
1851
+ }
1852
+ };
1853
+ return e.processor && (R.processor = e.processor), s.list && (R.list = s.list), s.named && (R.named = s.named), ve(s.plural) && (R.pluralIndex = s.plural), R;
1854
+ }
1855
+ or();
1856
+ var da = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_ee58dec3-0269-4304-baf3-df72ad41821d", 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_ee58dec3-0269-4304-baf3-df72ad41821d", 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: "1804", ACTIONS_ORCHESTRATION_ID: "e41b4f77-77e6-47c0-b934-4fe6f7f0ac3c.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_ee58dec3-0269-4304-baf3-df72ad41821d", 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:13478", 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: "30325690225", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "ec580a0ab71de6b4717a0f24f827697ed30588cc", 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/dev", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9kZXZcIixcIlBlcm1pc3Npb25cIjozfSx7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6MX1dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3ODUyMzEwODYsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc4NTIwODg4NiwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjVhYmUzZmQ1LTBiNWItNTE2Yi05OTA2LWZlMDgwMDc5MDEzZCIsImpvYl93b3JrZmxvd19yZWYiOiJmZWVkbWVwb3MvYWN0aW9ucy8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLW5wbS1naXRodWIueWFtbEByZWZzL2hlYWRzL21haW4iLCJqb2Jfd29ya2Zsb3dfc2hhIjoiYjY2NzFmYjU0YzE4MzA2NTFjMjhjZTA4MTc2OGRhZDUzY2UwZjliZSIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc4NTIwODU4Niwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJqdW4tbGVlLWZlZWRtZVwiLFwiYWN0b3JfaWRcIjpcIjIzOTI4Mjg2MlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI5MDE3MDUzMDU1NVwiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiYjY2NzFmYjU0YzE4MzA2NTFjMjhjZTA4MTc2OGRhZDUzY2UwZjliZVwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL2RldlwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCIzMDMyNTY5MDIyNVwiLFwicnVuX251bWJlclwiOlwiMTQyXCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiZWM1ODBhMGFiNzFkZTZiNDcxN2EwZjI0ZjgyNzY5N2VkMzA1ODhjY1wiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggaHJtLXBvcnRhbFwiLFwid29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvaHJtLXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcHVibGlzaC1ocm0tcG9ydGFsLXRydXN0ZWQueW1sQHJlZnMvaGVhZHMvZGV2XCIsXCJ3b3JrZmxvd19zaGFcIjpcImVjNTgwYTBhYjcxZGU2YjQ3MTdhMGYyNGY4Mjc2OTdlZDMwNTg4Y2NcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL2hybS1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL2RldiIsIm9yY2hfaWQiOiJlNDFiNGY3Ny03N2U2LTQ3YzAtYjkzNC00ZmU2ZjdmMGFjM2MucHVibGlzaC5wdWJsaXNoLl9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6ImU0MWI0Zjc3LTc3ZTYtNDdjMC1iOTM0LTRmZTZmN2YwYWMzYyIsInJlcG9zaXRvcnlfaWQiOiIxMTI0NjcyMjM1IiwicmVwb3NpdG9yeV9vd25lcl9pZCI6IjU0ODMxNTE1IiwicmVwb3NpdG9yeV92aXNpYmlsaXR5IjoicHJpdmF0ZSIsInJ1bl9pZCI6IjMwMzI1NjkwMjI1IiwicnVuX251bWJlciI6IjE0MiIsInJ1bl90eXBlIjoiZnVsbCIsInJ1bm5lcl9pZCI6IjEwMDAwOTgxNDIiLCJydW5uZXJfdHlwZSI6Imhvc3RlZCIsInNjcCI6IkFjdGlvbnMuUmVzdWx0czplNDFiNGY3Ny03N2U2LTQ3YzAtYjkzNC00ZmU2ZjdmMGFjM2M6NWFiZTNmZDUtMGI1Yi01MTZiLTk5MDYtZmUwODAwNzkwMTNkIEFjdGlvbnMuUnVubmVyOmU0MWI0Zjc3LTc3ZTYtNDdjMC1iOTM0LTRmZTZmN2YwYWMzYzo1YWJlM2ZkNS0wYjViLTUxNmItOTkwNi1mZTA4MDA3OTAxM2QgQWN0aW9ucy5VcGxvYWRBcnRpZmFjdHM6ZTQxYjRmNzctNzdlNi00N2MwLWI5MzQtNGZlNmY3ZjBhYzNjOjVhYmUzZmQ1LTBiNWItNTE2Yi05OTA2LWZlMDgwMDc5MDEzZCBnZW5lcmF0ZV9pZF90b2tlbjplNDFiNGY3Ny03N2U2LTQ3YzAtYjkzNC00ZmU2ZjdmMGFjM2M6NWFiZTNmZDUtMGI1Yi01MTZiLTk5MDYtZmUwODAwNzkwMTNkIEFjdGlvbnMuR2VuZXJpY1JlYWQ6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwic2hhIjoiZWM1ODBhMGFiNzFkZTZiNDcxN2EwZjI0ZjgyNzY5N2VkMzA1ODhjYyIsInRydXN0X3RpZXIiOiIxIn0.FTsjiENe95vT_ef081DS4QHk_SpJZMNnveG24aIYjyYBXKIiKJDmCEkC80hBFm9qMyt6JUMs2IE2sSnPt5PcchIJB7kzvbRC4-zNeLwuVAu5audB370OSssCKDo8Rw0gQOH5w_YQGbaBs-mcN_Hf1auXmMvSo4OkXZPnlSAYMrqVwXuC6O_qkcsuT8iC31INHJ9wXovdWgLa1bxdqTeGr1ExT7vaIdbNAjCLJO3DIDGPUlbrxT_udWNucSjKAoR87u_KGaQmh6Uo-I-LHaMRHtMOa3952UY-FhzMyxfsu4VZz6eJTRIv8Yc3Ofdm9ICd6Mp1VuBv9aWFn338oDKa6w", 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_2ed078dd-4525-4ebc-88a1-fde2e9e9afc7", INVOCATION_ID: "4954b1ce3260403a95255e52e762e704", 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: "142", 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 1000098142", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", 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.0-dev.3", 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: "ec580a0ab71de6b4717a0f24f827697ed30588cc", 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/dev", 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_ee58dec3-0269-4304-baf3-df72ad41821d", 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-3-azure-eastus.actions.githubusercontent.com/245//idtoken/e41b4f77-77e6-47c0-b934-4fe6f7f0ac3c/5abe3fd5-0b5b-516b-9906-fe080079013d?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_ee58dec3-0269-4304-baf3-df72ad41821d", 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_ee58dec3-0269-4304-baf3-df72ad41821d", 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_ee58dec3-0269-4304-baf3-df72ad41821d", 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 ma = "10.0.5";
1858
+ function fa() {
1859
+ typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ze().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ze().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ze().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ze().__INTLIFY_PROD_DEVTOOLS__ = !1);
1860
+ }
1861
+ const qe = {
1862
+ // composer module errors
1863
+ UNEXPECTED_RETURN_TYPE: Ar,
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 Tt(e, null, void 0);
1876
+ }
1877
+ const Wt = /* @__PURE__ */ Ye("__translateVNode"), Zt = /* @__PURE__ */ Ye("__datetimeParts"), Yt = /* @__PURE__ */ Ye("__numberParts"), _a = Ye("__setPluralRules"), Qn = /* @__PURE__ */ Ye("__injectWithOption"), Bt = /* @__PURE__ */ Ye("__dispose");
1878
+ function ut(e) {
1879
+ if (!te(e))
1880
+ return e;
1881
+ for (const t in e)
1882
+ if (Ae(e, t))
1883
+ if (!t.includes("."))
1884
+ te(e[t]) && ut(e[t]);
1885
+ else {
1886
+ const n = t.split("."), s = n.length - 1;
1887
+ let o = e, l = !1;
1888
+ for (let c = 0; c < s; c++) {
1889
+ if (n[c] in o || (o[n[c]] = re()), !te(o[n[c]])) {
1890
+ l = !0;
1891
+ break;
1892
+ }
1893
+ o = o[n[c]];
1894
+ }
1895
+ l || (o[n[s]] = e[t], delete e[t]), te(o[n[s]]) && ut(o[n[s]]);
1896
+ }
1897
+ return e;
1898
+ }
1899
+ function qn(e, t) {
1900
+ const { messages: n, __i18n: s, messageResolver: o, flatJson: l } = t, c = ee(n) ? n : _e(s) ? re() : { [e]: re() };
1901
+ if (_e(s) && s.forEach((f) => {
1902
+ if ("locale" in f && "resource" in f) {
1903
+ const { locale: v, resource: I } = f;
1904
+ v ? (c[v] = c[v] || re(), yt(I, c[v])) : yt(I, c);
1905
+ } else
1906
+ W(f) && yt(JSON.parse(f), c);
1907
+ }), o == null && l)
1908
+ for (const f in c)
1909
+ Ae(c, f) && ut(c[f]);
1910
+ return c;
1911
+ }
1912
+ function es(e) {
1913
+ return e.type;
1914
+ }
1915
+ function pa(e, t, n) {
1916
+ let s = te(t.messages) ? t.messages : re();
1917
+ "__i18nGlobal" in n && (s = qn(e.locale.value, {
1918
+ messages: s,
1919
+ __i18n: n.__i18nGlobal
1920
+ }));
1921
+ const o = Object.keys(s);
1922
+ o.length && o.forEach((l) => {
1923
+ e.mergeLocaleMessage(l, s[l]);
1924
+ });
1925
+ {
1926
+ if (te(t.datetimeFormats)) {
1927
+ const l = Object.keys(t.datetimeFormats);
1928
+ l.length && l.forEach((c) => {
1929
+ e.mergeDateTimeFormat(c, t.datetimeFormats[c]);
1930
+ });
1931
+ }
1932
+ if (te(t.numberFormats)) {
1933
+ const l = Object.keys(t.numberFormats);
1934
+ l.length && l.forEach((c) => {
1935
+ e.mergeNumberFormat(c, t.numberFormats[c]);
1936
+ });
1937
+ }
1938
+ }
1939
+ }
1940
+ function Rn(e) {
1941
+ return ie(is, null, e, 0);
1942
+ }
1943
+ const Ln = "__INTLIFY_META__", An = () => [], ba = () => !1;
1944
+ let Sn = 0;
1945
+ function Dn(e) {
1946
+ return (t, n, s, o) => e(n, s, Xt() || void 0, o);
1947
+ }
1948
+ const va = /* @__NO_SIDE_EFFECTS__ */ () => {
1949
+ const e = Xt();
1950
+ let t = null;
1951
+ return e && (t = es(e)[Ln]) ? { [Ln]: t } : null;
1952
+ };
1953
+ function ha(e = {}) {
1954
+ const { __root: t, __injectWithOption: n } = e, s = t === void 0, o = e.flatJson, l = ln ? dt : ls;
1955
+ let c = ue(e.inheritLocale) ? e.inheritLocale : !0;
1956
+ const f = l(
1957
+ // prettier-ignore
1958
+ t && c ? t.locale.value : W(e.locale) ? e.locale : Nt
1959
+ ), v = l(
1960
+ // prettier-ignore
1961
+ t && c ? t.fallbackLocale.value : W(e.fallbackLocale) || _e(e.fallbackLocale) || ee(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : f.value
1962
+ ), I = l(qn(f.value, e)), O = l(ee(e.datetimeFormats) ? e.datetimeFormats : { [f.value]: {} }), L = l(ee(e.numberFormats) ? e.numberFormats : { [f.value]: {} });
1963
+ let R = t ? t.missingWarn : ue(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, U = t ? t.fallbackWarn : ue(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, B = t ? t.fallbackRoot : ue(e.fallbackRoot) ? e.fallbackRoot : !0, M = !!e.fallbackFormat, P = le(e.missing) ? e.missing : null, u = le(e.missing) ? Dn(e.missing) : null, p = le(e.postTranslation) ? e.postTranslation : null, A = t ? t.warnHtmlMessage : ue(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, i = !!e.escapeParameter;
1964
+ const h = t ? t.modifiers : ee(e.modifiers) ? e.modifiers : {};
1965
+ let y = e.pluralRules || t && t.pluralRules, b;
1966
+ b = (() => {
1967
+ s && gn(null);
1968
+ const _ = {
1969
+ version: ma,
1970
+ locale: f.value,
1971
+ fallbackLocale: v.value,
1972
+ messages: I.value,
1973
+ modifiers: h,
1974
+ pluralRules: y,
1975
+ missing: u === null ? void 0 : u,
1976
+ missingWarn: R,
1977
+ fallbackWarn: U,
1978
+ fallbackFormat: M,
1979
+ unresolving: !0,
1980
+ postTranslation: p === null ? void 0 : p,
1981
+ warnHtmlMessage: A,
1982
+ escapeParameter: i,
1983
+ messageResolver: e.messageResolver,
1984
+ messageCompiler: e.messageCompiler,
1985
+ __meta: { framework: "vue" }
1986
+ };
1987
+ _.datetimeFormats = O.value, _.numberFormats = L.value, _.__datetimeFormatters = ee(b) ? b.__datetimeFormatters : void 0, _.__numberFormatters = ee(b) ? b.__numberFormatters : void 0;
1988
+ const k = Kr(_);
1989
+ return s && gn(k), k;
1990
+ })(), at(b, f.value, v.value);
1991
+ function m() {
1992
+ return [
1993
+ f.value,
1994
+ v.value,
1995
+ I.value,
1996
+ O.value,
1997
+ L.value
1998
+ ];
1999
+ }
2000
+ const T = Q({
2001
+ get: () => f.value,
2002
+ set: (_) => {
2003
+ f.value = _, b.locale = f.value;
2004
+ }
2005
+ }), E = Q({
2006
+ get: () => v.value,
2007
+ set: (_) => {
2008
+ v.value = _, b.fallbackLocale = v.value, at(b, f.value, _);
2009
+ }
2010
+ }), g = Q(() => I.value), Y = /* @__PURE__ */ Q(() => O.value), H = /* @__PURE__ */ Q(() => L.value);
2011
+ function Z() {
2012
+ return le(p) ? p : null;
2013
+ }
2014
+ function V(_) {
2015
+ p = _, b.postTranslation = _;
2016
+ }
2017
+ function j() {
2018
+ return P;
2019
+ }
2020
+ function $(_) {
2021
+ _ !== null && (u = Dn(_)), P = _, b.missing = u;
2022
+ }
2023
+ const K = (_, k, G, q, Ee, Be) => {
2024
+ m();
2025
+ let Xe;
2026
+ try {
2027
+ da.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (b.fallbackContext = t ? Jr() : void 0), Xe = _(b);
2028
+ } finally {
2029
+ __INTLIFY_PROD_DEVTOOLS__, s || (b.fallbackContext = void 0);
2030
+ }
2031
+ if (G !== "translate exists" && // for not `te` (e.g `t`)
2032
+ ve(Xe) && Xe === kt || G === "translate exists" && !Xe) {
2033
+ const [rs, vl] = k();
2034
+ return t && B ? q(t) : Ee(rs);
2035
+ } else {
2036
+ if (Be(Xe))
2037
+ return Xe;
2038
+ throw ct(qe.UNEXPECTED_RETURN_TYPE);
2039
+ }
2040
+ };
2041
+ function me(..._) {
2042
+ return K((k) => Reflect.apply(On, null, [k, ..._]), () => Gt(..._), "translate", (k) => Reflect.apply(k.t, k, [..._]), (k) => k, (k) => W(k));
2043
+ }
2044
+ function pe(..._) {
2045
+ const [k, G, q] = _;
2046
+ if (q && !te(q))
2047
+ throw ct(qe.INVALID_ARGUMENT);
2048
+ return me(k, G, he({ resolvedMessage: !0 }, q || {}));
2049
+ }
2050
+ function Ne(..._) {
2051
+ return K((k) => Reflect.apply(yn, null, [k, ..._]), () => Vt(..._), "datetime format", (k) => Reflect.apply(k.d, k, [..._]), () => vn, (k) => W(k));
2052
+ }
2053
+ function be(..._) {
2054
+ return K((k) => Reflect.apply(Nn, null, [k, ..._]), () => xt(..._), "number format", (k) => Reflect.apply(k.n, k, [..._]), () => vn, (k) => W(k));
2055
+ }
2056
+ function ge(_) {
2057
+ return _.map((k) => W(k) || ve(k) || ue(k) ? Rn(String(k)) : k);
2058
+ }
2059
+ const z = {
2060
+ normalize: ge,
2061
+ interpolate: (_) => _,
2062
+ type: "vnode"
2063
+ };
2064
+ function oe(..._) {
2065
+ return K((k) => {
2066
+ let G;
2067
+ const q = k;
2068
+ try {
2069
+ q.processor = z, G = Reflect.apply(On, null, [q, ..._]);
2070
+ } finally {
2071
+ q.processor = null;
2072
+ }
2073
+ return G;
2074
+ }, () => Gt(..._), "translate", (k) => k[Wt](..._), (k) => [Rn(k)], (k) => _e(k));
2075
+ }
2076
+ function We(..._) {
2077
+ return K((k) => Reflect.apply(Nn, null, [k, ..._]), () => xt(..._), "number format", (k) => k[Yt](..._), An, (k) => W(k) || _e(k));
2078
+ }
2079
+ function tt(..._) {
2080
+ return K((k) => Reflect.apply(yn, null, [k, ..._]), () => Vt(..._), "datetime format", (k) => k[Zt](..._), An, (k) => W(k) || _e(k));
2081
+ }
2082
+ function nt(_) {
2083
+ y = _, b.pluralRules = y;
2084
+ }
2085
+ function st(_, k) {
2086
+ return K(() => {
2087
+ if (!_)
2088
+ return !1;
2089
+ const G = W(k) ? k : f.value, q = Ue(G), Ee = b.messageResolver(q, _);
2090
+ return Qe(Ee) || Te(Ee) || W(Ee);
2091
+ }, () => [_], "translate exists", (G) => Reflect.apply(G.te, G, [_, k]), ba, (G) => ue(G));
2092
+ }
2093
+ function rt(_) {
2094
+ let k = null;
2095
+ const G = Wn(b, v.value, f.value);
2096
+ for (let q = 0; q < G.length; q++) {
2097
+ const Ee = I.value[G[q]] || {}, Be = b.messageResolver(Ee, _);
2098
+ if (Be != null) {
2099
+ k = Be;
2100
+ break;
2101
+ }
2102
+ }
2103
+ return k;
2104
+ }
2105
+ function ke(_) {
2106
+ const k = rt(_);
2107
+ return k ?? (t ? t.tm(_) || {} : {});
2108
+ }
2109
+ function Ue(_) {
2110
+ return I.value[_] || {};
2111
+ }
2112
+ function C(_, k) {
2113
+ if (o) {
2114
+ const G = { [_]: k };
2115
+ for (const q in G)
2116
+ Ae(G, q) && ut(G[q]);
2117
+ k = G[_];
2118
+ }
2119
+ I.value[_] = k, b.messages = I.value;
2120
+ }
2121
+ function N(_, k) {
2122
+ I.value[_] = I.value[_] || {};
2123
+ const G = { [_]: k };
2124
+ if (o)
2125
+ for (const q in G)
2126
+ Ae(G, q) && ut(G[q]);
2127
+ k = G[_], yt(k, I.value[_]), b.messages = I.value;
2128
+ }
2129
+ function S(_) {
2130
+ return O.value[_] || {};
2131
+ }
2132
+ function r(_, k) {
2133
+ O.value[_] = k, b.datetimeFormats = O.value, En(b, _, k);
2134
+ }
2135
+ function a(_, k) {
2136
+ O.value[_] = he(O.value[_] || {}, k), b.datetimeFormats = O.value, En(b, _, k);
2137
+ }
2138
+ function d(_) {
2139
+ return L.value[_] || {};
2140
+ }
2141
+ function F(_, k) {
2142
+ L.value[_] = k, b.numberFormats = L.value, Cn(b, _, k);
2143
+ }
2144
+ function D(_, k) {
2145
+ L.value[_] = he(L.value[_] || {}, k), b.numberFormats = L.value, Cn(b, _, k);
2146
+ }
2147
+ Sn++, t && ln && (Ft(t.locale, (_) => {
2148
+ c && (f.value = _, b.locale = _, at(b, f.value, v.value));
2149
+ }), Ft(t.fallbackLocale, (_) => {
2150
+ c && (v.value = _, b.fallbackLocale = _, at(b, f.value, v.value));
2151
+ }));
2152
+ const x = {
2153
+ id: Sn,
2154
+ locale: T,
2155
+ fallbackLocale: E,
2156
+ get inheritLocale() {
2157
+ return c;
2158
+ },
2159
+ set inheritLocale(_) {
2160
+ c = _, _ && t && (f.value = t.locale.value, v.value = t.fallbackLocale.value, at(b, f.value, v.value));
2161
+ },
2162
+ get availableLocales() {
2163
+ return Object.keys(I.value).sort();
2164
+ },
2165
+ messages: g,
2166
+ get modifiers() {
2167
+ return h;
2168
+ },
2169
+ get pluralRules() {
2170
+ return y || {};
2171
+ },
2172
+ get isGlobal() {
2173
+ return s;
2174
+ },
2175
+ get missingWarn() {
2176
+ return R;
2177
+ },
2178
+ set missingWarn(_) {
2179
+ R = _, b.missingWarn = R;
2180
+ },
2181
+ get fallbackWarn() {
2182
+ return U;
2183
+ },
2184
+ set fallbackWarn(_) {
2185
+ U = _, b.fallbackWarn = U;
2186
+ },
2187
+ get fallbackRoot() {
2188
+ return B;
2189
+ },
2190
+ set fallbackRoot(_) {
2191
+ B = _;
2192
+ },
2193
+ get fallbackFormat() {
2194
+ return M;
2195
+ },
2196
+ set fallbackFormat(_) {
2197
+ M = _, b.fallbackFormat = M;
2198
+ },
2199
+ get warnHtmlMessage() {
2200
+ return A;
2201
+ },
2202
+ set warnHtmlMessage(_) {
2203
+ A = _, b.warnHtmlMessage = _;
2204
+ },
2205
+ get escapeParameter() {
2206
+ return i;
2207
+ },
2208
+ set escapeParameter(_) {
2209
+ i = _, b.escapeParameter = _;
2210
+ },
2211
+ t: me,
2212
+ getLocaleMessage: Ue,
2213
+ setLocaleMessage: C,
2214
+ mergeLocaleMessage: N,
2215
+ getPostTranslationHandler: Z,
2216
+ setPostTranslationHandler: V,
2217
+ getMissingHandler: j,
2218
+ setMissingHandler: $,
2219
+ [_a]: nt
2220
+ };
2221
+ return x.datetimeFormats = Y, x.numberFormats = H, x.rt = pe, x.te = st, x.tm = ke, x.d = Ne, x.n = be, x.getDateTimeFormat = S, x.setDateTimeFormat = r, x.mergeDateTimeFormat = a, x.getNumberFormat = d, x.setNumberFormat = F, x.mergeNumberFormat = D, x[Qn] = n, x[Wt] = oe, x[Zt] = tt, x[Yt] = We, x;
2222
+ }
2223
+ const en = {
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 ga({ 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 === Oe ? o.children : [o]
2246
+ ], []) : t.reduce((n, s) => {
2247
+ const o = e[s];
2248
+ return o && (n[s] = o()), n;
2249
+ }, re());
2250
+ }
2251
+ function ts() {
2252
+ return Oe;
2253
+ }
2254
+ he({
2255
+ keypath: {
2256
+ type: String,
2257
+ required: !0
2258
+ },
2259
+ plural: {
2260
+ type: [Number, String],
2261
+ validator: (e) => ve(e) || !isNaN(e)
2262
+ }
2263
+ }, en);
2264
+ function Ia(e) {
2265
+ return _e(e) && !W(e[0]);
2266
+ }
2267
+ function ns(e, t, n, s) {
2268
+ const { slots: o, attrs: l } = t;
2269
+ return () => {
2270
+ const c = { part: !0 };
2271
+ let f = re();
2272
+ e.locale && (c.locale = e.locale), W(e.format) ? c.key = e.format : te(e.format) && (W(e.format.key) && (c.key = e.format.key), f = Object.keys(e.format).reduce((R, U) => n.includes(U) ? he(re(), R, { [U]: e.format[U] }) : R, re()));
2273
+ const v = s(e.value, c, f);
2274
+ let I = [c.key];
2275
+ _e(v) ? I = v.map((R, U) => {
2276
+ const B = o[R.type], M = B ? B({ [R.type]: R.value, index: U, parts: v }) : [R.value];
2277
+ return Ia(M) && (M[0].key = `${R.type}-${U}`), M;
2278
+ }) : W(v) && (I = [v]);
2279
+ const O = he(re(), l), L = W(e.tag) || te(e.tag) ? e.tag : ts();
2280
+ return Un(L, O, I);
2281
+ };
2282
+ }
2283
+ he({
2284
+ value: {
2285
+ type: Number,
2286
+ required: !0
2287
+ },
2288
+ format: {
2289
+ type: [String, Object]
2290
+ }
2291
+ }, en);
2292
+ he({
2293
+ value: {
2294
+ type: [Number, Date],
2295
+ required: !0
2296
+ },
2297
+ format: {
2298
+ type: [String, Object]
2299
+ }
2300
+ }, en);
2301
+ const ya = /* @__PURE__ */ Ye("global-vue-i18n");
2302
+ function Ot(e = {}) {
2303
+ const t = Xt();
2304
+ if (t == null)
2305
+ throw ct(qe.MUST_BE_CALL_SETUP_TOP);
2306
+ if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2307
+ throw ct(qe.NOT_INSTALLED);
2308
+ const n = Ea(t), s = Ca(n), o = es(t), l = Na(e, o);
2309
+ if (l === "global")
2310
+ return pa(s, e, o), s;
2311
+ if (l === "parent") {
2312
+ let v = Ta(n, t, e.__useComponent);
2313
+ return v == null && (v = s), v;
2314
+ }
2315
+ const c = n;
2316
+ let f = c.__getInstance(t);
2317
+ if (f == null) {
2318
+ const v = he({}, e);
2319
+ "__i18n" in o && (v.__i18n = o.__i18n), s && (v.__root = s), f = ha(v), c.__composerExtend && (f[Bt] = c.__composerExtend(f)), Oa(c, t, f), c.__setInstance(t, f);
2320
+ }
2321
+ return f;
2322
+ }
2323
+ function Ea(e) {
2324
+ const t = as(e.isCE ? ya : e.appContext.app.__VUE_I18N_SYMBOL__);
2325
+ if (!t)
2326
+ throw ct(e.isCE ? qe.NOT_INSTALLED_WITH_PROVIDE : qe.UNEXPECTED_ERROR);
2327
+ return t;
2328
+ }
2329
+ function Na(e, t) {
2330
+ return Ct(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2331
+ }
2332
+ function Ca(e) {
2333
+ return e.mode === "composition" ? e.global : e.global.__composer;
2334
+ }
2335
+ function Ta(e, t, n = !1) {
2336
+ let s = null;
2337
+ const o = t.root;
2338
+ let l = ka(t, n);
2339
+ for (; l != null; ) {
2340
+ const c = e;
2341
+ if (e.mode === "composition")
2342
+ s = c.__getInstance(l);
2343
+ else if (__VUE_I18N_LEGACY_API__) {
2344
+ const f = c.__getInstance(l);
2345
+ f != null && (s = f.__composer, n && s && !s[Qn] && (s = null));
2346
+ }
2347
+ if (s != null || o === l)
2348
+ break;
2349
+ l = l.parent;
2350
+ }
2351
+ return s;
2352
+ }
2353
+ function ka(e, t = !1) {
2354
+ return e == null ? null : t && e.vnode.ctx || e.parent;
2355
+ }
2356
+ function Oa(e, t, n) {
2357
+ jn(() => {
2358
+ }, t), os(() => {
2359
+ const s = n;
2360
+ e.__deleteInstance(t);
2361
+ const o = s[Bt];
2362
+ o && (o(), delete s[Bt]);
2363
+ }, t);
2364
+ }
2365
+ fa();
2366
+ Yr(Tr);
2367
+ Br(Gr);
2368
+ Xr(Wn);
2369
+ if (__INTLIFY_PROD_DEVTOOLS__) {
2370
+ const e = Ze();
2371
+ e.__INTLIFY__ = !0, kr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2372
+ }
2373
+ const pt = /* @__PURE__ */ we({
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 = Me("FmIcon"), l = Me("FmTooltip");
2385
+ return J(), Se(l, {
2386
+ variant: "plain",
2387
+ placement: "right",
2388
+ "z-index": 50
2389
+ }, {
2390
+ content: de(() => [
2391
+ se("div", null, Ce(X(t)("team.memberForm.permissions.inherited")), 1),
2392
+ (J(!0), ae(Oe, null, ye(e.item.setNames, (c) => (J(), ae("div", { key: c }, [
2393
+ se("div", null, "- " + Ce(c), 1)
2394
+ ]))), 128))
2395
+ ]),
2396
+ default: de(() => [
2397
+ ie(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 Mn(e, t, n) {
2409
+ const s = n.filter((f) => f !== "manage");
2410
+ if (s.length === 0) return;
2411
+ const o = e.findIndex((f) => f.subject === t && !f.inverted);
2412
+ if (o < 0) return;
2413
+ const l = new Set(e[o].actions), c = s.every((f) => l.has(f));
2414
+ c && !l.has("manage") ? (l.add("manage"), e[o] = {
2415
+ ...e[o],
2416
+ actions: Array.from(l)
2417
+ }) : !c && l.has("manage") && (l.delete("manage"), l.size === 0 ? e.splice(o, 1) : e[o] = {
2418
+ ...e[o],
2419
+ actions: Array.from(l)
2420
+ });
2421
+ }
2422
+ const wn = Object.values(ys), Ra = {
2423
+ read: "View",
2424
+ create: "Duplicate",
2425
+ update: "Edit"
2426
+ };
2427
+ function La(e, t, n, s) {
2428
+ const { t: o } = et(), { getFlagValue: l, getFlag: c } = Is(), f = Q(() => {
2429
+ var Y;
2430
+ const m = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
2431
+ for (const H of t.value) {
2432
+ const Z = H.category;
2433
+ if (!Z) continue;
2434
+ const V = H.subject;
2435
+ if (n.value.includes(H.subject) || H.showByFeatureFlag && ((Y = c(H.showByFeatureFlag)) == null ? void 0 : Y.enabled) === !1 && l(H.showByFeatureFlag) === "true")
2436
+ continue;
2437
+ m.has(Z) || m.set(Z, []);
2438
+ const j = E.get(V) ?? 0;
2439
+ E.set(V, j + 1), m.get(Z).push({
2440
+ label: o(`permissionSet.permissionLabels.${V}`, H.label),
2441
+ value: V,
2442
+ optionKey: `${V}::${j}`
2443
+ }), T.has(V) || T.set(V, H);
2444
+ }
2445
+ return [...m.keys()].sort((H, Z) => {
2446
+ const V = wn.indexOf(H), j = wn.indexOf(Z);
2447
+ return V === -1 && j === -1 ? H.localeCompare(Z) : V === -1 ? 1 : j === -1 ? -1 : V - j;
2448
+ }).map((H) => {
2449
+ const Z = m.get(H), V = o(`permissionSet.categoryLabels.${H}`, H), j = /* @__PURE__ */ new Map();
2450
+ for (const z of Z) {
2451
+ const oe = T.get(z.value);
2452
+ oe && j.set(z.value, oe.actions);
2453
+ }
2454
+ const $ = Z.some((z) => {
2455
+ const oe = j.get(z.value);
2456
+ return oe && oe.length > 1;
2457
+ }), K = $ ? [
2458
+ ...new Set(
2459
+ Z.flatMap((z) => j.get(z.value) ?? []).filter((z) => z !== "manage")
2460
+ )
2461
+ ] : [], me = /* @__PURE__ */ new Map();
2462
+ for (const z of e.value)
2463
+ Z.some((oe) => oe.value === z.subject) && !z.inverted && me.set(z.subject, new Set(z.actions));
2464
+ const pe = $ ? e.value.filter(
2465
+ (z) => Z.some((oe) => oe.value === z.subject) && !z.inverted && z.actions.includes("manage")
2466
+ ).map((z) => z.subject) : e.value.filter((z) => Z.some((oe) => oe.value === z.subject) && !z.inverted).map((z) => z.subject), Ne = Z.find((z) => {
2467
+ var oe;
2468
+ return (oe = T.get(z.value)) == null ? void 0 : oe.isCategoryCover;
2469
+ }), be = (Ne == null ? void 0 : Ne.value) ?? null, ge = be ? me.get(be) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), ce = ge.has("manage");
2470
+ return {
2471
+ category: H,
2472
+ label: V,
2473
+ options: Z,
2474
+ selectedSubjects: pe,
2475
+ isMultiAction: $,
2476
+ actionColumns: K,
2477
+ permissionActionsMap: j,
2478
+ selectedActionsMap: me,
2479
+ coverSubject: be,
2480
+ coverSelectedActions: ge,
2481
+ coverCoversAll: ce
2482
+ };
2483
+ });
2484
+ });
2485
+ function v(m, T) {
2486
+ var V;
2487
+ const E = ((V = f.value.find((j) => j.category === m)) == null ? void 0 : V.options) ?? [], g = new Set(E.map((j) => j.value)), Y = new Set(T), H = /* @__PURE__ */ new Set(), Z = t.value.flatMap(
2488
+ ({ category: j, showByFeatureFlag: $, isCategoryCover: K, ...me }) => {
2489
+ const pe = me.subject;
2490
+ return !Y.has(pe) || H.has(pe) ? [] : (H.add(pe), [me]);
2491
+ }
2492
+ );
2493
+ s("update:model-value", [
2494
+ ...e.value.filter((j) => !g.has(j.subject)),
2495
+ ...Z
2496
+ ]);
2497
+ }
2498
+ function I(m) {
2499
+ return m.options.length > 0 && m.options.every((T) => m.selectedSubjects.includes(T.value));
2500
+ }
2501
+ function O(m) {
2502
+ if (m.options.length === 0) return !1;
2503
+ const T = m.options.filter(
2504
+ (E) => m.selectedSubjects.includes(E.value)
2505
+ ).length;
2506
+ return T > 0 && T < m.options.length;
2507
+ }
2508
+ function L(m) {
2509
+ const T = new Set(m.options.map((g) => g.value)), E = e.value.filter((g) => !T.has(g.subject));
2510
+ if (I(m))
2511
+ s("update:model-value", E);
2512
+ else {
2513
+ const g = /* @__PURE__ */ new Set(), Y = t.value.flatMap(
2514
+ ({ category: H, showByFeatureFlag: Z, isCategoryCover: V, ...j }) => {
2515
+ const $ = j.subject;
2516
+ return !T.has($) || g.has($) ? [] : (g.add($), [j]);
2517
+ }
2518
+ );
2519
+ s("update:model-value", [...E, ...Y]);
2520
+ }
2521
+ }
2522
+ function R(m, T) {
2523
+ const E = m.selectedActionsMap.get(T);
2524
+ return E ? E.has("manage") : !1;
2525
+ }
2526
+ function U(m, T) {
2527
+ const E = m.permissionActionsMap.get(T);
2528
+ if (!E) return !1;
2529
+ const g = E.filter((Z) => Z !== "manage");
2530
+ if (g.length === 0) return !1;
2531
+ const Y = m.selectedActionsMap.get(T);
2532
+ if (!Y) return !1;
2533
+ const H = g.filter((Z) => Y.has(Z));
2534
+ return H.length > 0 && H.length < g.length;
2535
+ }
2536
+ function B(m, T, E) {
2537
+ if (E) {
2538
+ const g = t.value.find(($) => $.subject === T);
2539
+ if (!g) return;
2540
+ const {
2541
+ category: Y,
2542
+ showByFeatureFlag: H,
2543
+ isCategoryCover: Z,
2544
+ ...V
2545
+ } = g, j = e.value.filter(($) => $.subject !== T);
2546
+ j.push(V), s("update:model-value", j);
2547
+ } else
2548
+ s(
2549
+ "update:model-value",
2550
+ e.value.filter((g) => g.subject !== T)
2551
+ );
2552
+ }
2553
+ function M(m, T) {
2554
+ const E = m.permissionActionsMap.get(T);
2555
+ return E ? E.some((g) => g !== "manage") : !1;
2556
+ }
2557
+ function P(m, T, E) {
2558
+ const g = m.selectedActionsMap.get(T);
2559
+ return g ? g.has(E) : !1;
2560
+ }
2561
+ function u(m, T) {
2562
+ return !m.coverSubject || T === m.coverSubject ? !1 : m.coverCoversAll;
2563
+ }
2564
+ function p(m, T, E) {
2565
+ return !m.coverSubject || T === m.coverSubject ? !1 : m.coverCoversAll ? !0 : m.coverSelectedActions.has(E);
2566
+ }
2567
+ function A(m, T, E) {
2568
+ const g = m.permissionActionsMap.get(T);
2569
+ return g ? g.includes(E) : !1;
2570
+ }
2571
+ function i(m, T, E) {
2572
+ const g = [...e.value], Y = g.findIndex((Z) => Z.subject === m && !Z.inverted);
2573
+ if (E)
2574
+ if (Y >= 0) {
2575
+ const Z = { ...g[Y] }, V = new Set(Z.actions);
2576
+ V.add(T), Z.actions = Array.from(V), g[Y] = Z;
2577
+ } else {
2578
+ const Z = t.value.find((me) => me.subject === m);
2579
+ if (!Z) return;
2580
+ const {
2581
+ category: V,
2582
+ showByFeatureFlag: j,
2583
+ isCategoryCover: $,
2584
+ ...K
2585
+ } = Z;
2586
+ g.push({ ...K, actions: [T] });
2587
+ }
2588
+ else if (Y >= 0) {
2589
+ const Z = { ...g[Y] }, V = Z.actions.filter((j) => j !== T);
2590
+ V.length === 0 ? g.splice(Y, 1) : (Z.actions = V, g[Y] = Z);
2591
+ }
2592
+ const H = t.value.find((Z) => Z.subject === m);
2593
+ H && Mn(g, m, H.actions), s("update:model-value", g);
2594
+ }
2595
+ function h(m, T) {
2596
+ const E = m.options.filter(
2597
+ (g) => A(m, g.value, T)
2598
+ );
2599
+ return E.length === 0 ? !1 : E.every(
2600
+ (g) => P(m, g.value, T) || p(m, g.value, T)
2601
+ );
2602
+ }
2603
+ function y(m, T) {
2604
+ const E = m.options.filter(
2605
+ (Y) => A(m, Y.value, T)
2606
+ );
2607
+ if (E.length === 0) return !1;
2608
+ const g = E.filter(
2609
+ (Y) => P(m, Y.value, T) || p(m, Y.value, T)
2610
+ ).length;
2611
+ return g > 0 && g < E.length;
2612
+ }
2613
+ function b(m, T, E) {
2614
+ const g = [...e.value];
2615
+ for (const Y of m.options) {
2616
+ if (!A(m, Y.value, T)) continue;
2617
+ const H = Y.value, Z = g.findIndex(
2618
+ (j) => j.subject === H && !j.inverted
2619
+ );
2620
+ if (E)
2621
+ if (Z >= 0) {
2622
+ const j = { ...g[Z] }, $ = new Set(j.actions);
2623
+ $.add(T), j.actions = Array.from($), g[Z] = j;
2624
+ } else {
2625
+ const j = t.value.find((Ne) => Ne.subject === H);
2626
+ if (!j) continue;
2627
+ const {
2628
+ category: $,
2629
+ showByFeatureFlag: K,
2630
+ isCategoryCover: me,
2631
+ ...pe
2632
+ } = j;
2633
+ g.push({ ...pe, actions: [T] });
2634
+ }
2635
+ else if (Z >= 0) {
2636
+ const j = { ...g[Z] }, $ = j.actions.filter((K) => K !== T);
2637
+ $.length === 0 ? g.splice(Z, 1) : (j.actions = $, g[Z] = j);
2638
+ }
2639
+ const V = t.value.find((j) => j.subject === H);
2640
+ V && Mn(g, H, V.actions);
2641
+ }
2642
+ s("update:model-value", g);
2643
+ }
2644
+ function w(m) {
2645
+ const T = `permissionSet.actionLabels.${m}`, E = Ra[m] ?? m.charAt(0).toUpperCase() + m.slice(1);
2646
+ return o(T, E);
2647
+ }
2648
+ return {
2649
+ categoryGroups: f,
2650
+ toggleCategory: v,
2651
+ isAllManageChecked: I,
2652
+ isAllManageIndeterminate: O,
2653
+ toggleAllManage: L,
2654
+ isManageChecked: R,
2655
+ isManageIndeterminate: U,
2656
+ toggleManage: B,
2657
+ hasNonManageActions: M,
2658
+ isActionChecked: P,
2659
+ isRowFullyCoveredByCover: u,
2660
+ isActionCoveredByCover: p,
2661
+ permissionDefinesAction: A,
2662
+ toggleAction: i,
2663
+ isAllActionChecked: h,
2664
+ isAllActionIndeterminate: y,
2665
+ toggleAllAction: b,
2666
+ actionLabel: w
2667
+ };
2668
+ }
2669
+ const Aa = { class: "flex flex-col gap-16" }, Sa = { class: "fm-typo-en-title-sm-600" }, Da = { class: "mt-16" }, Ma = { class: "text-center text-sm font-semibold text-fm-color-typo-primary" }, wa = ["onClick"], Fa = { class: "flex justify-center" }, Pa = { class: "flex items-center min-w-0 gap-8" }, ja = ["title", "onClick"], Ua = { class: "flex justify-center" }, Va = /* @__PURE__ */ we({
2670
+ __name: "BasePermission",
2671
+ props: {
2672
+ modelValue: {
2673
+ type: Array,
2674
+ required: !0
2675
+ },
2676
+ disable: {
2677
+ type: Boolean,
2678
+ default: !1
2679
+ },
2680
+ excludedSubjects: {
2681
+ type: Array,
2682
+ required: !0
2683
+ },
2684
+ additionalPermissions: {
2685
+ type: Array,
2686
+ default: () => []
2687
+ }
2688
+ },
2689
+ emits: ["update:model-value"],
2690
+ setup(e, { emit: t }) {
2691
+ const n = e, s = t, { t: o } = et(), l = Q(() => [...Vn, ...n.additionalPermissions]), {
2692
+ categoryGroups: c,
2693
+ isAllManageChecked: f,
2694
+ isAllManageIndeterminate: v,
2695
+ toggleAllManage: I,
2696
+ isManageChecked: O,
2697
+ isManageIndeterminate: L,
2698
+ toggleManage: R,
2699
+ isActionChecked: U,
2700
+ isRowFullyCoveredByCover: B,
2701
+ isActionCoveredByCover: M,
2702
+ permissionDefinesAction: P,
2703
+ toggleAction: u,
2704
+ isAllActionChecked: p,
2705
+ isAllActionIndeterminate: A,
2706
+ toggleAllAction: i,
2707
+ actionLabel: h
2708
+ } = La(
2709
+ tn(n, "modelValue"),
2710
+ l,
2711
+ tn(n, "excludedSubjects"),
2712
+ (w, m) => s("update:model-value", m)
2713
+ );
2714
+ function y(w) {
2715
+ const m = w.selectedSubjects.length;
2716
+ return m === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: m });
2717
+ }
2718
+ function b(w, m) {
2719
+ return O(w, m) || B(w, m) ? !0 : w.actionColumns.some(
2720
+ (T) => P(w, m, T) && (U(w, m, T) || M(w, m, T))
2721
+ );
2722
+ }
2723
+ return (w, m) => {
2724
+ const T = Me("FmCheckbox");
2725
+ return J(), ae("div", Aa, [
2726
+ (J(!0), ae(Oe, null, ye(X(c), (E) => (J(), Se(Ht, {
2727
+ key: E.category,
2728
+ subtitle: y(E)
2729
+ }, {
2730
+ title: de(() => [
2731
+ se("p", Sa, Ce(E.label), 1)
2732
+ ]),
2733
+ default: de(() => [
2734
+ se("div", Da, [
2735
+ se("div", {
2736
+ class: "grid items-center px-12 py-8",
2737
+ style: Ke({
2738
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2739
+ })
2740
+ }, [
2741
+ m[0] || (m[0] = se("div", null, null, -1)),
2742
+ se("div", Ma, Ce(X(o)("team.memberForm.permissions.columnManage")), 1),
2743
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (g) => (J(), ae("div", {
2744
+ key: `header-${g}`,
2745
+ class: "text-center text-sm font-semibold text-fm-color-typo-primary"
2746
+ }, Ce(X(h)(g)), 1))), 128))
2747
+ ], 4),
2748
+ se("div", {
2749
+ class: "grid items-center bg-fm-color-neutral-gray-100 px-12 py-8",
2750
+ style: Ke({
2751
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2752
+ })
2753
+ }, [
2754
+ se("div", {
2755
+ class: "cursor-pointer font-semibold",
2756
+ onClick: (g) => !e.disable && X(I)(E)
2757
+ }, Ce(X(o)("team.labels.all")), 9, wa),
2758
+ se("div", Fa, [
2759
+ ie(T, {
2760
+ "model-value": X(f)(E),
2761
+ indeterminate: X(v)(E),
2762
+ value: !0,
2763
+ disabled: e.disable,
2764
+ size: "sm",
2765
+ dense: "",
2766
+ "onUpdate:modelValue": (g) => X(I)(E)
2767
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])
2768
+ ]),
2769
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (g) => (J(), ae("div", {
2770
+ key: `all-${g}`,
2771
+ class: "flex justify-center"
2772
+ }, [
2773
+ ie(T, {
2774
+ "model-value": X(p)(E, g),
2775
+ indeterminate: X(A)(E, g),
2776
+ value: g,
2777
+ disabled: e.disable,
2778
+ size: "sm",
2779
+ dense: "",
2780
+ "onUpdate:modelValue": (Y) => X(i)(E, g, Y)
2781
+ }, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
2782
+ ]))), 128))
2783
+ ], 4),
2784
+ m[1] || (m[1] = se("div", { class: "h-px bg-fm-color-neutral-gray-200" }, null, -1)),
2785
+ (J(!0), ae(Oe, null, ye(E.options, (g) => (J(), ae("div", {
2786
+ key: g.optionKey,
2787
+ class: "grid items-center rounded px-12 py-8 transition-colors hover:bg-fm-color-neutral-gray-100",
2788
+ style: Ke({
2789
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2790
+ })
2791
+ }, [
2792
+ se("div", Pa, [
2793
+ se("span", {
2794
+ class: "block truncate cursor-pointer",
2795
+ title: g.label,
2796
+ onClick: (Y) => !e.disable && !X(B)(E, g.value) && X(R)(E, g.value, !X(O)(E, g.value))
2797
+ }, Ce(g.label), 9, ja),
2798
+ Re(w.$slots, `checkbox-${g.value}-append`, {
2799
+ option: g,
2800
+ isEffectiveSelected: b(E, g.value),
2801
+ isCoveredByCover: X(B)(E, g.value) || E.actionColumns.some((Y) => X(M)(E, g.value, Y))
2802
+ }),
2803
+ Re(w.$slots, `checkbox-${g.value}-icon`, {
2804
+ option: g,
2805
+ isEffectiveSelected: b(E, g.value),
2806
+ isCoveredByCover: X(B)(E, g.value) || E.actionColumns.some((Y) => X(M)(E, g.value, Y))
2807
+ })
2808
+ ]),
2809
+ se("div", Ua, [
2810
+ ie(T, {
2811
+ "model-value": X(O)(E, g.value) || X(B)(E, g.value),
2812
+ value: g.value,
2813
+ disabled: e.disable || X(B)(E, g.value),
2814
+ indeterminate: X(L)(E, g.value),
2815
+ size: "sm",
2816
+ "onUpdate:modelValue": (Y) => X(R)(E, g.value, Y)
2817
+ }, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"])
2818
+ ]),
2819
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (Y) => (J(), ae("div", {
2820
+ key: `${g.optionKey}-${Y}`,
2821
+ class: "flex justify-center"
2822
+ }, [
2823
+ X(P)(E, g.value, Y) ? (J(), Se(T, {
2824
+ key: 0,
2825
+ "model-value": X(U)(E, g.value, Y) || X(M)(E, g.value, Y),
2826
+ value: Y,
2827
+ disabled: e.disable || X(M)(E, g.value, Y),
2828
+ size: "sm",
2829
+ "onUpdate:modelValue": (H) => X(u)(g.value, Y, H)
2830
+ }, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Le("", !0)
2831
+ ]))), 128))
2832
+ ], 4))), 128))
2833
+ ])
2834
+ ]),
2835
+ _: 2
2836
+ }, 1032, ["subtitle"]))), 128))
2837
+ ]);
2838
+ };
2839
+ }
2840
+ }), xa = { class: "space-y-16" }, Ga = {
2841
+ key: 0,
2842
+ class: "flex fm-typo-en-title-sm-600"
2843
+ }, Wa = {
2844
+ key: 0,
2845
+ class: "q-mr-xs text-red col"
2846
+ }, Za = { class: "form-input" }, Ya = /* @__PURE__ */ we({
2847
+ __name: "AppForm",
2848
+ props: {
2849
+ title: {
2850
+ type: String,
2851
+ default: void 0
2852
+ },
2853
+ required: {
2854
+ type: [Boolean, String],
2855
+ default: !1
2856
+ },
2857
+ inline: {
2858
+ type: Boolean,
2859
+ default: !1
2860
+ }
2861
+ },
2862
+ setup(e) {
2863
+ const t = e;
2864
+ return (n, s) => (J(), ae("div", xa, [
2865
+ Re(n.$slots, "top", {}, () => [
2866
+ t.title ? (J(), ae("div", Ga, [
2867
+ se("div", null, [
2868
+ t.required ? (J(), ae("span", Wa, "*")) : Le("", !0),
2869
+ cs(Ce(t.title), 1)
2870
+ ]),
2871
+ Re(n.$slots, "title-right")
2872
+ ])) : Le("", !0)
2873
+ ]),
2874
+ se("div", Za, [
2875
+ Re(n.$slots, "default")
2876
+ ])
2877
+ ]));
2878
+ }
2879
+ });
2880
+ function Ba(e, t) {
2881
+ let n = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2882
+ const o = s.length;
2883
+ for (let l = 0; l < e; l++)
2884
+ n += s.charAt(Math.floor(Math.random() * o));
2885
+ return n;
2886
+ }
2887
+ const Xa = { class: "col flex items-center" }, Ha = {
2888
+ key: 1,
2889
+ class: "q-pa-sm form-error-message text-error"
2890
+ }, ss = /* @__PURE__ */ we({
2891
+ __name: "CheckboxInput",
2892
+ props: {
2893
+ options: {
2894
+ type: Array,
2895
+ required: !0
2896
+ },
2897
+ title: {
2898
+ type: String,
2899
+ required: !0
2900
+ },
2901
+ modelValue: {
2902
+ type: Array,
2903
+ required: !0
2904
+ },
2905
+ showAllToggle: {
2906
+ type: [Boolean, String],
2907
+ default: !0
2908
+ },
2909
+ includeDisabledOptionsWhenSelectAll: {
2910
+ type: Boolean,
2911
+ default: !1
2912
+ },
2913
+ disable: {
2914
+ type: Boolean,
2915
+ default: !1
2916
+ },
2917
+ min: {
2918
+ type: Number,
2919
+ default: 0
2920
+ },
2921
+ max: {
2922
+ type: Number,
2923
+ default: void 0
2924
+ },
2925
+ showIntermediate: {
2926
+ type: Boolean,
2927
+ default: !0
2928
+ },
2929
+ gutter: {
2930
+ type: Number,
2931
+ default: void 0
2932
+ },
2933
+ falsyShowSlot: {
2934
+ type: Boolean,
2935
+ default: !1
2936
+ },
2937
+ bottomSlotIndent: {
2938
+ type: String,
2939
+ default: "36px"
2940
+ },
2941
+ alignCenter: {
2942
+ type: Boolean,
2943
+ default: !0
2944
+ }
2945
+ },
2946
+ emits: ["update:model-value"],
2947
+ setup(e, { emit: t }) {
2948
+ const n = e, s = t, { t: o } = et(), l = dt(!1), c = us(), f = Q(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), v = `checkbox-${Ba(6)}`, I = Q(() => f.value !== !0), O = Q(
2949
+ () => n.modelValue.filter((M) => n.options.some((P) => P.value === M))
2950
+ ), L = Q(
2951
+ () => typeof n.showAllToggle == "boolean" ? o("team.labels.all") : n.showAllToggle
2952
+ ), R = Q(() => n.options.length > 0 && n.options.length === O.value.length);
2953
+ function U() {
2954
+ const M = n.modelValue.filter((P) => !O.value.includes(P));
2955
+ if (R.value === !0)
2956
+ s("update:model-value", M);
2957
+ else {
2958
+ const P = n.includeDisabledOptionsWhenSelectAll ? n.options.map((u) => u.value) : n.options.filter((u) => !u.disabled).map((u) => u.value);
2959
+ s("update:model-value", [...M, ...P]);
2960
+ }
2961
+ }
2962
+ function B(M, P) {
2963
+ let u = It(n.modelValue);
2964
+ P ? u.every((p) => p !== M) && u.push(M) : u = u.filter((p) => p !== M), s("update:model-value", u);
2965
+ }
2966
+ return (M, P) => {
2967
+ const u = Me("FmCheckbox");
2968
+ return J(), Se(Ya, {
2969
+ id: v,
2970
+ title: e.title,
2971
+ required: !1
2972
+ }, {
2973
+ top: de(() => [
2974
+ Re(M.$slots, "top")
2975
+ ]),
2976
+ default: de(() => [
2977
+ n.showAllToggle ? (J(), Se(u, {
2978
+ key: 0,
2979
+ "model-value": R.value,
2980
+ disabled: e.disable,
2981
+ label: L.value,
2982
+ style: Ke(`margin-bottom: ${n.gutter}px`),
2983
+ size: "sm",
2984
+ dense: "",
2985
+ value: L.value,
2986
+ "onUpdate:modelValue": U
2987
+ }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Le("", !0),
2988
+ (J(!0), ae(Oe, null, ye(e.options, (p, A) => (J(), ae("div", {
2989
+ key: p.value,
2990
+ style: Ke(`margin-bottom: ${A < e.options.length - 1 ? n.gutter : 0}px`),
2991
+ class: lt(A < e.options.length - 1 ? "q-mb-sm" : "")
2992
+ }, [
2993
+ se("div", {
2994
+ class: lt(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
2995
+ }, [
2996
+ se("div", Xa, [
2997
+ ie(u, {
2998
+ "model-value": e.modelValue.includes(p.value),
2999
+ disabled: e.disable || p.disabled,
3000
+ size: "sm",
3001
+ label: p.label,
3002
+ value: p.label,
3003
+ "onUpdate:modelValue": (i) => B(p.value, i)
3004
+ }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
3005
+ Re(M.$slots, `checkbox-${p.key || p.value}-append`, {
3006
+ option: p,
3007
+ selected: e.modelValue.includes(p.value)
3008
+ })
3009
+ ]),
3010
+ X(c)[`checkbox-${p.key || p.value}-end`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (J(), ae("div", {
3011
+ key: 0,
3012
+ class: lt([{ "q-checkbox disabled": e.disable || p.disabled }, "col"])
3013
+ }, [
3014
+ Re(M.$slots, `checkbox-${p.key || p.value}-end`, {
3015
+ option: p,
3016
+ value: e.modelValue.includes(p.value),
3017
+ disable: e.disable || p.disabled
3018
+ })
3019
+ ], 2)) : Le("", !0)
3020
+ ], 2),
3021
+ X(c)[`checkbox-${p.key || p.value}-bottom`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (J(), ae("div", {
3022
+ key: 0,
3023
+ class: lt(["q-mt-sm", { "q-checkbox disabled": e.disable || p.disabled }]),
3024
+ style: Ke(`margin-left: ${e.bottomSlotIndent}`)
3025
+ }, [
3026
+ Re(M.$slots, `checkbox-${p.key || p.value}-bottom`, {
3027
+ option: p,
3028
+ disable: e.disable || p.disabled,
3029
+ value: e.modelValue.includes(p.value)
3030
+ })
3031
+ ], 6)) : Le("", !0)
3032
+ ], 6))), 128)),
3033
+ l.value && I.value ? (J(), ae("div", Ha, Ce(f.value), 1)) : Le("", !0)
3034
+ ]),
3035
+ _: 3
3036
+ }, 8, ["title"]);
3037
+ };
3038
+ }
3039
+ }), $a = { class: "fm-typo-en-title-sm-600" }, bt = "includedFuture", Fn = /* @__PURE__ */ we({
3040
+ __name: "ConditionPermission",
3041
+ props: {
3042
+ modelValue: {
3043
+ type: Array,
3044
+ default: null
3045
+ },
3046
+ options: {
3047
+ type: Array,
3048
+ required: !0
3049
+ },
3050
+ disable: {
3051
+ type: Boolean,
3052
+ default: !1
3053
+ },
3054
+ context: {
3055
+ type: String,
3056
+ required: !0
3057
+ }
3058
+ },
3059
+ emits: ["update:model-value"],
3060
+ setup(e, { emit: t }) {
3061
+ const n = e, s = t, { t: o } = et(), l = Q(() => [
3062
+ {
3063
+ label: o("team.memberForm.permissions.includedFuture", { context: n.context }),
3064
+ value: bt,
3065
+ // Can only be selected if all other options are selected
3066
+ disabled: !!n.modelValue && n.options.length > n.modelValue.length
3067
+ },
3068
+ ...n.options.filter(
3069
+ (O) => O.label.toLocaleLowerCase().includes(I.value.toLocaleLowerCase())
3070
+ )
3071
+ ]), c = Q(() => n.modelValue ? n.modelValue : [bt, ...n.options.map((O) => O.value)]), f = Q(() => {
3072
+ const O = c.value.filter((L) => L !== bt).length;
3073
+ return O === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: O });
3074
+ });
3075
+ function v(O) {
3076
+ const L = O.length === l.value.length;
3077
+ s("update:model-value", L ? null : O.filter((R) => R !== bt));
3078
+ }
3079
+ const I = dt("");
3080
+ return (O, L) => {
3081
+ const R = Me("fm-search");
3082
+ return J(), Se(Ht, { subtitle: f.value }, {
3083
+ title: de(() => [
3084
+ se("p", $a, Ce(X(o)("team.memberForm.permissions.manageable", { context: e.context })), 1)
3085
+ ]),
3086
+ default: de(() => [
3087
+ e.options.length > 1 ? (J(), Se(R, {
3088
+ key: 0,
3089
+ modelValue: I.value,
3090
+ "onUpdate:modelValue": L[0] || (L[0] = (U) => I.value = U),
3091
+ class: "mt-16",
3092
+ placeholder: X(o)("team.memberForm.permissions.search", { context: e.context })
3093
+ }, null, 8, ["modelValue", "placeholder"])) : Le("", !0),
3094
+ ie(ss, {
3095
+ "model-value": c.value,
3096
+ options: l.value,
3097
+ "show-intermediate": !1,
3098
+ "show-all-toggle": !0,
3099
+ disable: e.disable,
3100
+ "include-disabled-options-when-select-all": !0,
3101
+ title: "",
3102
+ class: "mt-16",
3103
+ "onUpdate:modelValue": v
3104
+ }, Je({ _: 2 }, [
3105
+ ye(l.value, (U) => ({
3106
+ name: `checkbox-${U.value}-append`,
3107
+ fn: de(({ option: B }) => [
3108
+ Re(O.$slots, `checkbox-${U.value}-append`, { option: B })
3109
+ ])
3110
+ }))
3111
+ ]), 1032, ["model-value", "options", "disable"])
3112
+ ]),
3113
+ _: 3
3114
+ }, 8, ["subtitle"]);
3115
+ };
3116
+ }
3117
+ }), Ja = { class: "fm-typo-en-title-sm-600" }, vt = "includedNewRole", Ka = /* @__PURE__ */ we({
3118
+ __name: "PosRolePermission",
3119
+ props: {
3120
+ modelValue: {
3121
+ type: Array,
3122
+ default: null
3123
+ },
3124
+ roles: {
3125
+ type: Array,
3126
+ required: !0
3127
+ },
3128
+ restaurantIds: {
3129
+ type: Array,
3130
+ default: null
3131
+ },
3132
+ disable: {
3133
+ type: Boolean,
3134
+ default: !1
3135
+ }
3136
+ },
3137
+ emits: ["update:model-value"],
3138
+ setup(e, { emit: t }) {
3139
+ const n = e, s = t, { t: o } = et(), l = Q(() => {
3140
+ const I = n.restaurantIds;
3141
+ return [
3142
+ {
3143
+ label: o("team.memberForm.permissions.includedNewRole"),
3144
+ value: vt,
3145
+ disabled: !!n.modelValue && n.roles.length > n.modelValue.length
3146
+ },
3147
+ ...n.roles.map((O) => ({
3148
+ label: O.name,
3149
+ value: O._id,
3150
+ disabled: !!I && O.restaurants.every(({ id: L }) => !I.includes(L))
3151
+ }))
3152
+ ];
3153
+ }), c = Q(() => n.modelValue ? n.modelValue : [vt, ...n.roles.map((I) => I._id)]), f = Q(() => {
3154
+ const I = c.value.filter((O) => O !== vt).length;
3155
+ return I === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: I });
3156
+ });
3157
+ function v(I) {
3158
+ const O = I.length === l.value.length;
3159
+ s("update:model-value", O ? null : I.filter((L) => L !== vt));
3160
+ }
3161
+ return (I, O) => (J(), Se(Ht, { subtitle: f.value }, {
3162
+ title: de(() => [
3163
+ se("p", Ja, Ce(X(o)("team.memberForm.permissions.roles")), 1)
3164
+ ]),
3165
+ default: de(() => [
3166
+ ie(ss, {
3167
+ "model-value": c.value,
3168
+ options: l.value,
3169
+ "show-intermediate": !1,
3170
+ "show-all-toggle": !1,
3171
+ disable: e.disable,
3172
+ title: "",
3173
+ class: "mt-16",
3174
+ "onUpdate:modelValue": v
3175
+ }, Je({ _: 2 }, [
3176
+ ye(l.value, (L) => ({
3177
+ name: `checkbox-${L.value}-append`,
3178
+ fn: de(({ option: R }) => [
3179
+ Re(I.$slots, `checkbox-${L.value}-append`, { option: R })
3180
+ ])
3181
+ }))
3182
+ ]), 1032, ["model-value", "options", "disable"])
3183
+ ]),
3184
+ _: 3
3185
+ }, 8, ["subtitle"]));
3186
+ }
3187
+ }), za = {
3188
+ async readWarehouses() {
3189
+ return Ns(await Cs().get("/warehouses"));
3190
+ }
3191
+ }, Qa = {
3192
+ MY: "Asia/Kuala_Lumpur",
3193
+ SG: "Asia/Singapore",
3194
+ TH: "Asia/Bangkok",
3195
+ ID: "Asia/Jakarta",
3196
+ MO: "Asia/Macau",
3197
+ BN: "Asia/Brunei",
3198
+ PK: "Asia/Karachi",
3199
+ MV: "Indian/Maldives",
3200
+ VN: "Asia/Ho_Chi_Minh",
3201
+ JP: "Asia/Tokyo",
3202
+ AU: "Australia/Sydney",
3203
+ AE: "Asia/Dubai",
3204
+ UK: "Europe/London"
3205
+ };
3206
+ function qa(e) {
3207
+ const t = (e || "").toUpperCase();
3208
+ return Qa[t] ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
3209
+ }
3210
+ function el(e, t) {
3211
+ return e != null && e.timezone ? e.timezone : e != null && e.timeZone ? e.timeZone : qa((e == null ? void 0 : e.country) ?? t);
3212
+ }
3213
+ function ht(e, t) {
3214
+ return `${e}::${t.builderKey}`;
3215
+ }
3216
+ function $e(e) {
3217
+ try {
3218
+ return e.conditions ? JSON.parse(e.conditions) : void 0;
3219
+ } catch {
3220
+ return;
3221
+ }
3222
+ }
3223
+ function tl(e, t) {
3224
+ return e.find((n) => !n.inverted && n.subject === t);
3225
+ }
3226
+ function wt(e, t) {
3227
+ const n = new Set(e.actions);
3228
+ return n.has(fe.Action.manage) ? !0 : t.actions.every((s) => n.has(s));
3229
+ }
3230
+ function Pn(e, t) {
3231
+ const n = $e(e);
3232
+ return Pt(n, [{ builder: t, formValue: t.fromCondition(void 0) }]);
3233
+ }
3234
+ function nl(e, t, n) {
3235
+ const s = dt(/* @__PURE__ */ new Set());
3236
+ function o(i) {
3237
+ return Os(i, t.value);
3238
+ }
3239
+ function l(i) {
3240
+ return t.value.find((h) => h.subject === i);
3241
+ }
3242
+ function c(i) {
3243
+ var y;
3244
+ const h = o(i);
3245
+ return h ? (y = l(h)) == null ? void 0 : y.label : void 0;
3246
+ }
3247
+ function f(i) {
3248
+ return tl(e.value, i);
3249
+ }
3250
+ function v(i, h) {
3251
+ return gt($e(i), h);
3252
+ }
3253
+ function I(i, h) {
3254
+ var w;
3255
+ if (!(((w = h.appliesToActions) == null ? void 0 : w.call(h, i.actions)) ?? !0)) return !1;
3256
+ const y = o(i.subject);
3257
+ if (!y) return !1;
3258
+ const b = f(y);
3259
+ return b ? Object.keys(v(b, h)).length > 0 : !1;
3260
+ }
3261
+ function O(i, h) {
3262
+ return !I(i, h) || s.value.has(ht(i.subject, h)) ? "custom" : i.index === null ? "inherit" : "custom";
3263
+ }
3264
+ function L(i, h, y) {
3265
+ if (!h.summarizeForm) return;
3266
+ const b = o(i.subject);
3267
+ if (!b) return;
3268
+ const w = f(b);
3269
+ if (!w) return;
3270
+ const m = h.fromCondition(v(w, h));
3271
+ return h.summarizeForm(m, { timeZone: y });
3272
+ }
3273
+ function R(i, h) {
3274
+ if (i.index === null) return;
3275
+ const y = [...e.value], b = { ...y[i.index] }, w = Pn(b, h), m = Object.keys(w).length === 0, T = o(i.subject), E = T ? f(T) : void 0, g = E ? wt(E, b) : !1;
3276
+ m && g ? y.splice(i.index, 1) : (m ? delete b.conditions : b.conditions = JSON.stringify(w), y[i.index] = b), n(y);
3277
+ }
3278
+ function U(i, h, y) {
3279
+ const b = ht(i.subject, h);
3280
+ if (y === "inherit") {
3281
+ const m = new Set(s.value);
3282
+ m.delete(b), s.value = m, R(i, h);
3283
+ return;
3284
+ }
3285
+ const w = new Set(s.value);
3286
+ w.add(b), s.value = w, i.index === null && p(i, h, h.fromCondition(void 0), {
3287
+ forceCreateRule: !0
3288
+ });
3289
+ }
3290
+ function B(i) {
3291
+ const h = o(i);
3292
+ if (!h) return [];
3293
+ const y = f(h);
3294
+ return (y == null ? void 0 : y.actions) ?? [];
3295
+ }
3296
+ function M(i, h) {
3297
+ return e.value.filter((y) => {
3298
+ if (y.inverted) return !1;
3299
+ const b = y.subject;
3300
+ return b === i || o(b) !== i ? !1 : s.value.has(ht(b, h)) ? !0 : Object.keys(gt($e(y), h)).length > 0;
3301
+ });
3302
+ }
3303
+ function P(i, h) {
3304
+ const y = `::${h.builderKey}`, b = new Set(s.value);
3305
+ for (const w of b) {
3306
+ if (!w.endsWith(y)) continue;
3307
+ const m = w.slice(0, -y.length);
3308
+ o(m) === i && b.delete(w);
3309
+ }
3310
+ s.value = b;
3311
+ }
3312
+ function u(i, h, y) {
3313
+ const b = h.subject;
3314
+ return i.reduce((w, m) => {
3315
+ if (m.inverted)
3316
+ return w.push(m), w;
3317
+ const T = m.subject;
3318
+ if (T === b || o(T) !== b || !wt(h, m))
3319
+ return w.push(m), w;
3320
+ const E = Pn(m, y);
3321
+ return Object.keys(E).length === 0 || w.push({ ...m, conditions: JSON.stringify(E) }), w;
3322
+ }, []);
3323
+ }
3324
+ function p(i, h, y, b = {}) {
3325
+ var Z;
3326
+ const w = [...e.value];
3327
+ let m = i.index;
3328
+ const T = h.toCondition(y), E = Object.keys(T).length > 0;
3329
+ if (m === null && !E && !b.forceCreateRule) return;
3330
+ if (m === null) {
3331
+ const V = w.findIndex((j) => !j.inverted && j.subject === i.subject);
3332
+ if (V !== -1)
3333
+ m = V;
3334
+ else {
3335
+ const j = t.value.find((Ne) => Ne.subject === i.subject);
3336
+ if (!j) return;
3337
+ const {
3338
+ category: $,
3339
+ showByFeatureFlag: K,
3340
+ isCategoryCover: me,
3341
+ ...pe
3342
+ } = j;
3343
+ w.push(pe), m = w.length - 1;
3344
+ }
3345
+ }
3346
+ const g = { ...w[m] }, Y = $e(g), H = Pt(Y, [{ builder: h, formValue: y }]);
3347
+ if (Object.keys(H).length === 0 ? delete g.conditions : g.conditions = JSON.stringify(H), w[m] = g, an(i.subject, t.value)) {
3348
+ const V = M(i.subject, h), j = () => {
3349
+ var K;
3350
+ P(i.subject, h), n(u(w, g, h)), (K = b.afterCommit) == null || K.call(b);
3351
+ }, $ = () => {
3352
+ var K;
3353
+ n(w), (K = b.afterCommit) == null || K.call(b);
3354
+ };
3355
+ if (V.length === 0) {
3356
+ j();
3357
+ return;
3358
+ }
3359
+ b.onOverridesConflict ? b.onOverridesConflict({ override: j, keep: $ }) : $();
3360
+ return;
3361
+ }
3362
+ n(w), (Z = b.afterCommit) == null || Z.call(b);
3363
+ }
3364
+ function A(i, h, y = {}) {
3365
+ if (h.length === 0) return;
3366
+ const b = [...e.value];
3367
+ let w = b.findIndex((V) => !V.inverted && V.subject === i.subject), m = w === -1 ? void 0 : { ...b[w] }, T = $e(m ?? {}) ?? {};
3368
+ for (const V of h) {
3369
+ const j = V.mode === "inherit" ? V.builder.fromCondition(void 0) : V.form;
3370
+ T = Pt(T, [{ builder: V.builder, formValue: j }]);
3371
+ }
3372
+ const E = h.some((V) => V.mode === "custom");
3373
+ if (!m && (Object.keys(T).length > 0 || E)) {
3374
+ const V = t.value.find((pe) => pe.subject === i.subject);
3375
+ if (!V) return;
3376
+ const {
3377
+ category: j,
3378
+ showByFeatureFlag: $,
3379
+ isCategoryCover: K,
3380
+ ...me
3381
+ } = V;
3382
+ m = me, b.push(m), w = b.length - 1;
3383
+ }
3384
+ if (m) {
3385
+ const V = o(i.subject), j = V ? f(V) : void 0;
3386
+ if (!E && Object.keys(T).length === 0 && !!j && wt(j, m))
3387
+ b.splice(w, 1), m = void 0;
3388
+ else {
3389
+ if (m.actions = [
3390
+ .../* @__PURE__ */ new Set([...m.actions, ...i.actions])
3391
+ ], j)
3392
+ for (const K of h)
3393
+ K.mode === "inherit" && (T = {
3394
+ ...T,
3395
+ ...gt($e(j), K.builder)
3396
+ });
3397
+ Object.keys(T).length === 0 ? delete m.conditions : m.conditions = JSON.stringify(T), b[w] = m;
3398
+ }
3399
+ }
3400
+ const g = () => {
3401
+ const V = new Set(s.value);
3402
+ for (const j of h) {
3403
+ const $ = ht(i.subject, j.builder);
3404
+ j.mode === "custom" ? V.add($) : V.delete($);
3405
+ }
3406
+ s.value = V;
3407
+ }, Y = (V) => {
3408
+ var j;
3409
+ g(), n(V), (j = y.afterCommit) == null || j.call(y);
3410
+ };
3411
+ if (!an(i.subject, t.value) || !m) {
3412
+ Y(b);
3413
+ return;
3414
+ }
3415
+ const H = h.map((V) => V.builder).filter((V) => M(i.subject, V).length > 0), Z = () => {
3416
+ let V = b;
3417
+ for (const j of h.map(($) => $.builder))
3418
+ P(i.subject, j), V = u(V, m, j);
3419
+ Y(V);
3420
+ };
3421
+ if (H.length > 0 && y.onOverridesConflict) {
3422
+ y.onOverridesConflict({ override: Z, keep: () => Y(b) });
3423
+ return;
3424
+ }
3425
+ H.length > 0 ? Y(b) : Z();
3426
+ }
3427
+ return {
3428
+ getCoverSubject: o,
3429
+ coverLabel: c,
3430
+ shouldShowInheritToggle: I,
3431
+ inheritMode: O,
3432
+ setInheritMode: U,
3433
+ inheritedSummary: L,
3434
+ getEffectiveActions: B,
3435
+ updateBuilderCondition: p,
3436
+ applyConditionDrafts: A
3437
+ };
3438
+ }
3439
+ const sl = { class: "flex flex-col gap-32" }, rl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, al = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ll = { class: "flex flex-col gap-12 p-16 w-[320px]" }, ol = { class: "fm-typo-en-title-sm-600" }, il = {
3440
+ key: 0,
3441
+ class: "h-px w-full bg-fm-color-neutral-gray-200"
3442
+ }, cl = {
3443
+ key: 1,
3444
+ class: "flex flex-col gap-8"
3445
+ }, ul = {
3446
+ key: 0,
3447
+ class: "ml-32",
3448
+ style: { "font-size": "12px", "line-height": "16px", color: "#8a8f98", "font-weight": "400" }
3449
+ }, dl = {
3450
+ key: 0,
3451
+ class: "ml-32"
3452
+ }, ml = { class: "flex justify-end pt-8" }, fl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, _l = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, pl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, bl = "condition-form-select-menu", Ol = /* @__PURE__ */ we({
3453
+ __name: "PortalPermissionEditor",
3454
+ props: /* @__PURE__ */ nn({
3455
+ disable: {
3456
+ type: Boolean,
3457
+ default: !1
3458
+ },
3459
+ inheritPermissions: {
3460
+ type: Array,
3461
+ default: () => []
3462
+ }
3463
+ }, {
3464
+ modelValue: { default: () => [] },
3465
+ modelModifiers: {}
3466
+ }),
3467
+ emits: /* @__PURE__ */ nn(["permissionChanged"], ["update:modelValue"]),
3468
+ setup(e, { emit: t }) {
3469
+ const n = ds(e, "modelValue"), s = e, o = t, { t: l } = et(), c = ms(), f = fs(), { breakpoints: v } = _s(), {
3470
+ fetchCustomReportPermissions: I,
3471
+ customReportPermissions: O
3472
+ } = ps(), L = Q(() => [
3473
+ ...Vn,
3474
+ ...O.value
3475
+ ]), R = Q(() => {
3476
+ const C = c.currentBusiness.value, N = c.currentCountry.value, S = N instanceof Object ? N.code : N;
3477
+ return el(C, S);
3478
+ });
3479
+ function U(C) {
3480
+ return L.value.find((N) => N.subject === C);
3481
+ }
3482
+ function B(C, N) {
3483
+ return rn(C).filter(
3484
+ (S) => {
3485
+ var r;
3486
+ return ((r = S.appliesToActions) == null ? void 0 : r.call(S, N)) ?? !0;
3487
+ }
3488
+ );
3489
+ }
3490
+ const M = Q(() => {
3491
+ const C = L.value.filter((S) => !A.includes(S.subject)).map((S) => S.subject);
3492
+ return bs(
3493
+ s.inheritPermissions.map((S) => ({
3494
+ ...S,
3495
+ permissions: S.permissions.filter((r) => C.includes(r.subject))
3496
+ }))
3497
+ ).map((S) => ({
3498
+ id: S.subject,
3499
+ setNames: S.setNames
3500
+ }));
3501
+ }), P = Q(() => {
3502
+ const C = s.inheritPermissions.map((N) => ({
3503
+ ...N,
3504
+ permissions: N.permissions.filter(
3505
+ (S) => S.subject === fe.Subject.Business.inventory_stock
3506
+ )
3507
+ }));
3508
+ return Rt(
3509
+ C,
3510
+ "warehouseId",
3511
+ h.value.map((N) => N._id)
3512
+ );
3513
+ }), u = Q(() => {
3514
+ const C = s.inheritPermissions.map((N) => ({
3515
+ ...N,
3516
+ permissions: N.permissions.filter(
3517
+ (S) => S.subject === fe.Subject.Restaurant.restaurant
3518
+ )
3519
+ }));
3520
+ return Rt(
3521
+ C,
3522
+ "restaurantId",
3523
+ m.value.map((N) => N._id)
3524
+ );
3525
+ }), p = Q(() => {
3526
+ const C = s.inheritPermissions.map((N) => ({
3527
+ ...N,
3528
+ permissions: N.permissions.filter((S) => S.subject === fe.Subject.Business.role)
3529
+ }));
3530
+ return Rt(
3531
+ C,
3532
+ "roleId",
3533
+ T.value.map((N) => N._id)
3534
+ );
3535
+ }), A = [
3536
+ fe.Subject.Business.restaurant,
3537
+ fe.Subject.Business.role,
3538
+ fe.Subject.Restaurant.restaurant,
3539
+ fe.Subject.Business.inventory_stock
3540
+ ], i = Q(() => {
3541
+ var N;
3542
+ const C = (N = n.value) == null ? void 0 : N.find(
3543
+ (S) => S.subject === fe.Subject.Business.inventory_stock
3544
+ );
3545
+ return C ? C.conditions ? JSON.parse(C.conditions).warehouseId.$in : null : [];
3546
+ }), h = dt([]), y = Q(() => h.value.map((C) => ({
3547
+ label: C.profile.name,
3548
+ value: C._id
3549
+ })));
3550
+ function b(C) {
3551
+ const N = w(n.value, C);
3552
+ n.value = N;
3553
+ }
3554
+ function w(C, N) {
3555
+ let S = It(
3556
+ C.filter((r) => r.subject !== fe.Subject.Business.inventory_stock)
3557
+ );
3558
+ if (!N || N.length > 0) {
3559
+ const r = {
3560
+ actions: [fe.Action.manage],
3561
+ subject: fe.Subject.Business.inventory_stock
3562
+ };
3563
+ N && (r.conditions = JSON.stringify({ warehouseId: { $in: N } })), S.push(r);
3564
+ }
3565
+ return S;
3566
+ }
3567
+ const { restaurants: m } = c, T = Ts().roles, E = Q(() => m.value.map((C) => ({
3568
+ label: `${C.profile.code ? C.profile.code + "-" : ""}${C.profile.name}`,
3569
+ value: C._id
3570
+ }))), g = Q(() => m.value.reduce((C, N) => (C[N._id] = T.value.filter((S) => S.restaurants.some((r) => r.id === N._id)).map((S) => S._id), C), {})), Y = Q(() => vs(n.value));
3571
+ function H(C) {
3572
+ const N = V(n.value, C);
3573
+ n.value = N;
3574
+ }
3575
+ const Z = Q(() => hs(n.value));
3576
+ function V(C, N) {
3577
+ var r;
3578
+ let S = It(
3579
+ C.filter(
3580
+ (a) => a.subject !== fe.Subject.Business.restaurant && a.subject !== fe.Subject.Restaurant.restaurant
3581
+ )
3582
+ );
3583
+ if (!N || N.length > 0) {
3584
+ const {
3585
+ category: a,
3586
+ showByFeatureFlag: d,
3587
+ ...F
3588
+ } = Es.restaurant;
3589
+ S.push(F);
3590
+ const D = {
3591
+ actions: [fe.Action.manage],
3592
+ subject: fe.Subject.Restaurant.restaurant
3593
+ };
3594
+ N && (D.conditions = JSON.stringify({ restaurantId: { $in: N } })), S.push(D);
3595
+ }
3596
+ if (N) {
3597
+ const a = [
3598
+ ...new Set(N.map((F) => g.value[F]).flatMap((F) => F))
3599
+ ], d = T.value.map((F) => F._id);
3600
+ a.length !== d.length && (S = $(
3601
+ S,
3602
+ (r = Z.value || d) == null ? void 0 : r.filter((F) => a.includes(F))
3603
+ ));
3604
+ }
3605
+ return S;
3606
+ }
3607
+ function j(C) {
3608
+ const N = $(n.value, C);
3609
+ n.value = N;
3610
+ }
3611
+ function $(C, N) {
3612
+ let S = It(
3613
+ C.filter((r) => r.subject !== fe.Subject.Business.role)
3614
+ );
3615
+ if (N && N.length > 0) {
3616
+ const r = {
3617
+ actions: [fe.Action.manage],
3618
+ subject: fe.Subject.Business.role,
3619
+ conditions: JSON.stringify({ roleId: { $in: N } })
3620
+ };
3621
+ S.push(r);
3622
+ }
3623
+ return S;
3624
+ }
3625
+ jn(async () => {
3626
+ await Promise.all([
3627
+ za.readWarehouses().then((C) => h.value = C),
3628
+ I()
3629
+ ]);
3630
+ });
3631
+ const K = Q(() => Lt(
3632
+ n.value,
3633
+ At
3634
+ ).filter((S) => {
3635
+ const r = S.source;
3636
+ return (r == null ? void 0 : r.type) !== "systemPermissionSet" ? !0 : S.actions.includes("manage");
3637
+ }).map((S) => {
3638
+ if (S.inverted) return S;
3639
+ const r = S.actions;
3640
+ if (!r.includes("manage")) return S;
3641
+ const a = U(S.subject);
3642
+ if (!a) return S;
3643
+ const d = a.actions;
3644
+ return d.length <= 1 || d.filter((D) => !r.includes(D)).length === 0 ? S : { ...S, actions: [...d] };
3645
+ }));
3646
+ function me(C) {
3647
+ const N = new Set(
3648
+ K.value.filter((d) => !d.inverted).map((d) => d.subject)
3649
+ ), S = new Set(
3650
+ C.filter((d) => !d.inverted).map((d) => d.subject)
3651
+ ), r = new Set(
3652
+ n.value.filter((d) => !d.inverted).map((d) => d.subject)
3653
+ );
3654
+ let a = [...n.value];
3655
+ for (const d of N)
3656
+ S.has(d) || (r.has(d) && (a = a.filter((D) => D.subject !== d)), (!r.has(d) || Lt(
3657
+ a,
3658
+ At
3659
+ ).some(
3660
+ (D) => D.subject === d && !D.inverted && D.actions.includes("manage")
3661
+ )) && !a.some((D) => D.subject === d && D.inverted) && a.push({ subject: d, actions: ["manage"], inverted: !0 }));
3662
+ for (const d of S)
3663
+ if (!N.has(d)) {
3664
+ const F = a.some((D) => D.subject === d && D.inverted);
3665
+ if (a = a.filter((D) => !(D.subject === d && D.inverted)), !F && !r.has(d)) {
3666
+ const D = C.find(
3667
+ (_) => _.subject === d && !_.inverted
3668
+ ), x = U(d);
3669
+ if (x && D) {
3670
+ const { category: _, showByFeatureFlag: k, ...G } = x;
3671
+ a.push({ ...G, actions: D.actions });
3672
+ }
3673
+ }
3674
+ }
3675
+ for (const d of S) {
3676
+ if (!N.has(d)) continue;
3677
+ const F = K.value.find(
3678
+ (G) => G.subject === d && !G.inverted
3679
+ ), D = C.find((G) => G.subject === d && !G.inverted);
3680
+ if (!F || !D) continue;
3681
+ const x = new Set(F.actions), _ = new Set(D.actions);
3682
+ if (x.size === _.size && [...x].every((G) => _.has(G)))
3683
+ continue;
3684
+ const k = a.findIndex((G) => G.subject === d && !G.inverted);
3685
+ if (k >= 0)
3686
+ a[k] = {
3687
+ ...a[k],
3688
+ actions: Array.from(_)
3689
+ };
3690
+ else {
3691
+ const G = U(d);
3692
+ if (G) {
3693
+ const { category: q, showByFeatureFlag: Ee, ...Be } = G;
3694
+ a.push({ ...Be, actions: Array.from(_) });
3695
+ }
3696
+ }
3697
+ x.has("manage") && !_.has("manage") && Lt(
3698
+ a,
3699
+ At
3700
+ ).some(
3701
+ (q) => q.subject === d && !q.inverted && q.actions.includes("manage")
3702
+ ) && !a.some((q) => q.subject === d && q.inverted) && a.push({ subject: d, actions: ["manage"], inverted: !0 }), !x.has("manage") && _.has("manage") && (a = a.filter((G) => !(G.subject === d && G.inverted)));
3703
+ }
3704
+ n.value = a;
3705
+ }
3706
+ const pe = Q(() => new Set(
3707
+ L.value.filter((C) => rn(C.subject).length > 0).map((C) => C.subject)
3708
+ )), Ne = Q(() => {
3709
+ const C = /* @__PURE__ */ new Map();
3710
+ return K.value.map((N) => ({
3711
+ rule: N,
3712
+ index: n.value.findIndex(
3713
+ (S) => !S.inverted && S.subject === N.subject
3714
+ )
3715
+ })).filter(({ rule: N }) => !N.inverted).forEach(({ rule: N, index: S }) => {
3716
+ var F;
3717
+ const r = N.actions, a = B(N.subject, r);
3718
+ if (a.length === 0) return;
3719
+ let d;
3720
+ try {
3721
+ d = N.conditions ? JSON.parse(N.conditions) : void 0;
3722
+ } catch {
3723
+ d = void 0;
3724
+ }
3725
+ C.set(N.subject, {
3726
+ index: S >= 0 ? S : null,
3727
+ subject: N.subject,
3728
+ label: ((F = U(N.subject)) == null ? void 0 : F.label) ?? N.subject,
3729
+ actions: r,
3730
+ // Each builder only ever sees its own slice of the stored condition.
3731
+ sections: a.map((D) => ({
3732
+ builder: D,
3733
+ formValue: D.fromCondition(gt(d, D))
3734
+ }))
3735
+ });
3736
+ }), C;
3737
+ }), be = nl(n, L, (C) => {
3738
+ n.value = C;
3739
+ }), ge = gs(n);
3740
+ function ce(C, N) {
3741
+ const S = Ne.value.get(C);
3742
+ if (S) return S;
3743
+ const r = be.getEffectiveActions(C), a = B(C, r);
3744
+ if (a.length !== 0)
3745
+ return {
3746
+ index: null,
3747
+ subject: C,
3748
+ label: N,
3749
+ actions: r,
3750
+ sections: a.map((d) => ({
3751
+ builder: d,
3752
+ formValue: d.fromCondition(void 0)
3753
+ }))
3754
+ };
3755
+ }
3756
+ function z(C, N) {
3757
+ const S = ge.getDraft({ subject: C.subject, builderKey: N.builderKey });
3758
+ if (S) return S.formValue;
3759
+ const r = C.sections.find((a) => a.builder.builderKey === N.builderKey);
3760
+ return r == null ? void 0 : r.formValue;
3761
+ }
3762
+ function oe(C, N) {
3763
+ const S = ge.getDraft({ subject: C.subject, builderKey: N.builderKey });
3764
+ return S != null && S.inheritMode ? S.inheritMode : be.inheritMode(C, N);
3765
+ }
3766
+ function We(C, N, S) {
3767
+ const r = ge.getDraft({
3768
+ subject: C.subject,
3769
+ builderKey: N.builderKey
3770
+ });
3771
+ ge.setDraft(
3772
+ { subject: C.subject, builderKey: N.builderKey },
3773
+ {
3774
+ formValue: S,
3775
+ inheritMode: (r == null ? void 0 : r.inheritMode) ?? oe(C, N)
3776
+ }
3777
+ );
3778
+ }
3779
+ function tt(C, N, S) {
3780
+ const r = ge.getDraft({
3781
+ subject: C.subject,
3782
+ builderKey: N.builderKey
3783
+ }), a = C.sections.find((d) => d.builder.builderKey === N.builderKey);
3784
+ ge.setDraft(
3785
+ { subject: C.subject, builderKey: N.builderKey },
3786
+ {
3787
+ formValue: (r == null ? void 0 : r.formValue) ?? (a == null ? void 0 : a.formValue),
3788
+ inheritMode: S
3789
+ }
3790
+ );
3791
+ }
3792
+ function nt(C) {
3793
+ return ge.hasDraftsForSubject(C);
3794
+ }
3795
+ function st(C, N) {
3796
+ const S = C.sections.flatMap((r) => {
3797
+ const a = ge.getDraft({
3798
+ subject: C.subject,
3799
+ builderKey: r.builder.builderKey
3800
+ });
3801
+ return a ? [{ builder: r.builder, form: a.formValue, mode: a.inheritMode ?? "custom" }] : [];
3802
+ });
3803
+ be.applyConditionDrafts(C, S, {
3804
+ afterCommit: () => {
3805
+ ge.clearDraftsForSubject(C.subject), N();
3806
+ },
3807
+ onOverridesConflict: Ue(C).onOverridesConflict
3808
+ });
3809
+ }
3810
+ function rt(C) {
3811
+ return C.sections.some((N) => Object.keys(N.builder.toCondition(N.formValue)).length > 0 ? !0 : be.shouldShowInheritToggle(C, N.builder) && be.inheritMode(C, N.builder) === "custom");
3812
+ }
3813
+ let ke = !1;
3814
+ function Ue(C, N = {}) {
3815
+ return {
3816
+ ...N,
3817
+ onOverridesConflict: ({ override: S, keep: r }) => {
3818
+ ke || (ke = !0, f.open({
3819
+ title: l("team.memberForm.permissions.conditionCover.confirmTitle"),
3820
+ message: l("team.memberForm.permissions.conditionCover.confirmMessage", {
3821
+ cover: C.label
3822
+ }),
3823
+ minWidth: v.value.lg ? 588 : 0,
3824
+ zIndex: 200,
3825
+ primaryActions: {
3826
+ text: l("team.memberForm.permissions.conditionCover.override"),
3827
+ close: !1
3828
+ },
3829
+ secondaryActions: {
3830
+ text: l("team.memberForm.permissions.conditionCover.keep"),
3831
+ close: !1
3832
+ }
3833
+ }).onPrimary(() => {
3834
+ S(), ke = !1, f.close();
3835
+ }).onSecondary(() => {
3836
+ r(), ke = !1, f.close();
3837
+ }).onClose(() => {
3838
+ ke = !1;
3839
+ }));
3840
+ }
3841
+ };
3842
+ }
3843
+ return Ft(
3844
+ n,
3845
+ (C) => {
3846
+ o("permissionChanged", C);
3847
+ },
3848
+ { deep: !0 }
3849
+ ), (C, N) => {
3850
+ const S = Me("FmIcon"), r = Me("FmRadio"), a = Me("FmRadioGroup"), d = Me("FmButton"), F = Me("FmPopover");
3851
+ return J(), ae("div", sl, [
3852
+ se("div", rl, [
3853
+ ie(Va, {
3854
+ "model-value": K.value,
3855
+ "excluded-subjects": A,
3856
+ "additional-permissions": X(O),
3857
+ "onUpdate:modelValue": me
3858
+ }, Je({ _: 2 }, [
3859
+ ye(M.value, (D) => ({
3860
+ name: `checkbox-${D.id}-append`,
3861
+ fn: de(() => [
3862
+ ie(pt, { item: D }, null, 8, ["item"])
3863
+ ])
3864
+ })),
3865
+ ye(pe.value, (D) => ({
3866
+ name: `checkbox-${D}-icon`,
3867
+ fn: de(({ option: x, isEffectiveSelected: _ }) => [
3868
+ _ && ce(D, x.label) ? (J(), Se(F, {
3869
+ key: 0,
3870
+ disabled: e.disable,
3871
+ "z-index": 100,
3872
+ "exclude-el-from-click-outside": [bl],
3873
+ class: "h-5 flex items-center",
3874
+ onClose: () => X(ge).clearDraftsForSubject(D)
3875
+ }, {
3876
+ "popover-button": de(() => [
3877
+ se("div", al, [
3878
+ ie(S, {
3879
+ name: "settings",
3880
+ size: "sm",
3881
+ class: lt([
3882
+ "cursor-pointer transition-colors",
3883
+ rt(ce(D, x.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
3884
+ ])
3885
+ }, null, 8, ["class"])
3886
+ ])
3887
+ ]),
3888
+ default: de(({ hide: k }) => [
3889
+ se("div", ll, [
3890
+ se("p", ol, Ce(X(l)("team.memberForm.permissions.conditionTitle", {
3891
+ context: ce(D, x.label).label
3892
+ })), 1),
3893
+ (J(!0), ae(Oe, null, ye(ce(D, x.label).sections, (G, q) => (J(), ae(Oe, {
3894
+ key: G.builder.builderKey
3895
+ }, [
3896
+ q > 0 ? (J(), ae("div", il)) : Le("", !0),
3897
+ X(be).shouldShowInheritToggle(
3898
+ ce(D, x.label),
3899
+ G.builder
3900
+ ) ? (J(), ae("div", cl, [
3901
+ ie(a, {
3902
+ "model-value": oe(ce(D, x.label), G.builder),
3903
+ disabled: e.disable,
3904
+ "onUpdate:modelValue": (Ee) => tt(
3905
+ ce(D, x.label),
3906
+ G.builder,
3907
+ Ee
3908
+ )
3909
+ }, {
3910
+ default: de(() => [
3911
+ se("div", null, [
3912
+ ie(r, {
3913
+ value: "inherit",
3914
+ label: X(l)("team.memberForm.permissions.conditionCover.inherit", {
3915
+ cover: X(be).coverLabel(D)
3916
+ })
3917
+ }, null, 8, ["label"]),
3918
+ X(be).inheritedSummary(
3919
+ ce(D, x.label),
3920
+ G.builder,
3921
+ R.value
3922
+ ) ? (J(), ae("p", ul, " (" + Ce(X(l)(
3923
+ X(be).inheritedSummary(
3924
+ ce(D, x.label),
3925
+ G.builder,
3926
+ R.value
3927
+ ).labelKey,
3928
+ X(be).inheritedSummary(
3929
+ ce(D, x.label),
3930
+ G.builder,
3931
+ R.value
3932
+ ).params ?? {}
3933
+ )) + ") ", 1)) : Le("", !0)
3934
+ ]),
3935
+ ie(r, {
3936
+ value: "custom",
3937
+ label: X(l)("team.memberForm.permissions.conditionCover.custom")
3938
+ }, null, 8, ["label"])
3939
+ ]),
3940
+ _: 2
3941
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"]),
3942
+ oe(
3943
+ ce(D, x.label),
3944
+ G.builder
3945
+ ) === "custom" ? (J(), ae("div", dl, [
3946
+ ie(sn, {
3947
+ builder: G.builder,
3948
+ "model-value": z(ce(D, x.label), G.builder),
3949
+ disable: e.disable,
3950
+ "onUpdate:modelValue": (Ee) => We(
3951
+ ce(D, x.label),
3952
+ G.builder,
3953
+ Ee
3954
+ )
3955
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
3956
+ ])) : Le("", !0)
3957
+ ])) : (J(), Se(sn, {
3958
+ key: 2,
3959
+ builder: G.builder,
3960
+ "model-value": z(ce(D, x.label), G.builder),
3961
+ disable: e.disable,
3962
+ "onUpdate:modelValue": (Ee) => We(
3963
+ ce(D, x.label),
3964
+ G.builder,
3965
+ Ee
3966
+ )
3967
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"]))
3968
+ ], 64))), 128)),
3969
+ se("div", ml, [
3970
+ ie(d, {
3971
+ label: X(l)("team.memberForm.permissions.conditionApply"),
3972
+ size: "md",
3973
+ variant: "primary",
3974
+ disabled: e.disable || !nt(D),
3975
+ onClick: (G) => st(ce(D, x.label), k)
3976
+ }, null, 8, ["label", "disabled", "onClick"])
3977
+ ])
3978
+ ])
3979
+ ]),
3980
+ _: 2
3981
+ }, 1032, ["disabled", "exclude-el-from-click-outside", "onClose"])) : (J(), Se(S, {
3982
+ key: 1,
3983
+ name: "settings",
3984
+ size: "sm",
3985
+ class: "invisible"
3986
+ }))
3987
+ ])
3988
+ }))
3989
+ ]), 1032, ["model-value", "additional-permissions"])
3990
+ ]),
3991
+ se("div", fl, [
3992
+ ie(Fn, {
3993
+ "model-value": i.value,
3994
+ options: y.value,
3995
+ context: X(l)("team.labels.warehouse"),
3996
+ "onUpdate:modelValue": b
3997
+ }, Je({ _: 2 }, [
3998
+ ye(P.value, (D) => ({
3999
+ name: `checkbox-${D.id}-append`,
4000
+ fn: de(() => [
4001
+ ie(pt, { item: D }, null, 8, ["item"])
4002
+ ])
4003
+ }))
4004
+ ]), 1032, ["model-value", "options", "context"])
4005
+ ]),
4006
+ se("div", _l, [
4007
+ ie(Fn, {
4008
+ "model-value": Y.value,
4009
+ options: E.value,
4010
+ context: X(l)("team.labels.restaurant"),
4011
+ "onUpdate:modelValue": H
4012
+ }, Je({ _: 2 }, [
4013
+ ye(u.value, (D) => ({
4014
+ name: `checkbox-${D.id}-append`,
4015
+ fn: de(() => [
4016
+ ie(pt, { item: D }, null, 8, ["item"])
4017
+ ])
4018
+ }))
4019
+ ]), 1032, ["model-value", "options", "context"])
4020
+ ]),
4021
+ se("div", pl, [
4022
+ ie(Ka, {
4023
+ roles: X(T),
4024
+ "model-value": Z.value,
4025
+ "restaurant-ids": Y.value,
4026
+ "onUpdate:modelValue": j
4027
+ }, Je({ _: 2 }, [
4028
+ ye(p.value, (D) => ({
4029
+ name: `checkbox-${D.id}-append`,
4030
+ fn: de(() => [
4031
+ ie(pt, { item: D }, null, 8, ["item"])
4032
+ ])
4033
+ }))
4034
+ ]), 1032, ["roles", "model-value", "restaurant-ids"])
4035
+ ])
4036
+ ]);
4037
+ };
4038
+ }
4039
+ });
4040
+ export {
4041
+ Ol as _
4042
+ };