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