@intlify/core 11.4.20 → 11.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +1 -1
- package/dist/core.esm-browser.js +262 -32
- package/dist/core.esm-browser.prod.js +2 -2
- package/dist/core.global.js +262 -32
- package/dist/core.global.prod.js +2 -2
- package/dist/core.mjs +1 -1
- package/dist/core.node.mjs +1 -1
- package/dist/core.prod.cjs +1 -1
- package/dist/core.runtime.esm-browser.js +261 -31
- package/dist/core.runtime.esm-browser.prod.js +2 -2
- package/dist/core.runtime.global.js +261 -31
- package/dist/core.runtime.global.prod.js +2 -2
- package/dist/core.runtime.mjs +1 -1
- package/dist/core.runtime.node.mjs +1 -1
- package/package.json +3 -3
package/dist/core.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* core v11.4.
|
|
2
|
+
* core v11.4.22
|
|
3
3
|
* (c) 2026 kazuya kawaguchi
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -305,6 +305,169 @@ var IntlifyCore = (function (exports) {
|
|
|
305
305
|
const valueQuote = quote || '';
|
|
306
306
|
return `${name}=${valueQuote}${sanitizeAttributeValue(attrName, value)}${valueQuote}`;
|
|
307
307
|
}
|
|
308
|
+
const HTML = 0;
|
|
309
|
+
const SVG = 1;
|
|
310
|
+
const MATHML = 2;
|
|
311
|
+
// Elements that have no end tag, and elements that the HTML parser does not open in the body
|
|
312
|
+
const notOpenedElementPattern = /^(?:area|base|basefont|bgsound|br|col|embed|frame|hr|image|img|input|keygen|link|meta|param|source|track|wbr|html|head|body|frameset)$/;
|
|
313
|
+
// Start tags that end SVG and MathML content (and `<font>` with `color`, `face` or `size`)
|
|
314
|
+
const breakoutElementPattern = /^(?:b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h[1-6]|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var)$/;
|
|
315
|
+
// Start tags that close an open `<p>`, and the elements that they do not close a `<p>` through
|
|
316
|
+
const paragraphClosingElementPattern = /^(?:address|article|aside|blockquote|center|details|dialog|dir|div|dl|fieldset|figcaption|figure|footer|header|hgroup|main|menu|nav|ol|p|search|section|summary|ul|h[1-6]|pre|listing|form|li|dd|dt|plaintext|table|hr|xmp)$/;
|
|
317
|
+
const buttonScopeElementPattern = /^(?:applet|caption|html|table|td|th|marquee|object|template|button)$/;
|
|
318
|
+
const svgIntegrationPattern = /^(?:foreignobject|desc|title)$/;
|
|
319
|
+
// The names of SVG and MathML integration points (except `title`, whose content is text in HTML). Read with the
|
|
320
|
+
// HTML rules, they are unknown HTML elements, and their start tags become text: if the browser closed such an
|
|
321
|
+
// element early (for example, `<button>` of the translation closes the `<button>` that the translation is
|
|
322
|
+
// rendered in), its end tag would close an integration point of the page, and the rest of the page would be read
|
|
323
|
+
// as SVG or MathML
|
|
324
|
+
const integrationNamePattern = /^(?:foreignobject|desc|mi|mo|mn|ms|mtext|annotation-xml)$/;
|
|
325
|
+
const mathmlIntegrationPattern = /^(?:mi|mo|mn|ms|mtext)$/;
|
|
326
|
+
const htmlEncodingPattern = /^(?:text\/html|application\/xhtml\+xml)$/i;
|
|
327
|
+
function asciiLowercase(text) {
|
|
328
|
+
return text.replace(/[A-Z]+/g, upper => upper.toLowerCase());
|
|
329
|
+
}
|
|
330
|
+
// Whether a start tag is read with the rules of SVG and MathML content, rather than with the HTML rules
|
|
331
|
+
function isForeignContext(top, name) {
|
|
332
|
+
return (!!top &&
|
|
333
|
+
top.namespace !== HTML &&
|
|
334
|
+
(!top.integration ||
|
|
335
|
+
(mathmlIntegrationPattern.test(top.name) &&
|
|
336
|
+
(name === 'mglyph' || name === 'malignmark'))) &&
|
|
337
|
+
!(top.name === 'annotation-xml' && name === 'svg'));
|
|
338
|
+
}
|
|
339
|
+
function isBreakout(name, attributes) {
|
|
340
|
+
return (breakoutElementPattern.test(name) ||
|
|
341
|
+
(name === 'font' &&
|
|
342
|
+
(attributes.has('color') ||
|
|
343
|
+
attributes.has('face') ||
|
|
344
|
+
attributes.has('size'))));
|
|
345
|
+
}
|
|
346
|
+
// Pop the elements down to `length`, and return their end tags (innermost first).
|
|
347
|
+
// A `<form>` becomes text instead: in a form of the page, browsers ignore the `<form>`,
|
|
348
|
+
// and `</form>` would close the form of the page
|
|
349
|
+
function closeDownTo(stack, length, parts) {
|
|
350
|
+
let endTags = '';
|
|
351
|
+
for (let index = stack.length - 1; index >= length; index--) {
|
|
352
|
+
const element = stack[index];
|
|
353
|
+
if (element.namespace === HTML && element.name === 'form') {
|
|
354
|
+
parts[element.part] = escapeLessThan(parts[element.part]);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
endTags += `</${element.name}>`;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
stack.length = length;
|
|
361
|
+
return endTags;
|
|
362
|
+
}
|
|
363
|
+
// Pop SVG and MathML elements down to an HTML element or an integration point, as the tree builder does,
|
|
364
|
+
// and return their end tags
|
|
365
|
+
function closeForeign(stack, parts) {
|
|
366
|
+
let length = stack.length;
|
|
367
|
+
while (length > 0 &&
|
|
368
|
+
stack[length - 1].namespace !== HTML &&
|
|
369
|
+
!stack[length - 1].integration) {
|
|
370
|
+
length--;
|
|
371
|
+
}
|
|
372
|
+
return closeDownTo(stack, length, parts);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Open an element for a start tag, as the tree builder does
|
|
376
|
+
*
|
|
377
|
+
* @returns The end tags to write before the start tag: the SVG and MathML elements that it ends, and a `<p>`
|
|
378
|
+
* of the translation that it closes, with the elements in the `<p>` (so that no formatting element in it is
|
|
379
|
+
* made again after it), or `undefined` when the start tag becomes text
|
|
380
|
+
*/
|
|
381
|
+
function openElement(stack, parts, name, attributes, selfClosing) {
|
|
382
|
+
// the start tag is written after the end tags
|
|
383
|
+
const part = parts.length + 1;
|
|
384
|
+
let endTags = '';
|
|
385
|
+
const top = stack[stack.length - 1];
|
|
386
|
+
if (isForeignContext(top, name)) {
|
|
387
|
+
if (!isBreakout(name, attributes)) {
|
|
388
|
+
if (!selfClosing) {
|
|
389
|
+
stack.push({
|
|
390
|
+
name,
|
|
391
|
+
namespace: top.namespace,
|
|
392
|
+
integration: top.namespace === SVG
|
|
393
|
+
? svgIntegrationPattern.test(name)
|
|
394
|
+
: mathmlIntegrationPattern.test(name) ||
|
|
395
|
+
(name === 'annotation-xml' &&
|
|
396
|
+
htmlEncodingPattern.test((attributes.get('encoding') || '').replace(numericCharacterReferencePattern, decodeNumericCharacterReference))),
|
|
397
|
+
part
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
return endTags;
|
|
401
|
+
}
|
|
402
|
+
endTags = closeForeign(stack, parts);
|
|
403
|
+
}
|
|
404
|
+
if (paragraphClosingElementPattern.test(name)) {
|
|
405
|
+
for (let index = stack.length - 1; index >= 0; index--) {
|
|
406
|
+
const element = stack[index];
|
|
407
|
+
if (element.namespace === HTML
|
|
408
|
+
? buttonScopeElementPattern.test(element.name)
|
|
409
|
+
: element.integration) {
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
if (element.namespace === HTML && element.name === 'p') {
|
|
413
|
+
endTags += closeDownTo(stack, index, parts);
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (integrationNamePattern.test(name)) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
if (name === 'svg' || name === 'math') {
|
|
422
|
+
if (!selfClosing) {
|
|
423
|
+
stack.push({
|
|
424
|
+
name,
|
|
425
|
+
namespace: name === 'svg' ? SVG : MATHML,
|
|
426
|
+
integration: false,
|
|
427
|
+
part
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
else if (!notOpenedElementPattern.test(name)) {
|
|
432
|
+
// HTML elements ignore `/>`
|
|
433
|
+
stack.push({ name, namespace: HTML, integration: false, part });
|
|
434
|
+
}
|
|
435
|
+
return endTags;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Close the element of an end tag: an SVG or MathML element with the same name above the innermost HTML
|
|
439
|
+
* element, or else an HTML element with the same name
|
|
440
|
+
*
|
|
441
|
+
* @returns The end tags to write before the end tag (of the elements in the closed element), or `undefined`
|
|
442
|
+
* when the end tag closes nothing in the translation, and is removed
|
|
443
|
+
*/
|
|
444
|
+
function closeElement(stack, parts, name) {
|
|
445
|
+
let endTags = '';
|
|
446
|
+
if (name === 'p' || name === 'br') {
|
|
447
|
+
// they end SVG and MathML content
|
|
448
|
+
endTags = closeForeign(stack, parts);
|
|
449
|
+
}
|
|
450
|
+
let index = stack.length - 1;
|
|
451
|
+
while (index >= 0 &&
|
|
452
|
+
stack[index].namespace !== HTML &&
|
|
453
|
+
stack[index].name !== name) {
|
|
454
|
+
index--;
|
|
455
|
+
}
|
|
456
|
+
if (index >= 0 && stack[index].namespace !== HTML) ;
|
|
457
|
+
else {
|
|
458
|
+
while (index >= 0 &&
|
|
459
|
+
!(stack[index].namespace === HTML && stack[index].name === name)) {
|
|
460
|
+
index--;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (index < 0) {
|
|
464
|
+
// browsers read `</br>` as `<br>`, and `</p>` without an open `<p>` as `<p></p>`
|
|
465
|
+
return name === 'br' || name === 'p' ? endTags : undefined;
|
|
466
|
+
}
|
|
467
|
+
endTags += closeDownTo(stack, index + 1, parts);
|
|
468
|
+
stack.length = index;
|
|
469
|
+
return endTags;
|
|
470
|
+
}
|
|
308
471
|
/**
|
|
309
472
|
* Read a tag with the rules of the HTML tokenizer.
|
|
310
473
|
* A start tag is written again with its attributes sanitized, and an end tag is kept as it is
|
|
@@ -312,7 +475,8 @@ var IntlifyCore = (function (exports) {
|
|
|
312
475
|
* @param html - The HTML
|
|
313
476
|
* @param start - The index of `<`
|
|
314
477
|
* @param neutralized - What has been neutralized
|
|
315
|
-
* @returns The tag, the tag name,
|
|
478
|
+
* @returns The tag, the tag name, the index after the tag (-1 when the tag is not closed),
|
|
479
|
+
* whether the start tag is self-closing (`/>`), and the attributes of the start tag,
|
|
316
480
|
* or `undefined` when `<` does not start a tag
|
|
317
481
|
*/
|
|
318
482
|
function readTag(html, start, neutralized) {
|
|
@@ -323,6 +487,7 @@ var IntlifyCore = (function (exports) {
|
|
|
323
487
|
}
|
|
324
488
|
const [, slash, tagName] = tagStart;
|
|
325
489
|
let tag = tagStart[0];
|
|
490
|
+
const attributes = new Map();
|
|
326
491
|
let step;
|
|
327
492
|
tagStepPattern.lastIndex = tagStartPattern.lastIndex;
|
|
328
493
|
while ((step = tagStepPattern.exec(html))) {
|
|
@@ -330,17 +495,27 @@ var IntlifyCore = (function (exports) {
|
|
|
330
495
|
if (close) {
|
|
331
496
|
const end = tagStepPattern.lastIndex;
|
|
332
497
|
// browsers ignore the attributes of end tags
|
|
333
|
-
return [
|
|
498
|
+
return [
|
|
499
|
+
slash ? html.slice(start, end) : tag + raw,
|
|
500
|
+
tagName,
|
|
501
|
+
end,
|
|
502
|
+
!slash && separator.endsWith('/'),
|
|
503
|
+
attributes
|
|
504
|
+
];
|
|
334
505
|
}
|
|
335
506
|
if (quote && !closingQuote) {
|
|
336
507
|
break;
|
|
337
508
|
}
|
|
338
509
|
if (!slash) {
|
|
339
510
|
const value = quote ? quotedValue : unquotedValue;
|
|
511
|
+
const name = asciiLowercase(attrName);
|
|
512
|
+
if (!attributes.has(name)) {
|
|
513
|
+
attributes.set(name, value || '');
|
|
514
|
+
}
|
|
340
515
|
tag += separator + serializeAttribute(attrName, value, quote, neutralized);
|
|
341
516
|
}
|
|
342
517
|
}
|
|
343
|
-
return [tag, tagName, -1];
|
|
518
|
+
return [tag, tagName, -1, false, attributes];
|
|
344
519
|
}
|
|
345
520
|
/**
|
|
346
521
|
* Find the end tag of an element whose content is text, as the HTML tokenizer does:
|
|
@@ -365,57 +540,79 @@ var IntlifyCore = (function (exports) {
|
|
|
365
540
|
* where each tag and each attribute starts and ends, and every attribute of every start tag is checked.
|
|
366
541
|
* What is still open at the end of the string (a tag, a comment, or an element whose content is text,
|
|
367
542
|
* like `<textarea>`) becomes text: on the server (SSR), the rest of the page follows the translation,
|
|
368
|
-
* and it would be read as a part of what is open
|
|
543
|
+
* and it would be read as a part of what is open.
|
|
544
|
+
* For the same reason, the elements are followed as the tree builder of browsers opens and closes them,
|
|
545
|
+
* including SVG and MathML: an end tag that closes no element of the translation is removed, the elements
|
|
546
|
+
* in the element that an end tag closes are closed before it, and the elements still open at the end are
|
|
547
|
+
* closed. A `<form>` that the translation does not close becomes text, because browsers ignore it in a form
|
|
548
|
+
* of the page, and `</form>` would close that form
|
|
369
549
|
*
|
|
370
550
|
* @param html - The translated HTML
|
|
371
551
|
* @returns The sanitized HTML
|
|
372
552
|
*/
|
|
373
553
|
function sanitizeTranslatedHtml(html) {
|
|
374
554
|
const neutralized = {};
|
|
375
|
-
|
|
555
|
+
const parts = [];
|
|
556
|
+
const stack = [];
|
|
376
557
|
let index = 0;
|
|
377
558
|
let lessThan;
|
|
378
559
|
while ((lessThan = html.indexOf('<', index)) !== -1) {
|
|
379
|
-
|
|
560
|
+
parts.push(html.slice(index, lessThan));
|
|
380
561
|
index = lessThan + 1;
|
|
381
562
|
const read = readTag(html, lessThan, neutralized);
|
|
382
563
|
if (read) {
|
|
383
|
-
const [tag, tagName, end] = read;
|
|
564
|
+
const [tag, tagName, end, selfClosing, attributes] = read;
|
|
384
565
|
if (end === -1) {
|
|
385
566
|
neutralized.unclosed = true;
|
|
386
|
-
|
|
567
|
+
parts.push(escapeLessThan(html.slice(lessThan)));
|
|
387
568
|
index = html.length;
|
|
388
569
|
break;
|
|
389
570
|
}
|
|
390
571
|
index = end;
|
|
391
572
|
if (tag[1] === '/') {
|
|
392
|
-
|
|
573
|
+
const endTags = closeElement(stack, parts, asciiLowercase(tagName));
|
|
574
|
+
if (endTags === undefined) {
|
|
575
|
+
neutralized.closed = true;
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
if (endTags) {
|
|
579
|
+
neutralized.closed = true;
|
|
580
|
+
}
|
|
581
|
+
parts.push(endTags + tag);
|
|
582
|
+
}
|
|
393
583
|
}
|
|
394
584
|
else if (dangerousElementPattern.test(tagName)) {
|
|
395
585
|
// the start tag becomes text
|
|
396
586
|
neutralized.element = true;
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
else
|
|
400
|
-
|
|
401
|
-
if (
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
587
|
+
parts.push(escapeLessThan(tag));
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
let content = '';
|
|
591
|
+
if (textContentElementPattern.test(tagName)) {
|
|
592
|
+
const contentEnd = findTextContentEnd(html, end, tagName);
|
|
593
|
+
if (contentEnd === -1) {
|
|
594
|
+
// the start tag becomes text, and the content is read as HTML, as browsers do then
|
|
595
|
+
neutralized.unclosed = true;
|
|
596
|
+
parts.push(escapeLessThan(tag));
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
content = escapeLessThan(html.slice(end, contentEnd));
|
|
600
|
+
index = contentEnd;
|
|
601
|
+
}
|
|
602
|
+
const endTags = openElement(stack, parts, asciiLowercase(tagName), attributes, selfClosing);
|
|
603
|
+
if (endTags === undefined) {
|
|
604
|
+
neutralized.closed = true;
|
|
605
|
+
parts.push(escapeLessThan(tag) + content);
|
|
405
606
|
}
|
|
406
607
|
else {
|
|
407
|
-
|
|
408
|
-
index = contentEnd;
|
|
608
|
+
parts.push(endTags, tag + content);
|
|
409
609
|
}
|
|
410
610
|
}
|
|
411
|
-
else {
|
|
412
|
-
result += tag;
|
|
413
|
-
}
|
|
414
611
|
continue;
|
|
415
612
|
}
|
|
416
613
|
commentPattern.lastIndex = lessThan;
|
|
417
614
|
if (commentPattern.test(html)) {
|
|
418
|
-
|
|
615
|
+
parts.push(html.slice(lessThan, commentPattern.lastIndex));
|
|
419
616
|
index = commentPattern.lastIndex;
|
|
420
617
|
continue;
|
|
421
618
|
}
|
|
@@ -423,9 +620,21 @@ var IntlifyCore = (function (exports) {
|
|
|
423
620
|
neutralized.unclosed = true;
|
|
424
621
|
}
|
|
425
622
|
// `<!DOCTYPE`, `<![CDATA[`, `<?`, `</` without a tag name, `<` at the end and any other `<` become text
|
|
426
|
-
|
|
623
|
+
parts.push('<');
|
|
624
|
+
}
|
|
625
|
+
parts.push(html.slice(index));
|
|
626
|
+
// close the elements that are still open
|
|
627
|
+
for (let open = stack.length - 1; open >= 0; open--) {
|
|
628
|
+
const element = stack[open];
|
|
629
|
+
neutralized.closed = true;
|
|
630
|
+
if (element.namespace === HTML && element.name === 'form') {
|
|
631
|
+
// the browser ignores `<form>` in a form of the page, and `</form>` would close that form
|
|
632
|
+
parts[element.part] = escapeLessThan(parts[element.part]);
|
|
633
|
+
}
|
|
634
|
+
else {
|
|
635
|
+
parts.push(`</${element.name}>`);
|
|
636
|
+
}
|
|
427
637
|
}
|
|
428
|
-
result += html.slice(index);
|
|
429
638
|
{
|
|
430
639
|
if (neutralized.eventHandler) {
|
|
431
640
|
warn('Potentially dangerous event handlers detected in translation. ' +
|
|
@@ -443,8 +652,12 @@ var IntlifyCore = (function (exports) {
|
|
|
443
652
|
warn('Unclosed tag, comment or element (such as <textarea>) detected in translation. ' +
|
|
444
653
|
'Consider closing it in your translation messages.');
|
|
445
654
|
}
|
|
655
|
+
if (neutralized.closed) {
|
|
656
|
+
warn('Unclosed or misnested elements detected in translation. ' +
|
|
657
|
+
'Consider closing every element in the right order in your translation messages.');
|
|
658
|
+
}
|
|
446
659
|
}
|
|
447
|
-
return
|
|
660
|
+
return parts.join('');
|
|
448
661
|
}
|
|
449
662
|
|
|
450
663
|
function createPosition(line, column, offset) {
|
|
@@ -2746,7 +2959,7 @@ var IntlifyCore = (function (exports) {
|
|
|
2746
2959
|
* Intlify core-base version
|
|
2747
2960
|
* @internal
|
|
2748
2961
|
*/
|
|
2749
|
-
const VERSION = '11.4.
|
|
2962
|
+
const VERSION = '11.4.22';
|
|
2750
2963
|
const NOT_REOSLVED = -1;
|
|
2751
2964
|
const DEFAULT_LOCALE = 'en-US';
|
|
2752
2965
|
const MISSING_RESOLVE_VALUE = '';
|
|
@@ -3519,7 +3732,7 @@ var IntlifyCore = (function (exports) {
|
|
|
3519
3732
|
return format;
|
|
3520
3733
|
}
|
|
3521
3734
|
// evaluate message with context
|
|
3522
|
-
const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
|
|
3735
|
+
const ctxOptions = getMessageContextOptions(context, targetLocale, message, options, escapeParameter);
|
|
3523
3736
|
const msgContext = createMessageContext(ctxOptions);
|
|
3524
3737
|
const messaged = evaluateMessage(context, msg, msgContext);
|
|
3525
3738
|
// if use post translation option, proceed it with handler
|
|
@@ -3555,6 +3768,8 @@ var IntlifyCore = (function (exports) {
|
|
|
3555
3768
|
}
|
|
3556
3769
|
return ret;
|
|
3557
3770
|
}
|
|
3771
|
+
// values that are not strings, such as arrays and objects, are kept here,
|
|
3772
|
+
// and their text is escaped when they are interpolated (see `resolveProcessor()`)
|
|
3558
3773
|
function escapeParams(options) {
|
|
3559
3774
|
// a call can pass both list and named values, so escape each of them
|
|
3560
3775
|
if (isArray(options.list)) {
|
|
@@ -3571,6 +3786,20 @@ var IntlifyCore = (function (exports) {
|
|
|
3571
3786
|
options.named = named;
|
|
3572
3787
|
}
|
|
3573
3788
|
}
|
|
3789
|
+
// strings have been escaped by `escapeParams()`. other values are turned into text here,
|
|
3790
|
+
// with `JSON.stringify()` for arrays and plain objects and `String()` for the rest, so escape that text
|
|
3791
|
+
function interpolateEscaped(value) {
|
|
3792
|
+
return isString(value) ? value : escapeHtml(toDisplayString(value));
|
|
3793
|
+
}
|
|
3794
|
+
function resolveProcessor(processor, escapeParameter) {
|
|
3795
|
+
// keep a processor that interpolates values by itself, such as the one of `<i18n-t>`, which renders VNodes
|
|
3796
|
+
if (!escapeParameter || isFunction(processor?.interpolate)) {
|
|
3797
|
+
return processor;
|
|
3798
|
+
}
|
|
3799
|
+
return assign({}, processor, {
|
|
3800
|
+
interpolate: interpolateEscaped
|
|
3801
|
+
});
|
|
3802
|
+
}
|
|
3574
3803
|
function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
|
|
3575
3804
|
const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
|
|
3576
3805
|
const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -3810,7 +4039,7 @@ var IntlifyCore = (function (exports) {
|
|
|
3810
4039
|
}
|
|
3811
4040
|
}
|
|
3812
4041
|
}
|
|
3813
|
-
function getMessageContextOptions(context, locale, message, options) {
|
|
4042
|
+
function getMessageContextOptions(context, locale, message, options, escapeParameter) {
|
|
3814
4043
|
const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
|
|
3815
4044
|
const resolveMessage = (key, useLinked) => {
|
|
3816
4045
|
let val = resolveValue(message, key);
|
|
@@ -3844,8 +4073,9 @@ var IntlifyCore = (function (exports) {
|
|
|
3844
4073
|
pluralRules,
|
|
3845
4074
|
messages: resolveMessage
|
|
3846
4075
|
};
|
|
3847
|
-
|
|
3848
|
-
|
|
4076
|
+
const processor = resolveProcessor(context.processor, escapeParameter);
|
|
4077
|
+
if (processor) {
|
|
4078
|
+
ctxOptions.processor = processor;
|
|
3849
4079
|
}
|
|
3850
4080
|
if (options.list) {
|
|
3851
4081
|
ctxOptions.list = options.list;
|
package/dist/core.global.prod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* core v11.4.
|
|
2
|
+
* core v11.4.22
|
|
3
3
|
* (c) 2026 kazuya kawaguchi
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=(e,t,n)=>r({l:e,k:t,s:n}),r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),c=e=>"[object Date]"===C(e),s=e=>"[object RegExp]"===C(e),a=e=>h(e)&&0===Object.keys(e).length,l=Object.assign,i=Object.create,u=(e=null)=>i(e),f=Object.prototype.hasOwnProperty;function E(e,t){return f.call(e,t)}function _(e,t){const n=e[t];return E(e,t)?n:void 0}const m=Array.isArray,d=e=>"function"==typeof e,p=e=>"string"==typeof e,N=e=>"boolean"==typeof e,L=e=>null!==e&&"object"==typeof e,T=e=>L(e)&&d(e.then)&&d(e.catch),A=Object.prototype.toString,C=e=>A.call(e),h=e=>"[object Object]"===C(e);function k(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function I(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function O(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}const g=/^javascript:/i,b=/^(?:href|xlink:href|src|action|formaction)$/i,S=/&#(?:x([0-9a-f]+)|(\d+));?/gi,y=/&(?:Tab|NewLine);/g,D=/:?/gi,P=/[\u0000-\u0020\u007f-\u009f]/g,R=/^on\w/i,x=/^srcdoc$/i,M=/^(?:base|animate|set|script|plaintext)$/i,U=/^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i,v=/<(\/?)([a-z][^\t\n\f\r />]*)/iy,F=/([\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,w=/<!--(?:>|->|[\s\S]*?--!?>)/y;function W(e,t,n){const r=t||n;if(!r)return e;const o=Number.parseInt(r,t?16:10);return o<=127?String.fromCharCode(o):e}function $(e){const t=e.replace(S,W).replace(y,"").replace(D,":").replace(P,"");return g.test(t)}function G(e,t){if(b.test(e)&&$(t))return"about:blank";const n="style"===e.toLowerCase()?function(e){const t=/url\s*\(/gi;let n,r="",o=0;for(;null!==(n=t.exec(e));){const c=n.index,s=t.lastIndex-1;let a=s+1,l=1,i=null;for(;a<e.length;a++){const t=e[a];if(i)t===i&&(i=null);else if('"'===t||"'"===t)i=t;else if("("===t)l++;else if(")"===t&&(l--,0===l))break}if(0!==l)break;const u=e.slice(s+1,a).trim(),f=u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1).trim():u;r+=e.slice(o,c),r+=$(f)?"url(about:blank)":e.slice(c,a+1),o=a+1}return r+e.slice(o)}(t):t;return function(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}(n)}function V(e){return e.replace(/</g,"<")}function K(e,t,n,r){let o=e;if(R.test(e)?(r.eventHandler=!0,o=`on${e.slice(2)}`):x.test(e)&&(r.srcdoc=!0,o=`s${e.slice(1)}`),void 0===t)return o;const c=n||"";return`${o}=${c}${G(e,t)}${c}`}function Y(e,t,n){v.lastIndex=t;const r=v.exec(e);if(!r)return;const[,o,c]=r;let s,a=r[0];for(F.lastIndex=v.lastIndex;s=F.exec(e);){const[r,l,i,u,f,E,_,m]=s;if(i){const n=F.lastIndex;return[o?e.slice(t,n):a+r,c,n]}if(f&&!_)break;if(!o){a+=l+K(u,f?E:m,f,n)}}return[a,c,-1]}function X(e,t,n){for(let r=e.indexOf("</",t);-1!==r;r=e.indexOf("</",r+2)){const t=Y(e,r,{});if(t&&t[1].toLowerCase()===n.toLowerCase())return-1===t[2]?-1:r}return-1}function H(e,t,n){return{start:e,end:t}}const B={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};function j(e,t,n={}){const{domain:r,messages:o,args:c}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function z(e){throw e}B.EXPECTED_TOKEN,B.INVALID_TOKEN_IN_PLACEHOLDER,B.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,B.UNKNOWN_ESCAPE_SEQUENCE,B.INVALID_UNICODE_ESCAPE_SEQUENCE,B.UNBALANCED_CLOSING_BRACE,B.UNTERMINATED_CLOSING_BRACE,B.EMPTY_PLACEHOLDER,B.NOT_ALLOW_NEST_PLACEHOLDER,B.INVALID_LINKED_FORMAT,B.MUST_HAVE_MESSAGES_IN_PLURAL,B.UNEXPECTED_EMPTY_LINKED_MODIFIER,B.UNEXPECTED_EMPTY_LINKED_KEY,B.UNEXPECTED_LEXICAL_ANALYSIS,B.UNHANDLED_CODEGEN_NODE_TYPE,B.UNHANDLED_MINIFIER_NODE_TYPE;const Q=" ",J="\r",Z="\n",q=String.fromCharCode(8232),ee=String.fromCharCode(8233);function te(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>t[e]===J&&t[e+1]===Z,a=e=>t[e]===ee,l=e=>t[e]===q,i=e=>s(e)||(e=>t[e]===Z)(e)||a(e)||l(e),u=e=>s(e)||a(e)||l(e)?Z:t[e];function f(){return c=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+c),next:f,peek:function(){return s(n+c)&&c++,c++,t[n+c]},reset:function(){n=0,r=1,o=1,c=0},resetPeek:function(e=0){c=e},skipToPeek:function(){const e=n+c;for(;e!==n;)f();c=0}}}const ne=void 0,re="\t",oe="'";function ce(e,t={}){const n=!1!==t.location,r=te(e),o=()=>r.index(),c=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=c(),a=o(),l={currentType:13,offset:a,startLoc:s,endLoc:s,lastType:13,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>l,{onError:u}=t;function f(e,t,r){e.endLoc=c(),e.currentType=t;const o={type:t};return n&&(o.loc=H(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const E=e=>f(e,13);function _(e,t){return e.currentChar()===t?(e.next(),t):(B.EXPECTED_TOKEN,c(),"")}function m(e){let t="";for(;e.currentPeek()===Q||e.currentPeek()===Z;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=m(e);return e.skipToPeek(),t}function p(e){if(e===ne)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function N(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=function(e){if(e===ne)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function L(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function T(e,t=!0){const n=(t=!1,r="")=>{const o=e.currentPeek();return"{"===o?t:"@"!==o&&o?"|"===o?!(r===Q||r===Z):o===Q?(e.peek(),n(!0,Q)):o!==Z||(e.peek(),n(!0,Z)):t},r=n();return t&&e.resetPeek(),r}function A(e,t){const n=e.currentChar();return n===ne?ne:t(n)?(e.next(),n):null}function C(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}function h(e){return A(e,C)}function k(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t||45===t}function I(e){return A(e,k)}function O(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function g(e){return A(e,O)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function S(e){return A(e,b)}function y(e){let t="",n="";for(;t=g(e);)n+=t;return n}function D(e){return e!==oe&&e!==Z}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return R(e,t,4);case"U":return R(e,t,6);default:return B.UNKNOWN_ESCAPE_SEQUENCE,c(),""}}function R(e,t,n){_(e,t);let r="";for(let o=0;o<n;o++){const t=S(e);if(!t){B.INVALID_UNICODE_ESCAPE_SEQUENCE,c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function x(e){return"{"!==e&&"}"!==e&&e!==Q&&e!==Z}function M(e){d(e);let t="",n="";for(;t=A(e,x);)n+=t;return n}function U(e){return!("{"===e||"@"===e||"|"===e||"("===e||")"===e||e===Q||e===re||e===Z)}function v(e){d(e);const t=_(e,"|");return d(e),t}function F(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(B.NOT_ALLOW_NEST_PLACEHOLDER,c()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(B.EMPTY_PLACEHOLDER,c()),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(B.UNTERMINATED_CLOSING_BRACE,c()),n=w(e,t)||E(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(L(e))return t.braceNest>0&&(B.UNTERMINATED_CLOSING_BRACE,c()),n=f(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(4===t.currentType||5===t.currentType||6===t.currentType))return B.UNTERMINATED_CLOSING_BRACE,c(),t.braceNest=0,W(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=p(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,4,function(e){d(e);let t="",n="";for(;t=I(e);)n+=t;const r=e.currentChar();if(r&&"}"!==r&&r!==ne&&r!==Q&&r!==Z&&" "!==r){const t=M(e);return B.INVALID_TOKEN_IN_PLACEHOLDER,c(),n+t}return e.currentChar()===ne&&(B.UNTERMINATED_CLOSING_BRACE,c()),n}(e)),d(e),n;if(o=N(e,t))return n=f(t,5,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${y(e)}`):t+=y(e),e.currentChar()===ne&&(B.UNTERMINATED_CLOSING_BRACE,c()),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=e.currentPeek()===oe;return e.resetPeek(),r}(e,t))return n=f(t,6,function(e){d(e),_(e,"'");let t="",n="";for(;t=A(e,D);)n+="\\"===t?P(e):t;const r=e.currentChar();return r===Z||r===ne?(B.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),r===Z&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,12,M(e)),B.INVALID_TOKEN_IN_PLACEHOLDER,c(),n.value,d(e),n;break}}return n}function w(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(7!==n&&8!==n&&11!==n&&9!==n||o!==Z&&o!==Q||(B.INVALID_LINKED_FORMAT,c()),o){case"@":return e.next(),r=f(t,7,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,8,".");case":":return d(e),e.next(),f(t,9,":");default:return L(e)?(r=f(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(7!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(7!==n&&11!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),w(e,t)):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r=p(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,11,function(e){let t="",n="";for(;t=h(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(9!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"|"===t||":"===t||"."===t||t===Q||!t)&&(t===Z?(e.peek(),r()):T(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?F(e,t)||r:f(t,10,function(e){for(;e.currentChar()===re;)e.next();let t,n="";for(;(t=e.currentChar())&&U(t);)n+=t,e.next();return n}(e))):(7===n&&(B.INVALID_LINKED_FORMAT,c()),t.braceNest=0,t.inLinked=!1,W(e,t))}}function W(e,t){let n={type:13};if(t.braceNest>0)return F(e,t)||E(t);if(t.inLinked)return w(e,t)||E(t);switch(e.currentChar()){case"{":return F(e,t)||E(t);case"}":return B.UNBALANCED_CLOSING_BRACE,c(),e.next(),f(t,3,"}");case"@":return w(e,t)||E(t);default:if(L(e))return n=f(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n;if(T(e))return f(t,0,function(e){let t="";for(;;){const n=e.currentChar();if("\\"===n){const r=e.peek();"{"===r||"}"===r||"@"===r||"|"===r||"\\"===r?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else{if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if(n===Q||n===Z)if(T(e))t+=n,e.next();else{if(L(e))break;t+=n,e.next()}else t+=n,e.next()}}return t}(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=l;return l.lastType=e,l.lastOffset=t,l.lastStartLoc=n,l.lastEndLoc=s,l.offset=o(),l.startLoc=c(),r.currentChar()===ne?f(l,13):W(r,l)},currentOffset:o,currentPosition:c,context:i}}const se=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,ae=/\\([\\@{}|])/g;function le(e,t){return t}function ie(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function ue(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function o(e,n,r,o){t&&(e.end=n,e.loc&&(e.loc.end=r))}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t.replace(ae,le),o(c,e.currentOffset(),e.currentPosition()),c}function s(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(5,c,s);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(4,c,s);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(9,c,s);return a.value=t.replace(se,ie),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(8===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(8,c,s);return 11!==t.type?(B.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,a.value="",o(a,c,s),{nextConsumeToken:t,node:a}):(null==t.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,fe(t)),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(9!==c.type&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(c)),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 10:null==c.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(c)),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 4:null==c.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(c)),n.key=a(e,c.value||"");break;case 5:null==c.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(c)),n.key=s(e,c.value||"");break;case 6:null==c.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(c)),n.key=i(e,c.value||"");break;default:{B.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),a=r(7,s.offset,s.startLoc);return a.value="",o(a,s.offset,s.startLoc),n.key=a,o(n,s.offset,s.startLoc),{nextConsumeToken:c,node:n}}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let l=null;do{const r=l||e.nextToken();switch(l=null,r.type){case 0:null==r.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(r)),n.items.push(c(e,r.value||""));break;case 5:null==r.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(r)),n.items.push(s(e,r.value||""));break;case 4:null==r.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(r)),n.items.push(a(e,r.value||""));break;case 6:null==r.value&&(B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,fe(r)),n.items.push(i(e,r.value||""));break;case 7:{const t=u(e);n.items.push(t.node),l=t.nextConsumeToken||null;break}}}while(13!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function E(e){const t=e.context(),{offset:n,startLoc:c}=t,s=f(e);return 13===t.currentType?s:function(e,t,n,c){const s=e.context();let a=0===c.items.length;const l=r(1,t,n);l.cases=[],l.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),l.cases.push(t)}while(13!==s.currentType);return a&&B.MUST_HAVE_MESSAGES_IN_PLURAL,o(l,e.currentOffset(),e.currentPosition()),l}(e,n,c,s)}return{parse:function(n){const c=ce(n,l({},e)),s=c.context(),a=r(0,s.offset,s.startLoc);return t&&a.loc&&(a.loc.source=n),a.body=E(c),e.onCacheKey&&(a.cacheKey=e.onCacheKey(n)),13!==s.currentType&&(B.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),o(a,c.currentOffset(),c.currentPosition()),a}}}function fe(e){if(13===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Ee(e,t){for(let n=0;n<e.length;n++)_e(e[n],t)}function _e(e,t){switch(e.type){case 1:Ee(e.cases,t),t.helper("plural");break;case 2:Ee(e.items,t);break;case 6:_e(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function me(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&_e(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function de(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=k(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function pe(e){switch(e.t=e.type,e.type){case 0:{const t=e;pe(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let e=0;e<n.length;e++)pe(n[e]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let e=0;e<n.length;e++)pe(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;pe(t.key),t.k=t.key,delete t.key,t.modifier&&(pe(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function Ne(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?Ne(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(Ne(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let c=0;c<o&&(Ne(e,t.items[c]),c!==o-1);c++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Ne(e,t.key),t.modifier?(e.push(", "),Ne(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const Le=(e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl";t.sourceMap;const o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",c=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],a=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,c=!1!==t.location,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function a(e,t){s.code+=e}function l(e,t=!0){const n=t?r:"";a(o?n+" ".repeat(e):n)}return c&&e.loc&&(s.source=e.loc.source),{context:()=>s,push:a,indent:function(e=!0){const t=++s.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&l(t)},newline:function(){l(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{filename:r,breakLineCode:o,needIndent:c});a.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(c),s.length>0&&(a.push(`const { ${k(s.map((e=>`${e}: _${e}`)),", ")} } = ctx`),a.newline()),a.push("return "),Ne(a,e),a.deindent(c),a.push("}"),delete e.helpers;const{code:l,map:i}=a.context();return{ast:e,code:l,map:i?i.toJSON():void 0}};function Te(e,t={}){const n=l({},t),r=!!n.jit,o=!!n.minify,c=null==n.optimize||n.optimize,s=ue(n).parse(e);return r?(c&&function(e){const t=e.body;2===t.type?de(t):t.cases.forEach((e=>de(e)))}(s),o&&pe(s),{ast:s,code:""}):(me(s,n),Le(s,n))}function Ae(e){return L(e)&&0===ge(e)&&(E(e,"b")||E(e,"body"))}const Ce=["b","body"];const he=["c","cases"];const ke=["s","static"];const Ie=["i","items"];const Oe=["t","type"];function ge(e){return Pe(e,Oe)}const be=["v","value"];function Se(e,t){const n=Pe(e,be);if(null!=n)return n;throw xe(t)}const ye=["m","modifier"];const De=["k","key"];function Pe(e,t,n){for(let r=0;r<t.length;r++){const n=t[r];if(E(e,n)&&null!=e[n])return e[n]}return n}const Re=[...Ce,...he,...ke,...Ie,...De,...ye,...be,...Oe];function xe(e){return new Error(`unhandled node type: ${e}`)}function Me(e){return t=>function(e,t){const n=(r=t,Pe(r,Ce));var r;if(null==n)throw xe(0);if(1===ge(n)){const t=function(e){return Pe(e,he,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,Ue(e,n)]),[]))}return Ue(e,n)}(t,e)}function Ue(e,t){const n=function(e){return Pe(e,ke)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return Pe(e,Ie,[])}(t).reduce(((t,n)=>[...t,ve(e,n)]),[]);return e.normalize(n)}}function ve(e,t){const n=ge(t);switch(n){case 3:case 9:case 7:case 8:return Se(t,n);case 4:{const r=t;if(E(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(E(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw xe(n)}case 5:{const r=t;if(E(r,"i")&&o(r.i))return e.interpolate(e.list(r.i));if(E(r,"index")&&o(r.index))return e.interpolate(e.list(r.index));throw xe(n)}case 6:{const n=t,r=function(e){return Pe(e,ye)}(n),o=function(e){const t=Pe(e,De);if(t)return t;throw xe(6)}(n);return e.linked(ve(e,o),r?ve(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}const Fe=e=>e;let we=u();function We(e,t){if(p(e)){!N(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Fe)(e),r=we[n];if(r)return r;const{ast:o,detectError:c}=function(e,t={}){let n=!1;const r=t.onError||z;return t.onError=e=>{n=!0,r(e)},{...Te(e,t),detectError:n}}(e,{...t,location:!1,jit:!0}),s=Me(o);return c?s:we[n]=s}{if(!Ae(e))return()=>e;const t=e.cacheKey;if(t){const n=we[t];return n||(we[t]=Me(e))}return Me(e)}}let $e=null;const Ge=Ve("function:translate");function Ve(e){return t=>$e&&$e.emit(e,t)}const Ke={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function Ye(e,t){return null!=t.locale?He(t.locale):He(e.locale)}let Xe;function He(e){if(p(e))return e;if(d(e)){if(e.resolvedOnce&&null!=Xe)return Xe;if("Function"===e.constructor.name){const t=e();if(T(t))throw Error(Ke.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Xe=t}throw Error(Ke.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(Ke.NOT_SUPPORT_LOCALE_TYPE)}function Be(e,t,n){return[...new Set([n,...m(t)?t:L(t)?Object.keys(t).filter((e=>"default"!==e)):p(t)?[t]:[n]])]}function je(e,t,n){const r=p(n)?n:it,o=e;let c;L(t)?(o.__localeChainObjectCache||(o.__localeChainObjectCache=new WeakMap),c=o.__localeChainObjectCache.get(t),c||(c=new Map,o.__localeChainObjectCache.set(t,c))):(o.__localeChainCache||(o.__localeChainCache=new Map),c=o.__localeChainCache.get(t),c||(c=new Map,o.__localeChainCache.set(t,c)));const s=c.get(r);if(s)return s;const a=[];let l=[n];for(;m(l);)l=ze(a,l,t);const i=m(t)||!h(t)?t:t.default?t.default:null;return l=p(i)?[i]:i,m(l)&&ze(a,l,!1),c.set(r,a),a}function ze(e,t,n){let r=!0;for(let o=0;o<t.length&&N(r);o++){const c=t[o];p(c)&&(r=Qe(e,t[o],n))}return r}function Qe(e,t,n){let r;const o=t.split("-");do{r=Je(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Je(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(m(n)||h(n))&&n[o]&&(r=n[o])}return r}Ke.INVALID_ARGUMENT,Ke.INVALID_DATE_ARGUMENT,Ke.INVALID_ISO_DATE_ARGUMENT,Ke.NOT_SUPPORT_NON_STRING_MESSAGE,Ke.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Ke.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Ke.NOT_SUPPORT_LOCALE_TYPE;const Ze=[];Ze[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ze[1]={w:[1],".":[2],"[":[4],o:[7]},Ze[2]={w:[2],i:[3,0],0:[3,0]},Ze[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ze[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ze[5]={"'":[4,0],o:8,l:[5,0]},Ze[6]={'"':[4,0],o:8,l:[6,0]};const qe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function et(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function tt(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,qe.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}function nt(e){const t=[];let n,r,o,c,s,a,l,i=-1,u=0,f=0;const E=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,E[0](),!0}for(E[0]=()=>{void 0===r?r=o:r+=o},E[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},E[2]=()=>{E[0](),f++},E[3]=()=>{if(f>0)f--,u=4,E[0]();else{if(f=0,void 0===r)return!1;if(r=tt(r),!1===r)return!1;E[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(c=et(n),l=Ze[u],s=l[c]||l.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(a=E[s[1]],a&&(o=n,!1===a())))return;if(7===u)return t}}const rt=new Map;function ot(e,t){return L(e)?_(e,t):null}function ct(e,t){if(!L(e))return null;let n=rt.get(t);if(n||(n=nt(t),n&&rt.set(t,n)),!n)return null;const r=n.length;let o=e,c=0;for(;c<r;){const e=n[c];if(Re.includes(e)&&Ae(o))return null;if(!L(o))return null;if(!E(o,e))return null;const t=o[e];if(void 0===t)return null;if(d(o))return null;o=t,c++}return o}const st={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9},at={[st.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale {resource}.",[st.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[st.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[st.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[st.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[st.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[st.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.",[st.INVALID_NUMBER_ARGUMENT]:"Invalid argument for number formatting: expected a number but received '{value}'.",[st.INVALID_DATE_ARGUMENT]:"Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'."};const lt="11.4.20",it="en-US",ut=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let ft,Et,_t;function mt(e){ft=e}function dt(e){Et=e}function pt(e){_t=e}let Nt=null;let Lt=null;let Tt=0;const At=e=>({[e]:u()});function Ct(e,t,n,r,o){const{missing:c,onWarn:s}=e;if(null!==c){const r=c(e,n,t,o);return p(r)?r:t}return t}function ht(e,t){const n=e;L(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function kt(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function It(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(kt(e,t[r]))return!0;return!1}function Ot(e,t,n,r,o,c,s){const{fallbackLocale:a,localeFallbacker:l,onWarn:i}=e,u=l(e,a,n);for(let f=0;f<u.length;f++){const n=u[f],o=_(_(r,n)||{},t);if(h(o)&&p(n))return n;Ct(e,t,n,0,s)}return null}function gt(e,t,n){let r=`${e}__${t}`;return h(n)&&!a(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function bt(e,t,n){for(const r in n){const n=`${t}__${r}`;for(const t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function St(e,t,n,r){const[,o,c,s]=e;let a=n;return p(o)?t.key=o:h(o)&&Object.keys(o).forEach((e=>{r.includes(e)?a[e]=o[e]:t[e]=o[e]})),p(c)?t.locale=c:h(c)&&(a=c),h(s)&&(a=s),a}const yt=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Dt(...e){const[t]=e,n=u(),r=u();let s;if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Ke.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw Error(Ke.INVALID_ISO_DATE_ARGUMENT)}}else if(c(t)){if(isNaN(t.getTime()))throw Error(Ke.INVALID_DATE_ARGUMENT);s=t}else{if(!o(t))throw Error(Ke.INVALID_ARGUMENT);s=t}const a=St(e,n,r,yt);return[n.key||"",s,n,a]}const Pt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Rt(...e){const[t]=e,n=u(),r=u();if(!o(t))throw Error(Ke.INVALID_ARGUMENT);const c=t,s=St(e,n,r,Pt);return[n.key||"",c,n,s]}const xt=e=>e,Mt=e=>"",Ut="text",vt=e=>0===e.length?"":k(e),Ft=e=>null==e?"":m(e)||h(e)&&e.toString===A?JSON.stringify(e,null,2):String(e);function wt(e,t){return e=Math.abs(e),2===t?1===e?0:1:Math.min(e,2)}function Wt(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return o(e.named?.count)?e.named.count:o(e.named?.n)?e.named.n:t}(e),r=p(t)&&e.pluralRules&&d(_(e.pluralRules,t))?e.pluralRules[t]:wt,c=r===wt?void 0:wt,s=e.list||[],a=e.named||u(),i=o(e.pluralIndex),f=t=>{const n=function(e){return E(Object.prototype,e)}(t)?_(a,t):a[t];return!i||n||"count"!==t&&"n"!==t?n:e.pluralIndex};function N(t,n){const r=d(e.messages)?e.messages(t,!!n):!!L(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):Mt)}const T=d(e.processor?.normalize)?e.processor.normalize:vt,A=d(e.processor?.interpolate)?e.processor.interpolate:Ft,C={list:e=>s[e],named:f,plural:e=>e[r(n,e.length,c)],linked:(t,...n)=>{const[r,o]=n;let c="text",s="";1===n.length?L(r)?(s=r.modifier||s,c=r.type||c):p(r)&&(s=r||s):2===n.length&&(p(r)&&(s=r||s),p(o)&&(c=o||c));const a=N(t,!0)(C),l=""===a||void 0===a?t:a,i="vnode"===c&&m(l)&&s?l[0]:l;if(!s)return i;const u=(f=s,e.modifiers?_(e.modifiers,f):xt);var f;return d(u)?u(i,c):i},message:N,type:p(e.processor?.type)?e.processor.type:Ut,interpolate:A,normalize:T,values:l(u(),s,a,i?{count:f("count"),n:f("n")}:{})};return C}const $t=()=>"",Gt=e=>d(e),Vt=e=>p(e)||Ae(e)||Gt(e);function Kt(e,t,n,r,o,c){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:i}=e,f=i(e,r,n);let E,m=u(),d=null;for(let p=0;p<f.length&&(E=f[p],m=_(s,E)||u(),null===(d=l(m,t))&&(d=_(m,t)),!Vt(d));p++)if(!It(E,f)){const n=Ct(e,t,E,0,"translate");n!==t&&(d=n)}return[d,E,m]}function Yt(e,t,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Gt(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>o;return e.locale=r,e.key=t,e}const i=a(o,function(e,t,r,o,c,s){return{locale:t,key:r,warnHtmlMessage:c,onError:e=>{throw s&&s(e),e},onCacheKey:e=>n(t,r,e)}}(0,r,c,0,l,s));return i.locale=r,i.key=t,i.source=o,i}function Xt(...e){const[t,n,r]=e,c=u();if(!(p(t)||o(t)||Gt(t)||Ae(t)))throw Error(Ke.INVALID_ARGUMENT);const s=o(t)?String(t):(Gt(t),t);return o(n)?c.plural=n:p(n)?c.default=n:h(n)&&!a(n)?c.named=n:m(n)&&(c.list=n),o(r)?c.plural=r:p(r)?c.default=r:h(r)&&l(c,r),[s,c]}return mt(We),dt(ct),pt(je),e.AST_NODE_PROPS_KEYS=Re,e.CORE_ERROR_CODES_EXTEND_POINT=24,e.CORE_WARN_CODES_EXTEND_POINT=10,e.CompileErrorCodes=B,e.CoreErrorCodes=Ke,e.CoreWarnCodes=st,e.DATETIME_FORMAT_OPTIONS_KEYS=yt,e.DEFAULT_LOCALE=it,e.DEFAULT_MESSAGE_DATA_TYPE=Ut,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=Pt,e.VERSION=lt,e.clearCompileCache=function(){we=u()},e.clearDateTimeFormat=function(e,t,n){bt(e.__datetimeFormatters,t,n)},e.clearNumberFormat=function(e,t,n){bt(e.__numberFormatters,t,n)},e.compile=We,e.createCompileError=j,e.createCoreContext=function(e={}){const t=d(e.onWarn)?e.onWarn:I,n=p(e.version)?e.version:lt,r=p(e.locale)||d(e.locale)?e.locale:it,o=d(r)?it:r,c=m(e.fallbackLocale)||h(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=h(e.messages)?e.messages:At(o),i=h(e.datetimeFormats)?e.datetimeFormats:At(o),f=h(e.numberFormats)?e.numberFormats:At(o),E=l(u(),e.modifiers,{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&L(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&L(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?ut(e):"vnode"===t&&L(e)&&"__v_isVNode"in e?ut(e.children):e}),_=e.pluralRules||u(),T=d(e.missing)?e.missing:null,A=!N(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,C=!N(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,O=!!e.unresolving,g=d(e.postTranslation)?e.postTranslation:null,b=h(e.processor)?e.processor:null,S=!N(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,D=d(e.messageCompiler)?e.messageCompiler:ft,P=d(e.messageResolver)?e.messageResolver:Et||ot,R=d(e.localeFallbacker)?e.localeFallbacker:_t||Be,x=L(e.fallbackContext)?e.fallbackContext:void 0,M=e,U=L(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,v=L(M.__numberFormatters)?M.__numberFormatters:new Map,F=L(M.__meta)?M.__meta:{};Tt++;const w={version:n,cid:Tt,locale:r,fallbackLocale:c,messages:a,modifiers:E,pluralRules:_,missing:T,missingWarn:A,fallbackWarn:C,fallbackFormat:k,unresolving:O,postTranslation:g,processor:b,warnHtmlMessage:S,escapeParameter:y,messageCompiler:D,messageResolver:P,localeFallbacker:R,fallbackContext:x,onWarn:t,__meta:F};return w.datetimeFormats=i,w.numberFormats=f,w.__datetimeFormatters=U,w.__numberFormatters=v,w},e.createCoreError=function(e){return j(e,null,void 0)},e.createMessageContext=Wt,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:s}=e,{__datetimeFormatters:a}=e;if(!p(t[0])&&!c(t[0])&&!o(t[0]))return"";const[i,u,f,E]=Dt(...t),_=(N(f.missingWarn)?f.missingWarn:e.missingWarn,N(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,!!f.part),m=Ye(e,f);if(!p(i)||""===i){const e=new Intl.DateTimeFormat(m.replace(/!/g,""),E);return _?e.formatToParts(u):e.format(u)}const d=Ot(e,i,m,n,0,0,"datetime format");if(!p(d))return r?-1:i;const L=n[d][i],T=gt(d,i,E);let A=a.get(T);return A||(A=new Intl.DateTimeFormat(d,l({},L,E)),a.set(T,A)),_?A.formatToParts(u):A.format(u)},e.fallbackWithLocaleChain=je,e.fallbackWithSimple=Be,e.getAdditionalMeta=()=>Nt,e.getDevToolsHook=function(){return $e},e.getFallbackContext=()=>Lt,e.getLocale=Ye,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&L(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(at[e],...n)},e.handleMissing=Ct,e.initI18nDevTools=function(e,t,n){$e&&$e.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=kt,e.isImplicitFallback=It,e.isMessageAST=Ae,e.isMessageFormat=Vt,e.isMessageFunction=Gt,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,onWarn:c}=e,{__numberFormatters:s}=e;if(!o(t[0]))return"";const[a,i,u,f]=Rt(...t),E=(N(u.missingWarn)?u.missingWarn:e.missingWarn,N(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,!!u.part),_=Ye(e,u);if(!p(a)||""===a){const e=new Intl.NumberFormat(_.replace(/!/g,""),f);return E?e.formatToParts(i):e.format(i)}const m=Ot(e,a,_,n,0,0,"number format");if(!p(m))return r?-1:a;const d=n[m][a],L=gt(m,a,f);let T=s.get(L);return T||(T=new Intl.NumberFormat(m,l({},d,f)),s.set(L,T)),E?T.formatToParts(i):T.format(i)},e.parse=nt,e.parseDateTimeArgs=Dt,e.parseNumberArgs=Rt,e.parseTranslateArgs=Xt,e.registerLocaleFallbacker=pt,e.registerMessageCompiler=mt,e.registerMessageResolver=dt,e.resolveLocale=He,e.resolveValue=ct,e.resolveWithKeyValue=ot,e.setAdditionalMeta=e=>{Nt=e},e.setDevToolsHook=function(e){$e=e},e.setFallbackContext=e=>{Lt=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:c,messageCompiler:s,fallbackLocale:a,messages:l}=e,[i,f]=Xt(...t),E=N(f.missingWarn)?f.missingWarn:e.missingWarn,T=N(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,A=N(f.escapeParameter)?f.escapeParameter:e.escapeParameter,C=!!f.resolvedMessage,h=p(f.default)||N(f.default)?N(f.default)?s?i:()=>i:f.default:n?s?i:()=>i:null,k=n||null!=h&&(p(h)||d(h)),I=Ye(e,f);A&&function(e){m(e.list)&&(e.list=e.list.map((e=>p(e)?O(e):e)));if(L(e.named)){const t=e.named,n=u();for(const e of Object.keys(t)){const r=t[e];n[e]=p(r)?O(r):r}e.named=n}}(f);let[g,b,S]=C?[i,I,_(l,I)||u()]:Kt(e,i,I,a,T,E),y=g,D=i;if(C||Vt(y)||k&&(y=h,D=y),!(C||Vt(y)&&p(b)))return c?-1:i;let P=!1;const R=Gt(y)?y:Yt(e,i,b,y,D,(()=>{P=!0}));if(P)return y;const x=function(e,t,n,r){const{modifiers:c,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,E=(r,o)=>{let c=a(n,r);if(null==c&&(f||o)){const[n,,o]=Kt(f||e,r,t,l,i,u);c=n??a(o,r)}if(p(c)||Ae(c)){let n=!1;const o=Yt(e,r,t,c,r,(()=>{n=!0}));return n?$t:o}return Gt(c)?c:$t},_={locale:t,modifiers:c,pluralRules:s,messages:E};e.processor&&(_.processor=e.processor);r.list&&(_.list=r.list);r.named&&(_.named=r.named);o(r.plural)&&(_.pluralIndex=r.plural);return _}(e,b,S,f),v=function(e,t,n){const r=t(n);return r}(0,R,Wt(x));let F=r?r(v,i):v;return A&&p(F)&&(F=function(e){const t={};let n,r="",o=0;for(;-1!==(n=e.indexOf("<",o));){r+=e.slice(o,n),o=n+1;const c=Y(e,n,t);if(c){const[s,a,l]=c;if(-1===l){t.unclosed=!0,r+=V(e.slice(n)),o=e.length;break}if(o=l,"/"===s[1])r+=s;else if(M.test(a))t.element=!0,r+=V(s);else if(U.test(a)){const n=X(e,l,a);-1===n?(t.unclosed=!0,r+=V(s)):(r+=s+V(e.slice(l,n)),o=n)}else r+=s}else w.lastIndex=n,w.test(e)?(r+=e.slice(n,w.lastIndex),o=w.lastIndex):(e.startsWith("\x3c!--",n)&&(t.unclosed=!0),r+="<")}return r+=e.slice(o),r}(F)),F},e.translateDevTools=Ge,e.updateFallbackLocale=function(e,t,n){ht(e,n),e.fallbackContext&&ht(e.fallbackContext,n),e.localeFallbacker(e,n,t)},e}({});
|
|
6
|
+
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=(e,t,n)=>r({l:e,k:t,s:n}),r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),a=e=>"[object Date]"===A(e),s=e=>"[object RegExp]"===A(e),c=e=>g(e)&&0===Object.keys(e).length,i=Object.assign,l=Object.create,u=(e=null)=>l(e),f=Object.prototype.hasOwnProperty;function m(e,t){return f.call(e,t)}function E(e,t){const n=e[t];return m(e,t)?n:void 0}const p=Array.isArray,_=e=>"function"==typeof e,d=e=>"string"==typeof e,N=e=>"boolean"==typeof e,h=e=>null!==e&&"object"==typeof e,L=e=>h(e)&&_(e.then)&&_(e.catch),T=Object.prototype.toString,A=e=>T.call(e),g=e=>"[object Object]"===A(e),C=e=>null==e?"":p(e)||g(e)&&e.toString===T?JSON.stringify(e,null,2):String(e);function k(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function b(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function I(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}const O=/^javascript:/i,y=/^(?:href|xlink:href|src|action|formaction)$/i,S=/&#(?:x([0-9a-f]+)|(\d+));?/gi,D=/&(?:Tab|NewLine);/g,P=/:?/gi,x=/[\u0000-\u0020\u007f-\u009f]/g,R=/^on\w/i,v=/^srcdoc$/i,M=/^(?:base|animate|set|script|plaintext)$/i,U=/^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i,w=/<(\/?)([a-z][^\t\n\f\r />]*)/iy,F=/([\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,W=/<!--(?:>|->|[\s\S]*?--!?>)/y;function $(e,t,n){const r=t||n;if(!r)return e;const o=Number.parseInt(r,t?16:10);return o<=127?String.fromCharCode(o):e}function G(e){const t=e.replace(S,$).replace(D,"").replace(P,":").replace(x,"");return O.test(t)}function V(e,t){if(y.test(e)&&G(t))return"about:blank";const n="style"===e.toLowerCase()?function(e){const t=/url\s*\(/gi;let n,r="",o=0;for(;null!==(n=t.exec(e));){const a=n.index,s=t.lastIndex-1;let c=s+1,i=1,l=null;for(;c<e.length;c++){const t=e[c];if(l)t===l&&(l=null);else if('"'===t||"'"===t)l=t;else if("("===t)i++;else if(")"===t&&(i--,0===i))break}if(0!==i)break;const u=e.slice(s+1,c).trim(),f=u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1).trim():u;r+=e.slice(o,a),r+=G(f)?"url(about:blank)":e.slice(a,c+1),o=c+1}return r+e.slice(o)}(t):t;return function(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}(n)}function K(e){return e.replace(/</g,"<")}function Y(e,t,n,r){let o=e;if(R.test(e)?(r.eventHandler=!0,o=`on${e.slice(2)}`):v.test(e)&&(r.srcdoc=!0,o=`s${e.slice(1)}`),void 0===t)return o;const a=n||"";return`${o}=${a}${V(e,t)}${a}`}const X=0,H=1,j=2,B=/^(?:area|base|basefont|bgsound|br|col|embed|frame|hr|image|img|input|keygen|link|meta|param|source|track|wbr|html|head|body|frameset)$/,z=/^(?:b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h[1-6]|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var)$/,Q=/^(?:address|article|aside|blockquote|center|details|dialog|dir|div|dl|fieldset|figcaption|figure|footer|header|hgroup|main|menu|nav|ol|p|search|section|summary|ul|h[1-6]|pre|listing|form|li|dd|dt|plaintext|table|hr|xmp)$/,J=/^(?:applet|caption|html|table|td|th|marquee|object|template|button)$/,q=/^(?:foreignobject|desc|title)$/,Z=/^(?:foreignobject|desc|mi|mo|mn|ms|mtext|annotation-xml)$/,ee=/^(?:mi|mo|mn|ms|mtext)$/,te=/^(?:text\/html|application\/xhtml\+xml)$/i;function ne(e){return e.replace(/[A-Z]+/g,(e=>e.toLowerCase()))}function re(e,t,n){let r="";for(let o=e.length-1;o>=t;o--){const t=e[o];t.namespace===X&&"form"===t.name?n[t.part]=K(n[t.part]):r+=`</${t.name}>`}return e.length=t,r}function oe(e,t){let n=e.length;for(;n>0&&e[n-1].namespace!==X&&!e[n-1].integration;)n--;return re(e,n,t)}function ae(e,t,n,r,o){const a=t.length+1;let s="";const c=e[e.length-1];if(function(e,t){return!!e&&e.namespace!==X&&(!e.integration||ee.test(e.name)&&("mglyph"===t||"malignmark"===t))&&!("annotation-xml"===e.name&&"svg"===t)}(c,n)){if(!function(e,t){return z.test(e)||"font"===e&&(t.has("color")||t.has("face")||t.has("size"))}(n,r))return o||e.push({name:n,namespace:c.namespace,integration:c.namespace===H?q.test(n):ee.test(n)||"annotation-xml"===n&&te.test((r.get("encoding")||"").replace(S,$)),part:a}),s;s=oe(e,t)}if(Q.test(n))for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.namespace===X?J.test(n.name):n.integration)break;if(n.namespace===X&&"p"===n.name){s+=re(e,i,t);break}}if(!Z.test(n))return"svg"===n||"math"===n?o||e.push({name:n,namespace:"svg"===n?H:j,integration:!1,part:a}):B.test(n)||e.push({name:n,namespace:X,integration:!1,part:a}),s}function se(e,t,n){let r="";"p"!==n&&"br"!==n||(r=oe(e,t));let o=e.length-1;for(;o>=0&&e[o].namespace!==X&&e[o].name!==n;)o--;if(o>=0&&e[o].namespace!==X);else for(;o>=0&&(e[o].namespace!==X||e[o].name!==n);)o--;return o<0?"br"===n||"p"===n?r:void 0:(r+=re(e,o+1,t),e.length=o,r)}function ce(e,t,n){w.lastIndex=t;const r=w.exec(e);if(!r)return;const[,o,a]=r;let s=r[0];const c=new Map;let i;for(F.lastIndex=w.lastIndex;i=F.exec(e);){const[r,l,u,f,m,E,p,_]=i;if(u){const n=F.lastIndex;return[o?e.slice(t,n):s+r,a,n,!o&&l.endsWith("/"),c]}if(m&&!p)break;if(!o){const e=m?E:_,t=ne(f);c.has(t)||c.set(t,e||""),s+=l+Y(f,e,m,n)}}return[s,a,-1,!1,c]}function ie(e,t,n){for(let r=e.indexOf("</",t);-1!==r;r=e.indexOf("</",r+2)){const t=ce(e,r,{});if(t&&t[1].toLowerCase()===n.toLowerCase())return-1===t[2]?-1:r}return-1}function le(e,t,n){return{start:e,end:t}}const ue={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};function fe(e,t,n={}){const{domain:r,messages:o,args:a}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function me(e){throw e}ue.EXPECTED_TOKEN,ue.INVALID_TOKEN_IN_PLACEHOLDER,ue.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,ue.UNKNOWN_ESCAPE_SEQUENCE,ue.INVALID_UNICODE_ESCAPE_SEQUENCE,ue.UNBALANCED_CLOSING_BRACE,ue.UNTERMINATED_CLOSING_BRACE,ue.EMPTY_PLACEHOLDER,ue.NOT_ALLOW_NEST_PLACEHOLDER,ue.INVALID_LINKED_FORMAT,ue.MUST_HAVE_MESSAGES_IN_PLURAL,ue.UNEXPECTED_EMPTY_LINKED_MODIFIER,ue.UNEXPECTED_EMPTY_LINKED_KEY,ue.UNEXPECTED_LEXICAL_ANALYSIS,ue.UNHANDLED_CODEGEN_NODE_TYPE,ue.UNHANDLED_MINIFIER_NODE_TYPE;const Ee=" ",pe="\r",_e="\n",de=String.fromCharCode(8232),Ne=String.fromCharCode(8233);function he(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>t[e]===pe&&t[e+1]===_e,c=e=>t[e]===Ne,i=e=>t[e]===de,l=e=>s(e)||(e=>t[e]===_e)(e)||c(e)||i(e),u=e=>s(e)||c(e)||i(e)?_e:t[e];function f(){return a=0,l(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const Le=void 0,Te="\t",Ae="'";function ge(e,t={}){const n=!1!==t.location,r=he(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),c=o(),i={currentType:13,offset:c,startLoc:s,endLoc:s,lastType:13,lastOffset:c,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},l=()=>i,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=le(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,13);function E(e,t){return e.currentChar()===t?(e.next(),t):(ue.EXPECTED_TOKEN,a(),"")}function p(e){let t="";for(;e.currentPeek()===Ee||e.currentPeek()===_e;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=p(e);return e.skipToPeek(),t}function d(e){if(e===Le)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function N(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=function(e){if(e===Le)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function h(e){p(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function L(e,t=!0){const n=(t=!1,r="")=>{const o=e.currentPeek();return"{"===o?t:"@"!==o&&o?"|"===o?!(r===Ee||r===_e):o===Ee?(e.peek(),n(!0,Ee)):o!==_e||(e.peek(),n(!0,_e)):t},r=n();return t&&e.resetPeek(),r}function T(e,t){const n=e.currentChar();return n===Le?Le:t(n)?(e.next(),n):null}function A(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}function g(e){return T(e,A)}function C(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t||45===t}function k(e){return T(e,C)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function I(e){return T(e,b)}function O(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function y(e){return T(e,O)}function S(e){let t="",n="";for(;t=I(e);)n+=t;return n}function D(e){return e!==Ae&&e!==_e}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return x(e,t,4);case"U":return x(e,t,6);default:return ue.UNKNOWN_ESCAPE_SEQUENCE,a(),""}}function x(e,t,n){E(e,t);let r="";for(let o=0;o<n;o++){const t=y(e);if(!t){ue.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function R(e){return"{"!==e&&"}"!==e&&e!==Ee&&e!==_e}function v(e){_(e);let t="",n="";for(;t=T(e,R);)n+=t;return n}function M(e){return!("{"===e||"@"===e||"|"===e||"("===e||")"===e||e===Ee||e===Te||e===_e)}function U(e){_(e);const t=E(e,"|");return _(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(ue.NOT_ALLOW_NEST_PLACEHOLDER,a()),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(ue.EMPTY_PLACEHOLDER,a()),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(ue.UNTERMINATED_CLOSING_BRACE,a()),n=F(e,t)||m(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(h(e))return t.braceNest>0&&(ue.UNTERMINATED_CLOSING_BRACE,a()),n=f(t,1,U(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(4===t.currentType||5===t.currentType||6===t.currentType))return ue.UNTERMINATED_CLOSING_BRACE,a(),t.braceNest=0,W(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,4,function(e){_(e);let t="",n="";for(;t=k(e);)n+=t;const r=e.currentChar();if(r&&"}"!==r&&r!==Le&&r!==Ee&&r!==_e&&" "!==r){const t=v(e);return ue.INVALID_TOKEN_IN_PLACEHOLDER,a(),n+t}return e.currentChar()===Le&&(ue.UNTERMINATED_CLOSING_BRACE,a()),n}(e)),_(e),n;if(o=N(e,t))return n=f(t,5,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${S(e)}`):t+=S(e),e.currentChar()===Le&&(ue.UNTERMINATED_CLOSING_BRACE,a()),t}(e)),_(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=e.currentPeek()===Ae;return e.resetPeek(),r}(e,t))return n=f(t,6,function(e){_(e),E(e,"'");let t="",n="";for(;t=T(e,D);)n+="\\"===t?P(e):t;const r=e.currentChar();return r===_e||r===Le?(ue.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),r===_e&&(e.next(),E(e,"'")),n):(E(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!s)return n=f(t,12,v(e)),ue.INVALID_TOKEN_IN_PLACEHOLDER,a(),n.value,_(e),n;break}}return n}function F(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(7!==n&&8!==n&&11!==n&&9!==n||o!==_e&&o!==Ee||(ue.INVALID_LINKED_FORMAT,a()),o){case"@":return e.next(),r=f(t,7,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,8,".");case":":return _(e),e.next(),f(t,9,":");default:return h(e)?(r=f(t,1,U(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(7!==n)return!1;p(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(7!==n&&11!==n)return!1;p(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),F(e,t)):function(e,t){const{currentType:n}=t;if(8!==n)return!1;p(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,11,function(e){let t="",n="";for(;t=g(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(9!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"|"===t||":"===t||"."===t||t===Ee||!t)&&(t===_e?(e.peek(),r()):L(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?w(e,t)||r:f(t,10,function(e){for(;e.currentChar()===Te;)e.next();let t,n="";for(;(t=e.currentChar())&&M(t);)n+=t,e.next();return n}(e))):(7===n&&(ue.INVALID_LINKED_FORMAT,a()),t.braceNest=0,t.inLinked=!1,W(e,t))}}function W(e,t){let n={type:13};if(t.braceNest>0)return w(e,t)||m(t);if(t.inLinked)return F(e,t)||m(t);switch(e.currentChar()){case"{":return w(e,t)||m(t);case"}":return ue.UNBALANCED_CLOSING_BRACE,a(),e.next(),f(t,3,"}");case"@":return F(e,t)||m(t);default:if(h(e))return n=f(t,1,U(e)),t.braceNest=0,t.inLinked=!1,n;if(L(e))return f(t,0,function(e){let t="";for(;;){const n=e.currentChar();if("\\"===n){const r=e.peek();"{"===r||"}"===r||"@"===r||"|"===r||"\\"===r?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else{if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if(n===Ee||n===_e)if(L(e))t+=n,e.next();else{if(h(e))break;t+=n,e.next()}else t+=n,e.next()}}return t}(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=i;return i.lastType=e,i.lastOffset=t,i.lastStartLoc=n,i.lastEndLoc=s,i.offset=o(),i.startLoc=a(),r.currentChar()===Le?f(i,13):W(r,i)},currentOffset:o,currentPosition:a,context:l}}const Ce=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,ke=/\\([\\@{}|])/g;function be(e,t){return t}function Ie(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function Oe(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function o(e,n,r,o){t&&(e.end=n,e.loc&&(e.loc.end=r))}function a(e,t){const n=e.context(),a=r(3,n.offset,n.startLoc);return a.value=t.replace(ke,be),o(a,e.currentOffset(),e.currentPosition()),a}function s(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,c=r(5,a,s);return c.index=parseInt(t,10),e.nextToken(),o(c,e.currentOffset(),e.currentPosition()),c}function c(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,c=r(4,a,s);return c.key=t,e.nextToken(),o(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,c=r(9,a,s);return c.value=t.replace(Ce,Ie),e.nextToken(),o(c,e.currentOffset(),e.currentPosition()),c}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let a=e.nextToken();if(8===a.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:a,lastStartLoc:s}=n,c=r(8,a,s);return 11!==t.type?(ue.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,c.value="",o(c,a,s),{nextConsumeToken:t,node:c}):(null==t.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,ye(t)),c.value=t.value||"",o(c,e.currentOffset(),e.currentPosition()),{node:c})}(e);n.modifier=t.node,a=t.nextConsumeToken||e.nextToken()}switch(9!==a.type&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(a)),a=e.nextToken(),2===a.type&&(a=e.nextToken()),a.type){case 10:null==a.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(a)),n.key=function(e,t){const n=e.context(),a=r(7,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}(e,a.value||"");break;case 4:null==a.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(a)),n.key=c(e,a.value||"");break;case 5:null==a.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(a)),n.key=s(e,a.value||"");break;case 6:null==a.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(a)),n.key=l(e,a.value||"");break;default:{ue.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),c=r(7,s.offset,s.startLoc);return c.value="",o(c,s.offset,s.startLoc),n.key=c,o(n,s.offset,s.startLoc),{nextConsumeToken:a,node:n}}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let i=null;do{const r=i||e.nextToken();switch(i=null,r.type){case 0:null==r.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(r)),n.items.push(a(e,r.value||""));break;case 5:null==r.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(r)),n.items.push(s(e,r.value||""));break;case 4:null==r.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(r)),n.items.push(c(e,r.value||""));break;case 6:null==r.value&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,ye(r)),n.items.push(l(e,r.value||""));break;case 7:{const t=u(e);n.items.push(t.node),i=t.nextConsumeToken||null;break}}}while(13!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:a}=t,s=f(e);return 13===t.currentType?s:function(e,t,n,a){const s=e.context();let c=0===a.items.length;const i=r(1,t,n);i.cases=[],i.cases.push(a);do{const t=f(e);c||(c=0===t.items.length),i.cases.push(t)}while(13!==s.currentType);return c&&ue.MUST_HAVE_MESSAGES_IN_PLURAL,o(i,e.currentOffset(),e.currentPosition()),i}(e,n,a,s)}return{parse:function(n){const a=ge(n,i({},e)),s=a.context(),c=r(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=m(a),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),13!==s.currentType&&(ue.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),o(c,a.currentOffset(),a.currentPosition()),c}}}function ye(e){if(13===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Se(e,t){for(let n=0;n<e.length;n++)De(e[n],t)}function De(e,t){switch(e.type){case 1:Se(e.cases,t),t.helper("plural");break;case 2:Se(e.items,t);break;case 6:De(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function Pe(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&De(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function xe(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=k(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function Re(e){switch(e.t=e.type,e.type){case 0:{const t=e;Re(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let e=0;e<n.length;e++)Re(n[e]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let e=0;e<n.length;e++)Re(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Re(t.key),t.k=t.key,delete t.key,t.modifier&&(Re(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function ve(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?ve(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(ve(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let a=0;a<o&&(ve(e,t.items[a]),a!==o-1);a++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),ve(e,t.key),t.modifier?(e.push(", "),ve(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const Me=(e,t={})=>{const n=d(t.mode)?t.mode:"normal",r=d(t.filename)?t.filename:"message.intl";t.sourceMap;const o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,a=!1!==t.location,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function i(e,t=!0){const n=t?r:"";c(o?n+" ".repeat(e):n)}return a&&e.loc&&(s.source=e.loc.source),{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&i(t)},newline:function(){i(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{filename:r,breakLineCode:o,needIndent:a});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(a),s.length>0&&(c.push(`const { ${k(s.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),ve(c,e),c.deindent(a),c.push("}"),delete e.helpers;const{code:i,map:l}=c.context();return{ast:e,code:i,map:l?l.toJSON():void 0}};function Ue(e,t={}){const n=i({},t),r=!!n.jit,o=!!n.minify,a=null==n.optimize||n.optimize,s=Oe(n).parse(e);return r?(a&&function(e){const t=e.body;2===t.type?xe(t):t.cases.forEach((e=>xe(e)))}(s),o&&Re(s),{ast:s,code:""}):(Pe(s,n),Me(s,n))}function we(e){return h(e)&&0===Ke(e)&&(m(e,"b")||m(e,"body"))}const Fe=["b","body"];const We=["c","cases"];const $e=["s","static"];const Ge=["i","items"];const Ve=["t","type"];function Ke(e){return Be(e,Ve)}const Ye=["v","value"];function Xe(e,t){const n=Be(e,Ye);if(null!=n)return n;throw Qe(t)}const He=["m","modifier"];const je=["k","key"];function Be(e,t,n){for(let r=0;r<t.length;r++){const n=t[r];if(m(e,n)&&null!=e[n])return e[n]}return n}const ze=[...Fe,...We,...$e,...Ge,...je,...He,...Ye,...Ve];function Qe(e){return new Error(`unhandled node type: ${e}`)}function Je(e){return t=>function(e,t){const n=(r=t,Be(r,Fe));var r;if(null==n)throw Qe(0);if(1===Ke(n)){const t=function(e){return Be(e,We,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,qe(e,n)]),[]))}return qe(e,n)}(t,e)}function qe(e,t){const n=function(e){return Be(e,$e)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return Be(e,Ge,[])}(t).reduce(((t,n)=>[...t,Ze(e,n)]),[]);return e.normalize(n)}}function Ze(e,t){const n=Ke(t);switch(n){case 3:case 9:case 7:case 8:return Xe(t,n);case 4:{const r=t;if(m(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(m(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw Qe(n)}case 5:{const r=t;if(m(r,"i")&&o(r.i))return e.interpolate(e.list(r.i));if(m(r,"index")&&o(r.index))return e.interpolate(e.list(r.index));throw Qe(n)}case 6:{const n=t,r=function(e){return Be(e,He)}(n),o=function(e){const t=Be(e,je);if(t)return t;throw Qe(6)}(n);return e.linked(Ze(e,o),r?Ze(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}const et=e=>e;let tt=u();function nt(e,t){if(d(e)){!N(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||et)(e),r=tt[n];if(r)return r;const{ast:o,detectError:a}=function(e,t={}){let n=!1;const r=t.onError||me;return t.onError=e=>{n=!0,r(e)},{...Ue(e,t),detectError:n}}(e,{...t,location:!1,jit:!0}),s=Je(o);return a?s:tt[n]=s}{if(!we(e))return()=>e;const t=e.cacheKey;if(t){const n=tt[t];return n||(tt[t]=Je(e))}return Je(e)}}let rt=null;const ot=at("function:translate");function at(e){return t=>rt&&rt.emit(e,t)}const st={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function ct(e,t){return null!=t.locale?lt(t.locale):lt(e.locale)}let it;function lt(e){if(d(e))return e;if(_(e)){if(e.resolvedOnce&&null!=it)return it;if("Function"===e.constructor.name){const t=e();if(L(t))throw Error(st.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return it=t}throw Error(st.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(st.NOT_SUPPORT_LOCALE_TYPE)}function ut(e,t,n){return[...new Set([n,...p(t)?t:h(t)?Object.keys(t).filter((e=>"default"!==e)):d(t)?[t]:[n]])]}function ft(e,t,n){const r=d(n)?n:It,o=e;let a;h(t)?(o.__localeChainObjectCache||(o.__localeChainObjectCache=new WeakMap),a=o.__localeChainObjectCache.get(t),a||(a=new Map,o.__localeChainObjectCache.set(t,a))):(o.__localeChainCache||(o.__localeChainCache=new Map),a=o.__localeChainCache.get(t),a||(a=new Map,o.__localeChainCache.set(t,a)));const s=a.get(r);if(s)return s;const c=[];let i=[n];for(;p(i);)i=mt(c,i,t);const l=p(t)||!g(t)?t:t.default?t.default:null;return i=d(l)?[l]:l,p(i)&&mt(c,i,!1),a.set(r,c),c}function mt(e,t,n){let r=!0;for(let o=0;o<t.length&&N(r);o++){const a=t[o];d(a)&&(r=Et(e,t[o],n))}return r}function Et(e,t,n){let r;const o=t.split("-");do{r=pt(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function pt(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(p(n)||g(n))&&n[o]&&(r=n[o])}return r}st.INVALID_ARGUMENT,st.INVALID_DATE_ARGUMENT,st.INVALID_ISO_DATE_ARGUMENT,st.NOT_SUPPORT_NON_STRING_MESSAGE,st.NOT_SUPPORT_LOCALE_PROMISE_VALUE,st.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,st.NOT_SUPPORT_LOCALE_TYPE;const _t=[];_t[0]={w:[0],i:[3,0],"[":[4],o:[7]},_t[1]={w:[1],".":[2],"[":[4],o:[7]},_t[2]={w:[2],i:[3,0],0:[3,0]},_t[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},_t[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},_t[5]={"'":[4,0],o:8,l:[5,0]},_t[6]={'"':[4,0],o:8,l:[6,0]};const dt=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Nt(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function ht(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,dt.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}function Lt(e){const t=[];let n,r,o,a,s,c,i,l=-1,u=0,f=0;const m=[];function E(){const t=e[l+1];if(5===u&&"'"===t||6===u&&'"'===t)return l++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=ht(r),!1===r)return!1;m[1]()}};null!==u;)if(l++,n=e[l],"\\"!==n||!E()){if(a=Nt(n),i=_t[u],s=i[a]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(c=m[s[1]],c&&(o=n,!1===c())))return;if(7===u)return t}}const Tt=new Map;function At(e,t){return h(e)?E(e,t):null}function gt(e,t){if(!h(e))return null;let n=Tt.get(t);if(n||(n=Lt(t),n&&Tt.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=n[a];if(ze.includes(e)&&we(o))return null;if(!h(o))return null;if(!m(o,e))return null;const t=o[e];if(void 0===t)return null;if(_(o))return null;o=t,a++}return o}const Ct={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9},kt={[Ct.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale {resource}.",[Ct.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ct.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ct.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ct.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.",[Ct.INVALID_NUMBER_ARGUMENT]:"Invalid argument for number formatting: expected a number but received '{value}'.",[Ct.INVALID_DATE_ARGUMENT]:"Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'."};const bt="11.4.22",It="en-US",Ot=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let yt,St,Dt;function Pt(e){yt=e}function xt(e){St=e}function Rt(e){Dt=e}let vt=null;let Mt=null;let Ut=0;const wt=e=>({[e]:u()});function Ft(e,t,n,r,o){const{missing:a,onWarn:s}=e;if(null!==a){const r=a(e,n,t,o);return d(r)?r:t}return t}function Wt(e,t){const n=e;h(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function $t(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Gt(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if($t(e,t[r]))return!0;return!1}function Vt(e,t,n,r,o,a,s){const{fallbackLocale:c,localeFallbacker:i,onWarn:l}=e,u=i(e,c,n);for(let f=0;f<u.length;f++){const n=u[f],o=E(E(r,n)||{},t);if(g(o)&&d(n))return n;Ft(e,t,n,0,s)}return null}function Kt(e,t,n){let r=`${e}__${t}`;return g(n)&&!c(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function Yt(e,t,n){for(const r in n){const n=`${t}__${r}`;for(const t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function Xt(e,t,n,r){const[,o,a,s]=e;let c=n;return d(o)?t.key=o:g(o)&&Object.keys(o).forEach((e=>{r.includes(e)?c[e]=o[e]:t[e]=o[e]})),d(a)?t.locale=a:g(a)&&(c=a),g(s)&&(c=s),c}const Ht=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function jt(...e){const[t]=e,n=u(),r=u();let s;if(d(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(st.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw Error(st.INVALID_ISO_DATE_ARGUMENT)}}else if(a(t)){if(isNaN(t.getTime()))throw Error(st.INVALID_DATE_ARGUMENT);s=t}else{if(!o(t))throw Error(st.INVALID_ARGUMENT);s=t}const c=Xt(e,n,r,Ht);return[n.key||"",s,n,c]}const Bt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function zt(...e){const[t]=e,n=u(),r=u();if(!o(t))throw Error(st.INVALID_ARGUMENT);const a=t,s=Xt(e,n,r,Bt);return[n.key||"",a,n,s]}const Qt=e=>e,Jt=e=>"",qt="text",Zt=e=>0===e.length?"":k(e),en=C;function tn(e,t){return e=Math.abs(e),2===t?1===e?0:1:Math.min(e,2)}function nn(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return o(e.named?.count)?e.named.count:o(e.named?.n)?e.named.n:t}(e),r=d(t)&&e.pluralRules&&_(E(e.pluralRules,t))?e.pluralRules[t]:tn,a=r===tn?void 0:tn,s=e.list||[],c=e.named||u(),l=o(e.pluralIndex),f=t=>{const n=function(e){return m(Object.prototype,e)}(t)?E(c,t):c[t];return!l||n||"count"!==t&&"n"!==t?n:e.pluralIndex};function N(t,n){const r=_(e.messages)?e.messages(t,!!n):!!h(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):Jt)}const L=_(e.processor?.normalize)?e.processor.normalize:Zt,T=_(e.processor?.interpolate)?e.processor.interpolate:en,A={list:e=>s[e],named:f,plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,o]=n;let a="text",s="";1===n.length?h(r)?(s=r.modifier||s,a=r.type||a):d(r)&&(s=r||s):2===n.length&&(d(r)&&(s=r||s),d(o)&&(a=o||a));const c=N(t,!0)(A),i=""===c||void 0===c?t:c,l="vnode"===a&&p(i)&&s?i[0]:i;if(!s)return l;const u=(f=s,e.modifiers?E(e.modifiers,f):Qt);var f;return _(u)?u(l,a):l},message:N,type:d(e.processor?.type)?e.processor.type:qt,interpolate:T,normalize:L,values:i(u(),s,c,l?{count:f("count"),n:f("n")}:{})};return A}const rn=()=>"",on=e=>_(e),an=e=>d(e)||we(e)||on(e);function sn(e){return d(e)?e:I(C(e))}function cn(e,t,n,r,o,a){const{messages:s,onWarn:c,messageResolver:i,localeFallbacker:l}=e,f=l(e,r,n);let m,p=u(),_=null;for(let d=0;d<f.length&&(m=f[d],p=E(s,m)||u(),null===(_=i(p,t))&&(_=E(p,t)),!an(_));d++)if(!Gt(m,f)){const n=Ft(e,t,m,0,"translate");n!==t&&(_=n)}return[_,m,p]}function ln(e,t,r,o,a,s){const{messageCompiler:c,warnHtmlMessage:i}=e;if(on(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==c){const e=()=>o;return e.locale=r,e.key=t,e}const l=c(o,function(e,t,r,o,a,s){return{locale:t,key:r,warnHtmlMessage:a,onError:e=>{throw s&&s(e),e},onCacheKey:e=>n(t,r,e)}}(0,r,a,0,i,s));return l.locale=r,l.key=t,l.source=o,l}function un(...e){const[t,n,r]=e,a=u();if(!(d(t)||o(t)||on(t)||we(t)))throw Error(st.INVALID_ARGUMENT);const s=o(t)?String(t):(on(t),t);return o(n)?a.plural=n:d(n)?a.default=n:g(n)&&!c(n)?a.named=n:p(n)&&(a.list=n),o(r)?a.plural=r:d(r)?a.default=r:g(r)&&i(a,r),[s,a]}return Pt(nt),xt(gt),Rt(ft),e.AST_NODE_PROPS_KEYS=ze,e.CORE_ERROR_CODES_EXTEND_POINT=24,e.CORE_WARN_CODES_EXTEND_POINT=10,e.CompileErrorCodes=ue,e.CoreErrorCodes=st,e.CoreWarnCodes=Ct,e.DATETIME_FORMAT_OPTIONS_KEYS=Ht,e.DEFAULT_LOCALE=It,e.DEFAULT_MESSAGE_DATA_TYPE=qt,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=Bt,e.VERSION=bt,e.clearCompileCache=function(){tt=u()},e.clearDateTimeFormat=function(e,t,n){Yt(e.__datetimeFormatters,t,n)},e.clearNumberFormat=function(e,t,n){Yt(e.__numberFormatters,t,n)},e.compile=nt,e.createCompileError=fe,e.createCoreContext=function(e={}){const t=_(e.onWarn)?e.onWarn:b,n=d(e.version)?e.version:bt,r=d(e.locale)||_(e.locale)?e.locale:It,o=_(r)?It:r,a=p(e.fallbackLocale)||g(e.fallbackLocale)||d(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,c=g(e.messages)?e.messages:wt(o),l=g(e.datetimeFormats)?e.datetimeFormats:wt(o),f=g(e.numberFormats)?e.numberFormats:wt(o),m=i(u(),e.modifiers,{upper:(e,t)=>"text"===t&&d(e)?e.toUpperCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&d(e)?e.toLowerCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&d(e)?Ot(e):"vnode"===t&&h(e)&&"__v_isVNode"in e?Ot(e.children):e}),E=e.pluralRules||u(),L=_(e.missing)?e.missing:null,T=!N(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,A=!N(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,C=!!e.fallbackFormat,k=!!e.unresolving,I=_(e.postTranslation)?e.postTranslation:null,O=g(e.processor)?e.processor:null,y=!N(e.warnHtmlMessage)||e.warnHtmlMessage,S=!!e.escapeParameter,D=_(e.messageCompiler)?e.messageCompiler:yt,P=_(e.messageResolver)?e.messageResolver:St||At,x=_(e.localeFallbacker)?e.localeFallbacker:Dt||ut,R=h(e.fallbackContext)?e.fallbackContext:void 0,v=e,M=h(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,U=h(v.__numberFormatters)?v.__numberFormatters:new Map,w=h(v.__meta)?v.__meta:{};Ut++;const F={version:n,cid:Ut,locale:r,fallbackLocale:a,messages:c,modifiers:m,pluralRules:E,missing:L,missingWarn:T,fallbackWarn:A,fallbackFormat:C,unresolving:k,postTranslation:I,processor:O,warnHtmlMessage:y,escapeParameter:S,messageCompiler:D,messageResolver:P,localeFallbacker:x,fallbackContext:R,onWarn:t,__meta:w};return F.datetimeFormats=l,F.numberFormats=f,F.__datetimeFormatters=M,F.__numberFormatters=U,F},e.createCoreError=function(e){return fe(e,null,void 0)},e.createMessageContext=nn,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:s}=e,{__datetimeFormatters:c}=e;if(!d(t[0])&&!a(t[0])&&!o(t[0]))return"";const[l,u,f,m]=jt(...t),E=(N(f.missingWarn)?f.missingWarn:e.missingWarn,N(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,!!f.part),p=ct(e,f);if(!d(l)||""===l){const e=new Intl.DateTimeFormat(p.replace(/!/g,""),m);return E?e.formatToParts(u):e.format(u)}const _=Vt(e,l,p,n,0,0,"datetime format");if(!d(_))return r?-1:l;const h=n[_][l],L=Kt(_,l,m);let T=c.get(L);return T||(T=new Intl.DateTimeFormat(_,i({},h,m)),c.set(L,T)),E?T.formatToParts(u):T.format(u)},e.fallbackWithLocaleChain=ft,e.fallbackWithSimple=ut,e.getAdditionalMeta=()=>vt,e.getDevToolsHook=function(){return rt},e.getFallbackContext=()=>Mt,e.getLocale=ct,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&h(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(kt[e],...n)},e.handleMissing=Ft,e.initI18nDevTools=function(e,t,n){rt&&rt.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=$t,e.isImplicitFallback=Gt,e.isMessageAST=we,e.isMessageFormat=an,e.isMessageFunction=on,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,onWarn:a}=e,{__numberFormatters:s}=e;if(!o(t[0]))return"";const[c,l,u,f]=zt(...t),m=(N(u.missingWarn)?u.missingWarn:e.missingWarn,N(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,!!u.part),E=ct(e,u);if(!d(c)||""===c){const e=new Intl.NumberFormat(E.replace(/!/g,""),f);return m?e.formatToParts(l):e.format(l)}const p=Vt(e,c,E,n,0,0,"number format");if(!d(p))return r?-1:c;const _=n[p][c],h=Kt(p,c,f);let L=s.get(h);return L||(L=new Intl.NumberFormat(p,i({},_,f)),s.set(h,L)),m?L.formatToParts(l):L.format(l)},e.parse=Lt,e.parseDateTimeArgs=jt,e.parseNumberArgs=zt,e.parseTranslateArgs=un,e.registerLocaleFallbacker=Rt,e.registerMessageCompiler=Pt,e.registerMessageResolver=xt,e.resolveLocale=lt,e.resolveValue=gt,e.resolveWithKeyValue=At,e.setAdditionalMeta=e=>{vt=e},e.setDevToolsHook=function(e){rt=e},e.setFallbackContext=e=>{Mt=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:s,fallbackLocale:c,messages:l}=e,[f,m]=un(...t),L=N(m.missingWarn)?m.missingWarn:e.missingWarn,T=N(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,A=N(m.escapeParameter)?m.escapeParameter:e.escapeParameter,g=!!m.resolvedMessage,C=d(m.default)||N(m.default)?N(m.default)?s?f:()=>f:m.default:n?s?f:()=>f:null,k=n||null!=C&&(d(C)||_(C)),b=ct(e,m);A&&function(e){p(e.list)&&(e.list=e.list.map((e=>d(e)?I(e):e)));if(h(e.named)){const t=e.named,n=u();for(const e of Object.keys(t)){const r=t[e];n[e]=d(r)?I(r):r}e.named=n}}(m);let[O,y,S]=g?[f,b,E(l,b)||u()]:cn(e,f,b,c,T,L),D=O,P=f;if(g||an(D)||k&&(D=C,P=D),!(g||an(D)&&d(y)))return a?-1:f;let x=!1;const R=on(D)?D:ln(e,f,y,D,P,(()=>{x=!0}));if(x)return D;const v=function(e,t,n,r,a){const{modifiers:s,pluralRules:c,messageResolver:l,fallbackLocale:u,fallbackWarn:f,missingWarn:m,fallbackContext:E}=e,p=(r,o)=>{let a=l(n,r);if(null==a&&(E||o)){const[n,,o]=cn(E||e,r,t,u,f,m);a=n??l(o,r)}if(d(a)||we(a)){let n=!1;const o=ln(e,r,t,a,r,(()=>{n=!0}));return n?rn:o}return on(a)?a:rn},N={locale:t,modifiers:s,pluralRules:c,messages:p},h=function(e,t){if(!t||_(e?.interpolate))return e;return i({},e,{interpolate:sn})}(e.processor,a);h&&(N.processor=h);r.list&&(N.list=r.list);r.named&&(N.named=r.named);o(r.plural)&&(N.pluralIndex=r.plural);return N}(e,y,S,m,A),w=function(e,t,n){const r=t(n);return r}(0,R,nn(v));let F=r?r(w,f):w;return A&&d(F)&&(F=function(e){const t={},n=[],r=[];let o,a=0;for(;-1!==(o=e.indexOf("<",a));){n.push(e.slice(a,o)),a=o+1;const s=ce(e,o,t);if(s){const[c,i,l,u,f]=s;if(-1===l){t.unclosed=!0,n.push(K(e.slice(o))),a=e.length;break}if(a=l,"/"===c[1]){const e=se(r,n,ne(i));void 0===e?t.closed=!0:(e&&(t.closed=!0),n.push(e+c))}else if(M.test(i))t.element=!0,n.push(K(c));else{let o="";if(U.test(i)){const r=ie(e,l,i);if(-1===r){t.unclosed=!0,n.push(K(c));continue}o=K(e.slice(l,r)),a=r}const s=ae(r,n,ne(i),f,u);void 0===s?(t.closed=!0,n.push(K(c)+o)):n.push(s,c+o)}}else W.lastIndex=o,W.test(e)?(n.push(e.slice(o,W.lastIndex)),a=W.lastIndex):(e.startsWith("\x3c!--",o)&&(t.unclosed=!0),n.push("<"))}n.push(e.slice(a));for(let s=r.length-1;s>=0;s--){const e=r[s];t.closed=!0,e.namespace===X&&"form"===e.name?n[e.part]=K(n[e.part]):n.push(`</${e.name}>`)}return n.join("")}(F)),F},e.translateDevTools=ot,e.updateFallbackLocale=function(e,t,n){Wt(e,n),e.fallbackContext&&Wt(e.fallbackContext,n),e.localeFallbacker(e,n,t)},e}({});
|