@intlify/core 12.0.0-alpha.6 → 12.0.0-alpha.8

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,10 +1,10 @@
1
1
  /**
2
- * @intlify/core v12.0.0-alpha.6
2
+ * @intlify/core v12.0.0-alpha.8
3
3
  * (c) 2016-present kazuya kawaguchi and contributors
4
4
  * @license MIT
5
5
  **/ const e = /\{([0-9a-z]+)\}/gi;
6
6
  function t(t, ...n) {
7
- return n.length === 1 && y(n[0]) && (n = n[0]), (!n || !n.hasOwnProperty) && (n = {}), t.replace(e, (e, t) => n.hasOwnProperty(t) ? n[t] : ``);
7
+ return n.length === 1 && y(n[0]) && (n = n[0]), n && n.hasOwnProperty || (n = {}), t.replace(e, (e, t) => n.hasOwnProperty(t) ? n[t] : ``);
8
8
  }
9
9
  const n = (e, t, n) => r({
10
10
  l: e,
@@ -34,46 +34,43 @@ function D(e) {
34
34
  function ee(e) {
35
35
  return e.replace(/&(?![a-z0-9#]{2,6};)/gi, `&amp;`).replace(/"/g, `&quot;`).replace(/'/g, `&apos;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`);
36
36
  }
37
- const te = /^javascript:/i, ne = /^(?:href|src|action|formaction)$/i, re = /&#(?:x([0-9a-f]+)|(\d+));?/gi, O = /&(?:Tab|NewLine);/g, ie = /&colon;?/gi, ae = /[\u0000-\u0020\u007f-\u009f]/g, oe = /(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i, k = /(^|[\s"'<>/])on(\w+\s*=)/gi, se = /(?:^|[\s"'<>/])srcdoc\s*=/i, ce = /(^|[\s"'<>/])s(rcdoc\s*=)/gi, le = /(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;
38
- function ue(e, t, n) {
37
+ const te = /^javascript:/i, ne = /^(?:href|xlink:href|src|action|formaction)$/i, re = /&#(?:x([0-9a-f]+)|(\d+));?/gi, O = /&(?:Tab|NewLine);/g, ie = /&colon;?/gi, ae = /[\u0000-\u0020\u007f-\u009f]/g, oe = /(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i, se = /(^|[\s"'<>/])on(\w+\s*=)/gi, ce = /(?:^|[\s"'<>/])srcdoc\s*=/i, le = /(^|[\s"'<>/])s(rcdoc\s*=)/gi, ue = /<(?:base|animate|set)(?=[\s/>]|$)/i, de = /<(base|animate|set)(?=[\s/>]|$)/gi, fe = /(^|[\s"'<>/])((?:href|xlink:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;
38
+ function pe(e, t, n) {
39
39
  let r = t || n;
40
40
  if (!r) return e;
41
41
  let i = Number.parseInt(r, t ? 16 : 10);
42
42
  return i <= 127 ? String.fromCharCode(i) : e;
43
43
  }
44
- function A(e) {
45
- let t = e.replace(re, ue).replace(O, ``).replace(ie, `:`).replace(ae, ``);
44
+ function k(e) {
45
+ let t = e.replace(re, pe).replace(O, ``).replace(ie, `:`).replace(ae, ``);
46
46
  return te.test(t);
47
47
  }
48
- function de(e) {
48
+ function me(e) {
49
49
  let t = /url\s*\(/gi, n = ``, r = 0, i;
50
50
  for (; (i = t.exec(e)) !== null;) {
51
51
  let a = i.index, o = t.lastIndex - 1, s = o + 1, c = 1, l = null;
52
52
  for (; s < e.length; s++) {
53
53
  let t = e[s];
54
- if (l) {
55
- t === l && (l = null);
56
- continue;
57
- }
58
- if (t === `"` || t === `'`) l = t;
54
+ if (l) t === l && (l = null);
55
+ else if (t === `"` || t === `'`) l = t;
59
56
  else if (t === `(`) c++;
60
57
  else if (t === `)` && (c--, c === 0)) break;
61
58
  }
62
59
  if (c !== 0) break;
63
60
  let u = e.slice(o + 1, s).trim(), d = u.startsWith(`"`) && u.endsWith(`"`) || u.startsWith(`'`) && u.endsWith(`'`) ? u.slice(1, -1).trim() : u;
64
- n += e.slice(r, a), n += A(d) ? `url(about:blank)` : e.slice(a, s + 1), r = s + 1;
61
+ n += e.slice(r, a), n += k(d) ? `url(about:blank)` : e.slice(a, s + 1), r = s + 1;
65
62
  }
66
63
  return n + e.slice(r);
67
64
  }
68
- function j(e, t) {
69
- return ne.test(e) && A(t) ? `about:blank` : ee(e.toLowerCase() === `style` ? de(t) : t);
65
+ function A(e, t) {
66
+ return ne.test(e) && k(t) ? `about:blank` : ee(e.toLowerCase() === `style` ? me(t) : t);
70
67
  }
71
- function fe(e) {
72
- return e = e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g, (e, t, n) => `${t}="${j(t, n)}"`), e = e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g, (e, t, n) => `${t}='${j(t, n)}'`), oe.test(e) && (e = e.replace(k, `$1&#111;n$2`)), se.test(e) && (e = e.replace(ce, `$1&#115;$2`)), e = e.replace(le, (e, t, n, r) => A(r) ? `${t}${n}about:blank` : e), e;
68
+ function he(e) {
69
+ return e = e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g, (e, t, n) => `${t}="${A(t, n)}"`), e = e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g, (e, t, n) => `${t}='${A(t, n)}'`), oe.test(e) && (e = e.replace(se, `$1&#111;n$2`)), ce.test(e) && (e = e.replace(le, `$1&#115;$2`)), ue.test(e) && (e = e.replace(de, `&lt;$1`)), e = e.replace(fe, (e, t, n, r) => k(r) ? `${t}${n}about:blank` : e), e;
73
70
  }
74
- const M = (e) => !y(e) || h(e);
75
- function pe(e, t) {
76
- if (M(e) || M(t) || t === Object.prototype) throw Error(`Invalid value`);
71
+ const ge = (e) => !y(e) || h(e);
72
+ function j(e, t) {
73
+ if (ge(e) || ge(t) || t === Object.prototype) throw Error(`Invalid value`);
77
74
  let n = [e, t];
78
75
  for (; n.length;) {
79
76
  let e = n.pop(), t = n.pop(), r = Object.keys(t);
@@ -95,21 +92,21 @@ function pe(e, t) {
95
92
  }
96
93
  }
97
94
  }
98
- function me(e, t, n) {
95
+ function _e(e, t, n) {
99
96
  return {
100
97
  line: e,
101
98
  column: t,
102
99
  offset: n
103
100
  };
104
101
  }
105
- function he(e, t, n) {
102
+ function ve(e, t, n) {
106
103
  let r = {
107
104
  start: e,
108
105
  end: t
109
106
  };
110
107
  return n != null && (r.source = n), r;
111
108
  }
112
- const N = {
109
+ const M = {
113
110
  EXPECTED_TOKEN: 1,
114
111
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
115
112
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
@@ -127,30 +124,30 @@ const N = {
127
124
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
128
125
  UNHANDLED_MINIFIER_NODE_TYPE: 16
129
126
  };
130
- N.EXPECTED_TOKEN, N.INVALID_TOKEN_IN_PLACEHOLDER, N.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, N.UNKNOWN_ESCAPE_SEQUENCE, N.INVALID_UNICODE_ESCAPE_SEQUENCE, N.UNBALANCED_CLOSING_BRACE, N.UNTERMINATED_CLOSING_BRACE, N.EMPTY_PLACEHOLDER, N.NOT_ALLOW_NEST_PLACEHOLDER, N.INVALID_LINKED_FORMAT, N.MUST_HAVE_MESSAGES_IN_PLURAL, N.UNEXPECTED_EMPTY_LINKED_MODIFIER, N.UNEXPECTED_EMPTY_LINKED_KEY, N.UNEXPECTED_LEXICAL_ANALYSIS, N.UNHANDLED_CODEGEN_NODE_TYPE, N.UNHANDLED_MINIFIER_NODE_TYPE;
131
- function P(e, t, n = {}) {
127
+ M.EXPECTED_TOKEN, M.INVALID_TOKEN_IN_PLACEHOLDER, M.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, M.UNKNOWN_ESCAPE_SEQUENCE, M.INVALID_UNICODE_ESCAPE_SEQUENCE, M.UNBALANCED_CLOSING_BRACE, M.UNTERMINATED_CLOSING_BRACE, M.EMPTY_PLACEHOLDER, M.NOT_ALLOW_NEST_PLACEHOLDER, M.INVALID_LINKED_FORMAT, M.MUST_HAVE_MESSAGES_IN_PLURAL, M.UNEXPECTED_EMPTY_LINKED_MODIFIER, M.UNEXPECTED_EMPTY_LINKED_KEY, M.UNEXPECTED_LEXICAL_ANALYSIS, M.UNHANDLED_CODEGEN_NODE_TYPE, M.UNHANDLED_MINIFIER_NODE_TYPE;
128
+ function N(e, t, n = {}) {
132
129
  let { domain: r, messages: i, args: a } = n, o = SyntaxError(String(e));
133
130
  return o.code = e, t && (o.location = t), o.domain = r, o;
134
131
  }
135
- function F(e) {
132
+ function P(e) {
136
133
  throw e;
137
134
  }
138
- function I(e) {
135
+ function F(e) {
139
136
  switch (e.t = e.type, e.type) {
140
137
  case 0: {
141
138
  let t = e;
142
- I(t.body), t.b = t.body, delete t.body;
139
+ F(t.body), t.b = t.body, delete t.body;
143
140
  break;
144
141
  }
145
142
  case 1: {
146
143
  let t = e, n = t.cases;
147
- for (let e = 0; e < n.length; e++) I(n[e]);
144
+ for (let e = 0; e < n.length; e++) F(n[e]);
148
145
  t.c = n, delete t.cases;
149
146
  break;
150
147
  }
151
148
  case 2: {
152
149
  let t = e, n = t.items;
153
- for (let e = 0; e < n.length; e++) I(n[e]);
150
+ for (let e = 0; e < n.length; e++) F(n[e]);
154
151
  t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
155
152
  break;
156
153
  }
@@ -164,7 +161,7 @@ function I(e) {
164
161
  }
165
162
  case 6: {
166
163
  let t = e;
167
- I(t.key), t.k = t.key, delete t.key, t.modifier && (I(t.modifier), t.m = t.modifier, delete t.modifier);
164
+ F(t.key), t.k = t.key, delete t.key, t.modifier && (F(t.modifier), t.m = t.modifier, delete t.modifier);
168
165
  break;
169
166
  }
170
167
  case 5: {
@@ -180,11 +177,11 @@ function I(e) {
180
177
  }
181
178
  delete e.type;
182
179
  }
183
- function L(e) {
180
+ function ye(e) {
184
181
  let t = e.body;
185
- return t.type === 2 ? R(t) : t.cases.forEach((e) => R(e)), e;
182
+ return t.type === 2 ? be(t) : t.cases.forEach((e) => be(e)), e;
186
183
  }
187
- function R(e) {
184
+ function be(e) {
188
185
  if (e.items.length === 1) {
189
186
  let t = e.items[0];
190
187
  (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
@@ -204,7 +201,7 @@ function R(e) {
204
201
  }
205
202
  }
206
203
  }
207
- function ge(e) {
204
+ function xe(e) {
208
205
  let t = e, n = 0, r = 1, i = 1, a = 0, o = (e) => t[e] === `\r` && t[e + 1] === `
209
206
  `, s = (e) => t[e] === `
210
207
  `, c = (e) => t[e] === `\u2029`, l = (e) => t[e] === `\u2028`, u = (e) => o(e) || s(e) || c(e) || l(e), d = () => n, f = () => r, p = () => i, m = () => a, h = (e) => o(e) || c(e) || l(e) ? `
@@ -241,8 +238,8 @@ function ge(e) {
241
238
  skipToPeek: S
242
239
  };
243
240
  }
244
- function _e(e, t = {}) {
245
- let n = t.location !== !1, r = ge(e), i = () => r.index(), a = () => me(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
241
+ function Se(e, t = {}) {
242
+ let n = t.location !== !1, r = xe(e), i = () => r.index(), a = () => _e(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
246
243
  currentType: 13,
247
244
  offset: s,
248
245
  startLoc: o,
@@ -258,11 +255,11 @@ function _e(e, t = {}) {
258
255
  function d(e, t, r) {
259
256
  e.endLoc = a(), e.currentType = t;
260
257
  let i = { type: t };
261
- return n && (i.loc = he(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
258
+ return n && (i.loc = ve(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
262
259
  }
263
260
  let f = (e) => d(e, 13);
264
261
  function p(e, t) {
265
- return e.currentChar() === t ? (e.next(), t) : (N.EXPECTED_TOKEN, a(), ``);
262
+ return e.currentChar() === t ? (e.next(), t) : (M.EXPECTED_TOKEN, a(), ``);
266
263
  }
267
264
  function m(e) {
268
265
  let t = ``;
@@ -383,12 +380,12 @@ function _e(e, t = {}) {
383
380
  function oe(e) {
384
381
  return D(e, ae);
385
382
  }
386
- function k(e) {
383
+ function se(e) {
387
384
  let t = ``, n = ``;
388
385
  for (; t = ie(e);) n += t;
389
386
  return n;
390
387
  }
391
- function se(e) {
388
+ function ce(e) {
392
389
  let t = ``;
393
390
  for (;;) {
394
391
  let n = e.currentChar();
@@ -405,145 +402,145 @@ function _e(e, t = {}) {
405
402
  }
406
403
  return t;
407
404
  }
408
- function ce(e) {
405
+ function le(e) {
409
406
  h(e);
410
407
  let t = ``, n = ``;
411
408
  for (; t = re(e);) n += t;
412
409
  let r = e.currentChar();
413
410
  if (r && r !== `}` && r !== void 0 && r !== ` ` && r !== `
414
411
  ` && r !== ` `) {
415
- let t = M(e);
416
- return N.INVALID_TOKEN_IN_PLACEHOLDER, a(), n + t, n + t;
412
+ let t = A(e);
413
+ return M.INVALID_TOKEN_IN_PLACEHOLDER, a(), n + t, n + t;
417
414
  }
418
- return e.currentChar() === void 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n;
415
+ return e.currentChar() === void 0 && (M.UNTERMINATED_CLOSING_BRACE, a()), n;
419
416
  }
420
- function le(e) {
417
+ function ue(e) {
421
418
  h(e);
422
419
  let t = ``;
423
- return e.currentChar() === `-` ? (e.next(), t += `-${k(e)}`) : t += k(e), e.currentChar() === void 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), t;
420
+ return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && (M.UNTERMINATED_CLOSING_BRACE, a()), t;
424
421
  }
425
- function ue(e) {
422
+ function de(e) {
426
423
  return e !== `'` && e !== `
427
424
  `;
428
425
  }
429
- function A(e) {
426
+ function fe(e) {
430
427
  h(e), p(e, `'`);
431
428
  let t = ``, n = ``;
432
- for (; t = D(e, ue);) n += t === `\\` ? de(e) : t;
429
+ for (; t = D(e, de);) n += t === `\\` ? pe(e) : t;
433
430
  let r = e.currentChar();
434
431
  return r === `
435
- ` || r === void 0 ? (N.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), r === `
432
+ ` || r === void 0 ? (M.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), r === `
436
433
  ` && (e.next(), p(e, `'`)), n) : (p(e, `'`), n);
437
434
  }
438
- function de(e) {
435
+ function pe(e) {
439
436
  let t = e.currentChar();
440
437
  switch (t) {
441
438
  case `\\`:
442
439
  case `'`: return e.next(), `\\${t}`;
443
- case `u`: return j(e, t, 4);
444
- case `U`: return j(e, t, 6);
445
- default: return N.UNKNOWN_ESCAPE_SEQUENCE, a(), ``;
440
+ case `u`: return k(e, t, 4);
441
+ case `U`: return k(e, t, 6);
442
+ default: return M.UNKNOWN_ESCAPE_SEQUENCE, a(), ``;
446
443
  }
447
444
  }
448
- function j(e, t, n) {
445
+ function k(e, t, n) {
449
446
  p(e, t);
450
447
  let r = ``;
451
448
  for (let i = 0; i < n; i++) {
452
449
  let n = oe(e);
453
450
  if (!n) {
454
- N.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), `${t}${r}${e.currentChar()}`;
451
+ M.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), `${t}${r}${e.currentChar()}`;
455
452
  break;
456
453
  }
457
454
  r += n;
458
455
  }
459
456
  return `\\${t}${r}`;
460
457
  }
461
- function fe(e) {
458
+ function me(e) {
462
459
  return e !== `{` && e !== `}` && e !== ` ` && e !== `
463
460
  `;
464
461
  }
465
- function M(e) {
462
+ function A(e) {
466
463
  h(e);
467
464
  let t = ``, n = ``;
468
- for (; t = D(e, fe);) n += t;
465
+ for (; t = D(e, me);) n += t;
469
466
  return n;
470
467
  }
471
- function pe(e) {
468
+ function he(e) {
472
469
  let t = ``, n = ``;
473
470
  for (; t = te(e);) n += t;
474
471
  return n;
475
472
  }
476
- function P(e) {
473
+ function ge(e) {
477
474
  let t = (n) => {
478
475
  let r = e.currentChar();
479
476
  return r === `{` || r === `@` || r === `|` || r === `(` || r === `)` || !r || r === ` ` ? n : (n += r, e.next(), t(n));
480
477
  };
481
478
  return t(``);
482
479
  }
483
- function F(e) {
480
+ function j(e) {
484
481
  h(e);
485
482
  let t = p(e, `|`);
486
483
  return h(e), t;
487
484
  }
488
- function I(e, t) {
485
+ function N(e, t) {
489
486
  let n = null;
490
487
  switch (e.currentChar()) {
491
- case `{`: return t.braceNest >= 1 && (N.NOT_ALLOW_NEST_PLACEHOLDER, a()), e.next(), n = d(t, 2, `{`), h(e), t.braceNest++, n;
492
- case `}`: return t.braceNest > 0 && t.currentType === 2 && (N.EMPTY_PLACEHOLDER, a()), e.next(), n = d(t, 3, `}`), t.braceNest--, t.braceNest > 0 && h(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
493
- case `@`: return t.braceNest > 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n = L(e, t) || f(t), t.braceNest = 0, n;
488
+ case `{`: return t.braceNest >= 1 && (M.NOT_ALLOW_NEST_PLACEHOLDER, a()), e.next(), n = d(t, 2, `{`), h(e), t.braceNest++, n;
489
+ case `}`: return t.braceNest > 0 && t.currentType === 2 && (M.EMPTY_PLACEHOLDER, a()), e.next(), n = d(t, 3, `}`), t.braceNest--, t.braceNest > 0 && h(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
490
+ case `@`: return t.braceNest > 0 && (M.UNTERMINATED_CLOSING_BRACE, a()), n = P(e, t) || f(t), t.braceNest = 0, n;
494
491
  default: {
495
492
  let r = !0, i = !0, o = !0;
496
- if (T(e)) return t.braceNest > 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
497
- if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return N.UNTERMINATED_CLOSING_BRACE, a(), t.braceNest = 0, R(e, t);
498
- if (r = v(e, t)) return n = d(t, 4, ce(e)), h(e), n;
499
- if (i = y(e, t)) return n = d(t, 5, le(e)), h(e), n;
500
- if (o = b(e, t)) return n = d(t, 6, A(e)), h(e), n;
501
- if (!r && !i && !o) return n = d(t, 12, M(e)), N.INVALID_TOKEN_IN_PLACEHOLDER, a(), n.value, h(e), n;
493
+ if (T(e)) return t.braceNest > 0 && (M.UNTERMINATED_CLOSING_BRACE, a()), n = d(t, 1, j(e)), t.braceNest = 0, t.inLinked = !1, n;
494
+ if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return M.UNTERMINATED_CLOSING_BRACE, a(), t.braceNest = 0, F(e, t);
495
+ if (r = v(e, t)) return n = d(t, 4, le(e)), h(e), n;
496
+ if (i = y(e, t)) return n = d(t, 5, ue(e)), h(e), n;
497
+ if (o = b(e, t)) return n = d(t, 6, fe(e)), h(e), n;
498
+ if (!r && !i && !o) return n = d(t, 12, A(e)), M.INVALID_TOKEN_IN_PLACEHOLDER, a(), n.value, h(e), n;
502
499
  break;
503
500
  }
504
501
  }
505
502
  return n;
506
503
  }
507
- function L(e, t) {
504
+ function P(e, t) {
508
505
  let { currentType: n } = t, r = null, i = e.currentChar();
509
- switch ((n === 7 || n === 8 || n === 11 || n === 9) && (i === `
510
- ` || i === ` `) && (N.INVALID_LINKED_FORMAT, a()), i) {
506
+ switch (n !== 7 && n !== 8 && n !== 11 && n !== 9 || i !== `
507
+ ` && i !== ` ` || (M.INVALID_LINKED_FORMAT, a()), i) {
511
508
  case `@`: return e.next(), r = d(t, 7, `@`), t.inLinked = !0, r;
512
509
  case `.`: return h(e), e.next(), d(t, 8, `.`);
513
510
  case `:`: return h(e), e.next(), d(t, 9, `:`);
514
- default: return T(e) ? (r = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : x(e, t) || C(e, t) ? (h(e), L(e, t)) : S(e, t) ? (h(e), d(t, 11, pe(e))) : w(e, t) ? (h(e), i === `{` ? I(e, t) || r : d(t, 10, P(e))) : (n === 7 && (N.INVALID_LINKED_FORMAT, a()), t.braceNest = 0, t.inLinked = !1, R(e, t));
511
+ default: return T(e) ? (r = d(t, 1, j(e)), t.braceNest = 0, t.inLinked = !1, r) : x(e, t) || C(e, t) ? (h(e), P(e, t)) : S(e, t) ? (h(e), d(t, 11, he(e))) : w(e, t) ? (h(e), i === `{` ? N(e, t) || r : d(t, 10, ge(e))) : (n === 7 && (M.INVALID_LINKED_FORMAT, a()), t.braceNest = 0, t.inLinked = !1, F(e, t));
515
512
  }
516
513
  }
517
- function R(e, t) {
514
+ function F(e, t) {
518
515
  let n = { type: 13 };
519
- if (t.braceNest > 0) return I(e, t) || f(t);
520
- if (t.inLinked) return L(e, t) || f(t);
516
+ if (t.braceNest > 0) return N(e, t) || f(t);
517
+ if (t.inLinked) return P(e, t) || f(t);
521
518
  switch (e.currentChar()) {
522
- case `{`: return I(e, t) || f(t);
523
- case `}`: return N.UNBALANCED_CLOSING_BRACE, a(), e.next(), d(t, 3, `}`);
524
- case `@`: return L(e, t) || f(t);
519
+ case `{`: return N(e, t) || f(t);
520
+ case `}`: return M.UNBALANCED_CLOSING_BRACE, a(), e.next(), d(t, 3, `}`);
521
+ case `@`: return P(e, t) || f(t);
525
522
  default:
526
- if (T(e)) return n = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
527
- if (E(e)) return d(t, 0, se(e));
523
+ if (T(e)) return n = d(t, 1, j(e)), t.braceNest = 0, t.inLinked = !1, n;
524
+ if (E(e)) return d(t, 0, ce(e));
528
525
  }
529
526
  return n;
530
527
  }
531
- function _e() {
528
+ function ye() {
532
529
  let { currentType: e, offset: t, startLoc: n, endLoc: o } = c;
533
- return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? d(c, 13) : R(r, c);
530
+ return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? d(c, 13) : F(r, c);
534
531
  }
535
532
  return {
536
- nextToken: _e,
533
+ nextToken: ye,
537
534
  currentOffset: i,
538
535
  currentPosition: a,
539
536
  context: l
540
537
  };
541
538
  }
542
- const ve = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, ye = /\\([\\@{}|])/g;
543
- function be(e, t) {
539
+ const Ce = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, we = /\\([\\@{}|])/g;
540
+ function Te(e, t) {
544
541
  return t;
545
542
  }
546
- function xe(e, t, n) {
543
+ function Ee(e, t, n) {
547
544
  switch (e) {
548
545
  case `\\\\`: return `\\`;
549
546
  case `\\'`: return `'`;
@@ -553,7 +550,7 @@ function xe(e, t, n) {
553
550
  }
554
551
  }
555
552
  }
556
- function Se(e = {}) {
553
+ function De(e = {}) {
557
554
  let t = e.location !== !1, { onError: n } = e;
558
555
  function r(e, n, r) {
559
556
  let i = { type: e };
@@ -567,7 +564,7 @@ function Se(e = {}) {
567
564
  }
568
565
  function a(e, t) {
569
566
  let n = e.context(), a = r(3, n.offset, n.startLoc);
570
- return a.value = t.replace(ye, be), i(a, e.currentOffset(), e.currentPosition()), a;
567
+ return a.value = t.replace(we, Te), i(a, e.currentOffset(), e.currentPosition()), a;
571
568
  }
572
569
  function o(e, t) {
573
570
  let { lastOffset: n, lastStartLoc: a } = e.context(), o = r(5, n, a);
@@ -579,11 +576,11 @@ function Se(e = {}) {
579
576
  }
580
577
  function l(e, t) {
581
578
  let { lastOffset: n, lastStartLoc: a } = e.context(), o = r(9, n, a);
582
- return o.value = t.replace(ve, xe), e.nextToken(), i(o, e.currentOffset(), e.currentPosition()), o;
579
+ return o.value = t.replace(Ce, Ee), e.nextToken(), i(o, e.currentOffset(), e.currentPosition()), o;
583
580
  }
584
581
  function u(e) {
585
582
  let t = e.nextToken(), n = e.context(), { lastOffset: a, lastStartLoc: o } = n, s = r(8, a, o);
586
- return t.type === 11 ? (t.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, z(t)), s.value = t.value || ``, i(s, e.currentOffset(), e.currentPosition()), { node: s }) : (N.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, s.value = ``, i(s, a, o), {
583
+ return t.type === 11 ? (t.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, I(t)), s.value = t.value || ``, i(s, e.currentOffset(), e.currentPosition()), { node: s }) : (M.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, s.value = ``, i(s, a, o), {
587
584
  nextConsumeToken: t,
588
585
  node: s
589
586
  });
@@ -598,21 +595,21 @@ function Se(e = {}) {
598
595
  let t = u(e);
599
596
  n.modifier = t.node, a = t.nextConsumeToken || e.nextToken();
600
597
  }
601
- switch (a.type !== 9 && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), a = e.nextToken(), a.type === 2 && (a = e.nextToken()), a.type) {
598
+ switch (a.type !== 9 && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(a)), a = e.nextToken(), a.type === 2 && (a = e.nextToken()), a.type) {
602
599
  case 10:
603
- a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = d(e, a.value || ``);
600
+ a.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(a)), n.key = d(e, a.value || ``);
604
601
  break;
605
602
  case 4:
606
- a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = s(e, a.value || ``);
603
+ a.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(a)), n.key = s(e, a.value || ``);
607
604
  break;
608
605
  case 5:
609
- a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = o(e, a.value || ``);
606
+ a.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(a)), n.key = o(e, a.value || ``);
610
607
  break;
611
608
  case 6:
612
- a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = l(e, a.value || ``);
609
+ a.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(a)), n.key = l(e, a.value || ``);
613
610
  break;
614
611
  default: {
615
- N.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc;
612
+ M.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc;
616
613
  let o = e.context(), s = r(7, o.offset, o.startLoc);
617
614
  return s.value = ``, i(s, o.offset, o.startLoc), n.key = s, i(n, o.offset, o.startLoc), {
618
615
  nextConsumeToken: a,
@@ -630,16 +627,16 @@ function Se(e = {}) {
630
627
  let r = c || e.nextToken();
631
628
  switch (c = null, r.type) {
632
629
  case 0:
633
- r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(a(e, r.value || ``));
630
+ r.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(r)), n.items.push(a(e, r.value || ``));
634
631
  break;
635
632
  case 5:
636
- r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(o(e, r.value || ``));
633
+ r.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(r)), n.items.push(o(e, r.value || ``));
637
634
  break;
638
635
  case 4:
639
- r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(s(e, r.value || ``));
636
+ r.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(r)), n.items.push(s(e, r.value || ``));
640
637
  break;
641
638
  case 6:
642
- r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(l(e, r.value || ``));
639
+ r.value == null && (M.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, I(r)), n.items.push(l(e, r.value || ``));
643
640
  break;
644
641
  case 7: {
645
642
  let t = f(e);
@@ -657,222 +654,222 @@ function Se(e = {}) {
657
654
  let t = p(e);
658
655
  s || (s = t.items.length === 0), c.cases.push(t);
659
656
  } while (o.currentType !== 13);
660
- return s && N.MUST_HAVE_MESSAGES_IN_PLURAL, i(c, e.currentOffset(), e.currentPosition()), c;
657
+ return s && M.MUST_HAVE_MESSAGES_IN_PLURAL, i(c, e.currentOffset(), e.currentPosition()), c;
661
658
  }
662
659
  function h(e) {
663
660
  let t = e.context(), { offset: n, startLoc: r } = t, i = p(e);
664
661
  return t.currentType === 13 ? i : m(e, n, r, i);
665
662
  }
666
663
  function g(n) {
667
- let a = _e(n, c({}, e)), o = a.context(), s = r(0, o.offset, o.startLoc);
668
- return t && s.loc && (s.loc.source = n), s.body = h(a), e.onCacheKey && (s.cacheKey = e.onCacheKey(n)), o.currentType !== 13 && (N.UNEXPECTED_LEXICAL_ANALYSIS, o.lastStartLoc, n[o.offset]), i(s, a.currentOffset(), a.currentPosition()), s;
664
+ let a = Se(n, c({}, e)), o = a.context(), s = r(0, o.offset, o.startLoc);
665
+ return t && s.loc && (s.loc.source = n), s.body = h(a), e.onCacheKey && (s.cacheKey = e.onCacheKey(n)), o.currentType !== 13 && (M.UNEXPECTED_LEXICAL_ANALYSIS, o.lastStartLoc, n[o.offset]), i(s, a.currentOffset(), a.currentPosition()), s;
669
666
  }
670
667
  return { parse: g };
671
668
  }
672
- function z(e) {
669
+ function I(e) {
673
670
  if (e.type === 13) return `EOF`;
674
671
  let t = (e.value || ``).replace(/\r?\n/gu, `\\n`);
675
672
  return t.length > 10 ? t.slice(0, 9) + `…` : t;
676
673
  }
677
- function B(e) {
678
- return y(e) && Me(e) === 0 && (f(e, `b`) || f(e, `body`));
674
+ function L(e) {
675
+ return y(e) && Le(e) === 0 && (f(e, `b`) || f(e, `body`));
679
676
  }
680
- const Ce = [`b`, `body`];
681
- function we(e) {
682
- return H(e, Ce);
677
+ const Oe = [`b`, `body`];
678
+ function ke(e) {
679
+ return z(e, Oe);
683
680
  }
684
- const Te = [`c`, `cases`];
685
- function Ee(e) {
686
- return H(e, Te, []);
681
+ const Ae = [`c`, `cases`];
682
+ function je(e) {
683
+ return z(e, Ae, []);
687
684
  }
688
- const De = [`s`, `static`];
689
- function Oe(e) {
690
- return H(e, De);
685
+ const Me = [`s`, `static`];
686
+ function Ne(e) {
687
+ return z(e, Me);
691
688
  }
692
- const ke = [`i`, `items`];
693
- function Ae(e) {
694
- return H(e, ke, []);
689
+ const Pe = [`i`, `items`];
690
+ function Fe(e) {
691
+ return z(e, Pe, []);
695
692
  }
696
- const je = [`t`, `type`];
697
- function Me(e) {
698
- return H(e, je);
693
+ const Ie = [`t`, `type`];
694
+ function Le(e) {
695
+ return z(e, Ie);
699
696
  }
700
- const Ne = [`v`, `value`];
701
- function V(e, t) {
702
- let n = H(e, Ne);
697
+ const Re = [`v`, `value`];
698
+ function R(e, t) {
699
+ let n = z(e, Re);
703
700
  if (n != null) return n;
704
- throw U(t);
701
+ throw B(t);
705
702
  }
706
- const Pe = [`m`, `modifier`];
707
- function Fe(e) {
708
- return H(e, Pe);
703
+ const ze = [`m`, `modifier`];
704
+ function Be(e) {
705
+ return z(e, ze);
709
706
  }
710
- const Ie = [`k`, `key`];
711
- function Le(e) {
712
- let t = H(e, Ie);
707
+ const Ve = [`k`, `key`];
708
+ function He(e) {
709
+ let t = z(e, Ve);
713
710
  if (t) return t;
714
- throw U(6);
711
+ throw B(6);
715
712
  }
716
- function H(e, t, n) {
713
+ function z(e, t, n) {
717
714
  for (let n = 0; n < t.length; n++) {
718
715
  let r = t[n];
719
716
  if (f(e, r) && e[r] != null) return e[r];
720
717
  }
721
718
  return n;
722
719
  }
723
- const Re = [
724
- ...Ce,
725
- ...Te,
726
- ...De,
727
- ...ke,
728
- ...Ie,
720
+ const Ue = [
721
+ ...Oe,
722
+ ...Ae,
723
+ ...Me,
729
724
  ...Pe,
730
- ...Ne,
731
- ...je
725
+ ...Ve,
726
+ ...ze,
727
+ ...Re,
728
+ ...Ie
732
729
  ];
733
- function U(e) {
730
+ function B(e) {
734
731
  return Error(`unhandled node type: ${e}`);
735
732
  }
736
- function ze(e) {
737
- return (t) => Be(t, e);
733
+ function We(e) {
734
+ return (t) => Ge(t, e);
738
735
  }
739
- function Be(e, t) {
740
- let n = we(t);
741
- if (n == null) throw U(0);
742
- if (Me(n) === 1) {
743
- let t = Ee(n);
744
- return e.plural(t.reduce((t, n) => [...h(t) ? t : [t], Ve(e, n)], []));
736
+ function Ge(e, t) {
737
+ let n = ke(t);
738
+ if (n == null) throw B(0);
739
+ if (Le(n) === 1) {
740
+ let t = je(n);
741
+ return e.plural(t.reduce((t, n) => [...h(t) ? t : [t], Ke(e, n)], []));
745
742
  }
746
- return Ve(e, n);
743
+ return Ke(e, n);
747
744
  }
748
- function Ve(e, t) {
749
- let n = Oe(t);
745
+ function Ke(e, t) {
746
+ let n = Ne(t);
750
747
  if (n != null) return e.type === `text` ? n : e.normalize([n]);
751
748
  {
752
- let n = Ae(t).reduce((t, n) => [...t, He(e, n)], []);
749
+ let n = Fe(t).reduce((t, n) => [...t, qe(e, n)], []);
753
750
  return e.normalize(n);
754
751
  }
755
752
  }
756
- function He(e, t) {
757
- let n = Me(t);
753
+ function qe(e, t) {
754
+ let n = Le(t);
758
755
  switch (n) {
759
- case 3: return V(t, n);
760
- case 9: return V(t, n);
756
+ case 3: return R(t, n);
757
+ case 9: return R(t, n);
761
758
  case 4: {
762
759
  let r = t;
763
760
  if (f(r, `k`) && r.k) return e.interpolate(e.named(r.k));
764
761
  if (f(r, `key`) && r.key) return e.interpolate(e.named(r.key));
765
- throw U(n);
762
+ throw B(n);
766
763
  }
767
764
  case 5: {
768
765
  let r = t;
769
766
  if (f(r, `i`) && i(r.i)) return e.interpolate(e.list(r.i));
770
767
  if (f(r, `index`) && i(r.index)) return e.interpolate(e.list(r.index));
771
- throw U(n);
768
+ throw B(n);
772
769
  }
773
770
  case 6: {
774
- let n = t, r = Fe(n), i = Le(n);
775
- return e.linked(He(e, i), r ? He(e, r) : void 0, e.type);
771
+ let n = t, r = Be(n), i = He(n);
772
+ return e.linked(qe(e, i), r ? qe(e, r) : void 0, e.type);
776
773
  }
777
- case 7: return V(t, n);
778
- case 8: return V(t, n);
774
+ case 7: return R(t, n);
775
+ case 8: return R(t, n);
779
776
  default: throw Error(`unhandled node on format message part: ${n}`);
780
777
  }
781
778
  }
782
- const Ue = (e) => e;
783
- let W = u();
784
- function We() {
785
- W = u();
779
+ const Je = (e) => e;
780
+ let V = u();
781
+ function Ye() {
782
+ V = u();
786
783
  }
787
- function Ge(e, t = {}) {
788
- let n = !1, r = t.onError || F;
784
+ function Xe(e, t = {}) {
785
+ let n = !1, r = t.onError || P;
789
786
  t.onError = (e) => {
790
787
  n = !0, r(e);
791
788
  };
792
- let i = Se(t).parse(e);
793
- return t.optimize && L(i), t.mangle && I(i), {
789
+ let i = De(t).parse(e);
790
+ return t.optimize && ye(i), t.mangle && F(i), {
794
791
  ast: i,
795
792
  detectError: n,
796
793
  code: ``
797
794
  };
798
795
  }
799
- function Ke(e, t) {
796
+ function Ze(e, t) {
800
797
  if (_(e)) {
801
798
  v(t.warnHtmlMessage) && t.warnHtmlMessage;
802
- let n = (t.onCacheKey || Ue)(e), r = W[n];
799
+ let n = (t.onCacheKey || Je)(e), r = V[n];
803
800
  if (r) return r;
804
- let { ast: i, detectError: a } = Ge(e, {
801
+ let { ast: i, detectError: a } = Xe(e, {
805
802
  ...t,
806
803
  location: !1,
807
804
  mangle: !0,
808
805
  optimize: !0
809
- }), o = ze(i);
810
- return a ? o : W[n] = o;
806
+ }), o = We(i);
807
+ return a ? o : V[n] = o;
811
808
  }
812
809
  {
813
- if (!B(e)) return (() => e);
810
+ if (!L(e)) return (() => e);
814
811
  let t = e.cacheKey;
815
- return t ? W[t] || (W[t] = ze(e)) : ze(e);
812
+ return t ? V[t] || (V[t] = We(e)) : We(e);
816
813
  }
817
814
  }
818
- const G = {
815
+ const H = {
819
816
  INVALID_ARGUMENT: 17,
820
817
  INVALID_DATE_ARGUMENT: 18,
821
818
  INVALID_ISO_DATE_ARGUMENT: 19,
822
819
  NOT_SUPPORT_LOCALE_PROMISE_VALUE: 20,
823
820
  NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 21,
824
821
  NOT_SUPPORT_LOCALE_TYPE: 22
825
- }, qe = 23;
826
- function Je(e) {
827
- return P(e, null, void 0);
822
+ }, Qe = 23;
823
+ function $e(e) {
824
+ return N(e, null, void 0);
828
825
  }
829
- G.INVALID_ARGUMENT, G.INVALID_DATE_ARGUMENT, G.INVALID_ISO_DATE_ARGUMENT, G.NOT_SUPPORT_LOCALE_PROMISE_VALUE, G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, G.NOT_SUPPORT_LOCALE_TYPE;
830
- function Ye(e, t) {
831
- return t.locale == null ? Xe(e.locale) : Xe(t.locale);
826
+ H.INVALID_ARGUMENT, H.INVALID_DATE_ARGUMENT, H.INVALID_ISO_DATE_ARGUMENT, H.NOT_SUPPORT_LOCALE_PROMISE_VALUE, H.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, H.NOT_SUPPORT_LOCALE_TYPE;
827
+ function U(e, t) {
828
+ return t.locale == null ? G(e.locale) : G(t.locale);
832
829
  }
833
- let K;
834
- function Xe(e) {
830
+ let W;
831
+ function G(e) {
835
832
  if (_(e)) return e;
836
833
  if (g(e)) {
837
- if (e.resolvedOnce && K != null) return K;
834
+ if (e.resolvedOnce && W != null) return W;
838
835
  if (e.constructor.name === `Function`) {
839
836
  let t = e();
840
- if (b(t)) throw Error(G.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
841
- return K = t;
837
+ if (b(t)) throw Error(H.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
838
+ return W = t;
842
839
  }
843
- throw Error(G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
840
+ throw Error(H.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
844
841
  }
845
- throw Error(G.NOT_SUPPORT_LOCALE_TYPE);
842
+ throw Error(H.NOT_SUPPORT_LOCALE_TYPE);
846
843
  }
847
- function Ze(e, t, n) {
844
+ function et(e, t, n) {
848
845
  return [.../* @__PURE__ */ new Set([n, ...h(t) ? t : y(t) ? Object.keys(t).filter((e) => e !== "default") : _(t) ? [t] : [n]])];
849
846
  }
850
- function Qe(e, t, n) {
851
- let r = _(n) ? n : Y, i = e, a;
847
+ function tt(e, t, n) {
848
+ let r = _(n) ? n : J, i = e, a;
852
849
  y(t) ? (i.__localeChainObjectCache || (i.__localeChainObjectCache = /* @__PURE__ */ new WeakMap()), a = i.__localeChainObjectCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainObjectCache.set(t, a))) : (i.__localeChainCache || (i.__localeChainCache = /* @__PURE__ */ new Map()), a = i.__localeChainCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainCache.set(t, a)));
853
850
  let o = a.get(r);
854
851
  if (o) return o;
855
852
  let s = [], c = [n];
856
- for (; h(c);) c = $e(s, c, t);
853
+ for (; h(c);) c = nt(s, c, t);
857
854
  let l = h(t) || !C(t) ? t : t.default ? t.default : null;
858
- return c = _(l) ? [l] : l, h(c) && $e(s, c, !1), a.set(r, s), s;
855
+ return c = _(l) ? [l] : l, h(c) && nt(s, c, !1), a.set(r, s), s;
859
856
  }
860
- function $e(e, t, n) {
857
+ function nt(e, t, n) {
861
858
  let r = !0;
862
859
  for (let i = 0; i < t.length && v(r); i++) {
863
860
  let a = t[i];
864
- _(a) && (r = et(e, t[i], n));
861
+ _(a) && (r = rt(e, t[i], n));
865
862
  }
866
863
  return r;
867
864
  }
868
- function et(e, t, n) {
865
+ function rt(e, t, n) {
869
866
  let r, i = t.split(`-`);
870
867
  do
871
- r = tt(e, i.join(`-`), n), i.splice(-1, 1);
868
+ r = it(e, i.join(`-`), n), i.splice(-1, 1);
872
869
  while (i.length && r === !0);
873
870
  return r;
874
871
  }
875
- function tt(e, t, n) {
872
+ function it(e, t, n) {
876
873
  let r = !1;
877
874
  if (!e.includes(t) && (r = !0, t)) {
878
875
  r = t[t.length - 1] !== `!`;
@@ -881,53 +878,53 @@ function tt(e, t, n) {
881
878
  }
882
879
  return r;
883
880
  }
884
- const q = [];
885
- q[0] = {
881
+ const K = [];
882
+ K[0] = {
886
883
  w: [0],
887
884
  i: [3, 0],
888
885
  "[": [4],
889
886
  o: [7]
890
- }, q[1] = {
887
+ }, K[1] = {
891
888
  w: [1],
892
889
  ".": [2],
893
890
  "[": [4],
894
891
  o: [7]
895
- }, q[2] = {
892
+ }, K[2] = {
896
893
  w: [2],
897
894
  i: [3, 0],
898
895
  0: [3, 0]
899
- }, q[3] = {
896
+ }, K[3] = {
900
897
  i: [3, 0],
901
898
  0: [3, 0],
902
899
  w: [1, 1],
903
900
  ".": [2, 1],
904
901
  "[": [4, 1],
905
902
  o: [7, 1]
906
- }, q[4] = {
903
+ }, K[4] = {
907
904
  "'": [5, 0],
908
905
  "\"": [6, 0],
909
906
  "[": [4, 2],
910
907
  "]": [1, 3],
911
908
  o: 8,
912
909
  l: [4, 0]
913
- }, q[5] = {
910
+ }, K[5] = {
914
911
  "'": [4, 0],
915
912
  o: 8,
916
913
  l: [5, 0]
917
- }, q[6] = {
914
+ }, K[6] = {
918
915
  "\"": [4, 0],
919
916
  o: 8,
920
917
  l: [6, 0]
921
918
  };
922
- const nt = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
923
- function rt(e) {
924
- return nt.test(e);
919
+ const at = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
920
+ function ot(e) {
921
+ return at.test(e);
925
922
  }
926
- function it(e) {
923
+ function st(e) {
927
924
  let t = e.charCodeAt(0);
928
925
  return t === e.charCodeAt(e.length - 1) && (t === 34 || t === 39) ? e.slice(1, -1) : e;
929
926
  }
930
- function at(e) {
927
+ function ct(e) {
931
928
  if (e == null) return `o`;
932
929
  switch (e.charCodeAt(0)) {
933
930
  case 91:
@@ -948,11 +945,11 @@ function at(e) {
948
945
  }
949
946
  return `i`;
950
947
  }
951
- function ot(e) {
948
+ function lt(e) {
952
949
  let t = e.trim();
953
- return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : rt(t) ? it(t) : `*` + t;
950
+ return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : ot(t) ? st(t) : `*` + t;
954
951
  }
955
- function st(e) {
952
+ function ut(e) {
956
953
  let t = [], n = -1, r = 0, i = 0, a, o, s, c, l, u, d, f = [];
957
954
  f[0] = () => {
958
955
  o === void 0 ? o = s : o += s;
@@ -963,7 +960,7 @@ function st(e) {
963
960
  }, f[3] = () => {
964
961
  if (i > 0) i--, r = 4, f[0]();
965
962
  else {
966
- if (i = 0, o === void 0 || (o = ot(o), o === !1)) return !1;
963
+ if (i = 0, o === void 0 || (o = lt(o), o === !1)) return !1;
967
964
  f[1]();
968
965
  }
969
966
  };
@@ -972,29 +969,29 @@ function st(e) {
972
969
  if (r === 5 && t === `'` || r === 6 && t === `"`) return n++, s = `\\` + t, f[0](), !0;
973
970
  }
974
971
  for (; r !== null;) if (n++, a = e[n], !(a === `\\` && p())) {
975
- if (c = at(a), d = q[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
972
+ if (c = ct(a), d = K[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
976
973
  if (r === 7) return t;
977
974
  }
978
975
  }
979
- const ct = /* @__PURE__ */ new Map();
980
- function lt(e, t) {
976
+ const dt = /* @__PURE__ */ new Map();
977
+ function ft(e, t) {
981
978
  return y(e) ? p(e, t) : null;
982
979
  }
983
- function ut(e, t) {
980
+ function pt(e, t) {
984
981
  if (!y(e)) return null;
985
- let n = ct.get(t);
986
- if (n || (n = st(t), n && ct.set(t, n)), !n) return null;
982
+ let n = dt.get(t);
983
+ if (n || (n = ut(t), n && dt.set(t, n)), !n) return null;
987
984
  let r = n.length, i = e, a = 0;
988
985
  for (; a < r;) {
989
986
  let e = n[a];
990
- if (Re.includes(e) && B(i) || !y(i) || !f(i, e)) return null;
987
+ if (Ue.includes(e) && L(i) || !y(i) || !f(i, e)) return null;
991
988
  let t = i[e];
992
989
  if (t === void 0 || g(i)) return null;
993
990
  i = t, a++;
994
991
  }
995
992
  return i;
996
993
  }
997
- const J = {
994
+ const q = {
998
995
  NOT_FOUND_KEY: 1,
999
996
  FALLBACK_TO_TRANSLATE: 2,
1000
997
  CANNOT_FORMAT_NUMBER: 3,
@@ -1007,50 +1004,50 @@ const J = {
1007
1004
  IGNORE_UNSAFE_LOCALE: 10,
1008
1005
  FALLBACK_TO_DEFAULT_PLURAL_RULE: 11,
1009
1006
  FALLBACK_FROM_INVALID_LOCALE: 12
1010
- }, dt = 13, ft = {
1011
- [J.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1012
- [J.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1013
- [J.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1014
- [J.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1015
- [J.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1016
- [J.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1017
- [J.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.`,
1018
- [J.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1019
- [J.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1020
- [J.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1021
- [J.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1022
- [J.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1007
+ }, mt = 13, ht = {
1008
+ [q.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1009
+ [q.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1010
+ [q.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1011
+ [q.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1012
+ [q.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1013
+ [q.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1014
+ [q.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.`,
1015
+ [q.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1016
+ [q.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1017
+ [q.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1018
+ [q.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1019
+ [q.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1023
1020
  };
1024
- function pt(e, ...n) {
1025
- return t(ft[e], ...n);
1021
+ function gt(e, ...n) {
1022
+ return t(ht[e], ...n);
1026
1023
  }
1027
- const mt = `12.0.0-alpha.6`, ht = -1, Y = `en-US`, gt = ``, _t = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1028
- function vt() {
1024
+ const _t = `12.0.0-alpha.8`, vt = -1, J = `en-US`, yt = ``, bt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1025
+ function xt() {
1029
1026
  return {
1030
1027
  upper: (e, t) => t === `text` && _(e) ? e.toUpperCase() : t === `vnode` && y(e) && `__v_isVNode` in e ? e.children.toUpperCase() : e,
1031
1028
  lower: (e, t) => t === `text` && _(e) ? e.toLowerCase() : t === `vnode` && y(e) && `__v_isVNode` in e ? e.children.toLowerCase() : e,
1032
- capitalize: (e, t) => t === `text` && _(e) ? _t(e) : t === `vnode` && y(e) && `__v_isVNode` in e ? _t(e.children) : e
1029
+ capitalize: (e, t) => t === `text` && _(e) ? bt(e) : t === `vnode` && y(e) && `__v_isVNode` in e ? bt(e.children) : e
1033
1030
  };
1034
1031
  }
1035
- let yt;
1036
- function bt(e) {
1037
- yt = e;
1032
+ let St;
1033
+ function Ct(e) {
1034
+ St = e;
1038
1035
  }
1039
- let xt;
1040
- function St(e) {
1041
- xt = e;
1036
+ let wt;
1037
+ function Tt(e) {
1038
+ wt = e;
1042
1039
  }
1043
- let Ct;
1044
- function wt(e) {
1045
- Ct = e;
1040
+ let Et;
1041
+ function Dt(e) {
1042
+ Et = e;
1046
1043
  }
1047
- let Tt = 0;
1048
- function Et(e = {}) {
1049
- let t = g(e.onWarn) ? e.onWarn : E, n = _(e.version) ? e.version : mt, r = _(e.locale) || g(e.locale) ? e.locale : Y, i = g(r) ? Y : r, a = At(e.fallbackLocale) ? e.fallbackLocale : i, o = C(e.messages) ? e.messages : Dt(i), s = C(e.datetimeFormats) ? e.datetimeFormats : Dt(i), l = C(e.numberFormats) ? e.numberFormats : Dt(i), d = c(u(), e.modifiers, vt()), f = e.pluralRules || u(), p = g(e.missing) ? e.missing : null, m = !jt(e.missingWarn) || e.missingWarn, h = !jt(e.fallbackWarn) || e.fallbackWarn, b = !!e.fallbackFormat, x = !!e.unresolving, S = g(e.postTranslation) ? e.postTranslation : null, w = C(e.processor) ? e.processor : null, T = !v(e.warnHtmlMessage) || e.warnHtmlMessage, D = !!e.escapeParameter, ee = g(e.messageCompiler) ? e.messageCompiler : yt || null, te = g(e.messageResolver) ? e.messageResolver : xt || lt, ne = g(e.localeFallbacker) ? e.localeFallbacker : Ct || Ze, re = y(e.fallbackContext) ? e.fallbackContext : void 0;
1050
- Tt++;
1044
+ let Ot = 0;
1045
+ function kt(e = {}) {
1046
+ let t = g(e.onWarn) ? e.onWarn : E, n = _(e.version) ? e.version : _t, r = _(e.locale) || g(e.locale) ? e.locale : J, i = g(r) ? J : r, a = Nt(e.fallbackLocale) ? e.fallbackLocale : i, o = C(e.messages) ? e.messages : At(i), s = C(e.datetimeFormats) ? e.datetimeFormats : At(i), l = C(e.numberFormats) ? e.numberFormats : At(i), d = c(u(), e.modifiers, xt()), f = e.pluralRules || u(), p = g(e.missing) ? e.missing : null, m = !Y(e.missingWarn) || e.missingWarn, h = !Y(e.fallbackWarn) || e.fallbackWarn, b = !!e.fallbackFormat, x = !!e.unresolving, S = g(e.postTranslation) ? e.postTranslation : null, w = C(e.processor) ? e.processor : null, T = !v(e.warnHtmlMessage) || e.warnHtmlMessage, D = !!e.escapeParameter, ee = g(e.messageCompiler) ? e.messageCompiler : St || null, te = g(e.messageResolver) ? e.messageResolver : wt || ft, ne = g(e.localeFallbacker) ? e.localeFallbacker : Et || et, re = y(e.fallbackContext) ? e.fallbackContext : void 0;
1047
+ Ot++;
1051
1048
  let O = {
1052
1049
  version: n,
1053
- cid: Tt,
1050
+ cid: Ot,
1054
1051
  locale: r,
1055
1052
  fallbackLocale: a,
1056
1053
  messages: o,
@@ -1073,29 +1070,29 @@ function Et(e = {}) {
1073
1070
  };
1074
1071
  return O.datetimeFormats = s, O.numberFormats = l, O.__datetimeFormatters = /* @__PURE__ */ new Map(), O.__numberFormatters = /* @__PURE__ */ new Map(), O;
1075
1072
  }
1076
- const Dt = (e) => ({ [e]: u() });
1077
- function Ot(e, t) {
1073
+ const At = (e) => ({ [e]: u() });
1074
+ function jt(e, t) {
1078
1075
  let n = p(e.messages, t);
1079
1076
  if (n == null) return;
1080
1077
  let r = u();
1081
- return pe(n, r), r;
1078
+ return j(n, r), r;
1082
1079
  }
1083
- function kt(e, t, n) {
1080
+ function Mt(e, t, n) {
1084
1081
  m(t) || (e.messages[t] = n);
1085
1082
  }
1086
- function At(e) {
1083
+ function Nt(e) {
1087
1084
  return _(e) || h(e) || C(e) || e === !1;
1088
1085
  }
1089
- function jt(e) {
1086
+ function Y(e) {
1090
1087
  return v(e) || o(e);
1091
1088
  }
1092
- function Mt(e, t) {
1089
+ function Pt(e, t) {
1093
1090
  return o(e) ? e.test(t) : e;
1094
1091
  }
1095
- function Nt(e, t) {
1092
+ function Ft(e, t) {
1096
1093
  return o(e) ? e.test(t) : e;
1097
1094
  }
1098
- function Pt(e, t, n, r, i) {
1095
+ function It(e, t, n, r, i) {
1099
1096
  let { missing: a, onWarn: o } = e;
1100
1097
  if (a !== null) {
1101
1098
  let r = a(e, n, t, i);
@@ -1103,84 +1100,84 @@ function Pt(e, t, n, r, i) {
1103
1100
  }
1104
1101
  return t;
1105
1102
  }
1106
- function Ft(e, t) {
1103
+ function Lt(e, t) {
1107
1104
  let n = e;
1108
1105
  y(t) ? n.__localeChainObjectCache?.delete(t) : n.__localeChainCache?.delete(t);
1109
1106
  }
1110
- function It(e, t, n) {
1111
- Ft(e, n), e.fallbackContext && Ft(e.fallbackContext, n);
1107
+ function Rt(e, t, n) {
1108
+ Lt(e, n), e.fallbackContext && Lt(e.fallbackContext, n);
1112
1109
  {
1113
1110
  let { __datetimeFormatters: t, __numberFormatters: n } = e;
1114
1111
  t.clear(), n.clear();
1115
1112
  }
1116
1113
  e.localeFallbacker(e, n, t);
1117
1114
  }
1118
- function Lt(e, t) {
1115
+ function zt(e, t) {
1119
1116
  return e !== t && e.split(`-`)[0] === t.split(`-`)[0];
1120
1117
  }
1121
- function Rt(e, t) {
1118
+ function Bt(e, t) {
1122
1119
  let n = t.indexOf(e);
1123
1120
  if (n === -1) return !1;
1124
- for (let r = n + 1; r < t.length; r++) if (Lt(e, t[r])) return !0;
1121
+ for (let r = n + 1; r < t.length; r++) if (zt(e, t[r])) return !0;
1125
1122
  return !1;
1126
1123
  }
1127
- function zt(e, t, n, r, i, a, o) {
1124
+ function Vt(e, t, n, r, i, a, o) {
1128
1125
  let { fallbackLocale: s, localeFallbacker: c, onWarn: l } = e, u = c(e, s, n);
1129
1126
  for (let n = 0; n < u.length; n++) {
1130
1127
  let a = u[n], s = p(p(r, a) || {}, t);
1131
1128
  if (C(s) && _(a)) return a;
1132
- Pt(e, t, a, i, o);
1129
+ It(e, t, a, i, o);
1133
1130
  }
1134
1131
  return null;
1135
1132
  }
1136
- function Bt(e) {
1133
+ function Ht(e) {
1137
1134
  try {
1138
1135
  return Intl.getCanonicalLocales(e), !0;
1139
1136
  } catch {
1140
1137
  return !1;
1141
1138
  }
1142
1139
  }
1143
- function Vt(e, t, n, r, i) {
1140
+ function Ut(e, t, n, r, i) {
1144
1141
  try {
1145
1142
  return new t(n, r);
1146
1143
  } catch (i) {
1147
- if (Bt(n)) throw i;
1144
+ if (Ht(n)) throw i;
1148
1145
  let { fallbackLocale: a, localeFallbacker: o, onWarn: s } = e;
1149
- return new t(o(e, a, n).find(Bt) || `en-US`, r);
1146
+ return new t(o(e, a, n).find(Ht) || `en-US`, r);
1150
1147
  }
1151
1148
  }
1152
- function Ht(e, [t, n, r, i], a, o, s, l) {
1153
- let u = v(r.missingWarn) ? r.missingWarn : e.missingWarn, d = v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Ye(e, r);
1149
+ function Wt(e, [t, n, r, i], a, o, s, l) {
1150
+ let u = v(r.missingWarn) ? r.missingWarn : e.missingWarn, d = v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = U(e, r);
1154
1151
  if (!_(t) || t === ``) {
1155
- let t = Vt(e, a, p.replace(/!/g, ``), i, l);
1152
+ let t = Ut(e, a, p.replace(/!/g, ``), i, l);
1156
1153
  return f ? t.formatToParts(n) : t.format(n);
1157
1154
  }
1158
- let m = zt(e, t, p, s, u, d, l);
1155
+ let m = Vt(e, t, p, s, u, d, l);
1159
1156
  if (!_(m)) return e.unresolving ? -1 : t;
1160
- let h = s[m][t], g = Ut(m, t, i), y = o.get(g);
1161
- return y || (y = Vt(e, a, m, c({}, h, i), l), o.set(g, y)), f ? y.formatToParts(n) : y.format(n);
1157
+ let h = s[m][t], g = Gt(m, t, i), y = o.get(g);
1158
+ return y || (y = Ut(e, a, m, c({}, h, i), l), o.set(g, y)), f ? y.formatToParts(n) : y.format(n);
1162
1159
  }
1163
- function Ut(e, t, n) {
1160
+ function Gt(e, t, n) {
1164
1161
  let r = `${e}__${t}`;
1165
1162
  return C(n) && !s(n) && (r = `${r}__${JSON.stringify(n)}`), r;
1166
1163
  }
1167
- function Wt(e, t, n) {
1164
+ function Kt(e, t, n) {
1168
1165
  for (let r in n) {
1169
1166
  let n = `${t}__${r}`;
1170
1167
  for (let t of e.keys()) (t === n || t.startsWith(`${n}__`)) && e.delete(t);
1171
1168
  }
1172
1169
  }
1173
- function Gt(e, t, n, r) {
1170
+ function qt(e, t, n, r) {
1174
1171
  let [, i, a, o] = e, s = n;
1175
1172
  return _(i) ? t.key = i : C(i) && Object.keys(i).forEach((e) => {
1176
1173
  r.includes(e) ? s[e] = i[e] : t[e] = i[e];
1177
1174
  }), _(a) ? t.locale = a : C(a) && (s = a), C(o) && (s = o), s;
1178
1175
  }
1179
- function Kt(e, ...t) {
1176
+ function Jt(e, ...t) {
1180
1177
  let { datetimeFormats: n, onWarn: r } = e, { __datetimeFormatters: o } = e;
1181
- return !_(t[0]) && !a(t[0]) && !i(t[0]) ? `` : Ht(e, Jt(...t), Intl.DateTimeFormat, o, n, `datetime format`);
1178
+ return !_(t[0]) && !a(t[0]) && !i(t[0]) ? `` : Wt(e, Xt(...t), Intl.DateTimeFormat, o, n, `datetime format`);
1182
1179
  }
1183
- const qt = [
1180
+ const Yt = [
1184
1181
  `localeMatcher`,
1185
1182
  `weekday`,
1186
1183
  `era`,
@@ -1202,24 +1199,24 @@ const qt = [
1202
1199
  `hourCycle`,
1203
1200
  `fractionalSecondDigits`
1204
1201
  ];
1205
- function Jt(...e) {
1202
+ function Xt(...e) {
1206
1203
  let [t] = e, n = u(), r = u(), o;
1207
1204
  if (_(t)) {
1208
1205
  let e = t.match(/^(\d{4}-\d{2}-\d{2})(?:(T|\s)(.+))?$/);
1209
- if (!e) throw Error(G.INVALID_ISO_DATE_ARGUMENT);
1206
+ if (!e) throw Error(H.INVALID_ISO_DATE_ARGUMENT);
1210
1207
  let n = e[3] ? e[3].trim().startsWith(`T`) ? `${e[1].trim()}${e[3].trim()}` : `${e[1].trim()}T${e[3].trim()}` : e[1].trim();
1211
1208
  o = new Date(n);
1212
1209
  try {
1213
1210
  o.toISOString();
1214
1211
  } catch {
1215
- throw Error(G.INVALID_ISO_DATE_ARGUMENT);
1212
+ throw Error(H.INVALID_ISO_DATE_ARGUMENT);
1216
1213
  }
1217
1214
  } else if (a(t)) {
1218
- if (isNaN(t.getTime())) throw Error(G.INVALID_DATE_ARGUMENT);
1215
+ if (isNaN(t.getTime())) throw Error(H.INVALID_DATE_ARGUMENT);
1219
1216
  o = t;
1220
1217
  } else if (i(t)) o = t;
1221
- else throw Error(G.INVALID_ARGUMENT);
1222
- let s = Gt(e, n, r, qt);
1218
+ else throw Error(H.INVALID_ARGUMENT);
1219
+ let s = qt(e, n, r, Yt);
1223
1220
  return [
1224
1221
  n.key || ``,
1225
1222
  o,
@@ -1227,14 +1224,14 @@ function Jt(...e) {
1227
1224
  s
1228
1225
  ];
1229
1226
  }
1230
- function Yt(e, t, n) {
1231
- Wt(e.__datetimeFormatters, t, n);
1227
+ function Zt(e, t, n) {
1228
+ Kt(e.__datetimeFormatters, t, n);
1232
1229
  }
1233
- function Xt(e, ...t) {
1230
+ function Qt(e, ...t) {
1234
1231
  let { numberFormats: n, onWarn: r } = e, { __numberFormatters: a } = e;
1235
- return i(t[0]) ? Ht(e, Qt(...t), Intl.NumberFormat, a, n, `number format`) : ``;
1232
+ return i(t[0]) ? Wt(e, en(...t), Intl.NumberFormat, a, n, `number format`) : ``;
1236
1233
  }
1237
- const Zt = [
1234
+ const $t = [
1238
1235
  `localeMatcher`,
1239
1236
  `style`,
1240
1237
  `currency`,
@@ -1256,10 +1253,10 @@ const Zt = [
1256
1253
  `roundingIncrement`,
1257
1254
  `trailingZeroDisplay`
1258
1255
  ];
1259
- function Qt(...e) {
1256
+ function en(...e) {
1260
1257
  let [t] = e, n = u(), r = u();
1261
- if (!i(t)) throw Error(G.INVALID_ARGUMENT);
1262
- let a = t, o = Gt(e, n, r, Zt);
1258
+ if (!i(t)) throw Error(H.INVALID_ARGUMENT);
1259
+ let a = t, o = qt(e, n, r, $t);
1263
1260
  return [
1264
1261
  n.key || ``,
1265
1262
  a,
@@ -1267,14 +1264,14 @@ function Qt(...e) {
1267
1264
  o
1268
1265
  ];
1269
1266
  }
1270
- function $t(e, t, n) {
1271
- Wt(e.__numberFormatters, t, n);
1267
+ function tn(e, t, n) {
1268
+ Kt(e.__numberFormatters, t, n);
1272
1269
  }
1273
- const en = (e) => e, tn = (e) => ``, nn = `text`, rn = (e) => e.length === 0 ? `` : T(e), an = w;
1270
+ const nn = (e) => e, rn = (e) => ``, an = `text`, on = (e) => e.length === 0 ? `` : T(e), sn = w;
1274
1271
  function X(e, t) {
1275
1272
  return e = Math.abs(e), t === 2 ? e === 1 ? 0 : 1 : Math.min(e, 2);
1276
1273
  }
1277
- const on = [
1274
+ const cn = [
1278
1275
  `zero`,
1279
1276
  `one`,
1280
1277
  `two`,
@@ -1282,29 +1279,29 @@ const on = [
1282
1279
  `many`,
1283
1280
  `other`
1284
1281
  ], Z = /* @__PURE__ */ new Map();
1285
- function sn(e) {
1282
+ function ln(e) {
1286
1283
  try {
1287
1284
  if (Intl.PluralRules.supportedLocalesOf(e).length === 0) return null;
1288
1285
  let t = new Intl.PluralRules(e);
1289
1286
  return {
1290
1287
  rules: t,
1291
- categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => on.indexOf(e) - on.indexOf(t))
1288
+ categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => cn.indexOf(e) - cn.indexOf(t))
1292
1289
  };
1293
1290
  } catch {
1294
1291
  return null;
1295
1292
  }
1296
1293
  }
1297
- function cn(e) {
1294
+ function un(e) {
1298
1295
  let t = Z.get(e);
1299
- return t === void 0 && (t = sn(e), Z.size >= 1e3 && Z.delete(Z.keys().next().value), Z.set(e, t)), t;
1296
+ return t === void 0 && (t = ln(e), Z.size >= 1e3 && Z.delete(Z.keys().next().value), Z.set(e, t)), t;
1300
1297
  }
1301
- function ln(e) {
1298
+ function dn(e) {
1302
1299
  return i(e.pluralIndex) ? e.pluralIndex : i(e.named?.count) ? e.named.count : i(e.named?.n) ? e.named.n : -1;
1303
1300
  }
1304
- function un(e = {}) {
1305
- let t = e.locale, n = ln(e), r;
1301
+ function fn(e = {}) {
1302
+ let t = e.locale, n = dn(e), r;
1306
1303
  r = _(t) && e.pluralRules && g(p(e.pluralRules, t)) ? e.pluralRules[t] : _(t) && typeof Intl < `u` && Intl.PluralRules !== void 0 ? (e, n) => {
1307
- let r = cn(t);
1304
+ let r = un(t);
1308
1305
  if (r === null || n > r.categories.length) return X(e, n);
1309
1306
  let { rules: i, categories: a } = r, o = i.select(Math.abs(e)), s = a.indexOf(o);
1310
1307
  return Math.min(s === -1 ? n - 1 : s, n - 1);
@@ -1314,9 +1311,9 @@ function un(e = {}) {
1314
1311
  return f && n == null && (t === `count` || t === `n`) ? e.pluralIndex : n;
1315
1312
  };
1316
1313
  function b(t, n) {
1317
- return (g(e.messages) ? e.messages(t, !!n) : y(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : tn);
1314
+ return (g(e.messages) ? e.messages(t, !!n) : y(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : rn);
1318
1315
  }
1319
- let x = (t) => e.modifiers ? p(e.modifiers, t) : en, S = g(e.processor?.normalize) ? e.processor.normalize : rn, C = g(e.processor?.interpolate) ? e.processor.interpolate : an, w = {
1316
+ let x = (t) => e.modifiers ? p(e.modifiers, t) : nn, S = g(e.processor?.normalize) ? e.processor.normalize : on, C = g(e.processor?.interpolate) ? e.processor.interpolate : sn, w = {
1320
1317
  list: l,
1321
1318
  named: v,
1322
1319
  plural: o,
@@ -1329,7 +1326,7 @@ function un(e = {}) {
1329
1326
  return g(l) ? l(c, i) : c;
1330
1327
  },
1331
1328
  message: b,
1332
- type: _(e.processor?.type) ? e.processor.type : nn,
1329
+ type: _(e.processor?.type) ? e.processor.type : an,
1333
1330
  interpolate: C,
1334
1331
  normalize: S,
1335
1332
  values: c(u(), s, d, f ? {
@@ -1339,28 +1336,28 @@ function un(e = {}) {
1339
1336
  };
1340
1337
  return w;
1341
1338
  }
1342
- const dn = () => ``, Q = (e) => g(e), $ = (e) => _(e) || B(e) || Q(e);
1343
- function fn(e, ...t) {
1344
- let [n, r] = gn(...t), i = Ye(e, r), a = v(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1345
- a && pn(r);
1339
+ const pn = () => ``, Q = (e) => g(e), $ = (e) => _(e) || L(e) || Q(e);
1340
+ function mn(e, ...t) {
1341
+ let [n, r] = vn(...t), i = U(e, r), a = v(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1342
+ a && hn(r);
1346
1343
  let o = !!r.resolvedMessage, [s, c, l] = o ? [
1347
1344
  n,
1348
1345
  i,
1349
1346
  p(e.messages, i) || u()
1350
- ] : mn(e, n, i, e.fallbackLocale, v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, v(r.missingWarn) ? r.missingWarn : e.missingWarn), d = n;
1347
+ ] : gn(e, n, i, e.fallbackLocale, v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, v(r.missingWarn) ? r.missingWarn : e.missingWarn), d = n;
1351
1348
  if (!o && !$(s)) {
1352
1349
  let t = _(r.default) ? r.default : v(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
1353
1350
  (e.fallbackFormat || t != null && (_(t) || g(t))) && (s = t, d = s);
1354
1351
  }
1355
1352
  if (!o && (!$(s) || !_(c))) return e.unresolving ? -1 : n;
1356
- let f = !1, m = Q(s) ? s : hn(e, n, c, s, d, () => {
1353
+ let f = !1, m = Q(s) ? s : _n(e, n, c, s, d, () => {
1357
1354
  f = !0;
1358
1355
  });
1359
1356
  if (f) return s;
1360
- let h = m(un(vn(e, c, l, r))), y = e.postTranslation ? e.postTranslation(h, n) : h;
1361
- return a && _(y) && (y = fe(y)), y;
1357
+ let h = m(fn(bn(e, c, l, r))), y = e.postTranslation ? e.postTranslation(h, n) : h;
1358
+ return a && _(y) && (y = he(y)), y;
1362
1359
  }
1363
- function pn(e) {
1360
+ function hn(e) {
1364
1361
  if (h(e.list) && (e.list = e.list.map((e) => _(e) ? D(e) : e)), y(e.named)) {
1365
1362
  let t = e.named, n = u();
1366
1363
  for (let e of Object.keys(t)) {
@@ -1370,10 +1367,10 @@ function pn(e) {
1370
1367
  e.named = n;
1371
1368
  }
1372
1369
  }
1373
- function mn(e, t, n, r, i, a) {
1370
+ function gn(e, t, n, r, i, a) {
1374
1371
  let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, d = l(e, r, n), f = u(), m, h = null;
1375
- for (let n = 0; n < d.length && (m = d[n], f = p(o, m) || u(), (h = c(f, t)) === null && (h = p(f, t)), !$(h)); n++) if (!Rt(m, d)) {
1376
- let n = Pt(e, t, m, a, `translate`);
1372
+ for (let n = 0; n < d.length && (m = d[n], f = p(o, m) || u(), (h = c(f, t)) === null && (h = p(f, t)), !$(h)); n++) if (!Bt(m, d)) {
1373
+ let n = It(e, t, m, a, `translate`);
1377
1374
  n !== t && (h = n);
1378
1375
  }
1379
1376
  return [
@@ -1382,7 +1379,7 @@ function mn(e, t, n, r, i, a) {
1382
1379
  f
1383
1380
  ];
1384
1381
  }
1385
- function hn(e, t, n, r, i, a) {
1382
+ function _n(e, t, n, r, i, a) {
1386
1383
  if (Q(r)) {
1387
1384
  let e = r;
1388
1385
  return e.locale = e.locale || n, e.key = e.key || t, e;
@@ -1391,16 +1388,16 @@ function hn(e, t, n, r, i, a) {
1391
1388
  let e = (() => r);
1392
1389
  return e.locale = n, e.key = t, e;
1393
1390
  }
1394
- let o = e.messageCompiler(r, _n(e, n, i, r, e.warnHtmlMessage, a));
1391
+ let o = e.messageCompiler(r, yn(e, n, i, r, e.warnHtmlMessage, a));
1395
1392
  return o.locale = n, o.key = t, o.source = r, o;
1396
1393
  }
1397
- function gn(...e) {
1394
+ function vn(...e) {
1398
1395
  let [t, n, r] = e;
1399
- if (!_(t) && !i(t) && !Q(t) && !B(t)) throw Error(G.INVALID_ARGUMENT);
1396
+ if (!_(t) && !i(t) && !Q(t) && !L(t)) throw Error(H.INVALID_ARGUMENT);
1400
1397
  let a = i(t) ? String(t) : (Q(t), t), o = u();
1401
1398
  return i(n) ? o.plural = n : _(n) ? o.default = n : C(n) && !s(n) ? o.named = n : h(n) && (o.list = n), i(r) ? o.plural = r : _(r) ? o.default = r : C(r) && c(o, r), [a, o];
1402
1399
  }
1403
- function _n(e, t, r, i, a, o) {
1400
+ function yn(e, t, r, i, a, o) {
1404
1401
  return {
1405
1402
  locale: t,
1406
1403
  key: r,
@@ -1411,7 +1408,7 @@ function _n(e, t, r, i, a, o) {
1411
1408
  onCacheKey: (e) => n(t, r, e)
1412
1409
  };
1413
1410
  }
1414
- function vn(e, t, n, r) {
1411
+ function bn(e, t, n, r) {
1415
1412
  let { modifiers: a, pluralRules: o, messageResolver: s, fallbackLocale: c, fallbackWarn: l, missingWarn: u, fallbackContext: d } = e;
1416
1413
  return {
1417
1414
  locale: t,
@@ -1420,16 +1417,16 @@ function vn(e, t, n, r) {
1420
1417
  messages: (r, i) => {
1421
1418
  let a = s(n, r);
1422
1419
  if (a == null && (d || i)) {
1423
- let [n, , i] = mn(d || e, r, t, c, l, u);
1420
+ let [n, , i] = gn(d || e, r, t, c, l, u);
1424
1421
  a = n ?? s(i, r);
1425
1422
  }
1426
- if (_(a) || B(a)) {
1427
- let n = !1, i = hn(e, r, t, a, r, () => {
1423
+ if (_(a) || L(a)) {
1424
+ let n = !1, i = _n(e, r, t, a, r, () => {
1428
1425
  n = !0;
1429
1426
  });
1430
- return n ? dn : i;
1427
+ return n ? pn : i;
1431
1428
  }
1432
- return Q(a) ? a : dn;
1429
+ return Q(a) ? a : pn;
1433
1430
  },
1434
1431
  processor: e.processor ?? void 0,
1435
1432
  list: r.list ?? void 0,
@@ -1437,4 +1434,4 @@ function vn(e, t, n, r) {
1437
1434
  pluralIndex: i(r.plural) ? r.plural : void 0
1438
1435
  };
1439
1436
  }
1440
- export { Re as AST_NODE_PROPS_KEYS, qe as CORE_ERROR_CODES_EXTEND_POINT, dt as CORE_WARN_CODES_EXTEND_POINT, J as CoreWarnCodes, qt as DATETIME_FORMAT_OPTIONS_KEYS, Y as DEFAULT_LOCALE, nn as DEFAULT_MESSAGE_DATA_TYPE, gt as MISSING_RESOLVE_VALUE, ht as NOT_RESOLVED, Zt as NUMBER_FORMAT_OPTIONS_KEYS, mt as VERSION, We as clearCompileCache, Yt as clearDateTimeFormat, $t as clearNumberFormat, Ke as compile, P as createCompileError, Et as createCoreContext, Je as createCoreError, un as createMessageContext, Kt as datetime, Qe as fallbackWithLocaleChain, Ze as fallbackWithSimple, Ye as getLocale, Ot as getLocaleMessage, pt as getWarnMessage, Pt as handleMissing, Lt as isAlmostSameLocale, At as isFallbackLocale, Rt as isImplicitFallback, B as isMessageAST, $ as isMessageFormat, Q as isMessageFunction, Mt as isTranslateFallbackWarn, Nt as isTranslateMissingWarn, jt as isWarnOption, Xt as number, st as parse, Jt as parseDateTimeArgs, Qt as parseNumberArgs, gn as parseTranslateArgs, wt as registerLocaleFallbacker, bt as registerMessageCompiler, St as registerMessageResolver, Xe as resolveLocale, ut as resolveValue, lt as resolveWithKeyValue, kt as setLocaleMessage, fn as translate, It as updateFallbackLocale };
1437
+ export { Ue as AST_NODE_PROPS_KEYS, Qe as CORE_ERROR_CODES_EXTEND_POINT, mt as CORE_WARN_CODES_EXTEND_POINT, q as CoreWarnCodes, Yt as DATETIME_FORMAT_OPTIONS_KEYS, J as DEFAULT_LOCALE, an as DEFAULT_MESSAGE_DATA_TYPE, yt as MISSING_RESOLVE_VALUE, vt as NOT_RESOLVED, $t as NUMBER_FORMAT_OPTIONS_KEYS, _t as VERSION, Ye as clearCompileCache, Zt as clearDateTimeFormat, tn as clearNumberFormat, Ze as compile, N as createCompileError, kt as createCoreContext, $e as createCoreError, fn as createMessageContext, Jt as datetime, tt as fallbackWithLocaleChain, et as fallbackWithSimple, U as getLocale, jt as getLocaleMessage, gt as getWarnMessage, It as handleMissing, zt as isAlmostSameLocale, Nt as isFallbackLocale, Bt as isImplicitFallback, L as isMessageAST, $ as isMessageFormat, Q as isMessageFunction, Pt as isTranslateFallbackWarn, Ft as isTranslateMissingWarn, Y as isWarnOption, Qt as number, ut as parse, Xt as parseDateTimeArgs, en as parseNumberArgs, vn as parseTranslateArgs, Dt as registerLocaleFallbacker, Ct as registerMessageCompiler, Tt as registerMessageResolver, G as resolveLocale, pt as resolveValue, ft as resolveWithKeyValue, Mt as setLocaleMessage, mn as translate, Rt as updateFallbackLocale };