inquirer-form 0.3.1 → 0.3.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/inquirer-form.css +1 -1
- package/dist/inquirer-form.es.js +711 -683
- package/dist/inquirer-form.umd.js +7 -7
- package/package.json +1 -1
package/dist/inquirer-form.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as U, computed as W, createBlock as B, openBlock as y, unref as v, withCtx as Q, createElementVNode as w, createElementBlock as A, createCommentVNode as j, toDisplayString as P, Fragment as
|
|
2
|
-
import { FormItemWrapper as Ts, TextSetting as
|
|
3
|
-
import { ElInput as
|
|
1
|
+
import { defineComponent as U, computed as W, createBlock as B, openBlock as y, unref as v, withCtx as Q, createElementVNode as w, createElementBlock as A, createCommentVNode as j, toDisplayString as P, Fragment as ge, renderList as Oe, toRefs as Se, createVNode as F, createSlots as bs, createTextVNode as dt, renderSlot as an, effectScope as Ca, ref as Pe, shallowRef as Oa, watch as Ue, isRef as Sa, getCurrentInstance as mt, h as vs, inject as xa, onMounted as Ns, onUnmounted as ka, Text as wa, Transition as Aa, mergeProps as Me, onBeforeUnmount as ys, resolveComponent as Va, resolveDynamicComponent as Pn, normalizeProps as Da, guardReactiveProps as Pa, withDirectives as Qt, normalizeClass as Ra, vShow as Zt } from "vue";
|
|
2
|
+
import { FormItemWrapper as Ts, TextSetting as De, i18n as Ua, SwitchSetting as xt, OptionsEditor as Ls, registry as nt, SchemaEngine as Is, FormDesigner as Cs, serialize as Ma } from "agilebuilder-form";
|
|
3
|
+
import { ElInput as vt, ElTooltip as Fa, ElIcon as Os, ElInputNumber as Ss, ElSwitch as $a, ElSelect as xs, ElOption as ks, ElCheckboxGroup as qa, ElCheckbox as Wa, ElForm as Ba } from "element-plus";
|
|
4
4
|
const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Ya = { class: "type-badge" }, Ka = { class: "message" }, ja = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "description"
|
|
@@ -25,11 +25,11 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
25
25
|
emits: ["select"],
|
|
26
26
|
setup(e, { emit: t }) {
|
|
27
27
|
const n = e, s = t, a = W(() => n.previewCount ?? 3), l = W(() => n.options?.slice(0, a.value) ?? []), r = W(() => (n.options?.length ?? 0) > a.value), o = W(() => n.label || n.message || n.typeLabel), c = W(() => n.message || "未设置 message");
|
|
28
|
-
return (f,
|
|
28
|
+
return (f, p) => (y(), B(v(Ts), {
|
|
29
29
|
selectable: "",
|
|
30
30
|
label: o.value,
|
|
31
31
|
"is-active": e.isActive,
|
|
32
|
-
onSelect:
|
|
32
|
+
onSelect: p[0] || (p[0] = (g) => s("select"))
|
|
33
33
|
}, {
|
|
34
34
|
default: Q(() => [
|
|
35
35
|
w("div", Ha, [
|
|
@@ -39,7 +39,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
39
39
|
w("div", Ka, P(c.value), 1),
|
|
40
40
|
e.description ? (y(), A("p", ja, P(e.description), 1)) : j("", !0),
|
|
41
41
|
l.value.length ? (y(), A("ul", Xa, [
|
|
42
|
-
(y(!0), A(
|
|
42
|
+
(y(!0), A(ge, null, Oe(l.value, (g) => (y(), A("li", {
|
|
43
43
|
key: g.value
|
|
44
44
|
}, P(g.label || g.value), 1))), 128)),
|
|
45
45
|
r.value ? (y(), A("li", za, "…")) : j("", !0)
|
|
@@ -49,12 +49,12 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
49
49
|
_: 1
|
|
50
50
|
}, 8, ["label", "is-active"]));
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), ie = (e, t) => {
|
|
53
53
|
const n = e.__vccOpts || e;
|
|
54
54
|
for (const [s, a] of t)
|
|
55
55
|
n[s] = a;
|
|
56
56
|
return n;
|
|
57
|
-
},
|
|
57
|
+
}, xe = /* @__PURE__ */ ie(Ja, [["__scopeId", "data-v-b29b6f1e"]]), Qa = /* @__PURE__ */ U({
|
|
58
58
|
__name: "designer",
|
|
59
59
|
props: {
|
|
60
60
|
label: {},
|
|
@@ -64,14 +64,14 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
64
64
|
},
|
|
65
65
|
emits: ["select"],
|
|
66
66
|
setup(e, { emit: t }) {
|
|
67
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o } =
|
|
68
|
-
return (c, f) => (y(), B(
|
|
67
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o } = Se(n);
|
|
68
|
+
return (c, f) => (y(), B(xe, {
|
|
69
69
|
label: v(a),
|
|
70
70
|
message: v(l),
|
|
71
71
|
description: v(r),
|
|
72
72
|
"type-label": "Inquirer Input",
|
|
73
73
|
"is-active": v(o),
|
|
74
|
-
onSelect: f[0] || (f[0] = (
|
|
74
|
+
onSelect: f[0] || (f[0] = (p) => s("select"))
|
|
75
75
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
76
76
|
}
|
|
77
77
|
}), Za = { class: "inquirer-input" }, el = {
|
|
@@ -91,7 +91,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
91
91
|
setup(e, { emit: t }) {
|
|
92
92
|
const n = e, s = t, a = W(() => n.displayValue === void 0 ? !1 : n.displayValue !== n.modelValue);
|
|
93
93
|
return (l, r) => (y(), A("div", Za, [
|
|
94
|
-
F(v(
|
|
94
|
+
F(v(vt), {
|
|
95
95
|
"model-value": e.modelValue ?? "",
|
|
96
96
|
placeholder: e.placeholder,
|
|
97
97
|
disabled: e.disabled,
|
|
@@ -101,14 +101,14 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
101
101
|
e.prefix ? {
|
|
102
102
|
name: "prepend",
|
|
103
103
|
fn: Q(() => [
|
|
104
|
-
|
|
104
|
+
dt(P(e.prefix), 1)
|
|
105
105
|
]),
|
|
106
106
|
key: "0"
|
|
107
107
|
} : void 0,
|
|
108
108
|
e.suffix ? {
|
|
109
109
|
name: "append",
|
|
110
110
|
fn: Q(() => [
|
|
111
|
-
|
|
111
|
+
dt(P(e.suffix), 1)
|
|
112
112
|
]),
|
|
113
113
|
key: "1"
|
|
114
114
|
} : void 0
|
|
@@ -116,7 +116,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
116
116
|
a.value ? (y(), A("p", el, P(e.displayValue), 1)) : j("", !0)
|
|
117
117
|
]));
|
|
118
118
|
}
|
|
119
|
-
}), nl = /* @__PURE__ */
|
|
119
|
+
}), nl = /* @__PURE__ */ ie(tl, [["__scopeId", "data-v-c4eebc18"]]), sl = { class: "base-input-config" }, al = /* @__PURE__ */ U({
|
|
120
120
|
__name: "BaseInputConfig",
|
|
121
121
|
props: {
|
|
122
122
|
label: {},
|
|
@@ -132,7 +132,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
132
132
|
n("update", { props: { [l]: r } });
|
|
133
133
|
}
|
|
134
134
|
return (l, r) => (y(), A("div", sl, [
|
|
135
|
-
F(v(
|
|
135
|
+
F(v(De), {
|
|
136
136
|
label: l.$t("designer.node.field_label"),
|
|
137
137
|
modelValue: e.field,
|
|
138
138
|
"onUpdate:modelValue": s
|
|
@@ -140,7 +140,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
140
140
|
an(l.$slots, "default", { updateProp: a }, void 0, !0)
|
|
141
141
|
]));
|
|
142
142
|
}
|
|
143
|
-
}), ll = /* @__PURE__ */
|
|
143
|
+
}), ll = /* @__PURE__ */ ie(al, [["__scopeId", "data-v-be4e1176"]]), rl = { class: "textarea-setting" }, ol = {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "hint"
|
|
146
146
|
}, il = /* @__PURE__ */ U({
|
|
@@ -157,7 +157,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
157
157
|
const n = t;
|
|
158
158
|
return (s, a) => (y(), A("div", rl, [
|
|
159
159
|
w("label", null, P(e.label), 1),
|
|
160
|
-
F(v(
|
|
160
|
+
F(v(vt), {
|
|
161
161
|
type: "textarea",
|
|
162
162
|
"model-value": e.modelValue,
|
|
163
163
|
autosize: { minRows: e.minRows, maxRows: e.maxRows },
|
|
@@ -166,7 +166,7 @@ const Ha = { class: "inquirer-designer-card" }, Ga = { class: "card-header" }, Y
|
|
|
166
166
|
e.hint ? (y(), A("p", ol, P(e.hint), 1)) : j("", !0)
|
|
167
167
|
]));
|
|
168
168
|
}
|
|
169
|
-
}), cl = /* @__PURE__ */
|
|
169
|
+
}), cl = /* @__PURE__ */ ie(il, [["__scopeId", "data-v-9093816f"]]);
|
|
170
170
|
var ul = /* @__PURE__ */ U({
|
|
171
171
|
name: "CircleCheck",
|
|
172
172
|
__name: "circle-check",
|
|
@@ -343,21 +343,21 @@ var ul = /* @__PURE__ */ U({
|
|
|
343
343
|
]));
|
|
344
344
|
}
|
|
345
345
|
}), wl = kl;
|
|
346
|
-
function
|
|
346
|
+
function ke(e, t) {
|
|
347
347
|
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
348
348
|
}
|
|
349
349
|
const Rn = {};
|
|
350
350
|
function ws(e) {
|
|
351
|
-
Rn[e] || (Rn[e] = !0,
|
|
351
|
+
Rn[e] || (Rn[e] = !0, ke(e));
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
let
|
|
353
|
+
const Ne = typeof window < "u";
|
|
354
|
+
let pe, Ke;
|
|
355
355
|
if (process.env.NODE_ENV !== "production") {
|
|
356
|
-
const e =
|
|
356
|
+
const e = Ne && window.performance;
|
|
357
357
|
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
358
|
-
e.clearMeasures && (
|
|
358
|
+
e.clearMeasures && (pe = (t) => {
|
|
359
359
|
e.mark(t);
|
|
360
|
-
},
|
|
360
|
+
}, Ke = (t, n, s) => {
|
|
361
361
|
e.measure(t, n, s), e.clearMarks(n), e.clearMarks(s);
|
|
362
362
|
});
|
|
363
363
|
}
|
|
@@ -365,9 +365,9 @@ const Al = /\{([0-9a-zA-Z]+)\}/g;
|
|
|
365
365
|
function kt(e, ...t) {
|
|
366
366
|
return t.length === 1 && H(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Al, (n, s) => t.hasOwnProperty(s) ? t[s] : "");
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const Te = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Vl = (e, t, n) => Dl({ l: e, k: t, s: n }), Dl = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), le = (e) => typeof e == "number" && isFinite(e), Pl = (e) => En(e) === "[object Date]", st = (e) => En(e) === "[object RegExp]", wt = (e) => $(e) && Object.keys(e).length === 0, re = Object.assign, Rl = Object.create, X = (e = null) => Rl(e);
|
|
369
369
|
let Un;
|
|
370
|
-
const
|
|
370
|
+
const Ye = () => Un || (Un = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : X());
|
|
371
371
|
function Mn(e) {
|
|
372
372
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "=");
|
|
373
373
|
}
|
|
@@ -375,7 +375,7 @@ function Fn(e) {
|
|
|
375
375
|
return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
376
376
|
}
|
|
377
377
|
function Ul(e) {
|
|
378
|
-
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (s, a, l) => `${a}="${Fn(l)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (s, a, l) => `${a}='${Fn(l)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" &&
|
|
378
|
+
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (s, a, l) => `${a}="${Fn(l)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (s, a, l) => `${a}='${Fn(l)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && ke("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."), e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1on$3")), [
|
|
379
379
|
// In href, src, action, formaction attributes
|
|
380
380
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
|
381
381
|
// In style attributes within url()
|
|
@@ -385,7 +385,7 @@ function Ul(e) {
|
|
|
385
385
|
}), e;
|
|
386
386
|
}
|
|
387
387
|
const Ml = Object.prototype.hasOwnProperty;
|
|
388
|
-
function
|
|
388
|
+
function be(e, t) {
|
|
389
389
|
return Ml.call(e, t);
|
|
390
390
|
}
|
|
391
391
|
const Z = Array.isArray, J = (e) => typeof e == "function", S = (e) => typeof e == "string", G = (e) => typeof e == "boolean", H = (e) => e !== null && typeof e == "object", Fl = (e) => H(e) && J(e.then) && J(e.catch), As = Object.prototype.toString, En = (e) => As.call(e), $ = (e) => En(e) === "[object Object]", $l = (e) => e == null ? "" : Z(e) || $(e) && e.toString === As ? JSON.stringify(e, null, 2) : String(e);
|
|
@@ -406,12 +406,12 @@ function ql(e, t = 0, n = e.length) {
|
|
|
406
406
|
l.push(`${c}${" ".repeat(3 - String(c).length)}| ${s[o]}`);
|
|
407
407
|
const f = s[o].length;
|
|
408
408
|
if (o === r) {
|
|
409
|
-
const
|
|
410
|
-
l.push(" | " + " ".repeat(
|
|
409
|
+
const p = t - (a - f) + 1, g = Math.max(1, n > a ? f - p : n - t);
|
|
410
|
+
l.push(" | " + " ".repeat(p) + "^".repeat(g));
|
|
411
411
|
} else if (o > r) {
|
|
412
412
|
if (n > a) {
|
|
413
|
-
const
|
|
414
|
-
l.push(" | " + "^".repeat(
|
|
413
|
+
const p = Math.max(Math.min(n - a, f), 1);
|
|
414
|
+
l.push(" | " + "^".repeat(p));
|
|
415
415
|
}
|
|
416
416
|
a += f + 1;
|
|
417
417
|
}
|
|
@@ -499,21 +499,21 @@ const R = {
|
|
|
499
499
|
// minimizer error messages
|
|
500
500
|
[R.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
501
501
|
};
|
|
502
|
-
function
|
|
502
|
+
function lt(e, t, n = {}) {
|
|
503
503
|
const { domain: s, messages: a, args: l } = n, r = process.env.NODE_ENV !== "production" ? kt((a || Hl)[e] || "", ...l || []) : e, o = new SyntaxError(String(r));
|
|
504
504
|
return o.code = e, t && (o.location = t), o.domain = s, o;
|
|
505
505
|
}
|
|
506
506
|
function Gl(e) {
|
|
507
507
|
throw e;
|
|
508
508
|
}
|
|
509
|
-
const Yl = /<\/?[\w\s="/.':;#-\/]+>/, Kl = (e) => Yl.test(e),
|
|
509
|
+
const Yl = /<\/?[\w\s="/.':;#-\/]+>/, Kl = (e) => Yl.test(e), Ie = " ", jl = "\r", fe = `
|
|
510
510
|
`, Xl = "\u2028", zl = "\u2029";
|
|
511
511
|
function Jl(e) {
|
|
512
512
|
const t = e;
|
|
513
513
|
let n = 0, s = 1, a = 1, l = 0;
|
|
514
|
-
const r = (E) => t[E] === jl && t[E + 1] ===
|
|
515
|
-
function
|
|
516
|
-
return l = 0,
|
|
514
|
+
const r = (E) => t[E] === jl && t[E + 1] === fe, o = (E) => t[E] === fe, c = (E) => t[E] === zl, f = (E) => t[E] === Xl, p = (E) => r(E) || o(E) || c(E) || f(E), g = () => n, m = () => s, k = () => a, V = () => l, O = (E) => r(E) || c(E) || f(E) ? fe : t[E], x = () => O(n), d = () => O(n + l);
|
|
515
|
+
function _() {
|
|
516
|
+
return l = 0, p(n) && (s++, a = 0), r(n) && n++, n++, a++, t[n];
|
|
517
517
|
}
|
|
518
518
|
function T() {
|
|
519
519
|
return r(n + l) && l++, l++, t[n + l];
|
|
@@ -524,10 +524,10 @@ function Jl(e) {
|
|
|
524
524
|
function C(E = 0) {
|
|
525
525
|
l = E;
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function L() {
|
|
528
528
|
const E = n + l;
|
|
529
529
|
for (; E !== n; )
|
|
530
|
-
|
|
530
|
+
_();
|
|
531
531
|
l = 0;
|
|
532
532
|
}
|
|
533
533
|
return {
|
|
@@ -538,14 +538,14 @@ function Jl(e) {
|
|
|
538
538
|
charAt: O,
|
|
539
539
|
currentChar: x,
|
|
540
540
|
currentPeek: d,
|
|
541
|
-
next:
|
|
541
|
+
next: _,
|
|
542
542
|
peek: T,
|
|
543
543
|
reset: b,
|
|
544
544
|
resetPeek: C,
|
|
545
|
-
skipToPeek:
|
|
545
|
+
skipToPeek: L
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const Ve = void 0, Ql = ".", qn = "'", Zl = "tokenizer";
|
|
549
549
|
function er(e, t = {}) {
|
|
550
550
|
const n = t.location !== !1, s = Jl(e), a = () => s.index(), l = () => Wl(s.line(), s.column(), s.index()), r = l(), o = a(), c = {
|
|
551
551
|
currentType: 13,
|
|
@@ -559,15 +559,15 @@ function er(e, t = {}) {
|
|
|
559
559
|
braceNest: 0,
|
|
560
560
|
inLinked: !1,
|
|
561
561
|
text: ""
|
|
562
|
-
}, f = () => c, { onError:
|
|
562
|
+
}, f = () => c, { onError: p } = t;
|
|
563
563
|
function g(i, u, N, ...D) {
|
|
564
564
|
const ne = f();
|
|
565
|
-
if (u.column += N, u.offset += N,
|
|
566
|
-
const se = n ? ln(ne.startLoc, u) : null, Y =
|
|
565
|
+
if (u.column += N, u.offset += N, p) {
|
|
566
|
+
const se = n ? ln(ne.startLoc, u) : null, Y = lt(i, se, {
|
|
567
567
|
domain: Zl,
|
|
568
568
|
args: D
|
|
569
569
|
});
|
|
570
|
-
|
|
570
|
+
p(Y);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
function m(i, u, N) {
|
|
@@ -585,7 +585,7 @@ function er(e, t = {}) {
|
|
|
585
585
|
}
|
|
586
586
|
function O(i) {
|
|
587
587
|
let u = "";
|
|
588
|
-
for (; i.currentPeek() ===
|
|
588
|
+
for (; i.currentPeek() === Ie || i.currentPeek() === fe; )
|
|
589
589
|
u += i.currentPeek(), i.peek();
|
|
590
590
|
return u;
|
|
591
591
|
}
|
|
@@ -594,15 +594,15 @@ function er(e, t = {}) {
|
|
|
594
594
|
return i.skipToPeek(), u;
|
|
595
595
|
}
|
|
596
596
|
function d(i) {
|
|
597
|
-
if (i ===
|
|
597
|
+
if (i === Ve)
|
|
598
598
|
return !1;
|
|
599
599
|
const u = i.charCodeAt(0);
|
|
600
600
|
return u >= 97 && u <= 122 || // a-z
|
|
601
601
|
u >= 65 && u <= 90 || // A-Z
|
|
602
602
|
u === 95;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
if (i ===
|
|
604
|
+
function _(i) {
|
|
605
|
+
if (i === Ve)
|
|
606
606
|
return !1;
|
|
607
607
|
const u = i.charCodeAt(0);
|
|
608
608
|
return u >= 48 && u <= 57;
|
|
@@ -620,7 +620,7 @@ function er(e, t = {}) {
|
|
|
620
620
|
if (N !== 2)
|
|
621
621
|
return !1;
|
|
622
622
|
O(i);
|
|
623
|
-
const D = i.currentPeek() === "-" ? i.peek() : i.currentPeek(), ne =
|
|
623
|
+
const D = i.currentPeek() === "-" ? i.peek() : i.currentPeek(), ne = _(D);
|
|
624
624
|
return i.resetPeek(), ne;
|
|
625
625
|
}
|
|
626
626
|
function C(i, u) {
|
|
@@ -631,7 +631,7 @@ function er(e, t = {}) {
|
|
|
631
631
|
const D = i.currentPeek() === qn;
|
|
632
632
|
return i.resetPeek(), D;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function L(i, u) {
|
|
635
635
|
const { currentType: N } = u;
|
|
636
636
|
if (N !== 7)
|
|
637
637
|
return !1;
|
|
@@ -661,7 +661,7 @@ function er(e, t = {}) {
|
|
|
661
661
|
return !1;
|
|
662
662
|
const D = () => {
|
|
663
663
|
const se = i.currentPeek();
|
|
664
|
-
return se === "{" ? d(i.peek()) : se === "@" || se === "|" || se === ":" || se === "." || se ===
|
|
664
|
+
return se === "{" ? d(i.peek()) : se === "@" || se === "|" || se === ":" || se === "." || se === Ie || !se ? !1 : se === fe ? (i.peek(), D()) : Ee(i, !1);
|
|
665
665
|
}, ne = D();
|
|
666
666
|
return i.resetPeek(), ne;
|
|
667
667
|
}
|
|
@@ -670,18 +670,18 @@ function er(e, t = {}) {
|
|
|
670
670
|
const u = i.currentPeek() === "|";
|
|
671
671
|
return i.resetPeek(), u;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function Ee(i, u = !0) {
|
|
674
674
|
const N = (ne = !1, se = "") => {
|
|
675
675
|
const Y = i.currentPeek();
|
|
676
|
-
return Y === "{" || Y === "@" || !Y ? ne : Y === "|" ? !(se ===
|
|
676
|
+
return Y === "{" || Y === "@" || !Y ? ne : Y === "|" ? !(se === Ie || se === fe) : Y === Ie ? (i.peek(), N(!0, Ie)) : Y === fe ? (i.peek(), N(!0, fe)) : !0;
|
|
677
677
|
}, D = N();
|
|
678
678
|
return u && i.resetPeek(), D;
|
|
679
679
|
}
|
|
680
680
|
function te(i, u) {
|
|
681
681
|
const N = i.currentChar();
|
|
682
|
-
return N ===
|
|
682
|
+
return N === Ve ? Ve : u(N) ? (i.next(), N) : null;
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Je(i) {
|
|
685
685
|
const u = i.charCodeAt(0);
|
|
686
686
|
return u >= 97 && u <= 122 || // a-z
|
|
687
687
|
u >= 65 && u <= 90 || // A-Z
|
|
@@ -690,7 +690,7 @@ function er(e, t = {}) {
|
|
|
690
690
|
u === 36;
|
|
691
691
|
}
|
|
692
692
|
function Rt(i) {
|
|
693
|
-
return te(i,
|
|
693
|
+
return te(i, Je);
|
|
694
694
|
}
|
|
695
695
|
function Ut(i) {
|
|
696
696
|
const u = i.charCodeAt(0);
|
|
@@ -717,10 +717,10 @@ function er(e, t = {}) {
|
|
|
717
717
|
u >= 65 && u <= 70 || // A-F
|
|
718
718
|
u >= 97 && u <= 102;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Le(i) {
|
|
721
721
|
return te(i, qt);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function rt(i) {
|
|
724
724
|
let u = "", N = "";
|
|
725
725
|
for (; u = $t(i); )
|
|
726
726
|
N += u;
|
|
@@ -732,8 +732,8 @@ function er(e, t = {}) {
|
|
|
732
732
|
const N = i.currentChar();
|
|
733
733
|
if (N === "{" || N === "}" || N === "@" || N === "|" || !N)
|
|
734
734
|
break;
|
|
735
|
-
if (N ===
|
|
736
|
-
if (
|
|
735
|
+
if (N === Ie || N === fe)
|
|
736
|
+
if (Ee(i))
|
|
737
737
|
u += N, i.next();
|
|
738
738
|
else {
|
|
739
739
|
if (ee(i))
|
|
@@ -750,15 +750,15 @@ function er(e, t = {}) {
|
|
|
750
750
|
let u = "", N = "";
|
|
751
751
|
for (; u = Mt(i); )
|
|
752
752
|
N += u;
|
|
753
|
-
return i.currentChar() ===
|
|
753
|
+
return i.currentChar() === Ve && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), N;
|
|
754
754
|
}
|
|
755
755
|
function Ht(i) {
|
|
756
756
|
x(i);
|
|
757
757
|
let u = "";
|
|
758
|
-
return i.currentChar() === "-" ? (i.next(), u += `-${
|
|
758
|
+
return i.currentChar() === "-" ? (i.next(), u += `-${rt(i)}`) : u += rt(i), i.currentChar() === Ve && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), u;
|
|
759
759
|
}
|
|
760
760
|
function Gt(i) {
|
|
761
|
-
return i !== qn && i !==
|
|
761
|
+
return i !== qn && i !== fe;
|
|
762
762
|
}
|
|
763
763
|
function Vn(i) {
|
|
764
764
|
x(i), V(i, "'");
|
|
@@ -766,7 +766,7 @@ function er(e, t = {}) {
|
|
|
766
766
|
for (; u = te(i, Gt); )
|
|
767
767
|
u === "\\" ? N += Yt(i) : N += u;
|
|
768
768
|
const D = i.currentChar();
|
|
769
|
-
return D ===
|
|
769
|
+
return D === fe || D === Ve ? (g(R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, l(), 0), D === fe && (i.next(), V(i, "'")), N) : (V(i, "'"), N);
|
|
770
770
|
}
|
|
771
771
|
function Yt(i) {
|
|
772
772
|
const u = i.currentChar();
|
|
@@ -786,7 +786,7 @@ function er(e, t = {}) {
|
|
|
786
786
|
V(i, u);
|
|
787
787
|
let D = "";
|
|
788
788
|
for (let ne = 0; ne < N; ne++) {
|
|
789
|
-
const se =
|
|
789
|
+
const se = Le(i);
|
|
790
790
|
if (!se) {
|
|
791
791
|
g(R.INVALID_UNICODE_ESCAPE_SEQUENCE, l(), 0, `\\${u}${D}${i.currentChar()}`);
|
|
792
792
|
break;
|
|
@@ -796,7 +796,7 @@ function er(e, t = {}) {
|
|
|
796
796
|
return `\\${u}${D}`;
|
|
797
797
|
}
|
|
798
798
|
function Kt(i) {
|
|
799
|
-
return i !== "{" && i !== "}" && i !==
|
|
799
|
+
return i !== "{" && i !== "}" && i !== Ie && i !== fe;
|
|
800
800
|
}
|
|
801
801
|
function jt(i) {
|
|
802
802
|
x(i);
|
|
@@ -814,11 +814,11 @@ function er(e, t = {}) {
|
|
|
814
814
|
function zt(i) {
|
|
815
815
|
const u = (N) => {
|
|
816
816
|
const D = i.currentChar();
|
|
817
|
-
return D === "{" || D === "@" || D === "|" || D === "(" || D === ")" || !D || D ===
|
|
817
|
+
return D === "{" || D === "@" || D === "|" || D === "(" || D === ")" || !D || D === Ie ? N : (N += D, i.next(), u(N));
|
|
818
818
|
};
|
|
819
819
|
return u("");
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function ot(i) {
|
|
822
822
|
x(i);
|
|
823
823
|
const u = V(
|
|
824
824
|
i,
|
|
@@ -827,7 +827,7 @@ function er(e, t = {}) {
|
|
|
827
827
|
);
|
|
828
828
|
return x(i), u;
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function it(i, u) {
|
|
831
831
|
let N = null;
|
|
832
832
|
switch (i.currentChar()) {
|
|
833
833
|
case "{":
|
|
@@ -845,13 +845,13 @@ function er(e, t = {}) {
|
|
|
845
845
|
/* TokenChars.BraceRight */
|
|
846
846
|
), u.braceNest--, u.braceNest > 0 && x(i), u.inLinked && u.braceNest === 0 && (u.inLinked = !1), N;
|
|
847
847
|
case "@":
|
|
848
|
-
return u.braceNest > 0 && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), N =
|
|
848
|
+
return u.braceNest > 0 && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), N = qe(i, u) || k(u), u.braceNest = 0, N;
|
|
849
849
|
default: {
|
|
850
850
|
let ne = !0, se = !0, Y = !0;
|
|
851
851
|
if (ee(i))
|
|
852
|
-
return u.braceNest > 0 && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), N = m(u, 1,
|
|
852
|
+
return u.braceNest > 0 && g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), N = m(u, 1, ot(i)), u.braceNest = 0, u.inLinked = !1, N;
|
|
853
853
|
if (u.braceNest > 0 && (u.currentType === 4 || u.currentType === 5 || u.currentType === 6))
|
|
854
|
-
return g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), u.braceNest = 0,
|
|
854
|
+
return g(R.UNTERMINATED_CLOSING_BRACE, l(), 0), u.braceNest = 0, ct(i, u);
|
|
855
855
|
if (ne = T(i, u))
|
|
856
856
|
return N = m(u, 4, Bt(i)), x(i), N;
|
|
857
857
|
if (se = b(i, u))
|
|
@@ -865,11 +865,11 @@ function er(e, t = {}) {
|
|
|
865
865
|
}
|
|
866
866
|
return N;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function qe(i, u) {
|
|
869
869
|
const { currentType: N } = u;
|
|
870
870
|
let D = null;
|
|
871
871
|
const ne = i.currentChar();
|
|
872
|
-
switch ((N === 7 || N === 8 || N === 11 || N === 9) && (ne ===
|
|
872
|
+
switch ((N === 7 || N === 8 || N === 11 || N === 9) && (ne === fe || ne === Ie) && g(R.INVALID_LINKED_FORMAT, l(), 0), ne) {
|
|
873
873
|
case "@":
|
|
874
874
|
return i.next(), D = m(
|
|
875
875
|
u,
|
|
@@ -892,21 +892,21 @@ function er(e, t = {}) {
|
|
|
892
892
|
/* TokenChars.LinkedDelimiter */
|
|
893
893
|
);
|
|
894
894
|
default:
|
|
895
|
-
return ee(i) ? (D = m(u, 1,
|
|
895
|
+
return ee(i) ? (D = m(u, 1, ot(i)), u.braceNest = 0, u.inLinked = !1, D) : L(i, u) || M(i, u) ? (x(i), qe(i, u)) : E(i, u) ? (x(i), m(u, 11, Xt(i))) : q(i, u) ? (x(i), ne === "{" ? it(i, u) || D : m(u, 10, zt(i))) : (N === 7 && g(R.INVALID_LINKED_FORMAT, l(), 0), u.braceNest = 0, u.inLinked = !1, ct(i, u));
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function ct(i, u) {
|
|
899
899
|
let N = {
|
|
900
900
|
type: 13
|
|
901
901
|
/* TokenTypes.EOF */
|
|
902
902
|
};
|
|
903
903
|
if (u.braceNest > 0)
|
|
904
|
-
return
|
|
904
|
+
return it(i, u) || k(u);
|
|
905
905
|
if (u.inLinked)
|
|
906
|
-
return
|
|
906
|
+
return qe(i, u) || k(u);
|
|
907
907
|
switch (i.currentChar()) {
|
|
908
908
|
case "{":
|
|
909
|
-
return
|
|
909
|
+
return it(i, u) || k(u);
|
|
910
910
|
case "}":
|
|
911
911
|
return g(R.UNBALANCED_CLOSING_BRACE, l(), 0), i.next(), m(
|
|
912
912
|
u,
|
|
@@ -915,11 +915,11 @@ function er(e, t = {}) {
|
|
|
915
915
|
/* TokenChars.BraceRight */
|
|
916
916
|
);
|
|
917
917
|
case "@":
|
|
918
|
-
return
|
|
918
|
+
return qe(i, u) || k(u);
|
|
919
919
|
default: {
|
|
920
920
|
if (ee(i))
|
|
921
|
-
return N = m(u, 1,
|
|
922
|
-
if (
|
|
921
|
+
return N = m(u, 1, ot(i)), u.braceNest = 0, u.inLinked = !1, N;
|
|
922
|
+
if (Ee(i))
|
|
923
923
|
return m(u, 0, Wt(i));
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
@@ -928,11 +928,11 @@ function er(e, t = {}) {
|
|
|
928
928
|
}
|
|
929
929
|
function Jt() {
|
|
930
930
|
const { currentType: i, offset: u, startLoc: N, endLoc: D } = c;
|
|
931
|
-
return c.lastType = i, c.lastOffset = u, c.lastStartLoc = N, c.lastEndLoc = D, c.offset = a(), c.startLoc = l(), s.currentChar() ===
|
|
931
|
+
return c.lastType = i, c.lastOffset = u, c.lastStartLoc = N, c.lastEndLoc = D, c.offset = a(), c.startLoc = l(), s.currentChar() === Ve ? m(
|
|
932
932
|
c,
|
|
933
933
|
13
|
|
934
934
|
/* TokenTypes.EOF */
|
|
935
|
-
) :
|
|
935
|
+
) : ct(s, c);
|
|
936
936
|
}
|
|
937
937
|
return {
|
|
938
938
|
nextToken: Jt,
|
|
@@ -957,76 +957,76 @@ function sr(e, t, n) {
|
|
|
957
957
|
}
|
|
958
958
|
function ar(e = {}) {
|
|
959
959
|
const t = e.location !== !1, { onError: n } = e;
|
|
960
|
-
function s(d,
|
|
961
|
-
const
|
|
962
|
-
if (
|
|
963
|
-
const E = t ? ln(T,
|
|
960
|
+
function s(d, _, T, b, ...C) {
|
|
961
|
+
const L = d.currentPosition();
|
|
962
|
+
if (L.offset += b, L.column += b, n) {
|
|
963
|
+
const E = t ? ln(T, L) : null, M = lt(_, E, {
|
|
964
964
|
domain: tr,
|
|
965
965
|
args: C
|
|
966
966
|
});
|
|
967
967
|
n(M);
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
function a(d,
|
|
970
|
+
function a(d, _, T) {
|
|
971
971
|
const b = { type: d };
|
|
972
|
-
return t && (b.start =
|
|
972
|
+
return t && (b.start = _, b.end = _, b.loc = { start: T, end: T }), b;
|
|
973
973
|
}
|
|
974
|
-
function l(d,
|
|
975
|
-
t && (d.end =
|
|
974
|
+
function l(d, _, T, b) {
|
|
975
|
+
t && (d.end = _, d.loc && (d.loc.end = T));
|
|
976
976
|
}
|
|
977
|
-
function r(d,
|
|
977
|
+
function r(d, _) {
|
|
978
978
|
const T = d.context(), b = a(3, T.offset, T.startLoc);
|
|
979
|
-
return b.value =
|
|
980
|
-
}
|
|
981
|
-
function o(d,
|
|
982
|
-
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T,
|
|
983
|
-
return
|
|
984
|
-
}
|
|
985
|
-
function c(d,
|
|
986
|
-
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T,
|
|
987
|
-
return
|
|
988
|
-
}
|
|
989
|
-
function f(d,
|
|
990
|
-
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T,
|
|
991
|
-
return
|
|
992
|
-
}
|
|
993
|
-
function
|
|
994
|
-
const
|
|
995
|
-
return
|
|
996
|
-
nextConsumeToken:
|
|
997
|
-
node:
|
|
998
|
-
}) : (
|
|
999
|
-
node:
|
|
979
|
+
return b.value = _, l(b, d.currentOffset(), d.currentPosition()), b;
|
|
980
|
+
}
|
|
981
|
+
function o(d, _) {
|
|
982
|
+
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T, L = a(5, b, C);
|
|
983
|
+
return L.index = parseInt(_, 10), d.nextToken(), l(L, d.currentOffset(), d.currentPosition()), L;
|
|
984
|
+
}
|
|
985
|
+
function c(d, _) {
|
|
986
|
+
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T, L = a(4, b, C);
|
|
987
|
+
return L.key = _, d.nextToken(), l(L, d.currentOffset(), d.currentPosition()), L;
|
|
988
|
+
}
|
|
989
|
+
function f(d, _) {
|
|
990
|
+
const T = d.context(), { lastOffset: b, lastStartLoc: C } = T, L = a(9, b, C);
|
|
991
|
+
return L.value = _.replace(nr, sr), d.nextToken(), l(L, d.currentOffset(), d.currentPosition()), L;
|
|
992
|
+
}
|
|
993
|
+
function p(d) {
|
|
994
|
+
const _ = d.nextToken(), T = d.context(), { lastOffset: b, lastStartLoc: C } = T, L = a(8, b, C);
|
|
995
|
+
return _.type !== 11 ? (s(d, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, T.lastStartLoc, 0), L.value = "", l(L, b, C), {
|
|
996
|
+
nextConsumeToken: _,
|
|
997
|
+
node: L
|
|
998
|
+
}) : (_.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, T.lastStartLoc, 0, ye(_)), L.value = _.value || "", l(L, d.currentOffset(), d.currentPosition()), {
|
|
999
|
+
node: L
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function g(d,
|
|
1002
|
+
function g(d, _) {
|
|
1003
1003
|
const T = d.context(), b = a(7, T.offset, T.startLoc);
|
|
1004
|
-
return b.value =
|
|
1004
|
+
return b.value = _, l(b, d.currentOffset(), d.currentPosition()), b;
|
|
1005
1005
|
}
|
|
1006
1006
|
function m(d) {
|
|
1007
|
-
const
|
|
1007
|
+
const _ = d.context(), T = a(6, _.offset, _.startLoc);
|
|
1008
1008
|
let b = d.nextToken();
|
|
1009
1009
|
if (b.type === 8) {
|
|
1010
|
-
const C =
|
|
1010
|
+
const C = p(d);
|
|
1011
1011
|
T.modifier = C.node, b = C.nextConsumeToken || d.nextToken();
|
|
1012
1012
|
}
|
|
1013
|
-
switch (b.type !== 9 && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1013
|
+
switch (b.type !== 9 && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(b)), b = d.nextToken(), b.type === 2 && (b = d.nextToken()), b.type) {
|
|
1014
1014
|
case 10:
|
|
1015
|
-
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1015
|
+
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(b)), T.key = g(d, b.value || "");
|
|
1016
1016
|
break;
|
|
1017
1017
|
case 4:
|
|
1018
|
-
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1018
|
+
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(b)), T.key = c(d, b.value || "");
|
|
1019
1019
|
break;
|
|
1020
1020
|
case 5:
|
|
1021
|
-
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1021
|
+
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(b)), T.key = o(d, b.value || "");
|
|
1022
1022
|
break;
|
|
1023
1023
|
case 6:
|
|
1024
|
-
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1024
|
+
b.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(b)), T.key = f(d, b.value || "");
|
|
1025
1025
|
break;
|
|
1026
1026
|
default: {
|
|
1027
|
-
s(d, R.UNEXPECTED_EMPTY_LINKED_KEY,
|
|
1028
|
-
const C = d.context(),
|
|
1029
|
-
return
|
|
1027
|
+
s(d, R.UNEXPECTED_EMPTY_LINKED_KEY, _.lastStartLoc, 0);
|
|
1028
|
+
const C = d.context(), L = a(7, C.offset, C.startLoc);
|
|
1029
|
+
return L.value = "", l(L, C.offset, C.startLoc), T.key = L, l(T, C.offset, C.startLoc), {
|
|
1030
1030
|
nextConsumeToken: b,
|
|
1031
1031
|
node: T
|
|
1032
1032
|
};
|
|
@@ -1037,56 +1037,56 @@ function ar(e = {}) {
|
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
1039
|
function k(d) {
|
|
1040
|
-
const
|
|
1040
|
+
const _ = d.context(), T = _.currentType === 1 ? d.currentOffset() : _.offset, b = _.currentType === 1 ? _.endLoc : _.startLoc, C = a(2, T, b);
|
|
1041
1041
|
C.items = [];
|
|
1042
|
-
let
|
|
1042
|
+
let L = null;
|
|
1043
1043
|
do {
|
|
1044
|
-
const q =
|
|
1045
|
-
switch (
|
|
1044
|
+
const q = L || d.nextToken();
|
|
1045
|
+
switch (L = null, q.type) {
|
|
1046
1046
|
case 0:
|
|
1047
|
-
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1047
|
+
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(q)), C.items.push(r(d, q.value || ""));
|
|
1048
1048
|
break;
|
|
1049
1049
|
case 5:
|
|
1050
|
-
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1050
|
+
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(q)), C.items.push(o(d, q.value || ""));
|
|
1051
1051
|
break;
|
|
1052
1052
|
case 4:
|
|
1053
|
-
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1053
|
+
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(q)), C.items.push(c(d, q.value || ""));
|
|
1054
1054
|
break;
|
|
1055
1055
|
case 6:
|
|
1056
|
-
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
1056
|
+
q.value == null && s(d, R.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, ye(q)), C.items.push(f(d, q.value || ""));
|
|
1057
1057
|
break;
|
|
1058
1058
|
case 7: {
|
|
1059
1059
|
const ee = m(d);
|
|
1060
|
-
C.items.push(ee.node),
|
|
1060
|
+
C.items.push(ee.node), L = ee.nextConsumeToken || null;
|
|
1061
1061
|
break;
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
} while (
|
|
1065
|
-
const E =
|
|
1064
|
+
} while (_.currentType !== 13 && _.currentType !== 1);
|
|
1065
|
+
const E = _.currentType === 1 ? _.lastOffset : d.currentOffset(), M = _.currentType === 1 ? _.lastEndLoc : d.currentPosition();
|
|
1066
1066
|
return l(C, E, M), C;
|
|
1067
1067
|
}
|
|
1068
|
-
function V(d,
|
|
1068
|
+
function V(d, _, T, b) {
|
|
1069
1069
|
const C = d.context();
|
|
1070
|
-
let
|
|
1071
|
-
const E = a(1,
|
|
1070
|
+
let L = b.items.length === 0;
|
|
1071
|
+
const E = a(1, _, T);
|
|
1072
1072
|
E.cases = [], E.cases.push(b);
|
|
1073
1073
|
do {
|
|
1074
1074
|
const M = k(d);
|
|
1075
|
-
|
|
1075
|
+
L || (L = M.items.length === 0), E.cases.push(M);
|
|
1076
1076
|
} while (C.currentType !== 13);
|
|
1077
|
-
return
|
|
1077
|
+
return L && s(d, R.MUST_HAVE_MESSAGES_IN_PLURAL, T, 0), l(E, d.currentOffset(), d.currentPosition()), E;
|
|
1078
1078
|
}
|
|
1079
1079
|
function O(d) {
|
|
1080
|
-
const
|
|
1081
|
-
return
|
|
1080
|
+
const _ = d.context(), { offset: T, startLoc: b } = _, C = k(d);
|
|
1081
|
+
return _.currentType === 13 ? C : V(d, T, b, C);
|
|
1082
1082
|
}
|
|
1083
1083
|
function x(d) {
|
|
1084
|
-
const
|
|
1085
|
-
return t && b.loc && (b.loc.source = d), b.body = O(
|
|
1084
|
+
const _ = er(d, re({}, e)), T = _.context(), b = a(0, T.offset, T.startLoc);
|
|
1085
|
+
return t && b.loc && (b.loc.source = d), b.body = O(_), e.onCacheKey && (b.cacheKey = e.onCacheKey(d)), T.currentType !== 13 && s(_, R.UNEXPECTED_LEXICAL_ANALYSIS, T.lastStartLoc, 0, d[T.offset] || ""), l(b, _.currentOffset(), _.currentPosition()), b;
|
|
1086
1086
|
}
|
|
1087
1087
|
return { parse: x };
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function ye(e) {
|
|
1090
1090
|
if (e.type === 13)
|
|
1091
1091
|
return "EOF";
|
|
1092
1092
|
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
@@ -1179,24 +1179,24 @@ function Bn(e) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
const ir = "minifier";
|
|
1182
|
-
function
|
|
1182
|
+
function et(e) {
|
|
1183
1183
|
switch (e.t = e.type, e.type) {
|
|
1184
1184
|
case 0: {
|
|
1185
1185
|
const t = e;
|
|
1186
|
-
|
|
1186
|
+
et(t.body), t.b = t.body, delete t.body;
|
|
1187
1187
|
break;
|
|
1188
1188
|
}
|
|
1189
1189
|
case 1: {
|
|
1190
1190
|
const t = e, n = t.cases;
|
|
1191
1191
|
for (let s = 0; s < n.length; s++)
|
|
1192
|
-
|
|
1192
|
+
et(n[s]);
|
|
1193
1193
|
t.c = n, delete t.cases;
|
|
1194
1194
|
break;
|
|
1195
1195
|
}
|
|
1196
1196
|
case 2: {
|
|
1197
1197
|
const t = e, n = t.items;
|
|
1198
1198
|
for (let s = 0; s < n.length; s++)
|
|
1199
|
-
|
|
1199
|
+
et(n[s]);
|
|
1200
1200
|
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
1201
1201
|
break;
|
|
1202
1202
|
}
|
|
@@ -1210,7 +1210,7 @@ function Ze(e) {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
case 6: {
|
|
1212
1212
|
const t = e;
|
|
1213
|
-
|
|
1213
|
+
et(t.key), t.k = t.key, delete t.key, t.modifier && (et(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
1214
1214
|
break;
|
|
1215
1215
|
}
|
|
1216
1216
|
case 5: {
|
|
@@ -1225,7 +1225,7 @@ function Ze(e) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
default:
|
|
1227
1227
|
if (process.env.NODE_ENV !== "production")
|
|
1228
|
-
throw
|
|
1228
|
+
throw lt(R.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
1229
1229
|
domain: ir,
|
|
1230
1230
|
args: [e.type]
|
|
1231
1231
|
});
|
|
@@ -1254,7 +1254,7 @@ function ur(e, t) {
|
|
|
1254
1254
|
const d = x ? s : "";
|
|
1255
1255
|
c(a ? d + " ".repeat(O) : d);
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function p(O = !0) {
|
|
1258
1258
|
const x = ++r.indentLevel;
|
|
1259
1259
|
O && f(x);
|
|
1260
1260
|
}
|
|
@@ -1268,7 +1268,7 @@ function ur(e, t) {
|
|
|
1268
1268
|
return {
|
|
1269
1269
|
context: o,
|
|
1270
1270
|
push: c,
|
|
1271
|
-
indent:
|
|
1271
|
+
indent: p,
|
|
1272
1272
|
deindent: g,
|
|
1273
1273
|
newline: m,
|
|
1274
1274
|
helper: (O) => `_${O}`,
|
|
@@ -1280,7 +1280,7 @@ function fr(e, t) {
|
|
|
1280
1280
|
e.push(`${n(
|
|
1281
1281
|
"linked"
|
|
1282
1282
|
/* HelperNameMap.LINKED */
|
|
1283
|
-
)}(`),
|
|
1283
|
+
)}(`), at(e, t.key), t.modifier ? (e.push(", "), at(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
1284
1284
|
}
|
|
1285
1285
|
function dr(e, t) {
|
|
1286
1286
|
const { helper: n, needIndent: s } = e;
|
|
@@ -1289,7 +1289,7 @@ function dr(e, t) {
|
|
|
1289
1289
|
/* HelperNameMap.NORMALIZE */
|
|
1290
1290
|
)}([`), e.indent(s());
|
|
1291
1291
|
const a = t.items.length;
|
|
1292
|
-
for (let l = 0; l < a && (
|
|
1292
|
+
for (let l = 0; l < a && (at(e, t.items[l]), l !== a - 1); l++)
|
|
1293
1293
|
e.push(", ");
|
|
1294
1294
|
e.deindent(s()), e.push("])");
|
|
1295
1295
|
}
|
|
@@ -1301,15 +1301,15 @@ function mr(e, t) {
|
|
|
1301
1301
|
/* HelperNameMap.PLURAL */
|
|
1302
1302
|
)}([`), e.indent(s());
|
|
1303
1303
|
const a = t.cases.length;
|
|
1304
|
-
for (let l = 0; l < a && (
|
|
1304
|
+
for (let l = 0; l < a && (at(e, t.cases[l]), l !== a - 1); l++)
|
|
1305
1305
|
e.push(", ");
|
|
1306
1306
|
e.deindent(s()), e.push("])");
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
function pr(e, t) {
|
|
1310
|
-
t.body ?
|
|
1310
|
+
t.body ? at(e, t.body) : e.push("null");
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function at(e, t) {
|
|
1313
1313
|
const { helper: n } = e;
|
|
1314
1314
|
switch (t.type) {
|
|
1315
1315
|
case 0:
|
|
@@ -1356,7 +1356,7 @@ function st(e, t) {
|
|
|
1356
1356
|
break;
|
|
1357
1357
|
default:
|
|
1358
1358
|
if (process.env.NODE_ENV !== "production")
|
|
1359
|
-
throw
|
|
1359
|
+
throw lt(R.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1360
1360
|
domain: cr,
|
|
1361
1361
|
args: [t.type]
|
|
1362
1362
|
});
|
|
@@ -1371,7 +1371,7 @@ const _r = (e, t = {}) => {
|
|
|
1371
1371
|
breakLineCode: a,
|
|
1372
1372
|
needIndent: l
|
|
1373
1373
|
});
|
|
1374
|
-
o.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), o.indent(l), r.length > 0 && (o.push(`const { ${bn(r.map((
|
|
1374
|
+
o.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), o.indent(l), r.length > 0 && (o.push(`const { ${bn(r.map((p) => `${p}: _${p}`), ", ")} } = ctx`), o.newline()), o.push("return "), at(o, e), o.deindent(l), o.push("}"), delete e.helpers;
|
|
1375
1375
|
const { code: c, map: f } = o.context();
|
|
1376
1376
|
return {
|
|
1377
1377
|
ast: e,
|
|
@@ -1382,59 +1382,59 @@ const _r = (e, t = {}) => {
|
|
|
1382
1382
|
};
|
|
1383
1383
|
function gr(e, t = {}) {
|
|
1384
1384
|
const n = re({}, t), s = !!n.jit, a = !!n.minify, l = n.optimize == null ? !0 : n.optimize, o = ar(n).parse(e);
|
|
1385
|
-
return s ? (l && or(o), a &&
|
|
1385
|
+
return s ? (l && or(o), a && et(o), { ast: o, code: "" }) : (rr(o, n), _r(o, n));
|
|
1386
1386
|
}
|
|
1387
1387
|
function hr() {
|
|
1388
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (
|
|
1388
|
+
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return H(e) && yn(e) === 0 && (
|
|
1390
|
+
function he(e) {
|
|
1391
|
+
return H(e) && yn(e) === 0 && (be(e, "b") || be(e, "body"));
|
|
1392
1392
|
}
|
|
1393
1393
|
const Vs = ["b", "body"];
|
|
1394
1394
|
function Er(e) {
|
|
1395
|
-
return
|
|
1395
|
+
return Fe(e, Vs);
|
|
1396
1396
|
}
|
|
1397
1397
|
const Ds = ["c", "cases"];
|
|
1398
1398
|
function br(e) {
|
|
1399
|
-
return
|
|
1399
|
+
return Fe(e, Ds, []);
|
|
1400
1400
|
}
|
|
1401
1401
|
const Ps = ["s", "static"];
|
|
1402
1402
|
function vr(e) {
|
|
1403
|
-
return
|
|
1403
|
+
return Fe(e, Ps);
|
|
1404
1404
|
}
|
|
1405
1405
|
const Rs = ["i", "items"];
|
|
1406
1406
|
function Nr(e) {
|
|
1407
|
-
return
|
|
1407
|
+
return Fe(e, Rs, []);
|
|
1408
1408
|
}
|
|
1409
1409
|
const Us = ["t", "type"];
|
|
1410
1410
|
function yn(e) {
|
|
1411
|
-
return
|
|
1411
|
+
return Fe(e, Us);
|
|
1412
1412
|
}
|
|
1413
1413
|
const Ms = ["v", "value"];
|
|
1414
1414
|
function Lt(e, t) {
|
|
1415
|
-
const n =
|
|
1415
|
+
const n = Fe(e, Ms);
|
|
1416
1416
|
if (n != null)
|
|
1417
1417
|
return n;
|
|
1418
|
-
throw
|
|
1418
|
+
throw pt(t);
|
|
1419
1419
|
}
|
|
1420
1420
|
const Fs = ["m", "modifier"];
|
|
1421
1421
|
function yr(e) {
|
|
1422
|
-
return
|
|
1422
|
+
return Fe(e, Fs);
|
|
1423
1423
|
}
|
|
1424
1424
|
const $s = ["k", "key"];
|
|
1425
1425
|
function Tr(e) {
|
|
1426
|
-
const t =
|
|
1426
|
+
const t = Fe(e, $s);
|
|
1427
1427
|
if (t)
|
|
1428
1428
|
return t;
|
|
1429
|
-
throw
|
|
1429
|
+
throw pt(
|
|
1430
1430
|
6
|
|
1431
1431
|
/* NodeTypes.Linked */
|
|
1432
1432
|
);
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Fe(e, t, n) {
|
|
1435
1435
|
for (let s = 0; s < t.length; s++) {
|
|
1436
1436
|
const a = t[s];
|
|
1437
|
-
if (
|
|
1437
|
+
if (be(e, a) && e[a] != null)
|
|
1438
1438
|
return e[a];
|
|
1439
1439
|
}
|
|
1440
1440
|
return n;
|
|
@@ -1449,7 +1449,7 @@ const qs = [
|
|
|
1449
1449
|
...Ms,
|
|
1450
1450
|
...Us
|
|
1451
1451
|
];
|
|
1452
|
-
function
|
|
1452
|
+
function pt(e) {
|
|
1453
1453
|
return new Error(`unhandled node type: ${e}`);
|
|
1454
1454
|
}
|
|
1455
1455
|
function en(e) {
|
|
@@ -1458,7 +1458,7 @@ function en(e) {
|
|
|
1458
1458
|
function Lr(e, t) {
|
|
1459
1459
|
const n = Er(t);
|
|
1460
1460
|
if (n == null)
|
|
1461
|
-
throw
|
|
1461
|
+
throw pt(
|
|
1462
1462
|
0
|
|
1463
1463
|
/* NodeTypes.Resource */
|
|
1464
1464
|
);
|
|
@@ -1489,19 +1489,19 @@ function rn(e, t) {
|
|
|
1489
1489
|
return Lt(t, n);
|
|
1490
1490
|
case 4: {
|
|
1491
1491
|
const s = t;
|
|
1492
|
-
if (
|
|
1492
|
+
if (be(s, "k") && s.k)
|
|
1493
1493
|
return e.interpolate(e.named(s.k));
|
|
1494
|
-
if (
|
|
1494
|
+
if (be(s, "key") && s.key)
|
|
1495
1495
|
return e.interpolate(e.named(s.key));
|
|
1496
|
-
throw
|
|
1496
|
+
throw pt(n);
|
|
1497
1497
|
}
|
|
1498
1498
|
case 5: {
|
|
1499
1499
|
const s = t;
|
|
1500
|
-
if (
|
|
1500
|
+
if (be(s, "i") && le(s.i))
|
|
1501
1501
|
return e.interpolate(e.list(s.i));
|
|
1502
|
-
if (
|
|
1502
|
+
if (be(s, "index") && le(s.index))
|
|
1503
1503
|
return e.interpolate(e.list(s.index));
|
|
1504
|
-
throw
|
|
1504
|
+
throw pt(n);
|
|
1505
1505
|
}
|
|
1506
1506
|
case 6: {
|
|
1507
1507
|
const s = t, a = yr(s), l = Tr(s);
|
|
@@ -1517,7 +1517,7 @@ function rn(e, t) {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
const Ir = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1519
1519
|
function Cr(e, t) {
|
|
1520
|
-
t && Kl(e) &&
|
|
1520
|
+
t && Kl(e) && ke(kt(Ir, { source: e }));
|
|
1521
1521
|
}
|
|
1522
1522
|
const Or = (e) => e;
|
|
1523
1523
|
let It = X();
|
|
@@ -1543,8 +1543,8 @@ function xr(e, t) {
|
|
|
1543
1543
|
}), c = en(r);
|
|
1544
1544
|
return o ? c : It[a] = c;
|
|
1545
1545
|
} else {
|
|
1546
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1547
|
-
return
|
|
1546
|
+
if (process.env.NODE_ENV !== "production" && !he(e))
|
|
1547
|
+
return ke(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
|
|
1548
1548
|
const n = e.cacheKey;
|
|
1549
1549
|
if (n) {
|
|
1550
1550
|
const s = It[n];
|
|
@@ -1553,12 +1553,12 @@ function xr(e, t) {
|
|
|
1553
1553
|
return en(e);
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
let
|
|
1556
|
+
let _t = null;
|
|
1557
1557
|
function kr(e) {
|
|
1558
|
-
|
|
1558
|
+
_t = e;
|
|
1559
1559
|
}
|
|
1560
1560
|
function wr(e, t, n) {
|
|
1561
|
-
|
|
1561
|
+
_t && _t.emit("i18n:init", {
|
|
1562
1562
|
timestamp: Date.now(),
|
|
1563
1563
|
i18n: e,
|
|
1564
1564
|
version: t,
|
|
@@ -1567,9 +1567,9 @@ function wr(e, t, n) {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
const Ar = /* @__PURE__ */ Vr("function:translate");
|
|
1569
1569
|
function Vr(e) {
|
|
1570
|
-
return (t) =>
|
|
1570
|
+
return (t) => _t && _t.emit(e, t);
|
|
1571
1571
|
}
|
|
1572
|
-
const
|
|
1572
|
+
const ce = {
|
|
1573
1573
|
INVALID_ARGUMENT: Bl,
|
|
1574
1574
|
// 17
|
|
1575
1575
|
INVALID_DATE_ARGUMENT: 18,
|
|
@@ -1579,17 +1579,17 @@ const ie = {
|
|
|
1579
1579
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1580
1580
|
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1581
1581
|
}, Dr = 24;
|
|
1582
|
-
function
|
|
1583
|
-
return
|
|
1582
|
+
function Ce(e) {
|
|
1583
|
+
return lt(e, null, process.env.NODE_ENV !== "production" ? { messages: Pr } : void 0);
|
|
1584
1584
|
}
|
|
1585
1585
|
const Pr = {
|
|
1586
|
-
[
|
|
1587
|
-
[
|
|
1588
|
-
[
|
|
1589
|
-
[
|
|
1590
|
-
[
|
|
1591
|
-
[
|
|
1592
|
-
[
|
|
1586
|
+
[ce.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1587
|
+
[ce.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1588
|
+
[ce.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
1589
|
+
[ce.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
|
|
1590
|
+
[ce.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
|
|
1591
|
+
[ce.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
|
|
1592
|
+
[ce.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
|
|
1593
1593
|
};
|
|
1594
1594
|
function Tn(e, t) {
|
|
1595
1595
|
return t.locale != null ? Gn(t.locale) : Gn(e.locale);
|
|
@@ -1604,12 +1604,12 @@ function Gn(e) {
|
|
|
1604
1604
|
if (e.constructor.name === "Function") {
|
|
1605
1605
|
const t = e();
|
|
1606
1606
|
if (Fl(t))
|
|
1607
|
-
throw
|
|
1607
|
+
throw Ce(ce.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1608
1608
|
return tn = t;
|
|
1609
1609
|
} else
|
|
1610
|
-
throw
|
|
1610
|
+
throw Ce(ce.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1611
1611
|
} else
|
|
1612
|
-
throw
|
|
1612
|
+
throw Ce(ce.NOT_SUPPORT_LOCALE_TYPE);
|
|
1613
1613
|
}
|
|
1614
1614
|
function Rr(e, t, n) {
|
|
1615
1615
|
return [.../* @__PURE__ */ new Set([
|
|
@@ -1618,7 +1618,7 @@ function Rr(e, t, n) {
|
|
|
1618
1618
|
])];
|
|
1619
1619
|
}
|
|
1620
1620
|
function Ws(e, t, n) {
|
|
1621
|
-
const s = S(n) ? n :
|
|
1621
|
+
const s = S(n) ? n : gt, a = e;
|
|
1622
1622
|
a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1623
1623
|
let l = a.__localeChainCache.get(s);
|
|
1624
1624
|
if (!l) {
|
|
@@ -1657,8 +1657,8 @@ function Mr(e, t, n) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
return s;
|
|
1659
1659
|
}
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1660
|
+
const $e = [];
|
|
1661
|
+
$e[
|
|
1662
1662
|
0
|
|
1663
1663
|
/* States.BEFORE_PATH */
|
|
1664
1664
|
] = {
|
|
@@ -1680,7 +1680,7 @@ Fe[
|
|
|
1680
1680
|
/* States.AFTER_PATH */
|
|
1681
1681
|
]
|
|
1682
1682
|
};
|
|
1683
|
-
|
|
1683
|
+
$e[
|
|
1684
1684
|
1
|
|
1685
1685
|
/* States.IN_PATH */
|
|
1686
1686
|
] = {
|
|
@@ -1701,7 +1701,7 @@ Fe[
|
|
|
1701
1701
|
/* States.AFTER_PATH */
|
|
1702
1702
|
]
|
|
1703
1703
|
};
|
|
1704
|
-
|
|
1704
|
+
$e[
|
|
1705
1705
|
2
|
|
1706
1706
|
/* States.BEFORE_IDENT */
|
|
1707
1707
|
] = {
|
|
@@ -1720,7 +1720,7 @@ Fe[
|
|
|
1720
1720
|
/* Actions.APPEND */
|
|
1721
1721
|
]
|
|
1722
1722
|
};
|
|
1723
|
-
|
|
1723
|
+
$e[
|
|
1724
1724
|
3
|
|
1725
1725
|
/* States.IN_IDENT */
|
|
1726
1726
|
] = {
|
|
@@ -1755,7 +1755,7 @@ Fe[
|
|
|
1755
1755
|
/* Actions.PUSH */
|
|
1756
1756
|
]
|
|
1757
1757
|
};
|
|
1758
|
-
|
|
1758
|
+
$e[
|
|
1759
1759
|
4
|
|
1760
1760
|
/* States.IN_SUB_PATH */
|
|
1761
1761
|
] = {
|
|
@@ -1786,7 +1786,7 @@ Fe[
|
|
|
1786
1786
|
/* Actions.APPEND */
|
|
1787
1787
|
]
|
|
1788
1788
|
};
|
|
1789
|
-
|
|
1789
|
+
$e[
|
|
1790
1790
|
5
|
|
1791
1791
|
/* States.IN_SINGLE_QUOTE */
|
|
1792
1792
|
] = {
|
|
@@ -1802,7 +1802,7 @@ Fe[
|
|
|
1802
1802
|
/* Actions.APPEND */
|
|
1803
1803
|
]
|
|
1804
1804
|
};
|
|
1805
|
-
|
|
1805
|
+
$e[
|
|
1806
1806
|
6
|
|
1807
1807
|
/* States.IN_DOUBLE_QUOTE */
|
|
1808
1808
|
] = {
|
|
@@ -1869,7 +1869,7 @@ function Br(e) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
function Hr(e) {
|
|
1871
1871
|
const t = [];
|
|
1872
|
-
let n = -1, s = 0, a = 0, l, r, o, c, f,
|
|
1872
|
+
let n = -1, s = 0, a = 0, l, r, o, c, f, p, g;
|
|
1873
1873
|
const m = [];
|
|
1874
1874
|
m[
|
|
1875
1875
|
0
|
|
@@ -1917,7 +1917,7 @@ function Hr(e) {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
for (; s !== null; )
|
|
1919
1919
|
if (n++, l = e[n], !(l === "\\" && k())) {
|
|
1920
|
-
if (c = Wr(l), g =
|
|
1920
|
+
if (c = Wr(l), g = $e[s], f = g[c] || g.l || 8, f === 8 || (s = f[0], f[1] !== void 0 && (p = m[f[1]], p && (o = l, p() === !1))))
|
|
1921
1921
|
return;
|
|
1922
1922
|
if (s === 7)
|
|
1923
1923
|
return t;
|
|
@@ -1937,7 +1937,7 @@ function Yr(e, t) {
|
|
|
1937
1937
|
let a = e, l = 0;
|
|
1938
1938
|
for (; l < s; ) {
|
|
1939
1939
|
const r = n[l];
|
|
1940
|
-
if (qs.includes(r) &&
|
|
1940
|
+
if (qs.includes(r) && he(a))
|
|
1941
1941
|
return null;
|
|
1942
1942
|
const o = a[r];
|
|
1943
1943
|
if (o === void 0 || J(a))
|
|
@@ -1946,7 +1946,7 @@ function Yr(e, t) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
return a;
|
|
1948
1948
|
}
|
|
1949
|
-
const
|
|
1949
|
+
const me = {
|
|
1950
1950
|
NOT_FOUND_KEY: 1,
|
|
1951
1951
|
FALLBACK_TO_TRANSLATE: 2,
|
|
1952
1952
|
CANNOT_FORMAT_NUMBER: 3,
|
|
@@ -1955,18 +1955,18 @@ const de = {
|
|
|
1955
1955
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1956
1956
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1957
1957
|
}, Kr = 8, jr = {
|
|
1958
|
-
[
|
|
1959
|
-
[
|
|
1960
|
-
[
|
|
1961
|
-
[
|
|
1962
|
-
[
|
|
1963
|
-
[
|
|
1964
|
-
[
|
|
1958
|
+
[me.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1959
|
+
[me.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1960
|
+
[me.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
1961
|
+
[me.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
|
|
1962
|
+
[me.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
|
|
1963
|
+
[me.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1964
|
+
[me.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."
|
|
1965
1965
|
};
|
|
1966
|
-
function
|
|
1966
|
+
function je(e, ...t) {
|
|
1967
1967
|
return kt(jr[e], ...t);
|
|
1968
1968
|
}
|
|
1969
|
-
const Xr = "10.0.8", At = -1,
|
|
1969
|
+
const Xr = "10.0.8", At = -1, gt = "en-US", St = "", jn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1970
1970
|
function zr() {
|
|
1971
1971
|
return {
|
|
1972
1972
|
upper: (e, t) => t === "text" && S(e) ? e.toUpperCase() : t === "vnode" && H(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
@@ -1996,9 +1996,9 @@ const Xn = (e) => {
|
|
|
1996
1996
|
}, no = () => Ks;
|
|
1997
1997
|
let zn = 0;
|
|
1998
1998
|
function so(e = {}) {
|
|
1999
|
-
const t = J(e.onWarn) ? e.onWarn :
|
|
2000
|
-
process.env.NODE_ENV !== "production" && J(e.messageCompiler) && ws(
|
|
2001
|
-
const C = J(e.messageResolver) ? e.messageResolver : Hs || Gr,
|
|
1999
|
+
const t = J(e.onWarn) ? e.onWarn : ke, n = S(e.version) ? e.version : Xr, s = S(e.locale) || J(e.locale) ? e.locale : gt, a = J(s) ? gt : s, l = Z(e.fallbackLocale) || $(e.fallbackLocale) || S(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, r = $(e.messages) ? e.messages : nn(a), o = $(e.datetimeFormats) ? e.datetimeFormats : nn(a), c = $(e.numberFormats) ? e.numberFormats : nn(a), f = re(X(), e.modifiers, zr()), p = e.pluralRules || X(), g = J(e.missing) ? e.missing : null, m = G(e.missingWarn) || st(e.missingWarn) ? e.missingWarn : !0, k = G(e.fallbackWarn) || st(e.fallbackWarn) ? e.fallbackWarn : !0, V = !!e.fallbackFormat, O = !!e.unresolving, x = J(e.postTranslation) ? e.postTranslation : null, d = $(e.processor) ? e.processor : null, _ = G(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, T = !!e.escapeParameter, b = J(e.messageCompiler) ? e.messageCompiler : Bs;
|
|
2000
|
+
process.env.NODE_ENV !== "production" && J(e.messageCompiler) && ws(je(me.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
2001
|
+
const C = J(e.messageResolver) ? e.messageResolver : Hs || Gr, L = J(e.localeFallbacker) ? e.localeFallbacker : Gs || Rr, E = H(e.fallbackContext) ? e.fallbackContext : void 0, M = e, q = H(M.__datetimeFormatters) ? M.__datetimeFormatters : /* @__PURE__ */ new Map(), ee = H(M.__numberFormatters) ? M.__numberFormatters : /* @__PURE__ */ new Map(), Ee = H(M.__meta) ? M.__meta : {};
|
|
2002
2002
|
zn++;
|
|
2003
2003
|
const te = {
|
|
2004
2004
|
version: n,
|
|
@@ -2007,7 +2007,7 @@ function so(e = {}) {
|
|
|
2007
2007
|
fallbackLocale: l,
|
|
2008
2008
|
messages: r,
|
|
2009
2009
|
modifiers: f,
|
|
2010
|
-
pluralRules:
|
|
2010
|
+
pluralRules: p,
|
|
2011
2011
|
missing: g,
|
|
2012
2012
|
missingWarn: m,
|
|
2013
2013
|
fallbackWarn: k,
|
|
@@ -2015,16 +2015,16 @@ function so(e = {}) {
|
|
|
2015
2015
|
unresolving: O,
|
|
2016
2016
|
postTranslation: x,
|
|
2017
2017
|
processor: d,
|
|
2018
|
-
warnHtmlMessage:
|
|
2018
|
+
warnHtmlMessage: _,
|
|
2019
2019
|
escapeParameter: T,
|
|
2020
2020
|
messageCompiler: b,
|
|
2021
2021
|
messageResolver: C,
|
|
2022
|
-
localeFallbacker:
|
|
2022
|
+
localeFallbacker: L,
|
|
2023
2023
|
fallbackContext: E,
|
|
2024
2024
|
onWarn: t,
|
|
2025
|
-
__meta:
|
|
2025
|
+
__meta: Ee
|
|
2026
2026
|
};
|
|
2027
|
-
return te.datetimeFormats = o, te.numberFormats = c, te.__datetimeFormatters = q, te.__numberFormatters = ee, process.env.NODE_ENV !== "production" && (te.__v_emitter = M.__v_emitter != null ? M.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && wr(te, n,
|
|
2027
|
+
return te.datetimeFormats = o, te.numberFormats = c, te.__datetimeFormatters = q, te.__numberFormatters = ee, process.env.NODE_ENV !== "production" && (te.__v_emitter = M.__v_emitter != null ? M.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && wr(te, n, Ee), te;
|
|
2028
2028
|
}
|
|
2029
2029
|
const nn = (e) => ({ [e]: X() });
|
|
2030
2030
|
function Vt(e, t) {
|
|
@@ -2048,9 +2048,9 @@ function Ln(e, t, n, s, a) {
|
|
|
2048
2048
|
const o = l(e, n, t, a);
|
|
2049
2049
|
return S(o) ? o : t;
|
|
2050
2050
|
} else
|
|
2051
|
-
return process.env.NODE_ENV !== "production" && js(s, t) && r(
|
|
2051
|
+
return process.env.NODE_ENV !== "production" && js(s, t) && r(je(me.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function ut(e, t, n) {
|
|
2054
2054
|
const s = e;
|
|
2055
2055
|
s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
2056
2056
|
}
|
|
@@ -2073,8 +2073,8 @@ const Jn = typeof Intl < "u", zs = {
|
|
|
2073
2073
|
function Qn(e, ...t) {
|
|
2074
2074
|
const { datetimeFormats: n, unresolving: s, fallbackLocale: a, onWarn: l, localeFallbacker: r } = e, { __datetimeFormatters: o } = e;
|
|
2075
2075
|
if (process.env.NODE_ENV !== "production" && !zs.dateTimeFormat)
|
|
2076
|
-
return l(
|
|
2077
|
-
const [c, f,
|
|
2076
|
+
return l(je(me.CANNOT_FORMAT_DATE)), St;
|
|
2077
|
+
const [c, f, p, g] = on(...t), m = G(p.missingWarn) ? p.missingWarn : e.missingWarn, k = G(p.fallbackWarn) ? p.fallbackWarn : e.fallbackWarn, V = !!p.part, O = Tn(e, p), x = r(
|
|
2078
2078
|
e,
|
|
2079
2079
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2080
2080
|
a,
|
|
@@ -2082,32 +2082,32 @@ function Qn(e, ...t) {
|
|
|
2082
2082
|
);
|
|
2083
2083
|
if (!S(c) || c === "")
|
|
2084
2084
|
return new Intl.DateTimeFormat(O, g).format(f);
|
|
2085
|
-
let d = {},
|
|
2086
|
-
const
|
|
2085
|
+
let d = {}, _, T = null, b = O, C = null;
|
|
2086
|
+
const L = "datetime format";
|
|
2087
2087
|
for (let q = 0; q < x.length; q++) {
|
|
2088
|
-
if (
|
|
2088
|
+
if (_ = C = x[q], process.env.NODE_ENV !== "production" && O !== _ && Vt(k, c) && l(je(me.FALLBACK_TO_DATE_FORMAT, {
|
|
2089
2089
|
key: c,
|
|
2090
|
-
target:
|
|
2091
|
-
})), process.env.NODE_ENV !== "production" && O !==
|
|
2090
|
+
target: _
|
|
2091
|
+
})), process.env.NODE_ENV !== "production" && O !== _) {
|
|
2092
2092
|
const ee = e.__v_emitter;
|
|
2093
2093
|
ee && ee.emit("fallback", {
|
|
2094
|
-
type:
|
|
2094
|
+
type: L,
|
|
2095
2095
|
key: c,
|
|
2096
2096
|
from: b,
|
|
2097
2097
|
to: C,
|
|
2098
|
-
groupId: `${
|
|
2098
|
+
groupId: `${L}:${c}`
|
|
2099
2099
|
});
|
|
2100
2100
|
}
|
|
2101
|
-
if (d = n[
|
|
2101
|
+
if (d = n[_] || {}, T = d[c], $(T))
|
|
2102
2102
|
break;
|
|
2103
|
-
Ln(e, c,
|
|
2103
|
+
Ln(e, c, _, m, L), b = C;
|
|
2104
2104
|
}
|
|
2105
|
-
if (!$(T) || !S(
|
|
2105
|
+
if (!$(T) || !S(_))
|
|
2106
2106
|
return s ? At : c;
|
|
2107
|
-
let E = `${
|
|
2107
|
+
let E = `${_}__${c}`;
|
|
2108
2108
|
wt(g) || (E = `${E}__${JSON.stringify(g)}`);
|
|
2109
2109
|
let M = o.get(E);
|
|
2110
|
-
return M || (M = new Intl.DateTimeFormat(
|
|
2110
|
+
return M || (M = new Intl.DateTimeFormat(_, re({}, T, g)), o.set(E, M)), V ? M.formatToParts(f) : M.format(f);
|
|
2111
2111
|
}
|
|
2112
2112
|
const Js = [
|
|
2113
2113
|
"localeMatcher",
|
|
@@ -2137,22 +2137,22 @@ function on(...e) {
|
|
|
2137
2137
|
if (S(t)) {
|
|
2138
2138
|
const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
2139
2139
|
if (!c)
|
|
2140
|
-
throw
|
|
2140
|
+
throw Ce(ce.INVALID_ISO_DATE_ARGUMENT);
|
|
2141
2141
|
const f = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
|
|
2142
2142
|
o = new Date(f);
|
|
2143
2143
|
try {
|
|
2144
2144
|
o.toISOString();
|
|
2145
2145
|
} catch {
|
|
2146
|
-
throw
|
|
2146
|
+
throw Ce(ce.INVALID_ISO_DATE_ARGUMENT);
|
|
2147
2147
|
}
|
|
2148
2148
|
} else if (Pl(t)) {
|
|
2149
2149
|
if (isNaN(t.getTime()))
|
|
2150
|
-
throw
|
|
2150
|
+
throw Ce(ce.INVALID_DATE_ARGUMENT);
|
|
2151
2151
|
o = t;
|
|
2152
2152
|
} else if (le(t))
|
|
2153
2153
|
o = t;
|
|
2154
2154
|
else
|
|
2155
|
-
throw
|
|
2155
|
+
throw Ce(ce.INVALID_ARGUMENT);
|
|
2156
2156
|
return S(n) ? l.key = n : $(n) && Object.keys(n).forEach((c) => {
|
|
2157
2157
|
Js.includes(c) ? r[c] = n[c] : l[c] = n[c];
|
|
2158
2158
|
}), S(s) ? l.locale = s : $(s) && (r = s), $(a) && (r = a), [l.key || "", o, l, r];
|
|
@@ -2167,8 +2167,8 @@ function Zn(e, t, n) {
|
|
|
2167
2167
|
function es(e, ...t) {
|
|
2168
2168
|
const { numberFormats: n, unresolving: s, fallbackLocale: a, onWarn: l, localeFallbacker: r } = e, { __numberFormatters: o } = e;
|
|
2169
2169
|
if (process.env.NODE_ENV !== "production" && !zs.numberFormat)
|
|
2170
|
-
return l(
|
|
2171
|
-
const [c, f,
|
|
2170
|
+
return l(je(me.CANNOT_FORMAT_NUMBER)), St;
|
|
2171
|
+
const [c, f, p, g] = cn(...t), m = G(p.missingWarn) ? p.missingWarn : e.missingWarn, k = G(p.fallbackWarn) ? p.fallbackWarn : e.fallbackWarn, V = !!p.part, O = Tn(e, p), x = r(
|
|
2172
2172
|
e,
|
|
2173
2173
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2174
2174
|
a,
|
|
@@ -2176,32 +2176,32 @@ function es(e, ...t) {
|
|
|
2176
2176
|
);
|
|
2177
2177
|
if (!S(c) || c === "")
|
|
2178
2178
|
return new Intl.NumberFormat(O, g).format(f);
|
|
2179
|
-
let d = {},
|
|
2180
|
-
const
|
|
2179
|
+
let d = {}, _, T = null, b = O, C = null;
|
|
2180
|
+
const L = "number format";
|
|
2181
2181
|
for (let q = 0; q < x.length; q++) {
|
|
2182
|
-
if (
|
|
2182
|
+
if (_ = C = x[q], process.env.NODE_ENV !== "production" && O !== _ && Vt(k, c) && l(je(me.FALLBACK_TO_NUMBER_FORMAT, {
|
|
2183
2183
|
key: c,
|
|
2184
|
-
target:
|
|
2185
|
-
})), process.env.NODE_ENV !== "production" && O !==
|
|
2184
|
+
target: _
|
|
2185
|
+
})), process.env.NODE_ENV !== "production" && O !== _) {
|
|
2186
2186
|
const ee = e.__v_emitter;
|
|
2187
2187
|
ee && ee.emit("fallback", {
|
|
2188
|
-
type:
|
|
2188
|
+
type: L,
|
|
2189
2189
|
key: c,
|
|
2190
2190
|
from: b,
|
|
2191
2191
|
to: C,
|
|
2192
|
-
groupId: `${
|
|
2192
|
+
groupId: `${L}:${c}`
|
|
2193
2193
|
});
|
|
2194
2194
|
}
|
|
2195
|
-
if (d = n[
|
|
2195
|
+
if (d = n[_] || {}, T = d[c], $(T))
|
|
2196
2196
|
break;
|
|
2197
|
-
Ln(e, c,
|
|
2197
|
+
Ln(e, c, _, m, L), b = C;
|
|
2198
2198
|
}
|
|
2199
|
-
if (!$(T) || !S(
|
|
2199
|
+
if (!$(T) || !S(_))
|
|
2200
2200
|
return s ? At : c;
|
|
2201
|
-
let E = `${
|
|
2201
|
+
let E = `${_}__${c}`;
|
|
2202
2202
|
wt(g) || (E = `${E}__${JSON.stringify(g)}`);
|
|
2203
2203
|
let M = o.get(E);
|
|
2204
|
-
return M || (M = new Intl.NumberFormat(
|
|
2204
|
+
return M || (M = new Intl.NumberFormat(_, re({}, T, g)), o.set(E, M)), V ? M.formatToParts(f) : M.format(f);
|
|
2205
2205
|
}
|
|
2206
2206
|
const Qs = [
|
|
2207
2207
|
"localeMatcher",
|
|
@@ -2229,7 +2229,7 @@ function cn(...e) {
|
|
|
2229
2229
|
const [t, n, s, a] = e, l = X();
|
|
2230
2230
|
let r = X();
|
|
2231
2231
|
if (!le(t))
|
|
2232
|
-
throw
|
|
2232
|
+
throw Ce(ce.INVALID_ARGUMENT);
|
|
2233
2233
|
const o = t;
|
|
2234
2234
|
return S(n) ? l.key = n : $(n) && Object.keys(n).forEach((c) => {
|
|
2235
2235
|
Qs.includes(c) ? r[c] = n[c] : l[c] = n[c];
|
|
@@ -2257,25 +2257,25 @@ function mo(e = {}) {
|
|
|
2257
2257
|
const t = e.locale, n = uo(e), s = H(e.pluralRules) && S(t) && J(e.pluralRules[t]) ? e.pluralRules[t] : ns, a = H(e.pluralRules) && S(t) && J(e.pluralRules[t]) ? ns : void 0, l = (d) => d[s(n, d.length, a)], r = e.list || [], o = (d) => r[d], c = e.named || X();
|
|
2258
2258
|
le(e.pluralIndex) && fo(n, c);
|
|
2259
2259
|
const f = (d) => c[d];
|
|
2260
|
-
function
|
|
2261
|
-
const T = J(e.messages) ? e.messages(d, !!
|
|
2260
|
+
function p(d, _) {
|
|
2261
|
+
const T = J(e.messages) ? e.messages(d, !!_) : H(e.messages) ? e.messages[d] : !1;
|
|
2262
2262
|
return T || (e.parent ? e.parent.message(d) : ro);
|
|
2263
2263
|
}
|
|
2264
2264
|
const g = (d) => e.modifiers ? e.modifiers[d] : lo, m = $(e.processor) && J(e.processor.normalize) ? e.processor.normalize : io, k = $(e.processor) && J(e.processor.interpolate) ? e.processor.interpolate : co, V = $(e.processor) && S(e.processor.type) ? e.processor.type : oo, x = {
|
|
2265
2265
|
list: o,
|
|
2266
2266
|
named: f,
|
|
2267
2267
|
plural: l,
|
|
2268
|
-
linked: (d, ...
|
|
2269
|
-
const [T, b] =
|
|
2270
|
-
let C = "text",
|
|
2271
|
-
|
|
2272
|
-
const E =
|
|
2268
|
+
linked: (d, ..._) => {
|
|
2269
|
+
const [T, b] = _;
|
|
2270
|
+
let C = "text", L = "";
|
|
2271
|
+
_.length === 1 ? H(T) ? (L = T.modifier || L, C = T.type || C) : S(T) && (L = T || L) : _.length === 2 && (S(T) && (L = T || L), S(b) && (C = b || C));
|
|
2272
|
+
const E = p(d, !0)(x), M = (
|
|
2273
2273
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
2274
|
-
C === "vnode" && Z(E) &&
|
|
2274
|
+
C === "vnode" && Z(E) && L ? E[0] : E
|
|
2275
2275
|
);
|
|
2276
|
-
return
|
|
2276
|
+
return L ? g(L)(M, C) : M;
|
|
2277
2277
|
},
|
|
2278
|
-
message:
|
|
2278
|
+
message: p,
|
|
2279
2279
|
type: V,
|
|
2280
2280
|
interpolate: k,
|
|
2281
2281
|
normalize: m,
|
|
@@ -2283,36 +2283,36 @@ function mo(e = {}) {
|
|
|
2283
2283
|
};
|
|
2284
2284
|
return x;
|
|
2285
2285
|
}
|
|
2286
|
-
const ss = () => "",
|
|
2286
|
+
const ss = () => "", _e = (e) => J(e);
|
|
2287
2287
|
function as(e, ...t) {
|
|
2288
|
-
const { fallbackFormat: n, postTranslation: s, unresolving: a, messageCompiler: l, fallbackLocale: r, messages: o } = e, [c, f] = un(...t),
|
|
2288
|
+
const { fallbackFormat: n, postTranslation: s, unresolving: a, messageCompiler: l, fallbackLocale: r, messages: o } = e, [c, f] = un(...t), p = G(f.missingWarn) ? f.missingWarn : e.missingWarn, g = G(f.fallbackWarn) ? f.fallbackWarn : e.fallbackWarn, m = G(f.escapeParameter) ? f.escapeParameter : e.escapeParameter, k = !!f.resolvedMessage, V = S(f.default) || G(f.default) ? G(f.default) ? l ? c : () => c : f.default : n ? l ? c : () => c : null, O = n || V != null && (S(V) || J(V)), x = Tn(e, f);
|
|
2289
2289
|
m && po(f);
|
|
2290
|
-
let [d,
|
|
2290
|
+
let [d, _, T] = k ? [
|
|
2291
2291
|
c,
|
|
2292
2292
|
x,
|
|
2293
2293
|
o[x] || X()
|
|
2294
|
-
] : Zs(e, c, x, r, g,
|
|
2295
|
-
if (!k && !(S(b) ||
|
|
2294
|
+
] : Zs(e, c, x, r, g, p), b = d, C = c;
|
|
2295
|
+
if (!k && !(S(b) || he(b) || _e(b)) && O && (b = V, C = b), !k && (!(S(b) || he(b) || _e(b)) || !S(_)))
|
|
2296
2296
|
return a ? At : c;
|
|
2297
2297
|
if (process.env.NODE_ENV !== "production" && S(b) && e.messageCompiler == null)
|
|
2298
|
-
return
|
|
2299
|
-
let
|
|
2298
|
+
return ke(`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 '${c}'.`), c;
|
|
2299
|
+
let L = !1;
|
|
2300
2300
|
const E = () => {
|
|
2301
|
-
|
|
2302
|
-
}, M =
|
|
2303
|
-
if (
|
|
2301
|
+
L = !0;
|
|
2302
|
+
}, M = _e(b) ? b : ea(e, c, _, b, C, E);
|
|
2303
|
+
if (L)
|
|
2304
2304
|
return b;
|
|
2305
|
-
const q = Eo(e,
|
|
2306
|
-
let te = s ? s(
|
|
2305
|
+
const q = Eo(e, _, T, f), ee = mo(q), Ee = _o(e, M, ee);
|
|
2306
|
+
let te = s ? s(Ee, c) : Ee;
|
|
2307
2307
|
if (m && S(te) && (te = Ul(te)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
2308
|
-
const
|
|
2308
|
+
const Je = {
|
|
2309
2309
|
timestamp: Date.now(),
|
|
2310
|
-
key: S(c) ? c :
|
|
2311
|
-
locale:
|
|
2312
|
-
format: S(b) ? b :
|
|
2310
|
+
key: S(c) ? c : _e(b) ? b.key : "",
|
|
2311
|
+
locale: _ || (_e(b) ? b.locale : ""),
|
|
2312
|
+
format: S(b) ? b : _e(b) ? b.source : "",
|
|
2313
2313
|
message: te
|
|
2314
2314
|
};
|
|
2315
|
-
|
|
2315
|
+
Je.meta = re({}, e.__meta, /* @__PURE__ */ to() || {}), Ar(Je);
|
|
2316
2316
|
}
|
|
2317
2317
|
return te;
|
|
2318
2318
|
}
|
|
@@ -2322,11 +2322,11 @@ function po(e) {
|
|
|
2322
2322
|
});
|
|
2323
2323
|
}
|
|
2324
2324
|
function Zs(e, t, n, s, a, l) {
|
|
2325
|
-
const { messages: r, onWarn: o, messageResolver: c, localeFallbacker: f } = e,
|
|
2325
|
+
const { messages: r, onWarn: o, messageResolver: c, localeFallbacker: f } = e, p = f(e, s, n);
|
|
2326
2326
|
let g = X(), m, k = null, V = n, O = null;
|
|
2327
2327
|
const x = "translate";
|
|
2328
|
-
for (let d = 0; d <
|
|
2329
|
-
if (m = O =
|
|
2328
|
+
for (let d = 0; d < p.length; d++) {
|
|
2329
|
+
if (m = O = p[d], process.env.NODE_ENV !== "production" && n !== m && !Xs(n, m) && Vt(a, t) && o(je(me.FALLBACK_TO_TRANSLATE, {
|
|
2330
2330
|
key: t,
|
|
2331
2331
|
target: m
|
|
2332
2332
|
})), process.env.NODE_ENV !== "production" && n !== m) {
|
|
@@ -2340,20 +2340,20 @@ function Zs(e, t, n, s, a, l) {
|
|
|
2340
2340
|
});
|
|
2341
2341
|
}
|
|
2342
2342
|
g = r[m] || X();
|
|
2343
|
-
let
|
|
2344
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2345
|
-
const C = window.performance.now(),
|
|
2346
|
-
|
|
2343
|
+
let _ = null, T, b;
|
|
2344
|
+
if (process.env.NODE_ENV !== "production" && Ne && (_ = window.performance.now(), T = "intlify-message-resolve-start", b = "intlify-message-resolve-end", pe && pe(T)), (k = c(g, t)) === null && (k = g[t]), process.env.NODE_ENV !== "production" && Ne) {
|
|
2345
|
+
const C = window.performance.now(), L = e.__v_emitter;
|
|
2346
|
+
L && _ && k && L.emit("message-resolve", {
|
|
2347
2347
|
type: "message-resolve",
|
|
2348
2348
|
key: t,
|
|
2349
2349
|
message: k,
|
|
2350
|
-
time: C -
|
|
2350
|
+
time: C - _,
|
|
2351
2351
|
groupId: `${x}:${t}`
|
|
2352
|
-
}), T && b &&
|
|
2352
|
+
}), T && b && pe && Ke && (pe(b), Ke("intlify message resolve", T, b));
|
|
2353
2353
|
}
|
|
2354
|
-
if (S(k) ||
|
|
2354
|
+
if (S(k) || he(k) || _e(k))
|
|
2355
2355
|
break;
|
|
2356
|
-
if (!ao(m,
|
|
2356
|
+
if (!ao(m, p)) {
|
|
2357
2357
|
const C = Ln(
|
|
2358
2358
|
e,
|
|
2359
2359
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -2370,7 +2370,7 @@ function Zs(e, t, n, s, a, l) {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
function ea(e, t, n, s, a, l) {
|
|
2372
2372
|
const { messageCompiler: r, warnHtmlMessage: o } = e;
|
|
2373
|
-
if (
|
|
2373
|
+
if (_e(s)) {
|
|
2374
2374
|
const m = s;
|
|
2375
2375
|
return m.locale = m.locale || n, m.key = m.key || t, m;
|
|
2376
2376
|
}
|
|
@@ -2378,40 +2378,40 @@ function ea(e, t, n, s, a, l) {
|
|
|
2378
2378
|
const m = (() => s);
|
|
2379
2379
|
return m.locale = n, m.key = t, m;
|
|
2380
2380
|
}
|
|
2381
|
-
let c = null, f,
|
|
2382
|
-
process.env.NODE_ENV !== "production" &&
|
|
2381
|
+
let c = null, f, p;
|
|
2382
|
+
process.env.NODE_ENV !== "production" && Ne && (c = window.performance.now(), f = "intlify-message-compilation-start", p = "intlify-message-compilation-end", pe && pe(f));
|
|
2383
2383
|
const g = r(s, go(e, n, a, s, o, l));
|
|
2384
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2384
|
+
if (process.env.NODE_ENV !== "production" && Ne) {
|
|
2385
2385
|
const m = window.performance.now(), k = e.__v_emitter;
|
|
2386
2386
|
k && c && k.emit("message-compilation", {
|
|
2387
2387
|
type: "message-compilation",
|
|
2388
2388
|
message: s,
|
|
2389
2389
|
time: m - c,
|
|
2390
2390
|
groupId: `translate:${t}`
|
|
2391
|
-
}), f &&
|
|
2391
|
+
}), f && p && pe && Ke && (pe(p), Ke("intlify message compilation", f, p));
|
|
2392
2392
|
}
|
|
2393
2393
|
return g.locale = n, g.key = t, g.source = s, g;
|
|
2394
2394
|
}
|
|
2395
2395
|
function _o(e, t, n) {
|
|
2396
2396
|
let s = null, a, l;
|
|
2397
|
-
process.env.NODE_ENV !== "production" &&
|
|
2397
|
+
process.env.NODE_ENV !== "production" && Ne && (s = window.performance.now(), a = "intlify-message-evaluation-start", l = "intlify-message-evaluation-end", pe && pe(a));
|
|
2398
2398
|
const r = t(n);
|
|
2399
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2399
|
+
if (process.env.NODE_ENV !== "production" && Ne) {
|
|
2400
2400
|
const o = window.performance.now(), c = e.__v_emitter;
|
|
2401
2401
|
c && s && c.emit("message-evaluation", {
|
|
2402
2402
|
type: "message-evaluation",
|
|
2403
2403
|
value: r,
|
|
2404
2404
|
time: o - s,
|
|
2405
2405
|
groupId: `translate:${t.key}`
|
|
2406
|
-
}), a && l &&
|
|
2406
|
+
}), a && l && pe && Ke && (pe(l), Ke("intlify message evaluation", a, l));
|
|
2407
2407
|
}
|
|
2408
2408
|
return r;
|
|
2409
2409
|
}
|
|
2410
2410
|
function un(...e) {
|
|
2411
2411
|
const [t, n, s] = e, a = X();
|
|
2412
|
-
if (!S(t) && !le(t) && !
|
|
2413
|
-
throw
|
|
2414
|
-
const l = le(t) ? String(t) : (
|
|
2412
|
+
if (!S(t) && !le(t) && !_e(t) && !he(t))
|
|
2413
|
+
throw Ce(ce.INVALID_ARGUMENT);
|
|
2414
|
+
const l = le(t) ? String(t) : (_e(t), t);
|
|
2415
2415
|
return le(n) ? a.plural = n : S(n) ? a.default = n : $(n) && !wt(n) ? a.named = n : Z(n) && (a.list = n), le(s) ? a.plural = s : S(s) ? a.default = s : $(s) && re(a, s), [l, a];
|
|
2416
2416
|
}
|
|
2417
2417
|
function go(e, t, n, s, a, l) {
|
|
@@ -2421,8 +2421,8 @@ function go(e, t, n, s, a, l) {
|
|
|
2421
2421
|
warnHtmlMessage: a,
|
|
2422
2422
|
onError: (r) => {
|
|
2423
2423
|
if (l && l(r), process.env.NODE_ENV !== "production") {
|
|
2424
|
-
const o = ho(s), c = `Message compilation error: ${r.message}`, f = r.location && o && ql(o, r.location.start.offset, r.location.end.offset),
|
|
2425
|
-
|
|
2424
|
+
const o = ho(s), c = `Message compilation error: ${r.message}`, f = r.location && o && ql(o, r.location.start.offset, r.location.end.offset), p = e.__v_emitter;
|
|
2425
|
+
p && o && p.emit("compile-error", {
|
|
2426
2426
|
message: o,
|
|
2427
2427
|
error: r.message,
|
|
2428
2428
|
start: r.location && r.location.start.offset,
|
|
@@ -2443,15 +2443,15 @@ function ho(e) {
|
|
|
2443
2443
|
return e.loc.source;
|
|
2444
2444
|
}
|
|
2445
2445
|
function Eo(e, t, n, s) {
|
|
2446
|
-
const { modifiers: a, pluralRules: l, messageResolver: r, fallbackLocale: o, fallbackWarn: c, missingWarn: f, fallbackContext:
|
|
2446
|
+
const { modifiers: a, pluralRules: l, messageResolver: r, fallbackLocale: o, fallbackWarn: c, missingWarn: f, fallbackContext: p } = e, m = {
|
|
2447
2447
|
locale: t,
|
|
2448
2448
|
modifiers: a,
|
|
2449
2449
|
pluralRules: l,
|
|
2450
2450
|
messages: (k, V) => {
|
|
2451
2451
|
let O = r(n, k);
|
|
2452
|
-
if (O == null && (
|
|
2452
|
+
if (O == null && (p || V)) {
|
|
2453
2453
|
const [, , x] = Zs(
|
|
2454
|
-
|
|
2454
|
+
p || e,
|
|
2455
2455
|
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2456
2456
|
k,
|
|
2457
2457
|
t,
|
|
@@ -2461,13 +2461,13 @@ function Eo(e, t, n, s) {
|
|
|
2461
2461
|
);
|
|
2462
2462
|
O = r(x, k);
|
|
2463
2463
|
}
|
|
2464
|
-
if (S(O) ||
|
|
2464
|
+
if (S(O) || he(O)) {
|
|
2465
2465
|
let x = !1;
|
|
2466
|
-
const
|
|
2466
|
+
const _ = ea(e, k, t, O, k, () => {
|
|
2467
2467
|
x = !0;
|
|
2468
2468
|
});
|
|
2469
|
-
return x ? ss :
|
|
2470
|
-
} else return
|
|
2469
|
+
return x ? ss : _;
|
|
2470
|
+
} else return _e(O) ? O : ss;
|
|
2471
2471
|
}
|
|
2472
2472
|
};
|
|
2473
2473
|
return e.processor && (m.processor = e.processor), s.list && (m.list = s.list), s.named && (m.named = s.named), le(s.plural) && (m.pluralIndex = s.plural), m;
|
|
@@ -2480,10 +2480,10 @@ function ta() {
|
|
|
2480
2480
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2481
2481
|
}
|
|
2482
2482
|
const vo = typeof Proxy == "function", No = "devtools-plugin:setup", yo = "plugin:settings:set";
|
|
2483
|
-
let
|
|
2483
|
+
let Ze, fn;
|
|
2484
2484
|
function To() {
|
|
2485
2485
|
var e;
|
|
2486
|
-
return
|
|
2486
|
+
return Ze !== void 0 || (typeof window < "u" && window.performance ? (Ze = !0, fn = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (Ze = !0, fn = globalThis.perf_hooks.performance) : Ze = !1), Ze;
|
|
2487
2487
|
}
|
|
2488
2488
|
function Lo() {
|
|
2489
2489
|
return To() ? fn.now() : Date.now();
|
|
@@ -2565,19 +2565,19 @@ function Co(e, t) {
|
|
|
2565
2565
|
}
|
|
2566
2566
|
const Oo = "10.0.8";
|
|
2567
2567
|
function So() {
|
|
2568
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (
|
|
2568
|
+
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ye().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ye().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2569
2569
|
}
|
|
2570
|
-
const
|
|
2570
|
+
const Re = {
|
|
2571
2571
|
FALLBACK_TO_ROOT: Kr,
|
|
2572
2572
|
// 8
|
|
2573
2573
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2574
2574
|
IGNORE_OBJ_FLATTEN: 10,
|
|
2575
2575
|
DEPRECATE_TC: 11
|
|
2576
2576
|
}, xo = {
|
|
2577
|
-
[
|
|
2578
|
-
[
|
|
2579
|
-
[
|
|
2580
|
-
[
|
|
2577
|
+
[Re.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2578
|
+
[Re.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2579
|
+
[Re.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
2580
|
+
[Re.DEPRECATE_TC]: "'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."
|
|
2581
2581
|
};
|
|
2582
2582
|
function Dt(e, ...t) {
|
|
2583
2583
|
return kt(xo[e], ...t);
|
|
@@ -2604,8 +2604,8 @@ const z = {
|
|
|
2604
2604
|
// Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
|
|
2605
2605
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2606
2606
|
};
|
|
2607
|
-
function
|
|
2608
|
-
return
|
|
2607
|
+
function de(e, ...t) {
|
|
2608
|
+
return lt(e, null, process.env.NODE_ENV !== "production" ? { messages: ko, args: t } : void 0);
|
|
2609
2609
|
}
|
|
2610
2610
|
const ko = {
|
|
2611
2611
|
[z.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
@@ -2619,14 +2619,14 @@ const ko = {
|
|
|
2619
2619
|
[z.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2620
2620
|
[z.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2621
2621
|
[z.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2622
|
-
}, dn = /* @__PURE__ */
|
|
2623
|
-
function
|
|
2624
|
-
if (!H(e) ||
|
|
2622
|
+
}, dn = /* @__PURE__ */ Te("__translateVNode"), mn = /* @__PURE__ */ Te("__datetimeParts"), pn = /* @__PURE__ */ Te("__numberParts"), Xe = /* @__PURE__ */ Te("__enableEmitter"), ht = /* @__PURE__ */ Te("__disableEmitter"), na = Te("__setPluralRules"), sa = /* @__PURE__ */ Te("__injectWithOption"), _n = /* @__PURE__ */ Te("__dispose");
|
|
2623
|
+
function Et(e) {
|
|
2624
|
+
if (!H(e) || he(e))
|
|
2625
2625
|
return e;
|
|
2626
2626
|
for (const t in e)
|
|
2627
|
-
if (
|
|
2627
|
+
if (be(e, t))
|
|
2628
2628
|
if (!t.includes("."))
|
|
2629
|
-
H(e[t]) &&
|
|
2629
|
+
H(e[t]) && Et(e[t]);
|
|
2630
2630
|
else {
|
|
2631
2631
|
const n = t.split("."), s = n.length - 1;
|
|
2632
2632
|
let a = e, l = !1;
|
|
@@ -2634,16 +2634,16 @@ function ht(e) {
|
|
|
2634
2634
|
if (n[r] === "__proto__")
|
|
2635
2635
|
throw new Error(`unsafe key: ${n[r]}`);
|
|
2636
2636
|
if (n[r] in a || (a[n[r]] = X()), !H(a[n[r]])) {
|
|
2637
|
-
process.env.NODE_ENV !== "production" &&
|
|
2637
|
+
process.env.NODE_ENV !== "production" && ke(Dt(Re.IGNORE_OBJ_FLATTEN, {
|
|
2638
2638
|
key: n[r]
|
|
2639
2639
|
})), l = !0;
|
|
2640
2640
|
break;
|
|
2641
2641
|
}
|
|
2642
2642
|
a = a[n[r]];
|
|
2643
2643
|
}
|
|
2644
|
-
if (l || (
|
|
2644
|
+
if (l || (he(a) ? qs.includes(n[s]) || delete e[t] : (a[n[s]] = e[t], delete e[t])), !he(a)) {
|
|
2645
2645
|
const r = a[n[s]];
|
|
2646
|
-
H(r) &&
|
|
2646
|
+
H(r) && Et(r);
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
2649
|
return e;
|
|
@@ -2658,7 +2658,7 @@ function In(e, t) {
|
|
|
2658
2658
|
S(o) && Ot(JSON.parse(o), r);
|
|
2659
2659
|
}), a == null && l)
|
|
2660
2660
|
for (const o in r)
|
|
2661
|
-
|
|
2661
|
+
be(r, o) && Et(r[o]);
|
|
2662
2662
|
return r;
|
|
2663
2663
|
}
|
|
2664
2664
|
function aa(e) {
|
|
@@ -2695,26 +2695,26 @@ function ls(e) {
|
|
|
2695
2695
|
const rs = "__INTLIFY_META__", os = () => [], wo = () => !1;
|
|
2696
2696
|
let is = 0;
|
|
2697
2697
|
function cs(e) {
|
|
2698
|
-
return ((t, n, s, a) => e(n, s,
|
|
2698
|
+
return ((t, n, s, a) => e(n, s, mt() || void 0, a));
|
|
2699
2699
|
}
|
|
2700
2700
|
const Ao = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2701
|
-
const e =
|
|
2701
|
+
const e = mt();
|
|
2702
2702
|
let t = null;
|
|
2703
2703
|
return e && (t = aa(e)[rs]) ? { [rs]: t } : null;
|
|
2704
2704
|
};
|
|
2705
2705
|
function Cn(e = {}) {
|
|
2706
|
-
const { __root: t, __injectWithOption: n } = e, s = t === void 0, a = e.flatJson, l =
|
|
2706
|
+
const { __root: t, __injectWithOption: n } = e, s = t === void 0, a = e.flatJson, l = Ne ? Pe : Oa;
|
|
2707
2707
|
let r = G(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2708
2708
|
const o = l(
|
|
2709
2709
|
// prettier-ignore
|
|
2710
|
-
t && r ? t.locale.value : S(e.locale) ? e.locale :
|
|
2710
|
+
t && r ? t.locale.value : S(e.locale) ? e.locale : gt
|
|
2711
2711
|
), c = l(
|
|
2712
2712
|
// prettier-ignore
|
|
2713
2713
|
t && r ? t.fallbackLocale.value : S(e.fallbackLocale) || Z(e.fallbackLocale) || $(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o.value
|
|
2714
|
-
), f = l(In(o.value, e)),
|
|
2715
|
-
let m = t ? t.missingWarn : G(e.missingWarn) ||
|
|
2714
|
+
), f = l(In(o.value, e)), p = l($(e.datetimeFormats) ? e.datetimeFormats : { [o.value]: {} }), g = l($(e.numberFormats) ? e.numberFormats : { [o.value]: {} });
|
|
2715
|
+
let m = t ? t.missingWarn : G(e.missingWarn) || st(e.missingWarn) ? e.missingWarn : !0, k = t ? t.fallbackWarn : G(e.fallbackWarn) || st(e.fallbackWarn) ? e.fallbackWarn : !0, V = t ? t.fallbackRoot : G(e.fallbackRoot) ? e.fallbackRoot : !0, O = !!e.fallbackFormat, x = J(e.missing) ? e.missing : null, d = J(e.missing) ? cs(e.missing) : null, _ = J(e.postTranslation) ? e.postTranslation : null, T = t ? t.warnHtmlMessage : G(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, b = !!e.escapeParameter;
|
|
2716
2716
|
const C = t ? t.modifiers : $(e.modifiers) ? e.modifiers : {};
|
|
2717
|
-
let
|
|
2717
|
+
let L = e.pluralRules || t && t.pluralRules, E;
|
|
2718
2718
|
E = (() => {
|
|
2719
2719
|
s && Xn(null);
|
|
2720
2720
|
const h = {
|
|
@@ -2723,29 +2723,29 @@ function Cn(e = {}) {
|
|
|
2723
2723
|
fallbackLocale: c.value,
|
|
2724
2724
|
messages: f.value,
|
|
2725
2725
|
modifiers: C,
|
|
2726
|
-
pluralRules:
|
|
2726
|
+
pluralRules: L,
|
|
2727
2727
|
missing: d === null ? void 0 : d,
|
|
2728
2728
|
missingWarn: m,
|
|
2729
2729
|
fallbackWarn: k,
|
|
2730
2730
|
fallbackFormat: O,
|
|
2731
2731
|
unresolving: !0,
|
|
2732
|
-
postTranslation:
|
|
2732
|
+
postTranslation: _ === null ? void 0 : _,
|
|
2733
2733
|
warnHtmlMessage: T,
|
|
2734
2734
|
escapeParameter: b,
|
|
2735
2735
|
messageResolver: e.messageResolver,
|
|
2736
2736
|
messageCompiler: e.messageCompiler,
|
|
2737
2737
|
__meta: { framework: "vue" }
|
|
2738
2738
|
};
|
|
2739
|
-
h.datetimeFormats =
|
|
2740
|
-
const
|
|
2741
|
-
return s && Xn(
|
|
2742
|
-
})(),
|
|
2739
|
+
h.datetimeFormats = p.value, h.numberFormats = g.value, h.__datetimeFormatters = $(E) ? E.__datetimeFormatters : void 0, h.__numberFormatters = $(E) ? E.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (h.__v_emitter = $(E) ? E.__v_emitter : void 0);
|
|
2740
|
+
const I = so(h);
|
|
2741
|
+
return s && Xn(I), I;
|
|
2742
|
+
})(), ut(E, o.value, c.value);
|
|
2743
2743
|
function q() {
|
|
2744
2744
|
return [
|
|
2745
2745
|
o.value,
|
|
2746
2746
|
c.value,
|
|
2747
2747
|
f.value,
|
|
2748
|
-
|
|
2748
|
+
p.value,
|
|
2749
2749
|
g.value
|
|
2750
2750
|
];
|
|
2751
2751
|
}
|
|
@@ -2754,17 +2754,17 @@ function Cn(e = {}) {
|
|
|
2754
2754
|
set: (h) => {
|
|
2755
2755
|
o.value = h, E.locale = o.value;
|
|
2756
2756
|
}
|
|
2757
|
-
}),
|
|
2757
|
+
}), Ee = W({
|
|
2758
2758
|
get: () => c.value,
|
|
2759
2759
|
set: (h) => {
|
|
2760
|
-
c.value = h, E.fallbackLocale = c.value,
|
|
2760
|
+
c.value = h, E.fallbackLocale = c.value, ut(E, o.value, h);
|
|
2761
2761
|
}
|
|
2762
|
-
}), te = W(() => f.value),
|
|
2762
|
+
}), te = W(() => f.value), Je = /* @__PURE__ */ W(() => p.value), Rt = /* @__PURE__ */ W(() => g.value);
|
|
2763
2763
|
function Ut() {
|
|
2764
|
-
return J(
|
|
2764
|
+
return J(_) ? _ : null;
|
|
2765
2765
|
}
|
|
2766
2766
|
function Mt(h) {
|
|
2767
|
-
|
|
2767
|
+
_ = h, E.postTranslation = h;
|
|
2768
2768
|
}
|
|
2769
2769
|
function Ft() {
|
|
2770
2770
|
return x;
|
|
@@ -2772,56 +2772,56 @@ function Cn(e = {}) {
|
|
|
2772
2772
|
function $t(h) {
|
|
2773
2773
|
h !== null && (d = cs(h)), x = h, E.missing = d;
|
|
2774
2774
|
}
|
|
2775
|
-
function qt(h,
|
|
2776
|
-
return h !== "translate" || !
|
|
2775
|
+
function qt(h, I) {
|
|
2776
|
+
return h !== "translate" || !I.resolvedMessage;
|
|
2777
2777
|
}
|
|
2778
|
-
const
|
|
2778
|
+
const Le = (h, I, K, ae, We, yt) => {
|
|
2779
2779
|
q();
|
|
2780
|
-
let
|
|
2780
|
+
let Qe;
|
|
2781
2781
|
try {
|
|
2782
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (E.fallbackContext = t ? no() : void 0),
|
|
2782
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (E.fallbackContext = t ? no() : void 0), Qe = h(E);
|
|
2783
2783
|
} finally {
|
|
2784
2784
|
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (E.fallbackContext = void 0);
|
|
2785
2785
|
}
|
|
2786
2786
|
if (K !== "translate exists" && // for not `te` (e.g `t`)
|
|
2787
|
-
le(
|
|
2788
|
-
const [
|
|
2789
|
-
if (process.env.NODE_ENV !== "production" && t && S(
|
|
2790
|
-
key:
|
|
2787
|
+
le(Qe) && Qe === At || K === "translate exists" && !Qe) {
|
|
2788
|
+
const [Be, Ia] = I();
|
|
2789
|
+
if (process.env.NODE_ENV !== "production" && t && S(Be) && qt(K, Ia) && (V && (Vt(k, Be) || js(m, Be)) && ke(Dt(Re.FALLBACK_TO_ROOT, {
|
|
2790
|
+
key: Be,
|
|
2791
2791
|
type: K
|
|
2792
2792
|
})), process.env.NODE_ENV !== "production")) {
|
|
2793
2793
|
const { __v_emitter: Dn } = E;
|
|
2794
2794
|
Dn && V && Dn.emit("fallback", {
|
|
2795
2795
|
type: K,
|
|
2796
|
-
key:
|
|
2796
|
+
key: Be,
|
|
2797
2797
|
to: "global",
|
|
2798
|
-
groupId: `${K}:${
|
|
2798
|
+
groupId: `${K}:${Be}`
|
|
2799
2799
|
});
|
|
2800
2800
|
}
|
|
2801
|
-
return t && V ? ae(t) :
|
|
2801
|
+
return t && V ? ae(t) : We(Be);
|
|
2802
2802
|
} else {
|
|
2803
|
-
if (yt(
|
|
2804
|
-
return
|
|
2805
|
-
throw
|
|
2803
|
+
if (yt(Qe))
|
|
2804
|
+
return Qe;
|
|
2805
|
+
throw de(z.UNEXPECTED_RETURN_TYPE);
|
|
2806
2806
|
}
|
|
2807
2807
|
};
|
|
2808
|
-
function
|
|
2809
|
-
return
|
|
2808
|
+
function rt(...h) {
|
|
2809
|
+
return Le((I) => Reflect.apply(as, null, [I, ...h]), () => un(...h), "translate", (I) => Reflect.apply(I.t, I, [...h]), (I) => I, (I) => S(I));
|
|
2810
2810
|
}
|
|
2811
2811
|
function Wt(...h) {
|
|
2812
|
-
const [
|
|
2812
|
+
const [I, K, ae] = h;
|
|
2813
2813
|
if (ae && !H(ae))
|
|
2814
|
-
throw
|
|
2815
|
-
return
|
|
2814
|
+
throw de(z.INVALID_ARGUMENT);
|
|
2815
|
+
return rt(I, K, re({ resolvedMessage: !0 }, ae || {}));
|
|
2816
2816
|
}
|
|
2817
2817
|
function Bt(...h) {
|
|
2818
|
-
return
|
|
2818
|
+
return Le((I) => Reflect.apply(Qn, null, [I, ...h]), () => on(...h), "datetime format", (I) => Reflect.apply(I.d, I, [...h]), () => St, (I) => S(I));
|
|
2819
2819
|
}
|
|
2820
2820
|
function Ht(...h) {
|
|
2821
|
-
return
|
|
2821
|
+
return Le((I) => Reflect.apply(es, null, [I, ...h]), () => cn(...h), "number format", (I) => Reflect.apply(I.n, I, [...h]), () => St, (I) => S(I));
|
|
2822
2822
|
}
|
|
2823
2823
|
function Gt(h) {
|
|
2824
|
-
return h.map((
|
|
2824
|
+
return h.map((I) => S(I) || le(I) || G(I) ? ls(String(I)) : I);
|
|
2825
2825
|
}
|
|
2826
2826
|
const Yt = {
|
|
2827
2827
|
normalize: Gt,
|
|
@@ -2829,102 +2829,102 @@ function Cn(e = {}) {
|
|
|
2829
2829
|
type: "vnode"
|
|
2830
2830
|
};
|
|
2831
2831
|
function Nt(...h) {
|
|
2832
|
-
return
|
|
2832
|
+
return Le((I) => {
|
|
2833
2833
|
let K;
|
|
2834
|
-
const ae =
|
|
2834
|
+
const ae = I;
|
|
2835
2835
|
try {
|
|
2836
2836
|
ae.processor = Yt, K = Reflect.apply(as, null, [ae, ...h]);
|
|
2837
2837
|
} finally {
|
|
2838
2838
|
ae.processor = null;
|
|
2839
2839
|
}
|
|
2840
2840
|
return K;
|
|
2841
|
-
}, () => un(...h), "translate", (
|
|
2841
|
+
}, () => un(...h), "translate", (I) => I[dn](...h), (I) => [ls(I)], (I) => Z(I));
|
|
2842
2842
|
}
|
|
2843
2843
|
function Kt(...h) {
|
|
2844
|
-
return
|
|
2844
|
+
return Le((I) => Reflect.apply(es, null, [I, ...h]), () => cn(...h), "number format", (I) => I[pn](...h), os, (I) => S(I) || Z(I));
|
|
2845
2845
|
}
|
|
2846
2846
|
function jt(...h) {
|
|
2847
|
-
return
|
|
2847
|
+
return Le((I) => Reflect.apply(Qn, null, [I, ...h]), () => on(...h), "datetime format", (I) => I[mn](...h), os, (I) => S(I) || Z(I));
|
|
2848
2848
|
}
|
|
2849
2849
|
function Xt(h) {
|
|
2850
|
-
|
|
2850
|
+
L = h, E.pluralRules = L;
|
|
2851
2851
|
}
|
|
2852
|
-
function zt(h,
|
|
2853
|
-
return
|
|
2852
|
+
function zt(h, I) {
|
|
2853
|
+
return Le(() => {
|
|
2854
2854
|
if (!h)
|
|
2855
2855
|
return !1;
|
|
2856
|
-
const K = S(
|
|
2857
|
-
return
|
|
2858
|
-
}, () => [h], "translate exists", (K) => Reflect.apply(K.te, K, [h,
|
|
2856
|
+
const K = S(I) ? I : o.value, ae = qe(K), We = E.messageResolver(ae, h);
|
|
2857
|
+
return he(We) || _e(We) || S(We);
|
|
2858
|
+
}, () => [h], "translate exists", (K) => Reflect.apply(K.te, K, [h, I]), wo, (K) => G(K));
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2861
|
-
let
|
|
2860
|
+
function ot(h) {
|
|
2861
|
+
let I = null;
|
|
2862
2862
|
const K = Ws(E, c.value, o.value);
|
|
2863
2863
|
for (let ae = 0; ae < K.length; ae++) {
|
|
2864
|
-
const
|
|
2864
|
+
const We = f.value[K[ae]] || {}, yt = E.messageResolver(We, h);
|
|
2865
2865
|
if (yt != null) {
|
|
2866
|
-
|
|
2866
|
+
I = yt;
|
|
2867
2867
|
break;
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
|
-
return
|
|
2870
|
+
return I;
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2873
|
-
const
|
|
2874
|
-
return
|
|
2872
|
+
function it(h) {
|
|
2873
|
+
const I = ot(h);
|
|
2874
|
+
return I ?? (t ? t.tm(h) || {} : {});
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2876
|
+
function qe(h) {
|
|
2877
2877
|
return f.value[h] || {};
|
|
2878
2878
|
}
|
|
2879
|
-
function
|
|
2879
|
+
function ct(h, I) {
|
|
2880
2880
|
if (a) {
|
|
2881
|
-
const K = { [h]:
|
|
2881
|
+
const K = { [h]: I };
|
|
2882
2882
|
for (const ae in K)
|
|
2883
|
-
|
|
2884
|
-
|
|
2883
|
+
be(K, ae) && Et(K[ae]);
|
|
2884
|
+
I = K[h];
|
|
2885
2885
|
}
|
|
2886
|
-
f.value[h] =
|
|
2886
|
+
f.value[h] = I, E.messages = f.value;
|
|
2887
2887
|
}
|
|
2888
|
-
function Jt(h,
|
|
2888
|
+
function Jt(h, I) {
|
|
2889
2889
|
f.value[h] = f.value[h] || {};
|
|
2890
|
-
const K = { [h]:
|
|
2890
|
+
const K = { [h]: I };
|
|
2891
2891
|
if (a)
|
|
2892
2892
|
for (const ae in K)
|
|
2893
|
-
|
|
2894
|
-
|
|
2893
|
+
be(K, ae) && Et(K[ae]);
|
|
2894
|
+
I = K[h], Ot(I, f.value[h]), E.messages = f.value;
|
|
2895
2895
|
}
|
|
2896
2896
|
function i(h) {
|
|
2897
|
-
return
|
|
2897
|
+
return p.value[h] || {};
|
|
2898
2898
|
}
|
|
2899
|
-
function u(h,
|
|
2900
|
-
|
|
2899
|
+
function u(h, I) {
|
|
2900
|
+
p.value[h] = I, E.datetimeFormats = p.value, Zn(E, h, I);
|
|
2901
2901
|
}
|
|
2902
|
-
function N(h,
|
|
2903
|
-
|
|
2902
|
+
function N(h, I) {
|
|
2903
|
+
p.value[h] = re(p.value[h] || {}, I), E.datetimeFormats = p.value, Zn(E, h, I);
|
|
2904
2904
|
}
|
|
2905
2905
|
function D(h) {
|
|
2906
2906
|
return g.value[h] || {};
|
|
2907
2907
|
}
|
|
2908
|
-
function ne(h,
|
|
2909
|
-
g.value[h] =
|
|
2908
|
+
function ne(h, I) {
|
|
2909
|
+
g.value[h] = I, E.numberFormats = g.value, ts(E, h, I);
|
|
2910
2910
|
}
|
|
2911
|
-
function se(h,
|
|
2912
|
-
g.value[h] = re(g.value[h] || {},
|
|
2911
|
+
function se(h, I) {
|
|
2912
|
+
g.value[h] = re(g.value[h] || {}, I), E.numberFormats = g.value, ts(E, h, I);
|
|
2913
2913
|
}
|
|
2914
|
-
is++, t &&
|
|
2915
|
-
r && (o.value = h, E.locale = h,
|
|
2916
|
-
}),
|
|
2917
|
-
r && (c.value = h, E.fallbackLocale = h,
|
|
2914
|
+
is++, t && Ne && (Ue(t.locale, (h) => {
|
|
2915
|
+
r && (o.value = h, E.locale = h, ut(E, o.value, c.value));
|
|
2916
|
+
}), Ue(t.fallbackLocale, (h) => {
|
|
2917
|
+
r && (c.value = h, E.fallbackLocale = h, ut(E, o.value, c.value));
|
|
2918
2918
|
}));
|
|
2919
2919
|
const Y = {
|
|
2920
2920
|
id: is,
|
|
2921
2921
|
locale: ee,
|
|
2922
|
-
fallbackLocale:
|
|
2922
|
+
fallbackLocale: Ee,
|
|
2923
2923
|
get inheritLocale() {
|
|
2924
2924
|
return r;
|
|
2925
2925
|
},
|
|
2926
2926
|
set inheritLocale(h) {
|
|
2927
|
-
r = h, h && t && (o.value = t.locale.value, c.value = t.fallbackLocale.value,
|
|
2927
|
+
r = h, h && t && (o.value = t.locale.value, c.value = t.fallbackLocale.value, ut(E, o.value, c.value));
|
|
2928
2928
|
},
|
|
2929
2929
|
get availableLocales() {
|
|
2930
2930
|
return Object.keys(f.value).sort();
|
|
@@ -2934,7 +2934,7 @@ function Cn(e = {}) {
|
|
|
2934
2934
|
return C;
|
|
2935
2935
|
},
|
|
2936
2936
|
get pluralRules() {
|
|
2937
|
-
return
|
|
2937
|
+
return L || {};
|
|
2938
2938
|
},
|
|
2939
2939
|
get isGlobal() {
|
|
2940
2940
|
return s;
|
|
@@ -2975,9 +2975,9 @@ function Cn(e = {}) {
|
|
|
2975
2975
|
set escapeParameter(h) {
|
|
2976
2976
|
b = h, E.escapeParameter = h;
|
|
2977
2977
|
},
|
|
2978
|
-
t:
|
|
2979
|
-
getLocaleMessage:
|
|
2980
|
-
setLocaleMessage:
|
|
2978
|
+
t: rt,
|
|
2979
|
+
getLocaleMessage: qe,
|
|
2980
|
+
setLocaleMessage: ct,
|
|
2981
2981
|
mergeLocaleMessage: Jt,
|
|
2982
2982
|
getPostTranslationHandler: Ut,
|
|
2983
2983
|
setPostTranslationHandler: Mt,
|
|
@@ -2985,9 +2985,9 @@ function Cn(e = {}) {
|
|
|
2985
2985
|
setMissingHandler: $t,
|
|
2986
2986
|
[na]: Xt
|
|
2987
2987
|
};
|
|
2988
|
-
return Y.datetimeFormats =
|
|
2988
|
+
return Y.datetimeFormats = Je, Y.numberFormats = Rt, Y.rt = Wt, Y.te = zt, Y.tm = it, Y.d = Bt, Y.n = Ht, Y.getDateTimeFormat = i, Y.setDateTimeFormat = u, Y.mergeDateTimeFormat = N, Y.getNumberFormat = D, Y.setNumberFormat = ne, Y.mergeNumberFormat = se, Y[sa] = n, Y[dn] = Nt, Y[mn] = jt, Y[pn] = Kt, process.env.NODE_ENV !== "production" && (Y[Xe] = (h) => {
|
|
2989
2989
|
E.__v_emitter = h;
|
|
2990
|
-
}, Y[
|
|
2990
|
+
}, Y[ht] = () => {
|
|
2991
2991
|
E.__v_emitter = void 0;
|
|
2992
2992
|
}), Y;
|
|
2993
2993
|
}
|
|
@@ -3109,7 +3109,7 @@ function On(e) {
|
|
|
3109
3109
|
const t = {};
|
|
3110
3110
|
return Object.keys(e).forEach((n) => {
|
|
3111
3111
|
const s = e[n];
|
|
3112
|
-
J(s) && "source" in s ? t[n] = $o(s) :
|
|
3112
|
+
J(s) && "source" in s ? t[n] = $o(s) : he(s) && s.loc && s.loc.source ? t[n] = s.loc.source : H(s) ? t[n] = On(s) : t[n] = s;
|
|
3113
3113
|
}), t;
|
|
3114
3114
|
}
|
|
3115
3115
|
const Uo = {
|
|
@@ -3228,7 +3228,7 @@ function Ho(e) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
return t;
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3231
|
+
function bt(e, t) {
|
|
3232
3232
|
if (gn) {
|
|
3233
3233
|
let n;
|
|
3234
3234
|
t && "groupId" in t && (n = t.groupId, delete t.groupId), gn.addTimelineEvent({
|
|
@@ -3252,7 +3252,7 @@ function Go(e, t) {
|
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
3254
|
function Yo(e) {
|
|
3255
|
-
const t = S(e.locale) ? e.locale :
|
|
3255
|
+
const t = S(e.locale) ? e.locale : gt, n = S(e.fallbackLocale) || Z(e.fallbackLocale) || $(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, s = J(e.missing) ? e.missing : void 0, a = G(e.silentTranslationWarn) || st(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, l = G(e.silentFallbackWarn) || st(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, r = G(e.fallbackRoot) ? e.fallbackRoot : !0, o = !!e.formatFallbackMessages, c = $(e.modifiers) ? e.modifiers : {}, f = e.pluralizationRules, p = J(e.postTranslation) ? e.postTranslation : void 0, g = S(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, m = !!e.escapeParameterHtml, k = G(e.sync) ? e.sync : !0;
|
|
3256
3256
|
let V = e.messages;
|
|
3257
3257
|
if ($(e.sharedMessages)) {
|
|
3258
3258
|
const C = e.sharedMessages;
|
|
@@ -3261,13 +3261,13 @@ function Yo(e) {
|
|
|
3261
3261
|
return re(q, C[M]), E;
|
|
3262
3262
|
}, V || {});
|
|
3263
3263
|
}
|
|
3264
|
-
const { __i18n: O, __root: x, __injectWithOption: d } = e,
|
|
3264
|
+
const { __i18n: O, __root: x, __injectWithOption: d } = e, _ = e.datetimeFormats, T = e.numberFormats, b = e.flatJson;
|
|
3265
3265
|
return {
|
|
3266
3266
|
locale: t,
|
|
3267
3267
|
fallbackLocale: n,
|
|
3268
3268
|
messages: V,
|
|
3269
3269
|
flatJson: b,
|
|
3270
|
-
datetimeFormats:
|
|
3270
|
+
datetimeFormats: _,
|
|
3271
3271
|
numberFormats: T,
|
|
3272
3272
|
missing: s,
|
|
3273
3273
|
missingWarn: a,
|
|
@@ -3276,7 +3276,7 @@ function Yo(e) {
|
|
|
3276
3276
|
fallbackFormat: o,
|
|
3277
3277
|
modifiers: c,
|
|
3278
3278
|
pluralRules: f,
|
|
3279
|
-
postTranslation:
|
|
3279
|
+
postTranslation: p,
|
|
3280
3280
|
warnHtmlMessage: g,
|
|
3281
3281
|
escapeParameter: m,
|
|
3282
3282
|
messageResolver: e.messageResolver,
|
|
@@ -3397,13 +3397,13 @@ function hn(e = {}) {
|
|
|
3397
3397
|
// tc
|
|
3398
3398
|
tc(...a) {
|
|
3399
3399
|
const [l, r, o] = a, c = { plural: 1 };
|
|
3400
|
-
let f = null,
|
|
3401
|
-
if (process.env.NODE_ENV !== "production" && ws(Dt(
|
|
3402
|
-
throw
|
|
3400
|
+
let f = null, p = null;
|
|
3401
|
+
if (process.env.NODE_ENV !== "production" && ws(Dt(Re.DEPRECATE_TC)), !S(l))
|
|
3402
|
+
throw de(z.INVALID_ARGUMENT);
|
|
3403
3403
|
const g = l;
|
|
3404
|
-
return S(r) ? c.locale = r : le(r) ? c.plural = r : Z(r) ? f = r : $(r) && (
|
|
3404
|
+
return S(r) ? c.locale = r : le(r) ? c.plural = r : Z(r) ? f = r : $(r) && (p = r), S(o) ? c.locale = o : Z(o) ? f = o : $(o) && (p = o), Reflect.apply(t.t, t, [
|
|
3405
3405
|
g,
|
|
3406
|
-
f ||
|
|
3406
|
+
f || p || {},
|
|
3407
3407
|
c
|
|
3408
3408
|
]);
|
|
3409
3409
|
},
|
|
@@ -3462,18 +3462,18 @@ function hn(e = {}) {
|
|
|
3462
3462
|
};
|
|
3463
3463
|
return s.__extender = n, process.env.NODE_ENV !== "production" && (s.__enableEmitter = (a) => {
|
|
3464
3464
|
const l = t;
|
|
3465
|
-
l[
|
|
3465
|
+
l[Xe] && l[Xe](a);
|
|
3466
3466
|
}, s.__disableEmitter = () => {
|
|
3467
3467
|
const a = t;
|
|
3468
|
-
a[
|
|
3468
|
+
a[ht] && a[ht]();
|
|
3469
3469
|
}), s;
|
|
3470
3470
|
}
|
|
3471
3471
|
function Ko(e, t, n) {
|
|
3472
3472
|
return {
|
|
3473
3473
|
beforeCreate() {
|
|
3474
|
-
const s =
|
|
3474
|
+
const s = mt();
|
|
3475
3475
|
if (!s)
|
|
3476
|
-
throw
|
|
3476
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3477
3477
|
const a = this.$options;
|
|
3478
3478
|
if (a.i18n) {
|
|
3479
3479
|
const l = a.i18n;
|
|
@@ -3506,15 +3506,15 @@ function Ko(e, t, n) {
|
|
|
3506
3506
|
const s = this.$i18n;
|
|
3507
3507
|
this.$el.__VUE_I18N__ = s.__composer;
|
|
3508
3508
|
const a = this.__v_emitter = vn();
|
|
3509
|
-
s.__enableEmitter && s.__enableEmitter(a), a.on("*",
|
|
3509
|
+
s.__enableEmitter && s.__enableEmitter(a), a.on("*", bt);
|
|
3510
3510
|
}
|
|
3511
3511
|
},
|
|
3512
3512
|
unmounted() {
|
|
3513
|
-
const s =
|
|
3513
|
+
const s = mt();
|
|
3514
3514
|
if (!s)
|
|
3515
|
-
throw
|
|
3515
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3516
3516
|
const a = this.$i18n;
|
|
3517
|
-
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*",
|
|
3517
|
+
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", bt), delete this.__v_emitter), this.$i18n && (a.__disableEmitter && a.__disableEmitter(), delete this.$el.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$tc, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, a.__disposer && (a.__disposer(), delete a.__disposer, delete a.__extender), n.__deleteInstance(s), delete this.$i18n;
|
|
3518
3518
|
}
|
|
3519
3519
|
};
|
|
3520
3520
|
}
|
|
@@ -3548,14 +3548,14 @@ function jo({ slots: e }, t) {
|
|
|
3548
3548
|
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, a) => [
|
|
3549
3549
|
...s,
|
|
3550
3550
|
// prettier-ignore
|
|
3551
|
-
...a.type ===
|
|
3551
|
+
...a.type === ge ? a.children : [a]
|
|
3552
3552
|
], []) : t.reduce((n, s) => {
|
|
3553
3553
|
const a = e[s];
|
|
3554
3554
|
return a && (n[s] = a()), n;
|
|
3555
3555
|
}, X());
|
|
3556
3556
|
}
|
|
3557
3557
|
function ca() {
|
|
3558
|
-
return
|
|
3558
|
+
return ge;
|
|
3559
3559
|
}
|
|
3560
3560
|
const Xo = /* @__PURE__ */ U({
|
|
3561
3561
|
/* eslint-disable */
|
|
@@ -3580,8 +3580,8 @@ const Xo = /* @__PURE__ */ U({
|
|
|
3580
3580
|
return () => {
|
|
3581
3581
|
const l = Object.keys(n).filter((g) => g !== "_"), r = X();
|
|
3582
3582
|
e.locale && (r.locale = e.locale), e.plural !== void 0 && (r.plural = S(e.plural) ? +e.plural : e.plural);
|
|
3583
|
-
const o = jo(t, l), c = a[dn](e.keypath, o, r), f = re(X(), s),
|
|
3584
|
-
return vs(
|
|
3583
|
+
const o = jo(t, l), c = a[dn](e.keypath, o, r), f = re(X(), s), p = S(e.tag) || H(e.tag) ? e.tag : ca();
|
|
3584
|
+
return vs(p, f, c);
|
|
3585
3585
|
};
|
|
3586
3586
|
}
|
|
3587
3587
|
}), ds = Xo;
|
|
@@ -3600,8 +3600,8 @@ function ua(e, t, n, s) {
|
|
|
3600
3600
|
const V = a[m.type], O = V ? V({ [m.type]: m.value, index: k, parts: c }) : [m.value];
|
|
3601
3601
|
return zo(O) && (O[0].key = `${m.type}-${k}`), O;
|
|
3602
3602
|
}) : S(c) && (f = [c]);
|
|
3603
|
-
const
|
|
3604
|
-
return vs(g,
|
|
3603
|
+
const p = re(X(), l), g = S(e.tag) || H(e.tag) ? e.tag : ca();
|
|
3604
|
+
return vs(g, p, f);
|
|
3605
3605
|
};
|
|
3606
3606
|
}
|
|
3607
3607
|
const Jo = /* @__PURE__ */ U({
|
|
@@ -3666,22 +3666,22 @@ function ei(e) {
|
|
|
3666
3666
|
const t = (r) => {
|
|
3667
3667
|
const { instance: o, value: c } = r;
|
|
3668
3668
|
if (!o || !o.$)
|
|
3669
|
-
throw
|
|
3670
|
-
const f = Zo(e, o.$),
|
|
3669
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3670
|
+
const f = Zo(e, o.$), p = _s(c);
|
|
3671
3671
|
return [
|
|
3672
|
-
Reflect.apply(f.t, f, [...gs(
|
|
3672
|
+
Reflect.apply(f.t, f, [...gs(p)]),
|
|
3673
3673
|
f
|
|
3674
3674
|
];
|
|
3675
3675
|
};
|
|
3676
3676
|
return {
|
|
3677
3677
|
created: (r, o) => {
|
|
3678
3678
|
const [c, f] = t(o);
|
|
3679
|
-
|
|
3679
|
+
Ne && e.global === f && (r.__i18nWatcher = Ue(f.locale, () => {
|
|
3680
3680
|
o.instance && o.instance.$forceUpdate();
|
|
3681
3681
|
})), r.__composer = f, r.textContent = c;
|
|
3682
3682
|
},
|
|
3683
3683
|
unmounted: (r) => {
|
|
3684
|
-
|
|
3684
|
+
Ne && r.__i18nWatcher && (r.__i18nWatcher(), r.__i18nWatcher = void 0, delete r.__i18nWatcher), r.__composer && (r.__composer = void 0, delete r.__composer);
|
|
3685
3685
|
},
|
|
3686
3686
|
beforeUpdate: (r, { value: o }) => {
|
|
3687
3687
|
if (r.__composer) {
|
|
@@ -3702,10 +3702,10 @@ function _s(e) {
|
|
|
3702
3702
|
return { path: e };
|
|
3703
3703
|
if ($(e)) {
|
|
3704
3704
|
if (!("path" in e))
|
|
3705
|
-
throw
|
|
3705
|
+
throw de(z.REQUIRED_VALUE, "path");
|
|
3706
3706
|
return e;
|
|
3707
3707
|
} else
|
|
3708
|
-
throw
|
|
3708
|
+
throw de(z.INVALID_VALUE);
|
|
3709
3709
|
}
|
|
3710
3710
|
function gs(e) {
|
|
3711
3711
|
const { path: t, locale: n, args: s, choice: a, plural: l } = e, r = {}, o = s || {};
|
|
@@ -3715,16 +3715,16 @@ function ti(e, t, ...n) {
|
|
|
3715
3715
|
const s = $(n[0]) ? n[0] : {};
|
|
3716
3716
|
(G(s.globalInstall) ? s.globalInstall : !0) && ([ds.name, "I18nT"].forEach((l) => e.component(l, ds)), [ms.name, "I18nN"].forEach((l) => e.component(l, ms)), [ps.name, "I18nD"].forEach((l) => e.component(l, ps))), e.directive("t", ei(t));
|
|
3717
3717
|
}
|
|
3718
|
-
const ni = /* @__PURE__ */
|
|
3718
|
+
const ni = /* @__PURE__ */ Te("global-vue-i18n");
|
|
3719
3719
|
function si(e = {}, t) {
|
|
3720
|
-
const n = __VUE_I18N_LEGACY_API__ && G(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__, s = G(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [l, r] = ai(e, n), o = /* @__PURE__ */
|
|
3720
|
+
const n = __VUE_I18N_LEGACY_API__ && G(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__, s = G(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [l, r] = ai(e, n), o = /* @__PURE__ */ Te(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3721
3721
|
function c(m) {
|
|
3722
3722
|
return a.get(m) || null;
|
|
3723
3723
|
}
|
|
3724
3724
|
function f(m, k) {
|
|
3725
3725
|
a.set(m, k);
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3727
|
+
function p(m) {
|
|
3728
3728
|
a.delete(m);
|
|
3729
3729
|
}
|
|
3730
3730
|
const g = {
|
|
@@ -3745,16 +3745,16 @@ function si(e = {}, t) {
|
|
|
3745
3745
|
V && V(), g.dispose(), O();
|
|
3746
3746
|
}, process.env.NODE_ENV !== "production") {
|
|
3747
3747
|
if (!await Po(m, g))
|
|
3748
|
-
throw
|
|
3748
|
+
throw de(z.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3749
3749
|
const d = vn();
|
|
3750
3750
|
if (n) {
|
|
3751
|
-
const
|
|
3752
|
-
|
|
3751
|
+
const _ = r;
|
|
3752
|
+
_.__enableEmitter && _.__enableEmitter(d);
|
|
3753
3753
|
} else {
|
|
3754
|
-
const
|
|
3755
|
-
|
|
3754
|
+
const _ = r;
|
|
3755
|
+
_[Xe] && _[Xe](d);
|
|
3756
3756
|
}
|
|
3757
|
-
d.on("*",
|
|
3757
|
+
d.on("*", bt);
|
|
3758
3758
|
}
|
|
3759
3759
|
},
|
|
3760
3760
|
// global accessor
|
|
@@ -3771,22 +3771,22 @@ function si(e = {}, t) {
|
|
|
3771
3771
|
// @internal
|
|
3772
3772
|
__setInstance: f,
|
|
3773
3773
|
// @internal
|
|
3774
|
-
__deleteInstance:
|
|
3774
|
+
__deleteInstance: p
|
|
3775
3775
|
};
|
|
3776
3776
|
return g;
|
|
3777
3777
|
}
|
|
3778
3778
|
function xn(e = {}) {
|
|
3779
|
-
const t =
|
|
3779
|
+
const t = mt();
|
|
3780
3780
|
if (t == null)
|
|
3781
|
-
throw
|
|
3781
|
+
throw de(z.MUST_BE_CALL_SETUP_TOP);
|
|
3782
3782
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3783
|
-
throw
|
|
3783
|
+
throw de(z.NOT_INSTALLED);
|
|
3784
3784
|
const n = li(t), s = oi(n), a = aa(t), l = ri(e, a);
|
|
3785
3785
|
if (l === "global")
|
|
3786
3786
|
return la(s, e, a), s;
|
|
3787
3787
|
if (l === "parent") {
|
|
3788
3788
|
let c = ii(n, t, e.__useComponent);
|
|
3789
|
-
return c == null && (process.env.NODE_ENV !== "production" &&
|
|
3789
|
+
return c == null && (process.env.NODE_ENV !== "production" && ke(Dt(Re.NOT_FOUND_PARENT_SCOPE)), c = s), c;
|
|
3790
3790
|
}
|
|
3791
3791
|
const r = n;
|
|
3792
3792
|
let o = r.__getInstance(t);
|
|
@@ -3799,13 +3799,13 @@ function xn(e = {}) {
|
|
|
3799
3799
|
function ai(e, t, n) {
|
|
3800
3800
|
const s = Ca(), a = __VUE_I18N_LEGACY_API__ && t ? s.run(() => hn(e)) : s.run(() => Cn(e));
|
|
3801
3801
|
if (a == null)
|
|
3802
|
-
throw
|
|
3802
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3803
3803
|
return [s, a];
|
|
3804
3804
|
}
|
|
3805
3805
|
function li(e) {
|
|
3806
3806
|
const t = xa(e.isCE ? ni : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3807
3807
|
if (!t)
|
|
3808
|
-
throw
|
|
3808
|
+
throw de(e.isCE ? z.NOT_INSTALLED_WITH_PROVIDE : z.UNEXPECTED_ERROR);
|
|
3809
3809
|
return t;
|
|
3810
3810
|
}
|
|
3811
3811
|
function ri(e, t) {
|
|
@@ -3841,11 +3841,11 @@ function ui(e, t, n) {
|
|
|
3841
3841
|
if (process.env.NODE_ENV !== "production" && t.vnode.el) {
|
|
3842
3842
|
t.vnode.el.__VUE_I18N__ = n, s = vn();
|
|
3843
3843
|
const a = n;
|
|
3844
|
-
a[
|
|
3844
|
+
a[Xe] && a[Xe](s), s.on("*", bt);
|
|
3845
3845
|
}
|
|
3846
3846
|
}, t), ka(() => {
|
|
3847
3847
|
const a = n;
|
|
3848
|
-
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (s && s.off("*",
|
|
3848
|
+
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (s && s.off("*", bt), a[ht] && a[ht](), delete t.vnode.el.__VUE_I18N__), e.__deleteInstance(t);
|
|
3849
3849
|
const l = a[_n];
|
|
3850
3850
|
l && (l(), delete a[_n]);
|
|
3851
3851
|
}, t);
|
|
@@ -3860,7 +3860,7 @@ function di(e, t) {
|
|
|
3860
3860
|
return fi.forEach((a) => {
|
|
3861
3861
|
const l = Object.getOwnPropertyDescriptor(t, a);
|
|
3862
3862
|
if (!l)
|
|
3863
|
-
throw
|
|
3863
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3864
3864
|
const r = Sa(l.value) ? {
|
|
3865
3865
|
get() {
|
|
3866
3866
|
return l.value.value;
|
|
@@ -3878,7 +3878,7 @@ function di(e, t) {
|
|
|
3878
3878
|
}), e.config.globalProperties.$i18n = n, hs.forEach((a) => {
|
|
3879
3879
|
const l = Object.getOwnPropertyDescriptor(t, a);
|
|
3880
3880
|
if (!l || !l.value)
|
|
3881
|
-
throw
|
|
3881
|
+
throw de(z.UNEXPECTED_ERROR);
|
|
3882
3882
|
Object.defineProperty(e.config.globalProperties, `$${a}`, l);
|
|
3883
3883
|
}), () => {
|
|
3884
3884
|
delete e.config.globalProperties.$i18n, hs.forEach((a) => {
|
|
@@ -3891,7 +3891,7 @@ Jr(xr);
|
|
|
3891
3891
|
Qr(Yr);
|
|
3892
3892
|
Zr(Ws);
|
|
3893
3893
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3894
|
-
const e =
|
|
3894
|
+
const e = Ye();
|
|
3895
3895
|
e.__INTLIFY__ = !0, kr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3896
3896
|
}
|
|
3897
3897
|
process.env.NODE_ENV;
|
|
@@ -3987,16 +3987,23 @@ for (const e of _i)
|
|
|
3987
3987
|
mi[e] || {},
|
|
3988
3988
|
pi[e] || {}
|
|
3989
3989
|
);
|
|
3990
|
-
const
|
|
3990
|
+
const oe = si({
|
|
3991
3991
|
legacy: !1,
|
|
3992
3992
|
locale: "zh-CN",
|
|
3993
3993
|
fallbackLocale: "en-US",
|
|
3994
3994
|
messages: da
|
|
3995
|
-
}), gi =
|
|
3995
|
+
}), gi = oe;
|
|
3996
3996
|
function ma() {
|
|
3997
3997
|
return { t: (t) => {
|
|
3998
|
-
|
|
3999
|
-
|
|
3998
|
+
try {
|
|
3999
|
+
if (oe && oe.global && oe.global.t) {
|
|
4000
|
+
const n = oe.global.t;
|
|
4001
|
+
return n(t);
|
|
4002
|
+
}
|
|
4003
|
+
} catch (n) {
|
|
4004
|
+
console.warn("i18n not ready:", n);
|
|
4005
|
+
}
|
|
4006
|
+
return t;
|
|
4000
4007
|
} };
|
|
4001
4008
|
}
|
|
4002
4009
|
const hi = { class: "expression-editor" }, Ei = { class: "expression-editor__label" }, bi = {
|
|
@@ -4021,7 +4028,7 @@ const hi = { class: "expression-editor" }, Ei = { class: "expression-editor__lab
|
|
|
4021
4028
|
'return input?.trim() ?? "";',
|
|
4022
4029
|
"return input ? input.toUpperCase() : input;",
|
|
4023
4030
|
"return answers.otherField;"
|
|
4024
|
-
], r = W(() => n.placeholder || a("editor.placeholder")), o = W(() => a("editor.show_examples")), c = W(() => a("editor.hide_examples")), f = W(() => a("editor.examples_title")),
|
|
4031
|
+
], r = W(() => n.placeholder || a("editor.placeholder")), o = W(() => a("editor.show_examples")), c = W(() => a("editor.hide_examples")), f = W(() => a("editor.examples_title")), p = W(() => n.suggestions && n.suggestions.length > 0 ? n.suggestions : l), g = Pe(!1);
|
|
4025
4032
|
function m() {
|
|
4026
4033
|
g.value = !g.value;
|
|
4027
4034
|
}
|
|
@@ -4045,7 +4052,7 @@ const hi = { class: "expression-editor" }, Ei = { class: "expression-editor__lab
|
|
|
4045
4052
|
_: 1
|
|
4046
4053
|
}, 8, ["content"])) : j("", !0)
|
|
4047
4054
|
]),
|
|
4048
|
-
F(v(
|
|
4055
|
+
F(v(vt), {
|
|
4049
4056
|
class: "code-input",
|
|
4050
4057
|
type: "textarea",
|
|
4051
4058
|
"model-value": e.modelValue,
|
|
@@ -4058,7 +4065,7 @@ const hi = { class: "expression-editor" }, Ei = { class: "expression-editor__lab
|
|
|
4058
4065
|
g.value ? (y(), A("div", bi, [
|
|
4059
4066
|
w("p", vi, P(f.value), 1),
|
|
4060
4067
|
w("ul", Ni, [
|
|
4061
|
-
(y(!0), A(
|
|
4068
|
+
(y(!0), A(ge, null, Oe(p.value, (O) => (y(), A("li", { key: O }, [
|
|
4062
4069
|
w("code", null, P(O), 1)
|
|
4063
4070
|
]))), 128))
|
|
4064
4071
|
])
|
|
@@ -4075,7 +4082,7 @@ const hi = { class: "expression-editor" }, Ei = { class: "expression-editor__lab
|
|
|
4075
4082
|
])
|
|
4076
4083
|
]));
|
|
4077
4084
|
}
|
|
4078
|
-
}), Ct = /* @__PURE__ */
|
|
4085
|
+
}), Ct = /* @__PURE__ */ ie(Ti, [["__scopeId", "data-v-7b2a61b5"]]), Li = { class: "inline-settings" }, Ii = /* @__PURE__ */ U({
|
|
4079
4086
|
__name: "BaseQuestionConfig",
|
|
4080
4087
|
props: {
|
|
4081
4088
|
label: {},
|
|
@@ -4124,13 +4131,13 @@ return true;`,
|
|
|
4124
4131
|
}
|
|
4125
4132
|
});
|
|
4126
4133
|
}
|
|
4127
|
-
return (f,
|
|
4134
|
+
return (f, p) => (y(), B(ll, {
|
|
4128
4135
|
label: e.label,
|
|
4129
4136
|
field: e.field,
|
|
4130
|
-
onUpdate:
|
|
4137
|
+
onUpdate: p[0] || (p[0] = (g) => o("update", g))
|
|
4131
4138
|
}, {
|
|
4132
4139
|
default: Q(({ updateProp: g }) => [
|
|
4133
|
-
F(v(
|
|
4140
|
+
F(v(De), {
|
|
4134
4141
|
label: v(r)("config.message"),
|
|
4135
4142
|
"model-value": e.message,
|
|
4136
4143
|
"onUpdate:modelValue": c
|
|
@@ -4142,14 +4149,14 @@ return true;`,
|
|
|
4142
4149
|
"max-rows": 3,
|
|
4143
4150
|
"onUpdate:modelValue": (m) => g("description", m)
|
|
4144
4151
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
4145
|
-
e.showPlaceholder ? (y(), B(v(
|
|
4152
|
+
e.showPlaceholder ? (y(), B(v(De), {
|
|
4146
4153
|
key: 0,
|
|
4147
4154
|
label: v(r)("config.placeholder"),
|
|
4148
4155
|
"model-value": e.placeholder,
|
|
4149
4156
|
"onUpdate:modelValue": (m) => g("placeholder", m)
|
|
4150
4157
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : j("", !0),
|
|
4151
4158
|
an(f.$slots, "defaultValue", { updateProp: g }, () => [
|
|
4152
|
-
e.showDefaultInput ? (y(), B(v(
|
|
4159
|
+
e.showDefaultInput ? (y(), B(v(De), {
|
|
4153
4160
|
key: 0,
|
|
4154
4161
|
label: v(r)("config.default_value"),
|
|
4155
4162
|
"model-value": e.defaultValue,
|
|
@@ -4157,12 +4164,12 @@ return true;`,
|
|
|
4157
4164
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : j("", !0)
|
|
4158
4165
|
], !0),
|
|
4159
4166
|
w("div", Li, [
|
|
4160
|
-
F(v(
|
|
4167
|
+
F(v(De), {
|
|
4161
4168
|
label: v(r)("config.prefix"),
|
|
4162
4169
|
"model-value": e.prefix,
|
|
4163
4170
|
"onUpdate:modelValue": (m) => g("prefix", m)
|
|
4164
4171
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
4165
|
-
F(v(
|
|
4172
|
+
F(v(De), {
|
|
4166
4173
|
label: v(r)("config.suffix"),
|
|
4167
4174
|
"model-value": e.suffix,
|
|
4168
4175
|
"onUpdate:modelValue": (m) => g("suffix", m)
|
|
@@ -4218,7 +4225,7 @@ return true;`,
|
|
|
4218
4225
|
_: 3
|
|
4219
4226
|
}, 8, ["label", "field"]));
|
|
4220
4227
|
}
|
|
4221
|
-
}),
|
|
4228
|
+
}), ze = /* @__PURE__ */ ie(Ii, [["__scopeId", "data-v-43dc3bfd"]]), Ci = /* @__PURE__ */ U({
|
|
4222
4229
|
__name: "config",
|
|
4223
4230
|
props: {
|
|
4224
4231
|
label: {},
|
|
@@ -4237,21 +4244,21 @@ return true;`,
|
|
|
4237
4244
|
emits: ["update"],
|
|
4238
4245
|
setup(e, { emit: t }) {
|
|
4239
4246
|
const n = e, s = t;
|
|
4240
|
-
return (a, l) => (y(), B(
|
|
4247
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
4241
4248
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
4242
4249
|
}), null, 16));
|
|
4243
4250
|
}
|
|
4244
4251
|
});
|
|
4245
|
-
function
|
|
4252
|
+
function we(e) {
|
|
4246
4253
|
return `${e}_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
4247
4254
|
}
|
|
4248
|
-
function
|
|
4255
|
+
function ve(e, t) {
|
|
4249
4256
|
return {
|
|
4250
4257
|
label: e,
|
|
4251
4258
|
value: t ?? e
|
|
4252
4259
|
};
|
|
4253
4260
|
}
|
|
4254
|
-
const
|
|
4261
|
+
const Ae = {
|
|
4255
4262
|
input: hl,
|
|
4256
4263
|
password: Ol,
|
|
4257
4264
|
number: _l,
|
|
@@ -4394,19 +4401,19 @@ function xi(e) {
|
|
|
4394
4401
|
return e;
|
|
4395
4402
|
return typeof s == "string" ? s : e;
|
|
4396
4403
|
}
|
|
4397
|
-
function
|
|
4404
|
+
function ue(e, t) {
|
|
4398
4405
|
return xi(e);
|
|
4399
4406
|
}
|
|
4400
4407
|
const pa = {
|
|
4401
4408
|
type: "inq-input",
|
|
4402
4409
|
category: "inputControl",
|
|
4403
4410
|
label: "输入",
|
|
4404
|
-
icon:
|
|
4411
|
+
icon: Ae.input,
|
|
4405
4412
|
isContainer: !1,
|
|
4406
4413
|
initialSchema: () => {
|
|
4407
|
-
const e =
|
|
4414
|
+
const e = ue("controls.input.message");
|
|
4408
4415
|
return {
|
|
4409
|
-
id:
|
|
4416
|
+
id: we("inq_input"),
|
|
4410
4417
|
type: "inq-input",
|
|
4411
4418
|
field: "question_" + Math.random().toString(36).slice(2, 6),
|
|
4412
4419
|
props: {
|
|
@@ -4414,7 +4421,7 @@ const pa = {
|
|
|
4414
4421
|
// label 和 message 保持一致
|
|
4415
4422
|
message: e,
|
|
4416
4423
|
promptType: "input",
|
|
4417
|
-
placeholder:
|
|
4424
|
+
placeholder: ue("controls.input.placeholder"),
|
|
4418
4425
|
defaultValue: "",
|
|
4419
4426
|
prefix: "",
|
|
4420
4427
|
suffix: "",
|
|
@@ -4443,14 +4450,14 @@ const pa = {
|
|
|
4443
4450
|
},
|
|
4444
4451
|
emits: ["select"],
|
|
4445
4452
|
setup(e, { emit: t }) {
|
|
4446
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o } =
|
|
4447
|
-
return (c, f) => (y(), B(
|
|
4453
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o } = Se(n);
|
|
4454
|
+
return (c, f) => (y(), B(xe, {
|
|
4448
4455
|
label: v(a),
|
|
4449
4456
|
message: v(l),
|
|
4450
4457
|
description: v(r),
|
|
4451
4458
|
"type-label": "Inquirer Password",
|
|
4452
4459
|
"is-active": v(o),
|
|
4453
|
-
onSelect: f[0] || (f[0] = (
|
|
4460
|
+
onSelect: f[0] || (f[0] = (p) => s("select"))
|
|
4454
4461
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
4455
4462
|
}
|
|
4456
4463
|
}), wi = { class: "inquirer-password" }, Ai = {
|
|
@@ -4471,7 +4478,7 @@ const pa = {
|
|
|
4471
4478
|
setup(e, { emit: t }) {
|
|
4472
4479
|
const n = t;
|
|
4473
4480
|
return (s, a) => (y(), A("div", wi, [
|
|
4474
|
-
F(v(
|
|
4481
|
+
F(v(vt), {
|
|
4475
4482
|
"model-value": e.modelValue ?? "",
|
|
4476
4483
|
placeholder: e.placeholder,
|
|
4477
4484
|
disabled: e.disabled,
|
|
@@ -4482,14 +4489,14 @@ const pa = {
|
|
|
4482
4489
|
e.prefix ? {
|
|
4483
4490
|
name: "prepend",
|
|
4484
4491
|
fn: Q(() => [
|
|
4485
|
-
|
|
4492
|
+
dt(P(e.prefix), 1)
|
|
4486
4493
|
]),
|
|
4487
4494
|
key: "0"
|
|
4488
4495
|
} : void 0,
|
|
4489
4496
|
e.suffix ? {
|
|
4490
4497
|
name: "append",
|
|
4491
4498
|
fn: Q(() => [
|
|
4492
|
-
|
|
4499
|
+
dt(P(e.suffix), 1)
|
|
4493
4500
|
]),
|
|
4494
4501
|
key: "1"
|
|
4495
4502
|
} : void 0
|
|
@@ -4497,7 +4504,7 @@ const pa = {
|
|
|
4497
4504
|
e.maskEnabled ? (y(), A("p", Ai, " 输出将使用 " + P(e.maskSymbol || "掩码") + " 掩码 ", 1)) : j("", !0)
|
|
4498
4505
|
]));
|
|
4499
4506
|
}
|
|
4500
|
-
}), Di = /* @__PURE__ */
|
|
4507
|
+
}), Di = /* @__PURE__ */ ie(Vi, [["__scopeId", "data-v-027f448e"]]), Pi = /* @__PURE__ */ U({
|
|
4501
4508
|
__name: "config",
|
|
4502
4509
|
props: {
|
|
4503
4510
|
label: {},
|
|
@@ -4518,7 +4525,7 @@ const pa = {
|
|
|
4518
4525
|
emits: ["update"],
|
|
4519
4526
|
setup(e, { emit: t }) {
|
|
4520
4527
|
const n = e, s = t;
|
|
4521
|
-
return (a, l) => (y(), B(
|
|
4528
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
4522
4529
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
4523
4530
|
}), {
|
|
4524
4531
|
extra: Q(({ updateProp: r }) => [
|
|
@@ -4527,7 +4534,7 @@ const pa = {
|
|
|
4527
4534
|
"model-value": e.maskEnabled,
|
|
4528
4535
|
"onUpdate:modelValue": (o) => r("maskEnabled", o)
|
|
4529
4536
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4530
|
-
e.maskEnabled ? (y(), B(v(
|
|
4537
|
+
e.maskEnabled ? (y(), B(v(De), {
|
|
4531
4538
|
key: 0,
|
|
4532
4539
|
label: "掩码符号",
|
|
4533
4540
|
"model-value": e.maskSymbol,
|
|
@@ -4541,19 +4548,19 @@ const pa = {
|
|
|
4541
4548
|
type: "inq-password",
|
|
4542
4549
|
category: "inputControl",
|
|
4543
4550
|
label: "密码",
|
|
4544
|
-
icon:
|
|
4551
|
+
icon: Ae.password,
|
|
4545
4552
|
isContainer: !1,
|
|
4546
4553
|
initialSchema: () => {
|
|
4547
|
-
const e =
|
|
4554
|
+
const e = ue("controls.password.message");
|
|
4548
4555
|
return {
|
|
4549
|
-
id:
|
|
4556
|
+
id: we("inq_password"),
|
|
4550
4557
|
type: "inq-password",
|
|
4551
4558
|
field: "secret_" + Math.random().toString(36).slice(2, 6),
|
|
4552
4559
|
props: {
|
|
4553
4560
|
label: e,
|
|
4554
4561
|
message: e,
|
|
4555
4562
|
promptType: "password",
|
|
4556
|
-
placeholder:
|
|
4563
|
+
placeholder: ue("controls.password.placeholder"),
|
|
4557
4564
|
defaultValue: "",
|
|
4558
4565
|
prefix: "",
|
|
4559
4566
|
suffix: "",
|
|
@@ -4584,14 +4591,14 @@ const pa = {
|
|
|
4584
4591
|
},
|
|
4585
4592
|
emits: ["select"],
|
|
4586
4593
|
setup(e, { emit: t }) {
|
|
4587
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o } =
|
|
4588
|
-
return (c, f) => (y(), B(
|
|
4594
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o } = Se(n);
|
|
4595
|
+
return (c, f) => (y(), B(xe, {
|
|
4589
4596
|
label: v(a),
|
|
4590
4597
|
message: v(l),
|
|
4591
4598
|
description: v(r),
|
|
4592
4599
|
"type-label": "Inquirer Number",
|
|
4593
4600
|
"is-active": v(o),
|
|
4594
|
-
onSelect: f[0] || (f[0] = (
|
|
4601
|
+
onSelect: f[0] || (f[0] = (p) => s("select"))
|
|
4595
4602
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
4596
4603
|
}
|
|
4597
4604
|
}), Ui = { class: "number-runtime" }, Mi = {
|
|
@@ -4631,7 +4638,7 @@ const pa = {
|
|
|
4631
4638
|
e.suffix ? (y(), A("span", Fi, P(e.suffix), 1)) : j("", !0)
|
|
4632
4639
|
]));
|
|
4633
4640
|
}
|
|
4634
|
-
}), qi = /* @__PURE__ */
|
|
4641
|
+
}), qi = /* @__PURE__ */ ie($i, [["__scopeId", "data-v-41430bc7"]]), Wi = { class: "number-setting" }, Bi = /* @__PURE__ */ U({
|
|
4635
4642
|
__name: "NumberSetting",
|
|
4636
4643
|
props: {
|
|
4637
4644
|
label: {},
|
|
@@ -4655,7 +4662,7 @@ const pa = {
|
|
|
4655
4662
|
}, null, 8, ["model-value", "min", "max", "step"])
|
|
4656
4663
|
]));
|
|
4657
4664
|
}
|
|
4658
|
-
}),
|
|
4665
|
+
}), tt = /* @__PURE__ */ ie(Bi, [["__scopeId", "data-v-9db53040"]]), Hi = /* @__PURE__ */ U({
|
|
4659
4666
|
__name: "config",
|
|
4660
4667
|
props: {
|
|
4661
4668
|
label: {},
|
|
@@ -4676,29 +4683,29 @@ const pa = {
|
|
|
4676
4683
|
emits: ["update"],
|
|
4677
4684
|
setup(e, { emit: t }) {
|
|
4678
4685
|
const n = e, s = t;
|
|
4679
|
-
return (a, l) => (y(), B(
|
|
4686
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
4680
4687
|
"show-placeholder": !1,
|
|
4681
4688
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
4682
4689
|
}), {
|
|
4683
4690
|
defaultValue: Q(({ updateProp: r }) => [
|
|
4684
|
-
F(
|
|
4691
|
+
F(tt, {
|
|
4685
4692
|
label: "默认值",
|
|
4686
4693
|
"model-value": e.defaultValue,
|
|
4687
4694
|
"onUpdate:modelValue": (o) => r("defaultValue", o)
|
|
4688
4695
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
4689
4696
|
]),
|
|
4690
4697
|
extra: Q(({ updateProp: r }) => [
|
|
4691
|
-
F(
|
|
4698
|
+
F(tt, {
|
|
4692
4699
|
label: "最小值",
|
|
4693
4700
|
"model-value": e.min,
|
|
4694
4701
|
"onUpdate:modelValue": (o) => r("min", o)
|
|
4695
4702
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4696
|
-
F(
|
|
4703
|
+
F(tt, {
|
|
4697
4704
|
label: "最大值",
|
|
4698
4705
|
"model-value": e.max,
|
|
4699
4706
|
"onUpdate:modelValue": (o) => r("max", o)
|
|
4700
4707
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4701
|
-
F(
|
|
4708
|
+
F(tt, {
|
|
4702
4709
|
label: "步长",
|
|
4703
4710
|
"model-value": e.step,
|
|
4704
4711
|
min: 0,
|
|
@@ -4713,12 +4720,12 @@ const pa = {
|
|
|
4713
4720
|
type: "inq-number",
|
|
4714
4721
|
category: "inputControl",
|
|
4715
4722
|
label: "数字",
|
|
4716
|
-
icon:
|
|
4723
|
+
icon: Ae.number,
|
|
4717
4724
|
isContainer: !1,
|
|
4718
4725
|
initialSchema: () => {
|
|
4719
|
-
const e =
|
|
4726
|
+
const e = ue("controls.number.message");
|
|
4720
4727
|
return {
|
|
4721
|
-
id:
|
|
4728
|
+
id: we("inq_number"),
|
|
4722
4729
|
type: "inq-number",
|
|
4723
4730
|
field: "amount_" + Math.random().toString(36).slice(2, 6),
|
|
4724
4731
|
props: {
|
|
@@ -4756,14 +4763,14 @@ const pa = {
|
|
|
4756
4763
|
},
|
|
4757
4764
|
emits: ["select"],
|
|
4758
4765
|
setup(e, { emit: t }) {
|
|
4759
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o } =
|
|
4760
|
-
return (c, f) => (y(), B(
|
|
4766
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o } = Se(n);
|
|
4767
|
+
return (c, f) => (y(), B(xe, {
|
|
4761
4768
|
label: v(a),
|
|
4762
4769
|
message: v(l),
|
|
4763
4770
|
description: v(r),
|
|
4764
4771
|
"type-label": "Inquirer Confirm",
|
|
4765
4772
|
"is-active": v(o),
|
|
4766
|
-
onSelect: f[0] || (f[0] = (
|
|
4773
|
+
onSelect: f[0] || (f[0] = (p) => s("select"))
|
|
4767
4774
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
4768
4775
|
}
|
|
4769
4776
|
}), Yi = { class: "confirm-runtime" }, Ki = {
|
|
@@ -4797,7 +4804,7 @@ const pa = {
|
|
|
4797
4804
|
e.suffix ? (y(), A("span", Xi, P(e.suffix), 1)) : j("", !0)
|
|
4798
4805
|
]));
|
|
4799
4806
|
}
|
|
4800
|
-
}), Ji = /* @__PURE__ */
|
|
4807
|
+
}), Ji = /* @__PURE__ */ ie(zi, [["__scopeId", "data-v-220e5de9"]]), Qi = /* @__PURE__ */ U({
|
|
4801
4808
|
__name: "config",
|
|
4802
4809
|
props: {
|
|
4803
4810
|
label: {},
|
|
@@ -4815,7 +4822,7 @@ const pa = {
|
|
|
4815
4822
|
emits: ["update"],
|
|
4816
4823
|
setup(e, { emit: t }) {
|
|
4817
4824
|
const n = e, s = t;
|
|
4818
|
-
return (a, l) => (y(), B(
|
|
4825
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
4819
4826
|
"show-placeholder": !1,
|
|
4820
4827
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
4821
4828
|
}), {
|
|
@@ -4833,12 +4840,12 @@ const pa = {
|
|
|
4833
4840
|
type: "inq-confirm",
|
|
4834
4841
|
category: "inputControl",
|
|
4835
4842
|
label: "确认",
|
|
4836
|
-
icon:
|
|
4843
|
+
icon: Ae.confirm,
|
|
4837
4844
|
isContainer: !1,
|
|
4838
4845
|
initialSchema: () => {
|
|
4839
|
-
const e =
|
|
4846
|
+
const e = ue("controls.confirm.message");
|
|
4840
4847
|
return {
|
|
4841
|
-
id:
|
|
4848
|
+
id: we("inq_confirm"),
|
|
4842
4849
|
type: "inq-confirm",
|
|
4843
4850
|
field: "confirm_" + Math.random().toString(36).slice(2, 6),
|
|
4844
4851
|
props: {
|
|
@@ -4874,15 +4881,15 @@ const pa = {
|
|
|
4874
4881
|
},
|
|
4875
4882
|
emits: ["select"],
|
|
4876
4883
|
setup(e, { emit: t }) {
|
|
4877
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } =
|
|
4878
|
-
return (f,
|
|
4884
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } = Se(n);
|
|
4885
|
+
return (f, p) => (y(), B(xe, {
|
|
4879
4886
|
label: v(a),
|
|
4880
4887
|
message: v(l),
|
|
4881
4888
|
description: v(r),
|
|
4882
4889
|
options: v(c),
|
|
4883
4890
|
"type-label": "Inquirer List",
|
|
4884
4891
|
"is-active": v(o),
|
|
4885
|
-
onSelect:
|
|
4892
|
+
onSelect: p[0] || (p[0] = (g) => s("select"))
|
|
4886
4893
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
4887
4894
|
}
|
|
4888
4895
|
}), ec = { class: "inquirer-list" }, tc = {
|
|
@@ -4926,7 +4933,7 @@ const pa = {
|
|
|
4926
4933
|
"onUpdate:modelValue": r[0] || (r[0] = (o) => s("update:modelValue", o))
|
|
4927
4934
|
}, {
|
|
4928
4935
|
default: Q(() => [
|
|
4929
|
-
(y(!0), A(
|
|
4936
|
+
(y(!0), A(ge, null, Oe(a.value, (o) => (y(), B(v(ks), {
|
|
4930
4937
|
key: o.value,
|
|
4931
4938
|
label: o.label,
|
|
4932
4939
|
value: o.value
|
|
@@ -4941,7 +4948,7 @@ const pa = {
|
|
|
4941
4948
|
])) : j("", !0)
|
|
4942
4949
|
]));
|
|
4943
4950
|
}
|
|
4944
|
-
}), kn = /* @__PURE__ */
|
|
4951
|
+
}), kn = /* @__PURE__ */ ie(rc, [["__scopeId", "data-v-ed3b4861"]]), wn = /* @__PURE__ */ U({
|
|
4945
4952
|
__name: "config",
|
|
4946
4953
|
props: {
|
|
4947
4954
|
label: {},
|
|
@@ -4964,7 +4971,7 @@ const pa = {
|
|
|
4964
4971
|
emits: ["update"],
|
|
4965
4972
|
setup(e, { emit: t }) {
|
|
4966
4973
|
const n = e, s = t;
|
|
4967
|
-
return (a, l) => (y(), B(
|
|
4974
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
4968
4975
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
4969
4976
|
}), {
|
|
4970
4977
|
extra: Q(({ updateProp: r }) => [
|
|
@@ -4973,12 +4980,12 @@ const pa = {
|
|
|
4973
4980
|
"model-value": e.choices,
|
|
4974
4981
|
"onUpdate:modelValue": (o) => r("choices", o)
|
|
4975
4982
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4976
|
-
F(v(
|
|
4983
|
+
F(v(De), {
|
|
4977
4984
|
label: "默认选项值",
|
|
4978
4985
|
"model-value": e.defaultChoice,
|
|
4979
4986
|
"onUpdate:modelValue": (o) => r("defaultChoice", o)
|
|
4980
4987
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
4981
|
-
F(
|
|
4988
|
+
F(tt, {
|
|
4982
4989
|
label: "pageSize",
|
|
4983
4990
|
"model-value": e.pageSize,
|
|
4984
4991
|
min: 1,
|
|
@@ -4997,23 +5004,23 @@ const pa = {
|
|
|
4997
5004
|
type: "inq-list",
|
|
4998
5005
|
category: "inputControl",
|
|
4999
5006
|
label: "列表",
|
|
5000
|
-
icon:
|
|
5007
|
+
icon: Ae.list,
|
|
5001
5008
|
isContainer: !1,
|
|
5002
5009
|
initialSchema: () => {
|
|
5003
|
-
const e =
|
|
5010
|
+
const e = ue("controls.list.message");
|
|
5004
5011
|
return {
|
|
5005
|
-
id:
|
|
5012
|
+
id: we("inq_list"),
|
|
5006
5013
|
type: "inq-list",
|
|
5007
5014
|
field: "list_" + Math.random().toString(36).slice(2, 6),
|
|
5008
5015
|
props: {
|
|
5009
5016
|
label: e,
|
|
5010
5017
|
message: e,
|
|
5011
5018
|
promptType: "list",
|
|
5012
|
-
placeholder:
|
|
5019
|
+
placeholder: ue("controls.list.placeholder"),
|
|
5013
5020
|
defaultChoice: "opt_1",
|
|
5014
5021
|
choices: [
|
|
5015
|
-
|
|
5016
|
-
|
|
5022
|
+
ve(ue("controls.list.option") + " 1", "opt_1"),
|
|
5023
|
+
ve(ue("controls.list.option") + " 2", "opt_2")
|
|
5017
5024
|
],
|
|
5018
5025
|
pageSize: 7,
|
|
5019
5026
|
loop: !0,
|
|
@@ -5045,25 +5052,25 @@ const pa = {
|
|
|
5045
5052
|
},
|
|
5046
5053
|
emits: ["select"],
|
|
5047
5054
|
setup(e, { emit: t }) {
|
|
5048
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } =
|
|
5049
|
-
return (f,
|
|
5055
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } = Se(n);
|
|
5056
|
+
return (f, p) => (y(), B(xe, {
|
|
5050
5057
|
label: v(a),
|
|
5051
5058
|
message: v(l),
|
|
5052
5059
|
description: v(r),
|
|
5053
5060
|
options: v(c),
|
|
5054
5061
|
"type-label": "Inquirer Raw List",
|
|
5055
5062
|
"is-active": v(o),
|
|
5056
|
-
onSelect:
|
|
5063
|
+
onSelect: p[0] || (p[0] = (g) => s("select"))
|
|
5057
5064
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
5058
5065
|
}
|
|
5059
5066
|
}), ic = {
|
|
5060
5067
|
type: "inq-rawlist",
|
|
5061
5068
|
category: "inputControl",
|
|
5062
5069
|
label: "序号列表",
|
|
5063
|
-
icon:
|
|
5070
|
+
icon: Ae.rawList,
|
|
5064
5071
|
isContainer: !1,
|
|
5065
5072
|
initialSchema: () => ({
|
|
5066
|
-
id:
|
|
5073
|
+
id: we("inq_rawlist"),
|
|
5067
5074
|
type: "inq-rawlist",
|
|
5068
5075
|
field: "rawlist_" + Math.random().toString(36).slice(2, 6),
|
|
5069
5076
|
props: {
|
|
@@ -5072,7 +5079,7 @@ const pa = {
|
|
|
5072
5079
|
promptType: "rawlist",
|
|
5073
5080
|
placeholder: "输入编号",
|
|
5074
5081
|
defaultChoice: "opt_a",
|
|
5075
|
-
choices: [
|
|
5082
|
+
choices: [ve("Alpha", "opt_a"), ve("Beta", "opt_b"), ve("Gamma", "opt_c")],
|
|
5076
5083
|
pageSize: 5,
|
|
5077
5084
|
loop: !1,
|
|
5078
5085
|
prefix: "#",
|
|
@@ -5102,25 +5109,25 @@ const pa = {
|
|
|
5102
5109
|
},
|
|
5103
5110
|
emits: ["select"],
|
|
5104
5111
|
setup(e, { emit: t }) {
|
|
5105
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } =
|
|
5106
|
-
return (f,
|
|
5112
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } = Se(n);
|
|
5113
|
+
return (f, p) => (y(), B(xe, {
|
|
5107
5114
|
label: v(a),
|
|
5108
5115
|
message: v(l),
|
|
5109
5116
|
description: v(r),
|
|
5110
5117
|
options: v(c),
|
|
5111
5118
|
"type-label": "Inquirer Expand",
|
|
5112
5119
|
"is-active": v(o),
|
|
5113
|
-
onSelect:
|
|
5120
|
+
onSelect: p[0] || (p[0] = (g) => s("select"))
|
|
5114
5121
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
5115
5122
|
}
|
|
5116
5123
|
}), uc = {
|
|
5117
5124
|
type: "inq-expand",
|
|
5118
5125
|
category: "inputControl",
|
|
5119
5126
|
label: "扩展列表",
|
|
5120
|
-
icon:
|
|
5127
|
+
icon: Ae.expand,
|
|
5121
5128
|
isContainer: !1,
|
|
5122
5129
|
initialSchema: () => ({
|
|
5123
|
-
id:
|
|
5130
|
+
id: we("inq_expand"),
|
|
5124
5131
|
type: "inq-expand",
|
|
5125
5132
|
field: "expand_" + Math.random().toString(36).slice(2, 6),
|
|
5126
5133
|
props: {
|
|
@@ -5130,9 +5137,9 @@ const pa = {
|
|
|
5130
5137
|
placeholder: "按键选择",
|
|
5131
5138
|
defaultChoice: "opt_1",
|
|
5132
5139
|
choices: [
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5140
|
+
ve("继续", "opt_1"),
|
|
5141
|
+
ve("跳过", "opt_2"),
|
|
5142
|
+
ve("退出", "opt_3")
|
|
5136
5143
|
],
|
|
5137
5144
|
pageSize: 5,
|
|
5138
5145
|
loop: !1,
|
|
@@ -5163,15 +5170,15 @@ const pa = {
|
|
|
5163
5170
|
},
|
|
5164
5171
|
emits: ["select"],
|
|
5165
5172
|
setup(e, { emit: t }) {
|
|
5166
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } =
|
|
5167
|
-
return (f,
|
|
5173
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o, choices: c } = Se(n);
|
|
5174
|
+
return (f, p) => (y(), B(xe, {
|
|
5168
5175
|
label: v(a),
|
|
5169
5176
|
message: v(l),
|
|
5170
5177
|
description: v(r),
|
|
5171
5178
|
options: v(c),
|
|
5172
5179
|
"type-label": "Inquirer Checkbox",
|
|
5173
5180
|
"is-active": v(o),
|
|
5174
|
-
onSelect:
|
|
5181
|
+
onSelect: p[0] || (p[0] = (g) => s("select"))
|
|
5175
5182
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
5176
5183
|
}
|
|
5177
5184
|
}), dc = { class: "checkbox-wrapper" }, mc = {
|
|
@@ -5206,12 +5213,12 @@ const pa = {
|
|
|
5206
5213
|
"onUpdate:modelValue": r[0] || (r[0] = (o) => s("update:modelValue", o))
|
|
5207
5214
|
}, {
|
|
5208
5215
|
default: Q(() => [
|
|
5209
|
-
(y(!0), A(
|
|
5216
|
+
(y(!0), A(ge, null, Oe(a.value, (o) => (y(), B(v(Wa), {
|
|
5210
5217
|
key: o.value,
|
|
5211
5218
|
label: o.value
|
|
5212
5219
|
}, {
|
|
5213
5220
|
default: Q(() => [
|
|
5214
|
-
|
|
5221
|
+
dt(P(o.label), 1)
|
|
5215
5222
|
]),
|
|
5216
5223
|
_: 2
|
|
5217
5224
|
}, 1032, ["label"]))), 128))
|
|
@@ -5221,7 +5228,7 @@ const pa = {
|
|
|
5221
5228
|
e.suffix ? (y(), A("span", pc, P(e.suffix), 1)) : j("", !0)
|
|
5222
5229
|
]));
|
|
5223
5230
|
}
|
|
5224
|
-
}), gc = /* @__PURE__ */
|
|
5231
|
+
}), gc = /* @__PURE__ */ ie(_c, [["__scopeId", "data-v-5def473d"]]), hc = { class: "multi-default" }, Ec = /* @__PURE__ */ U({
|
|
5225
5232
|
__name: "config",
|
|
5226
5233
|
props: {
|
|
5227
5234
|
label: {},
|
|
@@ -5242,7 +5249,7 @@ const pa = {
|
|
|
5242
5249
|
emits: ["update"],
|
|
5243
5250
|
setup(e, { emit: t }) {
|
|
5244
5251
|
const n = e, s = t;
|
|
5245
|
-
return (a, l) => (y(), B(
|
|
5252
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
5246
5253
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
5247
5254
|
}), {
|
|
5248
5255
|
defaultValue: Q(({ updateProp: r }) => [
|
|
@@ -5256,7 +5263,7 @@ const pa = {
|
|
|
5256
5263
|
"onUpdate:modelValue": (o) => r("defaultChoices", o)
|
|
5257
5264
|
}, {
|
|
5258
5265
|
default: Q(() => [
|
|
5259
|
-
(y(!0), A(
|
|
5266
|
+
(y(!0), A(ge, null, Oe(e.choices || [], (o) => (y(), B(v(ks), {
|
|
5260
5267
|
key: o.value,
|
|
5261
5268
|
label: o.label,
|
|
5262
5269
|
value: o.value
|
|
@@ -5276,16 +5283,16 @@ const pa = {
|
|
|
5276
5283
|
_: 1
|
|
5277
5284
|
}, 16));
|
|
5278
5285
|
}
|
|
5279
|
-
}), bc = /* @__PURE__ */
|
|
5286
|
+
}), bc = /* @__PURE__ */ ie(Ec, [["__scopeId", "data-v-fa680fd2"]]), ba = {
|
|
5280
5287
|
type: "inq-checkbox",
|
|
5281
5288
|
category: "inputControl",
|
|
5282
5289
|
label: "多选",
|
|
5283
|
-
icon:
|
|
5290
|
+
icon: Ae.checkbox,
|
|
5284
5291
|
isContainer: !1,
|
|
5285
5292
|
initialSchema: () => {
|
|
5286
|
-
const e =
|
|
5293
|
+
const e = ue("controls.checkbox.message");
|
|
5287
5294
|
return {
|
|
5288
|
-
id:
|
|
5295
|
+
id: we("inq_checkbox"),
|
|
5289
5296
|
type: "inq-checkbox",
|
|
5290
5297
|
field: "checkbox_" + Math.random().toString(36).slice(2, 6),
|
|
5291
5298
|
props: {
|
|
@@ -5293,9 +5300,9 @@ const pa = {
|
|
|
5293
5300
|
message: e,
|
|
5294
5301
|
promptType: "checkbox",
|
|
5295
5302
|
choices: [
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5303
|
+
ve(ue("controls.checkbox.option") + " 1", "opt_1"),
|
|
5304
|
+
ve(ue("controls.checkbox.option") + " 2", "opt_2"),
|
|
5305
|
+
ve(ue("controls.checkbox.option") + " 3", "opt_3")
|
|
5299
5306
|
],
|
|
5300
5307
|
defaultChoices: ["opt_1"],
|
|
5301
5308
|
prefix: "",
|
|
@@ -5325,14 +5332,14 @@ const pa = {
|
|
|
5325
5332
|
},
|
|
5326
5333
|
emits: ["select"],
|
|
5327
5334
|
setup(e, { emit: t }) {
|
|
5328
|
-
const n = e, s = t, { label: a, message: l, description: r, isActive: o } =
|
|
5329
|
-
return (c, f) => (y(), B(
|
|
5335
|
+
const n = e, s = t, { label: a, message: l, description: r, isActive: o } = Se(n);
|
|
5336
|
+
return (c, f) => (y(), B(xe, {
|
|
5330
5337
|
label: v(a),
|
|
5331
5338
|
message: v(l),
|
|
5332
5339
|
description: v(r),
|
|
5333
5340
|
"type-label": "Inquirer Editor",
|
|
5334
5341
|
"is-active": v(o),
|
|
5335
|
-
onSelect: f[0] || (f[0] = (
|
|
5342
|
+
onSelect: f[0] || (f[0] = (p) => s("select"))
|
|
5336
5343
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
5337
5344
|
}
|
|
5338
5345
|
}), Nc = { class: "editor-runtime" }, yc = {
|
|
@@ -5360,7 +5367,7 @@ const pa = {
|
|
|
5360
5367
|
const n = e, s = t, a = W(() => n.displayValue === void 0 ? !1 : n.displayValue !== n.modelValue);
|
|
5361
5368
|
return (l, r) => (y(), A("div", Nc, [
|
|
5362
5369
|
e.prefix ? (y(), A("span", yc, P(e.prefix), 1)) : j("", !0),
|
|
5363
|
-
F(v(
|
|
5370
|
+
F(v(vt), {
|
|
5364
5371
|
type: "textarea",
|
|
5365
5372
|
rows: e.rows || 6,
|
|
5366
5373
|
"model-value": e.modelValue ?? "",
|
|
@@ -5372,7 +5379,7 @@ const pa = {
|
|
|
5372
5379
|
a.value ? (y(), A("p", Lc, P(e.displayValue), 1)) : j("", !0)
|
|
5373
5380
|
]));
|
|
5374
5381
|
}
|
|
5375
|
-
}), Cc = /* @__PURE__ */
|
|
5382
|
+
}), Cc = /* @__PURE__ */ ie(Ic, [["__scopeId", "data-v-768e57da"]]), Oc = /* @__PURE__ */ U({
|
|
5376
5383
|
__name: "config",
|
|
5377
5384
|
props: {
|
|
5378
5385
|
label: {},
|
|
@@ -5392,11 +5399,11 @@ const pa = {
|
|
|
5392
5399
|
emits: ["update"],
|
|
5393
5400
|
setup(e, { emit: t }) {
|
|
5394
5401
|
const n = e, s = t;
|
|
5395
|
-
return (a, l) => (y(), B(
|
|
5402
|
+
return (a, l) => (y(), B(ze, Me(n, {
|
|
5396
5403
|
onUpdate: l[0] || (l[0] = (r) => s("update", r))
|
|
5397
5404
|
}), {
|
|
5398
5405
|
extra: Q(({ updateProp: r }) => [
|
|
5399
|
-
F(
|
|
5406
|
+
F(tt, {
|
|
5400
5407
|
label: "行数",
|
|
5401
5408
|
"model-value": e.rows,
|
|
5402
5409
|
min: 2,
|
|
@@ -5411,19 +5418,19 @@ const pa = {
|
|
|
5411
5418
|
type: "inq-editor",
|
|
5412
5419
|
category: "inputControl",
|
|
5413
5420
|
label: "长文本",
|
|
5414
|
-
icon:
|
|
5421
|
+
icon: Ae.editor,
|
|
5415
5422
|
isContainer: !1,
|
|
5416
5423
|
initialSchema: () => {
|
|
5417
|
-
const e =
|
|
5424
|
+
const e = ue("controls.editor.message");
|
|
5418
5425
|
return {
|
|
5419
|
-
id:
|
|
5426
|
+
id: we("inq_editor"),
|
|
5420
5427
|
type: "inq-editor",
|
|
5421
5428
|
field: "editor_" + Math.random().toString(36).slice(2, 6),
|
|
5422
5429
|
props: {
|
|
5423
5430
|
label: e,
|
|
5424
5431
|
message: e,
|
|
5425
5432
|
promptType: "editor",
|
|
5426
|
-
placeholder:
|
|
5433
|
+
placeholder: ue("controls.editor.placeholder"),
|
|
5427
5434
|
rows: 6,
|
|
5428
5435
|
defaultValue: "",
|
|
5429
5436
|
prefix: "",
|
|
@@ -5455,9 +5462,9 @@ const pa = {
|
|
|
5455
5462
|
va
|
|
5456
5463
|
];
|
|
5457
5464
|
function Na() {
|
|
5458
|
-
|
|
5465
|
+
nt.replaceAll(Sc);
|
|
5459
5466
|
}
|
|
5460
|
-
function
|
|
5467
|
+
function He(e, t) {
|
|
5461
5468
|
const n = e.initialSchema();
|
|
5462
5469
|
return {
|
|
5463
5470
|
...n,
|
|
@@ -5470,11 +5477,18 @@ function Be(e, t) {
|
|
|
5470
5477
|
}
|
|
5471
5478
|
function ya(e) {
|
|
5472
5479
|
const t = e || ((n) => {
|
|
5473
|
-
|
|
5474
|
-
|
|
5480
|
+
try {
|
|
5481
|
+
if (oe && oe.global && oe.global.t) {
|
|
5482
|
+
const s = oe.global.t;
|
|
5483
|
+
return s(n);
|
|
5484
|
+
}
|
|
5485
|
+
} catch (s) {
|
|
5486
|
+
console.warn("i18n not ready:", s);
|
|
5487
|
+
}
|
|
5488
|
+
return n;
|
|
5475
5489
|
});
|
|
5476
5490
|
return [
|
|
5477
|
-
|
|
5491
|
+
He(pa, {
|
|
5478
5492
|
field: "fullName",
|
|
5479
5493
|
props: {
|
|
5480
5494
|
label: t("sample.fullName.message"),
|
|
@@ -5484,7 +5498,7 @@ function ya(e) {
|
|
|
5484
5498
|
description: t("sample.fullName.description")
|
|
5485
5499
|
}
|
|
5486
5500
|
}),
|
|
5487
|
-
|
|
5501
|
+
He(_a, {
|
|
5488
5502
|
field: "accountPassword",
|
|
5489
5503
|
props: {
|
|
5490
5504
|
label: t("sample.password.message"),
|
|
@@ -5493,7 +5507,7 @@ function ya(e) {
|
|
|
5493
5507
|
description: t("sample.password.description")
|
|
5494
5508
|
}
|
|
5495
5509
|
}),
|
|
5496
|
-
|
|
5510
|
+
He(ga, {
|
|
5497
5511
|
field: "age",
|
|
5498
5512
|
props: {
|
|
5499
5513
|
label: t("sample.age.message"),
|
|
@@ -5505,7 +5519,7 @@ function ya(e) {
|
|
|
5505
5519
|
description: t("sample.age.description")
|
|
5506
5520
|
}
|
|
5507
5521
|
}),
|
|
5508
|
-
|
|
5522
|
+
He(ha, {
|
|
5509
5523
|
field: "allowContact",
|
|
5510
5524
|
props: {
|
|
5511
5525
|
label: t("sample.allowContact.message"),
|
|
@@ -5515,7 +5529,7 @@ function ya(e) {
|
|
|
5515
5529
|
description: t("sample.allowContact.description")
|
|
5516
5530
|
}
|
|
5517
5531
|
}),
|
|
5518
|
-
|
|
5532
|
+
He(Ea, {
|
|
5519
5533
|
field: "favoriteStack",
|
|
5520
5534
|
props: {
|
|
5521
5535
|
label: t("sample.favoriteStack.message"),
|
|
@@ -5525,7 +5539,7 @@ function ya(e) {
|
|
|
5525
5539
|
description: t("sample.favoriteStack.description")
|
|
5526
5540
|
}
|
|
5527
5541
|
}),
|
|
5528
|
-
|
|
5542
|
+
He(ba, {
|
|
5529
5543
|
field: "tools",
|
|
5530
5544
|
props: {
|
|
5531
5545
|
label: t("sample.tools.message"),
|
|
@@ -5541,7 +5555,7 @@ function ya(e) {
|
|
|
5541
5555
|
description: t("sample.tools.description")
|
|
5542
5556
|
}
|
|
5543
5557
|
}),
|
|
5544
|
-
|
|
5558
|
+
He(va, {
|
|
5545
5559
|
field: "bio",
|
|
5546
5560
|
props: {
|
|
5547
5561
|
label: t("sample.bio.message"),
|
|
@@ -5565,8 +5579,8 @@ const xc = /* @__PURE__ */ U({
|
|
|
5565
5579
|
const t = e, n = new Is(), s = W(() => t.engine ?? n);
|
|
5566
5580
|
let a = null;
|
|
5567
5581
|
const l = t.autoRegisterControls;
|
|
5568
|
-
return l && (a = [...
|
|
5569
|
-
l && a &&
|
|
5582
|
+
return l && (a = [...nt.getAll()], Na()), t.seedSample && s.value.getSchema().controls.length === 0 && (s.value.getSchema().controls = ya()), ys(() => {
|
|
5583
|
+
l && a && nt.replaceAll(a);
|
|
5570
5584
|
}), (r, o) => (y(), B(v(Cs), { engine: s.value }, null, 8, ["engine"]));
|
|
5571
5585
|
}
|
|
5572
5586
|
}), kc = {
|
|
@@ -5680,17 +5694,17 @@ const Mc = {
|
|
|
5680
5694
|
},
|
|
5681
5695
|
emits: ["update"],
|
|
5682
5696
|
setup(e, { emit: t }) {
|
|
5683
|
-
const n = e, s = t, a = W(() =>
|
|
5697
|
+
const n = e, s = t, a = W(() => nt.get(n.node.type)), l = W(() => a.value?.runtime || null), r = W(() => n.formData || {}), o = W(() => {
|
|
5684
5698
|
if (n.node.field)
|
|
5685
5699
|
return r.value[n.node.field];
|
|
5686
|
-
}), c = W(() => Uc(n.node)), f =
|
|
5687
|
-
|
|
5688
|
-
|
|
5700
|
+
}), c = W(() => Uc(n.node)), f = Pe(null), p = W(() => Vc(n.node, r.value));
|
|
5701
|
+
Ue(
|
|
5702
|
+
p,
|
|
5689
5703
|
(x) => {
|
|
5690
5704
|
!x && n.node.field && r.value[n.node.field] !== void 0 && (s("update", n.node.field, void 0), f.value = null);
|
|
5691
5705
|
},
|
|
5692
5706
|
{ immediate: !0 }
|
|
5693
|
-
),
|
|
5707
|
+
), Ue(
|
|
5694
5708
|
() => o.value,
|
|
5695
5709
|
(x) => {
|
|
5696
5710
|
f.value = Es(n.node, x, r.value);
|
|
@@ -5707,12 +5721,12 @@ const Mc = {
|
|
|
5707
5721
|
s("update", x, d);
|
|
5708
5722
|
}
|
|
5709
5723
|
return (x, d) => {
|
|
5710
|
-
const
|
|
5711
|
-
return
|
|
5724
|
+
const _ = Va("InquirerRuntimeNode", !0);
|
|
5725
|
+
return p.value ? (y(), A(ge, { key: 0 }, [
|
|
5712
5726
|
V.value ? (y(), A("div", Mc, [
|
|
5713
5727
|
(y(), B(Pn(l.value), Da(Pa(e.node.props)), {
|
|
5714
5728
|
default: Q(() => [
|
|
5715
|
-
e.node.children && e.node.children.length ? (y(!0), A(
|
|
5729
|
+
e.node.children && e.node.children.length ? (y(!0), A(ge, { key: 0 }, Oe(e.node.children, (T) => (y(), B(_, {
|
|
5716
5730
|
key: T.id,
|
|
5717
5731
|
node: T,
|
|
5718
5732
|
formData: e.formData,
|
|
@@ -5726,13 +5740,13 @@ const Mc = {
|
|
|
5726
5740
|
label: m.value
|
|
5727
5741
|
}, {
|
|
5728
5742
|
default: Q(() => [
|
|
5729
|
-
(y(), B(Pn(l.value),
|
|
5743
|
+
(y(), B(Pn(l.value), Me(e.node.props, {
|
|
5730
5744
|
modelValue: o.value,
|
|
5731
5745
|
displayValue: k.value,
|
|
5732
5746
|
"onUpdate:modelValue": g
|
|
5733
5747
|
}), {
|
|
5734
5748
|
default: Q(() => [
|
|
5735
|
-
e.node.children && e.node.children.length ? (y(!0), A(
|
|
5749
|
+
e.node.children && e.node.children.length ? (y(!0), A(ge, { key: 0 }, Oe(e.node.children, (T) => (y(), B(_, {
|
|
5736
5750
|
key: T.id,
|
|
5737
5751
|
node: T,
|
|
5738
5752
|
formData: e.formData,
|
|
@@ -5749,7 +5763,7 @@ const Mc = {
|
|
|
5749
5763
|
], 64)) : j("", !0);
|
|
5750
5764
|
};
|
|
5751
5765
|
}
|
|
5752
|
-
}), Wc = /* @__PURE__ */
|
|
5766
|
+
}), Wc = /* @__PURE__ */ ie(qc, [["__scopeId", "data-v-5d5107df"]]), Bc = { class: "inquirer-web-runtime" }, Hc = {
|
|
5753
5767
|
key: 0,
|
|
5754
5768
|
class: "runtime-empty"
|
|
5755
5769
|
}, Gc = /* @__PURE__ */ U({
|
|
@@ -5762,16 +5776,23 @@ const Mc = {
|
|
|
5762
5776
|
emits: ["update:modelValue"],
|
|
5763
5777
|
setup(e, { emit: t }) {
|
|
5764
5778
|
const n = (f) => {
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5779
|
+
try {
|
|
5780
|
+
if (oe && oe.global && oe.global.t) {
|
|
5781
|
+
const p = oe.global.t;
|
|
5782
|
+
return p(f);
|
|
5783
|
+
}
|
|
5784
|
+
} catch (p) {
|
|
5785
|
+
console.warn("i18n not ready:", p);
|
|
5786
|
+
}
|
|
5787
|
+
return f;
|
|
5788
|
+
}, s = e, a = t, l = Pe({ ...s.modelValue || {} });
|
|
5789
|
+
Ue(
|
|
5769
5790
|
() => s.modelValue,
|
|
5770
5791
|
(f) => {
|
|
5771
5792
|
l.value = { ...f || {} };
|
|
5772
5793
|
},
|
|
5773
5794
|
{ deep: !0 }
|
|
5774
|
-
),
|
|
5795
|
+
), Ue(
|
|
5775
5796
|
() => s.schema.controls,
|
|
5776
5797
|
() => {
|
|
5777
5798
|
r();
|
|
@@ -5782,21 +5803,21 @@ const Mc = {
|
|
|
5782
5803
|
o(s.schema.controls), a("update:modelValue", { ...l.value });
|
|
5783
5804
|
}
|
|
5784
5805
|
function o(f) {
|
|
5785
|
-
f && f.forEach((
|
|
5786
|
-
Rc(l.value,
|
|
5806
|
+
f && f.forEach((p) => {
|
|
5807
|
+
Rc(l.value, p), p.children?.length && o(p.children);
|
|
5787
5808
|
});
|
|
5788
5809
|
}
|
|
5789
|
-
function c(f,
|
|
5790
|
-
|
|
5810
|
+
function c(f, p) {
|
|
5811
|
+
p === void 0 ? delete l.value[f] : l.value[f] = p, a("update:modelValue", { ...l.value });
|
|
5791
5812
|
}
|
|
5792
|
-
return (f,
|
|
5813
|
+
return (f, p) => (y(), A("div", Bc, [
|
|
5793
5814
|
F(v(Ba), {
|
|
5794
5815
|
class: "form-content",
|
|
5795
5816
|
"label-position": "top",
|
|
5796
5817
|
model: l.value
|
|
5797
5818
|
}, {
|
|
5798
5819
|
default: Q(() => [
|
|
5799
|
-
!e.schema.controls || e.schema.controls.length === 0 ? (y(), A("div", Hc, P(n("runtime.emptyForm")), 1)) : (y(!0), A(
|
|
5820
|
+
!e.schema.controls || e.schema.controls.length === 0 ? (y(), A("div", Hc, P(n("runtime.emptyForm")), 1)) : (y(!0), A(ge, { key: 1 }, Oe(e.schema.controls, (g) => (y(), B(Wc, {
|
|
5800
5821
|
key: g.id,
|
|
5801
5822
|
node: g,
|
|
5802
5823
|
formData: l.value,
|
|
@@ -5807,7 +5828,7 @@ const Mc = {
|
|
|
5807
5828
|
}, 8, ["model"])
|
|
5808
5829
|
]));
|
|
5809
5830
|
}
|
|
5810
|
-
}), La = /* @__PURE__ */
|
|
5831
|
+
}), La = /* @__PURE__ */ ie(Gc, [["__scopeId", "data-v-3cfbef7c"]]);
|
|
5811
5832
|
function Yc(e, t = {}) {
|
|
5812
5833
|
const n = [];
|
|
5813
5834
|
function s(a) {
|
|
@@ -5827,14 +5848,14 @@ function Kc(e, t) {
|
|
|
5827
5848
|
name: s,
|
|
5828
5849
|
message: a,
|
|
5829
5850
|
default: l,
|
|
5830
|
-
prefix:
|
|
5831
|
-
suffix:
|
|
5832
|
-
pageSize:
|
|
5851
|
+
prefix: Ge(e.props?.prefix),
|
|
5852
|
+
suffix: Ge(e.props?.suffix),
|
|
5853
|
+
pageSize: ft(e.props?.pageSize),
|
|
5833
5854
|
loop: typeof e.props?.loop == "boolean" ? e.props.loop : void 0,
|
|
5834
|
-
whenExpression:
|
|
5855
|
+
whenExpression: Ge(e.props?.whenExpression),
|
|
5835
5856
|
validateExpression: Xc(e),
|
|
5836
|
-
filterExpression:
|
|
5837
|
-
transformerExpression:
|
|
5857
|
+
filterExpression: Ge(e.props?.filterExpression),
|
|
5858
|
+
transformerExpression: Ge(e.props?.transformerExpression),
|
|
5838
5859
|
mask: jc(e.props),
|
|
5839
5860
|
choices: zc(n, e.props),
|
|
5840
5861
|
metadata: {
|
|
@@ -5852,12 +5873,12 @@ function Kc(e, t) {
|
|
|
5852
5873
|
defaultChoices: Array.isArray(e.props?.defaultChoices) ? e.props.defaultChoices : void 0
|
|
5853
5874
|
}), n === "number" && (r.metadata = {
|
|
5854
5875
|
...r.metadata,
|
|
5855
|
-
min:
|
|
5856
|
-
max:
|
|
5857
|
-
step:
|
|
5876
|
+
min: ft(e.props?.min),
|
|
5877
|
+
max: ft(e.props?.max),
|
|
5878
|
+
step: ft(e.props?.step)
|
|
5858
5879
|
}), n === "editor" && (r.metadata = {
|
|
5859
5880
|
...r.metadata,
|
|
5860
|
-
rows:
|
|
5881
|
+
rows: ft(e.props?.rows)
|
|
5861
5882
|
}), r;
|
|
5862
5883
|
}
|
|
5863
5884
|
function jc(e = {}) {
|
|
@@ -5865,7 +5886,7 @@ function jc(e = {}) {
|
|
|
5865
5886
|
return typeof e.maskSymbol == "string" && e.maskSymbol.trim().length > 0 ? e.maskSymbol : !0;
|
|
5866
5887
|
}
|
|
5867
5888
|
function Xc(e) {
|
|
5868
|
-
const t =
|
|
5889
|
+
const t = Ge(e.props?.validateExpression);
|
|
5869
5890
|
if (t) return t;
|
|
5870
5891
|
if (e.props?.required)
|
|
5871
5892
|
return "return input ? true : 'Please input'";
|
|
@@ -5877,15 +5898,15 @@ function zc(e, t = {}) {
|
|
|
5877
5898
|
return !Array.isArray(n) || n.length === 0 ? [] : n.filter((s) => typeof s?.label == "string" && typeof s?.value == "string").map((s) => ({
|
|
5878
5899
|
name: s.label,
|
|
5879
5900
|
value: s.value,
|
|
5880
|
-
short:
|
|
5901
|
+
short: Ge(s.short)
|
|
5881
5902
|
}));
|
|
5882
5903
|
}
|
|
5883
|
-
function
|
|
5904
|
+
function Ge(e) {
|
|
5884
5905
|
if (typeof e != "string") return;
|
|
5885
5906
|
const t = e.trim();
|
|
5886
5907
|
return t.length ? t : void 0;
|
|
5887
5908
|
}
|
|
5888
|
-
function
|
|
5909
|
+
function ft(e) {
|
|
5889
5910
|
if (e == null) return;
|
|
5890
5911
|
const t = Number(e);
|
|
5891
5912
|
return Number.isNaN(t) ? void 0 : t;
|
|
@@ -5894,20 +5915,27 @@ const Jc = { class: "inquirer-demo" }, Qc = { class: "callout-panel" }, Zc = { c
|
|
|
5894
5915
|
__name: "InquirerFormPlayground",
|
|
5895
5916
|
setup(e) {
|
|
5896
5917
|
const t = (C) => {
|
|
5897
|
-
|
|
5898
|
-
|
|
5918
|
+
try {
|
|
5919
|
+
if (oe && oe.global && oe.global.t) {
|
|
5920
|
+
const L = oe.global.t;
|
|
5921
|
+
return L(C);
|
|
5922
|
+
}
|
|
5923
|
+
} catch (L) {
|
|
5924
|
+
console.warn("i18n not ready:", L);
|
|
5925
|
+
}
|
|
5926
|
+
return C;
|
|
5899
5927
|
}, n = new Is();
|
|
5900
5928
|
n.updateInfo({
|
|
5901
5929
|
title: "Inquirer Form Definition",
|
|
5902
5930
|
description: ""
|
|
5903
5931
|
});
|
|
5904
|
-
const s = [...
|
|
5932
|
+
const s = [...nt.getAll()];
|
|
5905
5933
|
Na(), Ns(() => {
|
|
5906
5934
|
n.getSchema().controls.length || O();
|
|
5907
5935
|
}), ys(() => {
|
|
5908
|
-
|
|
5936
|
+
nt.replaceAll(s);
|
|
5909
5937
|
});
|
|
5910
|
-
const a =
|
|
5938
|
+
const a = Pe({}), l = Pe(0), r = Pe(0), o = W(() => [
|
|
5911
5939
|
{
|
|
5912
5940
|
key: "designer",
|
|
5913
5941
|
label: t("playground.tabs.designer.label"),
|
|
@@ -5923,12 +5951,12 @@ const Jc = { class: "inquirer-demo" }, Qc = { class: "callout-panel" }, Zc = { c
|
|
|
5923
5951
|
label: t("playground.tabs.export.label"),
|
|
5924
5952
|
desc: t("playground.tabs.export.desc")
|
|
5925
5953
|
}
|
|
5926
|
-
]), c =
|
|
5927
|
-
|
|
5928
|
-
C === "runtime" &&
|
|
5954
|
+
]), c = Pe(o.value[0]?.key ?? "designer");
|
|
5955
|
+
Ue(c, (C, L) => {
|
|
5956
|
+
C === "runtime" && L !== "runtime" && f();
|
|
5929
5957
|
});
|
|
5930
5958
|
function f() {
|
|
5931
|
-
const C = {},
|
|
5959
|
+
const C = {}, L = n.getSchema().controls;
|
|
5932
5960
|
function E(M) {
|
|
5933
5961
|
M.forEach((q) => {
|
|
5934
5962
|
if (q.field) {
|
|
@@ -5938,15 +5966,15 @@ const Jc = { class: "inquirer-demo" }, Qc = { class: "callout-panel" }, Zc = { c
|
|
|
5938
5966
|
q.children?.length && E(q.children);
|
|
5939
5967
|
});
|
|
5940
5968
|
}
|
|
5941
|
-
|
|
5969
|
+
L?.length && E(L), a.value = C;
|
|
5942
5970
|
}
|
|
5943
|
-
const
|
|
5971
|
+
const p = W(() => Yc(n.getSchema())), g = W(() => JSON.stringify(p.value, null, 2)), m = W(() => JSON.stringify(a.value, null, 2));
|
|
5944
5972
|
function k() {
|
|
5945
5973
|
l.value++, r.value++;
|
|
5946
5974
|
}
|
|
5947
5975
|
function V(C) {
|
|
5948
|
-
const
|
|
5949
|
-
|
|
5976
|
+
const L = n.getSchema().controls;
|
|
5977
|
+
L.splice(0, L.length, ...C), n.selectNode(void 0), n.snapshot("update"), k();
|
|
5950
5978
|
}
|
|
5951
5979
|
function O() {
|
|
5952
5980
|
V(ya(t));
|
|
@@ -5954,14 +5982,14 @@ const Jc = { class: "inquirer-demo" }, Qc = { class: "callout-panel" }, Zc = { c
|
|
|
5954
5982
|
function x() {
|
|
5955
5983
|
V([]), a.value = {};
|
|
5956
5984
|
}
|
|
5957
|
-
async function d(C,
|
|
5985
|
+
async function d(C, L) {
|
|
5958
5986
|
try {
|
|
5959
|
-
await navigator.clipboard.writeText(C), alert(`${
|
|
5987
|
+
await navigator.clipboard.writeText(C), alert(`${L} ${t("playground.messages.copied")}`);
|
|
5960
5988
|
} catch (E) {
|
|
5961
5989
|
console.warn("clipboard failed", E);
|
|
5962
5990
|
}
|
|
5963
5991
|
}
|
|
5964
|
-
function
|
|
5992
|
+
function _() {
|
|
5965
5993
|
d(Ma(n.getSchema()), "Schema JSON");
|
|
5966
5994
|
}
|
|
5967
5995
|
function T() {
|
|
@@ -5973,7 +6001,7 @@ import { schemaToInquirer } from 'inquirer-form'
|
|
|
5973
6001
|
const questions = schemaToInquirer(schema)
|
|
5974
6002
|
const answers = await inquirer.prompt(questions)
|
|
5975
6003
|
console.log(answers)`);
|
|
5976
|
-
return (C,
|
|
6004
|
+
return (C, L) => (y(), A("div", Jc, [
|
|
5977
6005
|
w("section", Qc, [
|
|
5978
6006
|
w("div", Zc, [
|
|
5979
6007
|
w("div", eu, [
|
|
@@ -5999,7 +6027,7 @@ console.log(answers)`);
|
|
|
5999
6027
|
}, P(t("playground.actions.clearForm")), 1),
|
|
6000
6028
|
w("button", {
|
|
6001
6029
|
type: "button",
|
|
6002
|
-
onClick:
|
|
6030
|
+
onClick: _
|
|
6003
6031
|
}, P(t("playground.actions.copySchema")), 1),
|
|
6004
6032
|
w("button", {
|
|
6005
6033
|
type: "button",
|
|
@@ -6010,7 +6038,7 @@ console.log(answers)`);
|
|
|
6010
6038
|
]),
|
|
6011
6039
|
w("main", nu, [
|
|
6012
6040
|
w("div", su, [
|
|
6013
|
-
(y(!0), A(
|
|
6041
|
+
(y(!0), A(ge, null, Oe(o.value, (E) => (y(), A("button", {
|
|
6014
6042
|
key: E.key,
|
|
6015
6043
|
class: Ra(["tab-item", { active: E.key === c.value }]),
|
|
6016
6044
|
onClick: (M) => c.value = E.key
|
|
@@ -6033,7 +6061,7 @@ console.log(answers)`);
|
|
|
6033
6061
|
key: r.value,
|
|
6034
6062
|
schema: v(n).getSchema(),
|
|
6035
6063
|
modelValue: a.value,
|
|
6036
|
-
"onUpdate:modelValue":
|
|
6064
|
+
"onUpdate:modelValue": L[0] || (L[0] = (E) => a.value = E)
|
|
6037
6065
|
}, null, 8, ["schema", "modelValue"])),
|
|
6038
6066
|
w("div", ou, [
|
|
6039
6067
|
w("header", null, P(t("playground.runtime.formDataTitle")), 1),
|
|
@@ -6044,7 +6072,7 @@ console.log(answers)`);
|
|
|
6044
6072
|
]),
|
|
6045
6073
|
Qt(w("section", iu, [
|
|
6046
6074
|
w("div", cu, [
|
|
6047
|
-
|
|
6075
|
+
L[1] || (L[1] = w("div", null, null, -1)),
|
|
6048
6076
|
w("button", {
|
|
6049
6077
|
class: "btn-copy",
|
|
6050
6078
|
onClick: T
|
|
@@ -6063,7 +6091,7 @@ console.log(answers)`);
|
|
|
6063
6091
|
])
|
|
6064
6092
|
]));
|
|
6065
6093
|
}
|
|
6066
|
-
}), mu = /* @__PURE__ */
|
|
6094
|
+
}), mu = /* @__PURE__ */ ie(du, [["__scopeId", "data-v-6ca749ee"]]), hu = {
|
|
6067
6095
|
install(e) {
|
|
6068
6096
|
e.config.globalProperties.$i18n || e.use(gi), e.component("InquirerFormDesigner", xc), e.component("InquirerFormRuntime", La), e.component("InquirerFormPlayground", mu);
|
|
6069
6097
|
}
|
|
@@ -6075,7 +6103,7 @@ export {
|
|
|
6075
6103
|
ya as createInquirerSampleControls,
|
|
6076
6104
|
hu as default,
|
|
6077
6105
|
Sc as inquirerControls,
|
|
6078
|
-
|
|
6106
|
+
oe as inquirerFormI18n,
|
|
6079
6107
|
gi as inquirerFormI18nPlugin,
|
|
6080
6108
|
Na as registerInquirerControls,
|
|
6081
6109
|
Yc as schemaToInquirer
|