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

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