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