@intlify/core 12.0.0-alpha.11 → 12.0.0-alpha.12

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,5 +1,5 @@
1
1
  /**
2
- * @intlify/core v12.0.0-alpha.11
2
+ * @intlify/core v12.0.0-alpha.12
3
3
  * (c) 2016-present kazuya kawaguchi and contributors
4
4
  * @license MIT
5
5
  **/ var IntlifyCore = (function(e) {
@@ -23,31 +23,31 @@
23
23
  function h(e) {
24
24
  return p(Object.prototype, e);
25
25
  }
26
- let g = Array.isArray, _ = (e) => typeof e == `function`, v = (e) => typeof e == `string`, y = (e) => typeof e == `boolean`, b = (e) => typeof e == `object` && !!e, x = (e) => b(e) && _(e.then) && _(e.catch), S = Object.prototype.toString, C = (e) => S.call(e), w = (e) => C(e) === `[object Object]`, ee = (e) => e == null ? `` : g(e) || w(e) && e.toString === S ? JSON.stringify(e, null, 2) : String(e);
27
- function T(e, t = ``) {
26
+ let g = Array.isArray, _ = (e) => typeof e == `function`, v = (e) => typeof e == `string`, y = (e) => typeof e == `boolean`, b = (e) => typeof e == `object` && !!e, x = (e) => b(e) && _(e.then) && _(e.catch), S = Object.prototype.toString, C = (e) => S.call(e), w = (e) => C(e) === `[object Object]`, T = (e) => e == null ? `` : g(e) || w(e) && e.toString === S ? JSON.stringify(e, null, 2) : String(e);
27
+ function E(e, t = ``) {
28
28
  return e.reduce((e, n, r) => r === 0 ? e + n : e + t + n, ``);
29
29
  }
30
- function E(e, t) {
30
+ function D(e, t) {
31
31
  typeof console < `u` && (console.warn(`[intlify] ` + e), t && console.warn(t.stack));
32
32
  }
33
- function D(e) {
33
+ function O(e) {
34
34
  return e.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&apos;`).replace(/\//g, `&#x2F;`).replace(/=/g, `&#x3D;`);
35
35
  }
36
- function te(e) {
36
+ function ee(e) {
37
37
  return e.replace(/&(?![a-z0-9#]{2,6};)/gi, `&amp;`).replace(/"/g, `&quot;`).replace(/'/g, `&apos;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`);
38
38
  }
39
- let ne = /^javascript:/i, re = /^(?:href|xlink:href|src|action|formaction)$/i, O = /&#(?:x([0-9a-f]+)|(\d+));?/gi, ie = /&(?:Tab|NewLine);/g, ae = /&colon;?/gi, oe = /[\u0000-\u0020\u007f-\u009f]/g, se = /^on\w/i, ce = /^srcdoc$/i, le = /^(?:base|animate|set|script|plaintext)$/i, ue = /^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i, k = /<(\/?)([a-z][^\t\n\f\r />]*)/iy, A = /([\t\n\f\r /]*)(?:(>)|([^\t\n\f\r />][^\t\n\f\r />=]*)(?:[\t\n\f\r ]*=[\t\n\f\r ]*(?:(["'])([\s\S]*?)(\4|$)|([^\t\n\f\r >]*)))?)/y, j = /<!--(?:>|->|[\s\S]*?--!?>)/y;
40
- function de(e, t, n) {
39
+ let te = /^javascript:/i, ne = /^(?:href|xlink:href|src|action|formaction)$/i, k = /&#(?:x([0-9a-f]+)|(\d+));?/gi, re = /&(?:Tab|NewLine);/g, ie = /&colon;?/gi, ae = /[\u0000-\u0020\u007f-\u009f]/g, oe = /^on\w/i, se = /^srcdoc$/i, ce = /^(?:base|animate|set|script|plaintext)$/i, le = /^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i, A = /<(\/?)([a-z][^\t\n\f\r />]*)/iy, j = /([\t\n\f\r /]*)(?:(>)|([^\t\n\f\r />][^\t\n\f\r />=]*)(?:[\t\n\f\r ]*=[\t\n\f\r ]*(?:(["'])([\s\S]*?)(\4|$)|([^\t\n\f\r >]*)))?)/y, M = /<!--(?:>|->|[\s\S]*?--!?>)/y;
40
+ function ue(e, t, n) {
41
41
  let r = t || n;
42
42
  if (!r) return e;
43
43
  let i = Number.parseInt(r, t ? 16 : 10);
44
44
  return i <= 127 ? String.fromCharCode(i) : e;
45
45
  }
46
- function M(e) {
47
- let t = e.replace(O, de).replace(ie, ``).replace(ae, `:`).replace(oe, ``);
48
- return ne.test(t);
46
+ function N(e) {
47
+ let t = e.replace(k, ue).replace(re, ``).replace(ie, `:`).replace(ae, ``);
48
+ return te.test(t);
49
49
  }
50
- function fe(e) {
50
+ function de(e) {
51
51
  let t = /url\s*\(/gi, n = ``, r = 0, i;
52
52
  for (; (i = t.exec(e)) !== null;) {
53
53
  let a = i.index, o = t.lastIndex - 1, s = o + 1, c = 1, l = null;
@@ -60,31 +60,31 @@
60
60
  }
61
61
  if (c !== 0) break;
62
62
  let u = e.slice(o + 1, s).trim(), d = u.startsWith(`"`) && u.endsWith(`"`) || u.startsWith(`'`) && u.endsWith(`'`) ? u.slice(1, -1).trim() : u;
63
- n += e.slice(r, a), n += M(d) ? `url(about:blank)` : e.slice(a, s + 1), r = s + 1;
63
+ n += e.slice(r, a), n += N(d) ? `url(about:blank)` : e.slice(a, s + 1), r = s + 1;
64
64
  }
65
65
  return n + e.slice(r);
66
66
  }
67
- function pe(e, t) {
68
- return re.test(e) && M(t) ? `about:blank` : te(e.toLowerCase() === `style` ? fe(t) : t);
67
+ function fe(e, t) {
68
+ return ne.test(e) && N(t) ? `about:blank` : ee(e.toLowerCase() === `style` ? de(t) : t);
69
69
  }
70
- function N(e) {
70
+ function P(e) {
71
71
  return e.replace(/</g, `&lt;`);
72
72
  }
73
- function me(e, t, n, r) {
73
+ function pe(e, t, n, r) {
74
74
  let i = e;
75
- if (se.test(e) ? (r.eventHandler = !0, i = `&#111;n${e.slice(2)}`) : ce.test(e) && (r.srcdoc = !0, i = `&#115;${e.slice(1)}`), t === void 0) return i;
75
+ if (oe.test(e) ? (r.eventHandler = !0, i = `&#111;n${e.slice(2)}`) : se.test(e) && (r.srcdoc = !0, i = `&#115;${e.slice(1)}`), t === void 0) return i;
76
76
  let a = n || ``;
77
- return `${i}=${a}${pe(e, t)}${a}`;
77
+ return `${i}=${a}${fe(e, t)}${a}`;
78
78
  }
79
- function he(e, t, n) {
80
- k.lastIndex = t;
81
- let r = k.exec(e);
79
+ function me(e, t, n) {
80
+ A.lastIndex = t;
81
+ let r = A.exec(e);
82
82
  if (!r) return;
83
83
  let [, i, a] = r, o = r[0], s;
84
- for (A.lastIndex = k.lastIndex; s = A.exec(e);) {
84
+ for (j.lastIndex = A.lastIndex; s = j.exec(e);) {
85
85
  let [r, c, l, u, d, f, p, m] = s;
86
86
  if (l) {
87
- let n = A.lastIndex;
87
+ let n = j.lastIndex;
88
88
  return [
89
89
  i ? e.slice(t, n) : o + r,
90
90
  a,
@@ -92,7 +92,7 @@
92
92
  ];
93
93
  }
94
94
  if (d && !p) break;
95
- i || (o += c + me(u, d ? f : m, d, n));
95
+ i || (o += c + pe(u, d ? f : m, d, n));
96
96
  }
97
97
  return [
98
98
  o,
@@ -100,37 +100,37 @@
100
100
  -1
101
101
  ];
102
102
  }
103
- function P(e, t, n) {
103
+ function F(e, t, n) {
104
104
  for (let r = e.indexOf(`</`, t); r !== -1; r = e.indexOf(`</`, r + 2)) {
105
- let t = he(e, r, {});
105
+ let t = me(e, r, {});
106
106
  if (t && t[1].toLowerCase() === n.toLowerCase()) return t[2] === -1 ? -1 : r;
107
107
  }
108
108
  return -1;
109
109
  }
110
- function F(e) {
110
+ function I(e) {
111
111
  let t = {}, n = ``, r = 0, i;
112
112
  for (; (i = e.indexOf(`<`, r)) !== -1;) {
113
113
  n += e.slice(r, i), r = i + 1;
114
- let a = he(e, i, t);
114
+ let a = me(e, i, t);
115
115
  if (a) {
116
116
  let [o, s, c] = a;
117
117
  if (c === -1) {
118
- t.unclosed = !0, n += N(e.slice(i)), r = e.length;
118
+ t.unclosed = !0, n += P(e.slice(i)), r = e.length;
119
119
  break;
120
120
  }
121
121
  if (r = c, o[1] === `/`) n += o;
122
- else if (le.test(s)) t.element = !0, n += N(o);
123
- else if (ue.test(s)) {
124
- let i = P(e, c, s);
125
- i === -1 ? (t.unclosed = !0, n += N(o)) : (n += o + N(e.slice(c, i)), r = i);
122
+ else if (ce.test(s)) t.element = !0, n += P(o);
123
+ else if (le.test(s)) {
124
+ let i = F(e, c, s);
125
+ i === -1 ? (t.unclosed = !0, n += P(o)) : (n += o + P(e.slice(c, i)), r = i);
126
126
  } else n += o;
127
- } else j.lastIndex = i, j.test(e) ? (n += e.slice(i, j.lastIndex), r = j.lastIndex) : (e.startsWith(`<!--`, i) && (t.unclosed = !0), n += `&lt;`);
127
+ } else M.lastIndex = i, M.test(e) ? (n += e.slice(i, M.lastIndex), r = M.lastIndex) : (e.startsWith(`<!--`, i) && (t.unclosed = !0), n += `&lt;`);
128
128
  }
129
129
  return n += e.slice(r), n;
130
130
  }
131
- let I = (e) => !b(e) || g(e);
132
- function L(e, t) {
133
- if (I(e) || I(t) || t === Object.prototype) throw Error(`Invalid value`);
131
+ let L = (e) => !b(e) || g(e);
132
+ function R(e, t) {
133
+ if (L(e) || L(t) || t === Object.prototype) throw Error(`Invalid value`);
134
134
  let n = [e, t];
135
135
  for (; n.length;) {
136
136
  let e = n.pop(), t = n.pop(), r = Object.keys(t);
@@ -152,21 +152,21 @@
152
152
  }
153
153
  }
154
154
  }
155
- function ge(e, t, n) {
155
+ function he(e, t, n) {
156
156
  return {
157
157
  line: e,
158
158
  column: t,
159
159
  offset: n
160
160
  };
161
161
  }
162
- function _e(e, t, n) {
162
+ function ge(e, t, n) {
163
163
  let r = {
164
164
  start: e,
165
165
  end: t
166
166
  };
167
167
  return n != null && (r.source = n), r;
168
168
  }
169
- let R = {
169
+ let z = {
170
170
  EXPECTED_TOKEN: 1,
171
171
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
172
172
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
@@ -184,30 +184,30 @@
184
184
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
185
185
  UNHANDLED_MINIFIER_NODE_TYPE: 16
186
186
  };
187
- R.EXPECTED_TOKEN, R.INVALID_TOKEN_IN_PLACEHOLDER, R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, R.UNKNOWN_ESCAPE_SEQUENCE, R.INVALID_UNICODE_ESCAPE_SEQUENCE, R.UNBALANCED_CLOSING_BRACE, R.UNTERMINATED_CLOSING_BRACE, R.EMPTY_PLACEHOLDER, R.NOT_ALLOW_NEST_PLACEHOLDER, R.INVALID_LINKED_FORMAT, R.MUST_HAVE_MESSAGES_IN_PLURAL, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, R.UNEXPECTED_EMPTY_LINKED_KEY, R.UNEXPECTED_LEXICAL_ANALYSIS, R.UNHANDLED_CODEGEN_NODE_TYPE, R.UNHANDLED_MINIFIER_NODE_TYPE;
188
- function z(e, t, n = {}) {
187
+ z.EXPECTED_TOKEN, z.INVALID_TOKEN_IN_PLACEHOLDER, z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, z.UNKNOWN_ESCAPE_SEQUENCE, z.INVALID_UNICODE_ESCAPE_SEQUENCE, z.UNBALANCED_CLOSING_BRACE, z.UNTERMINATED_CLOSING_BRACE, z.EMPTY_PLACEHOLDER, z.NOT_ALLOW_NEST_PLACEHOLDER, z.INVALID_LINKED_FORMAT, z.MUST_HAVE_MESSAGES_IN_PLURAL, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, z.UNEXPECTED_EMPTY_LINKED_KEY, z.UNEXPECTED_LEXICAL_ANALYSIS, z.UNHANDLED_CODEGEN_NODE_TYPE, z.UNHANDLED_MINIFIER_NODE_TYPE;
188
+ function B(e, t, n = {}) {
189
189
  let { domain: r, messages: i, args: a } = n, o = SyntaxError(String(e));
190
190
  return o.code = e, t && (o.location = t), o.domain = r, o;
191
191
  }
192
- function ve(e) {
192
+ function _e(e) {
193
193
  throw e;
194
194
  }
195
- function B(e) {
195
+ function V(e) {
196
196
  switch (e.t = e.type, e.type) {
197
197
  case 0: {
198
198
  let t = e;
199
- B(t.body), t.b = t.body, delete t.body;
199
+ V(t.body), t.b = t.body, delete t.body;
200
200
  break;
201
201
  }
202
202
  case 1: {
203
203
  let t = e, n = t.cases;
204
- for (let e = 0; e < n.length; e++) B(n[e]);
204
+ for (let e = 0; e < n.length; e++) V(n[e]);
205
205
  t.c = n, delete t.cases;
206
206
  break;
207
207
  }
208
208
  case 2: {
209
209
  let t = e, n = t.items;
210
- for (let e = 0; e < n.length; e++) B(n[e]);
210
+ for (let e = 0; e < n.length; e++) V(n[e]);
211
211
  t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
212
212
  break;
213
213
  }
@@ -221,7 +221,7 @@
221
221
  }
222
222
  case 6: {
223
223
  let t = e;
224
- B(t.key), t.k = t.key, delete t.key, t.modifier && (B(t.modifier), t.m = t.modifier, delete t.modifier);
224
+ V(t.key), t.k = t.key, delete t.key, t.modifier && (V(t.modifier), t.m = t.modifier, delete t.modifier);
225
225
  break;
226
226
  }
227
227
  case 5: {
@@ -237,11 +237,11 @@
237
237
  }
238
238
  delete e.type;
239
239
  }
240
- function ye(e) {
240
+ function ve(e) {
241
241
  let t = e.body;
242
- return t.type === 2 ? be(t) : t.cases.forEach((e) => be(e)), e;
242
+ return t.type === 2 ? ye(t) : t.cases.forEach((e) => ye(e)), e;
243
243
  }
244
- function be(e) {
244
+ function ye(e) {
245
245
  if (e.items.length === 1) {
246
246
  let t = e.items[0];
247
247
  (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
@@ -253,7 +253,7 @@
253
253
  t.push(r.value);
254
254
  }
255
255
  if (t.length === e.items.length) {
256
- e.static = T(t);
256
+ e.static = E(t);
257
257
  for (let t = 0; t < e.items.length; t++) {
258
258
  let n = e.items[t];
259
259
  (n.type === 3 || n.type === 9) && delete n.value;
@@ -261,7 +261,7 @@
261
261
  }
262
262
  }
263
263
  }
264
- function xe(e) {
264
+ function be(e) {
265
265
  let t = e, n = 0, r = 1, i = 1, a = 0, o = (e) => t[e] === `\r` && t[e + 1] === `
266
266
  `, s = (e) => t[e] === `
267
267
  `, 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) ? `
@@ -298,8 +298,8 @@
298
298
  skipToPeek: S
299
299
  };
300
300
  }
301
- function Se(e, t = {}) {
302
- let n = t.location !== !1, r = xe(e), i = () => r.index(), a = () => ge(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
301
+ function xe(e, t = {}) {
302
+ let n = t.location !== !1, r = be(e), i = () => r.index(), a = () => he(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
303
303
  currentType: 13,
304
304
  offset: s,
305
305
  startLoc: o,
@@ -315,7 +315,7 @@
315
315
  function d(e, t, r, ...i) {
316
316
  let a = l();
317
317
  if (t.column += r, t.offset += r, u) {
318
- let r = z(e, n ? _e(a.startLoc, t) : null, {
318
+ let r = B(e, n ? ge(a.startLoc, t) : null, {
319
319
  domain: `tokenizer`,
320
320
  args: i
321
321
  });
@@ -325,11 +325,11 @@
325
325
  function f(e, t, r) {
326
326
  e.endLoc = a(), e.currentType = t;
327
327
  let i = { type: t };
328
- return n && (i.loc = _e(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
328
+ return n && (i.loc = ge(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
329
329
  }
330
330
  let p = (e) => f(e, 13);
331
331
  function m(e, t) {
332
- return e.currentChar() === t ? (e.next(), t) : (d(R.EXPECTED_TOKEN, a(), 0, t), ``);
332
+ return e.currentChar() === t ? (e.next(), t) : (d(z.EXPECTED_TOKEN, a(), 0, t), ``);
333
333
  }
334
334
  function h(e) {
335
335
  let t = ``;
@@ -393,22 +393,22 @@
393
393
  let r = e.currentPeek() === `:`;
394
394
  return e.resetPeek(), r;
395
395
  }
396
- function ee(e, t) {
396
+ function T(e, t) {
397
397
  let { currentType: n } = t;
398
398
  if (n !== 9) return !1;
399
399
  let r = () => {
400
400
  let t = e.currentPeek();
401
401
  return t === `{` ? _(e.peek()) : t === `@` || t === `|` || t === `:` || t === `.` || t === ` ` || !t ? !1 : t === `
402
- ` ? (e.peek(), r()) : E(e, !1);
402
+ ` ? (e.peek(), r()) : D(e, !1);
403
403
  }, i = r();
404
404
  return e.resetPeek(), i;
405
405
  }
406
- function T(e) {
406
+ function E(e) {
407
407
  h(e);
408
408
  let t = e.currentPeek() === `|`;
409
409
  return e.resetPeek(), t;
410
410
  }
411
- function E(e, t = !0) {
411
+ function D(e, t = !0) {
412
412
  let n = (t = !1, r = ``) => {
413
413
  let i = e.currentPeek();
414
414
  return i === `{` || i === `@` || !i ? t : i === `|` ? r !== ` ` && r !== `
@@ -418,44 +418,44 @@
418
418
  }, r = n();
419
419
  return t && e.resetPeek(), r;
420
420
  }
421
- function D(e, t) {
421
+ function O(e, t) {
422
422
  let n = e.currentChar();
423
423
  if (n !== void 0) return t(n) ? (e.next(), n) : null;
424
424
  }
425
- function te(e) {
425
+ function ee(e) {
426
426
  let t = e.charCodeAt(0);
427
427
  return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57 || t === 95 || t === 36;
428
428
  }
429
- function ne(e) {
430
- return D(e, te);
429
+ function te(e) {
430
+ return O(e, ee);
431
431
  }
432
- function re(e) {
432
+ function ne(e) {
433
433
  let t = e.charCodeAt(0);
434
434
  return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57 || t === 95 || t === 36 || t === 45;
435
435
  }
436
- function O(e) {
437
- return D(e, re);
436
+ function k(e) {
437
+ return O(e, ne);
438
438
  }
439
- function ie(e) {
439
+ function re(e) {
440
440
  let t = e.charCodeAt(0);
441
441
  return t >= 48 && t <= 57;
442
442
  }
443
- function ae(e) {
444
- return D(e, ie);
443
+ function ie(e) {
444
+ return O(e, re);
445
445
  }
446
- function oe(e) {
446
+ function ae(e) {
447
447
  let t = e.charCodeAt(0);
448
448
  return t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102;
449
449
  }
450
- function se(e) {
451
- return D(e, oe);
450
+ function oe(e) {
451
+ return O(e, ae);
452
452
  }
453
- function ce(e) {
453
+ function se(e) {
454
454
  let t = ``, n = ``;
455
- for (; t = ae(e);) n += t;
455
+ for (; t = ie(e);) n += t;
456
456
  return n;
457
457
  }
458
- function le(e) {
458
+ function ce(e) {
459
459
  let t = ``;
460
460
  for (;;) {
461
461
  let n = e.currentChar();
@@ -465,155 +465,155 @@
465
465
  } else if (n === `{` || n === `}` || n === `@` || n === `|` || !n) break;
466
466
  else if (n === ` ` || n === `
467
467
  `) {
468
- if (E(e)) t += n, e.next();
469
- else if (T(e)) break;
468
+ if (D(e)) t += n, e.next();
469
+ else if (E(e)) break;
470
470
  else t += n, e.next();
471
471
  } else t += n, e.next();
472
472
  }
473
473
  return t;
474
474
  }
475
- function ue(e) {
475
+ function le(e) {
476
476
  g(e);
477
477
  let t = ``, n = ``;
478
- for (; t = O(e);) n += t;
478
+ for (; t = k(e);) n += t;
479
479
  let r = e.currentChar();
480
480
  if (r && r !== `}` && r !== void 0 && r !== ` ` && r !== `
481
481
  ` && r !== ` `) {
482
- let t = pe(e);
483
- return d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
482
+ let t = fe(e);
483
+ return d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
484
484
  }
485
- return e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
485
+ return e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
486
486
  }
487
- function k(e) {
487
+ function A(e) {
488
488
  g(e);
489
489
  let t = ``;
490
- return e.currentChar() === `-` ? (e.next(), t += `-${ce(e)}`) : t += ce(e), e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
490
+ return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
491
491
  }
492
- function A(e) {
492
+ function j(e) {
493
493
  return e !== `'` && e !== `
494
494
  `;
495
495
  }
496
- function j(e) {
496
+ function M(e) {
497
497
  g(e), m(e, `'`);
498
498
  let t = ``, n = ``;
499
- for (; t = D(e, A);) n += t === `\\` ? de(e) : t;
499
+ for (; t = O(e, j);) n += t === `\\` ? ue(e) : t;
500
500
  let r = e.currentChar();
501
501
  return r === `
502
- ` || r === void 0 ? (d(R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
502
+ ` || r === void 0 ? (d(z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
503
503
  ` && (e.next(), m(e, `'`)), n) : (m(e, `'`), n);
504
504
  }
505
- function de(e) {
505
+ function ue(e) {
506
506
  let t = e.currentChar();
507
507
  switch (t) {
508
508
  case `\\`:
509
509
  case `'`: return e.next(), `\\${t}`;
510
- case `u`: return M(e, t, 4);
511
- case `U`: return M(e, t, 6);
512
- default: return d(R.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
510
+ case `u`: return N(e, t, 4);
511
+ case `U`: return N(e, t, 6);
512
+ default: return d(z.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
513
513
  }
514
514
  }
515
- function M(e, t, n) {
515
+ function N(e, t, n) {
516
516
  m(e, t);
517
517
  let r = ``;
518
518
  for (let i = 0; i < n; i++) {
519
- let n = se(e);
519
+ let n = oe(e);
520
520
  if (!n) {
521
- d(R.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
521
+ d(z.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
522
522
  break;
523
523
  }
524
524
  r += n;
525
525
  }
526
526
  return `\\${t}${r}`;
527
527
  }
528
- function fe(e) {
528
+ function de(e) {
529
529
  return e !== `{` && e !== `}` && e !== ` ` && e !== `
530
530
  `;
531
531
  }
532
- function pe(e) {
532
+ function fe(e) {
533
533
  g(e);
534
534
  let t = ``, n = ``;
535
- for (; t = D(e, fe);) n += t;
535
+ for (; t = O(e, de);) n += t;
536
536
  return n;
537
537
  }
538
- function N(e) {
538
+ function P(e) {
539
539
  let t = ``, n = ``;
540
- for (; t = ne(e);) n += t;
540
+ for (; t = te(e);) n += t;
541
541
  return n;
542
542
  }
543
- function me(e) {
543
+ function pe(e) {
544
544
  return e !== `{` && e !== `@` && e !== `|` && e !== `(` && e !== `)` && e !== ` ` && e !== ` ` && e !== `
545
545
  `;
546
546
  }
547
- function he(e) {
547
+ function me(e) {
548
548
  for (; e.currentChar() === ` `;) e.next();
549
549
  let t = ``, n;
550
- for (; (n = e.currentChar()) && me(n);) t += n, e.next();
550
+ for (; (n = e.currentChar()) && pe(n);) t += n, e.next();
551
551
  return t;
552
552
  }
553
- function P(e) {
553
+ function F(e) {
554
554
  g(e);
555
555
  let t = m(e, `|`);
556
556
  return g(e), t;
557
557
  }
558
- function F(e, t) {
558
+ function I(e, t) {
559
559
  let n = null;
560
560
  switch (e.currentChar()) {
561
- case `{`: return t.braceNest >= 1 && d(R.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
562
- case `}`: return t.braceNest > 0 && t.currentType === 2 && d(R.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
563
- case `@`: return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = I(e, t) || p(t), t.braceNest = 0, n;
561
+ case `{`: return t.braceNest >= 1 && d(z.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
562
+ case `}`: return t.braceNest > 0 && t.currentType === 2 && d(z.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
563
+ case `@`: return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = L(e, t) || p(t), t.braceNest = 0, n;
564
564
  default: {
565
565
  let r = !0, i = !0, o = !0;
566
- if (T(e)) return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, P(e)), t.braceNest = 0, t.inLinked = !1, n;
567
- if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, L(e, t);
568
- if (r = y(e, t)) return n = f(t, 4, ue(e)), g(e), n;
569
- if (i = b(e, t)) return n = f(t, 5, k(e)), g(e), n;
570
- if (o = x(e, t)) return n = f(t, 6, j(e)), g(e), n;
571
- if (!r && !i && !o) return n = f(t, 12, pe(e)), d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
566
+ if (E(e)) return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
567
+ if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, R(e, t);
568
+ if (r = y(e, t)) return n = f(t, 4, le(e)), g(e), n;
569
+ if (i = b(e, t)) return n = f(t, 5, A(e)), g(e), n;
570
+ if (o = x(e, t)) return n = f(t, 6, M(e)), g(e), n;
571
+ if (!r && !i && !o) return n = f(t, 12, fe(e)), d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
572
572
  break;
573
573
  }
574
574
  }
575
575
  return n;
576
576
  }
577
- function I(e, t) {
577
+ function L(e, t) {
578
578
  let { currentType: n } = t, r = null, i = e.currentChar();
579
579
  switch (n !== 7 && n !== 8 && n !== 11 && n !== 9 || i !== `
580
- ` && i !== ` ` || d(R.INVALID_LINKED_FORMAT, a(), 0), i) {
580
+ ` && i !== ` ` || d(z.INVALID_LINKED_FORMAT, a(), 0), i) {
581
581
  case `@`: return e.next(), r = f(t, 7, `@`), t.inLinked = !0, r;
582
582
  case `.`: return g(e), e.next(), f(t, 8, `.`);
583
583
  case `:`: return g(e), e.next(), f(t, 9, `:`);
584
- default: return T(e) ? (r = f(t, 1, P(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), I(e, t)) : C(e, t) ? (g(e), f(t, 11, N(e))) : ee(e, t) ? (g(e), i === `{` ? F(e, t) || r : f(t, 10, he(e))) : (n === 7 && d(R.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, L(e, t));
584
+ default: return E(e) ? (r = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), L(e, t)) : C(e, t) ? (g(e), f(t, 11, P(e))) : T(e, t) ? (g(e), i === `{` ? I(e, t) || r : f(t, 10, me(e))) : (n === 7 && d(z.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, R(e, t));
585
585
  }
586
586
  }
587
- function L(e, t) {
587
+ function R(e, t) {
588
588
  let n = { type: 13 };
589
- if (t.braceNest > 0) return F(e, t) || p(t);
590
- if (t.inLinked) return I(e, t) || p(t);
589
+ if (t.braceNest > 0) return I(e, t) || p(t);
590
+ if (t.inLinked) return L(e, t) || p(t);
591
591
  switch (e.currentChar()) {
592
- case `{`: return F(e, t) || p(t);
593
- case `}`: return d(R.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
594
- case `@`: return I(e, t) || p(t);
592
+ case `{`: return I(e, t) || p(t);
593
+ case `}`: return d(z.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
594
+ case `@`: return L(e, t) || p(t);
595
595
  default:
596
- if (T(e)) return n = f(t, 1, P(e)), t.braceNest = 0, t.inLinked = !1, n;
597
- if (E(e)) return f(t, 0, le(e));
596
+ if (E(e)) return n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
597
+ if (D(e)) return f(t, 0, ce(e));
598
598
  }
599
599
  return n;
600
600
  }
601
- function ve() {
601
+ function _e() {
602
602
  let { currentType: e, offset: t, startLoc: n, endLoc: o } = c;
603
- return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : L(r, c);
603
+ return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : R(r, c);
604
604
  }
605
605
  return {
606
- nextToken: ve,
606
+ nextToken: _e,
607
607
  currentOffset: i,
608
608
  currentPosition: a,
609
609
  context: l
610
610
  };
611
611
  }
612
- let Ce = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, we = /\\([\\@{}|])/g;
613
- function Te(e, t) {
612
+ let Se = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, Ce = /\\([\\@{}|])/g;
613
+ function we(e, t) {
614
614
  return t;
615
615
  }
616
- function Ee(e, t, n) {
616
+ function Te(e, t, n) {
617
617
  switch (e) {
618
618
  case `\\\\`: return `\\`;
619
619
  case `\\'`: return `'`;
@@ -623,12 +623,12 @@
623
623
  }
624
624
  }
625
625
  }
626
- function De(e = {}) {
626
+ function Ee(e = {}) {
627
627
  let t = e.location !== !1, { onError: n } = e;
628
628
  function r(e, r, i, a, ...o) {
629
629
  let s = e.currentPosition();
630
630
  if (s.offset += a, s.column += a, n) {
631
- let e = z(r, t ? _e(i, s) : null, {
631
+ let e = B(r, t ? ge(i, s) : null, {
632
632
  domain: `parser`,
633
633
  args: o
634
634
  });
@@ -647,7 +647,7 @@
647
647
  }
648
648
  function o(e, t) {
649
649
  let n = e.context(), r = i(3, n.offset, n.startLoc);
650
- return r.value = t.replace(we, Te), a(r, e.currentOffset(), e.currentPosition()), r;
650
+ return r.value = t.replace(Ce, we), a(r, e.currentOffset(), e.currentPosition()), r;
651
651
  }
652
652
  function s(e, t) {
653
653
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(5, n, r);
@@ -659,11 +659,11 @@
659
659
  }
660
660
  function u(e, t) {
661
661
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(9, n, r);
662
- return o.value = t.replace(Ce, Ee), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
662
+ return o.value = t.replace(Se, Te), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
663
663
  }
664
664
  function d(e) {
665
665
  let t = e.nextToken(), n = e.context(), { lastOffset: o, lastStartLoc: s } = n, c = i(8, o, s);
666
- return t.type === 11 ? (t.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, V(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
666
+ return t.type === 11 ? (t.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, H(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
667
667
  nextConsumeToken: t,
668
668
  node: c
669
669
  });
@@ -678,21 +678,21 @@
678
678
  let t = d(e);
679
679
  n.modifier = t.node, o = t.nextConsumeToken || e.nextToken();
680
680
  }
681
- switch (o.type !== 9 && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
681
+ switch (o.type !== 9 && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
682
682
  case 10:
683
- o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = f(e, o.value || ``);
683
+ o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = f(e, o.value || ``);
684
684
  break;
685
685
  case 4:
686
- o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = c(e, o.value || ``);
686
+ o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = c(e, o.value || ``);
687
687
  break;
688
688
  case 5:
689
- o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = s(e, o.value || ``);
689
+ o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = s(e, o.value || ``);
690
690
  break;
691
691
  case 6:
692
- o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = u(e, o.value || ``);
692
+ o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = u(e, o.value || ``);
693
693
  break;
694
694
  default: {
695
- r(e, R.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
695
+ r(e, z.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
696
696
  let s = e.context(), c = i(7, s.offset, s.startLoc);
697
697
  return c.value = ``, a(c, s.offset, s.startLoc), n.key = c, a(n, s.offset, s.startLoc), {
698
698
  nextConsumeToken: o,
@@ -710,16 +710,16 @@
710
710
  let i = l || e.nextToken();
711
711
  switch (l = null, i.type) {
712
712
  case 0:
713
- i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(o(e, i.value || ``));
713
+ i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(o(e, i.value || ``));
714
714
  break;
715
715
  case 5:
716
- i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(s(e, i.value || ``));
716
+ i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(s(e, i.value || ``));
717
717
  break;
718
718
  case 4:
719
- i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(c(e, i.value || ``));
719
+ i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(c(e, i.value || ``));
720
720
  break;
721
721
  case 6:
722
- i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(u(e, i.value || ``));
722
+ i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(u(e, i.value || ``));
723
723
  break;
724
724
  case 7: {
725
725
  let t = p(e);
@@ -737,164 +737,164 @@
737
737
  let t = m(e);
738
738
  c || (c = t.items.length === 0), l.cases.push(t);
739
739
  } while (s.currentType !== 13);
740
- return c && r(e, R.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
740
+ return c && r(e, z.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
741
741
  }
742
742
  function g(e) {
743
743
  let t = e.context(), { offset: n, startLoc: r } = t, i = m(e);
744
744
  return t.currentType === 13 ? i : h(e, n, r, i);
745
745
  }
746
746
  function _(n) {
747
- let o = Se(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
748
- return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, R.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
747
+ let o = xe(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
748
+ return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, z.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
749
749
  }
750
750
  return { parse: _ };
751
751
  }
752
- function V(e) {
752
+ function H(e) {
753
753
  if (e.type === 13) return `EOF`;
754
754
  let t = (e.value || ``).replace(/\r?\n/gu, `\\n`);
755
755
  return t.length > 10 ? t.slice(0, 9) + `…` : t;
756
756
  }
757
- function H(e) {
758
- return b(e) && Le(e) === 0 && (p(e, `b`) || p(e, `body`));
757
+ function U(e) {
758
+ return b(e) && Ie(e) === 0 && (p(e, `b`) || p(e, `body`));
759
759
  }
760
- let Oe = [`b`, `body`];
761
- function ke(e) {
762
- return W(e, Oe);
760
+ let De = [`b`, `body`];
761
+ function Oe(e) {
762
+ return G(e, De);
763
763
  }
764
- let Ae = [`c`, `cases`];
765
- function je(e) {
766
- return W(e, Ae, []);
764
+ let ke = [`c`, `cases`];
765
+ function Ae(e) {
766
+ return G(e, ke, []);
767
767
  }
768
- let Me = [`s`, `static`];
769
- function Ne(e) {
770
- return W(e, Me);
768
+ let je = [`s`, `static`];
769
+ function Me(e) {
770
+ return G(e, je);
771
771
  }
772
- let Pe = [`i`, `items`];
773
- function Fe(e) {
774
- return W(e, Pe, []);
772
+ let Ne = [`i`, `items`];
773
+ function Pe(e) {
774
+ return G(e, Ne, []);
775
775
  }
776
- let Ie = [`t`, `type`];
777
- function Le(e) {
778
- return W(e, Ie);
776
+ let Fe = [`t`, `type`];
777
+ function Ie(e) {
778
+ return G(e, Fe);
779
779
  }
780
- let Re = [`v`, `value`];
781
- function U(e, t) {
782
- let n = W(e, Re);
780
+ let Le = [`v`, `value`];
781
+ function W(e, t) {
782
+ let n = G(e, Le);
783
783
  if (n != null) return n;
784
- throw G(t);
784
+ throw K(t);
785
785
  }
786
- let ze = [`m`, `modifier`];
787
- function Be(e) {
788
- return W(e, ze);
786
+ let Re = [`m`, `modifier`];
787
+ function ze(e) {
788
+ return G(e, Re);
789
789
  }
790
- let Ve = [`k`, `key`];
791
- function He(e) {
792
- let t = W(e, Ve);
790
+ let Be = [`k`, `key`];
791
+ function Ve(e) {
792
+ let t = G(e, Be);
793
793
  if (t) return t;
794
- throw G(6);
794
+ throw K(6);
795
795
  }
796
- function W(e, t, n) {
796
+ function G(e, t, n) {
797
797
  for (let n = 0; n < t.length; n++) {
798
798
  let r = t[n];
799
799
  if (p(e, r) && e[r] != null) return e[r];
800
800
  }
801
801
  return n;
802
802
  }
803
- let Ue = [
804
- ...Oe,
805
- ...Ae,
806
- ...Me,
807
- ...Pe,
808
- ...Ve,
809
- ...ze,
803
+ let He = [
804
+ ...De,
805
+ ...ke,
806
+ ...je,
807
+ ...Ne,
808
+ ...Be,
810
809
  ...Re,
811
- ...Ie
810
+ ...Le,
811
+ ...Fe
812
812
  ];
813
- function G(e) {
813
+ function K(e) {
814
814
  return Error(`unhandled node type: ${e}`);
815
815
  }
816
- function We(e) {
817
- return (t) => Ge(t, e);
816
+ function Ue(e) {
817
+ return (t) => We(t, e);
818
818
  }
819
- function Ge(e, t) {
820
- let n = ke(t);
821
- if (n == null) throw G(0);
822
- if (Le(n) === 1) {
823
- let t = je(n);
824
- return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], Ke(e, n)], []));
819
+ function We(e, t) {
820
+ let n = Oe(t);
821
+ if (n == null) throw K(0);
822
+ if (Ie(n) === 1) {
823
+ let t = Ae(n);
824
+ return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], Ge(e, n)], []));
825
825
  }
826
- return Ke(e, n);
826
+ return Ge(e, n);
827
827
  }
828
- function Ke(e, t) {
829
- let n = Ne(t);
828
+ function Ge(e, t) {
829
+ let n = Me(t);
830
830
  if (n != null) return e.type === `text` ? n : e.normalize([n]);
831
831
  {
832
- let n = Fe(t).reduce((t, n) => [...t, qe(e, n)], []);
832
+ let n = Pe(t).reduce((t, n) => [...t, Ke(e, n)], []);
833
833
  return e.normalize(n);
834
834
  }
835
835
  }
836
- function qe(e, t) {
837
- let n = Le(t);
836
+ function Ke(e, t) {
837
+ let n = Ie(t);
838
838
  switch (n) {
839
- case 3: return U(t, n);
840
- case 9: return U(t, n);
839
+ case 3: return W(t, n);
840
+ case 9: return W(t, n);
841
841
  case 4: {
842
842
  let r = t;
843
843
  if (p(r, `k`) && r.k) return e.interpolate(e.named(r.k));
844
844
  if (p(r, `key`) && r.key) return e.interpolate(e.named(r.key));
845
- throw G(n);
845
+ throw K(n);
846
846
  }
847
847
  case 5: {
848
848
  let r = t;
849
849
  if (p(r, `i`) && a(r.i)) return e.interpolate(e.list(r.i));
850
850
  if (p(r, `index`) && a(r.index)) return e.interpolate(e.list(r.index));
851
- throw G(n);
851
+ throw K(n);
852
852
  }
853
853
  case 6: {
854
- let n = t, r = Be(n), i = He(n);
855
- return e.linked(qe(e, i), r ? qe(e, r) : void 0, e.type);
854
+ let n = t, r = ze(n), i = Ve(n);
855
+ return e.linked(Ke(e, i), r ? Ke(e, r) : void 0, e.type);
856
856
  }
857
- case 7: return U(t, n);
858
- case 8: return U(t, n);
857
+ case 7: return W(t, n);
858
+ case 8: return W(t, n);
859
859
  default: throw Error(`unhandled node on format message part: ${n}`);
860
860
  }
861
861
  }
862
- let Je = (e) => e, K = d();
863
- function Ye() {
864
- K = d();
862
+ let qe = (e) => e, q = d();
863
+ function Je() {
864
+ q = d();
865
865
  }
866
- function Xe(e, t = {}) {
867
- let n = !1, r = t.onError || ve;
866
+ function Ye(e, t = {}) {
867
+ let n = !1, r = t.onError || _e;
868
868
  t.onError = (e) => {
869
869
  n = !0, r(e);
870
870
  };
871
- let i = De(t).parse(e);
872
- return t.optimize && ye(i), t.mangle && B(i), {
871
+ let i = Ee(t).parse(e);
872
+ return t.optimize && ve(i), t.mangle && V(i), {
873
873
  ast: i,
874
874
  detectError: n,
875
875
  code: ``
876
876
  };
877
877
  }
878
- function Ze(e, t) {
878
+ function Xe(e, t) {
879
879
  if (v(e)) {
880
880
  y(t.warnHtmlMessage) && t.warnHtmlMessage;
881
- let n = (t.onCacheKey || Je)(e), r = K[n];
881
+ let n = (t.onCacheKey || qe)(e), r = q[n];
882
882
  if (r) return r;
883
- let { ast: i, detectError: a } = Xe(e, {
883
+ let { ast: i, detectError: a } = Ye(e, {
884
884
  ...t,
885
885
  location: !1,
886
886
  mangle: !0,
887
887
  optimize: !0
888
- }), o = We(i);
889
- return a ? o : K[n] = o;
888
+ }), o = Ue(i);
889
+ return a ? o : q[n] = o;
890
890
  }
891
891
  {
892
- if (!H(e)) return (() => e);
892
+ if (!U(e)) return (() => e);
893
893
  let t = e.cacheKey;
894
- return t ? K[t] || (K[t] = We(e)) : We(e);
894
+ return t ? q[t] || (q[t] = Ue(e)) : Ue(e);
895
895
  }
896
896
  }
897
- let q = {
897
+ let J = {
898
898
  INVALID_ARGUMENT: 17,
899
899
  INVALID_DATE_ARGUMENT: 18,
900
900
  INVALID_ISO_DATE_ARGUMENT: 19,
@@ -902,56 +902,56 @@
902
902
  NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 21,
903
903
  NOT_SUPPORT_LOCALE_TYPE: 22
904
904
  };
905
- function J(e) {
906
- return z(e, null, void 0);
905
+ function Y(e) {
906
+ return B(e, null, void 0);
907
907
  }
908
- q.INVALID_ARGUMENT, q.INVALID_DATE_ARGUMENT, q.INVALID_ISO_DATE_ARGUMENT, q.NOT_SUPPORT_LOCALE_PROMISE_VALUE, q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, q.NOT_SUPPORT_LOCALE_TYPE;
909
- function Qe(e, t) {
910
- return t.locale == null ? et(e.locale) : et(t.locale);
908
+ J.INVALID_ARGUMENT, J.INVALID_DATE_ARGUMENT, J.INVALID_ISO_DATE_ARGUMENT, J.NOT_SUPPORT_LOCALE_PROMISE_VALUE, J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, J.NOT_SUPPORT_LOCALE_TYPE;
909
+ function Ze(e, t) {
910
+ return t.locale == null ? $e(e.locale) : $e(t.locale);
911
911
  }
912
- let $e;
913
- function et(e) {
912
+ let Qe;
913
+ function $e(e) {
914
914
  if (v(e)) return e;
915
915
  if (_(e)) {
916
- if (e.resolvedOnce && $e != null) return $e;
916
+ if (e.resolvedOnce && Qe != null) return Qe;
917
917
  if (e.constructor.name === `Function`) {
918
918
  let t = e();
919
- if (x(t)) throw J(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
920
- return $e = t;
919
+ if (x(t)) throw Y(J.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
920
+ return Qe = t;
921
921
  }
922
- throw J(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
922
+ throw Y(J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
923
923
  }
924
- throw J(q.NOT_SUPPORT_LOCALE_TYPE);
924
+ throw Y(J.NOT_SUPPORT_LOCALE_TYPE);
925
925
  }
926
- function tt(e, t, n) {
926
+ function et(e, t, n) {
927
927
  return [.../* @__PURE__ */ new Set([n, ...g(t) ? t : b(t) ? Object.keys(t).filter((e) => e !== "default") : v(t) ? [t] : [n]])];
928
928
  }
929
- function nt(e, t, n) {
930
- let r = v(n) ? n : Z, i = e, a;
929
+ function tt(e, t, n) {
930
+ let r = v(n) ? n : _t, i = e, a;
931
931
  b(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)));
932
932
  let o = a.get(r);
933
933
  if (o) return o;
934
934
  let s = [], c = [n];
935
- for (; g(c);) c = rt(s, c, t);
935
+ for (; g(c);) c = nt(s, c, t);
936
936
  let l = g(t) || !w(t) ? t : t.default ? t.default : null;
937
- return c = v(l) ? [l] : l, g(c) && rt(s, c, !1), a.set(r, s), s;
937
+ return c = v(l) ? [l] : l, g(c) && nt(s, c, !1), a.set(r, s), s;
938
938
  }
939
- function rt(e, t, n) {
939
+ function nt(e, t, n) {
940
940
  let r = !0;
941
941
  for (let i = 0; i < t.length && y(r); i++) {
942
942
  let a = t[i];
943
- v(a) && (r = it(e, t[i], n));
943
+ v(a) && (r = rt(e, t[i], n));
944
944
  }
945
945
  return r;
946
946
  }
947
- function it(e, t, n) {
947
+ function rt(e, t, n) {
948
948
  let r, i = t.split(`-`);
949
949
  do
950
- r = at(e, i.join(`-`), n), i.splice(-1, 1);
950
+ r = it(e, i.join(`-`), n), i.splice(-1, 1);
951
951
  while (i.length && r === !0);
952
952
  return r;
953
953
  }
954
- function at(e, t, n) {
954
+ function it(e, t, n) {
955
955
  let r = !1;
956
956
  if (!e.includes(t) && (r = !0, t)) {
957
957
  r = t[t.length - 1] !== `!`;
@@ -960,53 +960,53 @@
960
960
  }
961
961
  return r;
962
962
  }
963
- let Y = [];
964
- Y[0] = {
963
+ let X = [];
964
+ X[0] = {
965
965
  w: [0],
966
966
  i: [3, 0],
967
967
  "[": [4],
968
968
  o: [7]
969
- }, Y[1] = {
969
+ }, X[1] = {
970
970
  w: [1],
971
971
  ".": [2],
972
972
  "[": [4],
973
973
  o: [7]
974
- }, Y[2] = {
974
+ }, X[2] = {
975
975
  w: [2],
976
976
  i: [3, 0],
977
977
  0: [3, 0]
978
- }, Y[3] = {
978
+ }, X[3] = {
979
979
  i: [3, 0],
980
980
  0: [3, 0],
981
981
  w: [1, 1],
982
982
  ".": [2, 1],
983
983
  "[": [4, 1],
984
984
  o: [7, 1]
985
- }, Y[4] = {
985
+ }, X[4] = {
986
986
  "'": [5, 0],
987
987
  "\"": [6, 0],
988
988
  "[": [4, 2],
989
989
  "]": [1, 3],
990
990
  o: 8,
991
991
  l: [4, 0]
992
- }, Y[5] = {
992
+ }, X[5] = {
993
993
  "'": [4, 0],
994
994
  o: 8,
995
995
  l: [5, 0]
996
- }, Y[6] = {
996
+ }, X[6] = {
997
997
  "\"": [4, 0],
998
998
  o: 8,
999
999
  l: [6, 0]
1000
1000
  };
1001
- let ot = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1002
- function st(e) {
1003
- return ot.test(e);
1001
+ let at = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1002
+ function ot(e) {
1003
+ return at.test(e);
1004
1004
  }
1005
- function ct(e) {
1005
+ function st(e) {
1006
1006
  let t = e.charCodeAt(0);
1007
1007
  return t === e.charCodeAt(e.length - 1) && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1008
1008
  }
1009
- function lt(e) {
1009
+ function ct(e) {
1010
1010
  if (e == null) return `o`;
1011
1011
  switch (e.charCodeAt(0)) {
1012
1012
  case 91:
@@ -1027,11 +1027,11 @@
1027
1027
  }
1028
1028
  return `i`;
1029
1029
  }
1030
- function ut(e) {
1030
+ function lt(e) {
1031
1031
  let t = e.trim();
1032
- return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : st(t) ? ct(t) : `*` + t;
1032
+ return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : ot(t) ? st(t) : `*` + t;
1033
1033
  }
1034
- function dt(e) {
1034
+ function ut(e) {
1035
1035
  let t = [], n = -1, r = 0, i = 0, a, o, s, c, l, u, d, f = [];
1036
1036
  f[0] = () => {
1037
1037
  o === void 0 ? o = s : o += s;
@@ -1042,7 +1042,7 @@
1042
1042
  }, f[3] = () => {
1043
1043
  if (i > 0) i--, r = 4, f[0]();
1044
1044
  else {
1045
- if (i = 0, o === void 0 || (o = ut(o), o === !1)) return !1;
1045
+ if (i = 0, o === void 0 || (o = lt(o), o === !1)) return !1;
1046
1046
  f[1]();
1047
1047
  }
1048
1048
  };
@@ -1051,29 +1051,29 @@
1051
1051
  if (r === 5 && t === `'` || r === 6 && t === `"`) return n++, s = `\\` + t, f[0](), !0;
1052
1052
  }
1053
1053
  for (; r !== null;) if (n++, a = e[n], !(a === `\\` && p())) {
1054
- if (c = lt(a), d = Y[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;
1054
+ if (c = ct(a), d = X[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;
1055
1055
  if (r === 7) return t;
1056
1056
  }
1057
1057
  }
1058
- let ft = /* @__PURE__ */ new Map();
1059
- function pt(e, t) {
1058
+ let dt = /* @__PURE__ */ new Map();
1059
+ function ft(e, t) {
1060
1060
  return b(e) ? m(e, t) : null;
1061
1061
  }
1062
- function mt(e, t) {
1062
+ function pt(e, t) {
1063
1063
  if (!b(e)) return null;
1064
- let n = ft.get(t);
1065
- if (n || (n = dt(t), n && ft.set(t, n)), !n) return null;
1064
+ let n = dt.get(t);
1065
+ if (n || (n = ut(t), n && dt.set(t, n)), !n) return null;
1066
1066
  let r = n.length, i = e, a = 0;
1067
1067
  for (; a < r;) {
1068
1068
  let e = n[a];
1069
- if (Ue.includes(e) && H(i) || !b(i) || !p(i, e)) return null;
1069
+ if (He.includes(e) && U(i) || !b(i) || !p(i, e)) return null;
1070
1070
  let t = i[e];
1071
1071
  if (t === void 0 || _(i)) return null;
1072
1072
  i = t, a++;
1073
1073
  }
1074
1074
  return i;
1075
1075
  }
1076
- let X = {
1076
+ let Z = {
1077
1077
  NOT_FOUND_KEY: 1,
1078
1078
  FALLBACK_TO_TRANSLATE: 2,
1079
1079
  CANNOT_FORMAT_NUMBER: 3,
@@ -1086,24 +1086,24 @@
1086
1086
  IGNORE_UNSAFE_LOCALE: 10,
1087
1087
  FALLBACK_TO_DEFAULT_PLURAL_RULE: 11,
1088
1088
  FALLBACK_FROM_INVALID_LOCALE: 12
1089
- }, ht = {
1090
- [X.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1091
- [X.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1092
- [X.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1093
- [X.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1094
- [X.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1095
- [X.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1096
- [X.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.`,
1097
- [X.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1098
- [X.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1099
- [X.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1100
- [X.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1101
- [X.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1089
+ }, mt = {
1090
+ [Z.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1091
+ [Z.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1092
+ [Z.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1093
+ [Z.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1094
+ [Z.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1095
+ [Z.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1096
+ [Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
1097
+ [Z.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1098
+ [Z.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1099
+ [Z.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1100
+ [Z.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1101
+ [Z.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1102
1102
  };
1103
- function gt(e, ...t) {
1104
- return n(ht[e], ...t);
1103
+ function ht(e, ...t) {
1104
+ return n(mt[e], ...t);
1105
1105
  }
1106
- let _t = `12.0.0-alpha.11`, Z = `en-US`, vt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1106
+ let gt = `12.0.0-alpha.12`, _t = `en-US`, vt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1107
1107
  function yt() {
1108
1108
  return {
1109
1109
  upper: (e, t) => t === `text` && v(e) ? e.toUpperCase() : t === `vnode` && b(e) && `__v_isVNode` in e ? e.children.toUpperCase() : e,
@@ -1125,9 +1125,9 @@
1125
1125
  }
1126
1126
  let Et = 0;
1127
1127
  function Dt(e = {}) {
1128
- let t = _(e.onWarn) ? e.onWarn : E, n = v(e.version) ? e.version : _t, r = v(e.locale) || _(e.locale) ? e.locale : Z, i = _(r) ? Z : r, a = jt(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ot(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ot(i), c = w(e.numberFormats) ? e.numberFormats : Ot(i), u = l(d(), e.modifiers, yt()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !Mt(e.missingWarn) || e.missingWarn, h = !Mt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, ee = !y(e.warnHtmlMessage) || e.warnHtmlMessage, T = !!e.escapeParameter, D = _(e.messageCompiler) ? e.messageCompiler : bt || null, te = _(e.messageResolver) ? e.messageResolver : St || pt, ne = _(e.localeFallbacker) ? e.localeFallbacker : wt || tt, re = b(e.fallbackContext) ? e.fallbackContext : void 0;
1128
+ let t = _(e.onWarn) ? e.onWarn : D, n = v(e.version) ? e.version : gt, r = v(e.locale) || _(e.locale) ? e.locale : _t, i = _(r) ? _t : r, a = jt(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ot(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ot(i), c = w(e.numberFormats) ? e.numberFormats : Ot(i), u = l(d(), e.modifiers, yt()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !Mt(e.missingWarn) || e.missingWarn, h = !Mt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, T = !y(e.warnHtmlMessage) || e.warnHtmlMessage, E = !!e.escapeParameter, O = _(e.messageCompiler) ? e.messageCompiler : bt || null, ee = _(e.messageResolver) ? e.messageResolver : St || ft, te = _(e.localeFallbacker) ? e.localeFallbacker : wt || et, ne = b(e.fallbackContext) ? e.fallbackContext : void 0;
1129
1129
  Et++;
1130
- let O = {
1130
+ let k = {
1131
1131
  version: n,
1132
1132
  cid: Et,
1133
1133
  locale: r,
@@ -1142,22 +1142,22 @@
1142
1142
  unresolving: x,
1143
1143
  postTranslation: S,
1144
1144
  processor: C,
1145
- warnHtmlMessage: ee,
1146
- escapeParameter: T,
1147
- messageCompiler: D,
1148
- messageResolver: te,
1149
- localeFallbacker: ne,
1150
- fallbackContext: re,
1145
+ warnHtmlMessage: T,
1146
+ escapeParameter: E,
1147
+ messageCompiler: O,
1148
+ messageResolver: ee,
1149
+ localeFallbacker: te,
1150
+ fallbackContext: ne,
1151
1151
  onWarn: t
1152
1152
  };
1153
- return O.datetimeFormats = s, O.numberFormats = c, O.__datetimeFormatters = /* @__PURE__ */ new Map(), O.__numberFormatters = /* @__PURE__ */ new Map(), O;
1153
+ return k.datetimeFormats = s, k.numberFormats = c, k.__datetimeFormatters = /* @__PURE__ */ new Map(), k.__numberFormatters = /* @__PURE__ */ new Map(), k;
1154
1154
  }
1155
1155
  let Ot = (e) => ({ [e]: d() });
1156
1156
  function kt(e, t) {
1157
1157
  let n = m(e.messages, t);
1158
1158
  if (n == null) return;
1159
1159
  let r = d();
1160
- return L(n, r), r;
1160
+ return R(n, r), r;
1161
1161
  }
1162
1162
  function At(e, t, n) {
1163
1163
  h(t) || (e.messages[t] = n);
@@ -1229,7 +1229,7 @@
1229
1229
  }
1230
1230
  }
1231
1231
  function Ut(e, [t, n, r, i], a, o, s, c) {
1232
- let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Qe(e, r);
1232
+ let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Ze(e, r);
1233
1233
  if (!v(t) || t === ``) {
1234
1234
  let t = Ht(e, a, p.replace(/!/g, ``), i, c);
1235
1235
  return f ? t.formatToParts(n) : t.format(n);
@@ -1285,19 +1285,19 @@
1285
1285
  let [t] = e, n = d(), r = d(), i;
1286
1286
  if (v(t)) {
1287
1287
  let e = t.match(/^(\d{4}-\d{2}-\d{2})(?:(T|\s)(.+))?$/);
1288
- if (!e) throw J(q.INVALID_ISO_DATE_ARGUMENT);
1288
+ if (!e) throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1289
1289
  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();
1290
1290
  i = new Date(n);
1291
1291
  try {
1292
1292
  i.toISOString();
1293
1293
  } catch {
1294
- throw J(q.INVALID_ISO_DATE_ARGUMENT);
1294
+ throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1295
1295
  }
1296
1296
  } else if (o(t)) {
1297
- if (isNaN(t.getTime())) throw J(q.INVALID_DATE_ARGUMENT);
1297
+ if (isNaN(t.getTime())) throw Y(J.INVALID_DATE_ARGUMENT);
1298
1298
  i = t;
1299
1299
  } else if (a(t)) i = t;
1300
- else throw J(q.INVALID_ARGUMENT);
1300
+ else throw Y(J.INVALID_ARGUMENT);
1301
1301
  let s = Kt(e, n, r, Jt);
1302
1302
  return [
1303
1303
  n.key || ``,
@@ -1337,7 +1337,7 @@
1337
1337
  ];
1338
1338
  function $t(...e) {
1339
1339
  let [t] = e, n = d(), r = d();
1340
- if (!a(t)) throw J(q.INVALID_ARGUMENT);
1340
+ if (!a(t)) throw Y(J.INVALID_ARGUMENT);
1341
1341
  let i = t, o = Kt(e, n, r, Qt);
1342
1342
  return [
1343
1343
  n.key || ``,
@@ -1349,7 +1349,7 @@
1349
1349
  function en(e, t, n) {
1350
1350
  Gt(e.__numberFormatters, t, n);
1351
1351
  }
1352
- let tn = (e) => e, nn = (e) => ``, rn = `text`, an = (e) => e.length === 0 ? `` : T(e), on = ee;
1352
+ let tn = (e) => e, nn = (e) => ``, rn = `text`, an = (e) => e.length === 0 ? `` : E(e), on = T;
1353
1353
  function sn(e, t) {
1354
1354
  return e = Math.abs(e), t === 2 ? e === 1 ? 0 : 1 : Math.min(e, 2);
1355
1355
  }
@@ -1418,38 +1418,44 @@
1418
1418
  };
1419
1419
  return w;
1420
1420
  }
1421
- let pn = () => ``, $ = (e) => _(e), mn = (e) => v(e) || H(e) || $(e);
1421
+ let pn = () => ``, $ = (e) => _(e), mn = (e) => v(e) || U(e) || $(e);
1422
1422
  function hn(e, ...t) {
1423
- let [n, r] = yn(...t), i = Qe(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1423
+ let [n, r] = xn(...t), i = Ze(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1424
1424
  a && gn(r);
1425
1425
  let o = !!r.resolvedMessage, [s, c, l] = o ? [
1426
1426
  n,
1427
1427
  i,
1428
1428
  m(e.messages, i) || d()
1429
- ] : _n(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1429
+ ] : yn(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1430
1430
  if (!o && !mn(s)) {
1431
1431
  let t = v(r.default) ? r.default : y(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
1432
1432
  (e.fallbackFormat || t != null && (v(t) || _(t))) && (s = t, u = s);
1433
1433
  }
1434
1434
  if (!o && (!mn(s) || !v(c))) return e.unresolving ? -1 : n;
1435
- let f = !1, p = $(s) ? s : vn(e, n, c, s, u, () => {
1435
+ let f = !1, p = $(s) ? s : bn(e, n, c, s, u, () => {
1436
1436
  f = !0;
1437
1437
  });
1438
1438
  if (f) return s;
1439
- let h = p(fn(xn(e, c, l, r))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1440
- return a && v(g) && (g = F(g)), g;
1439
+ let h = p(fn(Cn(e, c, l, r, a))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1440
+ return a && v(g) && (g = I(g)), g;
1441
1441
  }
1442
1442
  function gn(e) {
1443
- if (g(e.list) && (e.list = e.list.map((e) => v(e) ? D(e) : e)), b(e.named)) {
1443
+ if (g(e.list) && (e.list = e.list.map((e) => v(e) ? O(e) : e)), b(e.named)) {
1444
1444
  let t = e.named, n = d();
1445
1445
  for (let e of Object.keys(t)) {
1446
1446
  let r = t[e];
1447
- n[e] = v(r) ? D(r) : r;
1447
+ n[e] = v(r) ? O(r) : r;
1448
1448
  }
1449
1449
  e.named = n;
1450
1450
  }
1451
1451
  }
1452
- function _n(e, t, n, r, i, a) {
1452
+ function _n(e) {
1453
+ return v(e) ? e : O(T(e));
1454
+ }
1455
+ function vn(e, t) {
1456
+ return !t || _(e?.interpolate) ? e ?? void 0 : l({}, e, { interpolate: _n });
1457
+ }
1458
+ function yn(e, t, n, r, i, a) {
1453
1459
  let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, u = l(e, r, n), f = d(), p, h = null;
1454
1460
  for (let n = 0; n < u.length && (p = u[n], f = m(o, p) || d(), (h = c(f, t)) === null && (h = m(f, t)), !mn(h)); n++) if (!zt(p, u)) {
1455
1461
  let n = Ft(e, t, p, a, `translate`);
@@ -1461,7 +1467,7 @@
1461
1467
  f
1462
1468
  ];
1463
1469
  }
1464
- function vn(e, t, n, r, i, a) {
1470
+ function bn(e, t, n, r, i, a) {
1465
1471
  if ($(r)) {
1466
1472
  let e = r;
1467
1473
  return e.locale = e.locale || n, e.key = e.key || t, e;
@@ -1470,16 +1476,16 @@
1470
1476
  let e = (() => r);
1471
1477
  return e.locale = n, e.key = t, e;
1472
1478
  }
1473
- let o = e.messageCompiler(r, bn(e, n, i, r, e.warnHtmlMessage, a));
1479
+ let o = e.messageCompiler(r, Sn(e, n, i, r, e.warnHtmlMessage, a));
1474
1480
  return o.locale = n, o.key = t, o.source = r, o;
1475
1481
  }
1476
- function yn(...e) {
1482
+ function xn(...e) {
1477
1483
  let [t, n, r] = e;
1478
- if (!v(t) && !a(t) && !$(t) && !H(t)) throw J(q.INVALID_ARGUMENT);
1484
+ if (!v(t) && !a(t) && !$(t) && !U(t)) throw Y(J.INVALID_ARGUMENT);
1479
1485
  let i = a(t) ? String(t) : ($(t), t), o = d();
1480
1486
  return a(n) ? o.plural = n : v(n) ? o.default = n : w(n) && !c(n) ? o.named = n : g(n) && (o.list = n), a(r) ? o.plural = r : v(r) ? o.default = r : w(r) && l(o, r), [i, o];
1481
1487
  }
1482
- function bn(e, t, n, i, a, o) {
1488
+ function Sn(e, t, n, i, a, o) {
1483
1489
  return {
1484
1490
  locale: t,
1485
1491
  key: n,
@@ -1490,31 +1496,31 @@
1490
1496
  onCacheKey: (e) => r(t, n, e)
1491
1497
  };
1492
1498
  }
1493
- function xn(e, t, n, r) {
1494
- let { modifiers: i, pluralRules: o, messageResolver: s, fallbackLocale: c, fallbackWarn: l, missingWarn: u, fallbackContext: d } = e;
1499
+ function Cn(e, t, n, r, i) {
1500
+ let { modifiers: o, pluralRules: s, messageResolver: c, fallbackLocale: l, fallbackWarn: u, missingWarn: d, fallbackContext: f } = e;
1495
1501
  return {
1496
1502
  locale: t,
1497
- modifiers: i,
1498
- pluralRules: o,
1503
+ modifiers: o,
1504
+ pluralRules: s,
1499
1505
  messages: (r, i) => {
1500
- let a = s(n, r);
1501
- if (a == null && (d || i)) {
1502
- let [n, , i] = _n(d || e, r, t, c, l, u);
1503
- a = n ?? s(i, r);
1506
+ let a = c(n, r);
1507
+ if (a == null && (f || i)) {
1508
+ let [n, , i] = yn(f || e, r, t, l, u, d);
1509
+ a = n ?? c(i, r);
1504
1510
  }
1505
- if (v(a) || H(a)) {
1506
- let n = !1, i = vn(e, r, t, a, r, () => {
1511
+ if (v(a) || U(a)) {
1512
+ let n = !1, i = bn(e, r, t, a, r, () => {
1507
1513
  n = !0;
1508
1514
  });
1509
1515
  return n ? pn : i;
1510
1516
  }
1511
1517
  return $(a) ? a : pn;
1512
1518
  },
1513
- processor: e.processor ?? void 0,
1519
+ processor: vn(e.processor, i),
1514
1520
  list: r.list ?? void 0,
1515
1521
  named: r.named ?? void 0,
1516
1522
  pluralIndex: a(r.plural) ? r.plural : void 0
1517
1523
  };
1518
1524
  }
1519
- return e.AST_NODE_PROPS_KEYS = Ue, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = X, e.DATETIME_FORMAT_OPTIONS_KEYS = Jt, e.DEFAULT_LOCALE = Z, e.DEFAULT_MESSAGE_DATA_TYPE = rn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = Qt, e.VERSION = _t, e.clearCompileCache = Ye, e.clearDateTimeFormat = Xt, e.clearNumberFormat = en, e.compile = Ze, e.createCompileError = z, e.createCoreContext = Dt, e.createCoreError = J, e.createMessageContext = fn, e.datetime = qt, e.fallbackWithLocaleChain = nt, e.fallbackWithSimple = tt, e.getLocale = Qe, e.getLocaleMessage = kt, e.getWarnMessage = gt, e.handleMissing = Ft, e.isAlmostSameLocale = Rt, e.isFallbackLocale = jt, e.isImplicitFallback = zt, e.isMessageAST = H, e.isMessageFormat = mn, e.isMessageFunction = $, e.isTranslateFallbackWarn = Nt, e.isTranslateMissingWarn = Pt, e.isWarnOption = Mt, e.number = Zt, e.parse = dt, e.parseDateTimeArgs = Yt, e.parseNumberArgs = $t, e.parseTranslateArgs = yn, e.registerLocaleFallbacker = Tt, e.registerMessageCompiler = xt, e.registerMessageResolver = Ct, e.resolveLocale = et, e.resolveValue = mt, e.resolveWithKeyValue = pt, e.setLocaleMessage = At, e.translate = hn, e.updateFallbackLocale = Lt, e;
1525
+ return e.AST_NODE_PROPS_KEYS = He, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = Z, e.DATETIME_FORMAT_OPTIONS_KEYS = Jt, e.DEFAULT_LOCALE = _t, e.DEFAULT_MESSAGE_DATA_TYPE = rn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = Qt, e.VERSION = gt, e.clearCompileCache = Je, e.clearDateTimeFormat = Xt, e.clearNumberFormat = en, e.compile = Xe, e.createCompileError = B, e.createCoreContext = Dt, e.createCoreError = Y, e.createMessageContext = fn, e.datetime = qt, e.fallbackWithLocaleChain = tt, e.fallbackWithSimple = et, e.getLocale = Ze, e.getLocaleMessage = kt, e.getWarnMessage = ht, e.handleMissing = Ft, e.isAlmostSameLocale = Rt, e.isFallbackLocale = jt, e.isImplicitFallback = zt, e.isMessageAST = U, e.isMessageFormat = mn, e.isMessageFunction = $, e.isTranslateFallbackWarn = Nt, e.isTranslateMissingWarn = Pt, e.isWarnOption = Mt, e.number = Zt, e.parse = ut, e.parseDateTimeArgs = Yt, e.parseNumberArgs = $t, e.parseTranslateArgs = xn, e.registerLocaleFallbacker = Tt, e.registerMessageCompiler = xt, e.registerMessageResolver = Ct, e.resolveLocale = $e, e.resolveValue = pt, e.resolveWithKeyValue = ft, e.setLocaleMessage = At, e.translate = hn, e.updateFallbackLocale = Lt, e;
1520
1526
  })({});