@feedmepos/mf-hrm-portal 1.1.4-dev.4 → 2.0.0

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 (51) hide show
  1. package/dist/AuditLogList-Cm3ueTso.js +474 -0
  2. package/dist/EmployeeList-vMcIqBU_.js +626 -0
  3. package/dist/{Main-CG_GcIEk.js → Main-CeGYov-a.js} +8 -8
  4. package/dist/{Main-BLV2Vfz1.js → Main-gHCENd4i.js} +27 -28
  5. package/dist/PermissionSetList-Dw69OYF4.js +323 -0
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-bvPOPUhu.js +3092 -0
  7. package/dist/RoleList-D1CrixYc.js +497 -0
  8. package/dist/TeamMemberList-M0Q8CP4h.js +973 -0
  9. package/dist/{TimesheetList-FXfuZUMw.js → TimesheetList-BmOfy0pc.js} +25 -24
  10. package/dist/api/audit-log/index.d.ts +4 -0
  11. package/dist/api/index.d.ts +5 -0
  12. package/dist/api/report-query/index.d.ts +5 -0
  13. package/dist/api/team/index.d.ts +2 -5
  14. package/dist/app-RUdgf-7_.js +3286 -0
  15. package/dist/app.js +1 -1
  16. package/dist/composables/useReportPermissions.d.ts +14 -0
  17. package/dist/{dayjs.min-CxMnYvrg.js → dayjs.min-D9w2-Exz.js} +13 -13
  18. package/dist/employee-B3jBmvNJ.js +144 -0
  19. package/dist/helpers/permission-set.d.ts +37 -0
  20. package/dist/helpers/rule.d.ts +1 -1
  21. package/dist/index-BMVQbdBd.js +827 -0
  22. package/dist/index-BS6B6k7h.js +10340 -0
  23. package/dist/{lodash-Bbnb5Nlh.js → lodash-CglPbFKR.js} +1 -1
  24. package/dist/stores/permission-set.d.ts +15 -0
  25. package/dist/stores/team.d.ts +16 -4
  26. package/dist/style.css +1 -1
  27. package/dist/team-afjBSzOz.js +33 -0
  28. package/dist/{timesheet-pnAANVbk.js → timesheet-fOBJOS1i.js} +2 -2
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/dist/types/audit-log.d.ts +1 -19
  31. package/dist/types/permission-set.d.ts +4 -0
  32. package/dist/types/report-query.d.ts +6 -0
  33. package/dist/{useAppStore-BJZiy3Q1.js → useAppStore-D-SLROq6.js} +34 -46
  34. package/dist/{useLoading-FywoIKYV.js → useLoading-CLQGJW7G.js} +1 -1
  35. package/dist/useReportPermissions-Cx4ghxj6.js +65 -0
  36. package/dist/views/audit-log/locales/index.d.ts +84 -0
  37. package/dist/views/team/locales/index.d.ts +32 -8
  38. package/package.json +4 -2
  39. package/dist/AuditLogList-CIlv-dA1.js +0 -316
  40. package/dist/EmployeeList-u_rDREgp.js +0 -607
  41. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C0HCpU2w.js +0 -3051
  42. package/dist/RoleList-B5L4I_kf.js +0 -497
  43. package/dist/RolePermissionList-BUHTx8KI.js +0 -285
  44. package/dist/TeamMemberList-BSpbwkTb.js +0 -951
  45. package/dist/app-BTdNT2Fz.js +0 -1637
  46. package/dist/employee-D9A-2noc.js +0 -172
  47. package/dist/index-DEH1isVF.js +0 -8058
  48. package/dist/team-D9GxbwvB.js +0 -26
  49. package/dist/types/permission.d.ts +0 -1
  50. /package/dist/views/team/{role/RolePermissionForm.vue.d.ts → permission-set/PermissionSetForm.vue.d.ts} +0 -0
  51. /package/dist/views/team/{role/RolePermissionList.vue.d.ts → permission-set/PermissionSetList.vue.d.ts} +0 -0
@@ -1,3051 +0,0 @@
1
- import { getCurrentInstance as Wt, inject as xn, ref as ye, shallowRef as Hn, computed as G, watch as Rt, onMounted as Gt, onUnmounted as On, defineComponent as ce, h as Ln, createVNode as ne, Text as Bn, Fragment as we, resolveComponent as Ge, createBlock as ke, openBlock as B, withCtx as se, createElementVNode as ee, createElementBlock as te, toDisplayString as je, unref as he, renderList as me, renderSlot as le, createCommentVNode as Ne, createTextVNode as Jn, useSlots as $n, normalizeStyle as tt, normalizeClass as Ke, createSlots as ve, nextTick as Kn, mergeModels as Kt, useModel as zn } from "vue";
2
- import { useI18n as at, useCoreStore as Qn } from "@feedmepos/mf-common";
3
- import "@vue/devtools-api";
4
- import { m as We, w as Ct, g as qn, b as es, x as vt, y as ts, n as ns } from "./index-DEH1isVF.js";
5
- import { PermissionCategory as ss, Permission as Q, FullPortalPermissions as zt } from "@feedmepos/hrm-permission";
6
- import { mergePermissionSet as rs } from "@feedmepos/hrm-permission/utils";
7
- import { u as as } from "./useAppStore-BJZiy3Q1.js";
8
- /*!
9
- * shared v10.0.5
10
- * (c) 2024 kazuya kawaguchi
11
- * Released under the MIT License.
12
- */
13
- const Qt = typeof window < "u", Oe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), ls = (e, t, n) => os({ l: e, k: t, s: n }), os = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), K = (e) => typeof e == "number" && isFinite(e), is = (e) => jt(e) === "[object Date]", st = (e) => jt(e) === "[object RegExp]", lt = (e) => w(e) && Object.keys(e).length === 0, z = Object.assign, cs = Object.create, U = (e = null) => cs(e);
14
- let qt;
15
- const Te = () => qt || (qt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : U());
16
- function en(e) {
17
- return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
18
- }
19
- const us = Object.prototype.hasOwnProperty;
20
- function ie(e, t) {
21
- return us.call(e, t);
22
- }
23
- const $ = Array.isArray, Y = (e) => typeof e == "function", R = (e) => typeof e == "string", J = (e) => typeof e == "boolean", F = (e) => e !== null && typeof e == "object", ms = (e) => F(e) && Y(e.then) && Y(e.catch), Rn = Object.prototype.toString, jt = (e) => Rn.call(e), w = (e) => jt(e) === "[object Object]", ds = (e) => e == null ? "" : $(e) || w(e) && e.toString === Rn ? JSON.stringify(e, null, 2) : String(e);
24
- function Xt(e, t = "") {
25
- return e.reduce((n, s, l) => l === 0 ? n + s : n + t + s, "");
26
- }
27
- function _s(e, t) {
28
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
29
- }
30
- const ze = (e) => !F(e) || $(e);
31
- function nt(e, t) {
32
- if (ze(e) || ze(t))
33
- throw new Error("Invalid value");
34
- const n = [{ src: e, des: t }];
35
- for (; n.length; ) {
36
- const { src: s, des: l } = n.pop();
37
- Object.keys(s).forEach((r) => {
38
- r !== "__proto__" && (F(s[r]) && !F(l[r]) && (l[r] = Array.isArray(s[r]) ? [] : U()), ze(l[r]) || ze(s[r]) ? l[r] = s[r] : n.push({ src: s[r], des: l[r] }));
39
- });
40
- }
41
- }
42
- function fs(e, t, n) {
43
- return { line: e, column: t, offset: n };
44
- }
45
- function St(e, t, n) {
46
- return { start: e, end: t };
47
- }
48
- const V = {
49
- // tokenizer error codes
50
- EXPECTED_TOKEN: 1,
51
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
52
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
53
- UNKNOWN_ESCAPE_SEQUENCE: 4,
54
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
55
- UNBALANCED_CLOSING_BRACE: 6,
56
- UNTERMINATED_CLOSING_BRACE: 7,
57
- EMPTY_PLACEHOLDER: 8,
58
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
59
- INVALID_LINKED_FORMAT: 10,
60
- // parser error codes
61
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
62
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
63
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
64
- UNEXPECTED_LEXICAL_ANALYSIS: 14
65
- }, ps = 17;
66
- function ot(e, t, n = {}) {
67
- const { domain: s, messages: l, args: r } = n, c = e, m = new SyntaxError(String(c));
68
- return m.code = e, t && (m.location = t), m.domain = s, m;
69
- }
70
- function hs(e) {
71
- throw e;
72
- }
73
- const _e = " ", bs = "\r", q = `
74
- `, gs = "\u2028", Es = "\u2029";
75
- function Is(e) {
76
- const t = e;
77
- let n = 0, s = 1, l = 1, r = 0;
78
- const c = (N) => t[N] === bs && t[N + 1] === q, m = (N) => t[N] === q, u = (N) => t[N] === Es, _ = (N) => t[N] === gs, b = (N) => c(N) || m(N) || u(N) || _(N), E = () => n, g = () => s, C = () => l, M = () => r, T = (N) => c(N) || u(N) || _(N) ? q : t[N], k = () => T(n), i = () => T(n + r);
79
- function d() {
80
- return r = 0, b(n) && (s++, l = 0), c(n) && n++, n++, l++, t[n];
81
- }
82
- function v() {
83
- return c(n + r) && r++, r++, t[n + r];
84
- }
85
- function p() {
86
- n = 0, s = 1, l = 1, r = 0;
87
- }
88
- function O(N = 0) {
89
- r = N;
90
- }
91
- function y() {
92
- const N = n + r;
93
- for (; N !== n; )
94
- d();
95
- r = 0;
96
- }
97
- return {
98
- index: E,
99
- line: g,
100
- column: C,
101
- peekOffset: M,
102
- charAt: T,
103
- currentChar: k,
104
- currentPeek: i,
105
- next: d,
106
- peek: v,
107
- reset: p,
108
- resetPeek: O,
109
- skipToPeek: y
110
- };
111
- }
112
- const be = void 0, Ns = ".", tn = "'", vs = "tokenizer";
113
- function Ts(e, t = {}) {
114
- const n = t.location !== !1, s = Is(e), l = () => s.index(), r = () => fs(s.line(), s.column(), s.index()), c = r(), m = l(), u = {
115
- currentType: 13,
116
- offset: m,
117
- startLoc: c,
118
- endLoc: c,
119
- lastType: 13,
120
- lastOffset: m,
121
- lastStartLoc: c,
122
- lastEndLoc: c,
123
- braceNest: 0,
124
- inLinked: !1,
125
- text: ""
126
- }, _ = () => u, { onError: b } = t;
127
- function E(a, o, h, ...A) {
128
- const x = _();
129
- if (o.column += h, o.offset += h, b) {
130
- const P = n ? St(x.startLoc, o) : null, f = ot(a, P, {
131
- domain: vs,
132
- args: A
133
- });
134
- b(f);
135
- }
136
- }
137
- function g(a, o, h) {
138
- a.endLoc = r(), a.currentType = o;
139
- const A = { type: o };
140
- return n && (A.loc = St(a.startLoc, a.endLoc)), h != null && (A.value = h), A;
141
- }
142
- const C = (a) => g(
143
- a,
144
- 13
145
- /* TokenTypes.EOF */
146
- );
147
- function M(a, o) {
148
- return a.currentChar() === o ? (a.next(), o) : (E(V.EXPECTED_TOKEN, r(), 0, o), "");
149
- }
150
- function T(a) {
151
- let o = "";
152
- for (; a.currentPeek() === _e || a.currentPeek() === q; )
153
- o += a.currentPeek(), a.peek();
154
- return o;
155
- }
156
- function k(a) {
157
- const o = T(a);
158
- return a.skipToPeek(), o;
159
- }
160
- function i(a) {
161
- if (a === be)
162
- return !1;
163
- const o = a.charCodeAt(0);
164
- return o >= 97 && o <= 122 || // a-z
165
- o >= 65 && o <= 90 || // A-Z
166
- o === 95;
167
- }
168
- function d(a) {
169
- if (a === be)
170
- return !1;
171
- const o = a.charCodeAt(0);
172
- return o >= 48 && o <= 57;
173
- }
174
- function v(a, o) {
175
- const { currentType: h } = o;
176
- if (h !== 2)
177
- return !1;
178
- T(a);
179
- const A = i(a.currentPeek());
180
- return a.resetPeek(), A;
181
- }
182
- function p(a, o) {
183
- const { currentType: h } = o;
184
- if (h !== 2)
185
- return !1;
186
- T(a);
187
- const A = a.currentPeek() === "-" ? a.peek() : a.currentPeek(), x = d(A);
188
- return a.resetPeek(), x;
189
- }
190
- function O(a, o) {
191
- const { currentType: h } = o;
192
- if (h !== 2)
193
- return !1;
194
- T(a);
195
- const A = a.currentPeek() === tn;
196
- return a.resetPeek(), A;
197
- }
198
- function y(a, o) {
199
- const { currentType: h } = o;
200
- if (h !== 7)
201
- return !1;
202
- T(a);
203
- const A = a.currentPeek() === ".";
204
- return a.resetPeek(), A;
205
- }
206
- function N(a, o) {
207
- const { currentType: h } = o;
208
- if (h !== 8)
209
- return !1;
210
- T(a);
211
- const A = i(a.currentPeek());
212
- return a.resetPeek(), A;
213
- }
214
- function X(a, o) {
215
- const { currentType: h } = o;
216
- if (!(h === 7 || h === 11))
217
- return !1;
218
- T(a);
219
- const A = a.currentPeek() === ":";
220
- return a.resetPeek(), A;
221
- }
222
- function j(a, o) {
223
- const { currentType: h } = o;
224
- if (h !== 9)
225
- return !1;
226
- const A = () => {
227
- const P = a.currentPeek();
228
- return P === "{" ? i(a.peek()) : P === "@" || P === "|" || P === ":" || P === "." || P === _e || !P ? !1 : P === q ? (a.peek(), A()) : S(a, !1);
229
- }, x = A();
230
- return a.resetPeek(), x;
231
- }
232
- function D(a) {
233
- T(a);
234
- const o = a.currentPeek() === "|";
235
- return a.resetPeek(), o;
236
- }
237
- function S(a, o = !0) {
238
- const h = (x = !1, P = "") => {
239
- const f = a.currentPeek();
240
- return f === "{" || f === "@" || !f ? x : f === "|" ? !(P === _e || P === q) : f === _e ? (a.peek(), h(!0, _e)) : f === q ? (a.peek(), h(!0, q)) : !0;
241
- }, A = h();
242
- return o && a.resetPeek(), A;
243
- }
244
- function L(a, o) {
245
- const h = a.currentChar();
246
- return h === be ? be : o(h) ? (a.next(), h) : null;
247
- }
248
- function Z(a) {
249
- const o = a.charCodeAt(0);
250
- return o >= 97 && o <= 122 || // a-z
251
- o >= 65 && o <= 90 || // A-Z
252
- o >= 48 && o <= 57 || // 0-9
253
- o === 95 || // _
254
- o === 36;
255
- }
256
- function re(a) {
257
- return L(a, Z);
258
- }
259
- function Le(a) {
260
- const o = a.charCodeAt(0);
261
- return o >= 97 && o <= 122 || // a-z
262
- o >= 65 && o <= 90 || // A-Z
263
- o >= 48 && o <= 57 || // 0-9
264
- o === 95 || // _
265
- o === 36 || // $
266
- o === 45;
267
- }
268
- function oe(a) {
269
- return L(a, Le);
270
- }
271
- function ut(a) {
272
- const o = a.charCodeAt(0);
273
- return o >= 48 && o <= 57;
274
- }
275
- function mt(a) {
276
- return L(a, ut);
277
- }
278
- function de(a) {
279
- const o = a.charCodeAt(0);
280
- return o >= 48 && o <= 57 || // 0-9
281
- o >= 65 && o <= 70 || // A-F
282
- o >= 97 && o <= 102;
283
- }
284
- function He(a) {
285
- return L(a, de);
286
- }
287
- function Be(a) {
288
- let o = "", h = "";
289
- for (; o = mt(a); )
290
- h += o;
291
- return h;
292
- }
293
- function dt(a) {
294
- let o = "";
295
- for (; ; ) {
296
- const h = a.currentChar();
297
- if (h === "{" || h === "}" || h === "@" || h === "|" || !h)
298
- break;
299
- if (h === _e || h === q)
300
- if (S(a))
301
- o += h, a.next();
302
- else {
303
- if (D(a))
304
- break;
305
- o += h, a.next();
306
- }
307
- else
308
- o += h, a.next();
309
- }
310
- return o;
311
- }
312
- function _t(a) {
313
- k(a);
314
- let o = "", h = "";
315
- for (; o = oe(a); )
316
- h += o;
317
- return a.currentChar() === be && E(V.UNTERMINATED_CLOSING_BRACE, r(), 0), h;
318
- }
319
- function ft(a) {
320
- k(a);
321
- let o = "";
322
- return a.currentChar() === "-" ? (a.next(), o += `-${Be(a)}`) : o += Be(a), a.currentChar() === be && E(V.UNTERMINATED_CLOSING_BRACE, r(), 0), o;
323
- }
324
- function $t(a) {
325
- return a !== tn && a !== q;
326
- }
327
- function pt(a) {
328
- k(a), M(a, "'");
329
- let o = "", h = "";
330
- for (; o = L(a, $t); )
331
- o === "\\" ? h += ht(a) : h += o;
332
- const A = a.currentChar();
333
- return A === q || A === be ? (E(V.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), A === q && (a.next(), M(a, "'")), h) : (M(a, "'"), h);
334
- }
335
- function ht(a) {
336
- const o = a.currentChar();
337
- switch (o) {
338
- case "\\":
339
- case "'":
340
- return a.next(), `\\${o}`;
341
- case "u":
342
- return Je(a, o, 4);
343
- case "U":
344
- return Je(a, o, 6);
345
- default:
346
- return E(V.UNKNOWN_ESCAPE_SEQUENCE, r(), 0, o), "";
347
- }
348
- }
349
- function Je(a, o, h) {
350
- M(a, o);
351
- let A = "";
352
- for (let x = 0; x < h; x++) {
353
- const P = He(a);
354
- if (!P) {
355
- E(V.INVALID_UNICODE_ESCAPE_SEQUENCE, r(), 0, `\\${o}${A}${a.currentChar()}`);
356
- break;
357
- }
358
- A += P;
359
- }
360
- return `\\${o}${A}`;
361
- }
362
- function bt(a) {
363
- return a !== "{" && a !== "}" && a !== _e && a !== q;
364
- }
365
- function gt(a) {
366
- k(a);
367
- let o = "", h = "";
368
- for (; o = L(a, bt); )
369
- h += o;
370
- return h;
371
- }
372
- function Et(a) {
373
- let o = "", h = "";
374
- for (; o = re(a); )
375
- h += o;
376
- return h;
377
- }
378
- function It(a) {
379
- const o = (h) => {
380
- const A = a.currentChar();
381
- return A === "{" || A === "@" || A === "|" || A === "(" || A === ")" || !A || A === _e ? h : (h += A, a.next(), o(h));
382
- };
383
- return o("");
384
- }
385
- function Fe(a) {
386
- k(a);
387
- const o = M(
388
- a,
389
- "|"
390
- /* TokenChars.Pipe */
391
- );
392
- return k(a), o;
393
- }
394
- function Re(a, o) {
395
- let h = null;
396
- switch (a.currentChar()) {
397
- case "{":
398
- return o.braceNest >= 1 && E(V.NOT_ALLOW_NEST_PLACEHOLDER, r(), 0), a.next(), h = g(
399
- o,
400
- 2,
401
- "{"
402
- /* TokenChars.BraceLeft */
403
- ), k(a), o.braceNest++, h;
404
- case "}":
405
- return o.braceNest > 0 && o.currentType === 2 && E(V.EMPTY_PLACEHOLDER, r(), 0), a.next(), h = g(
406
- o,
407
- 3,
408
- "}"
409
- /* TokenChars.BraceRight */
410
- ), o.braceNest--, o.braceNest > 0 && k(a), o.inLinked && o.braceNest === 0 && (o.inLinked = !1), h;
411
- case "@":
412
- return o.braceNest > 0 && E(V.UNTERMINATED_CLOSING_BRACE, r(), 0), h = Ce(a, o) || C(o), o.braceNest = 0, h;
413
- default: {
414
- let x = !0, P = !0, f = !0;
415
- if (D(a))
416
- return o.braceNest > 0 && E(V.UNTERMINATED_CLOSING_BRACE, r(), 0), h = g(o, 1, Fe(a)), o.braceNest = 0, o.inLinked = !1, h;
417
- if (o.braceNest > 0 && (o.currentType === 4 || o.currentType === 5 || o.currentType === 6))
418
- return E(V.UNTERMINATED_CLOSING_BRACE, r(), 0), o.braceNest = 0, Ve(a, o);
419
- if (x = v(a, o))
420
- return h = g(o, 4, _t(a)), k(a), h;
421
- if (P = p(a, o))
422
- return h = g(o, 5, ft(a)), k(a), h;
423
- if (f = O(a, o))
424
- return h = g(o, 6, pt(a)), k(a), h;
425
- if (!x && !P && !f)
426
- return h = g(o, 12, gt(a)), E(V.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, h.value), k(a), h;
427
- break;
428
- }
429
- }
430
- return h;
431
- }
432
- function Ce(a, o) {
433
- const { currentType: h } = o;
434
- let A = null;
435
- const x = a.currentChar();
436
- switch ((h === 7 || h === 8 || h === 11 || h === 9) && (x === q || x === _e) && E(V.INVALID_LINKED_FORMAT, r(), 0), x) {
437
- case "@":
438
- return a.next(), A = g(
439
- o,
440
- 7,
441
- "@"
442
- /* TokenChars.LinkedAlias */
443
- ), o.inLinked = !0, A;
444
- case ".":
445
- return k(a), a.next(), g(
446
- o,
447
- 8,
448
- "."
449
- /* TokenChars.LinkedDot */
450
- );
451
- case ":":
452
- return k(a), a.next(), g(
453
- o,
454
- 9,
455
- ":"
456
- /* TokenChars.LinkedDelimiter */
457
- );
458
- default:
459
- return D(a) ? (A = g(o, 1, Fe(a)), o.braceNest = 0, o.inLinked = !1, A) : y(a, o) || X(a, o) ? (k(a), Ce(a, o)) : N(a, o) ? (k(a), g(o, 11, Et(a))) : j(a, o) ? (k(a), x === "{" ? Re(a, o) || A : g(o, 10, It(a))) : (h === 7 && E(V.INVALID_LINKED_FORMAT, r(), 0), o.braceNest = 0, o.inLinked = !1, Ve(a, o));
460
- }
461
- }
462
- function Ve(a, o) {
463
- let h = {
464
- type: 13
465
- /* TokenTypes.EOF */
466
- };
467
- if (o.braceNest > 0)
468
- return Re(a, o) || C(o);
469
- if (o.inLinked)
470
- return Ce(a, o) || C(o);
471
- switch (a.currentChar()) {
472
- case "{":
473
- return Re(a, o) || C(o);
474
- case "}":
475
- return E(V.UNBALANCED_CLOSING_BRACE, r(), 0), a.next(), g(
476
- o,
477
- 3,
478
- "}"
479
- /* TokenChars.BraceRight */
480
- );
481
- case "@":
482
- return Ce(a, o) || C(o);
483
- default: {
484
- if (D(a))
485
- return h = g(o, 1, Fe(a)), o.braceNest = 0, o.inLinked = !1, h;
486
- if (S(a))
487
- return g(o, 0, dt(a));
488
- break;
489
- }
490
- }
491
- return h;
492
- }
493
- function Nt() {
494
- const { currentType: a, offset: o, startLoc: h, endLoc: A } = u;
495
- return u.lastType = a, u.lastOffset = o, u.lastStartLoc = h, u.lastEndLoc = A, u.offset = l(), u.startLoc = r(), s.currentChar() === be ? g(
496
- u,
497
- 13
498
- /* TokenTypes.EOF */
499
- ) : Ve(s, u);
500
- }
501
- return {
502
- nextToken: Nt,
503
- currentOffset: l,
504
- currentPosition: r,
505
- context: _
506
- };
507
- }
508
- const ys = "parser", ks = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
509
- function Os(e, t, n) {
510
- switch (e) {
511
- case "\\\\":
512
- return "\\";
513
- case "\\'":
514
- return "'";
515
- default: {
516
- const s = parseInt(t || n, 16);
517
- return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
518
- }
519
- }
520
- }
521
- function Ls(e = {}) {
522
- const t = e.location !== !1, { onError: n } = e;
523
- function s(i, d, v, p, ...O) {
524
- const y = i.currentPosition();
525
- if (y.offset += p, y.column += p, n) {
526
- const N = t ? St(v, y) : null, X = ot(d, N, {
527
- domain: ys,
528
- args: O
529
- });
530
- n(X);
531
- }
532
- }
533
- function l(i, d, v) {
534
- const p = { type: i };
535
- return t && (p.start = d, p.end = d, p.loc = { start: v, end: v }), p;
536
- }
537
- function r(i, d, v, p) {
538
- t && (i.end = d, i.loc && (i.loc.end = v));
539
- }
540
- function c(i, d) {
541
- const v = i.context(), p = l(3, v.offset, v.startLoc);
542
- return p.value = d, r(p, i.currentOffset(), i.currentPosition()), p;
543
- }
544
- function m(i, d) {
545
- const v = i.context(), { lastOffset: p, lastStartLoc: O } = v, y = l(5, p, O);
546
- return y.index = parseInt(d, 10), i.nextToken(), r(y, i.currentOffset(), i.currentPosition()), y;
547
- }
548
- function u(i, d) {
549
- const v = i.context(), { lastOffset: p, lastStartLoc: O } = v, y = l(4, p, O);
550
- return y.key = d, i.nextToken(), r(y, i.currentOffset(), i.currentPosition()), y;
551
- }
552
- function _(i, d) {
553
- const v = i.context(), { lastOffset: p, lastStartLoc: O } = v, y = l(9, p, O);
554
- return y.value = d.replace(ks, Os), i.nextToken(), r(y, i.currentOffset(), i.currentPosition()), y;
555
- }
556
- function b(i) {
557
- const d = i.nextToken(), v = i.context(), { lastOffset: p, lastStartLoc: O } = v, y = l(8, p, O);
558
- return d.type !== 11 ? (s(i, V.UNEXPECTED_EMPTY_LINKED_MODIFIER, v.lastStartLoc, 0), y.value = "", r(y, p, O), {
559
- nextConsumeToken: d,
560
- node: y
561
- }) : (d.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(d)), y.value = d.value || "", r(y, i.currentOffset(), i.currentPosition()), {
562
- node: y
563
- });
564
- }
565
- function E(i, d) {
566
- const v = i.context(), p = l(7, v.offset, v.startLoc);
567
- return p.value = d, r(p, i.currentOffset(), i.currentPosition()), p;
568
- }
569
- function g(i) {
570
- const d = i.context(), v = l(6, d.offset, d.startLoc);
571
- let p = i.nextToken();
572
- if (p.type === 8) {
573
- const O = b(i);
574
- v.modifier = O.node, p = O.nextConsumeToken || i.nextToken();
575
- }
576
- switch (p.type !== 9 && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(p)), p = i.nextToken(), p.type === 2 && (p = i.nextToken()), p.type) {
577
- case 10:
578
- p.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(p)), v.key = E(i, p.value || "");
579
- break;
580
- case 4:
581
- p.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(p)), v.key = u(i, p.value || "");
582
- break;
583
- case 5:
584
- p.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(p)), v.key = m(i, p.value || "");
585
- break;
586
- case 6:
587
- p.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(p)), v.key = _(i, p.value || "");
588
- break;
589
- default: {
590
- s(i, V.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
591
- const O = i.context(), y = l(7, O.offset, O.startLoc);
592
- return y.value = "", r(y, O.offset, O.startLoc), v.key = y, r(v, O.offset, O.startLoc), {
593
- nextConsumeToken: p,
594
- node: v
595
- };
596
- }
597
- }
598
- return r(v, i.currentOffset(), i.currentPosition()), {
599
- node: v
600
- };
601
- }
602
- function C(i) {
603
- const d = i.context(), v = d.currentType === 1 ? i.currentOffset() : d.offset, p = d.currentType === 1 ? d.endLoc : d.startLoc, O = l(2, v, p);
604
- O.items = [];
605
- let y = null;
606
- do {
607
- const j = y || i.nextToken();
608
- switch (y = null, j.type) {
609
- case 0:
610
- j.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(j)), O.items.push(c(i, j.value || ""));
611
- break;
612
- case 5:
613
- j.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(j)), O.items.push(m(i, j.value || ""));
614
- break;
615
- case 4:
616
- j.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(j)), O.items.push(u(i, j.value || ""));
617
- break;
618
- case 6:
619
- j.value == null && s(i, V.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(j)), O.items.push(_(i, j.value || ""));
620
- break;
621
- case 7: {
622
- const D = g(i);
623
- O.items.push(D.node), y = D.nextConsumeToken || null;
624
- break;
625
- }
626
- }
627
- } while (d.currentType !== 13 && d.currentType !== 1);
628
- const N = d.currentType === 1 ? d.lastOffset : i.currentOffset(), X = d.currentType === 1 ? d.lastEndLoc : i.currentPosition();
629
- return r(O, N, X), O;
630
- }
631
- function M(i, d, v, p) {
632
- const O = i.context();
633
- let y = p.items.length === 0;
634
- const N = l(1, d, v);
635
- N.cases = [], N.cases.push(p);
636
- do {
637
- const X = C(i);
638
- y || (y = X.items.length === 0), N.cases.push(X);
639
- } while (O.currentType !== 13);
640
- return y && s(i, V.MUST_HAVE_MESSAGES_IN_PLURAL, v, 0), r(N, i.currentOffset(), i.currentPosition()), N;
641
- }
642
- function T(i) {
643
- const d = i.context(), { offset: v, startLoc: p } = d, O = C(i);
644
- return d.currentType === 13 ? O : M(i, v, p, O);
645
- }
646
- function k(i) {
647
- const d = Ts(i, z({}, e)), v = d.context(), p = l(0, v.offset, v.startLoc);
648
- return t && p.loc && (p.loc.source = i), p.body = T(d), e.onCacheKey && (p.cacheKey = e.onCacheKey(i)), v.currentType !== 13 && s(d, V.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, i[v.offset] || ""), r(p, d.currentOffset(), d.currentPosition()), p;
649
- }
650
- return { parse: k };
651
- }
652
- function ue(e) {
653
- if (e.type === 13)
654
- return "EOF";
655
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
656
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
657
- }
658
- function Rs(e, t = {}) {
659
- const n = {
660
- ast: e,
661
- helpers: /* @__PURE__ */ new Set()
662
- };
663
- return { context: () => n, helper: (r) => (n.helpers.add(r), r) };
664
- }
665
- function nn(e, t) {
666
- for (let n = 0; n < e.length; n++)
667
- Zt(e[n], t);
668
- }
669
- function Zt(e, t) {
670
- switch (e.type) {
671
- case 1:
672
- nn(e.cases, t), t.helper(
673
- "plural"
674
- /* HelperNameMap.PLURAL */
675
- );
676
- break;
677
- case 2:
678
- nn(e.items, t);
679
- break;
680
- case 6: {
681
- Zt(e.key, t), t.helper(
682
- "linked"
683
- /* HelperNameMap.LINKED */
684
- ), t.helper(
685
- "type"
686
- /* HelperNameMap.TYPE */
687
- );
688
- break;
689
- }
690
- case 5:
691
- t.helper(
692
- "interpolate"
693
- /* HelperNameMap.INTERPOLATE */
694
- ), t.helper(
695
- "list"
696
- /* HelperNameMap.LIST */
697
- );
698
- break;
699
- case 4:
700
- t.helper(
701
- "interpolate"
702
- /* HelperNameMap.INTERPOLATE */
703
- ), t.helper(
704
- "named"
705
- /* HelperNameMap.NAMED */
706
- );
707
- break;
708
- }
709
- }
710
- function Cs(e, t = {}) {
711
- const n = Rs(e);
712
- n.helper(
713
- "normalize"
714
- /* HelperNameMap.NORMALIZE */
715
- ), e.body && Zt(e.body, n);
716
- const s = n.context();
717
- e.helpers = Array.from(s.helpers);
718
- }
719
- function Ss(e) {
720
- const t = e.body;
721
- return t.type === 2 ? sn(t) : t.cases.forEach((n) => sn(n)), e;
722
- }
723
- function sn(e) {
724
- if (e.items.length === 1) {
725
- const t = e.items[0];
726
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
727
- } else {
728
- const t = [];
729
- for (let n = 0; n < e.items.length; n++) {
730
- const s = e.items[n];
731
- if (!(s.type === 3 || s.type === 9) || s.value == null)
732
- break;
733
- t.push(s.value);
734
- }
735
- if (t.length === e.items.length) {
736
- e.static = Xt(t);
737
- for (let n = 0; n < e.items.length; n++) {
738
- const s = e.items[n];
739
- (s.type === 3 || s.type === 9) && delete s.value;
740
- }
741
- }
742
- }
743
- }
744
- function Ae(e) {
745
- switch (e.t = e.type, e.type) {
746
- case 0: {
747
- const t = e;
748
- Ae(t.body), t.b = t.body, delete t.body;
749
- break;
750
- }
751
- case 1: {
752
- const t = e, n = t.cases;
753
- for (let s = 0; s < n.length; s++)
754
- Ae(n[s]);
755
- t.c = n, delete t.cases;
756
- break;
757
- }
758
- case 2: {
759
- const t = e, n = t.items;
760
- for (let s = 0; s < n.length; s++)
761
- Ae(n[s]);
762
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
763
- break;
764
- }
765
- case 3:
766
- case 9:
767
- case 8:
768
- case 7: {
769
- const t = e;
770
- t.value && (t.v = t.value, delete t.value);
771
- break;
772
- }
773
- case 6: {
774
- const t = e;
775
- Ae(t.key), t.k = t.key, delete t.key, t.modifier && (Ae(t.modifier), t.m = t.modifier, delete t.modifier);
776
- break;
777
- }
778
- case 5: {
779
- const t = e;
780
- t.i = t.index, delete t.index;
781
- break;
782
- }
783
- case 4: {
784
- const t = e;
785
- t.k = t.key, delete t.key;
786
- break;
787
- }
788
- }
789
- delete e.type;
790
- }
791
- function As(e, t) {
792
- const { filename: n, breakLineCode: s, needIndent: l } = t, r = t.location !== !1, c = {
793
- filename: n,
794
- code: "",
795
- column: 1,
796
- line: 1,
797
- offset: 0,
798
- map: void 0,
799
- breakLineCode: s,
800
- needIndent: l,
801
- indentLevel: 0
802
- };
803
- r && e.loc && (c.source = e.loc.source);
804
- const m = () => c;
805
- function u(T, k) {
806
- c.code += T;
807
- }
808
- function _(T, k = !0) {
809
- const i = k ? s : "";
810
- u(l ? i + " ".repeat(T) : i);
811
- }
812
- function b(T = !0) {
813
- const k = ++c.indentLevel;
814
- T && _(k);
815
- }
816
- function E(T = !0) {
817
- const k = --c.indentLevel;
818
- T && _(k);
819
- }
820
- function g() {
821
- _(c.indentLevel);
822
- }
823
- return {
824
- context: m,
825
- push: u,
826
- indent: b,
827
- deindent: E,
828
- newline: g,
829
- helper: (T) => `_${T}`,
830
- needIndent: () => c.needIndent
831
- };
832
- }
833
- function Ds(e, t) {
834
- const { helper: n } = e;
835
- e.push(`${n(
836
- "linked"
837
- /* HelperNameMap.LINKED */
838
- )}(`), De(e, t.key), t.modifier ? (e.push(", "), De(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
839
- }
840
- function Ms(e, t) {
841
- const { helper: n, needIndent: s } = e;
842
- e.push(`${n(
843
- "normalize"
844
- /* HelperNameMap.NORMALIZE */
845
- )}([`), e.indent(s());
846
- const l = t.items.length;
847
- for (let r = 0; r < l && (De(e, t.items[r]), r !== l - 1); r++)
848
- e.push(", ");
849
- e.deindent(s()), e.push("])");
850
- }
851
- function Ps(e, t) {
852
- const { helper: n, needIndent: s } = e;
853
- if (t.cases.length > 1) {
854
- e.push(`${n(
855
- "plural"
856
- /* HelperNameMap.PLURAL */
857
- )}([`), e.indent(s());
858
- const l = t.cases.length;
859
- for (let r = 0; r < l && (De(e, t.cases[r]), r !== l - 1); r++)
860
- e.push(", ");
861
- e.deindent(s()), e.push("])");
862
- }
863
- }
864
- function ws(e, t) {
865
- t.body ? De(e, t.body) : e.push("null");
866
- }
867
- function De(e, t) {
868
- const { helper: n } = e;
869
- switch (t.type) {
870
- case 0:
871
- ws(e, t);
872
- break;
873
- case 1:
874
- Ps(e, t);
875
- break;
876
- case 2:
877
- Ms(e, t);
878
- break;
879
- case 6:
880
- Ds(e, t);
881
- break;
882
- case 8:
883
- e.push(JSON.stringify(t.value), t);
884
- break;
885
- case 7:
886
- e.push(JSON.stringify(t.value), t);
887
- break;
888
- case 5:
889
- e.push(`${n(
890
- "interpolate"
891
- /* HelperNameMap.INTERPOLATE */
892
- )}(${n(
893
- "list"
894
- /* HelperNameMap.LIST */
895
- )}(${t.index}))`, t);
896
- break;
897
- case 4:
898
- e.push(`${n(
899
- "interpolate"
900
- /* HelperNameMap.INTERPOLATE */
901
- )}(${n(
902
- "named"
903
- /* HelperNameMap.NAMED */
904
- )}(${JSON.stringify(t.key)}))`, t);
905
- break;
906
- case 9:
907
- e.push(JSON.stringify(t.value), t);
908
- break;
909
- case 3:
910
- e.push(JSON.stringify(t.value), t);
911
- break;
912
- }
913
- }
914
- const Fs = (e, t = {}) => {
915
- const n = R(t.mode) ? t.mode : "normal", s = R(t.filename) ? t.filename : "message.intl";
916
- t.sourceMap;
917
- const l = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
918
- `, r = t.needIndent ? t.needIndent : n !== "arrow", c = e.helpers || [], m = As(e, {
919
- filename: s,
920
- breakLineCode: l,
921
- needIndent: r
922
- });
923
- m.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), m.indent(r), c.length > 0 && (m.push(`const { ${Xt(c.map((b) => `${b}: _${b}`), ", ")} } = ctx`), m.newline()), m.push("return "), De(m, e), m.deindent(r), m.push("}"), delete e.helpers;
924
- const { code: u, map: _ } = m.context();
925
- return {
926
- ast: e,
927
- code: u,
928
- map: _ ? _.toJSON() : void 0
929
- // eslint-disable-line @typescript-eslint/no-explicit-any
930
- };
931
- };
932
- function Vs(e, t = {}) {
933
- const n = z({}, t), s = !!n.jit, l = !!n.minify, r = n.optimize == null ? !0 : n.optimize, m = Ls(n).parse(e);
934
- return s ? (r && Ss(m), l && Ae(m), { ast: m, code: "" }) : (Cs(m, n), Fs(m, n));
935
- }
936
- var Us = { env: { NODE_ENV: "production" } };
937
- function Ws() {
938
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Te().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Te().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
939
- }
940
- function Tt(e) {
941
- return (n) => Gs(n, e);
942
- }
943
- function Gs(e, t) {
944
- const n = Xs(t);
945
- if (n == null)
946
- throw Xe(
947
- 0
948
- /* NodeTypes.Resource */
949
- );
950
- if (Yt(n) === 1) {
951
- const r = Ys(n);
952
- return e.plural(r.reduce((c, m) => [
953
- ...c,
954
- rn(e, m)
955
- ], []));
956
- } else
957
- return rn(e, n);
958
- }
959
- const js = ["b", "body"];
960
- function Xs(e) {
961
- return ge(e, js);
962
- }
963
- const Zs = ["c", "cases"];
964
- function Ys(e) {
965
- return ge(e, Zs, []);
966
- }
967
- function rn(e, t) {
968
- const n = Hs(t);
969
- if (n != null)
970
- return e.type === "text" ? n : e.normalize([n]);
971
- {
972
- const s = Js(t).reduce((l, r) => [...l, At(e, r)], []);
973
- return e.normalize(s);
974
- }
975
- }
976
- const xs = ["s", "static"];
977
- function Hs(e) {
978
- return ge(e, xs);
979
- }
980
- const Bs = ["i", "items"];
981
- function Js(e) {
982
- return ge(e, Bs, []);
983
- }
984
- function At(e, t) {
985
- const n = Yt(t);
986
- switch (n) {
987
- case 3:
988
- return Qe(t, n);
989
- case 9:
990
- return Qe(t, n);
991
- case 4: {
992
- const s = t;
993
- if (ie(s, "k") && s.k)
994
- return e.interpolate(e.named(s.k));
995
- if (ie(s, "key") && s.key)
996
- return e.interpolate(e.named(s.key));
997
- throw Xe(n);
998
- }
999
- case 5: {
1000
- const s = t;
1001
- if (ie(s, "i") && K(s.i))
1002
- return e.interpolate(e.list(s.i));
1003
- if (ie(s, "index") && K(s.index))
1004
- return e.interpolate(e.list(s.index));
1005
- throw Xe(n);
1006
- }
1007
- case 6: {
1008
- const s = t, l = Qs(s), r = er(s);
1009
- return e.linked(At(e, r), l ? At(e, l) : void 0, e.type);
1010
- }
1011
- case 7:
1012
- return Qe(t, n);
1013
- case 8:
1014
- return Qe(t, n);
1015
- default:
1016
- throw new Error(`unhandled node on format message part: ${n}`);
1017
- }
1018
- }
1019
- const $s = ["t", "type"];
1020
- function Yt(e) {
1021
- return ge(e, $s);
1022
- }
1023
- const Ks = ["v", "value"];
1024
- function Qe(e, t) {
1025
- const n = ge(e, Ks);
1026
- if (n)
1027
- return n;
1028
- throw Xe(t);
1029
- }
1030
- const zs = ["m", "modifier"];
1031
- function Qs(e) {
1032
- return ge(e, zs);
1033
- }
1034
- const qs = ["k", "key"];
1035
- function er(e) {
1036
- const t = ge(e, qs);
1037
- if (t)
1038
- return t;
1039
- throw Xe(
1040
- 6
1041
- /* NodeTypes.Linked */
1042
- );
1043
- }
1044
- function ge(e, t, n) {
1045
- for (let s = 0; s < t.length; s++) {
1046
- const l = t[s];
1047
- if (ie(e, l) && e[l] != null)
1048
- return e[l];
1049
- }
1050
- return n;
1051
- }
1052
- function Xe(e) {
1053
- return new Error(`unhandled node type: ${e}`);
1054
- }
1055
- const tr = (e) => e;
1056
- let qe = U();
1057
- function Me(e) {
1058
- return F(e) && Yt(e) === 0 && (ie(e, "b") || ie(e, "body"));
1059
- }
1060
- function nr(e, t = {}) {
1061
- let n = !1;
1062
- const s = t.onError || hs;
1063
- return t.onError = (l) => {
1064
- n = !0, s(l);
1065
- }, { ...Vs(e, t), detectError: n };
1066
- }
1067
- // @__NO_SIDE_EFFECTS__
1068
- function sr(e, t) {
1069
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && R(e)) {
1070
- J(t.warnHtmlMessage) && t.warnHtmlMessage;
1071
- const s = (t.onCacheKey || tr)(e), l = qe[s];
1072
- if (l)
1073
- return l;
1074
- const { ast: r, detectError: c } = nr(e, {
1075
- ...t,
1076
- location: Us.env.NODE_ENV !== "production",
1077
- jit: !0
1078
- }), m = Tt(r);
1079
- return c ? m : qe[s] = m;
1080
- } else {
1081
- const n = e.cacheKey;
1082
- if (n) {
1083
- const s = qe[n];
1084
- return s || (qe[n] = Tt(e));
1085
- } else
1086
- return Tt(e);
1087
- }
1088
- }
1089
- let Ze = null;
1090
- function rr(e) {
1091
- Ze = e;
1092
- }
1093
- function ar(e, t, n) {
1094
- Ze && Ze.emit("i18n:init", {
1095
- timestamp: Date.now(),
1096
- i18n: e,
1097
- version: t,
1098
- meta: n
1099
- });
1100
- }
1101
- const lr = /* @__PURE__ */ or("function:translate");
1102
- function or(e) {
1103
- return (t) => Ze && Ze.emit(e, t);
1104
- }
1105
- const fe = {
1106
- INVALID_ARGUMENT: ps,
1107
- // 17
1108
- INVALID_DATE_ARGUMENT: 18,
1109
- INVALID_ISO_DATE_ARGUMENT: 19,
1110
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1111
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1112
- NOT_SUPPORT_LOCALE_TYPE: 23
1113
- }, ir = 24;
1114
- function pe(e) {
1115
- return ot(e, null, void 0);
1116
- }
1117
- function xt(e, t) {
1118
- return t.locale != null ? an(t.locale) : an(e.locale);
1119
- }
1120
- let yt;
1121
- function an(e) {
1122
- if (R(e))
1123
- return e;
1124
- if (Y(e)) {
1125
- if (e.resolvedOnce && yt != null)
1126
- return yt;
1127
- if (e.constructor.name === "Function") {
1128
- const t = e();
1129
- if (ms(t))
1130
- throw pe(fe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1131
- return yt = t;
1132
- } else
1133
- throw pe(fe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1134
- } else
1135
- throw pe(fe.NOT_SUPPORT_LOCALE_TYPE);
1136
- }
1137
- function cr(e, t, n) {
1138
- return [.../* @__PURE__ */ new Set([
1139
- n,
1140
- ...$(t) ? t : F(t) ? Object.keys(t) : R(t) ? [t] : [n]
1141
- ])];
1142
- }
1143
- function Cn(e, t, n) {
1144
- const s = R(n) ? n : rt, l = e;
1145
- l.__localeChainCache || (l.__localeChainCache = /* @__PURE__ */ new Map());
1146
- let r = l.__localeChainCache.get(s);
1147
- if (!r) {
1148
- r = [];
1149
- let c = [n];
1150
- for (; $(c); )
1151
- c = ln(r, c, t);
1152
- const m = $(t) || !w(t) ? t : t.default ? t.default : null;
1153
- c = R(m) ? [m] : m, $(c) && ln(r, c, !1), l.__localeChainCache.set(s, r);
1154
- }
1155
- return r;
1156
- }
1157
- function ln(e, t, n) {
1158
- let s = !0;
1159
- for (let l = 0; l < t.length && J(s); l++) {
1160
- const r = t[l];
1161
- R(r) && (s = ur(e, t[l], n));
1162
- }
1163
- return s;
1164
- }
1165
- function ur(e, t, n) {
1166
- let s;
1167
- const l = t.split("-");
1168
- do {
1169
- const r = l.join("-");
1170
- s = mr(e, r, n), l.splice(-1, 1);
1171
- } while (l.length && s === !0);
1172
- return s;
1173
- }
1174
- function mr(e, t, n) {
1175
- let s = !1;
1176
- if (!e.includes(t) && (s = !0, t)) {
1177
- s = t[t.length - 1] !== "!";
1178
- const l = t.replace(/!/g, "");
1179
- e.push(l), ($(n) || w(n)) && n[l] && (s = n[l]);
1180
- }
1181
- return s;
1182
- }
1183
- const Ee = [];
1184
- Ee[
1185
- 0
1186
- /* States.BEFORE_PATH */
1187
- ] = {
1188
- w: [
1189
- 0
1190
- /* States.BEFORE_PATH */
1191
- ],
1192
- i: [
1193
- 3,
1194
- 0
1195
- /* Actions.APPEND */
1196
- ],
1197
- "[": [
1198
- 4
1199
- /* States.IN_SUB_PATH */
1200
- ],
1201
- o: [
1202
- 7
1203
- /* States.AFTER_PATH */
1204
- ]
1205
- };
1206
- Ee[
1207
- 1
1208
- /* States.IN_PATH */
1209
- ] = {
1210
- w: [
1211
- 1
1212
- /* States.IN_PATH */
1213
- ],
1214
- ".": [
1215
- 2
1216
- /* States.BEFORE_IDENT */
1217
- ],
1218
- "[": [
1219
- 4
1220
- /* States.IN_SUB_PATH */
1221
- ],
1222
- o: [
1223
- 7
1224
- /* States.AFTER_PATH */
1225
- ]
1226
- };
1227
- Ee[
1228
- 2
1229
- /* States.BEFORE_IDENT */
1230
- ] = {
1231
- w: [
1232
- 2
1233
- /* States.BEFORE_IDENT */
1234
- ],
1235
- i: [
1236
- 3,
1237
- 0
1238
- /* Actions.APPEND */
1239
- ],
1240
- 0: [
1241
- 3,
1242
- 0
1243
- /* Actions.APPEND */
1244
- ]
1245
- };
1246
- Ee[
1247
- 3
1248
- /* States.IN_IDENT */
1249
- ] = {
1250
- i: [
1251
- 3,
1252
- 0
1253
- /* Actions.APPEND */
1254
- ],
1255
- 0: [
1256
- 3,
1257
- 0
1258
- /* Actions.APPEND */
1259
- ],
1260
- w: [
1261
- 1,
1262
- 1
1263
- /* Actions.PUSH */
1264
- ],
1265
- ".": [
1266
- 2,
1267
- 1
1268
- /* Actions.PUSH */
1269
- ],
1270
- "[": [
1271
- 4,
1272
- 1
1273
- /* Actions.PUSH */
1274
- ],
1275
- o: [
1276
- 7,
1277
- 1
1278
- /* Actions.PUSH */
1279
- ]
1280
- };
1281
- Ee[
1282
- 4
1283
- /* States.IN_SUB_PATH */
1284
- ] = {
1285
- "'": [
1286
- 5,
1287
- 0
1288
- /* Actions.APPEND */
1289
- ],
1290
- '"': [
1291
- 6,
1292
- 0
1293
- /* Actions.APPEND */
1294
- ],
1295
- "[": [
1296
- 4,
1297
- 2
1298
- /* Actions.INC_SUB_PATH_DEPTH */
1299
- ],
1300
- "]": [
1301
- 1,
1302
- 3
1303
- /* Actions.PUSH_SUB_PATH */
1304
- ],
1305
- o: 8,
1306
- l: [
1307
- 4,
1308
- 0
1309
- /* Actions.APPEND */
1310
- ]
1311
- };
1312
- Ee[
1313
- 5
1314
- /* States.IN_SINGLE_QUOTE */
1315
- ] = {
1316
- "'": [
1317
- 4,
1318
- 0
1319
- /* Actions.APPEND */
1320
- ],
1321
- o: 8,
1322
- l: [
1323
- 5,
1324
- 0
1325
- /* Actions.APPEND */
1326
- ]
1327
- };
1328
- Ee[
1329
- 6
1330
- /* States.IN_DOUBLE_QUOTE */
1331
- ] = {
1332
- '"': [
1333
- 4,
1334
- 0
1335
- /* Actions.APPEND */
1336
- ],
1337
- o: 8,
1338
- l: [
1339
- 6,
1340
- 0
1341
- /* Actions.APPEND */
1342
- ]
1343
- };
1344
- const dr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1345
- function _r(e) {
1346
- return dr.test(e);
1347
- }
1348
- function fr(e) {
1349
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1350
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1351
- }
1352
- function pr(e) {
1353
- if (e == null)
1354
- return "o";
1355
- switch (e.charCodeAt(0)) {
1356
- case 91:
1357
- case 93:
1358
- case 46:
1359
- case 34:
1360
- case 39:
1361
- return e;
1362
- case 95:
1363
- case 36:
1364
- case 45:
1365
- return "i";
1366
- case 9:
1367
- case 10:
1368
- case 13:
1369
- case 160:
1370
- case 65279:
1371
- case 8232:
1372
- case 8233:
1373
- return "w";
1374
- }
1375
- return "i";
1376
- }
1377
- function hr(e) {
1378
- const t = e.trim();
1379
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : _r(t) ? fr(t) : "*" + t;
1380
- }
1381
- function br(e) {
1382
- const t = [];
1383
- let n = -1, s = 0, l = 0, r, c, m, u, _, b, E;
1384
- const g = [];
1385
- g[
1386
- 0
1387
- /* Actions.APPEND */
1388
- ] = () => {
1389
- c === void 0 ? c = m : c += m;
1390
- }, g[
1391
- 1
1392
- /* Actions.PUSH */
1393
- ] = () => {
1394
- c !== void 0 && (t.push(c), c = void 0);
1395
- }, g[
1396
- 2
1397
- /* Actions.INC_SUB_PATH_DEPTH */
1398
- ] = () => {
1399
- g[
1400
- 0
1401
- /* Actions.APPEND */
1402
- ](), l++;
1403
- }, g[
1404
- 3
1405
- /* Actions.PUSH_SUB_PATH */
1406
- ] = () => {
1407
- if (l > 0)
1408
- l--, s = 4, g[
1409
- 0
1410
- /* Actions.APPEND */
1411
- ]();
1412
- else {
1413
- if (l = 0, c === void 0 || (c = hr(c), c === !1))
1414
- return !1;
1415
- g[
1416
- 1
1417
- /* Actions.PUSH */
1418
- ]();
1419
- }
1420
- };
1421
- function C() {
1422
- const M = e[n + 1];
1423
- if (s === 5 && M === "'" || s === 6 && M === '"')
1424
- return n++, m = "\\" + M, g[
1425
- 0
1426
- /* Actions.APPEND */
1427
- ](), !0;
1428
- }
1429
- for (; s !== null; )
1430
- if (n++, r = e[n], !(r === "\\" && C())) {
1431
- if (u = pr(r), E = Ee[s], _ = E[u] || E.l || 8, _ === 8 || (s = _[0], _[1] !== void 0 && (b = g[_[1]], b && (m = r, b() === !1))))
1432
- return;
1433
- if (s === 7)
1434
- return t;
1435
- }
1436
- }
1437
- const on = /* @__PURE__ */ new Map();
1438
- function gr(e, t) {
1439
- return F(e) ? e[t] : null;
1440
- }
1441
- function Er(e, t) {
1442
- if (!F(e))
1443
- return null;
1444
- let n = on.get(t);
1445
- if (n || (n = br(t), n && on.set(t, n)), !n)
1446
- return null;
1447
- const s = n.length;
1448
- let l = e, r = 0;
1449
- for (; r < s; ) {
1450
- const c = l[n[r]];
1451
- if (c === void 0 || Y(l))
1452
- return null;
1453
- l = c, r++;
1454
- }
1455
- return l;
1456
- }
1457
- const Ir = "10.0.5", it = -1, rt = "en-US", cn = "", un = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1458
- function Nr() {
1459
- return {
1460
- upper: (e, t) => t === "text" && R(e) ? e.toUpperCase() : t === "vnode" && F(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1461
- lower: (e, t) => t === "text" && R(e) ? e.toLowerCase() : t === "vnode" && F(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1462
- capitalize: (e, t) => t === "text" && R(e) ? un(e) : t === "vnode" && F(e) && "__v_isVNode" in e ? un(e.children) : e
1463
- };
1464
- }
1465
- let Sn;
1466
- function vr(e) {
1467
- Sn = e;
1468
- }
1469
- let An;
1470
- function Tr(e) {
1471
- An = e;
1472
- }
1473
- let Dn;
1474
- function yr(e) {
1475
- Dn = e;
1476
- }
1477
- let Mn = null;
1478
- const kr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1479
- Mn = e;
1480
- }, Or = /* @__NO_SIDE_EFFECTS__ */ () => Mn;
1481
- let Pn = null;
1482
- const mn = (e) => {
1483
- Pn = e;
1484
- }, Lr = () => Pn;
1485
- let dn = 0;
1486
- function Rr(e = {}) {
1487
- const t = Y(e.onWarn) ? e.onWarn : _s, n = R(e.version) ? e.version : Ir, s = R(e.locale) || Y(e.locale) ? e.locale : rt, l = Y(s) ? rt : s, r = $(e.fallbackLocale) || w(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l, c = w(e.messages) ? e.messages : kt(l), m = w(e.datetimeFormats) ? e.datetimeFormats : kt(l), u = w(e.numberFormats) ? e.numberFormats : kt(l), _ = z(U(), e.modifiers, Nr()), b = e.pluralRules || U(), E = Y(e.missing) ? e.missing : null, g = J(e.missingWarn) || st(e.missingWarn) ? e.missingWarn : !0, C = J(e.fallbackWarn) || st(e.fallbackWarn) ? e.fallbackWarn : !0, M = !!e.fallbackFormat, T = !!e.unresolving, k = Y(e.postTranslation) ? e.postTranslation : null, i = w(e.processor) ? e.processor : null, d = J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, v = !!e.escapeParameter, p = Y(e.messageCompiler) ? e.messageCompiler : Sn, O = Y(e.messageResolver) ? e.messageResolver : An || gr, y = Y(e.localeFallbacker) ? e.localeFallbacker : Dn || cr, N = F(e.fallbackContext) ? e.fallbackContext : void 0, X = e, j = F(X.__datetimeFormatters) ? X.__datetimeFormatters : /* @__PURE__ */ new Map(), D = F(X.__numberFormatters) ? X.__numberFormatters : /* @__PURE__ */ new Map(), S = F(X.__meta) ? X.__meta : {};
1488
- dn++;
1489
- const L = {
1490
- version: n,
1491
- cid: dn,
1492
- locale: s,
1493
- fallbackLocale: r,
1494
- messages: c,
1495
- modifiers: _,
1496
- pluralRules: b,
1497
- missing: E,
1498
- missingWarn: g,
1499
- fallbackWarn: C,
1500
- fallbackFormat: M,
1501
- unresolving: T,
1502
- postTranslation: k,
1503
- processor: i,
1504
- warnHtmlMessage: d,
1505
- escapeParameter: v,
1506
- messageCompiler: p,
1507
- messageResolver: O,
1508
- localeFallbacker: y,
1509
- fallbackContext: N,
1510
- onWarn: t,
1511
- __meta: S
1512
- };
1513
- return L.datetimeFormats = m, L.numberFormats = u, L.__datetimeFormatters = j, L.__numberFormatters = D, __INTLIFY_PROD_DEVTOOLS__ && ar(L, n, S), L;
1514
- }
1515
- const kt = (e) => ({ [e]: U() });
1516
- function Ht(e, t, n, s, l) {
1517
- const { missing: r, onWarn: c } = e;
1518
- if (r !== null) {
1519
- const m = r(e, n, t, l);
1520
- return R(m) ? m : t;
1521
- } else
1522
- return t;
1523
- }
1524
- function Ue(e, t, n) {
1525
- const s = e;
1526
- s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1527
- }
1528
- function Cr(e, t) {
1529
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1530
- }
1531
- function Sr(e, t) {
1532
- const n = t.indexOf(e);
1533
- if (n === -1)
1534
- return !1;
1535
- for (let s = n + 1; s < t.length; s++)
1536
- if (Cr(e, t[s]))
1537
- return !0;
1538
- return !1;
1539
- }
1540
- function _n(e, ...t) {
1541
- const { datetimeFormats: n, unresolving: s, fallbackLocale: l, onWarn: r, localeFallbacker: c } = e, { __datetimeFormatters: m } = e, [u, _, b, E] = Dt(...t), g = J(b.missingWarn) ? b.missingWarn : e.missingWarn;
1542
- J(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn;
1543
- const C = !!b.part, M = xt(e, b), T = c(
1544
- e,
1545
- // eslint-disable-line @typescript-eslint/no-explicit-any
1546
- l,
1547
- M
1548
- );
1549
- if (!R(u) || u === "")
1550
- return new Intl.DateTimeFormat(M, E).format(_);
1551
- let k = {}, i, d = null;
1552
- const v = "datetime format";
1553
- for (let y = 0; y < T.length && (i = T[y], k = n[i] || {}, d = k[u], !w(d)); y++)
1554
- Ht(e, u, i, g, v);
1555
- if (!w(d) || !R(i))
1556
- return s ? it : u;
1557
- let p = `${i}__${u}`;
1558
- lt(E) || (p = `${p}__${JSON.stringify(E)}`);
1559
- let O = m.get(p);
1560
- return O || (O = new Intl.DateTimeFormat(i, z({}, d, E)), m.set(p, O)), C ? O.formatToParts(_) : O.format(_);
1561
- }
1562
- const wn = [
1563
- "localeMatcher",
1564
- "weekday",
1565
- "era",
1566
- "year",
1567
- "month",
1568
- "day",
1569
- "hour",
1570
- "minute",
1571
- "second",
1572
- "timeZoneName",
1573
- "formatMatcher",
1574
- "hour12",
1575
- "timeZone",
1576
- "dateStyle",
1577
- "timeStyle",
1578
- "calendar",
1579
- "dayPeriod",
1580
- "numberingSystem",
1581
- "hourCycle",
1582
- "fractionalSecondDigits"
1583
- ];
1584
- function Dt(...e) {
1585
- const [t, n, s, l] = e, r = U();
1586
- let c = U(), m;
1587
- if (R(t)) {
1588
- const u = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1589
- if (!u)
1590
- throw pe(fe.INVALID_ISO_DATE_ARGUMENT);
1591
- const _ = u[3] ? u[3].trim().startsWith("T") ? `${u[1].trim()}${u[3].trim()}` : `${u[1].trim()}T${u[3].trim()}` : u[1].trim();
1592
- m = new Date(_);
1593
- try {
1594
- m.toISOString();
1595
- } catch {
1596
- throw pe(fe.INVALID_ISO_DATE_ARGUMENT);
1597
- }
1598
- } else if (is(t)) {
1599
- if (isNaN(t.getTime()))
1600
- throw pe(fe.INVALID_DATE_ARGUMENT);
1601
- m = t;
1602
- } else if (K(t))
1603
- m = t;
1604
- else
1605
- throw pe(fe.INVALID_ARGUMENT);
1606
- return R(n) ? r.key = n : w(n) && Object.keys(n).forEach((u) => {
1607
- wn.includes(u) ? c[u] = n[u] : r[u] = n[u];
1608
- }), R(s) ? r.locale = s : w(s) && (c = s), w(l) && (c = l), [r.key || "", m, r, c];
1609
- }
1610
- function fn(e, t, n) {
1611
- const s = e;
1612
- for (const l in n) {
1613
- const r = `${t}__${l}`;
1614
- s.__datetimeFormatters.has(r) && s.__datetimeFormatters.delete(r);
1615
- }
1616
- }
1617
- function pn(e, ...t) {
1618
- const { numberFormats: n, unresolving: s, fallbackLocale: l, onWarn: r, localeFallbacker: c } = e, { __numberFormatters: m } = e, [u, _, b, E] = Mt(...t), g = J(b.missingWarn) ? b.missingWarn : e.missingWarn;
1619
- J(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn;
1620
- const C = !!b.part, M = xt(e, b), T = c(
1621
- e,
1622
- // eslint-disable-line @typescript-eslint/no-explicit-any
1623
- l,
1624
- M
1625
- );
1626
- if (!R(u) || u === "")
1627
- return new Intl.NumberFormat(M, E).format(_);
1628
- let k = {}, i, d = null;
1629
- const v = "number format";
1630
- for (let y = 0; y < T.length && (i = T[y], k = n[i] || {}, d = k[u], !w(d)); y++)
1631
- Ht(e, u, i, g, v);
1632
- if (!w(d) || !R(i))
1633
- return s ? it : u;
1634
- let p = `${i}__${u}`;
1635
- lt(E) || (p = `${p}__${JSON.stringify(E)}`);
1636
- let O = m.get(p);
1637
- return O || (O = new Intl.NumberFormat(i, z({}, d, E)), m.set(p, O)), C ? O.formatToParts(_) : O.format(_);
1638
- }
1639
- const Fn = [
1640
- "localeMatcher",
1641
- "style",
1642
- "currency",
1643
- "currencyDisplay",
1644
- "currencySign",
1645
- "useGrouping",
1646
- "minimumIntegerDigits",
1647
- "minimumFractionDigits",
1648
- "maximumFractionDigits",
1649
- "minimumSignificantDigits",
1650
- "maximumSignificantDigits",
1651
- "compactDisplay",
1652
- "notation",
1653
- "signDisplay",
1654
- "unit",
1655
- "unitDisplay",
1656
- "roundingMode",
1657
- "roundingPriority",
1658
- "roundingIncrement",
1659
- "trailingZeroDisplay"
1660
- ];
1661
- function Mt(...e) {
1662
- const [t, n, s, l] = e, r = U();
1663
- let c = U();
1664
- if (!K(t))
1665
- throw pe(fe.INVALID_ARGUMENT);
1666
- const m = t;
1667
- return R(n) ? r.key = n : w(n) && Object.keys(n).forEach((u) => {
1668
- Fn.includes(u) ? c[u] = n[u] : r[u] = n[u];
1669
- }), R(s) ? r.locale = s : w(s) && (c = s), w(l) && (c = l), [r.key || "", m, r, c];
1670
- }
1671
- function hn(e, t, n) {
1672
- const s = e;
1673
- for (const l in n) {
1674
- const r = `${t}__${l}`;
1675
- s.__numberFormatters.has(r) && s.__numberFormatters.delete(r);
1676
- }
1677
- }
1678
- const Ar = (e) => e, Dr = (e) => "", Mr = "text", Pr = (e) => e.length === 0 ? "" : Xt(e), wr = ds;
1679
- function bn(e, t) {
1680
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1681
- }
1682
- function Fr(e) {
1683
- const t = K(e.pluralIndex) ? e.pluralIndex : -1;
1684
- return e.named && (K(e.named.count) || K(e.named.n)) ? K(e.named.count) ? e.named.count : K(e.named.n) ? e.named.n : t : t;
1685
- }
1686
- function Vr(e, t) {
1687
- t.count || (t.count = e), t.n || (t.n = e);
1688
- }
1689
- function Ur(e = {}) {
1690
- const t = e.locale, n = Fr(e), s = F(e.pluralRules) && R(t) && Y(e.pluralRules[t]) ? e.pluralRules[t] : bn, l = F(e.pluralRules) && R(t) && Y(e.pluralRules[t]) ? bn : void 0, r = (i) => i[s(n, i.length, l)], c = e.list || [], m = (i) => c[i], u = e.named || U();
1691
- K(e.pluralIndex) && Vr(n, u);
1692
- const _ = (i) => u[i];
1693
- function b(i, d) {
1694
- const v = Y(e.messages) ? e.messages(i, !!d) : F(e.messages) ? e.messages[i] : !1;
1695
- return v || (e.parent ? e.parent.message(i) : Dr);
1696
- }
1697
- const E = (i) => e.modifiers ? e.modifiers[i] : Ar, g = w(e.processor) && Y(e.processor.normalize) ? e.processor.normalize : Pr, C = w(e.processor) && Y(e.processor.interpolate) ? e.processor.interpolate : wr, M = w(e.processor) && R(e.processor.type) ? e.processor.type : Mr, k = {
1698
- list: m,
1699
- named: _,
1700
- plural: r,
1701
- linked: (i, ...d) => {
1702
- const [v, p] = d;
1703
- let O = "text", y = "";
1704
- d.length === 1 ? F(v) ? (y = v.modifier || y, O = v.type || O) : R(v) && (y = v || y) : d.length === 2 && (R(v) && (y = v || y), R(p) && (O = p || O));
1705
- const N = b(i, !0)(k), X = (
1706
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1707
- O === "vnode" && $(N) && y ? N[0] : N
1708
- );
1709
- return y ? E(y)(X, O) : X;
1710
- },
1711
- message: b,
1712
- type: M,
1713
- interpolate: C,
1714
- normalize: g,
1715
- values: z(U(), c, u)
1716
- };
1717
- return k;
1718
- }
1719
- const gn = () => "", ae = (e) => Y(e);
1720
- function En(e, ...t) {
1721
- const { fallbackFormat: n, postTranslation: s, unresolving: l, messageCompiler: r, fallbackLocale: c, messages: m } = e, [u, _] = Pt(...t), b = J(_.missingWarn) ? _.missingWarn : e.missingWarn, E = J(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, g = J(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, C = !!_.resolvedMessage, M = R(_.default) || J(_.default) ? J(_.default) ? r ? u : () => u : _.default : n ? r ? u : () => u : null, T = n || M != null && (R(M) || Y(M)), k = xt(e, _);
1722
- g && Wr(_);
1723
- let [i, d, v] = C ? [
1724
- u,
1725
- k,
1726
- m[k] || U()
1727
- ] : Vn(e, u, k, c, E, b), p = i, O = u;
1728
- if (!C && !(R(p) || Me(p) || ae(p)) && T && (p = M, O = p), !C && (!(R(p) || Me(p) || ae(p)) || !R(d)))
1729
- return l ? it : u;
1730
- let y = !1;
1731
- const N = () => {
1732
- y = !0;
1733
- }, X = ae(p) ? p : Un(e, u, d, p, O, N);
1734
- if (y)
1735
- return p;
1736
- const j = Xr(e, d, v, _), D = Ur(j), S = Gr(e, X, D), L = s ? s(S, u) : S;
1737
- if (__INTLIFY_PROD_DEVTOOLS__) {
1738
- const Z = {
1739
- timestamp: Date.now(),
1740
- key: R(u) ? u : ae(p) ? p.key : "",
1741
- locale: d || (ae(p) ? p.locale : ""),
1742
- format: R(p) ? p : ae(p) ? p.source : "",
1743
- message: L
1744
- };
1745
- Z.meta = z({}, e.__meta, /* @__PURE__ */ Or() || {}), lr(Z);
1746
- }
1747
- return L;
1748
- }
1749
- function Wr(e) {
1750
- $(e.list) ? e.list = e.list.map((t) => R(t) ? en(t) : t) : F(e.named) && Object.keys(e.named).forEach((t) => {
1751
- R(e.named[t]) && (e.named[t] = en(e.named[t]));
1752
- });
1753
- }
1754
- function Vn(e, t, n, s, l, r) {
1755
- const { messages: c, onWarn: m, messageResolver: u, localeFallbacker: _ } = e, b = _(e, s, n);
1756
- let E = U(), g, C = null;
1757
- const M = "translate";
1758
- for (let T = 0; T < b.length && (g = b[T], E = c[g] || U(), (C = u(E, t)) === null && (C = E[t]), !(R(C) || Me(C) || ae(C))); T++)
1759
- if (!Sr(g, b)) {
1760
- const k = Ht(
1761
- e,
1762
- // eslint-disable-line @typescript-eslint/no-explicit-any
1763
- t,
1764
- g,
1765
- r,
1766
- M
1767
- );
1768
- k !== t && (C = k);
1769
- }
1770
- return [C, g, E];
1771
- }
1772
- function Un(e, t, n, s, l, r) {
1773
- const { messageCompiler: c, warnHtmlMessage: m } = e;
1774
- if (ae(s)) {
1775
- const _ = s;
1776
- return _.locale = _.locale || n, _.key = _.key || t, _;
1777
- }
1778
- if (c == null) {
1779
- const _ = () => s;
1780
- return _.locale = n, _.key = t, _;
1781
- }
1782
- const u = c(s, jr(e, n, l, s, m, r));
1783
- return u.locale = n, u.key = t, u.source = s, u;
1784
- }
1785
- function Gr(e, t, n) {
1786
- return t(n);
1787
- }
1788
- function Pt(...e) {
1789
- const [t, n, s] = e, l = U();
1790
- if (!R(t) && !K(t) && !ae(t) && !Me(t))
1791
- throw pe(fe.INVALID_ARGUMENT);
1792
- const r = K(t) ? String(t) : (ae(t), t);
1793
- return K(n) ? l.plural = n : R(n) ? l.default = n : w(n) && !lt(n) ? l.named = n : $(n) && (l.list = n), K(s) ? l.plural = s : R(s) ? l.default = s : w(s) && z(l, s), [r, l];
1794
- }
1795
- function jr(e, t, n, s, l, r) {
1796
- return {
1797
- locale: t,
1798
- key: n,
1799
- warnHtmlMessage: l,
1800
- onError: (c) => {
1801
- throw r && r(c), c;
1802
- },
1803
- onCacheKey: (c) => ls(t, n, c)
1804
- };
1805
- }
1806
- function Xr(e, t, n, s) {
1807
- const { modifiers: l, pluralRules: r, messageResolver: c, fallbackLocale: m, fallbackWarn: u, missingWarn: _, fallbackContext: b } = e, g = {
1808
- locale: t,
1809
- modifiers: l,
1810
- pluralRules: r,
1811
- messages: (C, M) => {
1812
- let T = c(n, C);
1813
- if (T == null && (b || M)) {
1814
- const [, , k] = Vn(
1815
- b || e,
1816
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1817
- C,
1818
- t,
1819
- m,
1820
- u,
1821
- _
1822
- );
1823
- T = c(k, C);
1824
- }
1825
- if (R(T) || Me(T)) {
1826
- let k = !1;
1827
- const d = Un(e, C, t, T, C, () => {
1828
- k = !0;
1829
- });
1830
- return k ? gn : d;
1831
- } else return ae(T) ? T : gn;
1832
- }
1833
- };
1834
- return e.processor && (g.processor = e.processor), s.list && (g.list = s.list), s.named && (g.named = s.named), K(s.plural) && (g.pluralIndex = s.plural), g;
1835
- }
1836
- Ws();
1837
- var Zr = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_34692fc1-85a0-4050-a93a-c81ad6931f59", 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_34692fc1-85a0-4050-a93a-c81ad6931f59", 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", 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", 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.3.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-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1886", ACTIONS_ORCHESTRATION_ID: "ac215d50-8aa2-49ac-afa4-05e785163002.publish.publish.__default", npm_package_dependencies__feedmepos_ui_library: "^1.7.0", 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_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", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260302.42.1", 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", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", 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", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.12/x64", JOURNAL_STREAM: "9:15782", 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.7/x64", GITHUB_RUN_ID: "22911060360", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "f519a1e4e41e450645b61fc2bace5f66eff2fd72", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/KDI-3967-role-based-permission-set", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9LREktMzk2Ny1yb2xlLWJhc2VkLXBlcm1pc3Npb24tc2V0XCIsXCJQZXJtaXNzaW9uXCI6M30se1wiU2NvcGVcIjpcInJlZnMvaGVhZHMvbWFpblwiLFwiUGVybWlzc2lvblwiOjF9XSIsImFjc2wiOiIxMCIsImF1ZCI6InZzbzo2Zjk2ZmE4OS1iN2JmLTQ4NzgtYmFkMy04OTgwMDY1NjZiNmUiLCJiaWxsaW5nX293bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwiZXhwIjoxNzczMTc5NzcyLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJpYXQiOjE3NzMxNTc1NzIsImlzcyI6Imh0dHBzOi8vdG9rZW4uYWN0aW9ucy5naXRodWJ1c2VyY29udGVudC5jb20iLCJqb2JfaWQiOiI2OGIyMGU4Yi0wNDFiLTVlZmItYmM0MC0zNGE3M2U1YjBlN2MiLCJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJuYmYiOjE3NzMxNTcyNzIsIm9pZGNfZXh0cmEiOiJ7XCJhY3RvclwiOlwianVuLWxlZS1mZWVkbWVcIixcImFjdG9yX2lkXCI6XCIyMzkyODI4NjJcIixcImJhc2VfcmVmXCI6XCJcIixcImNoZWNrX3J1bl9pZFwiOlwiNjY0ODMyODk3NzhcIixcImV2ZW50X25hbWVcIjpcIndvcmtmbG93X2Rpc3BhdGNoXCIsXCJoZWFkX3JlZlwiOlwiXCIsXCJqb2Jfd29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvYWN0aW9ucy8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLW5wbS1naXRodWIueWFtbEByZWZzL2hlYWRzL21haW5cIixcImpvYl93b3JrZmxvd19zaGFcIjpcImYwOTg2ZThlOGRmZjQ1YmQ1N2M0NjYzNWJiZDYyMjc1ZmExOWU3MzFcIixcInJlZlwiOlwicmVmcy9oZWFkcy9LREktMzk2Ny1yb2xlLWJhc2VkLXBlcm1pc3Npb24tc2V0XCIsXCJyZWZfcHJvdGVjdGVkXCI6XCJmYWxzZVwiLFwicmVmX3R5cGVcIjpcImJyYW5jaFwiLFwicmVwb3NpdG9yeVwiOlwiZmVlZG1lcG9zL2hybS1zZXJ2aWNlXCIsXCJyZXBvc2l0b3J5X2lkXCI6XCIxMTI0NjcyMjM1XCIsXCJyZXBvc2l0b3J5X293bmVyXCI6XCJmZWVkbWVwb3NcIixcInJlcG9zaXRvcnlfb3duZXJfaWRcIjpcIjU0ODMxNTE1XCIsXCJyZXBvc2l0b3J5X3Zpc2liaWxpdHlcIjpcInByaXZhdGVcIixcInJ1bl9hdHRlbXB0XCI6XCIxXCIsXCJydW5faWRcIjpcIjIyOTExMDYwMzYwXCIsXCJydW5fbnVtYmVyXCI6XCIxNFwiLFwicnVubmVyX2Vudmlyb25tZW50XCI6XCJnaXRodWItaG9zdGVkXCIsXCJzaGFcIjpcImY1MTlhMWU0ZTQxZTQ1MDY0NWI2MWZjMmJhY2U1ZjY2ZWZmMmZkNzJcIixcIndvcmtmbG93XCI6XCJQdWJsaXNoIGhybS1wb3J0YWxcIixcIndvcmtmbG93X3JlZlwiOlwiZmVlZG1lcG9zL2hybS1zZXJ2aWNlLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtaHJtLXBvcnRhbC10cnVzdGVkLnltbEByZWZzL2hlYWRzL0tESS0zOTY3LXJvbGUtYmFzZWQtcGVybWlzc2lvbi1zZXRcIixcIndvcmtmbG93X3NoYVwiOlwiZjUxOWExZTRlNDFlNDUwNjQ1YjYxZmMyYmFjZTVmNjZlZmYyZmQ3MlwifSIsIm9pZGNfc3ViIjoicmVwbzpmZWVkbWVwb3MvaHJtLXNlcnZpY2U6cmVmOnJlZnMvaGVhZHMvS0RJLTM5Njctcm9sZS1iYXNlZC1wZXJtaXNzaW9uLXNldCIsIm9yY2hfaWQiOiJhYzIxNWQ1MC04YWEyLTQ5YWMtYWZhNC0wNWU3ODUxNjMwMDIucHVibGlzaC5wdWJsaXNoLl9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6ImFjMjE1ZDUwLThhYTItNDlhYy1hZmE0LTA1ZTc4NTE2MzAwMiIsInJlcG9zaXRvcnlfaWQiOiIxMTI0NjcyMjM1IiwicnVuX2lkIjoiMjI5MTEwNjAzNjAiLCJydW5fbnVtYmVyIjoiMTQiLCJydW5fdHlwZSI6ImZ1bGwiLCJydW5uZXJfaWQiOiIxMDAwMDUyMzc5IiwicnVubmVyX3R5cGUiOiJob3N0ZWQiLCJzY3AiOiJBY3Rpb25zLlJlc3VsdHM6YWMyMTVkNTAtOGFhMi00OWFjLWFmYTQtMDVlNzg1MTYzMDAyOjY4YjIwZThiLTA0MWItNWVmYi1iYzQwLTM0YTczZTViMGU3YyBBY3Rpb25zLlJ1bm5lcjphYzIxNWQ1MC04YWEyLTQ5YWMtYWZhNC0wNWU3ODUxNjMwMDI6NjhiMjBlOGItMDQxYi01ZWZiLWJjNDAtMzRhNzNlNWIwZTdjIEFjdGlvbnMuVXBsb2FkQXJ0aWZhY3RzOmFjMjE1ZDUwLThhYTItNDlhYy1hZmE0LTA1ZTc4NTE2MzAwMjo2OGIyMGU4Yi0wNDFiLTVlZmItYmM0MC0zNGE3M2U1YjBlN2MgZ2VuZXJhdGVfaWRfdG9rZW46YWMyMTVkNTAtOGFhMi00OWFjLWFmYTQtMDVlNzg1MTYzMDAyOjY4YjIwZThiLTA0MWItNWVmYi1iYzQwLTM0YTczZTViMGU3YyBBY3Rpb25zLkdlbmVyaWNSZWFkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsInNoYSI6ImY1MTlhMWU0ZTQxZTQ1MDY0NWI2MWZjMmJhY2U1ZjY2ZWZmMmZkNzIiLCJ0cnVzdF90aWVyIjoiMSJ9.4R4RQ00L23AwgSoYHjkRmEG60L0GQ1LfnzqOM9zHdiP4hEudJ6rHEQZf8ytVPRKnK3VTGg7-BGhwYDgy7qBwBwnhB2c88ZpO8DThYCtCKN0x_KNvmW-7cf0IgZdrlIDTNmhaSofyl6f1DhBY03_U7PshSkZgiTuQ0y6H5hcAdcW3wacNJPkEmMT9bJAtiX27qRnXMlRUS16bIZaXQF1IBUsG7iO1vZpThnq1mP7YBAYQQ8ZXn92LdTOAjFy8mEDX45ugcvq7ZJOEy1pOlZU0jN7A8oziGif_IwTM7Ly_F7_01-scsicSrVp5wKafj45hFcxjIn_ZA2aJjr1gLXdDPg", 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_3fc42343-a65d-4b3f-8550-09685b954639", INVOCATION_ID: "33a51525093c4ba3be39dd0204dccd07", 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_4", GITHUB_RUN_NUMBER: "14", 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 1000052379", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "KDI-3967-role-based-permission-set", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* 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: "1.1.4-dev.4", 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: "f519a1e4e41e450645b61fc2bace5f66eff2fd72", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.2", GITHUB_REF: "refs/heads/KDI-3967-role-based-permission-set", GITHUB_ACTOR: "jun-lee-feedme", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", 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_34692fc1-85a0-4050-a93a-c81ad6931f59", 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: "", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-1-azure-eastus.actions.githubusercontent.com/158//idtoken/ac215d50-8aa2-49ac-afa4-05e785163002/68b20e8b-041b-5efb-bc40-34a73e5b0e7c?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_34692fc1-85a0-4050-a93a-c81ad6931f59", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_auth: "^1.1.14", 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", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0", 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_34692fc1-85a0-4050-a93a-c81ad6931f59", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_dependencies_libphonenumber_js: "^1.11.1", NODE_ENV: "production" } };
1838
- const Yr = "10.0.5";
1839
- function xr() {
1840
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Te().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Te().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Te().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Te().__INTLIFY_PROD_DEVTOOLS__ = !1);
1841
- }
1842
- const Pe = {
1843
- // composer module errors
1844
- UNEXPECTED_RETURN_TYPE: ir,
1845
- // 24
1846
- // legacy module errors
1847
- INVALID_ARGUMENT: 25,
1848
- // i18n module errors
1849
- MUST_BE_CALL_SETUP_TOP: 26,
1850
- NOT_INSTALLED: 27,
1851
- NOT_INSTALLED_WITH_PROVIDE: 31,
1852
- // unexpected error
1853
- UNEXPECTED_ERROR: 32
1854
- };
1855
- function Ye(e, ...t) {
1856
- return ot(e, null, void 0);
1857
- }
1858
- const wt = /* @__PURE__ */ Oe("__translateVNode"), Ft = /* @__PURE__ */ Oe("__datetimeParts"), Vt = /* @__PURE__ */ Oe("__numberParts"), Hr = Oe("__setPluralRules"), Wn = /* @__PURE__ */ Oe("__injectWithOption"), Ut = /* @__PURE__ */ Oe("__dispose");
1859
- function xe(e) {
1860
- if (!F(e))
1861
- return e;
1862
- for (const t in e)
1863
- if (ie(e, t))
1864
- if (!t.includes("."))
1865
- F(e[t]) && xe(e[t]);
1866
- else {
1867
- const n = t.split("."), s = n.length - 1;
1868
- let l = e, r = !1;
1869
- for (let c = 0; c < s; c++) {
1870
- if (n[c] in l || (l[n[c]] = U()), !F(l[n[c]])) {
1871
- r = !0;
1872
- break;
1873
- }
1874
- l = l[n[c]];
1875
- }
1876
- r || (l[n[s]] = e[t], delete e[t]), F(l[n[s]]) && xe(l[n[s]]);
1877
- }
1878
- return e;
1879
- }
1880
- function Gn(e, t) {
1881
- const { messages: n, __i18n: s, messageResolver: l, flatJson: r } = t, c = w(n) ? n : $(s) ? U() : { [e]: U() };
1882
- if ($(s) && s.forEach((m) => {
1883
- if ("locale" in m && "resource" in m) {
1884
- const { locale: u, resource: _ } = m;
1885
- u ? (c[u] = c[u] || U(), nt(_, c[u])) : nt(_, c);
1886
- } else
1887
- R(m) && nt(JSON.parse(m), c);
1888
- }), l == null && r)
1889
- for (const m in c)
1890
- ie(c, m) && xe(c[m]);
1891
- return c;
1892
- }
1893
- function jn(e) {
1894
- return e.type;
1895
- }
1896
- function Br(e, t, n) {
1897
- let s = F(t.messages) ? t.messages : U();
1898
- "__i18nGlobal" in n && (s = Gn(e.locale.value, {
1899
- messages: s,
1900
- __i18n: n.__i18nGlobal
1901
- }));
1902
- const l = Object.keys(s);
1903
- l.length && l.forEach((r) => {
1904
- e.mergeLocaleMessage(r, s[r]);
1905
- });
1906
- {
1907
- if (F(t.datetimeFormats)) {
1908
- const r = Object.keys(t.datetimeFormats);
1909
- r.length && r.forEach((c) => {
1910
- e.mergeDateTimeFormat(c, t.datetimeFormats[c]);
1911
- });
1912
- }
1913
- if (F(t.numberFormats)) {
1914
- const r = Object.keys(t.numberFormats);
1915
- r.length && r.forEach((c) => {
1916
- e.mergeNumberFormat(c, t.numberFormats[c]);
1917
- });
1918
- }
1919
- }
1920
- }
1921
- function In(e) {
1922
- return ne(Bn, null, e, 0);
1923
- }
1924
- const Nn = "__INTLIFY_META__", vn = () => [], Jr = () => !1;
1925
- let Tn = 0;
1926
- function yn(e) {
1927
- return (t, n, s, l) => e(n, s, Wt() || void 0, l);
1928
- }
1929
- const $r = /* @__NO_SIDE_EFFECTS__ */ () => {
1930
- const e = Wt();
1931
- let t = null;
1932
- return e && (t = jn(e)[Nn]) ? { [Nn]: t } : null;
1933
- };
1934
- function Kr(e = {}) {
1935
- const { __root: t, __injectWithOption: n } = e, s = t === void 0, l = e.flatJson, r = Qt ? ye : Hn;
1936
- let c = J(e.inheritLocale) ? e.inheritLocale : !0;
1937
- const m = r(
1938
- // prettier-ignore
1939
- t && c ? t.locale.value : R(e.locale) ? e.locale : rt
1940
- ), u = r(
1941
- // prettier-ignore
1942
- t && c ? t.fallbackLocale.value : R(e.fallbackLocale) || $(e.fallbackLocale) || w(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : m.value
1943
- ), _ = r(Gn(m.value, e)), b = r(w(e.datetimeFormats) ? e.datetimeFormats : { [m.value]: {} }), E = r(w(e.numberFormats) ? e.numberFormats : { [m.value]: {} });
1944
- let g = t ? t.missingWarn : J(e.missingWarn) || st(e.missingWarn) ? e.missingWarn : !0, C = t ? t.fallbackWarn : J(e.fallbackWarn) || st(e.fallbackWarn) ? e.fallbackWarn : !0, M = t ? t.fallbackRoot : J(e.fallbackRoot) ? e.fallbackRoot : !0, T = !!e.fallbackFormat, k = Y(e.missing) ? e.missing : null, i = Y(e.missing) ? yn(e.missing) : null, d = Y(e.postTranslation) ? e.postTranslation : null, v = t ? t.warnHtmlMessage : J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, p = !!e.escapeParameter;
1945
- const O = t ? t.modifiers : w(e.modifiers) ? e.modifiers : {};
1946
- let y = e.pluralRules || t && t.pluralRules, N;
1947
- N = (() => {
1948
- s && mn(null);
1949
- const f = {
1950
- version: Yr,
1951
- locale: m.value,
1952
- fallbackLocale: u.value,
1953
- messages: _.value,
1954
- modifiers: O,
1955
- pluralRules: y,
1956
- missing: i === null ? void 0 : i,
1957
- missingWarn: g,
1958
- fallbackWarn: C,
1959
- fallbackFormat: T,
1960
- unresolving: !0,
1961
- postTranslation: d === null ? void 0 : d,
1962
- warnHtmlMessage: v,
1963
- escapeParameter: p,
1964
- messageResolver: e.messageResolver,
1965
- messageCompiler: e.messageCompiler,
1966
- __meta: { framework: "vue" }
1967
- };
1968
- f.datetimeFormats = b.value, f.numberFormats = E.value, f.__datetimeFormatters = w(N) ? N.__datetimeFormatters : void 0, f.__numberFormatters = w(N) ? N.__numberFormatters : void 0;
1969
- const I = Rr(f);
1970
- return s && mn(I), I;
1971
- })(), Ue(N, m.value, u.value);
1972
- function j() {
1973
- return [
1974
- m.value,
1975
- u.value,
1976
- _.value,
1977
- b.value,
1978
- E.value
1979
- ];
1980
- }
1981
- const D = G({
1982
- get: () => m.value,
1983
- set: (f) => {
1984
- m.value = f, N.locale = m.value;
1985
- }
1986
- }), S = G({
1987
- get: () => u.value,
1988
- set: (f) => {
1989
- u.value = f, N.fallbackLocale = u.value, Ue(N, m.value, f);
1990
- }
1991
- }), L = G(() => _.value), Z = /* @__PURE__ */ G(() => b.value), re = /* @__PURE__ */ G(() => E.value);
1992
- function Le() {
1993
- return Y(d) ? d : null;
1994
- }
1995
- function oe(f) {
1996
- d = f, N.postTranslation = f;
1997
- }
1998
- function ut() {
1999
- return k;
2000
- }
2001
- function mt(f) {
2002
- f !== null && (i = yn(f)), k = f, N.missing = i;
2003
- }
2004
- const de = (f, I, W, H, Ie, $e) => {
2005
- j();
2006
- let Se;
2007
- try {
2008
- Zr.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (N.fallbackContext = t ? Lr() : void 0), Se = f(N);
2009
- } finally {
2010
- __INTLIFY_PROD_DEVTOOLS__, s || (N.fallbackContext = void 0);
2011
- }
2012
- if (W !== "translate exists" && // for not `te` (e.g `t`)
2013
- K(Se) && Se === it || W === "translate exists" && !Se) {
2014
- const [Yn, La] = I();
2015
- return t && M ? H(t) : Ie(Yn);
2016
- } else {
2017
- if ($e(Se))
2018
- return Se;
2019
- throw Ye(Pe.UNEXPECTED_RETURN_TYPE);
2020
- }
2021
- };
2022
- function He(...f) {
2023
- return de((I) => Reflect.apply(En, null, [I, ...f]), () => Pt(...f), "translate", (I) => Reflect.apply(I.t, I, [...f]), (I) => I, (I) => R(I));
2024
- }
2025
- function Be(...f) {
2026
- const [I, W, H] = f;
2027
- if (H && !F(H))
2028
- throw Ye(Pe.INVALID_ARGUMENT);
2029
- return He(I, W, z({ resolvedMessage: !0 }, H || {}));
2030
- }
2031
- function dt(...f) {
2032
- return de((I) => Reflect.apply(_n, null, [I, ...f]), () => Dt(...f), "datetime format", (I) => Reflect.apply(I.d, I, [...f]), () => cn, (I) => R(I));
2033
- }
2034
- function _t(...f) {
2035
- return de((I) => Reflect.apply(pn, null, [I, ...f]), () => Mt(...f), "number format", (I) => Reflect.apply(I.n, I, [...f]), () => cn, (I) => R(I));
2036
- }
2037
- function ft(f) {
2038
- return f.map((I) => R(I) || K(I) || J(I) ? In(String(I)) : I);
2039
- }
2040
- const pt = {
2041
- normalize: ft,
2042
- interpolate: (f) => f,
2043
- type: "vnode"
2044
- };
2045
- function ht(...f) {
2046
- return de((I) => {
2047
- let W;
2048
- const H = I;
2049
- try {
2050
- H.processor = pt, W = Reflect.apply(En, null, [H, ...f]);
2051
- } finally {
2052
- H.processor = null;
2053
- }
2054
- return W;
2055
- }, () => Pt(...f), "translate", (I) => I[wt](...f), (I) => [In(I)], (I) => $(I));
2056
- }
2057
- function Je(...f) {
2058
- return de((I) => Reflect.apply(pn, null, [I, ...f]), () => Mt(...f), "number format", (I) => I[Vt](...f), vn, (I) => R(I) || $(I));
2059
- }
2060
- function bt(...f) {
2061
- return de((I) => Reflect.apply(_n, null, [I, ...f]), () => Dt(...f), "datetime format", (I) => I[Ft](...f), vn, (I) => R(I) || $(I));
2062
- }
2063
- function gt(f) {
2064
- y = f, N.pluralRules = y;
2065
- }
2066
- function Et(f, I) {
2067
- return de(() => {
2068
- if (!f)
2069
- return !1;
2070
- const W = R(I) ? I : m.value, H = Re(W), Ie = N.messageResolver(H, f);
2071
- return Me(Ie) || ae(Ie) || R(Ie);
2072
- }, () => [f], "translate exists", (W) => Reflect.apply(W.te, W, [f, I]), Jr, (W) => J(W));
2073
- }
2074
- function It(f) {
2075
- let I = null;
2076
- const W = Cn(N, u.value, m.value);
2077
- for (let H = 0; H < W.length; H++) {
2078
- const Ie = _.value[W[H]] || {}, $e = N.messageResolver(Ie, f);
2079
- if ($e != null) {
2080
- I = $e;
2081
- break;
2082
- }
2083
- }
2084
- return I;
2085
- }
2086
- function Fe(f) {
2087
- const I = It(f);
2088
- return I ?? (t ? t.tm(f) || {} : {});
2089
- }
2090
- function Re(f) {
2091
- return _.value[f] || {};
2092
- }
2093
- function Ce(f, I) {
2094
- if (l) {
2095
- const W = { [f]: I };
2096
- for (const H in W)
2097
- ie(W, H) && xe(W[H]);
2098
- I = W[f];
2099
- }
2100
- _.value[f] = I, N.messages = _.value;
2101
- }
2102
- function Ve(f, I) {
2103
- _.value[f] = _.value[f] || {};
2104
- const W = { [f]: I };
2105
- if (l)
2106
- for (const H in W)
2107
- ie(W, H) && xe(W[H]);
2108
- I = W[f], nt(I, _.value[f]), N.messages = _.value;
2109
- }
2110
- function Nt(f) {
2111
- return b.value[f] || {};
2112
- }
2113
- function a(f, I) {
2114
- b.value[f] = I, N.datetimeFormats = b.value, fn(N, f, I);
2115
- }
2116
- function o(f, I) {
2117
- b.value[f] = z(b.value[f] || {}, I), N.datetimeFormats = b.value, fn(N, f, I);
2118
- }
2119
- function h(f) {
2120
- return E.value[f] || {};
2121
- }
2122
- function A(f, I) {
2123
- E.value[f] = I, N.numberFormats = E.value, hn(N, f, I);
2124
- }
2125
- function x(f, I) {
2126
- E.value[f] = z(E.value[f] || {}, I), N.numberFormats = E.value, hn(N, f, I);
2127
- }
2128
- Tn++, t && Qt && (Rt(t.locale, (f) => {
2129
- c && (m.value = f, N.locale = f, Ue(N, m.value, u.value));
2130
- }), Rt(t.fallbackLocale, (f) => {
2131
- c && (u.value = f, N.fallbackLocale = f, Ue(N, m.value, u.value));
2132
- }));
2133
- const P = {
2134
- id: Tn,
2135
- locale: D,
2136
- fallbackLocale: S,
2137
- get inheritLocale() {
2138
- return c;
2139
- },
2140
- set inheritLocale(f) {
2141
- c = f, f && t && (m.value = t.locale.value, u.value = t.fallbackLocale.value, Ue(N, m.value, u.value));
2142
- },
2143
- get availableLocales() {
2144
- return Object.keys(_.value).sort();
2145
- },
2146
- messages: L,
2147
- get modifiers() {
2148
- return O;
2149
- },
2150
- get pluralRules() {
2151
- return y || {};
2152
- },
2153
- get isGlobal() {
2154
- return s;
2155
- },
2156
- get missingWarn() {
2157
- return g;
2158
- },
2159
- set missingWarn(f) {
2160
- g = f, N.missingWarn = g;
2161
- },
2162
- get fallbackWarn() {
2163
- return C;
2164
- },
2165
- set fallbackWarn(f) {
2166
- C = f, N.fallbackWarn = C;
2167
- },
2168
- get fallbackRoot() {
2169
- return M;
2170
- },
2171
- set fallbackRoot(f) {
2172
- M = f;
2173
- },
2174
- get fallbackFormat() {
2175
- return T;
2176
- },
2177
- set fallbackFormat(f) {
2178
- T = f, N.fallbackFormat = T;
2179
- },
2180
- get warnHtmlMessage() {
2181
- return v;
2182
- },
2183
- set warnHtmlMessage(f) {
2184
- v = f, N.warnHtmlMessage = f;
2185
- },
2186
- get escapeParameter() {
2187
- return p;
2188
- },
2189
- set escapeParameter(f) {
2190
- p = f, N.escapeParameter = f;
2191
- },
2192
- t: He,
2193
- getLocaleMessage: Re,
2194
- setLocaleMessage: Ce,
2195
- mergeLocaleMessage: Ve,
2196
- getPostTranslationHandler: Le,
2197
- setPostTranslationHandler: oe,
2198
- getMissingHandler: ut,
2199
- setMissingHandler: mt,
2200
- [Hr]: gt
2201
- };
2202
- return P.datetimeFormats = Z, P.numberFormats = re, P.rt = Be, P.te = Et, P.tm = Fe, P.d = dt, P.n = _t, P.getDateTimeFormat = Nt, P.setDateTimeFormat = a, P.mergeDateTimeFormat = o, P.getNumberFormat = h, P.setNumberFormat = A, P.mergeNumberFormat = x, P[Wn] = n, P[wt] = ht, P[Ft] = bt, P[Vt] = Je, P;
2203
- }
2204
- const Bt = {
2205
- tag: {
2206
- type: [String, Object]
2207
- },
2208
- locale: {
2209
- type: String
2210
- },
2211
- scope: {
2212
- type: String,
2213
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2214
- validator: (e) => e === "parent" || e === "global",
2215
- default: "parent"
2216
- /* ComponentI18nScope */
2217
- },
2218
- i18n: {
2219
- type: Object
2220
- }
2221
- };
2222
- function zr({ slots: e }, t) {
2223
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, l) => [
2224
- ...s,
2225
- // prettier-ignore
2226
- ...l.type === we ? l.children : [l]
2227
- ], []) : t.reduce((n, s) => {
2228
- const l = e[s];
2229
- return l && (n[s] = l()), n;
2230
- }, U());
2231
- }
2232
- function Xn() {
2233
- return we;
2234
- }
2235
- z({
2236
- keypath: {
2237
- type: String,
2238
- required: !0
2239
- },
2240
- plural: {
2241
- type: [Number, String],
2242
- validator: (e) => K(e) || !isNaN(e)
2243
- }
2244
- }, Bt);
2245
- function Qr(e) {
2246
- return $(e) && !R(e[0]);
2247
- }
2248
- function Zn(e, t, n, s) {
2249
- const { slots: l, attrs: r } = t;
2250
- return () => {
2251
- const c = { part: !0 };
2252
- let m = U();
2253
- e.locale && (c.locale = e.locale), R(e.format) ? c.key = e.format : F(e.format) && (R(e.format.key) && (c.key = e.format.key), m = Object.keys(e.format).reduce((g, C) => n.includes(C) ? z(U(), g, { [C]: e.format[C] }) : g, U()));
2254
- const u = s(e.value, c, m);
2255
- let _ = [c.key];
2256
- $(u) ? _ = u.map((g, C) => {
2257
- const M = l[g.type], T = M ? M({ [g.type]: g.value, index: C, parts: u }) : [g.value];
2258
- return Qr(T) && (T[0].key = `${g.type}-${C}`), T;
2259
- }) : R(u) && (_ = [u]);
2260
- const b = z(U(), r), E = R(e.tag) || F(e.tag) ? e.tag : Xn();
2261
- return Ln(E, b, _);
2262
- };
2263
- }
2264
- z({
2265
- value: {
2266
- type: Number,
2267
- required: !0
2268
- },
2269
- format: {
2270
- type: [String, Object]
2271
- }
2272
- }, Bt);
2273
- z({
2274
- value: {
2275
- type: [Number, Date],
2276
- required: !0
2277
- },
2278
- format: {
2279
- type: [String, Object]
2280
- }
2281
- }, Bt);
2282
- const qr = /* @__PURE__ */ Oe("global-vue-i18n");
2283
- function ct(e = {}) {
2284
- const t = Wt();
2285
- if (t == null)
2286
- throw Ye(Pe.MUST_BE_CALL_SETUP_TOP);
2287
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2288
- throw Ye(Pe.NOT_INSTALLED);
2289
- const n = ea(t), s = na(n), l = jn(t), r = ta(e, l);
2290
- if (r === "global")
2291
- return Br(s, e, l), s;
2292
- if (r === "parent") {
2293
- let u = sa(n, t, e.__useComponent);
2294
- return u == null && (u = s), u;
2295
- }
2296
- const c = n;
2297
- let m = c.__getInstance(t);
2298
- if (m == null) {
2299
- const u = z({}, e);
2300
- "__i18n" in l && (u.__i18n = l.__i18n), s && (u.__root = s), m = Kr(u), c.__composerExtend && (m[Ut] = c.__composerExtend(m)), aa(c, t, m), c.__setInstance(t, m);
2301
- }
2302
- return m;
2303
- }
2304
- function ea(e) {
2305
- const t = xn(e.isCE ? qr : e.appContext.app.__VUE_I18N_SYMBOL__);
2306
- if (!t)
2307
- throw Ye(e.isCE ? Pe.NOT_INSTALLED_WITH_PROVIDE : Pe.UNEXPECTED_ERROR);
2308
- return t;
2309
- }
2310
- function ta(e, t) {
2311
- return lt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2312
- }
2313
- function na(e) {
2314
- return e.mode === "composition" ? e.global : e.global.__composer;
2315
- }
2316
- function sa(e, t, n = !1) {
2317
- let s = null;
2318
- const l = t.root;
2319
- let r = ra(t, n);
2320
- for (; r != null; ) {
2321
- const c = e;
2322
- if (e.mode === "composition")
2323
- s = c.__getInstance(r);
2324
- else if (__VUE_I18N_LEGACY_API__) {
2325
- const m = c.__getInstance(r);
2326
- m != null && (s = m.__composer, n && s && !s[Wn] && (s = null));
2327
- }
2328
- if (s != null || l === r)
2329
- break;
2330
- r = r.parent;
2331
- }
2332
- return s;
2333
- }
2334
- function ra(e, t = !1) {
2335
- return e == null ? null : t && e.vnode.ctx || e.parent;
2336
- }
2337
- function aa(e, t, n) {
2338
- Gt(() => {
2339
- }, t), On(() => {
2340
- const s = n;
2341
- e.__deleteInstance(t);
2342
- const l = s[Ut];
2343
- l && (l(), delete s[Ut]);
2344
- }, t);
2345
- }
2346
- xr();
2347
- vr(sr);
2348
- Tr(Er);
2349
- yr(Cn);
2350
- if (__INTLIFY_PROD_DEVTOOLS__) {
2351
- const e = Te();
2352
- e.__INTLIFY__ = !0, rr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2353
- }
2354
- const et = /* @__PURE__ */ ce({
2355
- __name: "InheritPermissionTooltip",
2356
- props: {
2357
- item: {
2358
- type: Object,
2359
- required: !0
2360
- }
2361
- },
2362
- setup(e) {
2363
- const { t } = ct();
2364
- return (n, s) => {
2365
- const l = Ge("FmIcon"), r = Ge("FmTooltip");
2366
- return B(), ke(r, {
2367
- variant: "plain",
2368
- placement: "right",
2369
- "z-index": 50
2370
- }, {
2371
- content: se(() => [
2372
- ee("div", null, je(he(t)("team.memberForm.permissions.inherited")), 1),
2373
- (B(!0), te(we, null, me(e.item.setNames, (c) => (B(), te("div", { key: c }, [
2374
- ee("div", null, "- " + je(c), 1)
2375
- ]))), 128))
2376
- ]),
2377
- default: se(() => [
2378
- ne(l, {
2379
- name: "admin_panel_settings",
2380
- size: "sm",
2381
- class: "ml-1 text-fm-color-typo-info"
2382
- })
2383
- ]),
2384
- _: 1
2385
- });
2386
- };
2387
- }
2388
- }), la = { class: "space-y-16" }, oa = {
2389
- key: 0,
2390
- class: "flex fm-typo-en-title-sm-600"
2391
- }, ia = {
2392
- key: 0,
2393
- class: "q-mr-xs text-red col"
2394
- }, ca = { class: "form-input" }, ua = /* @__PURE__ */ ce({
2395
- __name: "AppForm",
2396
- props: {
2397
- title: {
2398
- type: String,
2399
- default: void 0
2400
- },
2401
- required: {
2402
- type: [Boolean, String],
2403
- default: !1
2404
- },
2405
- inline: {
2406
- type: Boolean,
2407
- default: !1
2408
- }
2409
- },
2410
- setup(e) {
2411
- const t = e;
2412
- return (n, s) => (B(), te("div", la, [
2413
- le(n.$slots, "top", {}, () => [
2414
- t.title ? (B(), te("div", oa, [
2415
- ee("div", null, [
2416
- t.required ? (B(), te("span", ia, "*")) : Ne("", !0),
2417
- Jn(je(t.title), 1)
2418
- ]),
2419
- le(n.$slots, "title-right")
2420
- ])) : Ne("", !0)
2421
- ]),
2422
- ee("div", ca, [
2423
- le(n.$slots, "default")
2424
- ])
2425
- ]));
2426
- }
2427
- });
2428
- function ma(e, t) {
2429
- let n = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2430
- const l = s.length;
2431
- for (let r = 0; r < e; r++)
2432
- n += s.charAt(Math.floor(Math.random() * l));
2433
- return n;
2434
- }
2435
- const da = { class: "col flex items-center" }, _a = {
2436
- key: 1,
2437
- class: "q-pa-sm form-error-message text-error"
2438
- }, Jt = /* @__PURE__ */ ce({
2439
- __name: "CheckboxInput",
2440
- props: {
2441
- options: {
2442
- type: Array,
2443
- required: !0
2444
- },
2445
- title: {
2446
- type: String,
2447
- required: !0
2448
- },
2449
- modelValue: {
2450
- type: Array,
2451
- required: !0
2452
- },
2453
- showAllToggle: {
2454
- type: [Boolean, String],
2455
- default: !0
2456
- },
2457
- includeDisabledOptionsWhenSelectAll: {
2458
- type: Boolean,
2459
- default: !1
2460
- },
2461
- disable: {
2462
- type: Boolean,
2463
- default: !1
2464
- },
2465
- min: {
2466
- type: Number,
2467
- default: 0
2468
- },
2469
- max: {
2470
- type: Number,
2471
- default: void 0
2472
- },
2473
- showIntermediate: {
2474
- type: Boolean,
2475
- default: !0
2476
- },
2477
- gutter: {
2478
- type: Number,
2479
- default: void 0
2480
- },
2481
- falsyShowSlot: {
2482
- type: Boolean,
2483
- default: !1
2484
- },
2485
- bottomSlotIndent: {
2486
- type: String,
2487
- default: "36px"
2488
- },
2489
- alignCenter: {
2490
- type: Boolean,
2491
- default: !0
2492
- }
2493
- },
2494
- emits: ["update:model-value"],
2495
- setup(e, { emit: t }) {
2496
- const n = e, s = t, { t: l } = at(), r = ye(!1), c = $n(), m = G(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), u = `checkbox-${ma(6)}`, _ = G(() => m.value !== !0), b = G(
2497
- () => n.modelValue.filter((T) => n.options.some((k) => k.value === T))
2498
- ), E = G(
2499
- () => typeof n.showAllToggle == "boolean" ? l("team.labels.all") : n.showAllToggle
2500
- ), g = G(() => n.options.length > 0 && n.options.length === b.value.length);
2501
- function C() {
2502
- const T = n.modelValue.filter((k) => !b.value.includes(k));
2503
- if (g.value === !0)
2504
- s("update:model-value", T);
2505
- else {
2506
- const k = n.includeDisabledOptionsWhenSelectAll ? n.options.map((i) => i.value) : n.options.filter((i) => !i.disabled).map((i) => i.value);
2507
- s("update:model-value", [...T, ...k]);
2508
- }
2509
- }
2510
- function M(T, k) {
2511
- let i = We(n.modelValue);
2512
- k ? i.every((d) => d !== T) && i.push(T) : i = i.filter((d) => d !== T), s("update:model-value", i);
2513
- }
2514
- return (T, k) => {
2515
- const i = Ge("FmCheckbox");
2516
- return B(), ke(ua, {
2517
- id: u,
2518
- title: e.title,
2519
- required: !1
2520
- }, {
2521
- top: se(() => [
2522
- le(T.$slots, "top")
2523
- ]),
2524
- default: se(() => [
2525
- n.showAllToggle ? (B(), ke(i, {
2526
- key: 0,
2527
- "model-value": g.value,
2528
- disabled: e.disable,
2529
- label: E.value,
2530
- style: tt(`margin-bottom: ${n.gutter}px`),
2531
- size: "sm",
2532
- dense: "",
2533
- value: E.value,
2534
- "onUpdate:modelValue": C
2535
- }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Ne("", !0),
2536
- (B(!0), te(we, null, me(e.options, (d, v) => (B(), te("div", {
2537
- key: d.value,
2538
- style: tt(`margin-bottom: ${v < e.options.length - 1 ? n.gutter : 0}px`),
2539
- class: Ke(v < e.options.length - 1 ? "q-mb-sm" : "")
2540
- }, [
2541
- ee("div", {
2542
- class: Ke(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
2543
- }, [
2544
- ee("div", da, [
2545
- ne(i, {
2546
- "model-value": e.modelValue.includes(d.value),
2547
- disabled: e.disable || d.disabled,
2548
- size: "sm",
2549
- label: d.label,
2550
- value: d.label,
2551
- "onUpdate:modelValue": (p) => M(d.value, p)
2552
- }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
2553
- le(T.$slots, `checkbox-${d.key || d.value}-append`, {
2554
- option: d,
2555
- selected: e.modelValue.includes(d.value)
2556
- })
2557
- ]),
2558
- he(c)[`checkbox-${d.key || d.value}-end`] && (e.modelValue.includes(d.value) || e.falsyShowSlot) ? (B(), te("div", {
2559
- key: 0,
2560
- class: Ke([{ "q-checkbox disabled": e.disable || d.disabled }, "col"])
2561
- }, [
2562
- le(T.$slots, `checkbox-${d.key || d.value}-end`, {
2563
- option: d,
2564
- value: e.modelValue.includes(d.value),
2565
- disable: e.disable || d.disabled
2566
- })
2567
- ], 2)) : Ne("", !0)
2568
- ], 2),
2569
- he(c)[`checkbox-${d.key || d.value}-bottom`] && (e.modelValue.includes(d.value) || e.falsyShowSlot) ? (B(), te("div", {
2570
- key: 0,
2571
- class: Ke(["q-mt-sm", { "q-checkbox disabled": e.disable || d.disabled }]),
2572
- style: tt(`margin-left: ${e.bottomSlotIndent}`)
2573
- }, [
2574
- le(T.$slots, `checkbox-${d.key || d.value}-bottom`, {
2575
- option: d,
2576
- disable: e.disable || d.disabled,
2577
- value: e.modelValue.includes(d.value)
2578
- })
2579
- ], 6)) : Ne("", !0)
2580
- ], 6))), 128)),
2581
- r.value && _.value ? (B(), te("div", _a, je(m.value), 1)) : Ne("", !0)
2582
- ]),
2583
- _: 3
2584
- }, 8, ["title"]);
2585
- };
2586
- }
2587
- }), fa = { class: "flex flex-col gap-16" }, pa = /* @__PURE__ */ ce({
2588
- __name: "BasePermission",
2589
- props: {
2590
- modelValue: {
2591
- type: Array,
2592
- required: !0
2593
- },
2594
- disable: {
2595
- type: Boolean,
2596
- default: !1
2597
- },
2598
- excludedSubjects: {
2599
- type: Array,
2600
- required: !0
2601
- }
2602
- },
2603
- emits: ["update:model-value"],
2604
- setup(e, { emit: t }) {
2605
- const n = e, s = t, l = Object.values(ss), r = G(() => {
2606
- const m = /* @__PURE__ */ new Map();
2607
- for (const _ of Ct) {
2608
- const b = _.category;
2609
- b && (n.excludedSubjects.includes(_.subject) || (m.has(b) || m.set(b, []), m.get(b).push({ label: _.label, value: _.subject })));
2610
- }
2611
- return [...m.keys()].sort((_, b) => {
2612
- const E = l.indexOf(_), g = l.indexOf(b);
2613
- return E === -1 && g === -1 ? _.localeCompare(b) : E === -1 ? 1 : g === -1 ? -1 : E - g;
2614
- }).map((_) => {
2615
- const b = m.get(_), E = n.modelValue.filter((g) => b.some((C) => C.value === g.subject)).map((g) => g.subject);
2616
- return { category: _, options: b, selectedSubjects: E };
2617
- });
2618
- });
2619
- function c(m, u) {
2620
- var b;
2621
- const _ = ((b = r.value.find((E) => E.category === m)) == null ? void 0 : b.options) ?? [];
2622
- s("update:model-value", [
2623
- // Keep permissions from all other categories unchanged
2624
- ...n.modelValue.filter((E) => !_.some((g) => g.value === E.subject)),
2625
- // Replace with the newly selected permissions for this category (strip UI-only category field)
2626
- ...Ct.filter((E) => u.includes(E.subject)).map(({ category: E, ...g }) => g)
2627
- ]);
2628
- }
2629
- return (m, u) => (B(), te("div", fa, [
2630
- (B(!0), te(we, null, me(r.value, (_) => (B(), ke(Jt, {
2631
- key: _.category,
2632
- "model-value": _.selectedSubjects,
2633
- options: _.options,
2634
- disable: e.disable,
2635
- title: _.category,
2636
- "onUpdate:modelValue": (b) => c(_.category, b)
2637
- }, ve({ _: 2 }, [
2638
- me(_.options, (b) => ({
2639
- name: `checkbox-${b.value}-append`,
2640
- fn: se(({ option: E }) => [
2641
- le(m.$slots, `checkbox-${b.value}-append`, { option: E })
2642
- ])
2643
- }))
2644
- ]), 1032, ["model-value", "options", "disable", "title", "onUpdate:modelValue"]))), 128))
2645
- ]));
2646
- }
2647
- }), ha = { class: "flex items-center" }, ba = { class: "ml-auto" }, ga = /* @__PURE__ */ ce({
2648
- __name: "CollapsibleWrapper",
2649
- props: {
2650
- title: { default: "" },
2651
- initiallyCollapsed: { type: Boolean, default: !1 }
2652
- },
2653
- setup(e) {
2654
- const n = ye(e.initiallyCollapsed), s = ye(), l = ye(0);
2655
- let r;
2656
- function c() {
2657
- n.value = !n.value;
2658
- }
2659
- function m() {
2660
- s.value && (l.value = s.value.scrollHeight);
2661
- }
2662
- return Gt(async () => {
2663
- await Kn(), s.value && (r = new ResizeObserver(() => {
2664
- m();
2665
- }), r.observe(s.value));
2666
- }), On(() => {
2667
- r == null || r.disconnect();
2668
- }), (u, _) => {
2669
- const b = Ge("FmButton");
2670
- return B(), te(we, null, [
2671
- ee("div", { onClick: c }, [
2672
- ee("div", ha, [
2673
- le(u.$slots, "title"),
2674
- ee("div", ba, [
2675
- ne(b, {
2676
- icon: n.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
2677
- "text-color": "neutral-gray-400",
2678
- variant: "tertiary",
2679
- size: "md"
2680
- }, null, 8, ["icon"])
2681
- ])
2682
- ])
2683
- ]),
2684
- ee("div", {
2685
- ref_key: "contentRef",
2686
- ref: s,
2687
- class: "transition-all duration-300 ease-in-out overflow-hidden",
2688
- style: tt({ maxHeight: n.value ? "0" : l.value + "px" })
2689
- }, [
2690
- le(u.$slots, "default")
2691
- ], 4)
2692
- ], 64);
2693
- };
2694
- }
2695
- }), Ea = { class: "fm-typo-en-title-sm-600" }, Ot = "includedFuture", kn = /* @__PURE__ */ ce({
2696
- __name: "ConditionPermission",
2697
- props: {
2698
- modelValue: {
2699
- type: Array,
2700
- default: null
2701
- },
2702
- options: {
2703
- type: Array,
2704
- required: !0
2705
- },
2706
- disable: {
2707
- type: Boolean,
2708
- default: !1
2709
- },
2710
- context: {
2711
- type: String,
2712
- required: !0
2713
- }
2714
- },
2715
- emits: ["update:model-value"],
2716
- setup(e, { emit: t }) {
2717
- const n = e, s = t, { t: l } = at(), r = G(() => [
2718
- {
2719
- label: l("team.memberForm.permissions.includedFuture", { context: n.context }),
2720
- value: Ot,
2721
- // Can only be selected if all other options are selected
2722
- disable: !!n.modelValue && n.options.length > n.modelValue.length
2723
- },
2724
- ...n.options.filter(
2725
- (_) => _.label.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())
2726
- )
2727
- ]), c = G(() => n.modelValue ? n.modelValue : [Ot, ...n.options.map((_) => _.value)]);
2728
- function m(_) {
2729
- const b = _.length === r.value.length;
2730
- s("update:model-value", b ? null : _.filter((E) => E !== Ot));
2731
- }
2732
- const u = ye("");
2733
- return (_, b) => {
2734
- const E = Ge("fm-search");
2735
- return B(), ke(ga, null, {
2736
- title: se(() => [
2737
- ee("p", Ea, je(he(l)("team.memberForm.permissions.manageable", { context: e.context })), 1)
2738
- ]),
2739
- default: se(() => [
2740
- e.options.length > 1 ? (B(), ke(E, {
2741
- key: 0,
2742
- modelValue: u.value,
2743
- "onUpdate:modelValue": b[0] || (b[0] = (g) => u.value = g),
2744
- class: "mt-16",
2745
- placeholder: he(l)("team.memberForm.permissions.search", { context: e.context })
2746
- }, null, 8, ["modelValue", "placeholder"])) : Ne("", !0),
2747
- ne(Jt, {
2748
- "model-value": c.value,
2749
- options: r.value,
2750
- "show-intermediate": !1,
2751
- "show-all-toggle": !0,
2752
- disable: e.disable,
2753
- "include-disabled-options-when-select-all": !0,
2754
- title: "",
2755
- class: "mt-16",
2756
- "onUpdate:modelValue": m
2757
- }, ve({ _: 2 }, [
2758
- me(r.value, (g) => ({
2759
- name: `checkbox-${g.value}-append`,
2760
- fn: se(({ option: C }) => [
2761
- le(_.$slots, `checkbox-${g.value}-append`, { option: C })
2762
- ])
2763
- }))
2764
- ]), 1032, ["model-value", "options", "disable"])
2765
- ]),
2766
- _: 3
2767
- });
2768
- };
2769
- }
2770
- }), Lt = "includedNewRole", Ia = /* @__PURE__ */ ce({
2771
- __name: "PosRolePermission",
2772
- props: {
2773
- modelValue: {
2774
- type: Array,
2775
- default: null
2776
- },
2777
- roles: {
2778
- type: Array,
2779
- required: !0
2780
- },
2781
- restaurantIds: {
2782
- type: Array,
2783
- default: null
2784
- },
2785
- disable: {
2786
- type: Boolean,
2787
- default: !1
2788
- }
2789
- },
2790
- emits: ["update:model-value"],
2791
- setup(e, { emit: t }) {
2792
- const n = e, s = t, { t: l } = at(), r = G(() => {
2793
- const u = n.restaurantIds;
2794
- return [
2795
- {
2796
- label: l("team.memberForm.permissions.includedNewRole"),
2797
- value: Lt,
2798
- disable: !!n.modelValue && n.roles.length > n.modelValue.length
2799
- },
2800
- ...n.roles.map((_) => ({
2801
- label: _.name,
2802
- value: _._id,
2803
- disable: !!u && _.restaurants.every(({ id: b }) => !u.includes(b))
2804
- }))
2805
- ];
2806
- }), c = G(() => n.modelValue ? n.modelValue : [Lt, ...n.roles.map((u) => u._id)]);
2807
- function m(u) {
2808
- const _ = u.length === r.value.length;
2809
- s("update:model-value", _ ? null : u.filter((b) => b !== Lt));
2810
- }
2811
- return (u, _) => (B(), ke(Jt, {
2812
- "model-value": c.value,
2813
- options: r.value,
2814
- "show-intermediate": !1,
2815
- "show-all-toggle": !1,
2816
- disable: e.disable,
2817
- title: he(l)("team.memberForm.permissions.roles"),
2818
- "onUpdate:modelValue": m
2819
- }, ve({ _: 2 }, [
2820
- me(r.value, (b) => ({
2821
- name: `checkbox-${b.value}-append`,
2822
- fn: se(({ option: E }) => [
2823
- le(u.$slots, `checkbox-${b.value}-append`, { option: E })
2824
- ])
2825
- }))
2826
- ]), 1032, ["model-value", "options", "disable", "title"]));
2827
- }
2828
- }), Na = {
2829
- async readWarehouses() {
2830
- return qn(await es().get("/warehouses"));
2831
- }
2832
- }, va = { class: "flex flex-col gap-32" }, Ta = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, ya = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, ka = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Oa = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, wa = /* @__PURE__ */ ce({
2833
- __name: "PortalPermissionEditor",
2834
- props: /* @__PURE__ */ Kt({
2835
- disable: {
2836
- type: Boolean,
2837
- default: !1
2838
- },
2839
- inheritPermissions: {
2840
- type: Array,
2841
- default: () => []
2842
- }
2843
- }, {
2844
- modelValue: { default: () => [] },
2845
- modelModifiers: {}
2846
- }),
2847
- emits: /* @__PURE__ */ Kt(["permissionChanged"], ["update:modelValue"]),
2848
- setup(e, { emit: t }) {
2849
- const n = zn(e, "modelValue"), s = e, l = t, { t: r } = at(), c = G(() => {
2850
- const D = Ct.filter((L) => !b.includes(L.subject)).map((L) => L.subject);
2851
- return rs(
2852
- s.inheritPermissions.map((L) => ({
2853
- ...L,
2854
- permissions: L.permissions.filter((Z) => D.includes(Z.subject))
2855
- }))
2856
- ).map((L) => ({
2857
- id: L.subject,
2858
- setNames: L.setNames
2859
- }));
2860
- }), m = G(() => {
2861
- const D = s.inheritPermissions.map((S) => ({
2862
- ...S,
2863
- permissions: S.permissions.filter(
2864
- (L) => L.subject === Q.Subject.Business.inventory_stock
2865
- )
2866
- }));
2867
- return vt(
2868
- D,
2869
- "warehouseId",
2870
- g.value.map((S) => S._id)
2871
- );
2872
- }), u = G(() => {
2873
- const D = s.inheritPermissions.map((S) => ({
2874
- ...S,
2875
- permissions: S.permissions.filter(
2876
- (L) => L.subject === Q.Subject.Restaurant.restaurant
2877
- )
2878
- }));
2879
- return vt(
2880
- D,
2881
- "restaurantId",
2882
- k.value.map((S) => S._id)
2883
- );
2884
- }), _ = G(() => {
2885
- const D = s.inheritPermissions.map((S) => ({
2886
- ...S,
2887
- permissions: S.permissions.filter(
2888
- (L) => L.subject === Q.Subject.Business.hrm_employee_role
2889
- )
2890
- }));
2891
- return vt(
2892
- D,
2893
- "roleId",
2894
- i.value.map((S) => S._id)
2895
- );
2896
- }), b = [
2897
- Q.Subject.Business.restaurant,
2898
- Q.Subject.Business.hrm_employee_role,
2899
- Q.Subject.Business.inventory_stock,
2900
- Q.Subject.Restaurant.restaurant
2901
- ], E = G(() => {
2902
- var S;
2903
- const D = (S = n.value) == null ? void 0 : S.find(
2904
- (L) => L.subject === Q.Subject.Business.inventory_stock
2905
- );
2906
- return D ? D.conditions ? JSON.parse(D.conditions).warehouseId.$in : null : [];
2907
- }), g = ye([]), C = G(() => g.value.map((D) => ({
2908
- label: D.profile.name,
2909
- value: D._id
2910
- })));
2911
- function M(D) {
2912
- const S = T(n.value, D);
2913
- n.value = S;
2914
- }
2915
- function T(D, S) {
2916
- let L = We(
2917
- D.filter((Z) => Z.subject !== Q.Subject.Business.inventory_stock)
2918
- );
2919
- if (!S || S.length > 0) {
2920
- const Z = {
2921
- actions: [Q.Action.manage],
2922
- subject: Q.Subject.Business.inventory_stock
2923
- };
2924
- S && (Z.conditions = JSON.stringify({ warehouseId: { $in: S } })), L.push(Z);
2925
- }
2926
- return L;
2927
- }
2928
- const { restaurants: k } = Qn(), i = as().roles, d = G(() => k.value.map((D) => ({
2929
- label: `${D.profile.code ? D.profile.code + "-" : ""}${D.profile.name}`,
2930
- value: D._id
2931
- }))), v = G(() => k.value.reduce((D, S) => (D[S._id] = i.value.filter((L) => L.restaurants.some((Z) => Z.id === S._id)).map((L) => L._id), D), {})), p = G(() => ts(n.value));
2932
- function O(D) {
2933
- const S = N(n.value, D);
2934
- n.value = S;
2935
- }
2936
- const y = G(() => ns(n.value));
2937
- function N(D, S) {
2938
- var Z;
2939
- let L = We(
2940
- D.filter(
2941
- (re) => re.subject !== Q.Subject.Business.restaurant && re.subject !== Q.Subject.Restaurant.restaurant
2942
- )
2943
- );
2944
- if (!S || S.length > 0) {
2945
- L.push(zt.restaurant);
2946
- const re = {
2947
- actions: [Q.Action.manage],
2948
- subject: Q.Subject.Restaurant.restaurant
2949
- };
2950
- S && (re.conditions = JSON.stringify({ restaurantId: { $in: S } })), L.push(re);
2951
- }
2952
- if (S) {
2953
- const re = [
2954
- ...new Set(S.map((oe) => v.value[oe]).flatMap((oe) => oe))
2955
- ], Le = i.value.map((oe) => oe._id);
2956
- re.length !== Le.length && (L = j(
2957
- L,
2958
- (Z = y.value || Le) == null ? void 0 : Z.filter((oe) => re.includes(oe))
2959
- ));
2960
- }
2961
- return L;
2962
- }
2963
- function X(D) {
2964
- const S = j(n.value, D);
2965
- n.value = S;
2966
- }
2967
- function j(D, S) {
2968
- let L = We(
2969
- D.filter((Z) => Z.subject !== Q.Subject.Business.hrm_employee_role)
2970
- );
2971
- if (S && S.length > 0) {
2972
- const Z = We(zt.role);
2973
- Z.conditions = JSON.stringify({ roleId: { $in: S } }), L.push(Z);
2974
- }
2975
- return L;
2976
- }
2977
- return Gt(async () => {
2978
- g.value = await Na.readWarehouses();
2979
- }), Rt(
2980
- n,
2981
- (D) => {
2982
- l("permissionChanged", D);
2983
- },
2984
- { deep: !0 }
2985
- ), (D, S) => (B(), te("div", va, [
2986
- ee("div", Ta, [
2987
- ne(pa, {
2988
- modelValue: n.value,
2989
- "onUpdate:modelValue": S[0] || (S[0] = (L) => n.value = L),
2990
- "excluded-subjects": b
2991
- }, ve({ _: 2 }, [
2992
- me(c.value, (L) => ({
2993
- name: `checkbox-${L.id}-append`,
2994
- fn: se(() => [
2995
- ne(et, { item: L }, null, 8, ["item"])
2996
- ])
2997
- }))
2998
- ]), 1032, ["modelValue"])
2999
- ]),
3000
- ee("div", ya, [
3001
- ne(kn, {
3002
- "model-value": E.value,
3003
- options: C.value,
3004
- context: he(r)("team.labels.warehouse"),
3005
- "onUpdate:modelValue": M
3006
- }, ve({ _: 2 }, [
3007
- me(m.value, (L) => ({
3008
- name: `checkbox-${L.id}-append`,
3009
- fn: se(() => [
3010
- ne(et, { item: L }, null, 8, ["item"])
3011
- ])
3012
- }))
3013
- ]), 1032, ["model-value", "options", "context"])
3014
- ]),
3015
- ee("div", ka, [
3016
- ne(kn, {
3017
- "model-value": p.value,
3018
- options: d.value,
3019
- context: he(r)("team.labels.restaurant"),
3020
- "onUpdate:modelValue": O
3021
- }, ve({ _: 2 }, [
3022
- me(u.value, (L) => ({
3023
- name: `checkbox-${L.id}-append`,
3024
- fn: se(() => [
3025
- ne(et, { item: L }, null, 8, ["item"])
3026
- ])
3027
- }))
3028
- ]), 1032, ["model-value", "options", "context"])
3029
- ]),
3030
- ee("div", Oa, [
3031
- ne(Ia, {
3032
- roles: he(i),
3033
- "model-value": y.value,
3034
- "restaurant-ids": p.value,
3035
- "onUpdate:modelValue": X
3036
- }, ve({ _: 2 }, [
3037
- me(_.value, (L) => ({
3038
- name: `checkbox-${L.id}-append`,
3039
- fn: se(() => [
3040
- ne(et, { item: L }, null, 8, ["item"])
3041
- ])
3042
- }))
3043
- ]), 1032, ["roles", "model-value", "restaurant-ids"])
3044
- ])
3045
- ]));
3046
- }
3047
- });
3048
- export {
3049
- Jt as _,
3050
- wa as a
3051
- };