@agendize/vue-settings
Version:
Vue agendize's settings component
1,557 lines • 107 kB
JavaScript
import { defineComponent as yt, h as Cn, getCurrentInstance as ze, effectScope as ua, inject as fa, onMounted as _a, onUnmounted as ma, shallowRef as da, ref as _e, computed as me, onBeforeMount as Ea, watch as Nt, Fragment as Dn, isRef as ga, createVNode as Na, Text as pa } from "vue";
/*!
* shared v9.5.0
* (c) 2023 kazuya kawaguchi
* Released under the MIT License.
*/
const de = typeof window < "u";
let ne, De;
if (process.env.NODE_ENV !== "production") {
const e = de && window.performance;
e && e.mark && e.measure && e.clearMarks && e.clearMeasures && (ne = (t) => {
e.mark(t);
}, De = (t, n, r) => {
e.measure(t, n, r), e.clearMarks(n), e.clearMarks(r);
});
}
const Ta = /\{([0-9a-zA-Z]+)\}/g;
function St(e, ...t) {
return t.length === 1 && V(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Ta, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
}
const ie = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), La = (e, t, n) => Oa({ l: e, k: t, s: n }), Oa = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), Ia = (e) => kn(e) === "[object Date]", Oe = (e) => kn(e) === "[object RegExp]", it = (e) => R(e) && Object.keys(e).length === 0, J = Object.assign;
let Yt;
const Ne = () => Yt || (Yt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
function Kt(e) {
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
}
const ba = Object.prototype.hasOwnProperty;
function Rt(e, t) {
return ba.call(e, t);
}
const W = Array.isArray, G = (e) => typeof e == "function", b = (e) => typeof e == "string", F = (e) => typeof e == "boolean", V = (e) => e !== null && typeof e == "object", Pn = Object.prototype.toString, kn = (e) => Pn.call(e), R = (e) => {
if (!V(e))
return !1;
const t = Object.getPrototypeOf(e);
return t === null || t.constructor === Object;
}, va = (e) => e == null ? "" : W(e) || R(e) && e.toString === Pn ? JSON.stringify(e, null, 2) : String(e);
function ha(e, t = "") {
return e.reduce((n, r, s) => s === 0 ? n + r : n + t + r, "");
}
const jt = 2;
function Aa(e, t = 0, n = e.length) {
const r = e.split(/\r?\n/);
let s = 0;
const a = [];
for (let l = 0; l < r.length; l++)
if (s += r[l].length + 1, s >= t) {
for (let i = l - jt; i <= l + jt || n > s; i++) {
if (i < 0 || i >= r.length)
continue;
const u = i + 1;
a.push(`${u}${" ".repeat(3 - String(u).length)}| ${r[i]}`);
const m = r[i].length;
if (i === l) {
const T = t - (s - m) + 1, O = Math.max(1, n > s ? m - T : n - t);
a.push(" | " + " ".repeat(T) + "^".repeat(O));
} else if (i > l) {
if (n > s) {
const T = Math.max(Math.min(n - s, m), 1);
a.push(" | " + "^".repeat(T));
}
s += m + 1;
}
}
break;
}
return a.join(`
`);
}
function Mt(e) {
let t = e;
return () => ++t;
}
function X(e, t) {
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
}
const Bt = {};
function Ca(e) {
Bt[e] || (Bt[e] = !0, X(e));
}
function Ft() {
const e = /* @__PURE__ */ new Map();
return {
events: e,
on(n, r) {
const s = e.get(n);
s && s.push(r) || e.set(n, [r]);
},
off(n, r) {
const s = e.get(n);
s && s.splice(s.indexOf(r) >>> 0, 1);
},
emit(n, r) {
(e.get(n) || []).slice().map((s) => s(r)), (e.get("*") || []).slice().map((s) => s(n, r));
}
};
}
/*!
* message-compiler v9.5.0
* (c) 2023 kazuya kawaguchi
* Released under the MIT License.
*/
function Da(e, t, n) {
return { line: e, column: t, offset: n };
}
function pt(e, t, n) {
const r = { start: e, end: t };
return n != null && (r.source = n), r;
}
const Pa = /\{([0-9a-zA-Z]+)\}/g;
function ka(e, ...t) {
return t.length === 1 && ya(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Pa, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
}
const yn = Object.assign, Xt = (e) => typeof e == "string", ya = (e) => e !== null && typeof e == "object";
function Sn(e, t = "") {
return e.reduce((n, r, s) => s === 0 ? n + r : n + t + r, "");
}
const y = {
EXPECTED_TOKEN: 1,
INVALID_TOKEN_IN_PLACEHOLDER: 2,
UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
UNKNOWN_ESCAPE_SEQUENCE: 4,
INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
UNBALANCED_CLOSING_BRACE: 6,
UNTERMINATED_CLOSING_BRACE: 7,
EMPTY_PLACEHOLDER: 8,
NOT_ALLOW_NEST_PLACEHOLDER: 9,
INVALID_LINKED_FORMAT: 10,
MUST_HAVE_MESSAGES_IN_PLURAL: 11,
UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
UNEXPECTED_EMPTY_LINKED_KEY: 13,
UNEXPECTED_LEXICAL_ANALYSIS: 14,
UNHANDLED_CODEGEN_NODE_TYPE: 15,
UNHANDLED_MINIFIER_NODE_TYPE: 16,
__EXTEND_POINT__: 17
}, Sa = {
[y.EXPECTED_TOKEN]: "Expected token: '{0}'",
[y.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
[y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
[y.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
[y.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
[y.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
[y.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
[y.EMPTY_PLACEHOLDER]: "Empty placeholder",
[y.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
[y.INVALID_LINKED_FORMAT]: "Invalid linked format",
[y.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
[y.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
[y.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
[y.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
[y.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
[y.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
};
function Ge(e, t, n = {}) {
const { domain: r, messages: s, args: a } = n, l = ka((s || Sa)[e] || "", ...a || []), i = new SyntaxError(String(l));
return i.code = e, t && (i.location = t), i.domain = r, i;
}
function Ra(e) {
throw e;
}
const Ma = /<\/?[\w\s="/.':;#-\/]+>/, Fa = (e) => Ma.test(e), ge = " ", Ua = "\r", q = `
`, wa = String.fromCharCode(8232), Va = String.fromCharCode(8233);
function $a(e) {
const t = e;
let n = 0, r = 1, s = 1, a = 0;
const l = (D) => t[D] === Ua && t[D + 1] === q, i = (D) => t[D] === q, u = (D) => t[D] === Va, m = (D) => t[D] === wa, T = (D) => l(D) || i(D) || u(D) || m(D), O = () => n, E = () => r, v = () => s, k = () => a, P = (D) => l(D) || u(D) || m(D) ? q : t[D], C = () => P(n), f = () => P(n + a);
function d() {
return a = 0, T(n) && (r++, s = 0), l(n) && n++, n++, s++, t[n];
}
function L() {
return l(n + a) && a++, a++, t[n + a];
}
function p() {
n = 0, r = 1, s = 1, a = 0;
}
function h(D = 0) {
a = D;
}
function g() {
const D = n + a;
for (; D !== n; )
d();
a = 0;
}
return {
index: O,
line: E,
column: v,
peekOffset: k,
charAt: P,
currentChar: C,
currentPeek: f,
next: d,
peek: L,
reset: p,
resetPeek: h,
skipToPeek: g
};
}
const Te = void 0, Wa = ".", Jt = "'", Ga = "tokenizer";
function Ha(e, t = {}) {
const n = t.location !== !1, r = $a(e), s = () => r.index(), a = () => Da(r.line(), r.column(), r.index()), l = a(), i = s(), u = {
currentType: 14,
offset: i,
startLoc: l,
endLoc: l,
lastType: 14,
lastOffset: i,
lastStartLoc: l,
lastEndLoc: l,
braceNest: 0,
inLinked: !1,
text: ""
}, m = () => u, { onError: T } = t;
function O(c, o, _, ...A) {
const S = m();
if (o.column += _, o.offset += _, T) {
const $ = n ? pt(S.startLoc, o) : null, ue = Ge(c, $, {
domain: Ga,
args: A
});
T(ue);
}
}
function E(c, o, _) {
c.endLoc = a(), c.currentType = o;
const A = { type: o };
return n && (A.loc = pt(c.startLoc, c.endLoc)), _ != null && (A.value = _), A;
}
const v = (c) => E(c, 14);
function k(c, o) {
return c.currentChar() === o ? (c.next(), o) : (O(y.EXPECTED_TOKEN, a(), 0, o), "");
}
function P(c) {
let o = "";
for (; c.currentPeek() === ge || c.currentPeek() === q; )
o += c.currentPeek(), c.peek();
return o;
}
function C(c) {
const o = P(c);
return c.skipToPeek(), o;
}
function f(c) {
if (c === Te)
return !1;
const o = c.charCodeAt(0);
return o >= 97 && o <= 122 || o >= 65 && o <= 90 || o === 95;
}
function d(c) {
if (c === Te)
return !1;
const o = c.charCodeAt(0);
return o >= 48 && o <= 57;
}
function L(c, o) {
const { currentType: _ } = o;
if (_ !== 2)
return !1;
P(c);
const A = f(c.currentPeek());
return c.resetPeek(), A;
}
function p(c, o) {
const { currentType: _ } = o;
if (_ !== 2)
return !1;
P(c);
const A = c.currentPeek() === "-" ? c.peek() : c.currentPeek(), S = d(A);
return c.resetPeek(), S;
}
function h(c, o) {
const { currentType: _ } = o;
if (_ !== 2)
return !1;
P(c);
const A = c.currentPeek() === Jt;
return c.resetPeek(), A;
}
function g(c, o) {
const { currentType: _ } = o;
if (_ !== 8)
return !1;
P(c);
const A = c.currentPeek() === ".";
return c.resetPeek(), A;
}
function D(c, o) {
const { currentType: _ } = o;
if (_ !== 9)
return !1;
P(c);
const A = f(c.currentPeek());
return c.resetPeek(), A;
}
function M(c, o) {
const { currentType: _ } = o;
if (!(_ === 8 || _ === 12))
return !1;
P(c);
const A = c.currentPeek() === ":";
return c.resetPeek(), A;
}
function w(c, o) {
const { currentType: _ } = o;
if (_ !== 10)
return !1;
const A = () => {
const $ = c.currentPeek();
return $ === "{" ? f(c.peek()) : $ === "@" || $ === "%" || $ === "|" || $ === ":" || $ === "." || $ === ge || !$ ? !1 : $ === q ? (c.peek(), A()) : f($);
}, S = A();
return c.resetPeek(), S;
}
function x(c) {
P(c);
const o = c.currentPeek() === "|";
return c.resetPeek(), o;
}
function se(c) {
const o = P(c), _ = c.currentPeek() === "%" && c.peek() === "{";
return c.resetPeek(), {
isModulo: _,
hasSpace: o.length > 0
};
}
function B(c, o = !0) {
const _ = (S = !1, $ = "", ue = !1) => {
const Ee = c.currentPeek();
return Ee === "{" ? $ === "%" ? !1 : S : Ee === "@" || !Ee ? $ === "%" ? !0 : S : Ee === "%" ? (c.peek(), _(S, "%", !0)) : Ee === "|" ? $ === "%" || ue ? !0 : !($ === ge || $ === q) : Ee === ge ? (c.peek(), _(!0, ge, ue)) : Ee === q ? (c.peek(), _(!0, q, ue)) : !0;
}, A = _();
return o && c.resetPeek(), A;
}
function ae(c, o) {
const _ = c.currentChar();
return _ === Te ? Te : o(_) ? (c.next(), _) : null;
}
function Se(c) {
return ae(c, (_) => {
const A = _.charCodeAt(0);
return A >= 97 && A <= 122 || A >= 65 && A <= 90 || A >= 48 && A <= 57 || A === 95 || A === 36;
});
}
function He(c) {
return ae(c, (_) => {
const A = _.charCodeAt(0);
return A >= 48 && A <= 57;
});
}
function ce(c) {
return ae(c, (_) => {
const A = _.charCodeAt(0);
return A >= 48 && A <= 57 || A >= 65 && A <= 70 || A >= 97 && A <= 102;
});
}
function Re(c) {
let o = "", _ = "";
for (; o = He(c); )
_ += o;
return _;
}
function xe(c) {
C(c);
const o = c.currentChar();
return o !== "%" && O(y.EXPECTED_TOKEN, a(), 0, o), c.next(), "%";
}
function le(c) {
let o = "";
for (; ; ) {
const _ = c.currentChar();
if (_ === "{" || _ === "}" || _ === "@" || _ === "|" || !_)
break;
if (_ === "%")
if (B(c))
o += _, c.next();
else
break;
else if (_ === ge || _ === q)
if (B(c))
o += _, c.next();
else {
if (x(c))
break;
o += _, c.next();
}
else
o += _, c.next();
}
return o;
}
function Me(c) {
C(c);
let o = "", _ = "";
for (; o = Se(c); )
_ += o;
return c.currentChar() === Te && O(y.UNTERMINATED_CLOSING_BRACE, a(), 0), _;
}
function Ye(c) {
C(c);
let o = "";
return c.currentChar() === "-" ? (c.next(), o += `-${Re(c)}`) : o += Re(c), c.currentChar() === Te && O(y.UNTERMINATED_CLOSING_BRACE, a(), 0), o;
}
function Ke(c) {
C(c), k(c, "'");
let o = "", _ = "";
const A = ($) => $ !== Jt && $ !== q;
for (; o = ae(c, A); )
o === "\\" ? _ += je(c) : _ += o;
const S = c.currentChar();
return S === q || S === Te ? (O(y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), S === q && (c.next(), k(c, "'")), _) : (k(c, "'"), _);
}
function je(c) {
const o = c.currentChar();
switch (o) {
case "\\":
case "'":
return c.next(), `\\${o}`;
case "u":
return Fe(c, o, 4);
case "U":
return Fe(c, o, 6);
default:
return O(y.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, o), "";
}
}
function Fe(c, o, _) {
k(c, o);
let A = "";
for (let S = 0; S < _; S++) {
const $ = ce(c);
if (!$) {
O(y.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${o}${A}${c.currentChar()}`);
break;
}
A += $;
}
return `\\${o}${A}`;
}
function at(c) {
C(c);
let o = "", _ = "";
const A = (S) => S !== "{" && S !== "}" && S !== ge && S !== q;
for (; o = ae(c, A); )
_ += o;
return _;
}
function Be(c) {
let o = "", _ = "";
for (; o = Se(c); )
_ += o;
return _;
}
function Xe(c) {
const o = (_ = !1, A) => {
const S = c.currentChar();
return S === "{" || S === "%" || S === "@" || S === "|" || S === "(" || S === ")" || !S || S === ge ? A : S === q || S === Wa ? (A += S, c.next(), o(_, A)) : (A += S, c.next(), o(!0, A));
};
return o(!1, "");
}
function be(c) {
C(c);
const o = k(c, "|");
return C(c), o;
}
function ve(c, o) {
let _ = null;
switch (c.currentChar()) {
case "{":
return o.braceNest >= 1 && O(y.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), c.next(), _ = E(o, 2, "{"), C(c), o.braceNest++, _;
case "}":
return o.braceNest > 0 && o.currentType === 2 && O(y.EMPTY_PLACEHOLDER, a(), 0), c.next(), _ = E(o, 3, "}"), o.braceNest--, o.braceNest > 0 && C(c), o.inLinked && o.braceNest === 0 && (o.inLinked = !1), _;
case "@":
return o.braceNest > 0 && O(y.UNTERMINATED_CLOSING_BRACE, a(), 0), _ = pe(c, o) || v(o), o.braceNest = 0, _;
default:
let S = !0, $ = !0, ue = !0;
if (x(c))
return o.braceNest > 0 && O(y.UNTERMINATED_CLOSING_BRACE, a(), 0), _ = E(o, 1, be(c)), o.braceNest = 0, o.inLinked = !1, _;
if (o.braceNest > 0 && (o.currentType === 5 || o.currentType === 6 || o.currentType === 7))
return O(y.UNTERMINATED_CLOSING_BRACE, a(), 0), o.braceNest = 0, he(c, o);
if (S = L(c, o))
return _ = E(o, 5, Me(c)), C(c), _;
if ($ = p(c, o))
return _ = E(o, 6, Ye(c)), C(c), _;
if (ue = h(c, o))
return _ = E(o, 7, Ke(c)), C(c), _;
if (!S && !$ && !ue)
return _ = E(o, 13, at(c)), O(y.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, _.value), C(c), _;
break;
}
return _;
}
function pe(c, o) {
const { currentType: _ } = o;
let A = null;
const S = c.currentChar();
switch ((_ === 8 || _ === 9 || _ === 12 || _ === 10) && (S === q || S === ge) && O(y.INVALID_LINKED_FORMAT, a(), 0), S) {
case "@":
return c.next(), A = E(o, 8, "@"), o.inLinked = !0, A;
case ".":
return C(c), c.next(), E(o, 9, ".");
case ":":
return C(c), c.next(), E(o, 10, ":");
default:
return x(c) ? (A = E(o, 1, be(c)), o.braceNest = 0, o.inLinked = !1, A) : g(c, o) || M(c, o) ? (C(c), pe(c, o)) : D(c, o) ? (C(c), E(o, 12, Be(c))) : w(c, o) ? (C(c), S === "{" ? ve(c, o) || A : E(o, 11, Xe(c))) : (_ === 8 && O(y.INVALID_LINKED_FORMAT, a(), 0), o.braceNest = 0, o.inLinked = !1, he(c, o));
}
}
function he(c, o) {
let _ = { type: 14 };
if (o.braceNest > 0)
return ve(c, o) || v(o);
if (o.inLinked)
return pe(c, o) || v(o);
switch (c.currentChar()) {
case "{":
return ve(c, o) || v(o);
case "}":
return O(y.UNBALANCED_CLOSING_BRACE, a(), 0), c.next(), E(o, 3, "}");
case "@":
return pe(c, o) || v(o);
default:
if (x(c))
return _ = E(o, 1, be(c)), o.braceNest = 0, o.inLinked = !1, _;
const { isModulo: S, hasSpace: $ } = se(c);
if (S)
return $ ? E(o, 0, le(c)) : E(o, 4, xe(c));
if (B(c))
return E(o, 0, le(c));
break;
}
return _;
}
function Je() {
const { currentType: c, offset: o, startLoc: _, endLoc: A } = u;
return u.lastType = c, u.lastOffset = o, u.lastStartLoc = _, u.lastEndLoc = A, u.offset = s(), u.startLoc = a(), r.currentChar() === Te ? E(u, 14) : he(r, u);
}
return {
nextToken: Je,
currentOffset: s,
currentPosition: a,
context: m
};
}
const xa = "parser", Ya = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
function Ka(e, t, n) {
switch (e) {
case "\\\\":
return "\\";
case "\\'":
return "'";
default: {
const r = parseInt(t || n, 16);
return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "\uFFFD";
}
}
}
function ja(e = {}) {
const t = e.location !== !1, { onError: n } = e;
function r(f, d, L, p, ...h) {
const g = f.currentPosition();
if (g.offset += p, g.column += p, n) {
const D = t ? pt(L, g) : null, M = Ge(d, D, {
domain: xa,
args: h
});
n(M);
}
}
function s(f, d, L) {
const p = { type: f };
return t && (p.start = d, p.end = d, p.loc = { start: L, end: L }), p;
}
function a(f, d, L, p) {
p && (f.type = p), t && (f.end = d, f.loc && (f.loc.end = L));
}
function l(f, d) {
const L = f.context(), p = s(3, L.offset, L.startLoc);
return p.value = d, a(p, f.currentOffset(), f.currentPosition()), p;
}
function i(f, d) {
const L = f.context(), { lastOffset: p, lastStartLoc: h } = L, g = s(5, p, h);
return g.index = parseInt(d, 10), f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
}
function u(f, d) {
const L = f.context(), { lastOffset: p, lastStartLoc: h } = L, g = s(4, p, h);
return g.key = d, f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
}
function m(f, d) {
const L = f.context(), { lastOffset: p, lastStartLoc: h } = L, g = s(9, p, h);
return g.value = d.replace(Ya, Ka), f.nextToken(), a(g, f.currentOffset(), f.currentPosition()), g;
}
function T(f) {
const d = f.nextToken(), L = f.context(), { lastOffset: p, lastStartLoc: h } = L, g = s(8, p, h);
return d.type !== 12 ? (r(f, y.UNEXPECTED_EMPTY_LINKED_MODIFIER, L.lastStartLoc, 0), g.value = "", a(g, p, h), {
nextConsumeToken: d,
node: g
}) : (d.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, L.lastStartLoc, 0, fe(d)), g.value = d.value || "", a(g, f.currentOffset(), f.currentPosition()), {
node: g
});
}
function O(f, d) {
const L = f.context(), p = s(7, L.offset, L.startLoc);
return p.value = d, a(p, f.currentOffset(), f.currentPosition()), p;
}
function E(f) {
const d = f.context(), L = s(6, d.offset, d.startLoc);
let p = f.nextToken();
if (p.type === 9) {
const h = T(f);
L.modifier = h.node, p = h.nextConsumeToken || f.nextToken();
}
switch (p.type !== 10 && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(p)), p = f.nextToken(), p.type === 2 && (p = f.nextToken()), p.type) {
case 11:
p.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(p)), L.key = O(f, p.value || "");
break;
case 5:
p.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(p)), L.key = u(f, p.value || "");
break;
case 6:
p.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(p)), L.key = i(f, p.value || "");
break;
case 7:
p.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(p)), L.key = m(f, p.value || "");
break;
default:
r(f, y.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
const h = f.context(), g = s(7, h.offset, h.startLoc);
return g.value = "", a(g, h.offset, h.startLoc), L.key = g, a(L, h.offset, h.startLoc), {
nextConsumeToken: p,
node: L
};
}
return a(L, f.currentOffset(), f.currentPosition()), {
node: L
};
}
function v(f) {
const d = f.context(), L = d.currentType === 1 ? f.currentOffset() : d.offset, p = d.currentType === 1 ? d.endLoc : d.startLoc, h = s(2, L, p);
h.items = [];
let g = null;
do {
const w = g || f.nextToken();
switch (g = null, w.type) {
case 0:
w.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(w)), h.items.push(l(f, w.value || ""));
break;
case 6:
w.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(w)), h.items.push(i(f, w.value || ""));
break;
case 5:
w.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(w)), h.items.push(u(f, w.value || ""));
break;
case 7:
w.value == null && r(f, y.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, fe(w)), h.items.push(m(f, w.value || ""));
break;
case 8:
const x = E(f);
h.items.push(x.node), g = x.nextConsumeToken || null;
break;
}
} while (d.currentType !== 14 && d.currentType !== 1);
const D = d.currentType === 1 ? d.lastOffset : f.currentOffset(), M = d.currentType === 1 ? d.lastEndLoc : f.currentPosition();
return a(h, D, M), h;
}
function k(f, d, L, p) {
const h = f.context();
let g = p.items.length === 0;
const D = s(1, d, L);
D.cases = [], D.cases.push(p);
do {
const M = v(f);
g || (g = M.items.length === 0), D.cases.push(M);
} while (h.currentType !== 14);
return g && r(f, y.MUST_HAVE_MESSAGES_IN_PLURAL, L, 0), a(D, f.currentOffset(), f.currentPosition()), D;
}
function P(f) {
const d = f.context(), { offset: L, startLoc: p } = d, h = v(f);
return d.currentType === 14 ? h : k(f, L, p, h);
}
function C(f) {
const d = Ha(f, yn({}, e)), L = d.context(), p = s(0, L.offset, L.startLoc);
return t && p.loc && (p.loc.source = f), p.body = P(d), e.onCacheKey && (p.cacheKey = e.onCacheKey(f)), L.currentType !== 14 && r(d, y.UNEXPECTED_LEXICAL_ANALYSIS, L.lastStartLoc, 0, f[L.offset] || ""), a(p, d.currentOffset(), d.currentPosition()), p;
}
return { parse: C };
}
function fe(e) {
if (e.type === 14)
return "EOF";
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
return t.length > 10 ? t.slice(0, 9) + "\u2026" : t;
}
function Ba(e, t = {}) {
const n = {
ast: e,
helpers: /* @__PURE__ */ new Set()
};
return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
}
function Qt(e, t) {
for (let n = 0; n < e.length; n++)
Ut(e[n], t);
}
function Ut(e, t) {
switch (e.type) {
case 1:
Qt(e.cases, t), t.helper("plural");
break;
case 2:
Qt(e.items, t);
break;
case 6:
Ut(e.key, t), t.helper("linked"), t.helper("type");
break;
case 5:
t.helper("interpolate"), t.helper("list");
break;
case 4:
t.helper("interpolate"), t.helper("named");
break;
}
}
function Xa(e, t = {}) {
const n = Ba(e);
n.helper("normalize"), e.body && Ut(e.body, n);
const r = n.context();
e.helpers = Array.from(r.helpers);
}
function Ja(e) {
const t = e.body;
return t.type === 2 ? qt(t) : t.cases.forEach((n) => qt(n)), e;
}
function qt(e) {
if (e.items.length === 1) {
const t = e.items[0];
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
} else {
const t = [];
for (let n = 0; n < e.items.length; n++) {
const r = e.items[n];
if (!(r.type === 3 || r.type === 9) || r.value == null)
break;
t.push(r.value);
}
if (t.length === e.items.length) {
e.static = Sn(t);
for (let n = 0; n < e.items.length; n++) {
const r = e.items[n];
(r.type === 3 || r.type === 9) && delete r.value;
}
}
}
}
const Qa = "minifier";
function we(e) {
switch (e.t = e.type, e.type) {
case 0:
const t = e;
we(t.body), t.b = t.body, delete t.body;
break;
case 1:
const n = e, r = n.cases;
for (let T = 0; T < r.length; T++)
we(r[T]);
n.c = r, delete n.cases;
break;
case 2:
const s = e, a = s.items;
for (let T = 0; T < a.length; T++)
we(a[T]);
s.i = a, delete s.items, s.static && (s.s = s.static, delete s.static);
break;
case 3:
case 9:
case 8:
case 7:
const l = e;
l.value && (l.v = l.value, delete l.value);
break;
case 6:
const i = e;
we(i.key), i.k = i.key, delete i.key, i.modifier && (we(i.modifier), i.m = i.modifier, delete i.modifier);
break;
case 5:
const u = e;
u.i = u.index, delete u.index;
break;
case 4:
const m = e;
m.k = m.key, delete m.key;
break;
default:
throw Ge(y.UNHANDLED_MINIFIER_NODE_TYPE, null, {
domain: Qa,
args: [e.type]
});
}
delete e.type;
}
const qa = "parser";
function Za(e, t) {
const { sourceMap: n, filename: r, breakLineCode: s, needIndent: a } = t, l = t.location !== !1, i = {
filename: r,
code: "",
column: 1,
line: 1,
offset: 0,
map: void 0,
breakLineCode: s,
needIndent: a,
indentLevel: 0
};
l && e.loc && (i.source = e.loc.source);
const u = () => i;
function m(C, f) {
i.code += C;
}
function T(C, f = !0) {
const d = f ? s : "";
m(a ? d + " ".repeat(C) : d);
}
function O(C = !0) {
const f = ++i.indentLevel;
C && T(f);
}
function E(C = !0) {
const f = --i.indentLevel;
C && T(f);
}
function v() {
T(i.indentLevel);
}
return {
context: u,
push: m,
indent: O,
deindent: E,
newline: v,
helper: (C) => `_${C}`,
needIndent: () => i.needIndent
};
}
function za(e, t) {
const { helper: n } = e;
e.push(`${n("linked")}(`), $e(e, t.key), t.modifier ? (e.push(", "), $e(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
}
function er(e, t) {
const { helper: n, needIndent: r } = e;
e.push(`${n("normalize")}([`), e.indent(r());
const s = t.items.length;
for (let a = 0; a < s && ($e(e, t.items[a]), a !== s - 1); a++)
e.push(", ");
e.deindent(r()), e.push("])");
}
function tr(e, t) {
const { helper: n, needIndent: r } = e;
if (t.cases.length > 1) {
e.push(`${n("plural")}([`), e.indent(r());
const s = t.cases.length;
for (let a = 0; a < s && ($e(e, t.cases[a]), a !== s - 1); a++)
e.push(", ");
e.deindent(r()), e.push("])");
}
}
function nr(e, t) {
t.body ? $e(e, t.body) : e.push("null");
}
function $e(e, t) {
const { helper: n } = e;
switch (t.type) {
case 0:
nr(e, t);
break;
case 1:
tr(e, t);
break;
case 2:
er(e, t);
break;
case 6:
za(e, t);
break;
case 8:
e.push(JSON.stringify(t.value), t);
break;
case 7:
e.push(JSON.stringify(t.value), t);
break;
case 5:
e.push(`${n("interpolate")}(${n("list")}(${t.index}))`, t);
break;
case 4:
e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`, t);
break;
case 9:
e.push(JSON.stringify(t.value), t);
break;
case 3:
e.push(JSON.stringify(t.value), t);
break;
default:
throw Ge(y.UNHANDLED_CODEGEN_NODE_TYPE, null, {
domain: qa,
args: [t.type]
});
}
}
const ar = (e, t = {}) => {
const n = Xt(t.mode) ? t.mode : "normal", r = Xt(t.filename) ? t.filename : "message.intl", s = !!t.sourceMap, a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
`, l = t.needIndent ? t.needIndent : n !== "arrow", i = e.helpers || [], u = Za(e, {
mode: n,
filename: r,
sourceMap: s,
breakLineCode: a,
needIndent: l
});
u.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), u.indent(l), i.length > 0 && (u.push(`const { ${Sn(i.map((O) => `${O}: _${O}`), ", ")} } = ctx`), u.newline()), u.push("return "), $e(u, e), u.deindent(l), u.push("}"), delete e.helpers;
const { code: m, map: T } = u.context();
return {
ast: e,
code: m,
map: T ? T.toJSON() : void 0
};
};
function rr(e, t = {}) {
const n = yn({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i = ja(n).parse(e);
return r ? (a && Ja(i), s && we(i), { ast: i, code: "" }) : (Xa(i, n), ar(i, n));
}
/*!
* core-base v9.5.0
* (c) 2023 kazuya kawaguchi
* Released under the MIT License.
*/
function sr() {
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ne().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (Ne().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ne().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
}
const Ie = [];
Ie[0] = {
w: [0],
i: [3, 0],
["["]: [4],
o: [7]
};
Ie[1] = {
w: [1],
["."]: [2],
["["]: [4],
o: [7]
};
Ie[2] = {
w: [2],
i: [3, 0],
[0]: [3, 0]
};
Ie[3] = {
i: [3, 0],
[0]: [3, 0],
w: [1, 1],
["."]: [2, 1],
["["]: [4, 1],
o: [7, 1]
};
Ie[4] = {
["'"]: [5, 0],
['"']: [6, 0],
["["]: [
4,
2
],
["]"]: [1, 3],
o: 8,
l: [4, 0]
};
Ie[5] = {
["'"]: [4, 0],
o: 8,
l: [5, 0]
};
Ie[6] = {
['"']: [4, 0],
o: 8,
l: [6, 0]
};
const lr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
function or(e) {
return lr.test(e);
}
function ir(e) {
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
}
function cr(e) {
if (e == null)
return "o";
switch (e.charCodeAt(0)) {
case 91:
case 93:
case 46:
case 34:
case 39:
return e;
case 95:
case 36:
case 45:
return "i";
case 9:
case 10:
case 13:
case 160:
case 65279:
case 8232:
case 8233:
return "w";
}
return "i";
}
function ur(e) {
const t = e.trim();
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : or(t) ? ir(t) : "*" + t;
}
function fr(e) {
const t = [];
let n = -1, r = 0, s = 0, a, l, i, u, m, T, O;
const E = [];
E[0] = () => {
l === void 0 ? l = i : l += i;
}, E[1] = () => {
l !== void 0 && (t.push(l), l = void 0);
}, E[2] = () => {
E[0](), s++;
}, E[3] = () => {
if (s > 0)
s--, r = 4, E[0]();
else {
if (s = 0, l === void 0 || (l = ur(l), l === !1))
return !1;
E[1]();
}
};
function v() {
const k = e[n + 1];
if (r === 5 && k === "'" || r === 6 && k === '"')
return n++, i = "\\" + k, E[0](), !0;
}
for (; r !== null; )
if (n++, a = e[n], !(a === "\\" && v())) {
if (u = cr(a), O = Ie[r], m = O[u] || O.l || 8, m === 8 || (r = m[0], m[1] !== void 0 && (T = E[m[1]], T && (i = a, T() === !1))))
return;
if (r === 7)
return t;
}
}
const Zt = /* @__PURE__ */ new Map();
function _r(e, t) {
return V(e) ? e[t] : null;
}
function mr(e, t) {
if (!V(e))
return null;
let n = Zt.get(t);
if (n || (n = fr(t), n && Zt.set(t, n)), !n)
return null;
const r = n.length;
let s = e, a = 0;
for (; a < r; ) {
const l = s[n[a]];
if (l === void 0)
return null;
s = l, a++;
}
return s;
}
const dr = (e) => e, Er = (e) => "", gr = "text", Nr = (e) => e.length === 0 ? "" : ha(e), pr = va;
function zt(e, t) {
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
}
function Tr(e) {
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
}
function Lr(e, t) {
t.count || (t.count = e), t.n || (t.n = e);
}
function Or(e = {}) {
const t = e.locale, n = Tr(e), r = V(e.pluralRules) && b(t) && G(e.pluralRules[t]) ? e.pluralRules[t] : zt, s = V(e.pluralRules) && b(t) && G(e.pluralRules[t]) ? zt : void 0, a = (f) => f[r(n, f.length, s)], l = e.list || [], i = (f) => l[f], u = e.named || {};
j(e.pluralIndex) && Lr(n, u);
const m = (f) => u[f];
function T(f) {
const d = G(e.messages) ? e.messages(f) : V(e.messages) ? e.messages[f] : !1;
return d || (e.parent ? e.parent.message(f) : Er);
}
const O = (f) => e.modifiers ? e.modifiers[f] : dr, E = R(e.processor) && G(e.processor.normalize) ? e.processor.normalize : Nr, v = R(e.processor) && G(e.processor.interpolate) ? e.processor.interpolate : pr, k = R(e.processor) && b(e.processor.type) ? e.processor.type : gr, C = {
list: i,
named: m,
plural: a,
linked: (f, ...d) => {
const [L, p] = d;
let h = "text", g = "";
d.length === 1 ? V(L) ? (g = L.modifier || g, h = L.type || h) : b(L) && (g = L || g) : d.length === 2 && (b(L) && (g = L || g), b(p) && (h = p || h));
const D = T(f)(C), M = h === "vnode" && W(D) && g ? D[0] : D;
return g ? O(g)(M, h) : M;
},
message: T,
type: k,
interpolate: v,
normalize: E,
values: J({}, l, u)
};
return C;
}
let et = null;
function Ir(e) {
et = e;
}
function br(e, t, n) {
et && et.emit("i18n:init", {
timestamp: Date.now(),
i18n: e,
version: t,
meta: n
});
}
const vr = /* @__PURE__ */ hr("function:translate");
function hr(e) {
return (t) => et && et.emit(e, t);
}
const Z = {
NOT_FOUND_KEY: 1,
FALLBACK_TO_TRANSLATE: 2,
CANNOT_FORMAT_NUMBER: 3,
FALLBACK_TO_NUMBER_FORMAT: 4,
CANNOT_FORMAT_DATE: 5,
FALLBACK_TO_DATE_FORMAT: 6,
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7,
__EXTEND_POINT__: 8
}, Ar = {
[Z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
[Z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
[Z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
[Z.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
[Z.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
[Z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
[Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
};
function Pe(e, ...t) {
return St(Ar[e], ...t);
}
function wt(e, t) {
return t.locale != null ? en(t.locale) : en(e.locale);
}
let mt;
function en(e) {
return b(e) ? e : mt != null && e.resolvedOnce ? mt : mt = e();
}
function Cr(e, t, n) {
return [.../* @__PURE__ */ new Set([
n,
...W(t) ? t : V(t) ? Object.keys(t) : b(t) ? [t] : [n]
])];
}
function Rn(e, t, n) {
const r = b(n) ? n : We, s = e;
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
let a = s.__localeChainCache.get(r);
if (!a) {
a = [];
let l = [n];
for (; W(l); )
l = tn(a, l, t);
const i = W(t) || !R(t) ? t : t.default ? t.default : null;
l = b(i) ? [i] : i, W(l) && tn(a, l, !1), s.__localeChainCache.set(r, a);
}
return a;
}
function tn(e, t, n) {
let r = !0;
for (let s = 0; s < t.length && F(r); s++) {
const a = t[s];
b(a) && (r = Dr(e, t[s], n));
}
return r;
}
function Dr(e, t, n) {
let r;
const s = t.split("-");
do {
const a = s.join("-");
r = Pr(e, a, n), s.splice(-1, 1);
} while (s.length && r === !0);
return r;
}
function Pr(e, t, n) {
let r = !1;
if (!e.includes(t) && (r = !0, t)) {
r = t[t.length - 1] !== "!";
const s = t.replace(/!/g, "");
e.push(s), (W(n) || R(n)) && n[s] && (r = n[s]);
}
return r;
}
const kr = "9.5.0", ct = -1, We = "en-US", ot = "", nn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
function yr() {
return {
upper: (e, t) => t === "text" && b(e) ? e.toUpperCase() : t === "vnode" && V(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
lower: (e, t) => t === "text" && b(e) ? e.toLowerCase() : t === "vnode" && V(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
capitalize: (e, t) => t === "text" && b(e) ? nn(e) : t === "vnode" && V(e) && "__v_isVNode" in e ? nn(e.children) : e
};
}
let Mn;
function an(e) {
Mn = e;
}
let Fn;
function Sr(e) {
Fn = e;
}
let Un;
function Rr(e) {
Un = e;
}
let wn = null;
const rn = (e) => {
wn = e;
}, Mr = () => wn;
let Vn = null;
const sn = (e) => {
Vn = e;
}, Fr = () => Vn;
let ln = 0;
function Ur(e = {}) {
const t = G(e.onWarn) ? e.onWarn : X, n = b(e.version) ? e.version : kr, r = b(e.locale) || G(e.locale) ? e.locale : We, s = G(r) ? We : r, a = W(e.fallbackLocale) || R(e.fallbackLocale) || b(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, l = R(e.messages) ? e.messages : { [s]: {} }, i = R(e.datetimeFormats) ? e.datetimeFormats : { [s]: {} }, u = R(e.numberFormats) ? e.numberFormats : { [s]: {} }, m = J({}, e.modifiers || {}, yr()), T = e.pluralRules || {}, O = G(e.missing) ? e.missing : null, E = F(e.missingWarn) || Oe(e.missingWarn) ? e.missingWarn : !0, v = F(e.fallbackWarn) || Oe(e.fallbackWarn) ? e.fallbackWarn : !0, k = !!e.fallbackFormat, P = !!e.unresolving, C = G(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, d = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, L = !!e.escapeParameter, p = G(e.messageCompiler) ? e.messageCompiler : Mn;
process.env.NODE_ENV !== "production" && !0 && !0 && G(e.messageCompiler) && Ca(Pe(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
const h = G(e.messageResolver) ? e.messageResolver : Fn || _r, g = G(e.localeFallbacker) ? e.localeFallbacker : Un || Cr, D = V(e.fallbackContext) ? e.fallbackContext : void 0, M = e, w = V(M.__datetimeFormatters) ? M.__datetimeFormatters : /* @__PURE__ */ new Map(), x = V(M.__numberFormatters) ? M.__numberFormatters : /* @__PURE__ */ new Map(), se = V(M.__meta) ? M.__meta : {};
ln++;
const B = {
version: n,
cid: ln,
locale: r,
fallbackLocale: a,
messages: l,
modifiers: m,
pluralRules: T,
missing: O,
missingWarn: E,
fallbackWarn: v,
fallbackFormat: k,
unresolving: P,
postTranslation: C,
processor: f,
warnHtmlMessage: d,
escapeParameter: L,
messageCompiler: p,
messageResolver: h,
localeFallbacker: g,
fallbackContext: D,
onWarn: t,
__meta: se
};
return B.datetimeFormats = i, B.numberFormats = u, B.__datetimeFormatters = w, B.__numberFormatters = x, process.env.NODE_ENV !== "production" && (B.__v_emitter = M.__v_emitter != null ? M.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && br(B, n, se), B;
}
function ut(e, t) {
return e instanceof RegExp ? e.test(t) : e;
}
function $n(e, t) {
return e instanceof RegExp ? e.test(t) : e;
}
function Vt(e, t, n, r, s) {
const { missing: a, onWarn: l } = e;
if (process.env.NODE_ENV !== "production") {
const i = e.__v_emitter;
i && i.emit("missing", {
locale: n,
key: t,
type: s,
groupId: `${s}:${t}`
});
}
if (a !== null) {
const i = a(e, n, t, s);
return b(i) ? i : t;
} else
return process.env.NODE_ENV !== "production" && $n(r, t) && l(Pe(Z.NOT_FOUND_KEY, { key: t, locale: n })), t;
}
function qe(e, t, n) {
const r = e;
r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
}
function dt(e) {
return (n) => wr(n, e);
}
function wr(e, t) {
const n = t.b || t.body;
if ((n.t || n.type) === 1) {
const r = n, s = r.c || r.cases;
return e.plural(s.reduce((a, l) => [
...a,
on(e, l)
], []));
} else
return on(e, n);
}
function on(e, t) {
const n = t.s || t.static;
if (n)
return e.type === "text" ? n : e.normalize([n]);
{
const r = (t.i || t.items).reduce((s, a) => [...s, Tt(e, a)], []);
return e.normalize(r);
}
}
function Tt(e, t) {
const n = t.t || t.type;
switch (n) {
case 3:
const r = t;
return r.v || r.value;
case 9:
const s = t;
return s.v || s.value;
case 4:
const a = t;
return e.interpolate(e.named(a.k || a.key));
case 5:
const l = t;
return e.interpolate(e.list(l.i != null ? l.i : l.index));
case 6:
const i = t, u = i.m || i.modifier;
return e.linked(Tt(e, i.k || i.key), u ? Tt(e, u) : void 0, e.type);
case 7:
const m = t;
return m.v || m.value;
case 8:
const T = t;
return T.v || T.value;
default:
throw new Error(`unhandled node type on format message part: ${n}`);
}
}
const Wn = y.__EXTEND_POINT__, st = Mt(Wn), re = {
INVALID_ARGUMENT: Wn,
INVALID_DATE_ARGUMENT: st(),
INVALID_ISO_DATE_ARGUMENT: st(),
NOT_SUPPORT_NON_STRING_MESSAGE: st(),
__EXTEND_POINT__: st()
};
function Ce(e) {
return Ge(e, null, process.env.NODE_ENV !== "production" ? { messages: Vr } : void 0);
}
const Vr = {
[re.INVALID_ARGUMENT]: "Invalid arguments",
[re.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
[re.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
[re.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message"
}, $r = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
function Gn(e, t) {
t && Fa(e) && X(St($r, { source: e }));
}
const Hn = (e) => e;
let Ve = /* @__PURE__ */ Object.create(null);
const ke = (e) => V(e) && (e.t === 0 || e.type === 0) && ("b" in e || "body" in e);
function xn(e, t = {}) {
let n = !1;
const r = t.onError || Ra;
return t.onError = (s) => {
n = !0, r(s);
}, { ...rr(e, t), detectError: n };
}
const Wr = (e, t) => {
if (!b(e))
throw Ce(re.NOT_SUPPORT_NON_STRING_MESSAGE);
{
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
process.env.NODE_ENV !== "production" && Gn(e, n);
const s = (t.onCacheKey || Hn)(e), a = Ve[s];
if (a)
return a;
const { code: l, detectError: i } = xn(e, t), u = new Function(`return ${l}`)();
return i ? u : Ve[s] = u;
}
};
function Gr(e, t) {
if (__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__ && b(e)) {
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
process.env.NODE_ENV !== "production" && Gn(e, n);
const s = (t.onCacheKey || Hn)(e), a = Ve[s];
if (a)
return a;
const { ast: l, detectError: i } = xn(e, {
...t,
location: process.env.NODE_ENV !== "production",
jit: !0
}), u = dt(l);
return i ? u : Ve[s] = u;
} else {
if (process.env.NODE_ENV !== "production" && !ke(e))
return X(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e;
const n = e.cacheKey;
if (n) {
const r = Ve[n];
return r || (Ve[n] = dt(e));
} else
return dt(e);
}
}
const cn = () => "", oe = (e) => G(e);
function un(e, ...t) {
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: l, messages: i } = e, [u, m] = Lt(...t), T = F(m.missingWarn) ? m.missingWarn : e.missingWarn, O = F(m.fallbackWarn) ? m.fallbackWarn : e.fallbackWarn, E = F(m.escapeParameter) ? m.escapeParameter : e.escapeParameter, v = !!m.resolvedMessage, k = b(m.default) || F(m.default) ? F(m.default) ? a ? u : () => u : m.default : n ? a ? u : () => u : "", P = n || k !== "", C = wt(e, m);
E && Hr(m);
let [f, d, L] = v ? [
u,
C,
i[C] || {}
] : Yn(e, u, C, l, O, T), p = f, h = u;
if (!v && !(b(p) || ke(p) || oe(p)) && P && (p = k, h = p), !v && (!(b(p) || ke(p) || oe(p)) || !b(d)))
return s ? ct : u;
if (process.env.NODE_ENV !== "production" && b(p) && e.messageCompiler == null)
return X(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`), u;
let g = !1;
const D = () => {
g = !0;
}, M = oe(p) ? p : Kn(e, u, d, p, h, D);
if (g)
return p;
const w = jr(e, d, L, m), x = Or(w), se = xr(e, M, x), B = r ? r(se, u) : se;
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
const ae = {
timestamp: Date.now(),
key: b(u) ? u : oe(p) ? p.key : "",
locale: d || (oe(p) ? p.locale : ""),
format: b(p) ? p : oe(p) ? p.source : "",
message: B
};
ae.meta = J({}, e.__meta, Mr() || {}), vr(ae);
}
return B;
}
function Hr(e) {
W(e.list) ? e.list = e.list.map((t) => b(t) ? Kt(t) : t) : V(e.named) && Object.keys(e.named).forEach((t) => {
b(e.named[t]) && (e.named[t] = Kt(e.named[t]));
});
}
function Yn(e, t, n, r, s, a) {
const { messages: l, onWarn: i, messageResolver: u, localeFallbacker: m } = e, T = m(e, r, n);
let O = {}, E, v = null, k = n, P = null;
const C = "translate";
for (let f = 0; f < T.length; f++) {
if (E = P = T[f], process.env.NODE_ENV !== "production" && n !== E && ut(s, t) && i(Pe(Z.FALLBACK_TO_TRANSLATE, {
key: t,
target: E
})), process.env.NODE_ENV !== "production" && n !== E) {
const g = e.__v_emitter;
g && g.emit("fallback", {
type: C,
key: t,
from: k,
to: P,
groupId: `${C}:${t}`
});
}
O = l[E] || {};
let d = null, L, p;
if (process.env.NODE_ENV !== "production" && de && (d = window.performance.now(), L = "intlify-message-resolve-start", p = "intlify-message-resolve-end", ne && ne(L)), (v = u(O, t)) === null && (v = O[t]), process.env.NODE_ENV !== "production" && de) {
const g = window.performance.now(), D = e.__v_emitter;
D && d && v && D.emit("message-resolve", {
type: "message-resolve",
key: t,
message: v,
time: g - d,
groupId: `${C}:${t}`
}), L && p && ne && De && (ne(p), De("intlify message resolve", L, p));
}
if (b(v) || ke(v) || oe(v))
break;
const h = Vt(
e,
t,
E,
a,
C
);
h !== t && (v = h), k = P;
}
return [v, E, O];
}
function Kn(e, t, n, r, s, a) {
const { messageCompiler: l, warnHtmlMessage: i } = e;
if (oe(r)) {
const E = r;
return E.locale = E.locale || n, E.key = E.key || t, E;
}
if (l == null) {
const E = () => r;
return E.locale = n, E.key = t, E;
}
let u = null, m, T;
process.env.NODE_ENV !== "production" && de && (u = window.performance.now(), m = "intlify-message-compilation-start", T = "intlify-message-compilation-end", ne && ne(m));
const O = l(r, Yr(e, n, s, r, i, a));
if (process.env.NODE_ENV !== "production" && de) {
const E = window.performance.now(), v = e.__v_emitter;
v && u && v.emit("message-compilation", {
type: "message-compilation",
message: r,
time: E - u,
groupId: `translate:${t}`
}), m && T && ne && De && (ne(T), De("intlify message compilation", m, T));
}
return O.locale = n, O.key = t, O.source = r, O;
}
function xr(e, t, n) {
let r = null, s, a;
process.env.NODE_ENV !== "production" && de && (r = window.performance.now(), s = "intlify-message-evaluation-start", a = "intlify-message-evaluation-end", ne && ne(s));
const l = t(n);
if (process.env.NODE_ENV !== "production" && de) {
const i = window.performance.now(), u = e.__v_emitter;
u && r && u.emit("message-evaluation", {
type: "message-evaluation",
value: l,
time: i - r,
groupId: `translate:${t.key}`
}), s && a && ne && De && (ne(a), De("intlify message evaluation", s, a));
}
return l;
}
function Lt(...e) {
const [t, n, r] = e, s = {};
if (!b(t) && !j(t) && !oe(t) && !ke(t))
throw Ce(re.INVALID_ARGUMENT);
const a = j(t) ? String(t) : (oe(t), t);
return j(n) ? s.plural = n : b(n) ? s.default = n : R(n) && !it(n) ? s.named = n : W(n) && (s.list = n), j(r) ? s.plural = r : b(r) ? s.default = r : R(r) && J(s, r), [a, s];
}
function Yr(e, t, n, r, s, a) {
return {
locale: t,
key: n,
warnHtmlMessage: s,
onError: (l) => {
if (a && a(l), process.env.NODE_ENV !== "production") {
const i = Kr(r), u = `Message compilation error: ${l.message}`, m = l.location && i && Aa(i, l.location.start.offset, l.location.end.offset), T = e.__v_emitter;
T && i && T.emit("compile-error", {
message: i,
error: l.message,
start: l.location && l.location.start.offset,
end: l.location && l.location.end.offset,
groupId: `translate:${n}`
}), console.error(m ? `${u}
${m}` : u);
} else
throw l;
},
onCacheKey: (l) => La(t, n, l)
};
}
function Kr(e) {
var t;
if (!b(e)) {
if ((t = e.loc) != null && t.source)
return e.loc.source;
}
}
function jr(e, t, n, r) {
const { modifiers: s, pluralRules: a, messageResolver: l, fallbackLocale: i, fallbackWarn: u, missingWarn: m, fallbackContext: T } = e, E = {