@intlify/core 11.4.21 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * core v11.4.21
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, and the index after the tag (-1 when the tag is not closed),
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 [slash ? html.slice(start, end) : tag + raw, tagName, end];
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
- let result = '';
555
+ const parts = [];
556
+ const stack = [];
376
557
  let index = 0;
377
558
  let lessThan;
378
559
  while ((lessThan = html.indexOf('<', index)) !== -1) {
379
- result += html.slice(index, lessThan);
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
- result += escapeLessThan(html.slice(lessThan));
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
- result += tag;
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
- result += escapeLessThan(tag);
587
+ parts.push(escapeLessThan(tag));
398
588
  }
399
- else if (textContentElementPattern.test(tagName)) {
400
- const contentEnd = findTextContentEnd(html, end, tagName);
401
- if (contentEnd === -1) {
402
- // the start tag becomes text, and the content is read as HTML, as browsers do then
403
- neutralized.unclosed = true;
404
- result += escapeLessThan(tag);
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
- result += tag + escapeLessThan(html.slice(end, contentEnd));
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
- result += html.slice(lessThan, commentPattern.lastIndex);
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
- result += '&lt;';
623
+ parts.push('&lt;');
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 result;
660
+ return parts.join('');
448
661
  }
449
662
 
450
663
  const CompileErrorCodes = {
@@ -1234,7 +1447,7 @@ var IntlifyCore = (function (exports) {
1234
1447
  * Intlify core-base version
1235
1448
  * @internal
1236
1449
  */
1237
- const VERSION = '11.4.21';
1450
+ const VERSION = '11.4.22';
1238
1451
  const NOT_REOSLVED = -1;
1239
1452
  const DEFAULT_LOCALE = 'en-US';
1240
1453
  const MISSING_RESOLVE_VALUE = '';
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * core v11.4.21
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),a=e=>"[object Date]"===O(e),l=e=>"[object RegExp]"===O(e),s=e=>C(e)&&0===Object.keys(e).length,i=Object.assign,c=Object.create,u=(e=null)=>c(e),f=Object.prototype.hasOwnProperty;function m(e,t){return f.call(e,t)}function _(e,t){const n=e[t];return m(e,t)?n:void 0}const E=Array.isArray,d=e=>"function"==typeof e,p=e=>"string"==typeof e,g=e=>"boolean"==typeof e,N=e=>null!==e&&"object"==typeof e,T=e=>N(e)&&d(e.then)&&d(e.catch),A=Object.prototype.toString,O=e=>A.call(e),C=e=>"[object Object]"===O(e),b=e=>null==e?"":E(e)||C(e)&&e.toString===A?JSON.stringify(e,null,2):String(e);function I(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function h(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}const L=/^javascript:/i,k=/^(?:href|xlink:href|src|action|formaction)$/i,R=/&#(?:x([0-9a-f]+)|(\d+));?/gi,D=/&(?:Tab|NewLine);/g,S=/&colon;?/gi,M=/[\u0000-\u0020\u007f-\u009f]/g,y=/^on\w/i,F=/^srcdoc$/i,P=/^(?:base|animate|set|script|plaintext)$/i,U=/^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i,w=/<(\/?)([a-z][^\t\n\f\r />]*)/iy,v=/([\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,x=/<!--(?:>|->|[\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 V(e){const t=e.replace(R,W).replace(D,"").replace(S,":").replace(M,"");return L.test(t)}function G(e,t){if(k.test(e)&&V(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,l=t.lastIndex-1;let s=l+1,i=1,c=null;for(;s<e.length;s++){const t=e[s];if(c)t===c&&(c=null);else if('"'===t||"'"===t)c=t;else if("("===t)i++;else if(")"===t&&(i--,0===i))break}if(0!==i)break;const u=e.slice(l+1,s).trim(),f=u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1).trim():u;r+=e.slice(o,a),r+=V(f)?"url(about:blank)":e.slice(a,s+1),o=s+1}return r+e.slice(o)}(t):t;return function(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}(n)}function $(e){return e.replace(/</g,"&lt;")}function j(e,t,n,r){let o=e;if(y.test(e)?(r.eventHandler=!0,o=`&#111;n${e.slice(2)}`):F.test(e)&&(r.srcdoc=!0,o=`&#115;${e.slice(1)}`),void 0===t)return o;const a=n||"";return`${o}=${a}${G(e,t)}${a}`}function K(e,t,n){w.lastIndex=t;const r=w.exec(e);if(!r)return;const[,o,a]=r;let l,s=r[0];for(v.lastIndex=w.lastIndex;l=v.exec(e);){const[r,i,c,u,f,m,_,E]=l;if(c){const n=v.lastIndex;return[o?e.slice(t,n):s+r,a,n]}if(f&&!_)break;if(!o){s+=i+j(u,f?m:E,f,n)}}return[s,a,-1]}function Y(e,t,n){for(let r=e.indexOf("</",t);-1!==r;r=e.indexOf("</",r+2)){const t=K(e,r,{});if(t&&t[1].toLowerCase()===n.toLowerCase())return-1===t[2]?-1:r}return-1}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 H(e,t,n={}){const{domain:r,messages:o,args:a}=n,l=new SyntaxError(String(e));return l.code=e,t&&(l.location=t),l.domain=r,l}function z(e){return N(e)&&0===ee(e)&&(m(e,"b")||m(e,"body"))}const X=["b","body"];const Z=["c","cases"];const J=["s","static"];const Q=["i","items"];const q=["t","type"];function ee(e){return ae(e,q)}const te=["v","value"];function ne(e,t){const n=ae(e,te);if(null!=n)return n;throw se(t)}const re=["m","modifier"];const oe=["k","key"];function ae(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 le=[...X,...Z,...J,...Q,...oe,...re,...te,...q];function se(e){return new Error(`unhandled node type: ${e}`)}function ie(e){return t=>function(e,t){const n=(r=t,ae(r,X));var r;if(null==n)throw se(0);if(1===ee(n)){const t=function(e){return ae(e,Z,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,ce(e,n)]),[]))}return ce(e,n)}(t,e)}function ce(e,t){const n=function(e){return ae(e,J)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return ae(e,Q,[])}(t).reduce(((t,n)=>[...t,ue(e,n)]),[]);return e.normalize(n)}}function ue(e,t){const n=ee(t);switch(n){case 3:case 9:case 7:case 8:return ne(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 se(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 se(n)}case 6:{const n=t,r=function(e){return ae(e,re)}(n),o=function(e){const t=ae(e,oe);if(t)return t;throw se(6)}(n);return e.linked(ue(e,o),r?ue(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}let fe=u();function me(e,t){{if(!z(e))return()=>e;const t=e.cacheKey;if(t){const n=fe[t];return n||(fe[t]=ie(e))}return ie(e)}}let _e=null;const Ee=de("function:translate");function de(e){return t=>_e&&_e.emit(e,t)}const pe={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 ge(e,t){return null!=t.locale?Te(t.locale):Te(e.locale)}let Ne;function Te(e){if(p(e))return e;if(d(e)){if(e.resolvedOnce&&null!=Ne)return Ne;if("Function"===e.constructor.name){const t=e();if(T(t))throw Error(pe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ne=t}throw Error(pe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(pe.NOT_SUPPORT_LOCALE_TYPE)}function Ae(e,t,n){return[...new Set([n,...E(t)?t:N(t)?Object.keys(t).filter((e=>"default"!==e)):p(t)?[t]:[n]])]}function Oe(e,t,n){const r=p(n)?n:we,o=e;let a;N(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 l=a.get(r);if(l)return l;const s=[];let i=[n];for(;E(i);)i=Ce(s,i,t);const c=E(t)||!C(t)?t:t.default?t.default:null;return i=p(c)?[c]:c,E(i)&&Ce(s,i,!1),a.set(r,s),s}function Ce(e,t,n){let r=!0;for(let o=0;o<t.length&&g(r);o++){const a=t[o];p(a)&&(r=be(e,t[o],n))}return r}function be(e,t,n){let r;const o=t.split("-");do{r=Ie(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Ie(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),(E(n)||C(n))&&n[o]&&(r=n[o])}return r}pe.INVALID_ARGUMENT,pe.INVALID_DATE_ARGUMENT,pe.INVALID_ISO_DATE_ARGUMENT,pe.NOT_SUPPORT_NON_STRING_MESSAGE,pe.NOT_SUPPORT_LOCALE_PROMISE_VALUE,pe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,pe.NOT_SUPPORT_LOCALE_TYPE;const he=[];he[0]={w:[0],i:[3,0],"[":[4],o:[7]},he[1]={w:[1],".":[2],"[":[4],o:[7]},he[2]={w:[2],i:[3,0],0:[3,0]},he[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},he[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},he[5]={"'":[4,0],o:8,l:[5,0]},he[6]={'"':[4,0],o:8,l:[6,0]};const Le=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ke(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 Re(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,Le.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 De(e){const t=[];let n,r,o,a,l,s,i,c=-1,u=0,f=0;const m=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,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=Re(r),!1===r)return!1;m[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(a=ke(n),i=he[u],l=i[a]||i.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=m[l[1]],s&&(o=n,!1===s())))return;if(7===u)return t}}const Se=new Map;function Me(e,t){return N(e)?_(e,t):null}function ye(e,t){if(!N(e))return null;let n=Se.get(t);if(n||(n=De(t),n&&Se.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=n[a];if(le.includes(e)&&z(o))return null;if(!N(o))return null;if(!m(o,e))return null;const t=o[e];if(void 0===t)return null;if(d(o))return null;o=t,a++}return o}const Fe={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},Pe={[Fe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale {resource}.",[Fe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Fe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Fe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Fe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Fe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Fe.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.",[Fe.INVALID_NUMBER_ARGUMENT]:"Invalid argument for number formatting: expected a number but received '{value}'.",[Fe.INVALID_DATE_ARGUMENT]:"Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'."};const Ue="11.4.21",we="en-US",ve=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let xe,We,Ve;function Ge(e){xe=e}function $e(e){We=e}function je(e){Ve=e}let Ke=null;let Ye=null;let Be=0;const He=e=>({[e]:u()});function ze(e,t,n,r,o){const{missing:a,onWarn:l}=e;if(null!==a){const r=a(e,n,t,o);return p(r)?r:t}return t}function Xe(e,t){const n=e;N(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function Ze(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Je(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(Ze(e,t[r]))return!0;return!1}function Qe(e,t,n,r,o,a,l){const{fallbackLocale:s,localeFallbacker:i,onWarn:c}=e,u=i(e,s,n);for(let f=0;f<u.length;f++){const n=u[f],o=_(_(r,n)||{},t);if(C(o)&&p(n))return n;ze(e,t,n,0,l)}return null}function qe(e,t,n){let r=`${e}__${t}`;return C(n)&&!s(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function et(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 tt(e,t,n,r){const[,o,a,l]=e;let s=n;return p(o)?t.key=o:C(o)&&Object.keys(o).forEach((e=>{r.includes(e)?s[e]=o[e]:t[e]=o[e]})),p(a)?t.locale=a:C(a)&&(s=a),C(l)&&(s=l),s}const nt=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function rt(...e){const[t]=e,n=u(),r=u();let l;if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(pe.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();l=new Date(n);try{l.toISOString()}catch{throw Error(pe.INVALID_ISO_DATE_ARGUMENT)}}else if(a(t)){if(isNaN(t.getTime()))throw Error(pe.INVALID_DATE_ARGUMENT);l=t}else{if(!o(t))throw Error(pe.INVALID_ARGUMENT);l=t}const s=tt(e,n,r,nt);return[n.key||"",l,n,s]}const ot=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function at(...e){const[t]=e,n=u(),r=u();if(!o(t))throw Error(pe.INVALID_ARGUMENT);const a=t,l=tt(e,n,r,ot);return[n.key||"",a,n,l]}const lt=e=>e,st=e=>"",it="text",ct=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}(e),ut=b;function ft(e,t){return e=Math.abs(e),2===t?1===e?0:1:Math.min(e,2)}function mt(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]:ft,a=r===ft?void 0:ft,l=e.list||[],s=e.named||u(),c=o(e.pluralIndex),f=t=>{const n=function(e){return m(Object.prototype,e)}(t)?_(s,t):s[t];return!c||n||"count"!==t&&"n"!==t?n:e.pluralIndex};function g(t,n){const r=d(e.messages)?e.messages(t,!!n):!!N(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):st)}const T=d(e.processor?.normalize)?e.processor.normalize:ct,A=d(e.processor?.interpolate)?e.processor.interpolate:ut,O={list:e=>l[e],named:f,plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,o]=n;let a="text",l="";1===n.length?N(r)?(l=r.modifier||l,a=r.type||a):p(r)&&(l=r||l):2===n.length&&(p(r)&&(l=r||l),p(o)&&(a=o||a));const s=g(t,!0)(O),i=""===s||void 0===s?t:s,c="vnode"===a&&E(i)&&l?i[0]:i;if(!l)return c;const u=(f=l,e.modifiers?_(e.modifiers,f):lt);var f;return d(u)?u(c,a):c},message:g,type:p(e.processor?.type)?e.processor.type:it,interpolate:A,normalize:T,values:i(u(),l,s,c?{count:f("count"),n:f("n")}:{})};return O}const _t=()=>"",Et=e=>d(e),dt=e=>p(e)||z(e)||Et(e);function pt(e){return p(e)?e:h(b(e))}function gt(e,t,n,r,o,a){const{messages:l,onWarn:s,messageResolver:i,localeFallbacker:c}=e,f=c(e,r,n);let m,E=u(),d=null;for(let p=0;p<f.length&&(m=f[p],E=_(l,m)||u(),null===(d=i(E,t))&&(d=_(E,t)),!dt(d));p++)if(!Je(m,f)){const n=ze(e,t,m,0,"translate");n!==t&&(d=n)}return[d,m,E]}function Nt(e,t,r,o,a,l){const{messageCompiler:s,warnHtmlMessage:i}=e;if(Et(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==s){const e=()=>o;return e.locale=r,e.key=t,e}const c=s(o,function(e,t,r,o,a,l){return{locale:t,key:r,warnHtmlMessage:a,onError:e=>{throw l&&l(e),e},onCacheKey:e=>n(t,r,e)}}(0,r,a,0,i,l));return c.locale=r,c.key=t,c.source=o,c}function Tt(...e){const[t,n,r]=e,a=u();if(!(p(t)||o(t)||Et(t)||z(t)))throw Error(pe.INVALID_ARGUMENT);const l=o(t)?String(t):(Et(t),t);return o(n)?a.plural=n:p(n)?a.default=n:C(n)&&!s(n)?a.named=n:E(n)&&(a.list=n),o(r)?a.plural=r:p(r)?a.default=r:C(r)&&i(a,r),[l,a]}return Ge(me),$e(ye),je(Oe),e.AST_NODE_PROPS_KEYS=le,e.CORE_ERROR_CODES_EXTEND_POINT=24,e.CORE_WARN_CODES_EXTEND_POINT=10,e.CompileErrorCodes=B,e.CoreErrorCodes=pe,e.CoreWarnCodes=Fe,e.DATETIME_FORMAT_OPTIONS_KEYS=nt,e.DEFAULT_LOCALE=we,e.DEFAULT_MESSAGE_DATA_TYPE=it,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=ot,e.VERSION=Ue,e.clearCompileCache=function(){fe=u()},e.clearDateTimeFormat=function(e,t,n){et(e.__datetimeFormatters,t,n)},e.clearNumberFormat=function(e,t,n){et(e.__numberFormatters,t,n)},e.compile=me,e.createCompileError=H,e.createCoreContext=function(e={}){const t=d(e.onWarn)?e.onWarn:I,n=p(e.version)?e.version:Ue,r=p(e.locale)||d(e.locale)?e.locale:we,o=d(r)?we:r,a=E(e.fallbackLocale)||C(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,s=C(e.messages)?e.messages:He(o),c=C(e.datetimeFormats)?e.datetimeFormats:He(o),f=C(e.numberFormats)?e.numberFormats:He(o),m=i(u(),e.modifiers,{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&N(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&N(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?ve(e):"vnode"===t&&N(e)&&"__v_isVNode"in e?ve(e.children):e}),_=e.pluralRules||u(),T=d(e.missing)?e.missing:null,A=!g(e.missingWarn)&&!l(e.missingWarn)||e.missingWarn,O=!g(e.fallbackWarn)&&!l(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,h=!!e.unresolving,L=d(e.postTranslation)?e.postTranslation:null,k=C(e.processor)?e.processor:null,R=!g(e.warnHtmlMessage)||e.warnHtmlMessage,D=!!e.escapeParameter,S=d(e.messageCompiler)?e.messageCompiler:xe,M=d(e.messageResolver)?e.messageResolver:We||Me,y=d(e.localeFallbacker)?e.localeFallbacker:Ve||Ae,F=N(e.fallbackContext)?e.fallbackContext:void 0,P=e,U=N(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,w=N(P.__numberFormatters)?P.__numberFormatters:new Map,v=N(P.__meta)?P.__meta:{};Be++;const x={version:n,cid:Be,locale:r,fallbackLocale:a,messages:s,modifiers:m,pluralRules:_,missing:T,missingWarn:A,fallbackWarn:O,fallbackFormat:b,unresolving:h,postTranslation:L,processor:k,warnHtmlMessage:R,escapeParameter:D,messageCompiler:S,messageResolver:M,localeFallbacker:y,fallbackContext:F,onWarn:t,__meta:v};return x.datetimeFormats=c,x.numberFormats=f,x.__datetimeFormatters=U,x.__numberFormatters=w,x},e.createCoreError=function(e){return H(e,null,void 0)},e.createMessageContext=mt,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:l}=e,{__datetimeFormatters:s}=e;if(!p(t[0])&&!a(t[0])&&!o(t[0]))return"";const[c,u,f,m]=rt(...t),_=(g(f.missingWarn)?f.missingWarn:e.missingWarn,g(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,!!f.part),E=ge(e,f);if(!p(c)||""===c){const e=new Intl.DateTimeFormat(E.replace(/!/g,""),m);return _?e.formatToParts(u):e.format(u)}const d=Qe(e,c,E,n,0,0,"datetime format");if(!p(d))return r?-1:c;const N=n[d][c],T=qe(d,c,m);let A=s.get(T);return A||(A=new Intl.DateTimeFormat(d,i({},N,m)),s.set(T,A)),_?A.formatToParts(u):A.format(u)},e.fallbackWithLocaleChain=Oe,e.fallbackWithSimple=Ae,e.getAdditionalMeta=()=>Ke,e.getDevToolsHook=function(){return _e},e.getFallbackContext=()=>Ye,e.getLocale=ge,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&N(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(Pe[e],...n)},e.handleMissing=ze,e.initI18nDevTools=function(e,t,n){_e&&_e.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=Ze,e.isImplicitFallback=Je,e.isMessageAST=z,e.isMessageFormat=dt,e.isMessageFunction=Et,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:l}=e;if(!o(t[0]))return"";const[s,c,u,f]=at(...t),m=(g(u.missingWarn)?u.missingWarn:e.missingWarn,g(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,!!u.part),_=ge(e,u);if(!p(s)||""===s){const e=new Intl.NumberFormat(_.replace(/!/g,""),f);return m?e.formatToParts(c):e.format(c)}const E=Qe(e,s,_,n,0,0,"number format");if(!p(E))return r?-1:s;const d=n[E][s],N=qe(E,s,f);let T=l.get(N);return T||(T=new Intl.NumberFormat(E,i({},d,f)),l.set(N,T)),m?T.formatToParts(c):T.format(c)},e.parse=De,e.parseDateTimeArgs=rt,e.parseNumberArgs=at,e.parseTranslateArgs=Tt,e.registerLocaleFallbacker=je,e.registerMessageCompiler=Ge,e.registerMessageResolver=$e,e.resolveLocale=Te,e.resolveValue=ye,e.resolveWithKeyValue=Me,e.setAdditionalMeta=e=>{Ke=e},e.setDevToolsHook=function(e){_e=e},e.setFallbackContext=e=>{Ye=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:c}=e,[f,m]=Tt(...t),T=g(m.missingWarn)?m.missingWarn:e.missingWarn,A=g(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,O=g(m.escapeParameter)?m.escapeParameter:e.escapeParameter,C=!!m.resolvedMessage,b=p(m.default)||g(m.default)?g(m.default)?l?f:()=>f:m.default:n?l?f:()=>f:null,I=n||null!=b&&(p(b)||d(b)),L=ge(e,m);O&&function(e){E(e.list)&&(e.list=e.list.map((e=>p(e)?h(e):e)));if(N(e.named)){const t=e.named,n=u();for(const e of Object.keys(t)){const r=t[e];n[e]=p(r)?h(r):r}e.named=n}}(m);let[k,R,D]=C?[f,L,_(c,L)||u()]:gt(e,f,L,s,A,T),S=k,M=f;if(C||dt(S)||I&&(S=b,M=S),!(C||dt(S)&&p(R)))return a?-1:f;let y=!1;const F=Et(S)?S:Nt(e,f,R,S,M,(()=>{y=!0}));if(y)return S;const w=function(e,t,n,r,a){const{modifiers:l,pluralRules:s,messageResolver:c,fallbackLocale:u,fallbackWarn:f,missingWarn:m,fallbackContext:_}=e,E=(r,o)=>{let a=c(n,r);if(null==a&&(_||o)){const[n,,o]=gt(_||e,r,t,u,f,m);a=n??c(o,r)}if(p(a)||z(a)){let n=!1;const o=Nt(e,r,t,a,r,(()=>{n=!0}));return n?_t:o}return Et(a)?a:_t},g={locale:t,modifiers:l,pluralRules:s,messages:E},N=function(e,t){if(!t||d(e?.interpolate))return e;return i({},e,{interpolate:pt})}(e.processor,a);N&&(g.processor=N);r.list&&(g.list=r.list);r.named&&(g.named=r.named);o(r.plural)&&(g.pluralIndex=r.plural);return g}(e,R,D,m,O),v=function(e,t,n){const r=t(n);return r}(0,F,mt(w));let W=r?r(v,f):v;return O&&p(W)&&(W=function(e){const t={};let n,r="",o=0;for(;-1!==(n=e.indexOf("<",o));){r+=e.slice(o,n),o=n+1;const a=K(e,n,t);if(a){const[l,s,i]=a;if(-1===i){t.unclosed=!0,r+=$(e.slice(n)),o=e.length;break}if(o=i,"/"===l[1])r+=l;else if(P.test(s))t.element=!0,r+=$(l);else if(U.test(s)){const n=Y(e,i,s);-1===n?(t.unclosed=!0,r+=$(l)):(r+=l+$(e.slice(i,n)),o=n)}else r+=l}else x.lastIndex=n,x.test(e)?(r+=e.slice(n,x.lastIndex),o=x.lastIndex):(e.startsWith("\x3c!--",n)&&(t.unclosed=!0),r+="&lt;")}return r+=e.slice(o),r}(W)),W},e.translateDevTools=Ee,e.updateFallbackLocale=function(e,t,n){Xe(e,n),e.fallbackContext&&Xe(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"),a=e=>"number"==typeof e&&isFinite(e),o=e=>"[object Date]"===A(e),s=e=>"[object RegExp]"===A(e),l=e=>b(e)&&0===Object.keys(e).length,i=Object.assign,c=Object.create,u=(e=null)=>c(e),f=Object.prototype.hasOwnProperty;function m(e,t){return f.call(e,t)}function _(e,t){const n=e[t];return m(e,t)?n:void 0}const p=Array.isArray,d=e=>"function"==typeof e,g=e=>"string"==typeof e,E=e=>"boolean"==typeof e,h=e=>null!==e&&"object"==typeof e,N=e=>h(e)&&d(e.then)&&d(e.catch),T=Object.prototype.toString,A=e=>T.call(e),b=e=>"[object Object]"===A(e),O=e=>null==e?"":p(e)||b(e)&&e.toString===T?JSON.stringify(e,null,2):String(e);function C(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function I(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}const L=/^javascript:/i,k=/^(?:href|xlink:href|src|action|formaction)$/i,R=/&#(?:x([0-9a-f]+)|(\d+));?/gi,D=/&(?:Tab|NewLine);/g,S=/&colon;?/gi,M=/[\u0000-\u0020\u007f-\u009f]/g,y=/^on\w/i,F=/^srcdoc$/i,v=/^(?:base|animate|set|script|plaintext)$/i,P=/^(?:iframe|noembed|noframes|noscript|style|textarea|title|xmp)$/i,w=/<(\/?)([a-z][^\t\n\f\r />]*)/iy,x=/([\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,U=/<!--(?:>|->|[\s\S]*?--!?>)/y;function W(e,t,n){const r=t||n;if(!r)return e;const a=Number.parseInt(r,t?16:10);return a<=127?String.fromCharCode(a):e}function $(e){const t=e.replace(R,W).replace(D,"").replace(S,":").replace(M,"");return L.test(t)}function V(e,t){if(k.test(e)&&$(t))return"about:blank";const n="style"===e.toLowerCase()?function(e){const t=/url\s*\(/gi;let n,r="",a=0;for(;null!==(n=t.exec(e));){const o=n.index,s=t.lastIndex-1;let l=s+1,i=1,c=null;for(;l<e.length;l++){const t=e[l];if(c)t===c&&(c=null);else if('"'===t||"'"===t)c=t;else if("("===t)i++;else if(")"===t&&(i--,0===i))break}if(0!==i)break;const u=e.slice(s+1,l).trim(),f=u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1).trim():u;r+=e.slice(a,o),r+=$(f)?"url(about:blank)":e.slice(o,l+1),a=l+1}return r+e.slice(a)}(t):t;return function(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}(n)}function G(e){return e.replace(/</g,"&lt;")}function j(e,t,n,r){let a=e;if(y.test(e)?(r.eventHandler=!0,a=`&#111;n${e.slice(2)}`):F.test(e)&&(r.srcdoc=!0,a=`&#115;${e.slice(1)}`),void 0===t)return a;const o=n||"";return`${a}=${o}${V(e,t)}${o}`}const K=0,Y=1,B=2,H=/^(?: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)$/,X=/^(?: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)$/,q=/^(?:applet|caption|html|table|td|th|marquee|object|template|button)$/,Z=/^(?:foreignobject|desc|title)$/,J=/^(?:foreignobject|desc|mi|mo|mn|ms|mtext|annotation-xml)$/,Q=/^(?:mi|mo|mn|ms|mtext)$/,ee=/^(?:text\/html|application\/xhtml\+xml)$/i;function te(e){return e.replace(/[A-Z]+/g,(e=>e.toLowerCase()))}function ne(e,t,n){let r="";for(let a=e.length-1;a>=t;a--){const t=e[a];t.namespace===K&&"form"===t.name?n[t.part]=G(n[t.part]):r+=`</${t.name}>`}return e.length=t,r}function re(e,t){let n=e.length;for(;n>0&&e[n-1].namespace!==K&&!e[n-1].integration;)n--;return ne(e,n,t)}function ae(e,t,n,r,a){const o=t.length+1;let s="";const l=e[e.length-1];if(function(e,t){return!!e&&e.namespace!==K&&(!e.integration||Q.test(e.name)&&("mglyph"===t||"malignmark"===t))&&!("annotation-xml"===e.name&&"svg"===t)}(l,n)){if(!function(e,t){return z.test(e)||"font"===e&&(t.has("color")||t.has("face")||t.has("size"))}(n,r))return a||e.push({name:n,namespace:l.namespace,integration:l.namespace===Y?Z.test(n):Q.test(n)||"annotation-xml"===n&&ee.test((r.get("encoding")||"").replace(R,W)),part:o}),s;s=re(e,t)}if(X.test(n))for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.namespace===K?q.test(n.name):n.integration)break;if(n.namespace===K&&"p"===n.name){s+=ne(e,i,t);break}}if(!J.test(n))return"svg"===n||"math"===n?a||e.push({name:n,namespace:"svg"===n?Y:B,integration:!1,part:o}):H.test(n)||e.push({name:n,namespace:K,integration:!1,part:o}),s}function oe(e,t,n){let r="";"p"!==n&&"br"!==n||(r=re(e,t));let a=e.length-1;for(;a>=0&&e[a].namespace!==K&&e[a].name!==n;)a--;if(a>=0&&e[a].namespace!==K);else for(;a>=0&&(e[a].namespace!==K||e[a].name!==n);)a--;return a<0?"br"===n||"p"===n?r:void 0:(r+=ne(e,a+1,t),e.length=a,r)}function se(e,t,n){w.lastIndex=t;const r=w.exec(e);if(!r)return;const[,a,o]=r;let s=r[0];const l=new Map;let i;for(x.lastIndex=w.lastIndex;i=x.exec(e);){const[r,c,u,f,m,_,p,d]=i;if(u){const n=x.lastIndex;return[a?e.slice(t,n):s+r,o,n,!a&&c.endsWith("/"),l]}if(m&&!p)break;if(!a){const e=m?_:d,t=te(f);l.has(t)||l.set(t,e||""),s+=c+j(f,e,m,n)}}return[s,o,-1,!1,l]}function le(e,t,n){for(let r=e.indexOf("</",t);-1!==r;r=e.indexOf("</",r+2)){const t=se(e,r,{});if(t&&t[1].toLowerCase()===n.toLowerCase())return-1===t[2]?-1:r}return-1}const ie={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 ce(e,t,n={}){const{domain:r,messages:a,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function ue(e){return h(e)&&0===ge(e)&&(m(e,"b")||m(e,"body"))}const fe=["b","body"];const me=["c","cases"];const _e=["s","static"];const pe=["i","items"];const de=["t","type"];function ge(e){return Ae(e,de)}const Ee=["v","value"];function he(e,t){const n=Ae(e,Ee);if(null!=n)return n;throw Oe(t)}const Ne=["m","modifier"];const Te=["k","key"];function Ae(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 be=[...fe,...me,..._e,...pe,...Te,...Ne,...Ee,...de];function Oe(e){return new Error(`unhandled node type: ${e}`)}function Ce(e){return t=>function(e,t){const n=(r=t,Ae(r,fe));var r;if(null==n)throw Oe(0);if(1===ge(n)){const t=function(e){return Ae(e,me,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,Ie(e,n)]),[]))}return Ie(e,n)}(t,e)}function Ie(e,t){const n=function(e){return Ae(e,_e)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return Ae(e,pe,[])}(t).reduce(((t,n)=>[...t,Le(e,n)]),[]);return e.normalize(n)}}function Le(e,t){const n=ge(t);switch(n){case 3:case 9:case 7:case 8:return he(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 Oe(n)}case 5:{const r=t;if(m(r,"i")&&a(r.i))return e.interpolate(e.list(r.i));if(m(r,"index")&&a(r.index))return e.interpolate(e.list(r.index));throw Oe(n)}case 6:{const n=t,r=function(e){return Ae(e,Ne)}(n),a=function(e){const t=Ae(e,Te);if(t)return t;throw Oe(6)}(n);return e.linked(Le(e,a),r?Le(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}let ke=u();function Re(e,t){{if(!ue(e))return()=>e;const t=e.cacheKey;if(t){const n=ke[t];return n||(ke[t]=Ce(e))}return Ce(e)}}let De=null;const Se=Me("function:translate");function Me(e){return t=>De&&De.emit(e,t)}const ye={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 Fe(e,t){return null!=t.locale?Pe(t.locale):Pe(e.locale)}let ve;function Pe(e){if(g(e))return e;if(d(e)){if(e.resolvedOnce&&null!=ve)return ve;if("Function"===e.constructor.name){const t=e();if(N(t))throw Error(ye.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ve=t}throw Error(ye.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(ye.NOT_SUPPORT_LOCALE_TYPE)}function we(e,t,n){return[...new Set([n,...p(t)?t:h(t)?Object.keys(t).filter((e=>"default"!==e)):g(t)?[t]:[n]])]}function xe(e,t,n){const r=g(n)?n:Je,a=e;let o;h(t)?(a.__localeChainObjectCache||(a.__localeChainObjectCache=new WeakMap),o=a.__localeChainObjectCache.get(t),o||(o=new Map,a.__localeChainObjectCache.set(t,o))):(a.__localeChainCache||(a.__localeChainCache=new Map),o=a.__localeChainCache.get(t),o||(o=new Map,a.__localeChainCache.set(t,o)));const s=o.get(r);if(s)return s;const l=[];let i=[n];for(;p(i);)i=Ue(l,i,t);const c=p(t)||!b(t)?t:t.default?t.default:null;return i=g(c)?[c]:c,p(i)&&Ue(l,i,!1),o.set(r,l),l}function Ue(e,t,n){let r=!0;for(let a=0;a<t.length&&E(r);a++){const o=t[a];g(o)&&(r=We(e,t[a],n))}return r}function We(e,t,n){let r;const a=t.split("-");do{r=$e(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function $e(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(p(n)||b(n))&&n[a]&&(r=n[a])}return r}ye.INVALID_ARGUMENT,ye.INVALID_DATE_ARGUMENT,ye.INVALID_ISO_DATE_ARGUMENT,ye.NOT_SUPPORT_NON_STRING_MESSAGE,ye.NOT_SUPPORT_LOCALE_PROMISE_VALUE,ye.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,ye.NOT_SUPPORT_LOCALE_TYPE;const Ve=[];Ve[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ve[1]={w:[1],".":[2],"[":[4],o:[7]},Ve[2]={w:[2],i:[3,0],0:[3,0]},Ve[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ve[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ve[5]={"'":[4,0],o:8,l:[5,0]},Ve[6]={'"':[4,0],o:8,l:[6,0]};const Ge=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function je(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 Ke(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,Ge.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 Ye(e){const t=[];let n,r,a,o,s,l,i,c=-1,u=0,f=0;const m=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,a="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=a:r+=a},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=Ke(r),!1===r)return!1;m[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(o=je(n),i=Ve[u],s=i[o]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=m[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const Be=new Map;function He(e,t){return h(e)?_(e,t):null}function ze(e,t){if(!h(e))return null;let n=Be.get(t);if(n||(n=Ye(t),n&&Be.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=n[o];if(be.includes(e)&&ue(a))return null;if(!h(a))return null;if(!m(a,e))return null;const t=a[e];if(void 0===t)return null;if(d(a))return null;a=t,o++}return a}const Xe={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},qe={[Xe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale {resource}.",[Xe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Xe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Xe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Xe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Xe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Xe.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.",[Xe.INVALID_NUMBER_ARGUMENT]:"Invalid argument for number formatting: expected a number but received '{value}'.",[Xe.INVALID_DATE_ARGUMENT]:"Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'."};const Ze="11.4.22",Je="en-US",Qe=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let et,tt,nt;function rt(e){et=e}function at(e){tt=e}function ot(e){nt=e}let st=null;let lt=null;let it=0;const ct=e=>({[e]:u()});function ut(e,t,n,r,a){const{missing:o,onWarn:s}=e;if(null!==o){const r=o(e,n,t,a);return g(r)?r:t}return t}function ft(e,t){const n=e;h(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function mt(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function _t(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(mt(e,t[r]))return!0;return!1}function pt(e,t,n,r,a,o,s){const{fallbackLocale:l,localeFallbacker:i,onWarn:c}=e,u=i(e,l,n);for(let f=0;f<u.length;f++){const n=u[f],a=_(_(r,n)||{},t);if(b(a)&&g(n))return n;ut(e,t,n,0,s)}return null}function dt(e,t,n){let r=`${e}__${t}`;return b(n)&&!l(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function gt(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 Et(e,t,n,r){const[,a,o,s]=e;let l=n;return g(a)?t.key=a:b(a)&&Object.keys(a).forEach((e=>{r.includes(e)?l[e]=a[e]:t[e]=a[e]})),g(o)?t.locale=o:b(o)&&(l=o),b(s)&&(l=s),l}const ht=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Nt(...e){const[t]=e,n=u(),r=u();let s;if(g(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(ye.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(ye.INVALID_ISO_DATE_ARGUMENT)}}else if(o(t)){if(isNaN(t.getTime()))throw Error(ye.INVALID_DATE_ARGUMENT);s=t}else{if(!a(t))throw Error(ye.INVALID_ARGUMENT);s=t}const l=Et(e,n,r,ht);return[n.key||"",s,n,l]}const Tt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function At(...e){const[t]=e,n=u(),r=u();if(!a(t))throw Error(ye.INVALID_ARGUMENT);const o=t,s=Et(e,n,r,Tt);return[n.key||"",o,n,s]}const bt=e=>e,Ot=e=>"",Ct="text",It=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}(e),Lt=O;function kt(e,t){return e=Math.abs(e),2===t?1===e?0:1:Math.min(e,2)}function Rt(e={}){const t=e.locale,n=function(e){const t=a(e.pluralIndex)?e.pluralIndex:-1;return a(e.named?.count)?e.named.count:a(e.named?.n)?e.named.n:t}(e),r=g(t)&&e.pluralRules&&d(_(e.pluralRules,t))?e.pluralRules[t]:kt,o=r===kt?void 0:kt,s=e.list||[],l=e.named||u(),c=a(e.pluralIndex),f=t=>{const n=function(e){return m(Object.prototype,e)}(t)?_(l,t):l[t];return!c||n||"count"!==t&&"n"!==t?n:e.pluralIndex};function E(t,n){const r=d(e.messages)?e.messages(t,!!n):!!h(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):Ot)}const N=d(e.processor?.normalize)?e.processor.normalize:It,T=d(e.processor?.interpolate)?e.processor.interpolate:Lt,A={list:e=>s[e],named:f,plural:e=>e[r(n,e.length,o)],linked:(t,...n)=>{const[r,a]=n;let o="text",s="";1===n.length?h(r)?(s=r.modifier||s,o=r.type||o):g(r)&&(s=r||s):2===n.length&&(g(r)&&(s=r||s),g(a)&&(o=a||o));const l=E(t,!0)(A),i=""===l||void 0===l?t:l,c="vnode"===o&&p(i)&&s?i[0]:i;if(!s)return c;const u=(f=s,e.modifiers?_(e.modifiers,f):bt);var f;return d(u)?u(c,o):c},message:E,type:g(e.processor?.type)?e.processor.type:Ct,interpolate:T,normalize:N,values:i(u(),s,l,c?{count:f("count"),n:f("n")}:{})};return A}const Dt=()=>"",St=e=>d(e),Mt=e=>g(e)||ue(e)||St(e);function yt(e){return g(e)?e:I(O(e))}function Ft(e,t,n,r,a,o){const{messages:s,onWarn:l,messageResolver:i,localeFallbacker:c}=e,f=c(e,r,n);let m,p=u(),d=null;for(let g=0;g<f.length&&(m=f[g],p=_(s,m)||u(),null===(d=i(p,t))&&(d=_(p,t)),!Mt(d));g++)if(!_t(m,f)){const n=ut(e,t,m,0,"translate");n!==t&&(d=n)}return[d,m,p]}function vt(e,t,r,a,o,s){const{messageCompiler:l,warnHtmlMessage:i}=e;if(St(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==l){const e=()=>a;return e.locale=r,e.key=t,e}const c=l(a,function(e,t,r,a,o,s){return{locale:t,key:r,warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>n(t,r,e)}}(0,r,o,0,i,s));return c.locale=r,c.key=t,c.source=a,c}function Pt(...e){const[t,n,r]=e,o=u();if(!(g(t)||a(t)||St(t)||ue(t)))throw Error(ye.INVALID_ARGUMENT);const s=a(t)?String(t):(St(t),t);return a(n)?o.plural=n:g(n)?o.default=n:b(n)&&!l(n)?o.named=n:p(n)&&(o.list=n),a(r)?o.plural=r:g(r)?o.default=r:b(r)&&i(o,r),[s,o]}return rt(Re),at(ze),ot(xe),e.AST_NODE_PROPS_KEYS=be,e.CORE_ERROR_CODES_EXTEND_POINT=24,e.CORE_WARN_CODES_EXTEND_POINT=10,e.CompileErrorCodes=ie,e.CoreErrorCodes=ye,e.CoreWarnCodes=Xe,e.DATETIME_FORMAT_OPTIONS_KEYS=ht,e.DEFAULT_LOCALE=Je,e.DEFAULT_MESSAGE_DATA_TYPE=Ct,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=Tt,e.VERSION=Ze,e.clearCompileCache=function(){ke=u()},e.clearDateTimeFormat=function(e,t,n){gt(e.__datetimeFormatters,t,n)},e.clearNumberFormat=function(e,t,n){gt(e.__numberFormatters,t,n)},e.compile=Re,e.createCompileError=ce,e.createCoreContext=function(e={}){const t=d(e.onWarn)?e.onWarn:C,n=g(e.version)?e.version:Ze,r=g(e.locale)||d(e.locale)?e.locale:Je,a=d(r)?Je:r,o=p(e.fallbackLocale)||b(e.fallbackLocale)||g(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=b(e.messages)?e.messages:ct(a),c=b(e.datetimeFormats)?e.datetimeFormats:ct(a),f=b(e.numberFormats)?e.numberFormats:ct(a),m=i(u(),e.modifiers,{upper:(e,t)=>"text"===t&&g(e)?e.toUpperCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&g(e)?e.toLowerCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&g(e)?Qe(e):"vnode"===t&&h(e)&&"__v_isVNode"in e?Qe(e.children):e}),_=e.pluralRules||u(),N=d(e.missing)?e.missing:null,T=!E(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,A=!E(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,O=!!e.fallbackFormat,I=!!e.unresolving,L=d(e.postTranslation)?e.postTranslation:null,k=b(e.processor)?e.processor:null,R=!E(e.warnHtmlMessage)||e.warnHtmlMessage,D=!!e.escapeParameter,S=d(e.messageCompiler)?e.messageCompiler:et,M=d(e.messageResolver)?e.messageResolver:tt||He,y=d(e.localeFallbacker)?e.localeFallbacker:nt||we,F=h(e.fallbackContext)?e.fallbackContext:void 0,v=e,P=h(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,w=h(v.__numberFormatters)?v.__numberFormatters:new Map,x=h(v.__meta)?v.__meta:{};it++;const U={version:n,cid:it,locale:r,fallbackLocale:o,messages:l,modifiers:m,pluralRules:_,missing:N,missingWarn:T,fallbackWarn:A,fallbackFormat:O,unresolving:I,postTranslation:L,processor:k,warnHtmlMessage:R,escapeParameter:D,messageCompiler:S,messageResolver:M,localeFallbacker:y,fallbackContext:F,onWarn:t,__meta:x};return U.datetimeFormats=c,U.numberFormats=f,U.__datetimeFormatters=P,U.__numberFormatters=w,U},e.createCoreError=function(e){return ce(e,null,void 0)},e.createMessageContext=Rt,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:s}=e,{__datetimeFormatters:l}=e;if(!g(t[0])&&!o(t[0])&&!a(t[0]))return"";const[c,u,f,m]=Nt(...t),_=(E(f.missingWarn)?f.missingWarn:e.missingWarn,E(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,!!f.part),p=Fe(e,f);if(!g(c)||""===c){const e=new Intl.DateTimeFormat(p.replace(/!/g,""),m);return _?e.formatToParts(u):e.format(u)}const d=pt(e,c,p,n,0,0,"datetime format");if(!g(d))return r?-1:c;const h=n[d][c],N=dt(d,c,m);let T=l.get(N);return T||(T=new Intl.DateTimeFormat(d,i({},h,m)),l.set(N,T)),_?T.formatToParts(u):T.format(u)},e.fallbackWithLocaleChain=xe,e.fallbackWithSimple=we,e.getAdditionalMeta=()=>st,e.getDevToolsHook=function(){return De},e.getFallbackContext=()=>lt,e.getLocale=Fe,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]:""))}(qe[e],...n)},e.handleMissing=ut,e.initI18nDevTools=function(e,t,n){De&&De.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=mt,e.isImplicitFallback=_t,e.isMessageAST=ue,e.isMessageFormat=Mt,e.isMessageFunction=St,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:o}=e,{__numberFormatters:s}=e;if(!a(t[0]))return"";const[l,c,u,f]=At(...t),m=(E(u.missingWarn)?u.missingWarn:e.missingWarn,E(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,!!u.part),_=Fe(e,u);if(!g(l)||""===l){const e=new Intl.NumberFormat(_.replace(/!/g,""),f);return m?e.formatToParts(c):e.format(c)}const p=pt(e,l,_,n,0,0,"number format");if(!g(p))return r?-1:l;const d=n[p][l],h=dt(p,l,f);let N=s.get(h);return N||(N=new Intl.NumberFormat(p,i({},d,f)),s.set(h,N)),m?N.formatToParts(c):N.format(c)},e.parse=Ye,e.parseDateTimeArgs=Nt,e.parseNumberArgs=At,e.parseTranslateArgs=Pt,e.registerLocaleFallbacker=ot,e.registerMessageCompiler=rt,e.registerMessageResolver=at,e.resolveLocale=Pe,e.resolveValue=ze,e.resolveWithKeyValue=He,e.setAdditionalMeta=e=>{st=e},e.setDevToolsHook=function(e){De=e},e.setFallbackContext=e=>{lt=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:s,fallbackLocale:l,messages:c}=e,[f,m]=Pt(...t),N=E(m.missingWarn)?m.missingWarn:e.missingWarn,T=E(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,A=E(m.escapeParameter)?m.escapeParameter:e.escapeParameter,b=!!m.resolvedMessage,O=g(m.default)||E(m.default)?E(m.default)?s?f:()=>f:m.default:n?s?f:()=>f:null,C=n||null!=O&&(g(O)||d(O)),L=Fe(e,m);A&&function(e){p(e.list)&&(e.list=e.list.map((e=>g(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]=g(r)?I(r):r}e.named=n}}(m);let[k,R,D]=b?[f,L,_(c,L)||u()]:Ft(e,f,L,l,T,N),S=k,M=f;if(b||Mt(S)||C&&(S=O,M=S),!(b||Mt(S)&&g(R)))return o?-1:f;let y=!1;const F=St(S)?S:vt(e,f,R,S,M,(()=>{y=!0}));if(y)return S;const w=function(e,t,n,r,o){const{modifiers:s,pluralRules:l,messageResolver:c,fallbackLocale:u,fallbackWarn:f,missingWarn:m,fallbackContext:_}=e,p=(r,a)=>{let o=c(n,r);if(null==o&&(_||a)){const[n,,a]=Ft(_||e,r,t,u,f,m);o=n??c(a,r)}if(g(o)||ue(o)){let n=!1;const a=vt(e,r,t,o,r,(()=>{n=!0}));return n?Dt:a}return St(o)?o:Dt},E={locale:t,modifiers:s,pluralRules:l,messages:p},h=function(e,t){if(!t||d(e?.interpolate))return e;return i({},e,{interpolate:yt})}(e.processor,o);h&&(E.processor=h);r.list&&(E.list=r.list);r.named&&(E.named=r.named);a(r.plural)&&(E.pluralIndex=r.plural);return E}(e,R,D,m,A),x=function(e,t,n){const r=t(n);return r}(0,F,Rt(w));let W=r?r(x,f):x;return A&&g(W)&&(W=function(e){const t={},n=[],r=[];let a,o=0;for(;-1!==(a=e.indexOf("<",o));){n.push(e.slice(o,a)),o=a+1;const s=se(e,a,t);if(s){const[l,i,c,u,f]=s;if(-1===c){t.unclosed=!0,n.push(G(e.slice(a))),o=e.length;break}if(o=c,"/"===l[1]){const e=oe(r,n,te(i));void 0===e?t.closed=!0:(e&&(t.closed=!0),n.push(e+l))}else if(v.test(i))t.element=!0,n.push(G(l));else{let a="";if(P.test(i)){const r=le(e,c,i);if(-1===r){t.unclosed=!0,n.push(G(l));continue}a=G(e.slice(c,r)),o=r}const s=ae(r,n,te(i),f,u);void 0===s?(t.closed=!0,n.push(G(l)+a)):n.push(s,l+a)}}else U.lastIndex=a,U.test(e)?(n.push(e.slice(a,U.lastIndex)),o=U.lastIndex):(e.startsWith("\x3c!--",a)&&(t.unclosed=!0),n.push("&lt;"))}n.push(e.slice(o));for(let s=r.length-1;s>=0;s--){const e=r[s];t.closed=!0,e.namespace===K&&"form"===e.name?n[e.part]=G(n[e.part]):n.push(`</${e.name}>`)}return n.join("")}(W)),W},e.translateDevTools=Se,e.updateFallbackLocale=function(e,t,n){ft(e,n),e.fallbackContext&&ft(e.fallbackContext,n),e.localeFallbacker(e,n,t)},e}({});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * core v11.4.21
2
+ * core v11.4.22
3
3
  * (c) 2026 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * core v11.4.21
2
+ * core v11.4.22
3
3
  * (c) 2026 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/core",
3
- "version": "11.4.21",
3
+ "version": "11.4.22",
4
4
  "description": "@intlify/core",
5
5
  "keywords": [
6
6
  "core",
@@ -33,8 +33,8 @@
33
33
  "jsdelivr": "dist/core.global.js",
34
34
  "types": "dist/core.d.ts",
35
35
  "dependencies": {
36
- "@intlify/core-base": "11.4.21",
37
- "@intlify/shared": "11.4.21"
36
+ "@intlify/core-base": "11.4.22",
37
+ "@intlify/shared": "11.4.22"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">= 22"