lty-protocol 1.0.14 → 1.0.16
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/components/Input.vue.d.ts +9 -0
- package/dist/components/IpInput.vue.d.ts +9 -0
- package/dist/index.d.ts +2 -2
- package/dist/lty-protocol.mjs +827 -831
- package/dist/lty-protocol.umd.js +6 -6
- package/dist/plugin.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/Input.d.ts +0 -10
- package/dist/components/IpInput.d.ts +0 -10
package/dist/lty-protocol.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
1
|
+
import * as At from "vue";
|
|
2
|
+
import { defineComponent as ge, openBlock as Ee, createElementBlock as ve, renderSlot as Kn, inject as jn, ref as Yt, watch as Ce, createBlock as Xn, resolveDynamicComponent as Mr, unref as Jn, Fragment as at, renderList as Qn, toDisplayString as Fr, createVNode as qn, effectScope as Ur, computed as He, isRef as wr, shallowRef as Vr, h as Zn, onMounted as $r, onUnmounted as Wr, Text as Gr, createApp as xr } from "vue";
|
|
3
|
+
const Hr = /* @__PURE__ */ ge({
|
|
4
4
|
name: "MyButton",
|
|
5
5
|
__name: "MyButton",
|
|
6
6
|
emits: ["click"],
|
|
@@ -8,19 +8,19 @@ const Gr = /* @__PURE__ */ pe({
|
|
|
8
8
|
const n = t, r = () => {
|
|
9
9
|
n("click");
|
|
10
10
|
};
|
|
11
|
-
return (s, a) => (
|
|
11
|
+
return (s, a) => (Ee(), ve("button", {
|
|
12
12
|
class: "my-btn",
|
|
13
13
|
onClick: r
|
|
14
14
|
}, [
|
|
15
|
-
|
|
15
|
+
Kn(s.$slots, "default", {}, void 0, !0)
|
|
16
16
|
]));
|
|
17
17
|
}
|
|
18
|
-
}),
|
|
18
|
+
}), zn = (e, t) => {
|
|
19
19
|
const n = e.__vccOpts || e;
|
|
20
20
|
for (const [r, s] of t)
|
|
21
21
|
n[r] = s;
|
|
22
22
|
return n;
|
|
23
|
-
},
|
|
23
|
+
}, Yr = /* @__PURE__ */ zn(Hr, [["__scopeId", "data-v-c654f959"]]), Br = /* @__PURE__ */ ge({
|
|
24
24
|
name: "MyButton",
|
|
25
25
|
__name: "button2",
|
|
26
26
|
emits: ["click"],
|
|
@@ -28,48 +28,44 @@ const Gr = /* @__PURE__ */ pe({
|
|
|
28
28
|
const n = t, r = () => {
|
|
29
29
|
n("click");
|
|
30
30
|
};
|
|
31
|
-
return (s, a) => (
|
|
31
|
+
return (s, a) => (Ee(), ve("button", {
|
|
32
32
|
class: "my-btn",
|
|
33
33
|
onClick: r
|
|
34
34
|
}, [
|
|
35
|
-
|
|
35
|
+
Kn(s.$slots, "default", {}, void 0, !0)
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
39
|
-
|
|
38
|
+
}), Kr = /* @__PURE__ */ zn(Br, [["__scopeId", "data-v-1477cfc3"]]), jr = /* @__PURE__ */ ge({
|
|
39
|
+
__name: "Input",
|
|
40
40
|
props: {
|
|
41
|
-
modelValue:
|
|
41
|
+
modelValue: {}
|
|
42
42
|
},
|
|
43
43
|
emits: ["update:modelValue"],
|
|
44
44
|
setup(e, { emit: t }) {
|
|
45
|
-
const n = jn("UIComponents").Input;
|
|
46
|
-
return n
|
|
47
|
-
modelValue:
|
|
48
|
-
"onUpdate:modelValue": (
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
props: {
|
|
45
|
+
const n = e, r = t, s = jn("UIComponents").Input, a = Yt(n.modelValue);
|
|
46
|
+
return Ce(() => n.modelValue, (o) => a.value = o), Ce(a, (o) => r("update:modelValue", o)), (o, i) => (Ee(), Xn(Mr(Jn(s)), {
|
|
47
|
+
modelValue: a.value,
|
|
48
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => a.value = u)
|
|
49
|
+
}, null, 8, ["modelValue"]));
|
|
50
|
+
}
|
|
51
|
+
}), Xr = { style: { display: "flex", gap: "4px" } }, mi = /* @__PURE__ */ ge({
|
|
52
|
+
__name: "IpInput",
|
|
53
|
+
props: {
|
|
54
|
+
modelValue: {}
|
|
55
|
+
},
|
|
54
56
|
emits: ["update:modelValue"],
|
|
55
57
|
setup(e, { emit: t }) {
|
|
56
|
-
const n =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
key: a,
|
|
65
|
-
modelValue: s,
|
|
66
|
-
"onUpdate:modelValue": (o) => r(a, o)
|
|
67
|
-
})
|
|
68
|
-
)
|
|
69
|
-
);
|
|
58
|
+
const n = e, r = t, s = Yt((n.modelValue || "0.0.0.0").split("."));
|
|
59
|
+
return Ce(s, () => r("update:modelValue", s.value.join(".")), { deep: !0 }), Ce(() => n.modelValue, (a) => s.value = (a || "0.0.0.0").split(".")), (a, o) => (Ee(), ve("div", Xr, [
|
|
60
|
+
(Ee(!0), ve(at, null, Qn(s.value, (i, u) => (Ee(), Xn(jr, {
|
|
61
|
+
key: u,
|
|
62
|
+
modelValue: s.value[u],
|
|
63
|
+
"onUpdate:modelValue": (d) => s.value[u] = d
|
|
64
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
65
|
+
]));
|
|
70
66
|
}
|
|
71
67
|
});
|
|
72
|
-
function
|
|
68
|
+
function di(e, t) {
|
|
73
69
|
e.provide("UIComponents", t);
|
|
74
70
|
}
|
|
75
71
|
class re {
|
|
@@ -89,7 +85,7 @@ class re {
|
|
|
89
85
|
return n.fromPlain(t);
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
|
-
class
|
|
88
|
+
class Jr {
|
|
93
89
|
static getDefaultConfig(t) {
|
|
94
90
|
console.log(1231231, t);
|
|
95
91
|
const n = t.baseInfo, r = t.configuration, s = t.tab;
|
|
@@ -100,50 +96,50 @@ class Br {
|
|
|
100
96
|
};
|
|
101
97
|
}
|
|
102
98
|
}
|
|
103
|
-
const
|
|
104
|
-
type:
|
|
105
|
-
baseInfo:
|
|
106
|
-
tab:
|
|
107
|
-
configuration:
|
|
99
|
+
const Qr = "Ethernet", qr = [{ key: "name", name: { i18nKey: "name" }, defaultValue: "Ethernet" }, { key: "supplier", name: { i18nKey: "supplier" }, defaultValue: { i18nKey: "company" } }, { key: "version", name: { i18nKey: "verison" }, defaultValue: "1.0.0.0" }, { key: "description", name: { i18nKey: "description" }, defaultValue: { i18nKey: "descriptionMap.ethernet" } }, { key: "category", name: { i18nKey: "category" }, defaultValue: { i18nKey: "ethernet" } }], Zr = [{ name: { i18nKey: "general" }, key: "general" }, { name: { i18nKey: "ioMapping" }, key: "ioMapping" }], zr = { general: [{ key: "netInterface", name: { i18nKey: "netInterface" }, dataType: "string", componentType: "strInput", defaultValue: "" }, { key: "ipAddress", name: { i18nKey: "ipAddress" }, dataType: "string", componentType: "ipInput", defaultValue: "192.168.1.1" }, { key: "subnetMask", name: { i18nKey: "subnetMask" }, dataType: "string", componentType: "ipInput", defaultValue: "255.255.255.0" }, { key: "defaultGateway", name: { i18nKey: "defaultGateway" }, dataType: "string", componentType: "ipInput", defaultValue: "0.0.0.0" }, { key: "adaptedOSConfiguration", name: { i18nKey: "adaptedOSConfiguration" }, dataType: "boolean", componentType: "switch", defaultValue: !1 }], ioMapping: [{ key: "busCycleTask", name: { i18nKey: "busCycleTask" }, dataType: "string", componentType: "select", defaultValue: "-1" }] }, es = {
|
|
100
|
+
type: Qr,
|
|
101
|
+
baseInfo: qr,
|
|
102
|
+
tab: Zr,
|
|
103
|
+
configuration: zr
|
|
108
104
|
};
|
|
109
|
-
class
|
|
110
|
-
type =
|
|
111
|
-
moduleType =
|
|
105
|
+
class ot extends re {
|
|
106
|
+
type = pe.ETHERNET;
|
|
107
|
+
moduleType = lt[pe.ETHERNET];
|
|
112
108
|
baseInfo;
|
|
113
109
|
config;
|
|
114
110
|
tab;
|
|
115
111
|
constructor(t) {
|
|
116
112
|
super(t);
|
|
117
|
-
const { baseInfo: n, config: r, tab: s } =
|
|
113
|
+
const { baseInfo: n, config: r, tab: s } = Jr.getDefaultConfig(es);
|
|
118
114
|
this.baseInfo = n, this.config = r, this.tab = s;
|
|
119
115
|
}
|
|
120
116
|
static fromPlain(t) {
|
|
121
|
-
return new
|
|
117
|
+
return new ot(t);
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
|
-
class
|
|
125
|
-
type =
|
|
126
|
-
moduleType =
|
|
120
|
+
class Bt extends re {
|
|
121
|
+
type = pe.MODBUS_TCP_SERVER;
|
|
122
|
+
moduleType = lt[pe.MODBUS_TCP_SERVER];
|
|
127
123
|
constructor(t) {
|
|
128
124
|
super(t);
|
|
129
125
|
}
|
|
130
126
|
static fromPlain(t) {
|
|
131
|
-
return new
|
|
127
|
+
return new Bt(t);
|
|
132
128
|
}
|
|
133
129
|
}
|
|
134
|
-
class
|
|
135
|
-
type =
|
|
136
|
-
moduleType =
|
|
130
|
+
class Kt extends re {
|
|
131
|
+
type = pe.MODBUS_TCP_CLIENT;
|
|
132
|
+
moduleType = lt[pe.MODBUS_TCP_CLIENT];
|
|
137
133
|
constructor(t) {
|
|
138
134
|
super(t);
|
|
139
135
|
}
|
|
140
136
|
static fromPlain(t) {
|
|
141
|
-
return new
|
|
137
|
+
return new Kt(t);
|
|
142
138
|
}
|
|
143
139
|
}
|
|
144
140
|
class jt extends re {
|
|
145
|
-
type =
|
|
146
|
-
moduleType =
|
|
141
|
+
type = pe.MODBUS_TCP_SLAVE_DEVICE;
|
|
142
|
+
moduleType = lt[pe.MODBUS_TCP_SLAVE_DEVICE];
|
|
147
143
|
constructor(t) {
|
|
148
144
|
super(t);
|
|
149
145
|
}
|
|
@@ -151,8 +147,8 @@ class jt extends re {
|
|
|
151
147
|
return new jt(t);
|
|
152
148
|
}
|
|
153
149
|
}
|
|
154
|
-
var
|
|
155
|
-
const
|
|
150
|
+
var pe = /* @__PURE__ */ ((e) => (e.ETHERNET = "Ethernet", e.MODBUS_TCP_SERVER = "ModbusTCPServer", e.MODBUS_TCP_CLIENT = "ModbusTCPClient", e.MODBUS_TCP_SLAVE_DEVICE = "ModbusTCPSlaveDevice", e.MODBUS_SERIAL_PORT = "ModbusSerialPort", e.MODBUS_MASTER = "ModbusMaster", e.MODBUS_SLAVE = "ModbusSlave", e.MODBUS_SERIAL = "ModbusSerial", e.OPCUA_SERVER = "OPCUAServer", e.ETHER_CAT_MASTER = "EtherCatMaster", e.ETHER_CAT_SLAVE = "EtherCatSlave", e.ETHER_CAT_MODULE = "EtherCatModule", e))(pe || {});
|
|
151
|
+
const lt = {
|
|
156
152
|
Pprogrammable: 4096,
|
|
157
153
|
// 根节点
|
|
158
154
|
Protgrammable_Safety: 4098,
|
|
@@ -206,10 +202,10 @@ const ot = {
|
|
|
206
202
|
EtherCatModule: 16384
|
|
207
203
|
// Ethercat子模块
|
|
208
204
|
};
|
|
209
|
-
class
|
|
205
|
+
class ts {
|
|
210
206
|
map = /* @__PURE__ */ new Map();
|
|
211
207
|
constructor() {
|
|
212
|
-
re.register("Ethernet",
|
|
208
|
+
re.register("Ethernet", ot), re.register("ModbusTCPServer", Bt), re.register("ModbusTCPClient", Kt), re.register("ModbusTCPSlaveDevice", jt);
|
|
213
209
|
}
|
|
214
210
|
init(t) {
|
|
215
211
|
this.clear(), t.forEach((n) => {
|
|
@@ -236,27 +232,27 @@ class Zr {
|
|
|
236
232
|
this.map.clear();
|
|
237
233
|
}
|
|
238
234
|
}
|
|
239
|
-
const
|
|
235
|
+
const ns = /* @__PURE__ */ ge({
|
|
240
236
|
__name: "Ethernet",
|
|
241
237
|
props: {
|
|
242
238
|
config: {}
|
|
243
239
|
},
|
|
244
240
|
setup(e) {
|
|
245
|
-
return (t, n) => (
|
|
241
|
+
return (t, n) => (Ee(!0), ve(at, null, Qn(e.config.tab, (r) => (Ee(), ve("div", {
|
|
246
242
|
key: r.key
|
|
247
|
-
},
|
|
243
|
+
}, Fr(t.$t(r.name.i18nKey)), 1))), 128));
|
|
248
244
|
}
|
|
249
|
-
}),
|
|
245
|
+
}), rs = /* @__PURE__ */ ge({
|
|
250
246
|
__name: "App",
|
|
251
247
|
setup(e) {
|
|
252
|
-
new
|
|
253
|
-
const t = new
|
|
248
|
+
new ts();
|
|
249
|
+
const t = new ot({
|
|
254
250
|
id: 1,
|
|
255
251
|
deviceId: 1,
|
|
256
252
|
type: "Ethernet"
|
|
257
253
|
});
|
|
258
|
-
return (n, r) => (
|
|
259
|
-
|
|
254
|
+
return (n, r) => (Ee(), ve("div", null, [
|
|
255
|
+
qn(ns, { config: Jn(t) }, null, 8, ["config"])
|
|
260
256
|
]));
|
|
261
257
|
}
|
|
262
258
|
});
|
|
@@ -268,30 +264,30 @@ function Xt(e) {
|
|
|
268
264
|
un[e] || (un[e] = !0, ue(e));
|
|
269
265
|
}
|
|
270
266
|
const le = typeof window < "u";
|
|
271
|
-
let ee,
|
|
267
|
+
let ee, Ae;
|
|
272
268
|
if (process.env.NODE_ENV !== "production") {
|
|
273
269
|
const e = le && window.performance;
|
|
274
270
|
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
275
271
|
e.clearMeasures && (ee = (t) => {
|
|
276
272
|
e.mark(t);
|
|
277
|
-
},
|
|
273
|
+
}, Ae = (t, n, r) => {
|
|
278
274
|
e.measure(t, n, r), e.clearMarks(n), e.clearMarks(r);
|
|
279
275
|
});
|
|
280
276
|
}
|
|
281
|
-
const
|
|
282
|
-
function
|
|
283
|
-
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(
|
|
277
|
+
const ss = /\{([0-9a-zA-Z]+)\}/g;
|
|
278
|
+
function it(e, ...t) {
|
|
279
|
+
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(ss, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
|
|
284
280
|
}
|
|
285
|
-
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e),
|
|
281
|
+
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), as = (e, t, n) => os({ l: e, k: t, s: n }), os = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), ls = (e) => Jt(e) === "[object Date]", Fe = (e) => Jt(e) === "[object RegExp]", ct = (e) => R(e) && Object.keys(e).length === 0, J = Object.assign, is = Object.create, $ = (e = null) => is(e);
|
|
286
282
|
let fn;
|
|
287
|
-
const
|
|
283
|
+
const Oe = () => fn || (fn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : $());
|
|
288
284
|
function _n(e) {
|
|
289
285
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "=");
|
|
290
286
|
}
|
|
291
287
|
function mn(e) {
|
|
292
288
|
return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
293
289
|
}
|
|
294
|
-
function
|
|
290
|
+
function cs(e) {
|
|
295
291
|
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (r, s, a) => `${s}="${mn(a)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (r, s, a) => `${s}='${mn(a)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && ue("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")), [
|
|
296
292
|
// In href, src, action, formaction attributes
|
|
297
293
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
|
@@ -301,16 +297,16 @@ function os(e) {
|
|
|
301
297
|
e = e.replace(r, "$1javascript:");
|
|
302
298
|
}), e;
|
|
303
299
|
}
|
|
304
|
-
const
|
|
300
|
+
const us = Object.prototype.hasOwnProperty;
|
|
305
301
|
function oe(e, t) {
|
|
306
|
-
return
|
|
302
|
+
return us.call(e, t);
|
|
307
303
|
}
|
|
308
|
-
const H = Array.isArray, W = (e) => typeof e == "function", L = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object",
|
|
304
|
+
const H = Array.isArray, W = (e) => typeof e == "function", L = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", fs = (e) => M(e) && W(e.then) && W(e.catch), er = Object.prototype.toString, Jt = (e) => er.call(e), R = (e) => Jt(e) === "[object Object]", _s = (e) => e == null ? "" : H(e) || R(e) && e.toString === er ? JSON.stringify(e, null, 2) : String(e);
|
|
309
305
|
function Qt(e, t = "") {
|
|
310
306
|
return e.reduce((n, r, s) => s === 0 ? n + r : n + t + r, "");
|
|
311
307
|
}
|
|
312
308
|
const dn = 2;
|
|
313
|
-
function
|
|
309
|
+
function ms(e, t = 0, n = e.length) {
|
|
314
310
|
const r = e.split(/\r?\n/);
|
|
315
311
|
let s = 0;
|
|
316
312
|
const a = [];
|
|
@@ -321,16 +317,16 @@ function us(e, t = 0, n = e.length) {
|
|
|
321
317
|
continue;
|
|
322
318
|
const u = i + 1;
|
|
323
319
|
a.push(`${u}${" ".repeat(3 - String(u).length)}| ${r[i]}`);
|
|
324
|
-
const
|
|
320
|
+
const d = r[i].length;
|
|
325
321
|
if (i === o) {
|
|
326
|
-
const I = t - (s -
|
|
322
|
+
const I = t - (s - d) + 1, b = Math.max(1, n > s ? d - I : n - t);
|
|
327
323
|
a.push(" | " + " ".repeat(I) + "^".repeat(b));
|
|
328
324
|
} else if (i > o) {
|
|
329
325
|
if (n > s) {
|
|
330
|
-
const I = Math.max(Math.min(n - s,
|
|
326
|
+
const I = Math.max(Math.min(n - s, d), 1);
|
|
331
327
|
a.push(" | " + "^".repeat(I));
|
|
332
328
|
}
|
|
333
|
-
s +=
|
|
329
|
+
s += d + 1;
|
|
334
330
|
}
|
|
335
331
|
}
|
|
336
332
|
break;
|
|
@@ -367,7 +363,7 @@ function rt(e, t) {
|
|
|
367
363
|
});
|
|
368
364
|
}
|
|
369
365
|
}
|
|
370
|
-
function
|
|
366
|
+
function ds(e, t, n) {
|
|
371
367
|
return { line: e, column: t, offset: n };
|
|
372
368
|
}
|
|
373
369
|
function kt(e, t, n) {
|
|
@@ -394,7 +390,7 @@ const P = {
|
|
|
394
390
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
395
391
|
// minifier error codes
|
|
396
392
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
397
|
-
},
|
|
393
|
+
}, Es = 17, ps = {
|
|
398
394
|
// tokenizer error messages
|
|
399
395
|
[P.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
400
396
|
[P.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
@@ -416,26 +412,26 @@ const P = {
|
|
|
416
412
|
// minimizer error messages
|
|
417
413
|
[P.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
418
414
|
};
|
|
419
|
-
function
|
|
420
|
-
const { domain: r, messages: s, args: a } = n, o = process.env.NODE_ENV !== "production" ?
|
|
415
|
+
function Ve(e, t, n = {}) {
|
|
416
|
+
const { domain: r, messages: s, args: a } = n, o = process.env.NODE_ENV !== "production" ? it((s || ps)[e] || "", ...a || []) : e, i = new SyntaxError(String(o));
|
|
421
417
|
return i.code = e, t && (i.location = t), i.domain = r, i;
|
|
422
418
|
}
|
|
423
|
-
function
|
|
419
|
+
function gs(e) {
|
|
424
420
|
throw e;
|
|
425
421
|
}
|
|
426
|
-
const
|
|
427
|
-
`,
|
|
428
|
-
function
|
|
422
|
+
const Ns = /<\/?[\w\s="/.':;#-\/]+>/, Ts = (e) => Ns.test(e), ie = " ", bs = "\r", Q = `
|
|
423
|
+
`, hs = "\u2028", Is = "\u2029";
|
|
424
|
+
function Ls(e) {
|
|
429
425
|
const t = e;
|
|
430
426
|
let n = 0, r = 1, s = 1, a = 0;
|
|
431
|
-
const o = (p) => t[p] ===
|
|
427
|
+
const o = (p) => t[p] === bs && t[p + 1] === Q, i = (p) => t[p] === Q, u = (p) => t[p] === Is, d = (p) => t[p] === hs, I = (p) => o(p) || i(p) || u(p) || d(p), b = () => n, N = () => r, A = () => s, D = () => a, C = (p) => o(p) || u(p) || d(p) ? Q : t[p], S = () => C(n), f = () => C(n + a);
|
|
432
428
|
function m() {
|
|
433
429
|
return a = 0, I(n) && (r++, s = 0), o(n) && n++, n++, s++, t[n];
|
|
434
430
|
}
|
|
435
431
|
function h() {
|
|
436
432
|
return o(n + a) && a++, a++, t[n + a];
|
|
437
433
|
}
|
|
438
|
-
function
|
|
434
|
+
function E() {
|
|
439
435
|
n = 0, r = 1, s = 1, a = 0;
|
|
440
436
|
}
|
|
441
437
|
function O(p = 0) {
|
|
@@ -457,14 +453,14 @@ function bs(e) {
|
|
|
457
453
|
currentPeek: f,
|
|
458
454
|
next: m,
|
|
459
455
|
peek: h,
|
|
460
|
-
reset:
|
|
456
|
+
reset: E,
|
|
461
457
|
resetPeek: O,
|
|
462
458
|
skipToPeek: v
|
|
463
459
|
};
|
|
464
460
|
}
|
|
465
|
-
const me = void 0,
|
|
466
|
-
function
|
|
467
|
-
const n = t.location !== !1, r =
|
|
461
|
+
const me = void 0, Os = ".", En = "'", vs = "tokenizer";
|
|
462
|
+
function Cs(e, t = {}) {
|
|
463
|
+
const n = t.location !== !1, r = Ls(e), s = () => r.index(), a = () => ds(r.line(), r.column(), r.index()), o = a(), i = s(), u = {
|
|
468
464
|
currentType: 13,
|
|
469
465
|
offset: i,
|
|
470
466
|
startLoc: o,
|
|
@@ -476,12 +472,12 @@ function Ls(e, t = {}) {
|
|
|
476
472
|
braceNest: 0,
|
|
477
473
|
inLinked: !1,
|
|
478
474
|
text: ""
|
|
479
|
-
},
|
|
475
|
+
}, d = () => u, { onError: I } = t;
|
|
480
476
|
function b(l, c, g, ...y) {
|
|
481
|
-
const x =
|
|
477
|
+
const x = d();
|
|
482
478
|
if (c.column += g, c.offset += g, I) {
|
|
483
|
-
const
|
|
484
|
-
domain:
|
|
479
|
+
const B = n ? kt(x.startLoc, c) : null, U = Ve(l, B, {
|
|
480
|
+
domain: vs,
|
|
485
481
|
args: y
|
|
486
482
|
});
|
|
487
483
|
I(U);
|
|
@@ -532,7 +528,7 @@ function Ls(e, t = {}) {
|
|
|
532
528
|
const y = f(l.currentPeek());
|
|
533
529
|
return l.resetPeek(), y;
|
|
534
530
|
}
|
|
535
|
-
function
|
|
531
|
+
function E(l, c) {
|
|
536
532
|
const { currentType: g } = c;
|
|
537
533
|
if (g !== 2)
|
|
538
534
|
return !1;
|
|
@@ -577,8 +573,8 @@ function Ls(e, t = {}) {
|
|
|
577
573
|
if (g !== 9)
|
|
578
574
|
return !1;
|
|
579
575
|
const y = () => {
|
|
580
|
-
const
|
|
581
|
-
return
|
|
576
|
+
const B = l.currentPeek();
|
|
577
|
+
return B === "{" ? f(l.peek()) : B === "@" || B === "|" || B === ":" || B === "." || B === ie || !B ? !1 : B === Q ? (l.peek(), y()) : ae(l, !1);
|
|
582
578
|
}, x = y();
|
|
583
579
|
return l.resetPeek(), x;
|
|
584
580
|
}
|
|
@@ -588,9 +584,9 @@ function Ls(e, t = {}) {
|
|
|
588
584
|
return l.resetPeek(), c;
|
|
589
585
|
}
|
|
590
586
|
function ae(l, c = !0) {
|
|
591
|
-
const g = (x = !1,
|
|
587
|
+
const g = (x = !1, B = "") => {
|
|
592
588
|
const U = l.currentPeek();
|
|
593
|
-
return U === "{" || U === "@" || !U ? x : U === "|" ? !(
|
|
589
|
+
return U === "{" || U === "@" || !U ? x : U === "|" ? !(B === ie || B === Q) : U === ie ? (l.peek(), g(!0, ie)) : U === Q ? (l.peek(), g(!0, Q)) : !0;
|
|
594
590
|
}, y = g();
|
|
595
591
|
return c && l.resetPeek(), y;
|
|
596
592
|
}
|
|
@@ -598,7 +594,7 @@ function Ls(e, t = {}) {
|
|
|
598
594
|
const g = l.currentChar();
|
|
599
595
|
return g === me ? me : c(g) ? (l.next(), g) : null;
|
|
600
596
|
}
|
|
601
|
-
function
|
|
597
|
+
function Pe(l) {
|
|
602
598
|
const c = l.charCodeAt(0);
|
|
603
599
|
return c >= 97 && c <= 122 || // a-z
|
|
604
600
|
c >= 65 && c <= 90 || // A-Z
|
|
@@ -606,10 +602,10 @@ function Ls(e, t = {}) {
|
|
|
606
602
|
c === 95 || // _
|
|
607
603
|
c === 36;
|
|
608
604
|
}
|
|
609
|
-
function ft(l) {
|
|
610
|
-
return Y(l, Ae);
|
|
611
|
-
}
|
|
612
605
|
function _t(l) {
|
|
606
|
+
return Y(l, Pe);
|
|
607
|
+
}
|
|
608
|
+
function mt(l) {
|
|
613
609
|
const c = l.charCodeAt(0);
|
|
614
610
|
return c >= 97 && c <= 122 || // a-z
|
|
615
611
|
c >= 65 && c <= 90 || // A-Z
|
|
@@ -618,32 +614,32 @@ function Ls(e, t = {}) {
|
|
|
618
614
|
c === 36 || // $
|
|
619
615
|
c === 45;
|
|
620
616
|
}
|
|
621
|
-
function mt(l) {
|
|
622
|
-
return Y(l, _t);
|
|
623
|
-
}
|
|
624
617
|
function dt(l) {
|
|
625
|
-
|
|
626
|
-
return c >= 48 && c <= 57;
|
|
618
|
+
return Y(l, mt);
|
|
627
619
|
}
|
|
628
620
|
function Et(l) {
|
|
629
|
-
|
|
621
|
+
const c = l.charCodeAt(0);
|
|
622
|
+
return c >= 48 && c <= 57;
|
|
630
623
|
}
|
|
631
624
|
function pt(l) {
|
|
625
|
+
return Y(l, Et);
|
|
626
|
+
}
|
|
627
|
+
function gt(l) {
|
|
632
628
|
const c = l.charCodeAt(0);
|
|
633
629
|
return c >= 48 && c <= 57 || // 0-9
|
|
634
630
|
c >= 65 && c <= 70 || // A-F
|
|
635
631
|
c >= 97 && c <= 102;
|
|
636
632
|
}
|
|
637
633
|
function _e(l) {
|
|
638
|
-
return Y(l,
|
|
634
|
+
return Y(l, gt);
|
|
639
635
|
}
|
|
640
|
-
function
|
|
636
|
+
function $e(l) {
|
|
641
637
|
let c = "", g = "";
|
|
642
|
-
for (; c =
|
|
638
|
+
for (; c = pt(l); )
|
|
643
639
|
g += c;
|
|
644
640
|
return g;
|
|
645
641
|
}
|
|
646
|
-
function
|
|
642
|
+
function Nt(l) {
|
|
647
643
|
let c = "";
|
|
648
644
|
for (; ; ) {
|
|
649
645
|
const g = l.currentChar();
|
|
@@ -662,10 +658,10 @@ function Ls(e, t = {}) {
|
|
|
662
658
|
}
|
|
663
659
|
return c;
|
|
664
660
|
}
|
|
665
|
-
function
|
|
661
|
+
function Tt(l) {
|
|
666
662
|
S(l);
|
|
667
663
|
let c = "", g = "";
|
|
668
|
-
for (; c =
|
|
664
|
+
for (; c = dt(l); )
|
|
669
665
|
g += c;
|
|
670
666
|
const y = l.currentChar();
|
|
671
667
|
if (y && y !== "}" && y !== me && y !== ie && y !== Q && y !== " ") {
|
|
@@ -674,23 +670,23 @@ function Ls(e, t = {}) {
|
|
|
674
670
|
}
|
|
675
671
|
return l.currentChar() === me && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g;
|
|
676
672
|
}
|
|
677
|
-
function
|
|
673
|
+
function bt(l) {
|
|
678
674
|
S(l);
|
|
679
675
|
let c = "";
|
|
680
|
-
return l.currentChar() === "-" ? (l.next(), c += `-${
|
|
676
|
+
return l.currentChar() === "-" ? (l.next(), c += `-${$e(l)}`) : c += $e(l), l.currentChar() === me && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c;
|
|
681
677
|
}
|
|
682
|
-
function
|
|
678
|
+
function ht(l) {
|
|
683
679
|
return l !== En && l !== Q;
|
|
684
680
|
}
|
|
685
681
|
function ln(l) {
|
|
686
682
|
S(l), D(l, "'");
|
|
687
683
|
let c = "", g = "";
|
|
688
|
-
for (; c = Y(l,
|
|
689
|
-
c === "\\" ? g +=
|
|
684
|
+
for (; c = Y(l, ht); )
|
|
685
|
+
c === "\\" ? g += It(l) : g += c;
|
|
690
686
|
const y = l.currentChar();
|
|
691
687
|
return y === Q || y === me ? (b(P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), y === Q && (l.next(), D(l, "'")), g) : (D(l, "'"), g);
|
|
692
688
|
}
|
|
693
|
-
function
|
|
689
|
+
function It(l) {
|
|
694
690
|
const c = l.currentChar();
|
|
695
691
|
switch (c) {
|
|
696
692
|
case "\\":
|
|
@@ -708,39 +704,39 @@ function Ls(e, t = {}) {
|
|
|
708
704
|
D(l, c);
|
|
709
705
|
let y = "";
|
|
710
706
|
for (let x = 0; x < g; x++) {
|
|
711
|
-
const
|
|
712
|
-
if (!
|
|
707
|
+
const B = _e(l);
|
|
708
|
+
if (!B) {
|
|
713
709
|
b(P.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${c}${y}${l.currentChar()}`);
|
|
714
710
|
break;
|
|
715
711
|
}
|
|
716
|
-
y +=
|
|
712
|
+
y += B;
|
|
717
713
|
}
|
|
718
714
|
return `\\${c}${y}`;
|
|
719
715
|
}
|
|
720
|
-
function
|
|
716
|
+
function Lt(l) {
|
|
721
717
|
return l !== "{" && l !== "}" && l !== ie && l !== Q;
|
|
722
718
|
}
|
|
723
719
|
function Ze(l) {
|
|
724
720
|
S(l);
|
|
725
721
|
let c = "", g = "";
|
|
726
|
-
for (; c = Y(l,
|
|
722
|
+
for (; c = Y(l, Lt); )
|
|
727
723
|
g += c;
|
|
728
724
|
return g;
|
|
729
725
|
}
|
|
730
|
-
function
|
|
726
|
+
function Ot(l) {
|
|
731
727
|
let c = "", g = "";
|
|
732
|
-
for (; c =
|
|
728
|
+
for (; c = _t(l); )
|
|
733
729
|
g += c;
|
|
734
730
|
return g;
|
|
735
731
|
}
|
|
736
|
-
function
|
|
732
|
+
function vt(l) {
|
|
737
733
|
const c = (g) => {
|
|
738
734
|
const y = l.currentChar();
|
|
739
735
|
return y === "{" || y === "@" || y === "|" || y === "(" || y === ")" || !y || y === ie ? g : (g += y, l.next(), c(g));
|
|
740
736
|
};
|
|
741
737
|
return c("");
|
|
742
738
|
}
|
|
743
|
-
function
|
|
739
|
+
function We(l) {
|
|
744
740
|
S(l);
|
|
745
741
|
const c = D(
|
|
746
742
|
l,
|
|
@@ -749,7 +745,7 @@ function Ls(e, t = {}) {
|
|
|
749
745
|
);
|
|
750
746
|
return S(l), c;
|
|
751
747
|
}
|
|
752
|
-
function
|
|
748
|
+
function Ge(l, c) {
|
|
753
749
|
let g = null;
|
|
754
750
|
switch (l.currentChar()) {
|
|
755
751
|
case "{":
|
|
@@ -767,27 +763,27 @@ function Ls(e, t = {}) {
|
|
|
767
763
|
/* TokenChars.BraceRight */
|
|
768
764
|
), c.braceNest--, c.braceNest > 0 && S(l), c.inLinked && c.braceNest === 0 && (c.inLinked = !1), g;
|
|
769
765
|
case "@":
|
|
770
|
-
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g =
|
|
766
|
+
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = be(l, c) || A(c), c.braceNest = 0, g;
|
|
771
767
|
default: {
|
|
772
|
-
let x = !0,
|
|
768
|
+
let x = !0, B = !0, U = !0;
|
|
773
769
|
if (X(l))
|
|
774
|
-
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = N(c, 1,
|
|
770
|
+
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
775
771
|
if (c.braceNest > 0 && (c.currentType === 4 || c.currentType === 5 || c.currentType === 6))
|
|
776
|
-
return b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c.braceNest = 0,
|
|
772
|
+
return b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c.braceNest = 0, xe(l, c);
|
|
777
773
|
if (x = h(l, c))
|
|
778
|
-
return g = N(c, 4,
|
|
779
|
-
if (
|
|
780
|
-
return g = N(c, 5,
|
|
774
|
+
return g = N(c, 4, Tt(l)), S(l), g;
|
|
775
|
+
if (B = E(l, c))
|
|
776
|
+
return g = N(c, 5, bt(l)), S(l), g;
|
|
781
777
|
if (U = O(l, c))
|
|
782
778
|
return g = N(c, 6, ln(l)), S(l), g;
|
|
783
|
-
if (!x && !
|
|
779
|
+
if (!x && !B && !U)
|
|
784
780
|
return g = N(c, 12, Ze(l)), b(P.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, g.value), S(l), g;
|
|
785
781
|
break;
|
|
786
782
|
}
|
|
787
783
|
}
|
|
788
784
|
return g;
|
|
789
785
|
}
|
|
790
|
-
function
|
|
786
|
+
function be(l, c) {
|
|
791
787
|
const { currentType: g } = c;
|
|
792
788
|
let y = null;
|
|
793
789
|
const x = l.currentChar();
|
|
@@ -814,21 +810,21 @@ function Ls(e, t = {}) {
|
|
|
814
810
|
/* TokenChars.LinkedDelimiter */
|
|
815
811
|
);
|
|
816
812
|
default:
|
|
817
|
-
return X(l) ? (y = N(c, 1,
|
|
813
|
+
return X(l) ? (y = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, y) : v(l, c) || k(l, c) ? (S(l), be(l, c)) : p(l, c) ? (S(l), N(c, 11, Ot(l))) : w(l, c) ? (S(l), x === "{" ? Ge(l, c) || y : N(c, 10, vt(l))) : (g === 7 && b(P.INVALID_LINKED_FORMAT, a(), 0), c.braceNest = 0, c.inLinked = !1, xe(l, c));
|
|
818
814
|
}
|
|
819
815
|
}
|
|
820
|
-
function
|
|
816
|
+
function xe(l, c) {
|
|
821
817
|
let g = {
|
|
822
818
|
type: 13
|
|
823
819
|
/* TokenTypes.EOF */
|
|
824
820
|
};
|
|
825
821
|
if (c.braceNest > 0)
|
|
826
|
-
return
|
|
822
|
+
return Ge(l, c) || A(c);
|
|
827
823
|
if (c.inLinked)
|
|
828
|
-
return
|
|
824
|
+
return be(l, c) || A(c);
|
|
829
825
|
switch (l.currentChar()) {
|
|
830
826
|
case "{":
|
|
831
|
-
return
|
|
827
|
+
return Ge(l, c) || A(c);
|
|
832
828
|
case "}":
|
|
833
829
|
return b(P.UNBALANCED_CLOSING_BRACE, a(), 0), l.next(), N(
|
|
834
830
|
c,
|
|
@@ -837,34 +833,34 @@ function Ls(e, t = {}) {
|
|
|
837
833
|
/* TokenChars.BraceRight */
|
|
838
834
|
);
|
|
839
835
|
case "@":
|
|
840
|
-
return
|
|
836
|
+
return be(l, c) || A(c);
|
|
841
837
|
default: {
|
|
842
838
|
if (X(l))
|
|
843
|
-
return g = N(c, 1,
|
|
839
|
+
return g = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
844
840
|
if (ae(l))
|
|
845
|
-
return N(c, 0,
|
|
841
|
+
return N(c, 0, Nt(l));
|
|
846
842
|
break;
|
|
847
843
|
}
|
|
848
844
|
}
|
|
849
845
|
return g;
|
|
850
846
|
}
|
|
851
|
-
function
|
|
847
|
+
function Ct() {
|
|
852
848
|
const { currentType: l, offset: c, startLoc: g, endLoc: y } = u;
|
|
853
849
|
return u.lastType = l, u.lastOffset = c, u.lastStartLoc = g, u.lastEndLoc = y, u.offset = s(), u.startLoc = a(), r.currentChar() === me ? N(
|
|
854
850
|
u,
|
|
855
851
|
13
|
|
856
852
|
/* TokenTypes.EOF */
|
|
857
|
-
) :
|
|
853
|
+
) : xe(r, u);
|
|
858
854
|
}
|
|
859
855
|
return {
|
|
860
|
-
nextToken:
|
|
856
|
+
nextToken: Ct,
|
|
861
857
|
currentOffset: s,
|
|
862
858
|
currentPosition: a,
|
|
863
|
-
context:
|
|
859
|
+
context: d
|
|
864
860
|
};
|
|
865
861
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
862
|
+
const As = "parser", Ss = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
863
|
+
function ys(e, t, n) {
|
|
868
864
|
switch (e) {
|
|
869
865
|
case "\\\\":
|
|
870
866
|
return "\\";
|
|
@@ -877,44 +873,44 @@ function Cs(e, t, n) {
|
|
|
877
873
|
}
|
|
878
874
|
}
|
|
879
875
|
}
|
|
880
|
-
function
|
|
876
|
+
function Ps(e = {}) {
|
|
881
877
|
const t = e.location !== !1, { onError: n } = e;
|
|
882
|
-
function r(f, m, h,
|
|
878
|
+
function r(f, m, h, E, ...O) {
|
|
883
879
|
const v = f.currentPosition();
|
|
884
|
-
if (v.offset +=
|
|
885
|
-
const p = t ? kt(h, v) : null, k =
|
|
886
|
-
domain:
|
|
880
|
+
if (v.offset += E, v.column += E, n) {
|
|
881
|
+
const p = t ? kt(h, v) : null, k = Ve(m, p, {
|
|
882
|
+
domain: As,
|
|
887
883
|
args: O
|
|
888
884
|
});
|
|
889
885
|
n(k);
|
|
890
886
|
}
|
|
891
887
|
}
|
|
892
888
|
function s(f, m, h) {
|
|
893
|
-
const
|
|
894
|
-
return t && (
|
|
889
|
+
const E = { type: f };
|
|
890
|
+
return t && (E.start = m, E.end = m, E.loc = { start: h, end: h }), E;
|
|
895
891
|
}
|
|
896
|
-
function a(f, m, h,
|
|
892
|
+
function a(f, m, h, E) {
|
|
897
893
|
t && (f.end = m, f.loc && (f.loc.end = h));
|
|
898
894
|
}
|
|
899
895
|
function o(f, m) {
|
|
900
|
-
const h = f.context(),
|
|
901
|
-
return
|
|
896
|
+
const h = f.context(), E = s(3, h.offset, h.startLoc);
|
|
897
|
+
return E.value = m, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
902
898
|
}
|
|
903
899
|
function i(f, m) {
|
|
904
|
-
const h = f.context(), { lastOffset:
|
|
900
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(5, E, O);
|
|
905
901
|
return v.index = parseInt(m, 10), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
906
902
|
}
|
|
907
903
|
function u(f, m) {
|
|
908
|
-
const h = f.context(), { lastOffset:
|
|
904
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(4, E, O);
|
|
909
905
|
return v.key = m, f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
910
906
|
}
|
|
911
|
-
function
|
|
912
|
-
const h = f.context(), { lastOffset:
|
|
913
|
-
return v.value = m.replace(
|
|
907
|
+
function d(f, m) {
|
|
908
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(9, E, O);
|
|
909
|
+
return v.value = m.replace(Ss, ys), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
914
910
|
}
|
|
915
911
|
function I(f) {
|
|
916
|
-
const m = f.nextToken(), h = f.context(), { lastOffset:
|
|
917
|
-
return m.type !== 11 ? (r(f, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), v.value = "", a(v,
|
|
912
|
+
const m = f.nextToken(), h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(8, E, O);
|
|
913
|
+
return m.type !== 11 ? (r(f, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), v.value = "", a(v, E, O), {
|
|
918
914
|
nextConsumeToken: m,
|
|
919
915
|
node: v
|
|
920
916
|
}) : (m.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ce(m)), v.value = m.value || "", a(v, f.currentOffset(), f.currentPosition()), {
|
|
@@ -922,34 +918,34 @@ function As(e = {}) {
|
|
|
922
918
|
});
|
|
923
919
|
}
|
|
924
920
|
function b(f, m) {
|
|
925
|
-
const h = f.context(),
|
|
926
|
-
return
|
|
921
|
+
const h = f.context(), E = s(7, h.offset, h.startLoc);
|
|
922
|
+
return E.value = m, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
927
923
|
}
|
|
928
924
|
function N(f) {
|
|
929
925
|
const m = f.context(), h = s(6, m.offset, m.startLoc);
|
|
930
|
-
let
|
|
931
|
-
if (
|
|
926
|
+
let E = f.nextToken();
|
|
927
|
+
if (E.type === 8) {
|
|
932
928
|
const O = I(f);
|
|
933
|
-
h.modifier = O.node,
|
|
929
|
+
h.modifier = O.node, E = O.nextConsumeToken || f.nextToken();
|
|
934
930
|
}
|
|
935
|
-
switch (
|
|
931
|
+
switch (E.type !== 9 && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), E = f.nextToken(), E.type === 2 && (E = f.nextToken()), E.type) {
|
|
936
932
|
case 10:
|
|
937
|
-
|
|
933
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = b(f, E.value || "");
|
|
938
934
|
break;
|
|
939
935
|
case 4:
|
|
940
|
-
|
|
936
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = u(f, E.value || "");
|
|
941
937
|
break;
|
|
942
938
|
case 5:
|
|
943
|
-
|
|
939
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = i(f, E.value || "");
|
|
944
940
|
break;
|
|
945
941
|
case 6:
|
|
946
|
-
|
|
942
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = d(f, E.value || "");
|
|
947
943
|
break;
|
|
948
944
|
default: {
|
|
949
945
|
r(f, P.UNEXPECTED_EMPTY_LINKED_KEY, m.lastStartLoc, 0);
|
|
950
946
|
const O = f.context(), v = s(7, O.offset, O.startLoc);
|
|
951
947
|
return v.value = "", a(v, O.offset, O.startLoc), h.key = v, a(h, O.offset, O.startLoc), {
|
|
952
|
-
nextConsumeToken:
|
|
948
|
+
nextConsumeToken: E,
|
|
953
949
|
node: h
|
|
954
950
|
};
|
|
955
951
|
}
|
|
@@ -959,7 +955,7 @@ function As(e = {}) {
|
|
|
959
955
|
};
|
|
960
956
|
}
|
|
961
957
|
function A(f) {
|
|
962
|
-
const m = f.context(), h = m.currentType === 1 ? f.currentOffset() : m.offset,
|
|
958
|
+
const m = f.context(), h = m.currentType === 1 ? f.currentOffset() : m.offset, E = m.currentType === 1 ? m.endLoc : m.startLoc, O = s(2, h, E);
|
|
963
959
|
O.items = [];
|
|
964
960
|
let v = null;
|
|
965
961
|
do {
|
|
@@ -975,7 +971,7 @@ function As(e = {}) {
|
|
|
975
971
|
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(u(f, w.value || ""));
|
|
976
972
|
break;
|
|
977
973
|
case 6:
|
|
978
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(
|
|
974
|
+
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(d(f, w.value || ""));
|
|
979
975
|
break;
|
|
980
976
|
case 7: {
|
|
981
977
|
const X = N(f);
|
|
@@ -987,11 +983,11 @@ function As(e = {}) {
|
|
|
987
983
|
const p = m.currentType === 1 ? m.lastOffset : f.currentOffset(), k = m.currentType === 1 ? m.lastEndLoc : f.currentPosition();
|
|
988
984
|
return a(O, p, k), O;
|
|
989
985
|
}
|
|
990
|
-
function D(f, m, h,
|
|
986
|
+
function D(f, m, h, E) {
|
|
991
987
|
const O = f.context();
|
|
992
|
-
let v =
|
|
988
|
+
let v = E.items.length === 0;
|
|
993
989
|
const p = s(1, m, h);
|
|
994
|
-
p.cases = [], p.cases.push(
|
|
990
|
+
p.cases = [], p.cases.push(E);
|
|
995
991
|
do {
|
|
996
992
|
const k = A(f);
|
|
997
993
|
v || (v = k.items.length === 0), p.cases.push(k);
|
|
@@ -999,12 +995,12 @@ function As(e = {}) {
|
|
|
999
995
|
return v && r(f, P.MUST_HAVE_MESSAGES_IN_PLURAL, h, 0), a(p, f.currentOffset(), f.currentPosition()), p;
|
|
1000
996
|
}
|
|
1001
997
|
function C(f) {
|
|
1002
|
-
const m = f.context(), { offset: h, startLoc:
|
|
1003
|
-
return m.currentType === 13 ? O : D(f, h,
|
|
998
|
+
const m = f.context(), { offset: h, startLoc: E } = m, O = A(f);
|
|
999
|
+
return m.currentType === 13 ? O : D(f, h, E, O);
|
|
1004
1000
|
}
|
|
1005
1001
|
function S(f) {
|
|
1006
|
-
const m =
|
|
1007
|
-
return t &&
|
|
1002
|
+
const m = Cs(f, J({}, e)), h = m.context(), E = s(0, h.offset, h.startLoc);
|
|
1003
|
+
return t && E.loc && (E.loc.source = f), E.body = C(m), e.onCacheKey && (E.cacheKey = e.onCacheKey(f)), h.currentType !== 13 && r(m, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, f[h.offset] || ""), a(E, m.currentOffset(), m.currentPosition()), E;
|
|
1008
1004
|
}
|
|
1009
1005
|
return { parse: S };
|
|
1010
1006
|
}
|
|
@@ -1014,7 +1010,7 @@ function ce(e) {
|
|
|
1014
1010
|
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
1015
1011
|
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
1016
1012
|
}
|
|
1017
|
-
function
|
|
1013
|
+
function Ds(e, t = {}) {
|
|
1018
1014
|
const n = {
|
|
1019
1015
|
ast: e,
|
|
1020
1016
|
helpers: /* @__PURE__ */ new Set()
|
|
@@ -1066,8 +1062,8 @@ function Zt(e, t) {
|
|
|
1066
1062
|
break;
|
|
1067
1063
|
}
|
|
1068
1064
|
}
|
|
1069
|
-
function
|
|
1070
|
-
const n =
|
|
1065
|
+
function ks(e, t = {}) {
|
|
1066
|
+
const n = Ds(e);
|
|
1071
1067
|
n.helper(
|
|
1072
1068
|
"normalize"
|
|
1073
1069
|
/* HelperNameMap.NORMALIZE */
|
|
@@ -1075,7 +1071,7 @@ function ys(e, t = {}) {
|
|
|
1075
1071
|
const r = n.context();
|
|
1076
1072
|
e.helpers = Array.from(r.helpers);
|
|
1077
1073
|
}
|
|
1078
|
-
function
|
|
1074
|
+
function Rs(e) {
|
|
1079
1075
|
const t = e.body;
|
|
1080
1076
|
return t.type === 2 ? gn(t) : t.cases.forEach((n) => gn(n)), e;
|
|
1081
1077
|
}
|
|
@@ -1100,25 +1096,25 @@ function gn(e) {
|
|
|
1100
1096
|
}
|
|
1101
1097
|
}
|
|
1102
1098
|
}
|
|
1103
|
-
const
|
|
1104
|
-
function
|
|
1099
|
+
const Ms = "minifier";
|
|
1100
|
+
function Re(e) {
|
|
1105
1101
|
switch (e.t = e.type, e.type) {
|
|
1106
1102
|
case 0: {
|
|
1107
1103
|
const t = e;
|
|
1108
|
-
|
|
1104
|
+
Re(t.body), t.b = t.body, delete t.body;
|
|
1109
1105
|
break;
|
|
1110
1106
|
}
|
|
1111
1107
|
case 1: {
|
|
1112
1108
|
const t = e, n = t.cases;
|
|
1113
1109
|
for (let r = 0; r < n.length; r++)
|
|
1114
|
-
|
|
1110
|
+
Re(n[r]);
|
|
1115
1111
|
t.c = n, delete t.cases;
|
|
1116
1112
|
break;
|
|
1117
1113
|
}
|
|
1118
1114
|
case 2: {
|
|
1119
1115
|
const t = e, n = t.items;
|
|
1120
1116
|
for (let r = 0; r < n.length; r++)
|
|
1121
|
-
|
|
1117
|
+
Re(n[r]);
|
|
1122
1118
|
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
1123
1119
|
break;
|
|
1124
1120
|
}
|
|
@@ -1132,7 +1128,7 @@ function Pe(e) {
|
|
|
1132
1128
|
}
|
|
1133
1129
|
case 6: {
|
|
1134
1130
|
const t = e;
|
|
1135
|
-
|
|
1131
|
+
Re(t.key), t.k = t.key, delete t.key, t.modifier && (Re(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
1136
1132
|
break;
|
|
1137
1133
|
}
|
|
1138
1134
|
case 5: {
|
|
@@ -1147,15 +1143,15 @@ function Pe(e) {
|
|
|
1147
1143
|
}
|
|
1148
1144
|
default:
|
|
1149
1145
|
if (process.env.NODE_ENV !== "production")
|
|
1150
|
-
throw
|
|
1151
|
-
domain:
|
|
1146
|
+
throw Ve(P.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
1147
|
+
domain: Ms,
|
|
1152
1148
|
args: [e.type]
|
|
1153
1149
|
});
|
|
1154
1150
|
}
|
|
1155
1151
|
delete e.type;
|
|
1156
1152
|
}
|
|
1157
|
-
const
|
|
1158
|
-
function
|
|
1153
|
+
const Fs = "parser";
|
|
1154
|
+
function Us(e, t) {
|
|
1159
1155
|
const { filename: n, breakLineCode: r, needIndent: s } = t, a = t.location !== !1, o = {
|
|
1160
1156
|
filename: n,
|
|
1161
1157
|
code: "",
|
|
@@ -1172,20 +1168,20 @@ function Rs(e, t) {
|
|
|
1172
1168
|
function u(C, S) {
|
|
1173
1169
|
o.code += C;
|
|
1174
1170
|
}
|
|
1175
|
-
function
|
|
1171
|
+
function d(C, S = !0) {
|
|
1176
1172
|
const f = S ? r : "";
|
|
1177
1173
|
u(s ? f + " ".repeat(C) : f);
|
|
1178
1174
|
}
|
|
1179
1175
|
function I(C = !0) {
|
|
1180
1176
|
const S = ++o.indentLevel;
|
|
1181
|
-
C &&
|
|
1177
|
+
C && d(S);
|
|
1182
1178
|
}
|
|
1183
1179
|
function b(C = !0) {
|
|
1184
1180
|
const S = --o.indentLevel;
|
|
1185
|
-
C &&
|
|
1181
|
+
C && d(S);
|
|
1186
1182
|
}
|
|
1187
1183
|
function N() {
|
|
1188
|
-
|
|
1184
|
+
d(o.indentLevel);
|
|
1189
1185
|
}
|
|
1190
1186
|
return {
|
|
1191
1187
|
context: i,
|
|
@@ -1197,25 +1193,25 @@ function Rs(e, t) {
|
|
|
1197
1193
|
needIndent: () => o.needIndent
|
|
1198
1194
|
};
|
|
1199
1195
|
}
|
|
1200
|
-
function
|
|
1196
|
+
function ws(e, t) {
|
|
1201
1197
|
const { helper: n } = e;
|
|
1202
1198
|
e.push(`${n(
|
|
1203
1199
|
"linked"
|
|
1204
1200
|
/* HelperNameMap.LINKED */
|
|
1205
|
-
)}(`),
|
|
1201
|
+
)}(`), Ue(e, t.key), t.modifier ? (e.push(", "), Ue(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
1206
1202
|
}
|
|
1207
|
-
function
|
|
1203
|
+
function Vs(e, t) {
|
|
1208
1204
|
const { helper: n, needIndent: r } = e;
|
|
1209
1205
|
e.push(`${n(
|
|
1210
1206
|
"normalize"
|
|
1211
1207
|
/* HelperNameMap.NORMALIZE */
|
|
1212
1208
|
)}([`), e.indent(r());
|
|
1213
1209
|
const s = t.items.length;
|
|
1214
|
-
for (let a = 0; a < s && (
|
|
1210
|
+
for (let a = 0; a < s && (Ue(e, t.items[a]), a !== s - 1); a++)
|
|
1215
1211
|
e.push(", ");
|
|
1216
1212
|
e.deindent(r()), e.push("])");
|
|
1217
1213
|
}
|
|
1218
|
-
function
|
|
1214
|
+
function $s(e, t) {
|
|
1219
1215
|
const { helper: n, needIndent: r } = e;
|
|
1220
1216
|
if (t.cases.length > 1) {
|
|
1221
1217
|
e.push(`${n(
|
|
@@ -1223,28 +1219,28 @@ function Us(e, t) {
|
|
|
1223
1219
|
/* HelperNameMap.PLURAL */
|
|
1224
1220
|
)}([`), e.indent(r());
|
|
1225
1221
|
const s = t.cases.length;
|
|
1226
|
-
for (let a = 0; a < s && (
|
|
1222
|
+
for (let a = 0; a < s && (Ue(e, t.cases[a]), a !== s - 1); a++)
|
|
1227
1223
|
e.push(", ");
|
|
1228
1224
|
e.deindent(r()), e.push("])");
|
|
1229
1225
|
}
|
|
1230
1226
|
}
|
|
1231
|
-
function
|
|
1232
|
-
t.body ?
|
|
1227
|
+
function Ws(e, t) {
|
|
1228
|
+
t.body ? Ue(e, t.body) : e.push("null");
|
|
1233
1229
|
}
|
|
1234
|
-
function
|
|
1230
|
+
function Ue(e, t) {
|
|
1235
1231
|
const { helper: n } = e;
|
|
1236
1232
|
switch (t.type) {
|
|
1237
1233
|
case 0:
|
|
1238
|
-
|
|
1234
|
+
Ws(e, t);
|
|
1239
1235
|
break;
|
|
1240
1236
|
case 1:
|
|
1241
|
-
|
|
1237
|
+
$s(e, t);
|
|
1242
1238
|
break;
|
|
1243
1239
|
case 2:
|
|
1244
|
-
|
|
1240
|
+
Vs(e, t);
|
|
1245
1241
|
break;
|
|
1246
1242
|
case 6:
|
|
1247
|
-
|
|
1243
|
+
ws(e, t);
|
|
1248
1244
|
break;
|
|
1249
1245
|
case 8:
|
|
1250
1246
|
e.push(JSON.stringify(t.value), t);
|
|
@@ -1278,82 +1274,82 @@ function Re(e, t) {
|
|
|
1278
1274
|
break;
|
|
1279
1275
|
default:
|
|
1280
1276
|
if (process.env.NODE_ENV !== "production")
|
|
1281
|
-
throw
|
|
1282
|
-
domain:
|
|
1277
|
+
throw Ve(P.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1278
|
+
domain: Fs,
|
|
1283
1279
|
args: [t.type]
|
|
1284
1280
|
});
|
|
1285
1281
|
}
|
|
1286
1282
|
}
|
|
1287
|
-
const
|
|
1283
|
+
const Gs = (e, t = {}) => {
|
|
1288
1284
|
const n = L(t.mode) ? t.mode : "normal", r = L(t.filename) ? t.filename : "message.intl";
|
|
1289
1285
|
t.sourceMap;
|
|
1290
1286
|
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1291
|
-
`, a = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i =
|
|
1287
|
+
`, a = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i = Us(e, {
|
|
1292
1288
|
filename: r,
|
|
1293
1289
|
breakLineCode: s,
|
|
1294
1290
|
needIndent: a
|
|
1295
1291
|
});
|
|
1296
|
-
i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), o.length > 0 && (i.push(`const { ${Qt(o.map((I) => `${I}: _${I}`), ", ")} } = ctx`), i.newline()), i.push("return "),
|
|
1297
|
-
const { code: u, map:
|
|
1292
|
+
i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), o.length > 0 && (i.push(`const { ${Qt(o.map((I) => `${I}: _${I}`), ", ")} } = ctx`), i.newline()), i.push("return "), Ue(i, e), i.deindent(a), i.push("}"), delete e.helpers;
|
|
1293
|
+
const { code: u, map: d } = i.context();
|
|
1298
1294
|
return {
|
|
1299
1295
|
ast: e,
|
|
1300
1296
|
code: u,
|
|
1301
|
-
map:
|
|
1297
|
+
map: d ? d.toJSON() : void 0
|
|
1302
1298
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1303
1299
|
};
|
|
1304
1300
|
};
|
|
1305
|
-
function
|
|
1306
|
-
const n = J({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i =
|
|
1307
|
-
return r ? (a &&
|
|
1301
|
+
function xs(e, t = {}) {
|
|
1302
|
+
const n = J({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i = Ps(n).parse(e);
|
|
1303
|
+
return r ? (a && Rs(i), s && Re(i), { ast: i, code: "" }) : (ks(i, n), Gs(i, n));
|
|
1308
1304
|
}
|
|
1309
|
-
function
|
|
1310
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (
|
|
1305
|
+
function Hs() {
|
|
1306
|
+
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Oe().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Oe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1311
1307
|
}
|
|
1312
1308
|
function se(e) {
|
|
1313
1309
|
return M(e) && zt(e) === 0 && (oe(e, "b") || oe(e, "body"));
|
|
1314
1310
|
}
|
|
1315
|
-
const
|
|
1316
|
-
function
|
|
1317
|
-
return
|
|
1311
|
+
const tr = ["b", "body"];
|
|
1312
|
+
function Ys(e) {
|
|
1313
|
+
return Ne(e, tr);
|
|
1318
1314
|
}
|
|
1319
|
-
const
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1315
|
+
const nr = ["c", "cases"];
|
|
1316
|
+
function Bs(e) {
|
|
1317
|
+
return Ne(e, nr, []);
|
|
1322
1318
|
}
|
|
1323
|
-
const
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1319
|
+
const rr = ["s", "static"];
|
|
1320
|
+
function Ks(e) {
|
|
1321
|
+
return Ne(e, rr);
|
|
1326
1322
|
}
|
|
1327
|
-
const
|
|
1328
|
-
function
|
|
1329
|
-
return
|
|
1323
|
+
const sr = ["i", "items"];
|
|
1324
|
+
function js(e) {
|
|
1325
|
+
return Ne(e, sr, []);
|
|
1330
1326
|
}
|
|
1331
|
-
const
|
|
1327
|
+
const ar = ["t", "type"];
|
|
1332
1328
|
function zt(e) {
|
|
1333
|
-
return
|
|
1329
|
+
return Ne(e, ar);
|
|
1334
1330
|
}
|
|
1335
|
-
const
|
|
1331
|
+
const or = ["v", "value"];
|
|
1336
1332
|
function tt(e, t) {
|
|
1337
|
-
const n =
|
|
1333
|
+
const n = Ne(e, or);
|
|
1338
1334
|
if (n != null)
|
|
1339
1335
|
return n;
|
|
1340
|
-
throw
|
|
1336
|
+
throw Be(t);
|
|
1341
1337
|
}
|
|
1342
|
-
const
|
|
1343
|
-
function
|
|
1344
|
-
return
|
|
1338
|
+
const lr = ["m", "modifier"];
|
|
1339
|
+
function Xs(e) {
|
|
1340
|
+
return Ne(e, lr);
|
|
1345
1341
|
}
|
|
1346
|
-
const
|
|
1347
|
-
function
|
|
1348
|
-
const t =
|
|
1342
|
+
const ir = ["k", "key"];
|
|
1343
|
+
function Js(e) {
|
|
1344
|
+
const t = Ne(e, ir);
|
|
1349
1345
|
if (t)
|
|
1350
1346
|
return t;
|
|
1351
|
-
throw
|
|
1347
|
+
throw Be(
|
|
1352
1348
|
6
|
|
1353
1349
|
/* NodeTypes.Linked */
|
|
1354
1350
|
);
|
|
1355
1351
|
}
|
|
1356
|
-
function
|
|
1352
|
+
function Ne(e, t, n) {
|
|
1357
1353
|
for (let r = 0; r < t.length; r++) {
|
|
1358
1354
|
const s = t[r];
|
|
1359
1355
|
if (oe(e, s) && e[s] != null)
|
|
@@ -1361,31 +1357,31 @@ function ge(e, t, n) {
|
|
|
1361
1357
|
}
|
|
1362
1358
|
return n;
|
|
1363
1359
|
}
|
|
1364
|
-
const
|
|
1365
|
-
...Zn,
|
|
1366
|
-
...zn,
|
|
1367
|
-
...er,
|
|
1360
|
+
const cr = [
|
|
1368
1361
|
...tr,
|
|
1369
|
-
...
|
|
1370
|
-
...sr,
|
|
1362
|
+
...nr,
|
|
1371
1363
|
...rr,
|
|
1372
|
-
...
|
|
1364
|
+
...sr,
|
|
1365
|
+
...ir,
|
|
1366
|
+
...lr,
|
|
1367
|
+
...or,
|
|
1368
|
+
...ar
|
|
1373
1369
|
];
|
|
1374
|
-
function
|
|
1370
|
+
function Be(e) {
|
|
1375
1371
|
return new Error(`unhandled node type: ${e}`);
|
|
1376
1372
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return (n) =>
|
|
1373
|
+
function St(e) {
|
|
1374
|
+
return (n) => Qs(n, e);
|
|
1379
1375
|
}
|
|
1380
|
-
function
|
|
1381
|
-
const n =
|
|
1376
|
+
function Qs(e, t) {
|
|
1377
|
+
const n = Ys(t);
|
|
1382
1378
|
if (n == null)
|
|
1383
|
-
throw
|
|
1379
|
+
throw Be(
|
|
1384
1380
|
0
|
|
1385
1381
|
/* NodeTypes.Resource */
|
|
1386
1382
|
);
|
|
1387
1383
|
if (zt(n) === 1) {
|
|
1388
|
-
const a =
|
|
1384
|
+
const a = Bs(n);
|
|
1389
1385
|
return e.plural(a.reduce((o, i) => [
|
|
1390
1386
|
...o,
|
|
1391
1387
|
Nn(e, i)
|
|
@@ -1394,11 +1390,11 @@ function js(e, t) {
|
|
|
1394
1390
|
return Nn(e, n);
|
|
1395
1391
|
}
|
|
1396
1392
|
function Nn(e, t) {
|
|
1397
|
-
const n =
|
|
1393
|
+
const n = Ks(t);
|
|
1398
1394
|
if (n != null)
|
|
1399
1395
|
return e.type === "text" ? n : e.normalize([n]);
|
|
1400
1396
|
{
|
|
1401
|
-
const r =
|
|
1397
|
+
const r = js(t).reduce((s, a) => [...s, Rt(e, a)], []);
|
|
1402
1398
|
return e.normalize(r);
|
|
1403
1399
|
}
|
|
1404
1400
|
}
|
|
@@ -1415,7 +1411,7 @@ function Rt(e, t) {
|
|
|
1415
1411
|
return e.interpolate(e.named(r.k));
|
|
1416
1412
|
if (oe(r, "key") && r.key)
|
|
1417
1413
|
return e.interpolate(e.named(r.key));
|
|
1418
|
-
throw
|
|
1414
|
+
throw Be(n);
|
|
1419
1415
|
}
|
|
1420
1416
|
case 5: {
|
|
1421
1417
|
const r = t;
|
|
@@ -1423,10 +1419,10 @@ function Rt(e, t) {
|
|
|
1423
1419
|
return e.interpolate(e.list(r.i));
|
|
1424
1420
|
if (oe(r, "index") && j(r.index))
|
|
1425
1421
|
return e.interpolate(e.list(r.index));
|
|
1426
|
-
throw
|
|
1422
|
+
throw Be(n);
|
|
1427
1423
|
}
|
|
1428
1424
|
case 6: {
|
|
1429
|
-
const r = t, s =
|
|
1425
|
+
const r = t, s = Xs(r), a = Js(r);
|
|
1430
1426
|
return e.linked(Rt(e, a), s ? Rt(e, s) : void 0, e.type);
|
|
1431
1427
|
}
|
|
1432
1428
|
case 7:
|
|
@@ -1437,32 +1433,32 @@ function Rt(e, t) {
|
|
|
1437
1433
|
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1438
1434
|
}
|
|
1439
1435
|
}
|
|
1440
|
-
const
|
|
1441
|
-
function
|
|
1442
|
-
t &&
|
|
1436
|
+
const qs = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1437
|
+
function Zs(e, t) {
|
|
1438
|
+
t && Ts(e) && ue(it(qs, { source: e }));
|
|
1443
1439
|
}
|
|
1444
|
-
const
|
|
1440
|
+
const zs = (e) => e;
|
|
1445
1441
|
let nt = $();
|
|
1446
|
-
function
|
|
1442
|
+
function ea(e, t = {}) {
|
|
1447
1443
|
let n = !1;
|
|
1448
|
-
const r = t.onError ||
|
|
1444
|
+
const r = t.onError || gs;
|
|
1449
1445
|
return t.onError = (s) => {
|
|
1450
1446
|
n = !0, r(s);
|
|
1451
|
-
}, {
|
|
1447
|
+
}, { ...xs(e, t), detectError: n };
|
|
1452
1448
|
}
|
|
1453
1449
|
// @__NO_SIDE_EFFECTS__
|
|
1454
|
-
function
|
|
1450
|
+
function ta(e, t) {
|
|
1455
1451
|
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && L(e)) {
|
|
1456
1452
|
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1457
|
-
process.env.NODE_ENV !== "production" &&
|
|
1458
|
-
const s = (t.onCacheKey ||
|
|
1453
|
+
process.env.NODE_ENV !== "production" && Zs(e, n);
|
|
1454
|
+
const s = (t.onCacheKey || zs)(e), a = nt[s];
|
|
1459
1455
|
if (a)
|
|
1460
1456
|
return a;
|
|
1461
|
-
const { ast: o, detectError: i } =
|
|
1457
|
+
const { ast: o, detectError: i } = ea(e, {
|
|
1462
1458
|
...t,
|
|
1463
1459
|
location: process.env.NODE_ENV !== "production",
|
|
1464
1460
|
jit: !0
|
|
1465
|
-
}), u =
|
|
1461
|
+
}), u = St(o);
|
|
1466
1462
|
return i ? u : nt[s] = u;
|
|
1467
1463
|
} else {
|
|
1468
1464
|
if (process.env.NODE_ENV !== "production" && !se(e))
|
|
@@ -1470,29 +1466,29 @@ function Zs(e, t) {
|
|
|
1470
1466
|
const n = e.cacheKey;
|
|
1471
1467
|
if (n) {
|
|
1472
1468
|
const r = nt[n];
|
|
1473
|
-
return r || (nt[n] =
|
|
1469
|
+
return r || (nt[n] = St(e));
|
|
1474
1470
|
} else
|
|
1475
|
-
return
|
|
1471
|
+
return St(e);
|
|
1476
1472
|
}
|
|
1477
1473
|
}
|
|
1478
|
-
let
|
|
1479
|
-
function
|
|
1480
|
-
|
|
1474
|
+
let Ke = null;
|
|
1475
|
+
function na(e) {
|
|
1476
|
+
Ke = e;
|
|
1481
1477
|
}
|
|
1482
|
-
function
|
|
1483
|
-
|
|
1478
|
+
function ra(e, t, n) {
|
|
1479
|
+
Ke && Ke.emit("i18n:init", {
|
|
1484
1480
|
timestamp: Date.now(),
|
|
1485
1481
|
i18n: e,
|
|
1486
1482
|
version: t,
|
|
1487
1483
|
meta: n
|
|
1488
1484
|
});
|
|
1489
1485
|
}
|
|
1490
|
-
const
|
|
1491
|
-
function
|
|
1492
|
-
return (t) =>
|
|
1486
|
+
const sa = /* @__PURE__ */ aa("function:translate");
|
|
1487
|
+
function aa(e) {
|
|
1488
|
+
return (t) => Ke && Ke.emit(e, t);
|
|
1493
1489
|
}
|
|
1494
1490
|
const q = {
|
|
1495
|
-
INVALID_ARGUMENT:
|
|
1491
|
+
INVALID_ARGUMENT: Es,
|
|
1496
1492
|
// 17
|
|
1497
1493
|
INVALID_DATE_ARGUMENT: 18,
|
|
1498
1494
|
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
@@ -1500,11 +1496,11 @@ const q = {
|
|
|
1500
1496
|
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1501
1497
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1502
1498
|
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1503
|
-
},
|
|
1499
|
+
}, oa = 24;
|
|
1504
1500
|
function de(e) {
|
|
1505
|
-
return
|
|
1501
|
+
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages: la } : void 0);
|
|
1506
1502
|
}
|
|
1507
|
-
const
|
|
1503
|
+
const la = {
|
|
1508
1504
|
[q.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1509
1505
|
[q.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1510
1506
|
[q.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
@@ -1516,30 +1512,30 @@ const sa = {
|
|
|
1516
1512
|
function en(e, t) {
|
|
1517
1513
|
return t.locale != null ? Tn(t.locale) : Tn(e.locale);
|
|
1518
1514
|
}
|
|
1519
|
-
let
|
|
1515
|
+
let yt;
|
|
1520
1516
|
function Tn(e) {
|
|
1521
1517
|
if (L(e))
|
|
1522
1518
|
return e;
|
|
1523
1519
|
if (W(e)) {
|
|
1524
|
-
if (e.resolvedOnce &&
|
|
1525
|
-
return
|
|
1520
|
+
if (e.resolvedOnce && yt != null)
|
|
1521
|
+
return yt;
|
|
1526
1522
|
if (e.constructor.name === "Function") {
|
|
1527
1523
|
const t = e();
|
|
1528
|
-
if (
|
|
1524
|
+
if (fs(t))
|
|
1529
1525
|
throw de(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1530
|
-
return
|
|
1526
|
+
return yt = t;
|
|
1531
1527
|
} else
|
|
1532
1528
|
throw de(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1533
1529
|
} else
|
|
1534
1530
|
throw de(q.NOT_SUPPORT_LOCALE_TYPE);
|
|
1535
1531
|
}
|
|
1536
|
-
function
|
|
1532
|
+
function ia(e, t, n) {
|
|
1537
1533
|
return [.../* @__PURE__ */ new Set([
|
|
1538
1534
|
n,
|
|
1539
1535
|
...H(t) ? t : M(t) ? Object.keys(t) : L(t) ? [t] : [n]
|
|
1540
1536
|
])];
|
|
1541
1537
|
}
|
|
1542
|
-
function
|
|
1538
|
+
function ur(e, t, n) {
|
|
1543
1539
|
const r = L(n) ? n : je, s = e;
|
|
1544
1540
|
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1545
1541
|
let a = s.__localeChainCache.get(r);
|
|
@@ -1557,20 +1553,20 @@ function bn(e, t, n) {
|
|
|
1557
1553
|
let r = !0;
|
|
1558
1554
|
for (let s = 0; s < t.length && F(r); s++) {
|
|
1559
1555
|
const a = t[s];
|
|
1560
|
-
L(a) && (r =
|
|
1556
|
+
L(a) && (r = ca(e, t[s], n));
|
|
1561
1557
|
}
|
|
1562
1558
|
return r;
|
|
1563
1559
|
}
|
|
1564
|
-
function
|
|
1560
|
+
function ca(e, t, n) {
|
|
1565
1561
|
let r;
|
|
1566
1562
|
const s = t.split("-");
|
|
1567
1563
|
do {
|
|
1568
1564
|
const a = s.join("-");
|
|
1569
|
-
r =
|
|
1565
|
+
r = ua(e, a, n), s.splice(-1, 1);
|
|
1570
1566
|
} while (s.length && r === !0);
|
|
1571
1567
|
return r;
|
|
1572
1568
|
}
|
|
1573
|
-
function
|
|
1569
|
+
function ua(e, t, n) {
|
|
1574
1570
|
let r = !1;
|
|
1575
1571
|
if (!e.includes(t) && (r = !0, t)) {
|
|
1576
1572
|
r = t[t.length - 1] !== "!";
|
|
@@ -1579,8 +1575,8 @@ function la(e, t, n) {
|
|
|
1579
1575
|
}
|
|
1580
1576
|
return r;
|
|
1581
1577
|
}
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1578
|
+
const Te = [];
|
|
1579
|
+
Te[
|
|
1584
1580
|
0
|
|
1585
1581
|
/* States.BEFORE_PATH */
|
|
1586
1582
|
] = {
|
|
@@ -1602,7 +1598,7 @@ Ne[
|
|
|
1602
1598
|
/* States.AFTER_PATH */
|
|
1603
1599
|
]
|
|
1604
1600
|
};
|
|
1605
|
-
|
|
1601
|
+
Te[
|
|
1606
1602
|
1
|
|
1607
1603
|
/* States.IN_PATH */
|
|
1608
1604
|
] = {
|
|
@@ -1623,7 +1619,7 @@ Ne[
|
|
|
1623
1619
|
/* States.AFTER_PATH */
|
|
1624
1620
|
]
|
|
1625
1621
|
};
|
|
1626
|
-
|
|
1622
|
+
Te[
|
|
1627
1623
|
2
|
|
1628
1624
|
/* States.BEFORE_IDENT */
|
|
1629
1625
|
] = {
|
|
@@ -1642,7 +1638,7 @@ Ne[
|
|
|
1642
1638
|
/* Actions.APPEND */
|
|
1643
1639
|
]
|
|
1644
1640
|
};
|
|
1645
|
-
|
|
1641
|
+
Te[
|
|
1646
1642
|
3
|
|
1647
1643
|
/* States.IN_IDENT */
|
|
1648
1644
|
] = {
|
|
@@ -1677,7 +1673,7 @@ Ne[
|
|
|
1677
1673
|
/* Actions.PUSH */
|
|
1678
1674
|
]
|
|
1679
1675
|
};
|
|
1680
|
-
|
|
1676
|
+
Te[
|
|
1681
1677
|
4
|
|
1682
1678
|
/* States.IN_SUB_PATH */
|
|
1683
1679
|
] = {
|
|
@@ -1708,7 +1704,7 @@ Ne[
|
|
|
1708
1704
|
/* Actions.APPEND */
|
|
1709
1705
|
]
|
|
1710
1706
|
};
|
|
1711
|
-
|
|
1707
|
+
Te[
|
|
1712
1708
|
5
|
|
1713
1709
|
/* States.IN_SINGLE_QUOTE */
|
|
1714
1710
|
] = {
|
|
@@ -1724,7 +1720,7 @@ Ne[
|
|
|
1724
1720
|
/* Actions.APPEND */
|
|
1725
1721
|
]
|
|
1726
1722
|
};
|
|
1727
|
-
|
|
1723
|
+
Te[
|
|
1728
1724
|
6
|
|
1729
1725
|
/* States.IN_DOUBLE_QUOTE */
|
|
1730
1726
|
] = {
|
|
@@ -1740,15 +1736,15 @@ Ne[
|
|
|
1740
1736
|
/* Actions.APPEND */
|
|
1741
1737
|
]
|
|
1742
1738
|
};
|
|
1743
|
-
const
|
|
1744
|
-
function
|
|
1745
|
-
return
|
|
1739
|
+
const fa = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1740
|
+
function _a(e) {
|
|
1741
|
+
return fa.test(e);
|
|
1746
1742
|
}
|
|
1747
|
-
function
|
|
1743
|
+
function ma(e) {
|
|
1748
1744
|
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1749
1745
|
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1750
1746
|
}
|
|
1751
|
-
function
|
|
1747
|
+
function da(e) {
|
|
1752
1748
|
if (e == null)
|
|
1753
1749
|
return "o";
|
|
1754
1750
|
switch (e.charCodeAt(0)) {
|
|
@@ -1785,13 +1781,13 @@ function fa(e) {
|
|
|
1785
1781
|
}
|
|
1786
1782
|
return "i";
|
|
1787
1783
|
}
|
|
1788
|
-
function
|
|
1784
|
+
function Ea(e) {
|
|
1789
1785
|
const t = e.trim();
|
|
1790
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 :
|
|
1786
|
+
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : _a(t) ? ma(t) : "*" + t;
|
|
1791
1787
|
}
|
|
1792
|
-
function
|
|
1788
|
+
function pa(e) {
|
|
1793
1789
|
const t = [];
|
|
1794
|
-
let n = -1, r = 0, s = 0, a, o, i, u,
|
|
1790
|
+
let n = -1, r = 0, s = 0, a, o, i, u, d, I, b;
|
|
1795
1791
|
const N = [];
|
|
1796
1792
|
N[
|
|
1797
1793
|
0
|
|
@@ -1821,7 +1817,7 @@ function ma(e) {
|
|
|
1821
1817
|
/* Actions.APPEND */
|
|
1822
1818
|
]();
|
|
1823
1819
|
else {
|
|
1824
|
-
if (s = 0, o === void 0 || (o =
|
|
1820
|
+
if (s = 0, o === void 0 || (o = Ea(o), o === !1))
|
|
1825
1821
|
return !1;
|
|
1826
1822
|
N[
|
|
1827
1823
|
1
|
|
@@ -1839,27 +1835,27 @@ function ma(e) {
|
|
|
1839
1835
|
}
|
|
1840
1836
|
for (; r !== null; )
|
|
1841
1837
|
if (n++, a = e[n], !(a === "\\" && A())) {
|
|
1842
|
-
if (u =
|
|
1838
|
+
if (u = da(a), b = Te[r], d = b[u] || b.l || 8, d === 8 || (r = d[0], d[1] !== void 0 && (I = N[d[1]], I && (i = a, I() === !1))))
|
|
1843
1839
|
return;
|
|
1844
1840
|
if (r === 7)
|
|
1845
1841
|
return t;
|
|
1846
1842
|
}
|
|
1847
1843
|
}
|
|
1848
1844
|
const hn = /* @__PURE__ */ new Map();
|
|
1849
|
-
function
|
|
1845
|
+
function ga(e, t) {
|
|
1850
1846
|
return M(e) ? e[t] : null;
|
|
1851
1847
|
}
|
|
1852
|
-
function
|
|
1848
|
+
function Na(e, t) {
|
|
1853
1849
|
if (!M(e))
|
|
1854
1850
|
return null;
|
|
1855
1851
|
let n = hn.get(t);
|
|
1856
|
-
if (n || (n =
|
|
1852
|
+
if (n || (n = pa(t), n && hn.set(t, n)), !n)
|
|
1857
1853
|
return null;
|
|
1858
1854
|
const r = n.length;
|
|
1859
1855
|
let s = e, a = 0;
|
|
1860
1856
|
for (; a < r; ) {
|
|
1861
1857
|
const o = n[a];
|
|
1862
|
-
if (
|
|
1858
|
+
if (cr.includes(o) && se(s))
|
|
1863
1859
|
return null;
|
|
1864
1860
|
const i = s[o];
|
|
1865
1861
|
if (i === void 0 || W(s))
|
|
@@ -1876,7 +1872,7 @@ const Z = {
|
|
|
1876
1872
|
CANNOT_FORMAT_DATE: 5,
|
|
1877
1873
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1878
1874
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1879
|
-
},
|
|
1875
|
+
}, Ta = 8, ba = {
|
|
1880
1876
|
[Z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1881
1877
|
[Z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1882
1878
|
[Z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
@@ -1885,42 +1881,42 @@ const Z = {
|
|
|
1885
1881
|
[Z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1886
1882
|
[Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
|
|
1887
1883
|
};
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
1884
|
+
function Se(e, ...t) {
|
|
1885
|
+
return it(ba[e], ...t);
|
|
1890
1886
|
}
|
|
1891
|
-
const
|
|
1892
|
-
function
|
|
1887
|
+
const ha = "11.2.8", ut = -1, je = "en-US", st = "", In = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1888
|
+
function Ia() {
|
|
1893
1889
|
return {
|
|
1894
1890
|
upper: (e, t) => t === "text" && L(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1895
1891
|
lower: (e, t) => t === "text" && L(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1896
1892
|
capitalize: (e, t) => t === "text" && L(e) ? In(e) : t === "vnode" && M(e) && "__v_isVNode" in e ? In(e.children) : e
|
|
1897
1893
|
};
|
|
1898
1894
|
}
|
|
1899
|
-
let
|
|
1900
|
-
function
|
|
1901
|
-
|
|
1895
|
+
let fr;
|
|
1896
|
+
function La(e) {
|
|
1897
|
+
fr = e;
|
|
1902
1898
|
}
|
|
1903
|
-
let
|
|
1904
|
-
function
|
|
1905
|
-
|
|
1899
|
+
let _r;
|
|
1900
|
+
function Oa(e) {
|
|
1901
|
+
_r = e;
|
|
1906
1902
|
}
|
|
1907
|
-
let
|
|
1908
|
-
function
|
|
1909
|
-
|
|
1903
|
+
let mr;
|
|
1904
|
+
function va(e) {
|
|
1905
|
+
mr = e;
|
|
1910
1906
|
}
|
|
1911
|
-
let
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1914
|
-
},
|
|
1915
|
-
let
|
|
1907
|
+
let dr = null;
|
|
1908
|
+
const Ca = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1909
|
+
dr = e;
|
|
1910
|
+
}, Aa = /* @__NO_SIDE_EFFECTS__ */ () => dr;
|
|
1911
|
+
let Er = null;
|
|
1916
1912
|
const Ln = (e) => {
|
|
1917
|
-
|
|
1918
|
-
},
|
|
1913
|
+
Er = e;
|
|
1914
|
+
}, Sa = () => Er;
|
|
1919
1915
|
let On = 0;
|
|
1920
|
-
function
|
|
1921
|
-
const t = W(e.onWarn) ? e.onWarn : ue, n = L(e.version) ? e.version :
|
|
1922
|
-
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Xt(
|
|
1923
|
-
const O = W(e.messageResolver) ? e.messageResolver :
|
|
1916
|
+
function ya(e = {}) {
|
|
1917
|
+
const t = W(e.onWarn) ? e.onWarn : ue, n = L(e.version) ? e.version : ha, r = L(e.locale) || W(e.locale) ? e.locale : je, s = W(r) ? je : r, a = H(e.fallbackLocale) || R(e.fallbackLocale) || L(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, o = R(e.messages) ? e.messages : Pt(s), i = R(e.datetimeFormats) ? e.datetimeFormats : Pt(s), u = R(e.numberFormats) ? e.numberFormats : Pt(s), d = J($(), e.modifiers, Ia()), I = e.pluralRules || $(), b = W(e.missing) ? e.missing : null, N = F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, A = F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = !!e.fallbackFormat, C = !!e.unresolving, S = W(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, m = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, h = !!e.escapeParameter, E = W(e.messageCompiler) ? e.messageCompiler : fr;
|
|
1918
|
+
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Xt(Se(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1919
|
+
const O = W(e.messageResolver) ? e.messageResolver : _r || ga, v = W(e.localeFallbacker) ? e.localeFallbacker : mr || ia, p = M(e.fallbackContext) ? e.fallbackContext : void 0, k = e, w = M(k.__datetimeFormatters) ? k.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(k.__numberFormatters) ? k.__numberFormatters : /* @__PURE__ */ new Map(), ae = M(k.__meta) ? k.__meta : {};
|
|
1924
1920
|
On++;
|
|
1925
1921
|
const Y = {
|
|
1926
1922
|
version: n,
|
|
@@ -1928,7 +1924,7 @@ function Ca(e = {}) {
|
|
|
1928
1924
|
locale: r,
|
|
1929
1925
|
fallbackLocale: a,
|
|
1930
1926
|
messages: o,
|
|
1931
|
-
modifiers:
|
|
1927
|
+
modifiers: d,
|
|
1932
1928
|
pluralRules: I,
|
|
1933
1929
|
missing: b,
|
|
1934
1930
|
missingWarn: N,
|
|
@@ -1939,20 +1935,20 @@ function Ca(e = {}) {
|
|
|
1939
1935
|
processor: f,
|
|
1940
1936
|
warnHtmlMessage: m,
|
|
1941
1937
|
escapeParameter: h,
|
|
1942
|
-
messageCompiler:
|
|
1938
|
+
messageCompiler: E,
|
|
1943
1939
|
messageResolver: O,
|
|
1944
1940
|
localeFallbacker: v,
|
|
1945
1941
|
fallbackContext: p,
|
|
1946
1942
|
onWarn: t,
|
|
1947
1943
|
__meta: ae
|
|
1948
1944
|
};
|
|
1949
|
-
return Y.datetimeFormats = i, Y.numberFormats = u, Y.__datetimeFormatters = w, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = k.__v_emitter != null ? k.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) &&
|
|
1945
|
+
return Y.datetimeFormats = i, Y.numberFormats = u, Y.__datetimeFormatters = w, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = k.__v_emitter != null ? k.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && ra(Y, n, ae), Y;
|
|
1950
1946
|
}
|
|
1951
|
-
const
|
|
1952
|
-
function
|
|
1947
|
+
const Pt = (e) => ({ [e]: $() });
|
|
1948
|
+
function ft(e, t) {
|
|
1953
1949
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1954
1950
|
}
|
|
1955
|
-
function
|
|
1951
|
+
function pr(e, t) {
|
|
1956
1952
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1957
1953
|
}
|
|
1958
1954
|
function tn(e, t, n, r, s) {
|
|
@@ -1970,44 +1966,44 @@ function tn(e, t, n, r, s) {
|
|
|
1970
1966
|
const i = a(e, n, t, s);
|
|
1971
1967
|
return L(i) ? i : t;
|
|
1972
1968
|
} else
|
|
1973
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1969
|
+
return process.env.NODE_ENV !== "production" && pr(r, t) && o(Se(Z.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
1974
1970
|
}
|
|
1975
|
-
function
|
|
1971
|
+
function Ye(e, t, n) {
|
|
1976
1972
|
const r = e;
|
|
1977
1973
|
r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
1978
1974
|
}
|
|
1979
|
-
function
|
|
1975
|
+
function gr(e, t) {
|
|
1980
1976
|
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1981
1977
|
}
|
|
1982
|
-
function
|
|
1978
|
+
function Pa(e, t) {
|
|
1983
1979
|
const n = t.indexOf(e);
|
|
1984
1980
|
if (n === -1)
|
|
1985
1981
|
return !1;
|
|
1986
1982
|
for (let r = n + 1; r < t.length; r++)
|
|
1987
|
-
if (
|
|
1983
|
+
if (gr(e, t[r]))
|
|
1988
1984
|
return !0;
|
|
1989
1985
|
return !1;
|
|
1990
1986
|
}
|
|
1991
|
-
const vn = typeof Intl < "u",
|
|
1987
|
+
const vn = typeof Intl < "u", Nr = {
|
|
1992
1988
|
dateTimeFormat: vn && typeof Intl.DateTimeFormat < "u",
|
|
1993
1989
|
numberFormat: vn && typeof Intl.NumberFormat < "u"
|
|
1994
1990
|
};
|
|
1995
1991
|
function Cn(e, ...t) {
|
|
1996
1992
|
const { datetimeFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __datetimeFormatters: i } = e;
|
|
1997
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1998
|
-
return a(
|
|
1999
|
-
const [u,
|
|
1993
|
+
if (process.env.NODE_ENV !== "production" && !Nr.dateTimeFormat)
|
|
1994
|
+
return a(Se(Z.CANNOT_FORMAT_DATE)), st;
|
|
1995
|
+
const [u, d, I, b] = Mt(...t), N = F(I.missingWarn) ? I.missingWarn : e.missingWarn, A = F(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, D = !!I.part, C = en(e, I), S = o(
|
|
2000
1996
|
e,
|
|
2001
1997
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2002
1998
|
s,
|
|
2003
1999
|
C
|
|
2004
2000
|
);
|
|
2005
2001
|
if (!L(u) || u === "")
|
|
2006
|
-
return new Intl.DateTimeFormat(C, b).format(
|
|
2007
|
-
let f = {}, m, h = null,
|
|
2002
|
+
return new Intl.DateTimeFormat(C, b).format(d);
|
|
2003
|
+
let f = {}, m, h = null, E = C, O = null;
|
|
2008
2004
|
const v = "datetime format";
|
|
2009
2005
|
for (let w = 0; w < S.length; w++) {
|
|
2010
|
-
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m &&
|
|
2006
|
+
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m && ft(A, u) && a(Se(Z.FALLBACK_TO_DATE_FORMAT, {
|
|
2011
2007
|
key: u,
|
|
2012
2008
|
target: m
|
|
2013
2009
|
})), process.env.NODE_ENV !== "production" && C !== m) {
|
|
@@ -2015,23 +2011,23 @@ function Cn(e, ...t) {
|
|
|
2015
2011
|
X && X.emit("fallback", {
|
|
2016
2012
|
type: v,
|
|
2017
2013
|
key: u,
|
|
2018
|
-
from:
|
|
2014
|
+
from: E,
|
|
2019
2015
|
to: O,
|
|
2020
2016
|
groupId: `${v}:${u}`
|
|
2021
2017
|
});
|
|
2022
2018
|
}
|
|
2023
2019
|
if (f = n[m] || {}, h = f[u], R(h))
|
|
2024
2020
|
break;
|
|
2025
|
-
tn(e, u, m, N, v),
|
|
2021
|
+
tn(e, u, m, N, v), E = O;
|
|
2026
2022
|
}
|
|
2027
2023
|
if (!R(h) || !L(m))
|
|
2028
|
-
return r ?
|
|
2024
|
+
return r ? ut : u;
|
|
2029
2025
|
let p = `${m}__${u}`;
|
|
2030
|
-
|
|
2026
|
+
ct(b) || (p = `${p}__${JSON.stringify(b)}`);
|
|
2031
2027
|
let k = i.get(p);
|
|
2032
|
-
return k || (k = new Intl.DateTimeFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(
|
|
2028
|
+
return k || (k = new Intl.DateTimeFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(d) : k.format(d);
|
|
2033
2029
|
}
|
|
2034
|
-
const
|
|
2030
|
+
const Tr = [
|
|
2035
2031
|
"localeMatcher",
|
|
2036
2032
|
"weekday",
|
|
2037
2033
|
"era",
|
|
@@ -2060,14 +2056,14 @@ function Mt(...e) {
|
|
|
2060
2056
|
const u = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
2061
2057
|
if (!u)
|
|
2062
2058
|
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2063
|
-
const
|
|
2064
|
-
i = new Date(
|
|
2059
|
+
const d = u[3] ? u[3].trim().startsWith("T") ? `${u[1].trim()}${u[3].trim()}` : `${u[1].trim()}T${u[3].trim()}` : u[1].trim();
|
|
2060
|
+
i = new Date(d);
|
|
2065
2061
|
try {
|
|
2066
2062
|
i.toISOString();
|
|
2067
2063
|
} catch {
|
|
2068
2064
|
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2069
2065
|
}
|
|
2070
|
-
} else if (
|
|
2066
|
+
} else if (ls(t)) {
|
|
2071
2067
|
if (isNaN(t.getTime()))
|
|
2072
2068
|
throw de(q.INVALID_DATE_ARGUMENT);
|
|
2073
2069
|
i = t;
|
|
@@ -2076,7 +2072,7 @@ function Mt(...e) {
|
|
|
2076
2072
|
else
|
|
2077
2073
|
throw de(q.INVALID_ARGUMENT);
|
|
2078
2074
|
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2079
|
-
|
|
2075
|
+
Tr.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2080
2076
|
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2081
2077
|
}
|
|
2082
2078
|
function An(e, t, n) {
|
|
@@ -2088,20 +2084,20 @@ function An(e, t, n) {
|
|
|
2088
2084
|
}
|
|
2089
2085
|
function Sn(e, ...t) {
|
|
2090
2086
|
const { numberFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __numberFormatters: i } = e;
|
|
2091
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
2092
|
-
return a(
|
|
2093
|
-
const [u,
|
|
2087
|
+
if (process.env.NODE_ENV !== "production" && !Nr.numberFormat)
|
|
2088
|
+
return a(Se(Z.CANNOT_FORMAT_NUMBER)), st;
|
|
2089
|
+
const [u, d, I, b] = Ft(...t), N = F(I.missingWarn) ? I.missingWarn : e.missingWarn, A = F(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, D = !!I.part, C = en(e, I), S = o(
|
|
2094
2090
|
e,
|
|
2095
2091
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2096
2092
|
s,
|
|
2097
2093
|
C
|
|
2098
2094
|
);
|
|
2099
2095
|
if (!L(u) || u === "")
|
|
2100
|
-
return new Intl.NumberFormat(C, b).format(
|
|
2101
|
-
let f = {}, m, h = null,
|
|
2096
|
+
return new Intl.NumberFormat(C, b).format(d);
|
|
2097
|
+
let f = {}, m, h = null, E = C, O = null;
|
|
2102
2098
|
const v = "number format";
|
|
2103
2099
|
for (let w = 0; w < S.length; w++) {
|
|
2104
|
-
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m &&
|
|
2100
|
+
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m && ft(A, u) && a(Se(Z.FALLBACK_TO_NUMBER_FORMAT, {
|
|
2105
2101
|
key: u,
|
|
2106
2102
|
target: m
|
|
2107
2103
|
})), process.env.NODE_ENV !== "production" && C !== m) {
|
|
@@ -2109,23 +2105,23 @@ function Sn(e, ...t) {
|
|
|
2109
2105
|
X && X.emit("fallback", {
|
|
2110
2106
|
type: v,
|
|
2111
2107
|
key: u,
|
|
2112
|
-
from:
|
|
2108
|
+
from: E,
|
|
2113
2109
|
to: O,
|
|
2114
2110
|
groupId: `${v}:${u}`
|
|
2115
2111
|
});
|
|
2116
2112
|
}
|
|
2117
2113
|
if (f = n[m] || {}, h = f[u], R(h))
|
|
2118
2114
|
break;
|
|
2119
|
-
tn(e, u, m, N, v),
|
|
2115
|
+
tn(e, u, m, N, v), E = O;
|
|
2120
2116
|
}
|
|
2121
2117
|
if (!R(h) || !L(m))
|
|
2122
|
-
return r ?
|
|
2118
|
+
return r ? ut : u;
|
|
2123
2119
|
let p = `${m}__${u}`;
|
|
2124
|
-
|
|
2120
|
+
ct(b) || (p = `${p}__${JSON.stringify(b)}`);
|
|
2125
2121
|
let k = i.get(p);
|
|
2126
|
-
return k || (k = new Intl.NumberFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(
|
|
2122
|
+
return k || (k = new Intl.NumberFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(d) : k.format(d);
|
|
2127
2123
|
}
|
|
2128
|
-
const
|
|
2124
|
+
const br = [
|
|
2129
2125
|
"localeMatcher",
|
|
2130
2126
|
"style",
|
|
2131
2127
|
"currency",
|
|
@@ -2154,7 +2150,7 @@ function Ft(...e) {
|
|
|
2154
2150
|
throw de(q.INVALID_ARGUMENT);
|
|
2155
2151
|
const i = t;
|
|
2156
2152
|
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2157
|
-
|
|
2153
|
+
br.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2158
2154
|
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2159
2155
|
}
|
|
2160
2156
|
function yn(e, t, n) {
|
|
@@ -2164,33 +2160,33 @@ function yn(e, t, n) {
|
|
|
2164
2160
|
r.__numberFormatters.has(a) && r.__numberFormatters.delete(a);
|
|
2165
2161
|
}
|
|
2166
2162
|
}
|
|
2167
|
-
const
|
|
2163
|
+
const Da = (e) => e, ka = (e) => "", Ra = "text", Ma = (e) => e.length === 0 ? "" : Qt(e), Fa = _s;
|
|
2168
2164
|
function Pn(e, t) {
|
|
2169
2165
|
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
2170
2166
|
}
|
|
2171
|
-
function
|
|
2167
|
+
function Ua(e) {
|
|
2172
2168
|
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
2173
2169
|
return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
|
|
2174
2170
|
}
|
|
2175
|
-
function
|
|
2171
|
+
function wa(e, t) {
|
|
2176
2172
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
2177
2173
|
}
|
|
2178
|
-
function
|
|
2179
|
-
const t = e.locale, n =
|
|
2180
|
-
j(e.pluralIndex) &&
|
|
2181
|
-
const
|
|
2174
|
+
function Va(e = {}) {
|
|
2175
|
+
const t = e.locale, n = Ua(e), r = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? e.pluralRules[t] : Pn, s = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? Pn : void 0, a = (f) => f[r(n, f.length, s)], o = e.list || [], i = (f) => o[f], u = e.named || $();
|
|
2176
|
+
j(e.pluralIndex) && wa(n, u);
|
|
2177
|
+
const d = (f) => u[f];
|
|
2182
2178
|
function I(f, m) {
|
|
2183
2179
|
const h = W(e.messages) ? e.messages(f, !!m) : M(e.messages) ? e.messages[f] : !1;
|
|
2184
|
-
return h || (e.parent ? e.parent.message(f) :
|
|
2180
|
+
return h || (e.parent ? e.parent.message(f) : ka);
|
|
2185
2181
|
}
|
|
2186
|
-
const b = (f) => e.modifiers ? e.modifiers[f] :
|
|
2182
|
+
const b = (f) => e.modifiers ? e.modifiers[f] : Da, N = R(e.processor) && W(e.processor.normalize) ? e.processor.normalize : Ma, A = R(e.processor) && W(e.processor.interpolate) ? e.processor.interpolate : Fa, D = R(e.processor) && L(e.processor.type) ? e.processor.type : Ra, S = {
|
|
2187
2183
|
list: i,
|
|
2188
|
-
named:
|
|
2184
|
+
named: d,
|
|
2189
2185
|
plural: a,
|
|
2190
2186
|
linked: (f, ...m) => {
|
|
2191
|
-
const [h,
|
|
2187
|
+
const [h, E] = m;
|
|
2192
2188
|
let O = "text", v = "";
|
|
2193
|
-
m.length === 1 ? M(h) ? (v = h.modifier || v, O = h.type || O) : L(h) && (v = h || v) : m.length === 2 && (L(h) && (v = h || v), L(
|
|
2189
|
+
m.length === 1 ? M(h) ? (v = h.modifier || v, O = h.type || O) : L(h) && (v = h || v) : m.length === 2 && (L(h) && (v = h || v), L(E) && (O = E || O));
|
|
2194
2190
|
const p = I(f, !0)(S), k = (
|
|
2195
2191
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
2196
2192
|
O === "vnode" && H(p) && v ? p[0] : p
|
|
@@ -2207,48 +2203,48 @@ function Fa(e = {}) {
|
|
|
2207
2203
|
}
|
|
2208
2204
|
const Dn = () => "", te = (e) => W(e);
|
|
2209
2205
|
function kn(e, ...t) {
|
|
2210
|
-
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: o, messages: i } = e, [u,
|
|
2211
|
-
N &&
|
|
2206
|
+
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: o, messages: i } = e, [u, d] = Ut(...t), I = F(d.missingWarn) ? d.missingWarn : e.missingWarn, b = F(d.fallbackWarn) ? d.fallbackWarn : e.fallbackWarn, N = F(d.escapeParameter) ? d.escapeParameter : e.escapeParameter, A = !!d.resolvedMessage, D = L(d.default) || F(d.default) ? F(d.default) ? a ? u : () => u : d.default : n ? a ? u : () => u : null, C = n || D != null && (L(D) || W(D)), S = en(e, d);
|
|
2207
|
+
N && $a(d);
|
|
2212
2208
|
let [f, m, h] = A ? [
|
|
2213
2209
|
u,
|
|
2214
2210
|
S,
|
|
2215
2211
|
i[S] || $()
|
|
2216
|
-
] :
|
|
2217
|
-
if (!A && !(L(
|
|
2218
|
-
return s ?
|
|
2219
|
-
if (process.env.NODE_ENV !== "production" && L(
|
|
2212
|
+
] : hr(e, u, S, o, b, I), E = f, O = u;
|
|
2213
|
+
if (!A && !(L(E) || se(E) || te(E)) && C && (E = D, O = E), !A && (!(L(E) || se(E) || te(E)) || !L(m)))
|
|
2214
|
+
return s ? ut : u;
|
|
2215
|
+
if (process.env.NODE_ENV !== "production" && L(E) && e.messageCompiler == null)
|
|
2220
2216
|
return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`), u;
|
|
2221
2217
|
let v = !1;
|
|
2222
2218
|
const p = () => {
|
|
2223
2219
|
v = !0;
|
|
2224
|
-
}, k = te(
|
|
2220
|
+
}, k = te(E) ? E : Ir(e, u, m, E, O, p);
|
|
2225
2221
|
if (v)
|
|
2226
|
-
return
|
|
2227
|
-
const w =
|
|
2222
|
+
return E;
|
|
2223
|
+
const w = Ha(e, m, h, d), X = Va(w), ae = Wa(e, k, X);
|
|
2228
2224
|
let Y = r ? r(ae, u) : ae;
|
|
2229
|
-
if (N && L(Y) && (Y =
|
|
2230
|
-
const
|
|
2225
|
+
if (N && L(Y) && (Y = cs(Y)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
2226
|
+
const Pe = {
|
|
2231
2227
|
timestamp: Date.now(),
|
|
2232
|
-
key: L(u) ? u : te(
|
|
2233
|
-
locale: m || (te(
|
|
2234
|
-
format: L(
|
|
2228
|
+
key: L(u) ? u : te(E) ? E.key : "",
|
|
2229
|
+
locale: m || (te(E) ? E.locale : ""),
|
|
2230
|
+
format: L(E) ? E : te(E) ? E.source : "",
|
|
2235
2231
|
message: Y
|
|
2236
2232
|
};
|
|
2237
|
-
|
|
2233
|
+
Pe.meta = J({}, e.__meta, /* @__PURE__ */ Aa() || {}), sa(Pe);
|
|
2238
2234
|
}
|
|
2239
2235
|
return Y;
|
|
2240
2236
|
}
|
|
2241
|
-
function
|
|
2237
|
+
function $a(e) {
|
|
2242
2238
|
H(e.list) ? e.list = e.list.map((t) => L(t) ? _n(t) : t) : M(e.named) && Object.keys(e.named).forEach((t) => {
|
|
2243
2239
|
L(e.named[t]) && (e.named[t] = _n(e.named[t]));
|
|
2244
2240
|
});
|
|
2245
2241
|
}
|
|
2246
|
-
function
|
|
2247
|
-
const { messages: o, onWarn: i, messageResolver: u, localeFallbacker:
|
|
2242
|
+
function hr(e, t, n, r, s, a) {
|
|
2243
|
+
const { messages: o, onWarn: i, messageResolver: u, localeFallbacker: d } = e, I = d(e, r, n);
|
|
2248
2244
|
let b = $(), N, A = null, D = n, C = null;
|
|
2249
2245
|
const S = "translate";
|
|
2250
2246
|
for (let f = 0; f < I.length; f++) {
|
|
2251
|
-
if (N = C = I[f], process.env.NODE_ENV !== "production" && n !== N && !
|
|
2247
|
+
if (N = C = I[f], process.env.NODE_ENV !== "production" && n !== N && !gr(n, N) && ft(s, t) && i(Se(Z.FALLBACK_TO_TRANSLATE, {
|
|
2252
2248
|
key: t,
|
|
2253
2249
|
target: N
|
|
2254
2250
|
})), process.env.NODE_ENV !== "production" && n !== N) {
|
|
@@ -2262,8 +2258,8 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2262
2258
|
});
|
|
2263
2259
|
}
|
|
2264
2260
|
b = o[N] || $();
|
|
2265
|
-
let m = null, h,
|
|
2266
|
-
if (process.env.NODE_ENV !== "production" && le && (m = window.performance.now(), h = "intlify-message-resolve-start",
|
|
2261
|
+
let m = null, h, E;
|
|
2262
|
+
if (process.env.NODE_ENV !== "production" && le && (m = window.performance.now(), h = "intlify-message-resolve-start", E = "intlify-message-resolve-end", ee && ee(h)), (A = u(b, t)) === null && (A = b[t]), process.env.NODE_ENV !== "production" && le) {
|
|
2267
2263
|
const O = window.performance.now(), v = e.__v_emitter;
|
|
2268
2264
|
v && m && A && v.emit("message-resolve", {
|
|
2269
2265
|
type: "message-resolve",
|
|
@@ -2271,11 +2267,11 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2271
2267
|
message: A,
|
|
2272
2268
|
time: O - m,
|
|
2273
2269
|
groupId: `${S}:${t}`
|
|
2274
|
-
}), h &&
|
|
2270
|
+
}), h && E && ee && Ae && (ee(E), Ae("intlify message resolve", h, E));
|
|
2275
2271
|
}
|
|
2276
2272
|
if (L(A) || se(A) || te(A))
|
|
2277
2273
|
break;
|
|
2278
|
-
if (!
|
|
2274
|
+
if (!Pa(N, I)) {
|
|
2279
2275
|
const O = tn(
|
|
2280
2276
|
e,
|
|
2281
2277
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -2290,7 +2286,7 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2290
2286
|
}
|
|
2291
2287
|
return [A, N, b];
|
|
2292
2288
|
}
|
|
2293
|
-
function
|
|
2289
|
+
function Ir(e, t, n, r, s, a) {
|
|
2294
2290
|
const { messageCompiler: o, warnHtmlMessage: i } = e;
|
|
2295
2291
|
if (te(r)) {
|
|
2296
2292
|
const N = r;
|
|
@@ -2300,9 +2296,9 @@ function Tr(e, t, n, r, s, a) {
|
|
|
2300
2296
|
const N = (() => r);
|
|
2301
2297
|
return N.locale = n, N.key = t, N;
|
|
2302
2298
|
}
|
|
2303
|
-
let u = null,
|
|
2304
|
-
process.env.NODE_ENV !== "production" && le && (u = window.performance.now(),
|
|
2305
|
-
const b = o(r,
|
|
2299
|
+
let u = null, d, I;
|
|
2300
|
+
process.env.NODE_ENV !== "production" && le && (u = window.performance.now(), d = "intlify-message-compilation-start", I = "intlify-message-compilation-end", ee && ee(d));
|
|
2301
|
+
const b = o(r, Ga(e, n, s, r, i, a));
|
|
2306
2302
|
if (process.env.NODE_ENV !== "production" && le) {
|
|
2307
2303
|
const N = window.performance.now(), A = e.__v_emitter;
|
|
2308
2304
|
A && u && A.emit("message-compilation", {
|
|
@@ -2310,11 +2306,11 @@ function Tr(e, t, n, r, s, a) {
|
|
|
2310
2306
|
message: r,
|
|
2311
2307
|
time: N - u,
|
|
2312
2308
|
groupId: `translate:${t}`
|
|
2313
|
-
}),
|
|
2309
|
+
}), d && I && ee && Ae && (ee(I), Ae("intlify message compilation", d, I));
|
|
2314
2310
|
}
|
|
2315
2311
|
return b.locale = n, b.key = t, b.source = r, b;
|
|
2316
2312
|
}
|
|
2317
|
-
function
|
|
2313
|
+
function Wa(e, t, n) {
|
|
2318
2314
|
let r = null, s, a;
|
|
2319
2315
|
process.env.NODE_ENV !== "production" && le && (r = window.performance.now(), s = "intlify-message-evaluation-start", a = "intlify-message-evaluation-end", ee && ee(s));
|
|
2320
2316
|
const o = t(n);
|
|
@@ -2325,7 +2321,7 @@ function wa(e, t, n) {
|
|
|
2325
2321
|
value: o,
|
|
2326
2322
|
time: i - r,
|
|
2327
2323
|
groupId: `translate:${t.key}`
|
|
2328
|
-
}), s && a && ee &&
|
|
2324
|
+
}), s && a && ee && Ae && (ee(a), Ae("intlify message evaluation", s, a));
|
|
2329
2325
|
}
|
|
2330
2326
|
return o;
|
|
2331
2327
|
}
|
|
@@ -2334,58 +2330,58 @@ function Ut(...e) {
|
|
|
2334
2330
|
if (!L(t) && !j(t) && !te(t) && !se(t))
|
|
2335
2331
|
throw de(q.INVALID_ARGUMENT);
|
|
2336
2332
|
const a = j(t) ? String(t) : (te(t), t);
|
|
2337
|
-
return j(n) ? s.plural = n : L(n) ? s.default = n : R(n) && !
|
|
2333
|
+
return j(n) ? s.plural = n : L(n) ? s.default = n : R(n) && !ct(n) ? s.named = n : H(n) && (s.list = n), j(r) ? s.plural = r : L(r) ? s.default = r : R(r) && J(s, r), [a, s];
|
|
2338
2334
|
}
|
|
2339
|
-
function
|
|
2335
|
+
function Ga(e, t, n, r, s, a) {
|
|
2340
2336
|
return {
|
|
2341
2337
|
locale: t,
|
|
2342
2338
|
key: n,
|
|
2343
2339
|
warnHtmlMessage: s,
|
|
2344
2340
|
onError: (o) => {
|
|
2345
2341
|
if (a && a(o), process.env.NODE_ENV !== "production") {
|
|
2346
|
-
const i =
|
|
2342
|
+
const i = xa(r), u = `Message compilation error: ${o.message}`, d = o.location && i && ms(i, o.location.start.offset, o.location.end.offset), I = e.__v_emitter;
|
|
2347
2343
|
I && i && I.emit("compile-error", {
|
|
2348
2344
|
message: i,
|
|
2349
2345
|
error: o.message,
|
|
2350
2346
|
start: o.location && o.location.start.offset,
|
|
2351
2347
|
end: o.location && o.location.end.offset,
|
|
2352
2348
|
groupId: `translate:${n}`
|
|
2353
|
-
}), console.error(
|
|
2354
|
-
${
|
|
2349
|
+
}), console.error(d ? `${u}
|
|
2350
|
+
${d}` : u);
|
|
2355
2351
|
} else
|
|
2356
2352
|
throw o;
|
|
2357
2353
|
},
|
|
2358
|
-
onCacheKey: (o) =>
|
|
2354
|
+
onCacheKey: (o) => as(t, n, o)
|
|
2359
2355
|
};
|
|
2360
2356
|
}
|
|
2361
|
-
function
|
|
2357
|
+
function xa(e) {
|
|
2362
2358
|
if (L(e))
|
|
2363
2359
|
return e;
|
|
2364
2360
|
if (e.loc && e.loc.source)
|
|
2365
2361
|
return e.loc.source;
|
|
2366
2362
|
}
|
|
2367
|
-
function
|
|
2368
|
-
const { modifiers: s, pluralRules: a, messageResolver: o, fallbackLocale: i, fallbackWarn: u, missingWarn:
|
|
2363
|
+
function Ha(e, t, n, r) {
|
|
2364
|
+
const { modifiers: s, pluralRules: a, messageResolver: o, fallbackLocale: i, fallbackWarn: u, missingWarn: d, fallbackContext: I } = e, N = {
|
|
2369
2365
|
locale: t,
|
|
2370
2366
|
modifiers: s,
|
|
2371
2367
|
pluralRules: a,
|
|
2372
2368
|
messages: (A, D) => {
|
|
2373
2369
|
let C = o(n, A);
|
|
2374
2370
|
if (C == null && (I || D)) {
|
|
2375
|
-
const [, , S] =
|
|
2371
|
+
const [, , S] = hr(
|
|
2376
2372
|
I || e,
|
|
2377
2373
|
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2378
2374
|
A,
|
|
2379
2375
|
t,
|
|
2380
2376
|
i,
|
|
2381
2377
|
u,
|
|
2382
|
-
|
|
2378
|
+
d
|
|
2383
2379
|
);
|
|
2384
2380
|
C = o(S, A);
|
|
2385
2381
|
}
|
|
2386
2382
|
if (L(C) || se(C)) {
|
|
2387
2383
|
let S = !1;
|
|
2388
|
-
const m =
|
|
2384
|
+
const m = Ir(e, A, t, C, A, () => {
|
|
2389
2385
|
S = !0;
|
|
2390
2386
|
});
|
|
2391
2387
|
return S ? Dn : m;
|
|
@@ -2394,23 +2390,23 @@ function Wa(e, t, n, r) {
|
|
|
2394
2390
|
};
|
|
2395
2391
|
return e.processor && (N.processor = e.processor), r.list && (N.list = r.list), r.named && (N.named = r.named), j(r.plural) && (N.pluralIndex = r.plural), N;
|
|
2396
2392
|
}
|
|
2397
|
-
|
|
2398
|
-
function
|
|
2399
|
-
return
|
|
2393
|
+
Hs();
|
|
2394
|
+
function Ya() {
|
|
2395
|
+
return Lr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2400
2396
|
}
|
|
2401
|
-
function
|
|
2397
|
+
function Lr() {
|
|
2402
2398
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2403
2399
|
}
|
|
2404
|
-
const
|
|
2405
|
-
let
|
|
2406
|
-
function
|
|
2400
|
+
const Ba = typeof Proxy == "function", Ka = "devtools-plugin:setup", ja = "plugin:settings:set";
|
|
2401
|
+
let ke, wt;
|
|
2402
|
+
function Xa() {
|
|
2407
2403
|
var e;
|
|
2408
|
-
return
|
|
2404
|
+
return ke !== void 0 || (typeof window < "u" && window.performance ? (ke = !0, wt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ke = !0, wt = globalThis.perf_hooks.performance) : ke = !1), ke;
|
|
2409
2405
|
}
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2406
|
+
function Ja() {
|
|
2407
|
+
return Xa() ? wt.now() : Date.now();
|
|
2412
2408
|
}
|
|
2413
|
-
class
|
|
2409
|
+
class Qa {
|
|
2414
2410
|
constructor(t, n) {
|
|
2415
2411
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2416
2412
|
const r = {};
|
|
@@ -2438,9 +2434,9 @@ class ja {
|
|
|
2438
2434
|
a = o;
|
|
2439
2435
|
},
|
|
2440
2436
|
now() {
|
|
2441
|
-
return
|
|
2437
|
+
return Ja();
|
|
2442
2438
|
}
|
|
2443
|
-
}, n && n.on(
|
|
2439
|
+
}, n && n.on(ja, (o, i) => {
|
|
2444
2440
|
o === this.plugin.id && this.fallbacks.setSettings(i);
|
|
2445
2441
|
}), this.proxiedOn = new Proxy({}, {
|
|
2446
2442
|
get: (o, i) => this.target ? this.target.on[i] : (...u) => {
|
|
@@ -2455,11 +2451,11 @@ class ja {
|
|
|
2455
2451
|
args: u,
|
|
2456
2452
|
resolve: () => {
|
|
2457
2453
|
}
|
|
2458
|
-
}), this.fallbacks[i](...u)) : (...u) => new Promise((
|
|
2454
|
+
}), this.fallbacks[i](...u)) : (...u) => new Promise((d) => {
|
|
2459
2455
|
this.targetQueue.push({
|
|
2460
2456
|
method: i,
|
|
2461
2457
|
args: u,
|
|
2462
|
-
resolve:
|
|
2458
|
+
resolve: d
|
|
2463
2459
|
});
|
|
2464
2460
|
})
|
|
2465
2461
|
});
|
|
@@ -2472,12 +2468,12 @@ class ja {
|
|
|
2472
2468
|
n.resolve(await this.target[n.method](...n.args));
|
|
2473
2469
|
}
|
|
2474
2470
|
}
|
|
2475
|
-
function
|
|
2476
|
-
const n = e, r =
|
|
2471
|
+
function qa(e, t) {
|
|
2472
|
+
const n = e, r = Lr(), s = Ya(), a = Ba && n.enableEarlyProxy;
|
|
2477
2473
|
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
2478
|
-
s.emit(
|
|
2474
|
+
s.emit(Ka, e, t);
|
|
2479
2475
|
else {
|
|
2480
|
-
const o = a ? new
|
|
2476
|
+
const o = a ? new Qa(n, s) : null;
|
|
2481
2477
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2482
2478
|
pluginDescriptor: n,
|
|
2483
2479
|
setupFn: t,
|
|
@@ -2485,13 +2481,13 @@ function Xa(e, t) {
|
|
|
2485
2481
|
}), o && t(o.proxiedTarget);
|
|
2486
2482
|
}
|
|
2487
2483
|
}
|
|
2488
|
-
const
|
|
2489
|
-
function
|
|
2490
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (
|
|
2484
|
+
const Za = "11.2.8";
|
|
2485
|
+
function za() {
|
|
2486
|
+
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Oe().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Oe().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Oe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Oe().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2491
2487
|
}
|
|
2492
2488
|
const G = {
|
|
2493
2489
|
// composer module errors
|
|
2494
|
-
UNEXPECTED_RETURN_TYPE:
|
|
2490
|
+
UNEXPECTED_RETURN_TYPE: oa,
|
|
2495
2491
|
// 24
|
|
2496
2492
|
// legacy module errors
|
|
2497
2493
|
INVALID_ARGUMENT: 25,
|
|
@@ -2512,9 +2508,9 @@ const G = {
|
|
|
2512
2508
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2513
2509
|
};
|
|
2514
2510
|
function z(e, ...t) {
|
|
2515
|
-
return
|
|
2511
|
+
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages: eo, args: t } : void 0);
|
|
2516
2512
|
}
|
|
2517
|
-
const
|
|
2513
|
+
const eo = {
|
|
2518
2514
|
[G.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2519
2515
|
[G.INVALID_ARGUMENT]: "Invalid argument",
|
|
2520
2516
|
[G.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
@@ -2526,8 +2522,8 @@ const qa = {
|
|
|
2526
2522
|
[G.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2527
2523
|
[G.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2528
2524
|
[G.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2529
|
-
}, Vt = /* @__PURE__ */ fe("__translateVNode"), $t = /* @__PURE__ */ fe("__datetimeParts"), Wt = /* @__PURE__ */ fe("__numberParts"),
|
|
2530
|
-
FALLBACK_TO_ROOT:
|
|
2525
|
+
}, Vt = /* @__PURE__ */ fe("__translateVNode"), $t = /* @__PURE__ */ fe("__datetimeParts"), Wt = /* @__PURE__ */ fe("__numberParts"), ye = /* @__PURE__ */ fe("__enableEmitter"), Xe = /* @__PURE__ */ fe("__disableEmitter"), Or = fe("__setPluralRules"), vr = /* @__PURE__ */ fe("__injectWithOption"), Gt = /* @__PURE__ */ fe("__dispose"), ne = {
|
|
2526
|
+
FALLBACK_TO_ROOT: Ta,
|
|
2531
2527
|
// 8
|
|
2532
2528
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2533
2529
|
IGNORE_OBJ_FLATTEN: 10,
|
|
@@ -2541,7 +2537,7 @@ const qa = {
|
|
|
2541
2537
|
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
|
|
2542
2538
|
// duplicate `useI18n` calling
|
|
2543
2539
|
DUPLICATE_USE_I18N_CALLING: 13
|
|
2544
|
-
},
|
|
2540
|
+
}, to = {
|
|
2545
2541
|
[ne.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2546
2542
|
[ne.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2547
2543
|
[ne.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
@@ -2556,8 +2552,8 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
|
|
|
2556
2552
|
[ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
|
|
2557
2553
|
[ne.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
|
|
2558
2554
|
};
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2555
|
+
function we(e, ...t) {
|
|
2556
|
+
return it(to[e], ...t);
|
|
2561
2557
|
}
|
|
2562
2558
|
function Je(e) {
|
|
2563
2559
|
if (!M(e) || se(e))
|
|
@@ -2573,14 +2569,14 @@ function Je(e) {
|
|
|
2573
2569
|
if (n[o] === "__proto__")
|
|
2574
2570
|
throw new Error(`unsafe key: ${n[o]}`);
|
|
2575
2571
|
if (n[o] in s || (s[n[o]] = $()), !M(s[n[o]])) {
|
|
2576
|
-
process.env.NODE_ENV !== "production" && ue(
|
|
2572
|
+
process.env.NODE_ENV !== "production" && ue(we(ne.IGNORE_OBJ_FLATTEN, {
|
|
2577
2573
|
key: n[o]
|
|
2578
2574
|
})), a = !0;
|
|
2579
2575
|
break;
|
|
2580
2576
|
}
|
|
2581
2577
|
s = s[n[o]];
|
|
2582
2578
|
}
|
|
2583
|
-
if (a || (se(s) ?
|
|
2579
|
+
if (a || (se(s) ? cr.includes(n[r]) || delete e[t] : (s[n[r]] = e[t], delete e[t])), !se(s)) {
|
|
2584
2580
|
const o = s[n[r]];
|
|
2585
2581
|
M(o) && Je(o);
|
|
2586
2582
|
}
|
|
@@ -2591,8 +2587,8 @@ function nn(e, t) {
|
|
|
2591
2587
|
const { messages: n, __i18n: r, messageResolver: s, flatJson: a } = t, o = R(n) ? n : H(r) ? $() : { [e]: $() };
|
|
2592
2588
|
if (H(r) && r.forEach((i) => {
|
|
2593
2589
|
if ("locale" in i && "resource" in i) {
|
|
2594
|
-
const { locale: u, resource:
|
|
2595
|
-
u ? (o[u] = o[u] || $(), rt(
|
|
2590
|
+
const { locale: u, resource: d } = i;
|
|
2591
|
+
u ? (o[u] = o[u] || $(), rt(d, o[u])) : rt(d, o);
|
|
2596
2592
|
} else
|
|
2597
2593
|
L(i) && rt(JSON.parse(i), o);
|
|
2598
2594
|
}), s == null && a)
|
|
@@ -2600,10 +2596,10 @@ function nn(e, t) {
|
|
|
2600
2596
|
oe(o, i) && Je(o[i]);
|
|
2601
2597
|
return o;
|
|
2602
2598
|
}
|
|
2603
|
-
function
|
|
2599
|
+
function Cr(e) {
|
|
2604
2600
|
return e.type;
|
|
2605
2601
|
}
|
|
2606
|
-
function
|
|
2602
|
+
function Ar(e, t, n) {
|
|
2607
2603
|
let r = M(t.messages) ? t.messages : $();
|
|
2608
2604
|
"__i18nGlobal" in n && (r = nn(e.locale.value, {
|
|
2609
2605
|
messages: r,
|
|
@@ -2629,24 +2625,24 @@ function Or(e, t, n) {
|
|
|
2629
2625
|
}
|
|
2630
2626
|
}
|
|
2631
2627
|
function Rn(e) {
|
|
2632
|
-
return
|
|
2628
|
+
return qn(Gr, null, e, 0);
|
|
2633
2629
|
}
|
|
2634
|
-
function
|
|
2630
|
+
function Me() {
|
|
2635
2631
|
const e = "currentInstance";
|
|
2636
|
-
return e in
|
|
2632
|
+
return e in At ? At[e] : At.getCurrentInstance();
|
|
2637
2633
|
}
|
|
2638
|
-
const Mn = "__INTLIFY_META__", Fn = () => [],
|
|
2634
|
+
const Mn = "__INTLIFY_META__", Fn = () => [], no = () => !1;
|
|
2639
2635
|
let Un = 0;
|
|
2640
2636
|
function wn(e) {
|
|
2641
|
-
return ((t, n, r, s) => e(n, r,
|
|
2637
|
+
return ((t, n, r, s) => e(n, r, Me() || void 0, s));
|
|
2642
2638
|
}
|
|
2643
|
-
const
|
|
2644
|
-
const e =
|
|
2639
|
+
const ro = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2640
|
+
const e = Me();
|
|
2645
2641
|
let t = null;
|
|
2646
|
-
return e && (t =
|
|
2642
|
+
return e && (t = Cr(e)[Mn]) ? { [Mn]: t } : null;
|
|
2647
2643
|
};
|
|
2648
2644
|
function rn(e = {}) {
|
|
2649
|
-
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, a = le ?
|
|
2645
|
+
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, a = le ? Yt : Vr;
|
|
2650
2646
|
let o = F(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2651
2647
|
const i = a(
|
|
2652
2648
|
// prettier-ignore
|
|
@@ -2654,17 +2650,17 @@ function rn(e = {}) {
|
|
|
2654
2650
|
), u = a(
|
|
2655
2651
|
// prettier-ignore
|
|
2656
2652
|
t && o ? t.fallbackLocale.value : L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i.value
|
|
2657
|
-
),
|
|
2658
|
-
let N = t ? t.missingWarn : F(e.missingWarn) ||
|
|
2653
|
+
), d = a(nn(i.value, e)), I = a(R(e.datetimeFormats) ? e.datetimeFormats : { [i.value]: {} }), b = a(R(e.numberFormats) ? e.numberFormats : { [i.value]: {} });
|
|
2654
|
+
let N = t ? t.missingWarn : F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, C = !!e.fallbackFormat, S = W(e.missing) ? e.missing : null, f = W(e.missing) ? wn(e.missing) : null, m = W(e.postTranslation) ? e.postTranslation : null, h = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, E = !!e.escapeParameter;
|
|
2659
2655
|
const O = t ? t.modifiers : R(e.modifiers) ? e.modifiers : {};
|
|
2660
2656
|
let v = e.pluralRules || t && t.pluralRules, p;
|
|
2661
2657
|
p = (() => {
|
|
2662
2658
|
r && Ln(null);
|
|
2663
2659
|
const _ = {
|
|
2664
|
-
version:
|
|
2660
|
+
version: Za,
|
|
2665
2661
|
locale: i.value,
|
|
2666
2662
|
fallbackLocale: u.value,
|
|
2667
|
-
messages:
|
|
2663
|
+
messages: d.value,
|
|
2668
2664
|
modifiers: O,
|
|
2669
2665
|
pluralRules: v,
|
|
2670
2666
|
missing: f === null ? void 0 : f,
|
|
@@ -2674,137 +2670,137 @@ function rn(e = {}) {
|
|
|
2674
2670
|
unresolving: !0,
|
|
2675
2671
|
postTranslation: m === null ? void 0 : m,
|
|
2676
2672
|
warnHtmlMessage: h,
|
|
2677
|
-
escapeParameter:
|
|
2673
|
+
escapeParameter: E,
|
|
2678
2674
|
messageResolver: e.messageResolver,
|
|
2679
2675
|
messageCompiler: e.messageCompiler,
|
|
2680
2676
|
__meta: { framework: "vue" }
|
|
2681
2677
|
};
|
|
2682
2678
|
_.datetimeFormats = I.value, _.numberFormats = b.value, _.__datetimeFormatters = R(p) ? p.__datetimeFormatters : void 0, _.__numberFormatters = R(p) ? p.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (_.__v_emitter = R(p) ? p.__v_emitter : void 0);
|
|
2683
|
-
const T =
|
|
2679
|
+
const T = ya(_);
|
|
2684
2680
|
return r && Ln(T), T;
|
|
2685
|
-
})(),
|
|
2681
|
+
})(), Ye(p, i.value, u.value);
|
|
2686
2682
|
function w() {
|
|
2687
2683
|
return [
|
|
2688
2684
|
i.value,
|
|
2689
2685
|
u.value,
|
|
2690
|
-
|
|
2686
|
+
d.value,
|
|
2691
2687
|
I.value,
|
|
2692
2688
|
b.value
|
|
2693
2689
|
];
|
|
2694
2690
|
}
|
|
2695
|
-
const X =
|
|
2691
|
+
const X = He({
|
|
2696
2692
|
get: () => i.value,
|
|
2697
2693
|
set: (_) => {
|
|
2698
2694
|
p.locale = _, i.value = _;
|
|
2699
2695
|
}
|
|
2700
|
-
}), ae =
|
|
2696
|
+
}), ae = He({
|
|
2701
2697
|
get: () => u.value,
|
|
2702
2698
|
set: (_) => {
|
|
2703
|
-
p.fallbackLocale = _, u.value = _,
|
|
2699
|
+
p.fallbackLocale = _, u.value = _, Ye(p, i.value, _);
|
|
2704
2700
|
}
|
|
2705
|
-
}), Y =
|
|
2706
|
-
function
|
|
2701
|
+
}), Y = He(() => d.value), Pe = /* @__PURE__ */ He(() => I.value), _t = /* @__PURE__ */ He(() => b.value);
|
|
2702
|
+
function mt() {
|
|
2707
2703
|
return W(m) ? m : null;
|
|
2708
2704
|
}
|
|
2709
|
-
function
|
|
2705
|
+
function dt(_) {
|
|
2710
2706
|
m = _, p.postTranslation = _;
|
|
2711
2707
|
}
|
|
2712
|
-
function
|
|
2708
|
+
function Et() {
|
|
2713
2709
|
return S;
|
|
2714
2710
|
}
|
|
2715
|
-
function
|
|
2711
|
+
function pt(_) {
|
|
2716
2712
|
_ !== null && (f = wn(_)), S = _, p.missing = f;
|
|
2717
2713
|
}
|
|
2718
|
-
function
|
|
2714
|
+
function gt(_, T) {
|
|
2719
2715
|
return _ !== "translate" || !T.resolvedMessage;
|
|
2720
2716
|
}
|
|
2721
|
-
const _e = (_, T, V,
|
|
2717
|
+
const _e = (_, T, V, K, he, ze) => {
|
|
2722
2718
|
w();
|
|
2723
|
-
let
|
|
2719
|
+
let De;
|
|
2724
2720
|
try {
|
|
2725
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ?
|
|
2721
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ? Sa() : void 0), De = _(p);
|
|
2726
2722
|
} finally {
|
|
2727
2723
|
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = void 0);
|
|
2728
2724
|
}
|
|
2729
2725
|
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2730
|
-
j(
|
|
2731
|
-
const [
|
|
2732
|
-
if (process.env.NODE_ENV !== "production" && t && L(
|
|
2733
|
-
key:
|
|
2726
|
+
j(De) && De === ut || V === "translate exists" && !De) {
|
|
2727
|
+
const [Ie, Rr] = T();
|
|
2728
|
+
if (process.env.NODE_ENV !== "production" && t && L(Ie) && gt(V, Rr) && (D && (ft(A, Ie) || pr(N, Ie)) && ue(we(ne.FALLBACK_TO_ROOT, {
|
|
2729
|
+
key: Ie,
|
|
2734
2730
|
type: V
|
|
2735
2731
|
})), process.env.NODE_ENV !== "production")) {
|
|
2736
2732
|
const { __v_emitter: cn } = p;
|
|
2737
2733
|
cn && D && cn.emit("fallback", {
|
|
2738
2734
|
type: V,
|
|
2739
|
-
key:
|
|
2735
|
+
key: Ie,
|
|
2740
2736
|
to: "global",
|
|
2741
|
-
groupId: `${V}:${
|
|
2737
|
+
groupId: `${V}:${Ie}`
|
|
2742
2738
|
});
|
|
2743
2739
|
}
|
|
2744
|
-
return t && D ?
|
|
2740
|
+
return t && D ? K(t) : he(Ie);
|
|
2745
2741
|
} else {
|
|
2746
|
-
if (ze(
|
|
2747
|
-
return
|
|
2742
|
+
if (ze(De))
|
|
2743
|
+
return De;
|
|
2748
2744
|
throw z(G.UNEXPECTED_RETURN_TYPE);
|
|
2749
2745
|
}
|
|
2750
2746
|
};
|
|
2751
|
-
function
|
|
2747
|
+
function $e(..._) {
|
|
2752
2748
|
return _e((T) => Reflect.apply(kn, null, [T, ..._]), () => Ut(..._), "translate", (T) => Reflect.apply(T.t, T, [..._]), (T) => T, (T) => L(T));
|
|
2753
2749
|
}
|
|
2754
|
-
function
|
|
2755
|
-
const [T, V,
|
|
2756
|
-
if (
|
|
2750
|
+
function Nt(..._) {
|
|
2751
|
+
const [T, V, K] = _;
|
|
2752
|
+
if (K && !M(K))
|
|
2757
2753
|
throw z(G.INVALID_ARGUMENT);
|
|
2758
|
-
return
|
|
2754
|
+
return $e(T, V, J({ resolvedMessage: !0 }, K || {}));
|
|
2759
2755
|
}
|
|
2760
|
-
function
|
|
2756
|
+
function Tt(..._) {
|
|
2761
2757
|
return _e((T) => Reflect.apply(Cn, null, [T, ..._]), () => Mt(..._), "datetime format", (T) => Reflect.apply(T.d, T, [..._]), () => st, (T) => L(T) || H(T));
|
|
2762
2758
|
}
|
|
2763
|
-
function
|
|
2759
|
+
function bt(..._) {
|
|
2764
2760
|
return _e((T) => Reflect.apply(Sn, null, [T, ..._]), () => Ft(..._), "number format", (T) => Reflect.apply(T.n, T, [..._]), () => st, (T) => L(T) || H(T));
|
|
2765
2761
|
}
|
|
2766
|
-
function
|
|
2762
|
+
function ht(_) {
|
|
2767
2763
|
return _.map((T) => L(T) || j(T) || F(T) ? Rn(String(T)) : T);
|
|
2768
2764
|
}
|
|
2769
|
-
const
|
|
2770
|
-
normalize:
|
|
2765
|
+
const It = {
|
|
2766
|
+
normalize: ht,
|
|
2771
2767
|
interpolate: (_) => _,
|
|
2772
2768
|
type: "vnode"
|
|
2773
2769
|
};
|
|
2774
2770
|
function qe(..._) {
|
|
2775
2771
|
return _e((T) => {
|
|
2776
2772
|
let V;
|
|
2777
|
-
const
|
|
2773
|
+
const K = T;
|
|
2778
2774
|
try {
|
|
2779
|
-
|
|
2775
|
+
K.processor = It, V = Reflect.apply(kn, null, [K, ..._]);
|
|
2780
2776
|
} finally {
|
|
2781
|
-
|
|
2777
|
+
K.processor = null;
|
|
2782
2778
|
}
|
|
2783
2779
|
return V;
|
|
2784
2780
|
}, () => Ut(..._), "translate", (T) => T[Vt](..._), (T) => [Rn(T)], (T) => H(T));
|
|
2785
2781
|
}
|
|
2786
|
-
function
|
|
2782
|
+
function Lt(..._) {
|
|
2787
2783
|
return _e((T) => Reflect.apply(Sn, null, [T, ..._]), () => Ft(..._), "number format", (T) => T[Wt](..._), Fn, (T) => L(T) || H(T));
|
|
2788
2784
|
}
|
|
2789
2785
|
function Ze(..._) {
|
|
2790
2786
|
return _e((T) => Reflect.apply(Cn, null, [T, ..._]), () => Mt(..._), "datetime format", (T) => T[$t](..._), Fn, (T) => L(T) || H(T));
|
|
2791
2787
|
}
|
|
2792
|
-
function
|
|
2788
|
+
function Ot(_) {
|
|
2793
2789
|
v = _, p.pluralRules = v;
|
|
2794
2790
|
}
|
|
2795
|
-
function
|
|
2791
|
+
function vt(_, T) {
|
|
2796
2792
|
return _e(() => {
|
|
2797
2793
|
if (!_)
|
|
2798
2794
|
return !1;
|
|
2799
|
-
const V = L(T) ? T : i.value,
|
|
2800
|
-
return se(
|
|
2801
|
-
}, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, T]),
|
|
2795
|
+
const V = L(T) ? T : i.value, K = be(V), he = p.messageResolver(K, _);
|
|
2796
|
+
return se(he) || te(he) || L(he);
|
|
2797
|
+
}, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, T]), no, (V) => F(V));
|
|
2802
2798
|
}
|
|
2803
|
-
function
|
|
2799
|
+
function We(_) {
|
|
2804
2800
|
let T = null;
|
|
2805
|
-
const V =
|
|
2806
|
-
for (let
|
|
2807
|
-
const
|
|
2801
|
+
const V = ur(p, u.value, i.value);
|
|
2802
|
+
for (let K = 0; K < V.length; K++) {
|
|
2803
|
+
const he = d.value[V[K]] || {}, ze = p.messageResolver(he, _);
|
|
2808
2804
|
if (ze != null) {
|
|
2809
2805
|
T = ze;
|
|
2810
2806
|
break;
|
|
@@ -2812,29 +2808,29 @@ function rn(e = {}) {
|
|
|
2812
2808
|
}
|
|
2813
2809
|
return T;
|
|
2814
2810
|
}
|
|
2815
|
-
function
|
|
2816
|
-
const T =
|
|
2811
|
+
function Ge(_) {
|
|
2812
|
+
const T = We(_);
|
|
2817
2813
|
return T ?? (t ? t.tm(_) || {} : {});
|
|
2818
2814
|
}
|
|
2819
|
-
function
|
|
2820
|
-
return
|
|
2815
|
+
function be(_) {
|
|
2816
|
+
return d.value[_] || {};
|
|
2821
2817
|
}
|
|
2822
|
-
function
|
|
2818
|
+
function xe(_, T) {
|
|
2823
2819
|
if (s) {
|
|
2824
2820
|
const V = { [_]: T };
|
|
2825
|
-
for (const
|
|
2826
|
-
oe(V,
|
|
2821
|
+
for (const K in V)
|
|
2822
|
+
oe(V, K) && Je(V[K]);
|
|
2827
2823
|
T = V[_];
|
|
2828
2824
|
}
|
|
2829
|
-
|
|
2825
|
+
d.value[_] = T, p.messages = d.value;
|
|
2830
2826
|
}
|
|
2831
|
-
function
|
|
2832
|
-
|
|
2827
|
+
function Ct(_, T) {
|
|
2828
|
+
d.value[_] = d.value[_] || {};
|
|
2833
2829
|
const V = { [_]: T };
|
|
2834
2830
|
if (s)
|
|
2835
|
-
for (const
|
|
2836
|
-
oe(V,
|
|
2837
|
-
T = V[_], rt(T,
|
|
2831
|
+
for (const K in V)
|
|
2832
|
+
oe(V, K) && Je(V[K]);
|
|
2833
|
+
T = V[_], rt(T, d.value[_]), p.messages = d.value;
|
|
2838
2834
|
}
|
|
2839
2835
|
function l(_) {
|
|
2840
2836
|
return I.value[_] || {};
|
|
@@ -2851,13 +2847,13 @@ function rn(e = {}) {
|
|
|
2851
2847
|
function x(_, T) {
|
|
2852
2848
|
b.value[_] = T, p.numberFormats = b.value, yn(p, _, T);
|
|
2853
2849
|
}
|
|
2854
|
-
function
|
|
2850
|
+
function B(_, T) {
|
|
2855
2851
|
b.value[_] = J(b.value[_] || {}, T), p.numberFormats = b.value, yn(p, _, T);
|
|
2856
2852
|
}
|
|
2857
|
-
Un++, t && le && (
|
|
2858
|
-
o && (i.value = _, p.locale = _,
|
|
2859
|
-
}),
|
|
2860
|
-
o && (u.value = _, p.fallbackLocale = _,
|
|
2853
|
+
Un++, t && le && (Ce(t.locale, (_) => {
|
|
2854
|
+
o && (i.value = _, p.locale = _, Ye(p, i.value, u.value));
|
|
2855
|
+
}), Ce(t.fallbackLocale, (_) => {
|
|
2856
|
+
o && (u.value = _, p.fallbackLocale = _, Ye(p, i.value, u.value));
|
|
2861
2857
|
}));
|
|
2862
2858
|
const U = {
|
|
2863
2859
|
id: Un,
|
|
@@ -2867,10 +2863,10 @@ function rn(e = {}) {
|
|
|
2867
2863
|
return o;
|
|
2868
2864
|
},
|
|
2869
2865
|
set inheritLocale(_) {
|
|
2870
|
-
o = _, _ && t && (i.value = t.locale.value, u.value = t.fallbackLocale.value,
|
|
2866
|
+
o = _, _ && t && (i.value = t.locale.value, u.value = t.fallbackLocale.value, Ye(p, i.value, u.value));
|
|
2871
2867
|
},
|
|
2872
2868
|
get availableLocales() {
|
|
2873
|
-
return Object.keys(
|
|
2869
|
+
return Object.keys(d.value).sort();
|
|
2874
2870
|
},
|
|
2875
2871
|
messages: Y,
|
|
2876
2872
|
get modifiers() {
|
|
@@ -2913,81 +2909,81 @@ function rn(e = {}) {
|
|
|
2913
2909
|
h = _, p.warnHtmlMessage = _;
|
|
2914
2910
|
},
|
|
2915
2911
|
get escapeParameter() {
|
|
2916
|
-
return
|
|
2912
|
+
return E;
|
|
2917
2913
|
},
|
|
2918
2914
|
set escapeParameter(_) {
|
|
2919
|
-
|
|
2920
|
-
},
|
|
2921
|
-
t:
|
|
2922
|
-
getLocaleMessage:
|
|
2923
|
-
setLocaleMessage:
|
|
2924
|
-
mergeLocaleMessage:
|
|
2925
|
-
getPostTranslationHandler:
|
|
2926
|
-
setPostTranslationHandler:
|
|
2927
|
-
getMissingHandler:
|
|
2928
|
-
setMissingHandler:
|
|
2929
|
-
[
|
|
2915
|
+
E = _, p.escapeParameter = _;
|
|
2916
|
+
},
|
|
2917
|
+
t: $e,
|
|
2918
|
+
getLocaleMessage: be,
|
|
2919
|
+
setLocaleMessage: xe,
|
|
2920
|
+
mergeLocaleMessage: Ct,
|
|
2921
|
+
getPostTranslationHandler: mt,
|
|
2922
|
+
setPostTranslationHandler: dt,
|
|
2923
|
+
getMissingHandler: Et,
|
|
2924
|
+
setMissingHandler: pt,
|
|
2925
|
+
[Or]: Ot
|
|
2930
2926
|
};
|
|
2931
|
-
return U.datetimeFormats =
|
|
2927
|
+
return U.datetimeFormats = Pe, U.numberFormats = _t, U.rt = Nt, U.te = vt, U.tm = Ge, U.d = Tt, U.n = bt, U.getDateTimeFormat = l, U.setDateTimeFormat = c, U.mergeDateTimeFormat = g, U.getNumberFormat = y, U.setNumberFormat = x, U.mergeNumberFormat = B, U[vr] = n, U[Vt] = qe, U[$t] = Ze, U[Wt] = Lt, process.env.NODE_ENV !== "production" && (U[ye] = (_) => {
|
|
2932
2928
|
p.__v_emitter = _;
|
|
2933
2929
|
}, U[Xe] = () => {
|
|
2934
2930
|
p.__v_emitter = void 0;
|
|
2935
2931
|
}), U;
|
|
2936
2932
|
}
|
|
2937
|
-
const
|
|
2933
|
+
const Sr = "vue-i18n: composer properties", Dt = {
|
|
2938
2934
|
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2939
2935
|
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2940
2936
|
"vue-i18n-timeline": "Vue I18n"
|
|
2941
|
-
},
|
|
2937
|
+
}, so = {
|
|
2942
2938
|
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2943
|
-
},
|
|
2939
|
+
}, ao = {
|
|
2944
2940
|
"vue-i18n-timeline": 16764185
|
|
2945
2941
|
};
|
|
2946
2942
|
let xt;
|
|
2947
|
-
async function
|
|
2943
|
+
async function oo(e, t) {
|
|
2948
2944
|
return new Promise((n, r) => {
|
|
2949
2945
|
try {
|
|
2950
|
-
|
|
2946
|
+
qa({
|
|
2951
2947
|
id: "vue-devtools-plugin-vue-i18n",
|
|
2952
|
-
label:
|
|
2948
|
+
label: Dt["vue-devtools-plugin-vue-i18n"],
|
|
2953
2949
|
packageName: "vue-i18n",
|
|
2954
2950
|
homepage: "https://vue-i18n.intlify.dev",
|
|
2955
2951
|
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
2956
|
-
componentStateTypes: [
|
|
2952
|
+
componentStateTypes: [Sr],
|
|
2957
2953
|
app: e
|
|
2958
2954
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2959
2955
|
}, (s) => {
|
|
2960
2956
|
xt = s, s.on.visitComponentTree(({ componentInstance: o, treeNode: i }) => {
|
|
2961
|
-
|
|
2957
|
+
lo(o, i, t);
|
|
2962
2958
|
}), s.on.inspectComponent(({ componentInstance: o, instanceData: i }) => {
|
|
2963
2959
|
o.__VUE_I18N__ && i && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer && Vn(i, o.__VUE_I18N__) : Vn(i, o.__VUE_I18N__));
|
|
2964
2960
|
}), s.addInspector({
|
|
2965
2961
|
id: "vue-i18n-resource-inspector",
|
|
2966
|
-
label:
|
|
2962
|
+
label: Dt["vue-i18n-resource-inspector"],
|
|
2967
2963
|
icon: "language",
|
|
2968
|
-
treeFilterPlaceholder:
|
|
2964
|
+
treeFilterPlaceholder: so["vue-i18n-resource-inspector"]
|
|
2969
2965
|
}), s.on.getInspectorTree((o) => {
|
|
2970
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2966
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && _o(o, t);
|
|
2971
2967
|
});
|
|
2972
2968
|
const a = /* @__PURE__ */ new Map();
|
|
2973
2969
|
s.on.getInspectorState(async (o) => {
|
|
2974
2970
|
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
2975
|
-
if (s.unhighlightElement(),
|
|
2971
|
+
if (s.unhighlightElement(), Eo(o, t), o.nodeId === "global") {
|
|
2976
2972
|
if (!a.has(o.app)) {
|
|
2977
2973
|
const [i] = await s.getComponentInstances(o.app);
|
|
2978
2974
|
a.set(o.app, i);
|
|
2979
2975
|
}
|
|
2980
2976
|
s.highlightElement(a.get(o.app));
|
|
2981
2977
|
} else {
|
|
2982
|
-
const i =
|
|
2978
|
+
const i = mo(o.nodeId, t);
|
|
2983
2979
|
i && s.highlightElement(i);
|
|
2984
2980
|
}
|
|
2985
2981
|
}), s.on.editInspectorState((o) => {
|
|
2986
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2982
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && go(o, t);
|
|
2987
2983
|
}), s.addTimelineLayer({
|
|
2988
2984
|
id: "vue-i18n-timeline",
|
|
2989
|
-
label:
|
|
2990
|
-
color:
|
|
2985
|
+
label: Dt["vue-i18n-timeline"],
|
|
2986
|
+
color: ao["vue-i18n-timeline"]
|
|
2991
2987
|
}), n(!0);
|
|
2992
2988
|
});
|
|
2993
2989
|
} catch (s) {
|
|
@@ -2995,14 +2991,14 @@ async function ro(e, t) {
|
|
|
2995
2991
|
}
|
|
2996
2992
|
});
|
|
2997
2993
|
}
|
|
2998
|
-
function
|
|
2994
|
+
function yr(e) {
|
|
2999
2995
|
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
3000
2996
|
}
|
|
3001
|
-
function
|
|
2997
|
+
function lo(e, t, n) {
|
|
3002
2998
|
const r = n.mode === "composition" ? n.global : n.global.__composer;
|
|
3003
2999
|
if (e && e.__VUE_I18N__ && e.__VUE_I18N__ !== r) {
|
|
3004
3000
|
const s = {
|
|
3005
|
-
label: `i18n (${
|
|
3001
|
+
label: `i18n (${yr(e)} Scope)`,
|
|
3006
3002
|
textColor: 0,
|
|
3007
3003
|
backgroundColor: 16764185
|
|
3008
3004
|
};
|
|
@@ -3010,7 +3006,7 @@ function so(e, t, n) {
|
|
|
3010
3006
|
}
|
|
3011
3007
|
}
|
|
3012
3008
|
function Vn(e, t) {
|
|
3013
|
-
const n =
|
|
3009
|
+
const n = Sr;
|
|
3014
3010
|
e.state.push({
|
|
3015
3011
|
type: n,
|
|
3016
3012
|
key: "locale",
|
|
@@ -3052,30 +3048,30 @@ function sn(e) {
|
|
|
3052
3048
|
const t = {};
|
|
3053
3049
|
return Object.keys(e).forEach((n) => {
|
|
3054
3050
|
const r = e[n];
|
|
3055
|
-
W(r) && "source" in r ? t[n] =
|
|
3051
|
+
W(r) && "source" in r ? t[n] = fo(r) : se(r) && r.loc && r.loc.source ? t[n] = r.loc.source : M(r) ? t[n] = sn(r) : t[n] = r;
|
|
3056
3052
|
}), t;
|
|
3057
3053
|
}
|
|
3058
|
-
const
|
|
3054
|
+
const io = {
|
|
3059
3055
|
"<": "<",
|
|
3060
3056
|
">": ">",
|
|
3061
3057
|
'"': """,
|
|
3062
3058
|
"&": "&"
|
|
3063
3059
|
};
|
|
3064
|
-
function
|
|
3065
|
-
return e.replace(/[<>"&]/g,
|
|
3060
|
+
function co(e) {
|
|
3061
|
+
return e.replace(/[<>"&]/g, uo);
|
|
3066
3062
|
}
|
|
3067
|
-
function
|
|
3068
|
-
return
|
|
3063
|
+
function uo(e) {
|
|
3064
|
+
return io[e] || e;
|
|
3069
3065
|
}
|
|
3070
|
-
function
|
|
3066
|
+
function fo(e) {
|
|
3071
3067
|
return {
|
|
3072
3068
|
_custom: {
|
|
3073
3069
|
type: "function",
|
|
3074
|
-
display: `<span>ƒ</span> ${e.source ? `("${
|
|
3070
|
+
display: `<span>ƒ</span> ${e.source ? `("${co(e.source)}")` : "(?)"}`
|
|
3075
3071
|
}
|
|
3076
3072
|
};
|
|
3077
3073
|
}
|
|
3078
|
-
function
|
|
3074
|
+
function _o(e, t) {
|
|
3079
3075
|
e.rootNodes.push({
|
|
3080
3076
|
id: "global",
|
|
3081
3077
|
label: "Global Scope"
|
|
@@ -3085,11 +3081,11 @@ function co(e, t) {
|
|
|
3085
3081
|
const a = t.mode === "composition" ? s : s.__composer;
|
|
3086
3082
|
n !== a && e.rootNodes.push({
|
|
3087
3083
|
id: a.id.toString(),
|
|
3088
|
-
label: `${
|
|
3084
|
+
label: `${yr(r)} Scope`
|
|
3089
3085
|
});
|
|
3090
3086
|
}
|
|
3091
3087
|
}
|
|
3092
|
-
function
|
|
3088
|
+
function mo(e, t) {
|
|
3093
3089
|
let n = null;
|
|
3094
3090
|
if (e !== "global") {
|
|
3095
3091
|
for (const [r, s] of t.__instances.entries())
|
|
@@ -3100,7 +3096,7 @@ function uo(e, t) {
|
|
|
3100
3096
|
}
|
|
3101
3097
|
return n;
|
|
3102
3098
|
}
|
|
3103
|
-
function
|
|
3099
|
+
function Pr(e, t) {
|
|
3104
3100
|
if (e === "global")
|
|
3105
3101
|
return t.mode === "composition" ? t.global : t.global.__composer;
|
|
3106
3102
|
{
|
|
@@ -3108,11 +3104,11 @@ function Ar(e, t) {
|
|
|
3108
3104
|
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
3109
3105
|
}
|
|
3110
3106
|
}
|
|
3111
|
-
function
|
|
3112
|
-
const n =
|
|
3113
|
-
return n && (e.state =
|
|
3107
|
+
function Eo(e, t) {
|
|
3108
|
+
const n = Pr(e.nodeId, t);
|
|
3109
|
+
return n && (e.state = po(n)), null;
|
|
3114
3110
|
}
|
|
3115
|
-
function
|
|
3111
|
+
function po(e) {
|
|
3116
3112
|
const t = {}, n = "Locale related info", r = [
|
|
3117
3113
|
{
|
|
3118
3114
|
type: n,
|
|
@@ -3159,7 +3155,7 @@ function _o(e) {
|
|
|
3159
3155
|
}
|
|
3160
3156
|
];
|
|
3161
3157
|
t[o] = i;
|
|
3162
|
-
const u = "Datetime formats info",
|
|
3158
|
+
const u = "Datetime formats info", d = [
|
|
3163
3159
|
{
|
|
3164
3160
|
type: u,
|
|
3165
3161
|
key: "numberFormats",
|
|
@@ -3167,7 +3163,7 @@ function _o(e) {
|
|
|
3167
3163
|
value: e.numberFormats.value
|
|
3168
3164
|
}
|
|
3169
3165
|
];
|
|
3170
|
-
t[u] =
|
|
3166
|
+
t[u] = d;
|
|
3171
3167
|
}
|
|
3172
3168
|
return t;
|
|
3173
3169
|
}
|
|
@@ -3187,15 +3183,15 @@ function Qe(e, t) {
|
|
|
3187
3183
|
});
|
|
3188
3184
|
}
|
|
3189
3185
|
}
|
|
3190
|
-
function
|
|
3191
|
-
const n =
|
|
3186
|
+
function go(e, t) {
|
|
3187
|
+
const n = Pr(e.nodeId, t);
|
|
3192
3188
|
if (n) {
|
|
3193
3189
|
const [r] = e.path;
|
|
3194
3190
|
r === "locale" && L(e.state.value) ? n.locale.value = e.state.value : r === "fallbackLocale" && (L(e.state.value) || H(e.state.value) || M(e.state.value)) ? n.fallbackLocale.value = e.state.value : r === "inheritLocale" && F(e.state.value) && (n.inheritLocale = e.state.value);
|
|
3195
3191
|
}
|
|
3196
3192
|
}
|
|
3197
|
-
function
|
|
3198
|
-
const t = L(e.locale) ? e.locale : je, n = L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) ||
|
|
3193
|
+
function No(e) {
|
|
3194
|
+
const t = L(e.locale) ? e.locale : je, n = L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) || Fe(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, a = F(e.silentFallbackWarn) || Fe(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, i = !!e.formatFallbackMessages, u = R(e.modifiers) ? e.modifiers : {}, d = e.pluralizationRules, I = W(e.postTranslation) ? e.postTranslation : void 0, b = L(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, N = !!e.escapeParameterHtml, A = F(e.sync) ? e.sync : !0;
|
|
3199
3195
|
let D = e.messages;
|
|
3200
3196
|
if (R(e.sharedMessages)) {
|
|
3201
3197
|
const O = e.sharedMessages;
|
|
@@ -3204,12 +3200,12 @@ function Eo(e) {
|
|
|
3204
3200
|
return J(w, O[k]), p;
|
|
3205
3201
|
}, D || {});
|
|
3206
3202
|
}
|
|
3207
|
-
const { __i18n: C, __root: S, __injectWithOption: f } = e, m = e.datetimeFormats, h = e.numberFormats,
|
|
3203
|
+
const { __i18n: C, __root: S, __injectWithOption: f } = e, m = e.datetimeFormats, h = e.numberFormats, E = e.flatJson;
|
|
3208
3204
|
return {
|
|
3209
3205
|
locale: t,
|
|
3210
3206
|
fallbackLocale: n,
|
|
3211
3207
|
messages: D,
|
|
3212
|
-
flatJson:
|
|
3208
|
+
flatJson: E,
|
|
3213
3209
|
datetimeFormats: m,
|
|
3214
3210
|
numberFormats: h,
|
|
3215
3211
|
missing: r,
|
|
@@ -3218,7 +3214,7 @@ function Eo(e) {
|
|
|
3218
3214
|
fallbackRoot: o,
|
|
3219
3215
|
fallbackFormat: i,
|
|
3220
3216
|
modifiers: u,
|
|
3221
|
-
pluralRules:
|
|
3217
|
+
pluralRules: d,
|
|
3222
3218
|
postTranslation: I,
|
|
3223
3219
|
warnHtmlMessage: b,
|
|
3224
3220
|
escapeParameter: N,
|
|
@@ -3230,7 +3226,7 @@ function Eo(e) {
|
|
|
3230
3226
|
};
|
|
3231
3227
|
}
|
|
3232
3228
|
function Ht(e = {}) {
|
|
3233
|
-
const t = rn(
|
|
3229
|
+
const t = rn(No(e)), { __extender: n } = e, r = {
|
|
3234
3230
|
// id
|
|
3235
3231
|
id: t.id,
|
|
3236
3232
|
// locale
|
|
@@ -3392,16 +3388,16 @@ function Ht(e = {}) {
|
|
|
3392
3388
|
};
|
|
3393
3389
|
return r.__extender = n, process.env.NODE_ENV !== "production" && (r.__enableEmitter = (s) => {
|
|
3394
3390
|
const a = t;
|
|
3395
|
-
a[
|
|
3391
|
+
a[ye] && a[ye](s);
|
|
3396
3392
|
}, r.__disableEmitter = () => {
|
|
3397
3393
|
const s = t;
|
|
3398
3394
|
s[Xe] && s[Xe]();
|
|
3399
3395
|
}), r;
|
|
3400
3396
|
}
|
|
3401
|
-
function
|
|
3397
|
+
function To(e, t, n) {
|
|
3402
3398
|
return {
|
|
3403
3399
|
beforeCreate() {
|
|
3404
|
-
const r =
|
|
3400
|
+
const r = Me();
|
|
3405
3401
|
if (!r)
|
|
3406
3402
|
throw z(G.UNEXPECTED_ERROR);
|
|
3407
3403
|
const s = this.$options;
|
|
@@ -3429,11 +3425,11 @@ function po(e, t, n) {
|
|
|
3429
3425
|
}
|
|
3430
3426
|
else
|
|
3431
3427
|
this.$i18n = e;
|
|
3432
|
-
s.__i18nGlobal &&
|
|
3428
|
+
s.__i18nGlobal && Ar(t, s, s), this.$t = (...a) => this.$i18n.t(...a), this.$rt = (...a) => this.$i18n.rt(...a), this.$te = (a, o) => this.$i18n.te(a, o), this.$d = (...a) => this.$i18n.d(...a), this.$n = (...a) => this.$i18n.n(...a), this.$tm = (a) => this.$i18n.tm(a), n.__setInstance(r, this.$i18n);
|
|
3433
3429
|
},
|
|
3434
3430
|
mounted() {
|
|
3435
3431
|
if (process.env.NODE_ENV !== "production" && this.$i18n) {
|
|
3436
|
-
const r =
|
|
3432
|
+
const r = Me();
|
|
3437
3433
|
if (!r)
|
|
3438
3434
|
return;
|
|
3439
3435
|
const s = this.$i18n;
|
|
@@ -3443,7 +3439,7 @@ function po(e, t, n) {
|
|
|
3443
3439
|
}
|
|
3444
3440
|
},
|
|
3445
3441
|
unmounted() {
|
|
3446
|
-
const r =
|
|
3442
|
+
const r = Me();
|
|
3447
3443
|
if (!r)
|
|
3448
3444
|
throw z(G.UNEXPECTED_ERROR);
|
|
3449
3445
|
const s = this.$i18n;
|
|
@@ -3452,7 +3448,7 @@ function po(e, t, n) {
|
|
|
3452
3448
|
};
|
|
3453
3449
|
}
|
|
3454
3450
|
function $n(e, t) {
|
|
3455
|
-
e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[
|
|
3451
|
+
e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[Or](t.pluralizationRules || e.pluralizationRules);
|
|
3456
3452
|
const n = nn(e.locale, {
|
|
3457
3453
|
messages: t.messages,
|
|
3458
3454
|
__i18n: t.__i18n
|
|
@@ -3477,20 +3473,20 @@ const an = {
|
|
|
3477
3473
|
type: Object
|
|
3478
3474
|
}
|
|
3479
3475
|
};
|
|
3480
|
-
function
|
|
3476
|
+
function bo({ slots: e }, t) {
|
|
3481
3477
|
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, s) => [
|
|
3482
3478
|
...r,
|
|
3483
3479
|
// prettier-ignore
|
|
3484
|
-
...s.type ===
|
|
3480
|
+
...s.type === at ? s.children : [s]
|
|
3485
3481
|
], []) : t.reduce((n, r) => {
|
|
3486
3482
|
const s = e[r];
|
|
3487
3483
|
return s && (n[r] = s()), n;
|
|
3488
3484
|
}, $());
|
|
3489
3485
|
}
|
|
3490
|
-
function
|
|
3491
|
-
return
|
|
3486
|
+
function Dr() {
|
|
3487
|
+
return at;
|
|
3492
3488
|
}
|
|
3493
|
-
const
|
|
3489
|
+
const ho = /* @__PURE__ */ ge({
|
|
3494
3490
|
/* eslint-disable */
|
|
3495
3491
|
name: "i18n-t",
|
|
3496
3492
|
props: J({
|
|
@@ -3513,31 +3509,31 @@ const No = /* @__PURE__ */ pe({
|
|
|
3513
3509
|
return () => {
|
|
3514
3510
|
const a = Object.keys(n).filter((b) => b[0] !== "_"), o = $();
|
|
3515
3511
|
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = L(e.plural) ? +e.plural : e.plural);
|
|
3516
|
-
const i =
|
|
3517
|
-
return
|
|
3512
|
+
const i = bo(t, a), u = s[Vt](e.keypath, i, o), d = J($(), r), I = L(e.tag) || M(e.tag) ? e.tag : Dr();
|
|
3513
|
+
return Zn(I, d, u);
|
|
3518
3514
|
};
|
|
3519
3515
|
}
|
|
3520
|
-
}), Wn =
|
|
3521
|
-
function
|
|
3516
|
+
}), Wn = ho;
|
|
3517
|
+
function Io(e) {
|
|
3522
3518
|
return H(e) && !L(e[0]);
|
|
3523
3519
|
}
|
|
3524
|
-
function
|
|
3520
|
+
function kr(e, t, n, r) {
|
|
3525
3521
|
const { slots: s, attrs: a } = t;
|
|
3526
3522
|
return () => {
|
|
3527
3523
|
const o = { part: !0 };
|
|
3528
3524
|
let i = $();
|
|
3529
3525
|
e.locale && (o.locale = e.locale), L(e.format) ? o.key = e.format : M(e.format) && (L(e.format.key) && (o.key = e.format.key), i = Object.keys(e.format).reduce((N, A) => n.includes(A) ? J($(), N, { [A]: e.format[A] }) : N, $()));
|
|
3530
3526
|
const u = r(e.value, o, i);
|
|
3531
|
-
let
|
|
3532
|
-
H(u) ?
|
|
3527
|
+
let d = [o.key];
|
|
3528
|
+
H(u) ? d = u.map((N, A) => {
|
|
3533
3529
|
const D = s[N.type], C = D ? D({ [N.type]: N.value, index: A, parts: u }) : [N.value];
|
|
3534
|
-
return
|
|
3535
|
-
}) : L(u) && (
|
|
3536
|
-
const I = J($(), a), b = L(e.tag) || M(e.tag) ? e.tag :
|
|
3537
|
-
return
|
|
3530
|
+
return Io(C) && (C[0].key = `${N.type}-${A}`), C;
|
|
3531
|
+
}) : L(u) && (d = [u]);
|
|
3532
|
+
const I = J($(), a), b = L(e.tag) || M(e.tag) ? e.tag : Dr();
|
|
3533
|
+
return Zn(b, I, d);
|
|
3538
3534
|
};
|
|
3539
3535
|
}
|
|
3540
|
-
const
|
|
3536
|
+
const Lo = /* @__PURE__ */ ge({
|
|
3541
3537
|
/* eslint-disable */
|
|
3542
3538
|
name: "i18n-n",
|
|
3543
3539
|
props: J({
|
|
@@ -3556,13 +3552,13 @@ const bo = /* @__PURE__ */ pe({
|
|
|
3556
3552
|
useScope: e.scope,
|
|
3557
3553
|
__useComponent: !0
|
|
3558
3554
|
});
|
|
3559
|
-
return
|
|
3555
|
+
return kr(e, t, br, (...r) => (
|
|
3560
3556
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3561
3557
|
n[Wt](...r)
|
|
3562
3558
|
));
|
|
3563
3559
|
}
|
|
3564
|
-
}), Gn =
|
|
3565
|
-
function
|
|
3560
|
+
}), Gn = Lo;
|
|
3561
|
+
function Oo(e, t) {
|
|
3566
3562
|
const n = e;
|
|
3567
3563
|
if (e.mode === "composition")
|
|
3568
3564
|
return n.__getInstance(t) || e.global;
|
|
@@ -3571,33 +3567,33 @@ function ho(e, t) {
|
|
|
3571
3567
|
return r != null ? r.__composer : e.global.__composer;
|
|
3572
3568
|
}
|
|
3573
3569
|
}
|
|
3574
|
-
function
|
|
3570
|
+
function vo(e) {
|
|
3575
3571
|
const t = (o) => {
|
|
3576
|
-
process.env.NODE_ENV !== "production" && Xt(
|
|
3572
|
+
process.env.NODE_ENV !== "production" && Xt(we(ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3577
3573
|
const { instance: i, value: u } = o;
|
|
3578
3574
|
if (!i || !i.$)
|
|
3579
3575
|
throw z(G.UNEXPECTED_ERROR);
|
|
3580
|
-
const
|
|
3576
|
+
const d = Oo(e, i.$), I = xn(u);
|
|
3581
3577
|
return [
|
|
3582
|
-
Reflect.apply(
|
|
3583
|
-
|
|
3578
|
+
Reflect.apply(d.t, d, [...Hn(I)]),
|
|
3579
|
+
d
|
|
3584
3580
|
];
|
|
3585
3581
|
};
|
|
3586
3582
|
return {
|
|
3587
3583
|
created: (o, i) => {
|
|
3588
|
-
const [u,
|
|
3589
|
-
le && e.global ===
|
|
3584
|
+
const [u, d] = t(i);
|
|
3585
|
+
le && e.global === d && (o.__i18nWatcher = Ce(d.locale, () => {
|
|
3590
3586
|
i.instance && i.instance.$forceUpdate();
|
|
3591
|
-
})), o.__composer =
|
|
3587
|
+
})), o.__composer = d, o.textContent = u;
|
|
3592
3588
|
},
|
|
3593
3589
|
unmounted: (o) => {
|
|
3594
3590
|
le && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
|
|
3595
3591
|
},
|
|
3596
3592
|
beforeUpdate: (o, { value: i }) => {
|
|
3597
3593
|
if (o.__composer) {
|
|
3598
|
-
const u = o.__composer,
|
|
3594
|
+
const u = o.__composer, d = xn(i);
|
|
3599
3595
|
o.textContent = Reflect.apply(u.t, u, [
|
|
3600
|
-
...Hn(
|
|
3596
|
+
...Hn(d)
|
|
3601
3597
|
]);
|
|
3602
3598
|
}
|
|
3603
3599
|
},
|
|
@@ -3621,22 +3617,22 @@ function Hn(e) {
|
|
|
3621
3617
|
const { path: t, locale: n, args: r, choice: s, plural: a } = e, o = {}, i = r || {};
|
|
3622
3618
|
return L(n) && (o.locale = n), j(s) && (o.plural = s), j(a) && (o.plural = a), [t, i, o];
|
|
3623
3619
|
}
|
|
3624
|
-
function
|
|
3620
|
+
function Co(e, t, ...n) {
|
|
3625
3621
|
const r = R(n[0]) ? n[0] : {};
|
|
3626
|
-
(!F(r.globalInstall) || r.globalInstall) && ([Wn.name, "I18nT"].forEach((a) => e.component(a, Wn)), [Gn.name, "I18nN"].forEach((a) => e.component(a, Gn)), [
|
|
3622
|
+
(!F(r.globalInstall) || r.globalInstall) && ([Wn.name, "I18nT"].forEach((a) => e.component(a, Wn)), [Gn.name, "I18nN"].forEach((a) => e.component(a, Gn)), [Bn.name, "I18nD"].forEach((a) => e.component(a, Bn))), e.directive("t", vo(t));
|
|
3627
3623
|
}
|
|
3628
|
-
const
|
|
3629
|
-
function
|
|
3624
|
+
const Ao = /* @__PURE__ */ fe("global-vue-i18n");
|
|
3625
|
+
function So(e = {}) {
|
|
3630
3626
|
const t = __VUE_I18N_LEGACY_API__ && F(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3631
|
-
process.env.NODE_ENV !== "production" && t && Xt(
|
|
3632
|
-
const n = F(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [s, a] =
|
|
3627
|
+
process.env.NODE_ENV !== "production" && t && Xt(we(ne.DEPRECATE_LEGACY_MODE));
|
|
3628
|
+
const n = F(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [s, a] = yo(e, t), o = /* @__PURE__ */ fe(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3633
3629
|
function i(b) {
|
|
3634
3630
|
return r.get(b) || null;
|
|
3635
3631
|
}
|
|
3636
3632
|
function u(b, N) {
|
|
3637
3633
|
r.set(b, N);
|
|
3638
3634
|
}
|
|
3639
|
-
function
|
|
3635
|
+
function d(b) {
|
|
3640
3636
|
r.delete(b);
|
|
3641
3637
|
}
|
|
3642
3638
|
const I = {
|
|
@@ -3651,12 +3647,12 @@ function vo(e = {}) {
|
|
|
3651
3647
|
I.__composerExtend = C.__composerExtend, I.__vueI18nExtend = C.__vueI18nExtend;
|
|
3652
3648
|
}
|
|
3653
3649
|
let A = null;
|
|
3654
|
-
!t && n && (A =
|
|
3650
|
+
!t && n && (A = wo(b, I.global)), __VUE_I18N_FULL_INSTALL__ && Co(b, I, ...N), __VUE_I18N_LEGACY_API__ && t && b.mixin(To(a, a.__composer, I));
|
|
3655
3651
|
const D = b.unmount;
|
|
3656
3652
|
if (b.unmount = () => {
|
|
3657
3653
|
A && A(), I.dispose(), D();
|
|
3658
3654
|
}, process.env.NODE_ENV !== "production") {
|
|
3659
|
-
if (!await
|
|
3655
|
+
if (!await oo(b, I))
|
|
3660
3656
|
throw z(G.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3661
3657
|
const S = qt();
|
|
3662
3658
|
if (t) {
|
|
@@ -3664,7 +3660,7 @@ function vo(e = {}) {
|
|
|
3664
3660
|
f.__enableEmitter && f.__enableEmitter(S);
|
|
3665
3661
|
} else {
|
|
3666
3662
|
const f = a;
|
|
3667
|
-
f[
|
|
3663
|
+
f[ye] && f[ye](S);
|
|
3668
3664
|
}
|
|
3669
3665
|
S.on("*", Qe);
|
|
3670
3666
|
}
|
|
@@ -3683,61 +3679,61 @@ function vo(e = {}) {
|
|
|
3683
3679
|
// @internal
|
|
3684
3680
|
__setInstance: u,
|
|
3685
3681
|
// @internal
|
|
3686
|
-
__deleteInstance:
|
|
3682
|
+
__deleteInstance: d
|
|
3687
3683
|
};
|
|
3688
3684
|
return I;
|
|
3689
3685
|
}
|
|
3690
3686
|
function on(e = {}) {
|
|
3691
|
-
const t =
|
|
3687
|
+
const t = Me();
|
|
3692
3688
|
if (t == null)
|
|
3693
3689
|
throw z(G.MUST_BE_CALL_SETUP_TOP);
|
|
3694
3690
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3695
3691
|
throw z(G.NOT_INSTALLED);
|
|
3696
|
-
const n =
|
|
3692
|
+
const n = Po(t), r = ko(n), s = Cr(t), a = Do(e, s);
|
|
3697
3693
|
if (a === "global")
|
|
3698
|
-
return
|
|
3694
|
+
return Ar(r, e, s), r;
|
|
3699
3695
|
if (a === "parent") {
|
|
3700
|
-
let u =
|
|
3701
|
-
return u == null && (process.env.NODE_ENV !== "production" && ue(
|
|
3696
|
+
let u = Ro(n, t, e.__useComponent);
|
|
3697
|
+
return u == null && (process.env.NODE_ENV !== "production" && ue(we(ne.NOT_FOUND_PARENT_SCOPE)), u = r), u;
|
|
3702
3698
|
}
|
|
3703
3699
|
const o = n;
|
|
3704
3700
|
let i = o.__getInstance(t);
|
|
3705
3701
|
if (i == null) {
|
|
3706
3702
|
const u = J({}, e);
|
|
3707
|
-
"__i18n" in s && (u.__i18n = s.__i18n), r && (u.__root = r), i = rn(u), o.__composerExtend && (i[Gt] = o.__composerExtend(i)),
|
|
3703
|
+
"__i18n" in s && (u.__i18n = s.__i18n), r && (u.__root = r), i = rn(u), o.__composerExtend && (i[Gt] = o.__composerExtend(i)), Fo(o, t, i), o.__setInstance(t, i);
|
|
3708
3704
|
} else
|
|
3709
|
-
process.env.NODE_ENV !== "production" && a === "local" && ue(
|
|
3705
|
+
process.env.NODE_ENV !== "production" && a === "local" && ue(we(ne.DUPLICATE_USE_I18N_CALLING));
|
|
3710
3706
|
return i;
|
|
3711
3707
|
}
|
|
3712
|
-
function
|
|
3713
|
-
const n =
|
|
3708
|
+
function yo(e, t) {
|
|
3709
|
+
const n = Ur(), r = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Ht(e)) : n.run(() => rn(e));
|
|
3714
3710
|
if (r == null)
|
|
3715
3711
|
throw z(G.UNEXPECTED_ERROR);
|
|
3716
3712
|
return [n, r];
|
|
3717
3713
|
}
|
|
3718
|
-
function
|
|
3719
|
-
const t = jn(e.isCE ?
|
|
3714
|
+
function Po(e) {
|
|
3715
|
+
const t = jn(e.isCE ? Ao : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3720
3716
|
if (!t)
|
|
3721
3717
|
throw z(e.isCE ? G.NOT_INSTALLED_WITH_PROVIDE : G.UNEXPECTED_ERROR);
|
|
3722
3718
|
return t;
|
|
3723
3719
|
}
|
|
3724
|
-
function
|
|
3725
|
-
return
|
|
3720
|
+
function Do(e, t) {
|
|
3721
|
+
return ct(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3726
3722
|
}
|
|
3727
|
-
function
|
|
3723
|
+
function ko(e) {
|
|
3728
3724
|
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3729
3725
|
}
|
|
3730
|
-
function
|
|
3726
|
+
function Ro(e, t, n = !1) {
|
|
3731
3727
|
let r = null;
|
|
3732
3728
|
const s = t.root;
|
|
3733
|
-
let a =
|
|
3729
|
+
let a = Mo(t, n);
|
|
3734
3730
|
for (; a != null; ) {
|
|
3735
3731
|
const o = e;
|
|
3736
3732
|
if (e.mode === "composition")
|
|
3737
3733
|
r = o.__getInstance(a);
|
|
3738
3734
|
else if (__VUE_I18N_LEGACY_API__) {
|
|
3739
3735
|
const i = o.__getInstance(a);
|
|
3740
|
-
i != null && (r = i.__composer, n && r && !r[
|
|
3736
|
+
i != null && (r = i.__composer, n && r && !r[vr] && (r = null));
|
|
3741
3737
|
}
|
|
3742
3738
|
if (r != null || s === a)
|
|
3743
3739
|
break;
|
|
@@ -3745,36 +3741,36 @@ function Po(e, t, n = !1) {
|
|
|
3745
3741
|
}
|
|
3746
3742
|
return r;
|
|
3747
3743
|
}
|
|
3748
|
-
function
|
|
3744
|
+
function Mo(e, t = !1) {
|
|
3749
3745
|
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3750
3746
|
}
|
|
3751
|
-
function
|
|
3747
|
+
function Fo(e, t, n) {
|
|
3752
3748
|
let r = null;
|
|
3753
|
-
|
|
3749
|
+
$r(() => {
|
|
3754
3750
|
if (process.env.NODE_ENV !== "production") {
|
|
3755
3751
|
t.__VUE_I18N__ = n, r = qt();
|
|
3756
3752
|
const s = n;
|
|
3757
|
-
s[
|
|
3753
|
+
s[ye] && s[ye](r), r.on("*", Qe);
|
|
3758
3754
|
}
|
|
3759
|
-
}, t),
|
|
3755
|
+
}, t), Wr(() => {
|
|
3760
3756
|
const s = n;
|
|
3761
3757
|
process.env.NODE_ENV !== "production" && (r && r.off("*", Qe), s[Xe] && s[Xe](), delete t.__VUE_I18N__), e.__deleteInstance(t);
|
|
3762
3758
|
const a = s[Gt];
|
|
3763
3759
|
a && (a(), delete s[Gt]);
|
|
3764
3760
|
}, t);
|
|
3765
3761
|
}
|
|
3766
|
-
const
|
|
3762
|
+
const Uo = [
|
|
3767
3763
|
"locale",
|
|
3768
3764
|
"fallbackLocale",
|
|
3769
3765
|
"availableLocales"
|
|
3770
3766
|
], Yn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3771
|
-
function
|
|
3767
|
+
function wo(e, t) {
|
|
3772
3768
|
const n = /* @__PURE__ */ Object.create(null);
|
|
3773
|
-
return
|
|
3769
|
+
return Uo.forEach((s) => {
|
|
3774
3770
|
const a = Object.getOwnPropertyDescriptor(t, s);
|
|
3775
3771
|
if (!a)
|
|
3776
3772
|
throw z(G.UNEXPECTED_ERROR);
|
|
3777
|
-
const o =
|
|
3773
|
+
const o = wr(a.value) ? {
|
|
3778
3774
|
get() {
|
|
3779
3775
|
return a.value.value;
|
|
3780
3776
|
},
|
|
@@ -3799,7 +3795,7 @@ function Mo(e, t) {
|
|
|
3799
3795
|
});
|
|
3800
3796
|
};
|
|
3801
3797
|
}
|
|
3802
|
-
const
|
|
3798
|
+
const Vo = /* @__PURE__ */ ge({
|
|
3803
3799
|
/* eslint-disable */
|
|
3804
3800
|
name: "i18n-d",
|
|
3805
3801
|
props: J({
|
|
@@ -3818,141 +3814,141 @@ const Fo = /* @__PURE__ */ pe({
|
|
|
3818
3814
|
useScope: e.scope,
|
|
3819
3815
|
__useComponent: !0
|
|
3820
3816
|
});
|
|
3821
|
-
return
|
|
3817
|
+
return kr(e, t, Tr, (...r) => (
|
|
3822
3818
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3823
3819
|
n[$t](...r)
|
|
3824
3820
|
));
|
|
3825
3821
|
}
|
|
3826
|
-
}),
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3822
|
+
}), Bn = Vo;
|
|
3823
|
+
za();
|
|
3824
|
+
La(ta);
|
|
3825
|
+
Oa(Na);
|
|
3826
|
+
va(ur);
|
|
3831
3827
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3832
|
-
const e =
|
|
3833
|
-
e.__INTLIFY__ = !0,
|
|
3828
|
+
const e = Oe();
|
|
3829
|
+
e.__INTLIFY__ = !0, na(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3834
3830
|
}
|
|
3835
3831
|
process.env.NODE_ENV;
|
|
3836
|
-
const
|
|
3837
|
-
name:
|
|
3838
|
-
supplier:
|
|
3839
|
-
version:
|
|
3840
|
-
description:
|
|
3841
|
-
category:
|
|
3842
|
-
general:
|
|
3843
|
-
ioMapping:
|
|
3844
|
-
modbusSlaveChannel:
|
|
3845
|
-
status:
|
|
3846
|
-
ethernet:
|
|
3847
|
-
modbusTcpServer:
|
|
3848
|
-
modbusTcpClient:
|
|
3849
|
-
modbusTCPSlaveDevice:
|
|
3850
|
-
company:
|
|
3851
|
-
descriptionMap:
|
|
3852
|
-
netInterface:
|
|
3853
|
-
ipAddress:
|
|
3854
|
-
subnetMask:
|
|
3855
|
-
defaultGateway:
|
|
3856
|
-
adaptedOSConfiguration:
|
|
3857
|
-
busCycleTask:
|
|
3858
|
-
defaultTask:
|
|
3859
|
-
responseTimeout:
|
|
3860
|
-
socketTimeout:
|
|
3861
|
-
reconnect:
|
|
3862
|
-
slaveIpAddress:
|
|
3863
|
-
port:
|
|
3864
|
-
watchDog:
|
|
3865
|
-
slavePort:
|
|
3866
|
-
bindToAdapter:
|
|
3867
|
-
holdingRegister:
|
|
3868
|
-
writable:
|
|
3869
|
-
inputRegister:
|
|
3870
|
-
discreteBitArea:
|
|
3871
|
-
coil:
|
|
3872
|
-
discreteInput:
|
|
3873
|
-
dataModel:
|
|
3874
|
-
startAddress:
|
|
3875
|
-
},
|
|
3876
|
-
name:
|
|
3877
|
-
supplier:
|
|
3878
|
-
version:
|
|
3879
|
-
description:
|
|
3880
|
-
category:
|
|
3881
|
-
general:
|
|
3882
|
-
ioMapping:
|
|
3883
|
-
modbusSlaveChannel:
|
|
3884
|
-
status:
|
|
3885
|
-
ethernet:
|
|
3886
|
-
modbusTcpServer:
|
|
3887
|
-
modbusTcpClient:
|
|
3888
|
-
modbusTCPSlaveDevice:
|
|
3889
|
-
company:
|
|
3890
|
-
descriptionMap:
|
|
3891
|
-
netInterface:
|
|
3892
|
-
ipAddress:
|
|
3893
|
-
subnetMask:
|
|
3894
|
-
defaultGateway:
|
|
3895
|
-
adaptedOSConfiguration:
|
|
3896
|
-
busCycleTask:
|
|
3897
|
-
defaultTask:
|
|
3898
|
-
responseTimeout:
|
|
3899
|
-
socketTimeout:
|
|
3900
|
-
reconnect:
|
|
3901
|
-
slaveIpAddress:
|
|
3902
|
-
port:
|
|
3903
|
-
watchDog:
|
|
3904
|
-
slavePort:
|
|
3905
|
-
bindToAdapter:
|
|
3906
|
-
holdingRegister:
|
|
3907
|
-
writable:
|
|
3908
|
-
inputRegister:
|
|
3909
|
-
discreteBitArea:
|
|
3910
|
-
coil:
|
|
3911
|
-
discreteInput:
|
|
3912
|
-
dataModel:
|
|
3913
|
-
startAddress:
|
|
3914
|
-
},
|
|
3915
|
-
zh:
|
|
3916
|
-
en:
|
|
3917
|
-
},
|
|
3832
|
+
const $o = "名称", Wo = "供应商", Go = "版本", xo = "描述", Ho = "类别", Yo = "通用", Bo = "I/O映射", Ko = "Modbus从站通道", jo = "状态", Xo = "以太网", Jo = "Modbus TCP服务器", Qo = "Modbus TCP客户端", qo = "Modbus TCP从站设备", Zo = "成都数字创新科技有限公司", zo = { ethernet: "一种在以太网上充当Modbus服务器的设备。", modbusTcpServer: "一种在以太网上充当Modbus TCP服务器的设备。", modbusTcpClient: "一种在以太网上充当Modbus TCP客户端的设备。", modbusTCPSlaveDevice: "一种在以太网上充当Modbus TCP从站设备。" }, el = "网络接口", tl = "IP地址", nl = "子网掩码", rl = "默认网关", sl = "适配操作系统配置", al = "总线周期任务", ol = "使用父总线循环设置", ll = "响应超时(ms)", il = "Socket超时(ms)", cl = "自动重连", ul = "从站IP地址", fl = "端口", _l = " 看门狗", ml = "从站端口", dl = "绑定到适配器", El = "保持寄存器", pl = "可写入", gl = "输入寄存器", Nl = "离散位区域", Tl = "线圈", bl = "离散输入", hl = "数据模型", Il = "起始地址", Ll = {
|
|
3833
|
+
name: $o,
|
|
3834
|
+
supplier: Wo,
|
|
3835
|
+
version: Go,
|
|
3836
|
+
description: xo,
|
|
3837
|
+
category: Ho,
|
|
3838
|
+
general: Yo,
|
|
3839
|
+
ioMapping: Bo,
|
|
3840
|
+
modbusSlaveChannel: Ko,
|
|
3841
|
+
status: jo,
|
|
3842
|
+
ethernet: Xo,
|
|
3843
|
+
modbusTcpServer: Jo,
|
|
3844
|
+
modbusTcpClient: Qo,
|
|
3845
|
+
modbusTCPSlaveDevice: qo,
|
|
3846
|
+
company: Zo,
|
|
3847
|
+
descriptionMap: zo,
|
|
3848
|
+
netInterface: el,
|
|
3849
|
+
ipAddress: tl,
|
|
3850
|
+
subnetMask: nl,
|
|
3851
|
+
defaultGateway: rl,
|
|
3852
|
+
adaptedOSConfiguration: sl,
|
|
3853
|
+
busCycleTask: al,
|
|
3854
|
+
defaultTask: ol,
|
|
3855
|
+
responseTimeout: ll,
|
|
3856
|
+
socketTimeout: il,
|
|
3857
|
+
reconnect: cl,
|
|
3858
|
+
slaveIpAddress: ul,
|
|
3859
|
+
port: fl,
|
|
3860
|
+
watchDog: _l,
|
|
3861
|
+
slavePort: ml,
|
|
3862
|
+
bindToAdapter: dl,
|
|
3863
|
+
holdingRegister: El,
|
|
3864
|
+
writable: pl,
|
|
3865
|
+
inputRegister: gl,
|
|
3866
|
+
discreteBitArea: Nl,
|
|
3867
|
+
coil: Tl,
|
|
3868
|
+
discreteInput: bl,
|
|
3869
|
+
dataModel: hl,
|
|
3870
|
+
startAddress: Il
|
|
3871
|
+
}, Ol = "Name", vl = "Supplier", Cl = "Version", Al = "Description", Sl = "Category", yl = "General", Pl = "I/O Mapping", Dl = "Modbus Slave Channel", kl = "Status", Rl = "Ethernet", Ml = "Modbus TCP Server", Fl = "Modbus TCP Client", Ul = "Modbus TCP Slave Device", wl = "Chengdu AIOSYS Innovation Technology Co., Ltd.", Vl = { ethernet: "A device that works as a Modbus Server on Ethernet.", modbusTcpServer: "A device that works as a Modbus TCP Server.", modbusTcpClient: "A device that works as a Modbus TCP Client.", modbusTCPSlaveDevice: "A device that works as a Modbus TCP Slave Device." }, $l = "Network Interface", Wl = "IP Address", Gl = "Subnet Mask", xl = "Default Gateway", Hl = "Adapted OS Configuration", Yl = "Bus Cycle Task", Bl = "Use Parent Bus Cycle Setting", Kl = "Response Timeout(ms)", jl = "Socket Timeout(ms)", Xl = "Reconnect", Jl = "Slave IP Address", Ql = "Port", ql = "Watch Dog", Zl = "Slave Port", zl = "Bind to Adapter", ei = "Holding Register", ti = "Writable", ni = "Input Register", ri = "Discrete Bit Area", si = "Coil", ai = "Discrete Input", oi = "Data Model", li = "Start Address", ii = {
|
|
3872
|
+
name: Ol,
|
|
3873
|
+
supplier: vl,
|
|
3874
|
+
version: Cl,
|
|
3875
|
+
description: Al,
|
|
3876
|
+
category: Sl,
|
|
3877
|
+
general: yl,
|
|
3878
|
+
ioMapping: Pl,
|
|
3879
|
+
modbusSlaveChannel: Dl,
|
|
3880
|
+
status: kl,
|
|
3881
|
+
ethernet: Rl,
|
|
3882
|
+
modbusTcpServer: Ml,
|
|
3883
|
+
modbusTcpClient: Fl,
|
|
3884
|
+
modbusTCPSlaveDevice: Ul,
|
|
3885
|
+
company: wl,
|
|
3886
|
+
descriptionMap: Vl,
|
|
3887
|
+
netInterface: $l,
|
|
3888
|
+
ipAddress: Wl,
|
|
3889
|
+
subnetMask: Gl,
|
|
3890
|
+
defaultGateway: xl,
|
|
3891
|
+
adaptedOSConfiguration: Hl,
|
|
3892
|
+
busCycleTask: Yl,
|
|
3893
|
+
defaultTask: Bl,
|
|
3894
|
+
responseTimeout: Kl,
|
|
3895
|
+
socketTimeout: jl,
|
|
3896
|
+
reconnect: Xl,
|
|
3897
|
+
slaveIpAddress: Jl,
|
|
3898
|
+
port: Ql,
|
|
3899
|
+
watchDog: ql,
|
|
3900
|
+
slavePort: Zl,
|
|
3901
|
+
bindToAdapter: zl,
|
|
3902
|
+
holdingRegister: ei,
|
|
3903
|
+
writable: ti,
|
|
3904
|
+
inputRegister: ni,
|
|
3905
|
+
discreteBitArea: ri,
|
|
3906
|
+
coil: si,
|
|
3907
|
+
discreteInput: ai,
|
|
3908
|
+
dataModel: oi,
|
|
3909
|
+
startAddress: li
|
|
3910
|
+
}, ci = {
|
|
3911
|
+
zh: Ll,
|
|
3912
|
+
en: ii
|
|
3913
|
+
}, Le = So({
|
|
3918
3914
|
legacy: !1,
|
|
3919
3915
|
locale: "zh",
|
|
3920
3916
|
fallbackLocale: "en",
|
|
3921
|
-
messages:
|
|
3917
|
+
messages: ci
|
|
3922
3918
|
});
|
|
3923
|
-
typeof window < "u" && (window.$t =
|
|
3919
|
+
typeof window < "u" && (window.$t = Le.global.t.bind(Le.global), Object.defineProperty(window, "$locale", {
|
|
3924
3920
|
get() {
|
|
3925
|
-
return typeof
|
|
3921
|
+
return typeof Le.global.locale == "string" ? Le.global.locale : Le.global.locale.value;
|
|
3926
3922
|
},
|
|
3927
3923
|
set(e) {
|
|
3928
|
-
|
|
3924
|
+
Le.global.locale = e;
|
|
3929
3925
|
}
|
|
3930
3926
|
}));
|
|
3931
|
-
const
|
|
3932
|
-
|
|
3933
|
-
const
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
],
|
|
3927
|
+
const ui = xr(rs).use(Le);
|
|
3928
|
+
ui.mount("#app");
|
|
3929
|
+
const fi = [
|
|
3930
|
+
Yr,
|
|
3931
|
+
Kr
|
|
3932
|
+
], Ei = {
|
|
3937
3933
|
install(e) {
|
|
3938
|
-
|
|
3934
|
+
fi.forEach((t) => {
|
|
3939
3935
|
e.component(t.name, t);
|
|
3940
3936
|
});
|
|
3941
3937
|
}
|
|
3942
3938
|
};
|
|
3943
3939
|
export {
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3940
|
+
Kr as Button2,
|
|
3941
|
+
ot as EthernetProtocolItem,
|
|
3942
|
+
jr as Input,
|
|
3943
|
+
mi as IpInput,
|
|
3944
|
+
Kt as ModbusTCPClientProtocolItem,
|
|
3945
|
+
Bt as ModbusTCPServerProtocolItem,
|
|
3950
3946
|
jt as ModbusTCPSlaveDeviceProtocolItem,
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3947
|
+
Yr as MyButton,
|
|
3948
|
+
di as MyLibPlugin,
|
|
3949
|
+
ts as ProtocolCollection,
|
|
3954
3950
|
re as ProtocolItem,
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3951
|
+
pe as ProtocolType,
|
|
3952
|
+
Ei as default,
|
|
3953
|
+
lt as protocolMap
|
|
3958
3954
|
};
|