@roudanio/awesome-comment 0.10.8 → 0.10.10

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.
@@ -1,1916 +0,0 @@
1
- function yt(e, t) {
2
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
3
- }
4
- const er = typeof window < "u", tr = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Pt = (e, t, n) => kt({ l: e, k: t, s: n }), kt = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), K = (e) => typeof e == "number" && isFinite(e), Dt = (e) => Ce(e) === "[object Date]", ve = (e) => Ce(e) === "[object RegExp]", Te = (e) => k(e) && Object.keys(e).length === 0, Z = Object.assign, Rt = Object.create, W = (e = null) => Rt(e);
5
- let Me;
6
- const we = () => Me || (Me = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : W());
7
- function Fe(e) {
8
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\//g, "&#x2F;").replace(/=/g, "&#x3D;");
9
- }
10
- function Ue(e) {
11
- return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
12
- }
13
- function vt(e) {
14
- return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (s, l, c) => `${l}="${Ue(c)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (s, l, c) => `${l}='${Ue(c)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")), [
15
- // In href, src, action, formaction attributes
16
- /(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
17
- // In style attributes within url()
18
- /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
19
- ].forEach((s) => {
20
- e = e.replace(s, "$1javascript&#58;");
21
- }), e;
22
- }
23
- const Mt = Object.prototype.hasOwnProperty;
24
- function te(e, t) {
25
- return Mt.call(e, t);
26
- }
27
- const H = Array.isArray, U = (e) => typeof e == "function", I = (e) => typeof e == "string", V = (e) => typeof e == "boolean", v = (e) => e !== null && typeof e == "object", wt = (e) => v(e) && U(e.then) && U(e.catch), Je = Object.prototype.toString, Ce = (e) => Je.call(e), k = (e) => Ce(e) === "[object Object]", Ft = (e) => e == null ? "" : H(e) || k(e) && e.toString === Je ? JSON.stringify(e, null, 2) : String(e);
28
- function Se(e, t = "") {
29
- return e.reduce((n, s, l) => l === 0 ? n + s : n + t + s, "");
30
- }
31
- const oe = (e) => !v(e) || H(e);
32
- function nr(e, t) {
33
- if (oe(e) || oe(t))
34
- throw new Error("Invalid value");
35
- const n = [{ src: e, des: t }];
36
- for (; n.length; ) {
37
- const { src: s, des: l } = n.pop();
38
- Object.keys(s).forEach((c) => {
39
- c !== "__proto__" && (v(s[c]) && !v(l[c]) && (l[c] = Array.isArray(s[c]) ? [] : W()), oe(l[c]) || oe(s[c]) ? l[c] = s[c] : n.push({ src: s[c], des: l[c] }));
40
- });
41
- }
42
- }
43
- function Ut(e, t, n) {
44
- return { line: e, column: t, offset: n };
45
- }
46
- function he(e, t, n) {
47
- return { start: e, end: t };
48
- }
49
- const P = {
50
- // tokenizer error codes
51
- EXPECTED_TOKEN: 1,
52
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
53
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
54
- UNKNOWN_ESCAPE_SEQUENCE: 4,
55
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
56
- UNBALANCED_CLOSING_BRACE: 6,
57
- UNTERMINATED_CLOSING_BRACE: 7,
58
- EMPTY_PLACEHOLDER: 8,
59
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
60
- INVALID_LINKED_FORMAT: 10,
61
- // parser error codes
62
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
63
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
64
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
65
- UNEXPECTED_LEXICAL_ANALYSIS: 14
66
- }, $t = 17;
67
- function Ie(e, t, n = {}) {
68
- const { domain: s, messages: l, args: c } = n, m = e, _ = new SyntaxError(String(m));
69
- return _.code = e, t && (_.location = t), _.domain = s, _;
70
- }
71
- function Wt(e) {
72
- throw e;
73
- }
74
- const j = " ", Kt = "\r", $ = `
75
- `, Vt = "\u2028", Yt = "\u2029";
76
- function Gt(e) {
77
- const t = e;
78
- let n = 0, s = 1, l = 1, c = 0;
79
- const m = (A) => t[A] === Kt && t[A + 1] === $, _ = (A) => t[A] === $, d = (A) => t[A] === Yt, p = (A) => t[A] === Vt, O = (A) => m(A) || _(A) || d(A) || p(A), C = () => n, g = () => s, b = () => l, y = () => c, S = (A) => m(A) || d(A) || p(A) ? $ : t[A], T = () => S(n), i = () => S(n + c);
80
- function f() {
81
- return c = 0, O(n) && (s++, l = 0), m(n) && n++, n++, l++, t[n];
82
- }
83
- function E() {
84
- return m(n + c) && c++, c++, t[n + c];
85
- }
86
- function o() {
87
- n = 0, s = 1, l = 1, c = 0;
88
- }
89
- function L(A = 0) {
90
- c = A;
91
- }
92
- function h() {
93
- const A = n + c;
94
- for (; A !== n; )
95
- f();
96
- c = 0;
97
- }
98
- return {
99
- index: C,
100
- line: g,
101
- column: b,
102
- peekOffset: y,
103
- charAt: S,
104
- currentChar: T,
105
- currentPeek: i,
106
- next: f,
107
- peek: E,
108
- reset: o,
109
- resetPeek: L,
110
- skipToPeek: h
111
- };
112
- }
113
- const J = void 0, Xt = ".", $e = "'", Ht = "tokenizer";
114
- function jt(e, t = {}) {
115
- const n = t.location !== !1, s = Gt(e), l = () => s.index(), c = () => Ut(s.line(), s.column(), s.index()), m = c(), _ = l(), d = {
116
- currentType: 13,
117
- offset: _,
118
- startLoc: m,
119
- endLoc: m,
120
- lastType: 13,
121
- lastOffset: _,
122
- lastStartLoc: m,
123
- lastEndLoc: m,
124
- braceNest: 0,
125
- inLinked: !1,
126
- text: ""
127
- }, p = () => d, { onError: O } = t;
128
- function C(r, a, u, ...N) {
129
- const D = p();
130
- if (a.column += u, a.offset += u, O) {
131
- const F = n ? he(D.startLoc, a) : null, G = Ie(r, F, {
132
- domain: Ht,
133
- args: N
134
- });
135
- O(G);
136
- }
137
- }
138
- function g(r, a, u) {
139
- r.endLoc = c(), r.currentType = a;
140
- const N = { type: a };
141
- return n && (N.loc = he(r.startLoc, r.endLoc)), u != null && (N.value = u), N;
142
- }
143
- const b = (r) => g(
144
- r,
145
- 13
146
- /* TokenTypes.EOF */
147
- );
148
- function y(r, a) {
149
- return r.currentChar() === a ? (r.next(), a) : (C(P.EXPECTED_TOKEN, c(), 0, a), "");
150
- }
151
- function S(r) {
152
- let a = "";
153
- for (; r.currentPeek() === j || r.currentPeek() === $; )
154
- a += r.currentPeek(), r.peek();
155
- return a;
156
- }
157
- function T(r) {
158
- const a = S(r);
159
- return r.skipToPeek(), a;
160
- }
161
- function i(r) {
162
- if (r === J)
163
- return !1;
164
- const a = r.charCodeAt(0);
165
- return a >= 97 && a <= 122 || // a-z
166
- a >= 65 && a <= 90 || // A-Z
167
- a === 95;
168
- }
169
- function f(r) {
170
- if (r === J)
171
- return !1;
172
- const a = r.charCodeAt(0);
173
- return a >= 48 && a <= 57;
174
- }
175
- function E(r, a) {
176
- const { currentType: u } = a;
177
- if (u !== 2)
178
- return !1;
179
- S(r);
180
- const N = i(r.currentPeek());
181
- return r.resetPeek(), N;
182
- }
183
- function o(r, a) {
184
- const { currentType: u } = a;
185
- if (u !== 2)
186
- return !1;
187
- S(r);
188
- const N = r.currentPeek() === "-" ? r.peek() : r.currentPeek(), D = f(N);
189
- return r.resetPeek(), D;
190
- }
191
- function L(r, a) {
192
- const { currentType: u } = a;
193
- if (u !== 2)
194
- return !1;
195
- S(r);
196
- const N = r.currentPeek() === $e;
197
- return r.resetPeek(), N;
198
- }
199
- function h(r, a) {
200
- const { currentType: u } = a;
201
- if (u !== 7)
202
- return !1;
203
- S(r);
204
- const N = r.currentPeek() === ".";
205
- return r.resetPeek(), N;
206
- }
207
- function A(r, a) {
208
- const { currentType: u } = a;
209
- if (u !== 8)
210
- return !1;
211
- S(r);
212
- const N = i(r.currentPeek());
213
- return r.resetPeek(), N;
214
- }
215
- function R(r, a) {
216
- const { currentType: u } = a;
217
- if (!(u === 7 || u === 11))
218
- return !1;
219
- S(r);
220
- const N = r.currentPeek() === ":";
221
- return r.resetPeek(), N;
222
- }
223
- function M(r, a) {
224
- const { currentType: u } = a;
225
- if (u !== 9)
226
- return !1;
227
- const N = () => {
228
- const F = r.currentPeek();
229
- return F === "{" ? i(r.peek()) : F === "@" || F === "|" || F === ":" || F === "." || F === j || !F ? !1 : F === $ ? (r.peek(), N()) : x(r, !1);
230
- }, D = N();
231
- return r.resetPeek(), D;
232
- }
233
- function Y(r) {
234
- S(r);
235
- const a = r.currentPeek() === "|";
236
- return r.resetPeek(), a;
237
- }
238
- function x(r, a = !0) {
239
- const u = (D = !1, F = "") => {
240
- const G = r.currentPeek();
241
- return G === "{" || G === "@" || !G ? D : G === "|" ? !(F === j || F === $) : G === j ? (r.peek(), u(!0, j)) : G === $ ? (r.peek(), u(!0, $)) : !0;
242
- }, N = u();
243
- return a && r.resetPeek(), N;
244
- }
245
- function w(r, a) {
246
- const u = r.currentChar();
247
- return u === J ? J : a(u) ? (r.next(), u) : null;
248
- }
249
- function le(r) {
250
- const a = r.charCodeAt(0);
251
- return a >= 97 && a <= 122 || // a-z
252
- a >= 65 && a <= 90 || // A-Z
253
- a >= 48 && a <= 57 || // 0-9
254
- a === 95 || // _
255
- a === 36;
256
- }
257
- function ft(r) {
258
- return w(r, le);
259
- }
260
- function dt(r) {
261
- const a = r.charCodeAt(0);
262
- return a >= 97 && a <= 122 || // a-z
263
- a >= 65 && a <= 90 || // A-Z
264
- a >= 48 && a <= 57 || // 0-9
265
- a === 95 || // _
266
- a === 36 || // $
267
- a === 45;
268
- }
269
- function mt(r) {
270
- return w(r, dt);
271
- }
272
- function _t(r) {
273
- const a = r.charCodeAt(0);
274
- return a >= 48 && a <= 57;
275
- }
276
- function Et(r) {
277
- return w(r, _t);
278
- }
279
- function pt(r) {
280
- const a = r.charCodeAt(0);
281
- return a >= 48 && a <= 57 || // 0-9
282
- a >= 65 && a <= 70 || // A-F
283
- a >= 97 && a <= 102;
284
- }
285
- function Lt(r) {
286
- return w(r, pt);
287
- }
288
- function ke(r) {
289
- let a = "", u = "";
290
- for (; a = Et(r); )
291
- u += a;
292
- return u;
293
- }
294
- function ht(r) {
295
- let a = "";
296
- for (; ; ) {
297
- const u = r.currentChar();
298
- if (u === "{" || u === "}" || u === "@" || u === "|" || !u)
299
- break;
300
- if (u === j || u === $)
301
- if (x(r))
302
- a += u, r.next();
303
- else {
304
- if (Y(r))
305
- break;
306
- a += u, r.next();
307
- }
308
- else
309
- a += u, r.next();
310
- }
311
- return a;
312
- }
313
- function Nt(r) {
314
- T(r);
315
- let a = "", u = "";
316
- for (; a = mt(r); )
317
- u += a;
318
- const N = r.currentChar();
319
- if (N && N !== "}" && N !== J && N !== j && N !== $ && N !== " ") {
320
- const D = Re(r);
321
- return C(P.INVALID_TOKEN_IN_PLACEHOLDER, c(), 0, u + D), u + D;
322
- }
323
- return r.currentChar() === J && C(P.UNTERMINATED_CLOSING_BRACE, c(), 0), u;
324
- }
325
- function gt(r) {
326
- T(r);
327
- let a = "";
328
- return r.currentChar() === "-" ? (r.next(), a += `-${ke(r)}`) : a += ke(r), r.currentChar() === J && C(P.UNTERMINATED_CLOSING_BRACE, c(), 0), a;
329
- }
330
- function Tt(r) {
331
- return r !== $e && r !== $;
332
- }
333
- function Ct(r) {
334
- T(r), y(r, "'");
335
- let a = "", u = "";
336
- for (; a = w(r, Tt); )
337
- a === "\\" ? u += St(r) : u += a;
338
- const N = r.currentChar();
339
- return N === $ || N === J ? (C(P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, c(), 0), N === $ && (r.next(), y(r, "'")), u) : (y(r, "'"), u);
340
- }
341
- function St(r) {
342
- const a = r.currentChar();
343
- switch (a) {
344
- case "\\":
345
- case "'":
346
- return r.next(), `\\${a}`;
347
- case "u":
348
- return De(r, a, 4);
349
- case "U":
350
- return De(r, a, 6);
351
- default:
352
- return C(P.UNKNOWN_ESCAPE_SEQUENCE, c(), 0, a), "";
353
- }
354
- }
355
- function De(r, a, u) {
356
- y(r, a);
357
- let N = "";
358
- for (let D = 0; D < u; D++) {
359
- const F = Lt(r);
360
- if (!F) {
361
- C(P.INVALID_UNICODE_ESCAPE_SEQUENCE, c(), 0, `\\${a}${N}${r.currentChar()}`);
362
- break;
363
- }
364
- N += F;
365
- }
366
- return `\\${a}${N}`;
367
- }
368
- function It(r) {
369
- return r !== "{" && r !== "}" && r !== j && r !== $;
370
- }
371
- function Re(r) {
372
- T(r);
373
- let a = "", u = "";
374
- for (; a = w(r, It); )
375
- u += a;
376
- return u;
377
- }
378
- function Ot(r) {
379
- let a = "", u = "";
380
- for (; a = ft(r); )
381
- u += a;
382
- return u;
383
- }
384
- function At(r) {
385
- const a = (u) => {
386
- const N = r.currentChar();
387
- return N === "{" || N === "@" || N === "|" || N === "(" || N === ")" || !N || N === j ? u : (u += N, r.next(), a(u));
388
- };
389
- return a("");
390
- }
391
- function de(r) {
392
- T(r);
393
- const a = y(
394
- r,
395
- "|"
396
- /* TokenChars.Pipe */
397
- );
398
- return T(r), a;
399
- }
400
- function me(r, a) {
401
- let u = null;
402
- switch (r.currentChar()) {
403
- case "{":
404
- return a.braceNest >= 1 && C(P.NOT_ALLOW_NEST_PLACEHOLDER, c(), 0), r.next(), u = g(
405
- a,
406
- 2,
407
- "{"
408
- /* TokenChars.BraceLeft */
409
- ), T(r), a.braceNest++, u;
410
- case "}":
411
- return a.braceNest > 0 && a.currentType === 2 && C(P.EMPTY_PLACEHOLDER, c(), 0), r.next(), u = g(
412
- a,
413
- 3,
414
- "}"
415
- /* TokenChars.BraceRight */
416
- ), a.braceNest--, a.braceNest > 0 && T(r), a.inLinked && a.braceNest === 0 && (a.inLinked = !1), u;
417
- case "@":
418
- return a.braceNest > 0 && C(P.UNTERMINATED_CLOSING_BRACE, c(), 0), u = ie(r, a) || b(a), a.braceNest = 0, u;
419
- default: {
420
- let D = !0, F = !0, G = !0;
421
- if (Y(r))
422
- return a.braceNest > 0 && C(P.UNTERMINATED_CLOSING_BRACE, c(), 0), u = g(a, 1, de(r)), a.braceNest = 0, a.inLinked = !1, u;
423
- if (a.braceNest > 0 && (a.currentType === 4 || a.currentType === 5 || a.currentType === 6))
424
- return C(P.UNTERMINATED_CLOSING_BRACE, c(), 0), a.braceNest = 0, _e(r, a);
425
- if (D = E(r, a))
426
- return u = g(a, 4, Nt(r)), T(r), u;
427
- if (F = o(r, a))
428
- return u = g(a, 5, gt(r)), T(r), u;
429
- if (G = L(r, a))
430
- return u = g(a, 6, Ct(r)), T(r), u;
431
- if (!D && !F && !G)
432
- return u = g(a, 12, Re(r)), C(P.INVALID_TOKEN_IN_PLACEHOLDER, c(), 0, u.value), T(r), u;
433
- break;
434
- }
435
- }
436
- return u;
437
- }
438
- function ie(r, a) {
439
- const { currentType: u } = a;
440
- let N = null;
441
- const D = r.currentChar();
442
- switch ((u === 7 || u === 8 || u === 11 || u === 9) && (D === $ || D === j) && C(P.INVALID_LINKED_FORMAT, c(), 0), D) {
443
- case "@":
444
- return r.next(), N = g(
445
- a,
446
- 7,
447
- "@"
448
- /* TokenChars.LinkedAlias */
449
- ), a.inLinked = !0, N;
450
- case ".":
451
- return T(r), r.next(), g(
452
- a,
453
- 8,
454
- "."
455
- /* TokenChars.LinkedDot */
456
- );
457
- case ":":
458
- return T(r), r.next(), g(
459
- a,
460
- 9,
461
- ":"
462
- /* TokenChars.LinkedDelimiter */
463
- );
464
- default:
465
- return Y(r) ? (N = g(a, 1, de(r)), a.braceNest = 0, a.inLinked = !1, N) : h(r, a) || R(r, a) ? (T(r), ie(r, a)) : A(r, a) ? (T(r), g(a, 11, Ot(r))) : M(r, a) ? (T(r), D === "{" ? me(r, a) || N : g(a, 10, At(r))) : (u === 7 && C(P.INVALID_LINKED_FORMAT, c(), 0), a.braceNest = 0, a.inLinked = !1, _e(r, a));
466
- }
467
- }
468
- function _e(r, a) {
469
- let u = {
470
- type: 13
471
- /* TokenTypes.EOF */
472
- };
473
- if (a.braceNest > 0)
474
- return me(r, a) || b(a);
475
- if (a.inLinked)
476
- return ie(r, a) || b(a);
477
- switch (r.currentChar()) {
478
- case "{":
479
- return me(r, a) || b(a);
480
- case "}":
481
- return C(P.UNBALANCED_CLOSING_BRACE, c(), 0), r.next(), g(
482
- a,
483
- 3,
484
- "}"
485
- /* TokenChars.BraceRight */
486
- );
487
- case "@":
488
- return ie(r, a) || b(a);
489
- default: {
490
- if (Y(r))
491
- return u = g(a, 1, de(r)), a.braceNest = 0, a.inLinked = !1, u;
492
- if (x(r))
493
- return g(a, 0, ht(r));
494
- break;
495
- }
496
- }
497
- return u;
498
- }
499
- function bt() {
500
- const { currentType: r, offset: a, startLoc: u, endLoc: N } = d;
501
- return d.lastType = r, d.lastOffset = a, d.lastStartLoc = u, d.lastEndLoc = N, d.offset = l(), d.startLoc = c(), s.currentChar() === J ? g(
502
- d,
503
- 13
504
- /* TokenTypes.EOF */
505
- ) : _e(s, d);
506
- }
507
- return {
508
- nextToken: bt,
509
- currentOffset: l,
510
- currentPosition: c,
511
- context: p
512
- };
513
- }
514
- const Bt = "parser", xt = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
515
- function Jt(e, t, n) {
516
- switch (e) {
517
- case "\\\\":
518
- return "\\";
519
- // eslint-disable-next-line no-useless-escape
520
- case "\\'":
521
- return "'";
522
- default: {
523
- const s = parseInt(t || n, 16);
524
- return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
525
- }
526
- }
527
- }
528
- function Qt(e = {}) {
529
- const t = e.location !== !1, { onError: n } = e;
530
- function s(i, f, E, o, ...L) {
531
- const h = i.currentPosition();
532
- if (h.offset += o, h.column += o, n) {
533
- const A = t ? he(E, h) : null, R = Ie(f, A, {
534
- domain: Bt,
535
- args: L
536
- });
537
- n(R);
538
- }
539
- }
540
- function l(i, f, E) {
541
- const o = { type: i };
542
- return t && (o.start = f, o.end = f, o.loc = { start: E, end: E }), o;
543
- }
544
- function c(i, f, E, o) {
545
- t && (i.end = f, i.loc && (i.loc.end = E));
546
- }
547
- function m(i, f) {
548
- const E = i.context(), o = l(3, E.offset, E.startLoc);
549
- return o.value = f, c(o, i.currentOffset(), i.currentPosition()), o;
550
- }
551
- function _(i, f) {
552
- const E = i.context(), { lastOffset: o, lastStartLoc: L } = E, h = l(5, o, L);
553
- return h.index = parseInt(f, 10), i.nextToken(), c(h, i.currentOffset(), i.currentPosition()), h;
554
- }
555
- function d(i, f) {
556
- const E = i.context(), { lastOffset: o, lastStartLoc: L } = E, h = l(4, o, L);
557
- return h.key = f, i.nextToken(), c(h, i.currentOffset(), i.currentPosition()), h;
558
- }
559
- function p(i, f) {
560
- const E = i.context(), { lastOffset: o, lastStartLoc: L } = E, h = l(9, o, L);
561
- return h.value = f.replace(xt, Jt), i.nextToken(), c(h, i.currentOffset(), i.currentPosition()), h;
562
- }
563
- function O(i) {
564
- const f = i.nextToken(), E = i.context(), { lastOffset: o, lastStartLoc: L } = E, h = l(8, o, L);
565
- return f.type !== 11 ? (s(i, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, E.lastStartLoc, 0), h.value = "", c(h, o, L), {
566
- nextConsumeToken: f,
567
- node: h
568
- }) : (f.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, B(f)), h.value = f.value || "", c(h, i.currentOffset(), i.currentPosition()), {
569
- node: h
570
- });
571
- }
572
- function C(i, f) {
573
- const E = i.context(), o = l(7, E.offset, E.startLoc);
574
- return o.value = f, c(o, i.currentOffset(), i.currentPosition()), o;
575
- }
576
- function g(i) {
577
- const f = i.context(), E = l(6, f.offset, f.startLoc);
578
- let o = i.nextToken();
579
- if (o.type === 8) {
580
- const L = O(i);
581
- E.modifier = L.node, o = L.nextConsumeToken || i.nextToken();
582
- }
583
- switch (o.type !== 9 && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(o)), o = i.nextToken(), o.type === 2 && (o = i.nextToken()), o.type) {
584
- case 10:
585
- o.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(o)), E.key = C(i, o.value || "");
586
- break;
587
- case 4:
588
- o.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(o)), E.key = d(i, o.value || "");
589
- break;
590
- case 5:
591
- o.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(o)), E.key = _(i, o.value || "");
592
- break;
593
- case 6:
594
- o.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(o)), E.key = p(i, o.value || "");
595
- break;
596
- default: {
597
- s(i, P.UNEXPECTED_EMPTY_LINKED_KEY, f.lastStartLoc, 0);
598
- const L = i.context(), h = l(7, L.offset, L.startLoc);
599
- return h.value = "", c(h, L.offset, L.startLoc), E.key = h, c(E, L.offset, L.startLoc), {
600
- nextConsumeToken: o,
601
- node: E
602
- };
603
- }
604
- }
605
- return c(E, i.currentOffset(), i.currentPosition()), {
606
- node: E
607
- };
608
- }
609
- function b(i) {
610
- const f = i.context(), E = f.currentType === 1 ? i.currentOffset() : f.offset, o = f.currentType === 1 ? f.endLoc : f.startLoc, L = l(2, E, o);
611
- L.items = [];
612
- let h = null;
613
- do {
614
- const M = h || i.nextToken();
615
- switch (h = null, M.type) {
616
- case 0:
617
- M.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(M)), L.items.push(m(i, M.value || ""));
618
- break;
619
- case 5:
620
- M.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(M)), L.items.push(_(i, M.value || ""));
621
- break;
622
- case 4:
623
- M.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(M)), L.items.push(d(i, M.value || ""));
624
- break;
625
- case 6:
626
- M.value == null && s(i, P.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, B(M)), L.items.push(p(i, M.value || ""));
627
- break;
628
- case 7: {
629
- const Y = g(i);
630
- L.items.push(Y.node), h = Y.nextConsumeToken || null;
631
- break;
632
- }
633
- }
634
- } while (f.currentType !== 13 && f.currentType !== 1);
635
- const A = f.currentType === 1 ? f.lastOffset : i.currentOffset(), R = f.currentType === 1 ? f.lastEndLoc : i.currentPosition();
636
- return c(L, A, R), L;
637
- }
638
- function y(i, f, E, o) {
639
- const L = i.context();
640
- let h = o.items.length === 0;
641
- const A = l(1, f, E);
642
- A.cases = [], A.cases.push(o);
643
- do {
644
- const R = b(i);
645
- h || (h = R.items.length === 0), A.cases.push(R);
646
- } while (L.currentType !== 13);
647
- return h && s(i, P.MUST_HAVE_MESSAGES_IN_PLURAL, E, 0), c(A, i.currentOffset(), i.currentPosition()), A;
648
- }
649
- function S(i) {
650
- const f = i.context(), { offset: E, startLoc: o } = f, L = b(i);
651
- return f.currentType === 13 ? L : y(i, E, o, L);
652
- }
653
- function T(i) {
654
- const f = jt(i, Z({}, e)), E = f.context(), o = l(0, E.offset, E.startLoc);
655
- return t && o.loc && (o.loc.source = i), o.body = S(f), e.onCacheKey && (o.cacheKey = e.onCacheKey(i)), E.currentType !== 13 && s(f, P.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, i[E.offset] || ""), c(o, f.currentOffset(), f.currentPosition()), o;
656
- }
657
- return { parse: T };
658
- }
659
- function B(e) {
660
- if (e.type === 13)
661
- return "EOF";
662
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
663
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
664
- }
665
- function qt(e, t = {}) {
666
- const n = {
667
- ast: e,
668
- helpers: /* @__PURE__ */ new Set()
669
- };
670
- return { context: () => n, helper: (c) => (n.helpers.add(c), c) };
671
- }
672
- function We(e, t) {
673
- for (let n = 0; n < e.length; n++)
674
- Oe(e[n], t);
675
- }
676
- function Oe(e, t) {
677
- switch (e.type) {
678
- case 1:
679
- We(e.cases, t), t.helper(
680
- "plural"
681
- /* HelperNameMap.PLURAL */
682
- );
683
- break;
684
- case 2:
685
- We(e.items, t);
686
- break;
687
- case 6: {
688
- Oe(e.key, t), t.helper(
689
- "linked"
690
- /* HelperNameMap.LINKED */
691
- ), t.helper(
692
- "type"
693
- /* HelperNameMap.TYPE */
694
- );
695
- break;
696
- }
697
- case 5:
698
- t.helper(
699
- "interpolate"
700
- /* HelperNameMap.INTERPOLATE */
701
- ), t.helper(
702
- "list"
703
- /* HelperNameMap.LIST */
704
- );
705
- break;
706
- case 4:
707
- t.helper(
708
- "interpolate"
709
- /* HelperNameMap.INTERPOLATE */
710
- ), t.helper(
711
- "named"
712
- /* HelperNameMap.NAMED */
713
- );
714
- break;
715
- }
716
- }
717
- function Zt(e, t = {}) {
718
- const n = qt(e);
719
- n.helper(
720
- "normalize"
721
- /* HelperNameMap.NORMALIZE */
722
- ), e.body && Oe(e.body, n);
723
- const s = n.context();
724
- e.helpers = Array.from(s.helpers);
725
- }
726
- function zt(e) {
727
- const t = e.body;
728
- return t.type === 2 ? Ke(t) : t.cases.forEach((n) => Ke(n)), e;
729
- }
730
- function Ke(e) {
731
- if (e.items.length === 1) {
732
- const t = e.items[0];
733
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
734
- } else {
735
- const t = [];
736
- for (let n = 0; n < e.items.length; n++) {
737
- const s = e.items[n];
738
- if (!(s.type === 3 || s.type === 9) || s.value == null)
739
- break;
740
- t.push(s.value);
741
- }
742
- if (t.length === e.items.length) {
743
- e.static = Se(t);
744
- for (let n = 0; n < e.items.length; n++) {
745
- const s = e.items[n];
746
- (s.type === 3 || s.type === 9) && delete s.value;
747
- }
748
- }
749
- }
750
- }
751
- function ne(e) {
752
- switch (e.t = e.type, e.type) {
753
- case 0: {
754
- const t = e;
755
- ne(t.body), t.b = t.body, delete t.body;
756
- break;
757
- }
758
- case 1: {
759
- const t = e, n = t.cases;
760
- for (let s = 0; s < n.length; s++)
761
- ne(n[s]);
762
- t.c = n, delete t.cases;
763
- break;
764
- }
765
- case 2: {
766
- const t = e, n = t.items;
767
- for (let s = 0; s < n.length; s++)
768
- ne(n[s]);
769
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
770
- break;
771
- }
772
- case 3:
773
- case 9:
774
- case 8:
775
- case 7: {
776
- const t = e;
777
- t.value && (t.v = t.value, delete t.value);
778
- break;
779
- }
780
- case 6: {
781
- const t = e;
782
- ne(t.key), t.k = t.key, delete t.key, t.modifier && (ne(t.modifier), t.m = t.modifier, delete t.modifier);
783
- break;
784
- }
785
- case 5: {
786
- const t = e;
787
- t.i = t.index, delete t.index;
788
- break;
789
- }
790
- case 4: {
791
- const t = e;
792
- t.k = t.key, delete t.key;
793
- break;
794
- }
795
- }
796
- delete e.type;
797
- }
798
- function en(e, t) {
799
- const { filename: n, breakLineCode: s, needIndent: l } = t, c = t.location !== !1, m = {
800
- filename: n,
801
- code: "",
802
- column: 1,
803
- line: 1,
804
- offset: 0,
805
- map: void 0,
806
- breakLineCode: s,
807
- needIndent: l,
808
- indentLevel: 0
809
- };
810
- c && e.loc && (m.source = e.loc.source);
811
- const _ = () => m;
812
- function d(S, T) {
813
- m.code += S;
814
- }
815
- function p(S, T = !0) {
816
- const i = T ? s : "";
817
- d(l ? i + " ".repeat(S) : i);
818
- }
819
- function O(S = !0) {
820
- const T = ++m.indentLevel;
821
- S && p(T);
822
- }
823
- function C(S = !0) {
824
- const T = --m.indentLevel;
825
- S && p(T);
826
- }
827
- function g() {
828
- p(m.indentLevel);
829
- }
830
- return {
831
- context: _,
832
- push: d,
833
- indent: O,
834
- deindent: C,
835
- newline: g,
836
- helper: (S) => `_${S}`,
837
- needIndent: () => m.needIndent
838
- };
839
- }
840
- function tn(e, t) {
841
- const { helper: n } = e;
842
- e.push(`${n(
843
- "linked"
844
- /* HelperNameMap.LINKED */
845
- )}(`), re(e, t.key), t.modifier ? (e.push(", "), re(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
846
- }
847
- function nn(e, t) {
848
- const { helper: n, needIndent: s } = e;
849
- e.push(`${n(
850
- "normalize"
851
- /* HelperNameMap.NORMALIZE */
852
- )}([`), e.indent(s());
853
- const l = t.items.length;
854
- for (let c = 0; c < l && (re(e, t.items[c]), c !== l - 1); c++)
855
- e.push(", ");
856
- e.deindent(s()), e.push("])");
857
- }
858
- function rn(e, t) {
859
- const { helper: n, needIndent: s } = e;
860
- if (t.cases.length > 1) {
861
- e.push(`${n(
862
- "plural"
863
- /* HelperNameMap.PLURAL */
864
- )}([`), e.indent(s());
865
- const l = t.cases.length;
866
- for (let c = 0; c < l && (re(e, t.cases[c]), c !== l - 1); c++)
867
- e.push(", ");
868
- e.deindent(s()), e.push("])");
869
- }
870
- }
871
- function sn(e, t) {
872
- t.body ? re(e, t.body) : e.push("null");
873
- }
874
- function re(e, t) {
875
- const { helper: n } = e;
876
- switch (t.type) {
877
- case 0:
878
- sn(e, t);
879
- break;
880
- case 1:
881
- rn(e, t);
882
- break;
883
- case 2:
884
- nn(e, t);
885
- break;
886
- case 6:
887
- tn(e, t);
888
- break;
889
- case 8:
890
- e.push(JSON.stringify(t.value), t);
891
- break;
892
- case 7:
893
- e.push(JSON.stringify(t.value), t);
894
- break;
895
- case 5:
896
- e.push(`${n(
897
- "interpolate"
898
- /* HelperNameMap.INTERPOLATE */
899
- )}(${n(
900
- "list"
901
- /* HelperNameMap.LIST */
902
- )}(${t.index}))`, t);
903
- break;
904
- case 4:
905
- e.push(`${n(
906
- "interpolate"
907
- /* HelperNameMap.INTERPOLATE */
908
- )}(${n(
909
- "named"
910
- /* HelperNameMap.NAMED */
911
- )}(${JSON.stringify(t.key)}))`, t);
912
- break;
913
- case 9:
914
- e.push(JSON.stringify(t.value), t);
915
- break;
916
- case 3:
917
- e.push(JSON.stringify(t.value), t);
918
- break;
919
- }
920
- }
921
- const an = (e, t = {}) => {
922
- const n = I(t.mode) ? t.mode : "normal", s = I(t.filename) ? t.filename : "message.intl";
923
- t.sourceMap;
924
- const l = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
925
- `, c = t.needIndent ? t.needIndent : n !== "arrow", m = e.helpers || [], _ = en(e, {
926
- filename: s,
927
- breakLineCode: l,
928
- needIndent: c
929
- });
930
- _.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), _.indent(c), m.length > 0 && (_.push(`const { ${Se(m.map((O) => `${O}: _${O}`), ", ")} } = ctx`), _.newline()), _.push("return "), re(_, e), _.deindent(c), _.push("}"), delete e.helpers;
931
- const { code: d, map: p } = _.context();
932
- return {
933
- ast: e,
934
- code: d,
935
- map: p ? p.toJSON() : void 0
936
- // eslint-disable-line @typescript-eslint/no-explicit-any
937
- };
938
- };
939
- function cn(e, t = {}) {
940
- const n = Z({}, t), s = !!n.jit, l = !!n.minify, c = n.optimize == null ? !0 : n.optimize, _ = Qt(n).parse(e);
941
- return s ? (c && zt(_), l && ne(_), { ast: _, code: "" }) : (Zt(_, n), an(_, n));
942
- }
943
- function ln() {
944
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (we().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (we().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
945
- }
946
- function se(e) {
947
- return v(e) && Ae(e) === 0 && (te(e, "b") || te(e, "body"));
948
- }
949
- const Qe = ["b", "body"];
950
- function on(e) {
951
- return z(e, Qe);
952
- }
953
- const qe = ["c", "cases"];
954
- function un(e) {
955
- return z(e, qe, []);
956
- }
957
- const Ze = ["s", "static"];
958
- function fn(e) {
959
- return z(e, Ze);
960
- }
961
- const ze = ["i", "items"];
962
- function dn(e) {
963
- return z(e, ze, []);
964
- }
965
- const et = ["t", "type"];
966
- function Ae(e) {
967
- return z(e, et);
968
- }
969
- const tt = ["v", "value"];
970
- function ue(e, t) {
971
- const n = z(e, tt);
972
- if (n != null)
973
- return n;
974
- throw ae(t);
975
- }
976
- const nt = ["m", "modifier"];
977
- function mn(e) {
978
- return z(e, nt);
979
- }
980
- const rt = ["k", "key"];
981
- function _n(e) {
982
- const t = z(e, rt);
983
- if (t)
984
- return t;
985
- throw ae(
986
- 6
987
- /* NodeTypes.Linked */
988
- );
989
- }
990
- function z(e, t, n) {
991
- for (let s = 0; s < t.length; s++) {
992
- const l = t[s];
993
- if (te(e, l) && e[l] != null)
994
- return e[l];
995
- }
996
- return n;
997
- }
998
- const En = [
999
- ...Qe,
1000
- ...qe,
1001
- ...Ze,
1002
- ...ze,
1003
- ...rt,
1004
- ...nt,
1005
- ...tt,
1006
- ...et
1007
- ];
1008
- function ae(e) {
1009
- return new Error(`unhandled node type: ${e}`);
1010
- }
1011
- function Ee(e) {
1012
- return (n) => pn(n, e);
1013
- }
1014
- function pn(e, t) {
1015
- const n = on(t);
1016
- if (n == null)
1017
- throw ae(
1018
- 0
1019
- /* NodeTypes.Resource */
1020
- );
1021
- if (Ae(n) === 1) {
1022
- const c = un(n);
1023
- return e.plural(c.reduce((m, _) => [
1024
- ...m,
1025
- Ve(e, _)
1026
- ], []));
1027
- } else
1028
- return Ve(e, n);
1029
- }
1030
- function Ve(e, t) {
1031
- const n = fn(t);
1032
- if (n != null)
1033
- return e.type === "text" ? n : e.normalize([n]);
1034
- {
1035
- const s = dn(t).reduce((l, c) => [...l, Ne(e, c)], []);
1036
- return e.normalize(s);
1037
- }
1038
- }
1039
- function Ne(e, t) {
1040
- const n = Ae(t);
1041
- switch (n) {
1042
- case 3:
1043
- return ue(t, n);
1044
- case 9:
1045
- return ue(t, n);
1046
- case 4: {
1047
- const s = t;
1048
- if (te(s, "k") && s.k)
1049
- return e.interpolate(e.named(s.k));
1050
- if (te(s, "key") && s.key)
1051
- return e.interpolate(e.named(s.key));
1052
- throw ae(n);
1053
- }
1054
- case 5: {
1055
- const s = t;
1056
- if (te(s, "i") && K(s.i))
1057
- return e.interpolate(e.list(s.i));
1058
- if (te(s, "index") && K(s.index))
1059
- return e.interpolate(e.list(s.index));
1060
- throw ae(n);
1061
- }
1062
- case 6: {
1063
- const s = t, l = mn(s), c = _n(s);
1064
- return e.linked(Ne(e, c), l ? Ne(e, l) : void 0, e.type);
1065
- }
1066
- case 7:
1067
- return ue(t, n);
1068
- case 8:
1069
- return ue(t, n);
1070
- default:
1071
- throw new Error(`unhandled node on format message part: ${n}`);
1072
- }
1073
- }
1074
- const Ln = (e) => e;
1075
- let fe = W();
1076
- function hn(e, t = {}) {
1077
- let n = !1;
1078
- const s = t.onError || Wt;
1079
- return t.onError = (l) => {
1080
- n = !0, s(l);
1081
- }, { ...cn(e, t), detectError: n };
1082
- }
1083
- // @__NO_SIDE_EFFECTS__
1084
- function rr(e, t) {
1085
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && I(e)) {
1086
- V(t.warnHtmlMessage) && t.warnHtmlMessage;
1087
- const s = (t.onCacheKey || Ln)(e), l = fe[s];
1088
- if (l)
1089
- return l;
1090
- const { ast: c, detectError: m } = hn(e, {
1091
- ...t,
1092
- location: !1,
1093
- jit: !0
1094
- }), _ = Ee(c);
1095
- return m ? _ : fe[s] = _;
1096
- } else {
1097
- const n = e.cacheKey;
1098
- if (n) {
1099
- const s = fe[n];
1100
- return s || (fe[n] = Ee(e));
1101
- } else
1102
- return Ee(e);
1103
- }
1104
- }
1105
- let ce = null;
1106
- function sr(e) {
1107
- ce = e;
1108
- }
1109
- function Nn(e, t, n) {
1110
- ce && ce.emit("i18n:init", {
1111
- timestamp: Date.now(),
1112
- i18n: e,
1113
- version: t,
1114
- meta: n
1115
- });
1116
- }
1117
- const gn = /* @__PURE__ */ Tn("function:translate");
1118
- function Tn(e) {
1119
- return (t) => ce && ce.emit(e, t);
1120
- }
1121
- const Q = {
1122
- INVALID_ARGUMENT: $t,
1123
- // 17
1124
- INVALID_DATE_ARGUMENT: 18,
1125
- INVALID_ISO_DATE_ARGUMENT: 19,
1126
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1127
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1128
- NOT_SUPPORT_LOCALE_TYPE: 23
1129
- }, ar = 24;
1130
- function q(e) {
1131
- return Ie(e, null, void 0);
1132
- }
1133
- function be(e, t) {
1134
- return t.locale != null ? Ye(t.locale) : Ye(e.locale);
1135
- }
1136
- let pe;
1137
- function Ye(e) {
1138
- if (I(e))
1139
- return e;
1140
- if (U(e)) {
1141
- if (e.resolvedOnce && pe != null)
1142
- return pe;
1143
- if (e.constructor.name === "Function") {
1144
- const t = e();
1145
- if (wt(t))
1146
- throw q(Q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1147
- return pe = t;
1148
- } else
1149
- throw q(Q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1150
- } else
1151
- throw q(Q.NOT_SUPPORT_LOCALE_TYPE);
1152
- }
1153
- function Cn(e, t, n) {
1154
- return [.../* @__PURE__ */ new Set([
1155
- n,
1156
- ...H(t) ? t : v(t) ? Object.keys(t) : I(t) ? [t] : [n]
1157
- ])];
1158
- }
1159
- function cr(e, t, n) {
1160
- const s = I(n) ? n : ge, l = e;
1161
- l.__localeChainCache || (l.__localeChainCache = /* @__PURE__ */ new Map());
1162
- let c = l.__localeChainCache.get(s);
1163
- if (!c) {
1164
- c = [];
1165
- let m = [n];
1166
- for (; H(m); )
1167
- m = Ge(c, m, t);
1168
- const _ = H(t) || !k(t) ? t : t.default ? t.default : null;
1169
- m = I(_) ? [_] : _, H(m) && Ge(c, m, !1), l.__localeChainCache.set(s, c);
1170
- }
1171
- return c;
1172
- }
1173
- function Ge(e, t, n) {
1174
- let s = !0;
1175
- for (let l = 0; l < t.length && V(s); l++) {
1176
- const c = t[l];
1177
- I(c) && (s = Sn(e, t[l], n));
1178
- }
1179
- return s;
1180
- }
1181
- function Sn(e, t, n) {
1182
- let s;
1183
- const l = t.split("-");
1184
- do {
1185
- const c = l.join("-");
1186
- s = In(e, c, n), l.splice(-1, 1);
1187
- } while (l.length && s === !0);
1188
- return s;
1189
- }
1190
- function In(e, t, n) {
1191
- let s = !1;
1192
- if (!e.includes(t) && (s = !0, t)) {
1193
- s = t[t.length - 1] !== "!";
1194
- const l = t.replace(/!/g, "");
1195
- e.push(l), (H(n) || k(n)) && n[l] && (s = n[l]);
1196
- }
1197
- return s;
1198
- }
1199
- const ee = [];
1200
- ee[
1201
- 0
1202
- /* States.BEFORE_PATH */
1203
- ] = {
1204
- w: [
1205
- 0
1206
- /* States.BEFORE_PATH */
1207
- ],
1208
- i: [
1209
- 3,
1210
- 0
1211
- /* Actions.APPEND */
1212
- ],
1213
- "[": [
1214
- 4
1215
- /* States.IN_SUB_PATH */
1216
- ],
1217
- o: [
1218
- 7
1219
- /* States.AFTER_PATH */
1220
- ]
1221
- };
1222
- ee[
1223
- 1
1224
- /* States.IN_PATH */
1225
- ] = {
1226
- w: [
1227
- 1
1228
- /* States.IN_PATH */
1229
- ],
1230
- ".": [
1231
- 2
1232
- /* States.BEFORE_IDENT */
1233
- ],
1234
- "[": [
1235
- 4
1236
- /* States.IN_SUB_PATH */
1237
- ],
1238
- o: [
1239
- 7
1240
- /* States.AFTER_PATH */
1241
- ]
1242
- };
1243
- ee[
1244
- 2
1245
- /* States.BEFORE_IDENT */
1246
- ] = {
1247
- w: [
1248
- 2
1249
- /* States.BEFORE_IDENT */
1250
- ],
1251
- i: [
1252
- 3,
1253
- 0
1254
- /* Actions.APPEND */
1255
- ],
1256
- 0: [
1257
- 3,
1258
- 0
1259
- /* Actions.APPEND */
1260
- ]
1261
- };
1262
- ee[
1263
- 3
1264
- /* States.IN_IDENT */
1265
- ] = {
1266
- i: [
1267
- 3,
1268
- 0
1269
- /* Actions.APPEND */
1270
- ],
1271
- 0: [
1272
- 3,
1273
- 0
1274
- /* Actions.APPEND */
1275
- ],
1276
- w: [
1277
- 1,
1278
- 1
1279
- /* Actions.PUSH */
1280
- ],
1281
- ".": [
1282
- 2,
1283
- 1
1284
- /* Actions.PUSH */
1285
- ],
1286
- "[": [
1287
- 4,
1288
- 1
1289
- /* Actions.PUSH */
1290
- ],
1291
- o: [
1292
- 7,
1293
- 1
1294
- /* Actions.PUSH */
1295
- ]
1296
- };
1297
- ee[
1298
- 4
1299
- /* States.IN_SUB_PATH */
1300
- ] = {
1301
- "'": [
1302
- 5,
1303
- 0
1304
- /* Actions.APPEND */
1305
- ],
1306
- '"': [
1307
- 6,
1308
- 0
1309
- /* Actions.APPEND */
1310
- ],
1311
- "[": [
1312
- 4,
1313
- 2
1314
- /* Actions.INC_SUB_PATH_DEPTH */
1315
- ],
1316
- "]": [
1317
- 1,
1318
- 3
1319
- /* Actions.PUSH_SUB_PATH */
1320
- ],
1321
- o: 8,
1322
- l: [
1323
- 4,
1324
- 0
1325
- /* Actions.APPEND */
1326
- ]
1327
- };
1328
- ee[
1329
- 5
1330
- /* States.IN_SINGLE_QUOTE */
1331
- ] = {
1332
- "'": [
1333
- 4,
1334
- 0
1335
- /* Actions.APPEND */
1336
- ],
1337
- o: 8,
1338
- l: [
1339
- 5,
1340
- 0
1341
- /* Actions.APPEND */
1342
- ]
1343
- };
1344
- ee[
1345
- 6
1346
- /* States.IN_DOUBLE_QUOTE */
1347
- ] = {
1348
- '"': [
1349
- 4,
1350
- 0
1351
- /* Actions.APPEND */
1352
- ],
1353
- o: 8,
1354
- l: [
1355
- 6,
1356
- 0
1357
- /* Actions.APPEND */
1358
- ]
1359
- };
1360
- const On = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1361
- function An(e) {
1362
- return On.test(e);
1363
- }
1364
- function bn(e) {
1365
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1366
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1367
- }
1368
- function yn(e) {
1369
- if (e == null)
1370
- return "o";
1371
- switch (e.charCodeAt(0)) {
1372
- case 91:
1373
- // [
1374
- case 93:
1375
- // ]
1376
- case 46:
1377
- // .
1378
- case 34:
1379
- // "
1380
- case 39:
1381
- return e;
1382
- case 95:
1383
- // _
1384
- case 36:
1385
- // $
1386
- case 45:
1387
- return "i";
1388
- case 9:
1389
- // Tab (HT)
1390
- case 10:
1391
- // Newline (LF)
1392
- case 13:
1393
- // Return (CR)
1394
- case 160:
1395
- // No-break space (NBSP)
1396
- case 65279:
1397
- // Byte Order Mark (BOM)
1398
- case 8232:
1399
- // Line Separator (LS)
1400
- case 8233:
1401
- return "w";
1402
- }
1403
- return "i";
1404
- }
1405
- function Pn(e) {
1406
- const t = e.trim();
1407
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : An(t) ? bn(t) : "*" + t;
1408
- }
1409
- function kn(e) {
1410
- const t = [];
1411
- let n = -1, s = 0, l = 0, c, m, _, d, p, O, C;
1412
- const g = [];
1413
- g[
1414
- 0
1415
- /* Actions.APPEND */
1416
- ] = () => {
1417
- m === void 0 ? m = _ : m += _;
1418
- }, g[
1419
- 1
1420
- /* Actions.PUSH */
1421
- ] = () => {
1422
- m !== void 0 && (t.push(m), m = void 0);
1423
- }, g[
1424
- 2
1425
- /* Actions.INC_SUB_PATH_DEPTH */
1426
- ] = () => {
1427
- g[
1428
- 0
1429
- /* Actions.APPEND */
1430
- ](), l++;
1431
- }, g[
1432
- 3
1433
- /* Actions.PUSH_SUB_PATH */
1434
- ] = () => {
1435
- if (l > 0)
1436
- l--, s = 4, g[
1437
- 0
1438
- /* Actions.APPEND */
1439
- ]();
1440
- else {
1441
- if (l = 0, m === void 0 || (m = Pn(m), m === !1))
1442
- return !1;
1443
- g[
1444
- 1
1445
- /* Actions.PUSH */
1446
- ]();
1447
- }
1448
- };
1449
- function b() {
1450
- const y = e[n + 1];
1451
- if (s === 5 && y === "'" || s === 6 && y === '"')
1452
- return n++, _ = "\\" + y, g[
1453
- 0
1454
- /* Actions.APPEND */
1455
- ](), !0;
1456
- }
1457
- for (; s !== null; )
1458
- if (n++, c = e[n], !(c === "\\" && b())) {
1459
- if (d = yn(c), C = ee[s], p = C[d] || C.l || 8, p === 8 || (s = p[0], p[1] !== void 0 && (O = g[p[1]], O && (_ = c, O() === !1))))
1460
- return;
1461
- if (s === 7)
1462
- return t;
1463
- }
1464
- }
1465
- const Xe = /* @__PURE__ */ new Map();
1466
- function Dn(e, t) {
1467
- return v(e) ? e[t] : null;
1468
- }
1469
- function lr(e, t) {
1470
- if (!v(e))
1471
- return null;
1472
- let n = Xe.get(t);
1473
- if (n || (n = kn(t), n && Xe.set(t, n)), !n)
1474
- return null;
1475
- const s = n.length;
1476
- let l = e, c = 0;
1477
- for (; c < s; ) {
1478
- const m = n[c];
1479
- if (En.includes(m) && se(l))
1480
- return null;
1481
- const _ = l[m];
1482
- if (_ === void 0 || U(l))
1483
- return null;
1484
- l = _, c++;
1485
- }
1486
- return l;
1487
- }
1488
- const Rn = "11.2.8", ye = -1, ge = "en-US", ir = "", He = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1489
- function vn() {
1490
- return {
1491
- upper: (e, t) => t === "text" && I(e) ? e.toUpperCase() : t === "vnode" && v(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1492
- lower: (e, t) => t === "text" && I(e) ? e.toLowerCase() : t === "vnode" && v(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1493
- capitalize: (e, t) => t === "text" && I(e) ? He(e) : t === "vnode" && v(e) && "__v_isVNode" in e ? He(e.children) : e
1494
- };
1495
- }
1496
- let st;
1497
- function or(e) {
1498
- st = e;
1499
- }
1500
- let at;
1501
- function ur(e) {
1502
- at = e;
1503
- }
1504
- let ct;
1505
- function fr(e) {
1506
- ct = e;
1507
- }
1508
- let lt = null;
1509
- const dr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1510
- lt = e;
1511
- }, Mn = /* @__NO_SIDE_EFFECTS__ */ () => lt;
1512
- let it = null;
1513
- const mr = (e) => {
1514
- it = e;
1515
- }, _r = () => it;
1516
- let je = 0;
1517
- function Er(e = {}) {
1518
- const t = U(e.onWarn) ? e.onWarn : yt, n = I(e.version) ? e.version : Rn, s = I(e.locale) || U(e.locale) ? e.locale : ge, l = U(s) ? ge : s, c = H(e.fallbackLocale) || k(e.fallbackLocale) || I(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l, m = k(e.messages) ? e.messages : Le(l), _ = k(e.datetimeFormats) ? e.datetimeFormats : Le(l), d = k(e.numberFormats) ? e.numberFormats : Le(l), p = Z(W(), e.modifiers, vn()), O = e.pluralRules || W(), C = U(e.missing) ? e.missing : null, g = V(e.missingWarn) || ve(e.missingWarn) ? e.missingWarn : !0, b = V(e.fallbackWarn) || ve(e.fallbackWarn) ? e.fallbackWarn : !0, y = !!e.fallbackFormat, S = !!e.unresolving, T = U(e.postTranslation) ? e.postTranslation : null, i = k(e.processor) ? e.processor : null, f = V(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, E = !!e.escapeParameter, o = U(e.messageCompiler) ? e.messageCompiler : st, L = U(e.messageResolver) ? e.messageResolver : at || Dn, h = U(e.localeFallbacker) ? e.localeFallbacker : ct || Cn, A = v(e.fallbackContext) ? e.fallbackContext : void 0, R = e, M = v(R.__datetimeFormatters) ? R.__datetimeFormatters : /* @__PURE__ */ new Map(), Y = v(R.__numberFormatters) ? R.__numberFormatters : /* @__PURE__ */ new Map(), x = v(R.__meta) ? R.__meta : {};
1519
- je++;
1520
- const w = {
1521
- version: n,
1522
- cid: je,
1523
- locale: s,
1524
- fallbackLocale: c,
1525
- messages: m,
1526
- modifiers: p,
1527
- pluralRules: O,
1528
- missing: C,
1529
- missingWarn: g,
1530
- fallbackWarn: b,
1531
- fallbackFormat: y,
1532
- unresolving: S,
1533
- postTranslation: T,
1534
- processor: i,
1535
- warnHtmlMessage: f,
1536
- escapeParameter: E,
1537
- messageCompiler: o,
1538
- messageResolver: L,
1539
- localeFallbacker: h,
1540
- fallbackContext: A,
1541
- onWarn: t,
1542
- __meta: x
1543
- };
1544
- return w.datetimeFormats = _, w.numberFormats = d, w.__datetimeFormatters = M, w.__numberFormatters = Y, __INTLIFY_PROD_DEVTOOLS__ && Nn(w, n, x), w;
1545
- }
1546
- const Le = (e) => ({ [e]: W() });
1547
- function Pe(e, t, n, s, l) {
1548
- const { missing: c, onWarn: m } = e;
1549
- if (c !== null) {
1550
- const _ = c(e, n, t, l);
1551
- return I(_) ? _ : t;
1552
- } else
1553
- return t;
1554
- }
1555
- function pr(e, t, n) {
1556
- const s = e;
1557
- s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1558
- }
1559
- function wn(e, t) {
1560
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1561
- }
1562
- function Fn(e, t) {
1563
- const n = t.indexOf(e);
1564
- if (n === -1)
1565
- return !1;
1566
- for (let s = n + 1; s < t.length; s++)
1567
- if (wn(e, t[s]))
1568
- return !0;
1569
- return !1;
1570
- }
1571
- function Lr(e, ...t) {
1572
- const { datetimeFormats: n, unresolving: s, fallbackLocale: l, onWarn: c, localeFallbacker: m } = e, { __datetimeFormatters: _ } = e, [d, p, O, C] = $n(...t), g = V(O.missingWarn) ? O.missingWarn : e.missingWarn;
1573
- V(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1574
- const b = !!O.part, y = be(e, O), S = m(
1575
- e,
1576
- // eslint-disable-line @typescript-eslint/no-explicit-any
1577
- l,
1578
- y
1579
- );
1580
- if (!I(d) || d === "")
1581
- return new Intl.DateTimeFormat(y, C).format(p);
1582
- let T = {}, i, f = null;
1583
- const E = "datetime format";
1584
- for (let h = 0; h < S.length && (i = S[h], T = n[i] || {}, f = T[d], !k(f)); h++)
1585
- Pe(e, d, i, g, E);
1586
- if (!k(f) || !I(i))
1587
- return s ? ye : d;
1588
- let o = `${i}__${d}`;
1589
- Te(C) || (o = `${o}__${JSON.stringify(C)}`);
1590
- let L = _.get(o);
1591
- return L || (L = new Intl.DateTimeFormat(i, Z({}, f, C)), _.set(o, L)), b ? L.formatToParts(p) : L.format(p);
1592
- }
1593
- const Un = [
1594
- "localeMatcher",
1595
- "weekday",
1596
- "era",
1597
- "year",
1598
- "month",
1599
- "day",
1600
- "hour",
1601
- "minute",
1602
- "second",
1603
- "timeZoneName",
1604
- "formatMatcher",
1605
- "hour12",
1606
- "timeZone",
1607
- "dateStyle",
1608
- "timeStyle",
1609
- "calendar",
1610
- "dayPeriod",
1611
- "numberingSystem",
1612
- "hourCycle",
1613
- "fractionalSecondDigits"
1614
- ];
1615
- function $n(...e) {
1616
- const [t, n, s, l] = e, c = W();
1617
- let m = W(), _;
1618
- if (I(t)) {
1619
- const d = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1620
- if (!d)
1621
- throw q(Q.INVALID_ISO_DATE_ARGUMENT);
1622
- const p = d[3] ? d[3].trim().startsWith("T") ? `${d[1].trim()}${d[3].trim()}` : `${d[1].trim()}T${d[3].trim()}` : d[1].trim();
1623
- _ = new Date(p);
1624
- try {
1625
- _.toISOString();
1626
- } catch {
1627
- throw q(Q.INVALID_ISO_DATE_ARGUMENT);
1628
- }
1629
- } else if (Dt(t)) {
1630
- if (isNaN(t.getTime()))
1631
- throw q(Q.INVALID_DATE_ARGUMENT);
1632
- _ = t;
1633
- } else if (K(t))
1634
- _ = t;
1635
- else
1636
- throw q(Q.INVALID_ARGUMENT);
1637
- return I(n) ? c.key = n : k(n) && Object.keys(n).forEach((d) => {
1638
- Un.includes(d) ? m[d] = n[d] : c[d] = n[d];
1639
- }), I(s) ? c.locale = s : k(s) && (m = s), k(l) && (m = l), [c.key || "", _, c, m];
1640
- }
1641
- function hr(e, t, n) {
1642
- const s = e;
1643
- for (const l in n) {
1644
- const c = `${t}__${l}`;
1645
- s.__datetimeFormatters.has(c) && s.__datetimeFormatters.delete(c);
1646
- }
1647
- }
1648
- function Nr(e, ...t) {
1649
- const { numberFormats: n, unresolving: s, fallbackLocale: l, onWarn: c, localeFallbacker: m } = e, { __numberFormatters: _ } = e, [d, p, O, C] = Kn(...t), g = V(O.missingWarn) ? O.missingWarn : e.missingWarn;
1650
- V(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1651
- const b = !!O.part, y = be(e, O), S = m(
1652
- e,
1653
- // eslint-disable-line @typescript-eslint/no-explicit-any
1654
- l,
1655
- y
1656
- );
1657
- if (!I(d) || d === "")
1658
- return new Intl.NumberFormat(y, C).format(p);
1659
- let T = {}, i, f = null;
1660
- const E = "number format";
1661
- for (let h = 0; h < S.length && (i = S[h], T = n[i] || {}, f = T[d], !k(f)); h++)
1662
- Pe(e, d, i, g, E);
1663
- if (!k(f) || !I(i))
1664
- return s ? ye : d;
1665
- let o = `${i}__${d}`;
1666
- Te(C) || (o = `${o}__${JSON.stringify(C)}`);
1667
- let L = _.get(o);
1668
- return L || (L = new Intl.NumberFormat(i, Z({}, f, C)), _.set(o, L)), b ? L.formatToParts(p) : L.format(p);
1669
- }
1670
- const Wn = [
1671
- "localeMatcher",
1672
- "style",
1673
- "currency",
1674
- "currencyDisplay",
1675
- "currencySign",
1676
- "useGrouping",
1677
- "minimumIntegerDigits",
1678
- "minimumFractionDigits",
1679
- "maximumFractionDigits",
1680
- "minimumSignificantDigits",
1681
- "maximumSignificantDigits",
1682
- "compactDisplay",
1683
- "notation",
1684
- "signDisplay",
1685
- "unit",
1686
- "unitDisplay",
1687
- "roundingMode",
1688
- "roundingPriority",
1689
- "roundingIncrement",
1690
- "trailingZeroDisplay"
1691
- ];
1692
- function Kn(...e) {
1693
- const [t, n, s, l] = e, c = W();
1694
- let m = W();
1695
- if (!K(t))
1696
- throw q(Q.INVALID_ARGUMENT);
1697
- const _ = t;
1698
- return I(n) ? c.key = n : k(n) && Object.keys(n).forEach((d) => {
1699
- Wn.includes(d) ? m[d] = n[d] : c[d] = n[d];
1700
- }), I(s) ? c.locale = s : k(s) && (m = s), k(l) && (m = l), [c.key || "", _, c, m];
1701
- }
1702
- function gr(e, t, n) {
1703
- const s = e;
1704
- for (const l in n) {
1705
- const c = `${t}__${l}`;
1706
- s.__numberFormatters.has(c) && s.__numberFormatters.delete(c);
1707
- }
1708
- }
1709
- const Vn = (e) => e, Yn = (e) => "", Gn = "text", Xn = (e) => e.length === 0 ? "" : Se(e), Hn = Ft;
1710
- function Be(e, t) {
1711
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1712
- }
1713
- function jn(e) {
1714
- const t = K(e.pluralIndex) ? e.pluralIndex : -1;
1715
- return e.named && (K(e.named.count) || K(e.named.n)) ? K(e.named.count) ? e.named.count : K(e.named.n) ? e.named.n : t : t;
1716
- }
1717
- function Bn(e, t) {
1718
- t.count || (t.count = e), t.n || (t.n = e);
1719
- }
1720
- function xn(e = {}) {
1721
- const t = e.locale, n = jn(e), s = v(e.pluralRules) && I(t) && U(e.pluralRules[t]) ? e.pluralRules[t] : Be, l = v(e.pluralRules) && I(t) && U(e.pluralRules[t]) ? Be : void 0, c = (i) => i[s(n, i.length, l)], m = e.list || [], _ = (i) => m[i], d = e.named || W();
1722
- K(e.pluralIndex) && Bn(n, d);
1723
- const p = (i) => d[i];
1724
- function O(i, f) {
1725
- const E = U(e.messages) ? e.messages(i, !!f) : v(e.messages) ? e.messages[i] : !1;
1726
- return E || (e.parent ? e.parent.message(i) : Yn);
1727
- }
1728
- const C = (i) => e.modifiers ? e.modifiers[i] : Vn, g = k(e.processor) && U(e.processor.normalize) ? e.processor.normalize : Xn, b = k(e.processor) && U(e.processor.interpolate) ? e.processor.interpolate : Hn, y = k(e.processor) && I(e.processor.type) ? e.processor.type : Gn, T = {
1729
- list: _,
1730
- named: p,
1731
- plural: c,
1732
- linked: (i, ...f) => {
1733
- const [E, o] = f;
1734
- let L = "text", h = "";
1735
- f.length === 1 ? v(E) ? (h = E.modifier || h, L = E.type || L) : I(E) && (h = E || h) : f.length === 2 && (I(E) && (h = E || h), I(o) && (L = o || L));
1736
- const A = O(i, !0)(T), R = (
1737
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1738
- L === "vnode" && H(A) && h ? A[0] : A
1739
- );
1740
- return h ? C(h)(R, L) : R;
1741
- },
1742
- message: O,
1743
- type: y,
1744
- interpolate: b,
1745
- normalize: g,
1746
- values: Z(W(), m, d)
1747
- };
1748
- return T;
1749
- }
1750
- const xe = () => "", X = (e) => U(e);
1751
- function Tr(e, ...t) {
1752
- const { fallbackFormat: n, postTranslation: s, unresolving: l, messageCompiler: c, fallbackLocale: m, messages: _ } = e, [d, p] = qn(...t), O = V(p.missingWarn) ? p.missingWarn : e.missingWarn, C = V(p.fallbackWarn) ? p.fallbackWarn : e.fallbackWarn, g = V(p.escapeParameter) ? p.escapeParameter : e.escapeParameter, b = !!p.resolvedMessage, y = I(p.default) || V(p.default) ? V(p.default) ? c ? d : () => d : p.default : n ? c ? d : () => d : null, S = n || y != null && (I(y) || U(y)), T = be(e, p);
1753
- g && Jn(p);
1754
- let [i, f, E] = b ? [
1755
- d,
1756
- T,
1757
- _[T] || W()
1758
- ] : ot(e, d, T, m, C, O), o = i, L = d;
1759
- if (!b && !(I(o) || se(o) || X(o)) && S && (o = y, L = o), !b && (!(I(o) || se(o) || X(o)) || !I(f)))
1760
- return l ? ye : d;
1761
- let h = !1;
1762
- const A = () => {
1763
- h = !0;
1764
- }, R = X(o) ? o : ut(e, d, f, o, L, A);
1765
- if (h)
1766
- return o;
1767
- const M = zn(e, f, E, p), Y = xn(M), x = Qn(e, R, Y);
1768
- let w = s ? s(x, d) : x;
1769
- if (g && I(w) && (w = vt(w)), __INTLIFY_PROD_DEVTOOLS__) {
1770
- const le = {
1771
- timestamp: Date.now(),
1772
- key: I(d) ? d : X(o) ? o.key : "",
1773
- locale: f || (X(o) ? o.locale : ""),
1774
- format: I(o) ? o : X(o) ? o.source : "",
1775
- message: w
1776
- };
1777
- le.meta = Z({}, e.__meta, /* @__PURE__ */ Mn() || {}), gn(le);
1778
- }
1779
- return w;
1780
- }
1781
- function Jn(e) {
1782
- H(e.list) ? e.list = e.list.map((t) => I(t) ? Fe(t) : t) : v(e.named) && Object.keys(e.named).forEach((t) => {
1783
- I(e.named[t]) && (e.named[t] = Fe(e.named[t]));
1784
- });
1785
- }
1786
- function ot(e, t, n, s, l, c) {
1787
- const { messages: m, onWarn: _, messageResolver: d, localeFallbacker: p } = e, O = p(e, s, n);
1788
- let C = W(), g, b = null;
1789
- const y = "translate";
1790
- for (let S = 0; S < O.length && (g = O[S], C = m[g] || W(), (b = d(C, t)) === null && (b = C[t]), !(I(b) || se(b) || X(b))); S++)
1791
- if (!Fn(g, O)) {
1792
- const T = Pe(
1793
- e,
1794
- // eslint-disable-line @typescript-eslint/no-explicit-any
1795
- t,
1796
- g,
1797
- c,
1798
- y
1799
- );
1800
- T !== t && (b = T);
1801
- }
1802
- return [b, g, C];
1803
- }
1804
- function ut(e, t, n, s, l, c) {
1805
- const { messageCompiler: m, warnHtmlMessage: _ } = e;
1806
- if (X(s)) {
1807
- const p = s;
1808
- return p.locale = p.locale || n, p.key = p.key || t, p;
1809
- }
1810
- if (m == null) {
1811
- const p = (() => s);
1812
- return p.locale = n, p.key = t, p;
1813
- }
1814
- const d = m(s, Zn(e, n, l, s, _, c));
1815
- return d.locale = n, d.key = t, d.source = s, d;
1816
- }
1817
- function Qn(e, t, n) {
1818
- return t(n);
1819
- }
1820
- function qn(...e) {
1821
- const [t, n, s] = e, l = W();
1822
- if (!I(t) && !K(t) && !X(t) && !se(t))
1823
- throw q(Q.INVALID_ARGUMENT);
1824
- const c = K(t) ? String(t) : (X(t), t);
1825
- return K(n) ? l.plural = n : I(n) ? l.default = n : k(n) && !Te(n) ? l.named = n : H(n) && (l.list = n), K(s) ? l.plural = s : I(s) ? l.default = s : k(s) && Z(l, s), [c, l];
1826
- }
1827
- function Zn(e, t, n, s, l, c) {
1828
- return {
1829
- locale: t,
1830
- key: n,
1831
- warnHtmlMessage: l,
1832
- onError: (m) => {
1833
- throw c && c(m), m;
1834
- },
1835
- onCacheKey: (m) => Pt(t, n, m)
1836
- };
1837
- }
1838
- function zn(e, t, n, s) {
1839
- const { modifiers: l, pluralRules: c, messageResolver: m, fallbackLocale: _, fallbackWarn: d, missingWarn: p, fallbackContext: O } = e, g = {
1840
- locale: t,
1841
- modifiers: l,
1842
- pluralRules: c,
1843
- messages: (b, y) => {
1844
- let S = m(n, b);
1845
- if (S == null && (O || y)) {
1846
- const [, , T] = ot(
1847
- O || e,
1848
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1849
- b,
1850
- t,
1851
- _,
1852
- d,
1853
- p
1854
- );
1855
- S = m(T, b);
1856
- }
1857
- if (I(S) || se(S)) {
1858
- let T = !1;
1859
- const f = ut(e, b, t, S, b, () => {
1860
- T = !0;
1861
- });
1862
- return T ? xe : f;
1863
- } else return X(S) ? S : xe;
1864
- }
1865
- };
1866
- return e.processor && (g.processor = e.processor), s.list && (g.list = s.list), s.named && (g.named = s.named), K(s.plural) && (g.pluralIndex = s.plural), g;
1867
- }
1868
- ln();
1869
- export {
1870
- En as A,
1871
- Tr as B,
1872
- ar as C,
1873
- ge as D,
1874
- $n as E,
1875
- Lr as F,
1876
- Kn as G,
1877
- Nr as H,
1878
- X as I,
1879
- Wn as J,
1880
- Un as K,
1881
- or as L,
1882
- ir as M,
1883
- ye as N,
1884
- ur as O,
1885
- fr as P,
1886
- we as Q,
1887
- sr as R,
1888
- rr as S,
1889
- lr as T,
1890
- k as a,
1891
- I as b,
1892
- H as c,
1893
- ve as d,
1894
- U as e,
1895
- er as f,
1896
- Ie as g,
1897
- Z as h,
1898
- V as i,
1899
- W as j,
1900
- nr as k,
1901
- te as l,
1902
- tr as m,
1903
- Er as n,
1904
- v as o,
1905
- hr as p,
1906
- gr as q,
1907
- K as r,
1908
- se as s,
1909
- dr as t,
1910
- pr as u,
1911
- _r as v,
1912
- cr as w,
1913
- Te as x,
1914
- mr as y,
1915
- qn as z
1916
- };