@intlify/core
Advanced tools
Comparing version 9.14.1 to 9.14.2
/*! | ||
* core v9.14.1 | ||
* core v9.14.2 | ||
* (c) 2024 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format$1(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}function incrementer(e){let t=e;return()=>++t}function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function createPosition(e,t,r){return{line:e,column:t,offset:r}}function createLocation(e,t,r){const n={start:e,end:t};return null!=r&&(n.source=r),n}const CompileWarnCodes={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};function createCompileWarn(e,t,...r){const n={message:String(e),code:e};return t&&(n.location=t),n}const CompileErrorCodes={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,__EXTEND_POINT__:17};function createCompileError(e,t,r={}){const{domain:n,messages:o,args:s}=r,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=n,a}function defaultOnError(e){throw e}CompileErrorCodes.EXPECTED_TOKEN,CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,CompileErrorCodes.UNBALANCED_CLOSING_BRACE,CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,CompileErrorCodes.EMPTY_PLACEHOLDER,CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,CompileErrorCodes.INVALID_LINKED_FORMAT,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE,CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE;const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let r=0,n=1,o=1,s=0;const a=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,i=e=>t[e]===CHAR_PS,c=e=>t[e]===CHAR_LS,l=e=>a(e)||(e=>t[e]===CHAR_LF)(e)||i(e)||c(e),u=e=>a(e)||i(e)||c(e)?CHAR_LF:t[e];function E(){return s=0,l(r)&&(n++,o=0),a(r)&&r++,r++,o++,t[r]}return{index:()=>r,line:()=>n,column:()=>o,peekOffset:()=>s,charAt:u,currentChar:()=>u(r),currentPeek:()=>u(r+s),next:E,peek:function(){return a(r+s)&&s++,s++,t[r+s]},reset:function(){r=0,n=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=r+s;for(;e!==r;)E();s=0}}}const EOF=void 0,DOT=".",LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const r=!1!==t.location,n=createScanner(e),o=()=>n.index(),s=()=>createPosition(n.line(),n.column(),n.index()),a=s(),i=o(),c={currentType:14,offset:i,startLoc:a,endLoc:a,lastType:14,lastOffset:i,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>c,{onError:u}=t;function E(e,t,n){e.endLoc=s(),e.currentType=t;const o={type:t};return r&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(o.value=n),o}const f=e=>E(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,s(),"")}function C(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=C(e);return e.skipToPeek(),t}function p(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function d(e,t){const{currentType:r}=t;if(2!==r)return!1;C(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function N(e){C(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function g(e,t=!0){const r=(t=!1,n="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==n&&t:"@"!==s&&s?"%"===s?(e.peek(),r(t,"%",!0)):"|"===s?!("%"!==n&&!o)||!(n===CHAR_SP||n===CHAR_LF):s===CHAR_SP?(e.peek(),r(!0,CHAR_SP,o)):s!==CHAR_LF||(e.peek(),r(!0,CHAR_LF,o)):"%"===n||t},n=r();return t&&e.resetPeek(),n}function T(e,t){const r=e.currentChar();return r===EOF?EOF:t(r)?(e.next(),r):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 L(e){return T(e,A)}function O(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 S(e){return T(e,O)}function h(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function b(e){return T(e,h)}function k(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function P(e){return T(e,k)}function I(e){let t="",r="";for(;t=b(e);)r+=t;return r}function M(e){let t="";for(;;){const r=e.currentChar();if("{"===r||"}"===r||"@"===r||"|"===r||!r)break;if("%"===r){if(!g(e))break;t+=r,e.next()}else if(r===CHAR_SP||r===CHAR_LF)if(g(e))t+=r,e.next();else{if(N(e))break;t+=r,e.next()}else t+=r,e.next()}return t}function y(e){return e!==LITERAL_DELIMITER&&e!==CHAR_LF}function D(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 CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,s(),""}}function R(e,t,r){m(e,t);let n="";for(let o=0;o<r;o++){const t=P(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),e.currentChar();break}n+=t}return`\\${t}${n}`}function F(e){return"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF}function v(e){_(e);const t=m(e,"|");return _(e),t}function U(e,t){let r=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,s()),e.next(),r=E(t,2,"{"),_(e),t.braceNest++,r;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,s()),e.next(),r=E(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),r;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=x(e,t)||f(t),t.braceNest=0,r;default:{let n=!0,o=!0,a=!0;if(N(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s(),t.braceNest=0,w(e,t);if(n=function(e,t){const{currentType:r}=t;if(2!==r)return!1;C(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t))return r=E(t,5,function(e){_(e);let t="",r="";for(;t=S(e);)r+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r}(e)),_(e),r;if(o=d(e,t))return r=E(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),t}(e)),_(e),r;if(a=function(e,t){const{currentType:r}=t;if(2!==r)return!1;C(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return r=E(t,7,function(e){_(e),m(e,"'");let t="",r="";for(;t=T(e,y);)r+="\\"===t?D(e):t;const n=e.currentChar();return n===CHAR_LF||n===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),n===CHAR_LF&&(e.next(),m(e,"'")),r):(m(e,"'"),r)}(e)),_(e),r;if(!n&&!o&&!a)return r=E(t,13,function(e){_(e);let t="",r="";for(;t=T(e,F);)r+=t;return r}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,s(),r.value,_(e),r;break}}return r}function x(e,t){const{currentType:r}=t;let n=null;const o=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||o!==CHAR_LF&&o!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),o){case"@":return e.next(),n=E(t,8,"@"),t.inLinked=!0,n;case".":return _(e),e.next(),E(t,9,".");case":":return _(e),e.next(),E(t,10,":");default:return N(e)?(n=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:r}=t;if(8!==r)return!1;C(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:r}=t;if(8!==r&&12!==r)return!1;C(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(_(e),x(e,t)):function(e,t){const{currentType:r}=t;if(9!==r)return!1;C(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t)?(_(e),E(t,12,function(e){let t="",r="";for(;t=L(e);)r+=t;return r}(e))):function(e,t){const{currentType:r}=t;if(10!==r)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):g(e,!1))},o=n();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?U(e,t)||n:E(t,11,function(e){const t=r=>{const n=e.currentChar();return"{"!==n&&"%"!==n&&"@"!==n&&"|"!==n&&"("!==n&&")"!==n&&n?n===CHAR_SP?r:(r+=n,e.next(),t(r)):r};return t("")}(e))):(8===r&&(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let r={type:14};if(t.braceNest>0)return U(e,t)||f(t);if(t.inLinked)return x(e,t)||f(t);switch(e.currentChar()){case"{":return U(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,s(),e.next(),E(t,3,"}");case"@":return x(e,t)||f(t);default:{if(N(e))return r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;const{isModulo:n,hasSpace:o}=function(e){const t=C(e),r="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:r,hasSpace:t.length>0}}(e);if(n)return o?E(t,0,M(e)):E(t,4,function(e){_(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,s()),e.next(),"%"}(e));if(g(e))return E(t,0,M(e));break}}return r}return{nextToken:function(){const{currentType:e,offset:t,startLoc:r,endLoc:a}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=r,c.lastEndLoc=a,c.offset=o(),c.startLoc=s(),n.currentChar()===EOF?E(c,14):w(n,c)},currentOffset:o,currentPosition:s,context:l}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,r){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||r,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:r,onWarn:n}=e;function o(e,r,n){const o={type:e};return t&&(o.start=r,o.end=r,o.loc={start:n,end:n}),o}function s(e,r,n,o){o&&(e.type=o),t&&(e.end=r,e.loc&&(e.loc.end=n))}function a(e,t){const r=e.context(),n=o(3,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}function i(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(5,n,a);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function c(e,t,r){const n=e.context(),{lastOffset:a,lastStartLoc:i}=n,c=o(4,a,i);return c.key=t,!0===r&&(c.modulo=!0),e.nextToken(),s(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(9,n,a);return i.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e){const t=e.context(),r=o(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(8,n,a);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,i.value="",s(i,n,a),{nextConsumeToken:t,node:i}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,getTokenCaption(t)),i.value=t.value||"",s(i,e.currentOffset(),e.currentPosition()),{node:i})}(e);r.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=function(e,t){const r=e.context(),n=o(7,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=c(e,n.value||"");break;case 6:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=i(e,n.value||"");break;case 7:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=l(e,n.value||"");break;default:{CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const a=e.context(),i=o(7,a.offset,a.startLoc);return i.value="",s(i,a.offset,a.startLoc),r.key=i,s(r,a.offset,a.startLoc),{nextConsumeToken:n,node:r}}}return s(r,e.currentOffset(),e.currentPosition()),{node:r}}function E(e){const t=e.context(),r=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);r.items=[];let n=null,E=null;do{const o=n||e.nextToken();switch(n=null,o.type){case 0:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(a(e,o.value||""));break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(i(e,o.value||""));break;case 4:E=!0;break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(c(e,o.value||"",!!E)),E&&(CompileWarnCodes.USE_MODULO_SYNTAX,t.lastStartLoc,getTokenCaption(o),E=null);break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(l(e,o.value||""));break;case 8:{const t=u(e);r.items.push(t.node),n=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return s(r,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),r}function f(e){const t=e.context(),{offset:r,startLoc:n}=t,a=E(e);return 14===t.currentType?a:function(e,t,r,n){const a=e.context();let i=0===n.items.length;const c=o(1,t,r);c.cases=[],c.cases.push(n);do{const t=E(e);i||(i=0===t.items.length),c.cases.push(t)}while(14!==a.currentType);return i&&CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,s(c,e.currentOffset(),e.currentPosition()),c}(e,r,n,a)}return{parse:function(r){const n=createTokenizer(r,assign({},e)),a=n.context(),i=o(0,a.offset,a.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=f(n),e.onCacheKey&&(i.cacheKey=e.onCacheKey(r)),14!==a.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,r[a.offset]),s(i,n.currentOffset(),n.currentPosition()),i}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const r={ast:e,helpers:new Set};return{context:()=>r,helper:e=>(r.helpers.add(e),e)}}function traverseNodes(e,t){for(let r=0;r<e.length;r++)traverseNode(e[r],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(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 transform(e,t={}){const r=createTransformer(e);r.helper("normalize"),e.body&&traverseNode(e.body,r);const n=r.context();e.helpers=Array.from(n.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(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 r=0;r<e.items.length;r++){const n=e.items[r];if(3!==n.type&&9!==n.type)break;if(null==n.value)break;t.push(n.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const r=e.items[t];3!==r.type&&9!==r.type||delete r.value}}}}function minify(e){switch(e.t=e.type,e.type){case 0:{const t=e;minify(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,r=t.cases;for(let e=0;e<r.length;e++)minify(r[e]);t.c=r,delete t.cases;break}case 2:{const t=e,r=t.items;for(let e=0;e<r.length;e++)minify(r[e]);t.i=r,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;minify(t.key),t.k=t.key,delete t.key,t.modifier&&(minify(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 createCodeGenerator(e,t){const{sourceMap:r,filename:n,breakLineCode:o,needIndent:s}=t,a=!1!==t.location,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};a&&e.loc&&(i.source=e.loc.source);function c(e,t){i.code+=e}function l(e,t=!0){const r=t?o:"";c(s?r+" ".repeat(e):r)}return{context:()=>i,push:c,indent:function(e=!0){const t=++i.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--i.indentLevel;e&&l(t)},newline:function(){l(i.indentLevel)},helper:e=>`_${e}`,needIndent:()=>i.needIndent}}function generateLinkedNode(e,t){const{helper:r}=e;e.push(`${r("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:r,needIndent:n}=e;e.push(`${r("normalize")}([`),e.indent(n());const o=t.items.length;for(let s=0;s<o&&(generateNode(e,t.items[s]),s!==o-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function generatePluralNode(e,t){const{helper:r,needIndent:n}=e;if(t.cases.length>1){e.push(`${r("plural")}([`),e.indent(n());const o=t.cases.length;for(let r=0;r<o&&(generateNode(e,t.cases[r]),r!==o-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:r}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${r("interpolate")}(${r("list")}(${t.index}))`,t);break;case 4:e.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const r=isString(t.mode)?t.mode:"normal",n=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==r,i=e.helpers||[],c=createCodeGenerator(e,{mode:r,filename:n,sourceMap:o,breakLineCode:s,needIndent:a});c.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(a),i.length>0&&(c.push(`const { ${join(i.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),generateNode(c,e),c.deindent(a),c.push("}"),delete e.helpers;const{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const r=assign({},t),n=!!r.jit,o=!!r.minify,s=null==r.optimize||r.optimize,a=createParser(r).parse(e);return n?(s&&optimize(a),o&&minify(a),{ast:a,code:""}):(transform(a,r),generate(a,r))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let r,n,o,s,a,i,c,l=-1,u=0,E=0;const f=[];function m(){const t=e[l+1];if(5===u&&"'"===t||6===u&&'"'===t)return l++,o="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=o:n+=o},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),E++},f[3]=()=>{if(E>0)E--,u=4,f[0]();else{if(E=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;f[1]()}};null!==u;)if(l++,r=e[l],"\\"!==r||!m()){if(s=getPathCharType(r),c=pathStateMachine[u],a=c[s]||c.l||8,8===a)return;if(u=a[0],void 0!==a[1]&&(i=f[a[1]],i&&(o=r,!1===i())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let r=cache.get(t);if(r||(r=parse(t),r&&cache.set(t,r)),!r)return null;const n=r.length;let o=e,s=0;for(;s<n;){const e=o[r[s]];if(void 0===e)return null;if(isFunction(o))return null;o=e,s++}return o}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,r=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,o=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,s=e.list||[],a=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(r,a);function i(t){const r=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const c=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,l=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>s[e],named:e=>a[e],plural:e=>e[n(r,e.length,o)],linked:(t,...r)=>{const[n,o]=r;let s="text",a="";1===r.length?isObject(n)?(a=n.modifier||a,s=n.type||s):isString(n)&&(a=n||a):2===r.length&&(isString(n)&&(a=n||a),isString(o)&&(s=o||s));const c=i(t)(u),l="vnode"===s&&isArray(c)&&a?c[0]:c;return a?(E=a,e.modifiers?e.modifiers[E]:DEFAULT_MODIFIER)(l,s):l;var E},message:i,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:l,normalize:c,values:assign({},s,a)};return u}let devtools=null;function setDevToolsHook(e){devtools=e}function getDevToolsHook(){return devtools}function initI18nDevTools(e,t,r){devtools&&devtools.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:r})}const translateDevTools=createDevToolsHook("function:translate");function createDevToolsHook(e){return t=>devtools&&devtools.emit(e,t)}const code$1=CompileWarnCodes.__EXTEND_POINT__,inc$1=incrementer(code$1),CoreWarnCodes={NOT_FOUND_KEY:code$1,FALLBACK_TO_TRANSLATE:inc$1(),CANNOT_FORMAT_NUMBER:inc$1(),FALLBACK_TO_NUMBER_FORMAT:inc$1(),CANNOT_FORMAT_DATE:inc$1(),FALLBACK_TO_DATE_FORMAT:inc$1(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:inc$1(),__EXTEND_POINT__:inc$1()},warnMessages={[CoreWarnCodes.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[CoreWarnCodes.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[CoreWarnCodes.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."};function getWarnMessage(e,...t){return format$1(warnMessages[e],...t)}const code=CompileErrorCodes.__EXTEND_POINT__,inc=incrementer(code),CoreErrorCodes={INVALID_ARGUMENT:code,INVALID_DATE_ARGUMENT:inc(),INVALID_ISO_DATE_ARGUMENT:inc(),NOT_SUPPORT_NON_STRING_MESSAGE:inc(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:inc(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:inc(),NOT_SUPPORT_LOCALE_TYPE:inc(),__EXTEND_POINT__:inc()};function createCoreError(e){return createCompileError(e,null,void 0)}function getLocale(e,t){return null!=t.locale?resolveLocale(t.locale):resolveLocale(e.locale)}let _resolveLocale;function resolveLocale(e){if(isString(e))return e;if(isFunction(e)){if(e.resolvedOnce&&null!=_resolveLocale)return _resolveLocale;if("Function"===e.constructor.name){const t=e();if(isPromise(t))throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=t}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(e,t,r){return[...new Set([r,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[r]])]}function fallbackWithLocaleChain(e,t,r){const n=isString(r)?r:DEFAULT_LOCALE,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(n);if(!s){s=[];let e=[r];for(;isArray(e);)e=appendBlockToChain(s,e,t);const a=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(a)?[a]:a,isArray(e)&&appendBlockToChain(s,e,!1),o.__localeChainCache.set(n,s)}return s}function appendBlockToChain(e,t,r){let n=!0;for(let o=0;o<t.length&&isBoolean(n);o++){const s=t[o];isString(s)&&(n=appendLocaleToChain(e,t[o],r))}return n}function appendLocaleToChain(e,t,r){let n;const o=t.split("-");do{n=appendItemToChain(e,o.join("-"),r),o.splice(-1,1)}while(o.length&&!0===n);return n}function appendItemToChain(e,t,r){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(isArray(r)||isPlainObject(r))&&r[o]&&(n=r[o])}return n}CoreErrorCodes.INVALID_ARGUMENT,CoreErrorCodes.INVALID_DATE_ARGUMENT,CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT,CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE,CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE,CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE;const VERSION="9.14.1",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _additionalMeta=null;const setAdditionalMeta=e=>{_additionalMeta=e},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isFunction(e.onWarn)?e.onWarn:warn,r=isString(e.version)?e.version:VERSION,n=isString(e.locale)||isFunction(e.locale)?e.locale:DEFAULT_LOCALE,o=isFunction(n)?DEFAULT_LOCALE:n,s=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=isPlainObject(e.messages)?e.messages:{[o]:{}},i=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},c=isPlainObject(e.numberFormats)?e.numberFormats:{[o]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),u=e.pluralRules||{},E=isFunction(e.missing)?e.missing:null,f=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,C=!!e.fallbackFormat,_=!!e.unresolving,p=isFunction(e.postTranslation)?e.postTranslation:null,d=isPlainObject(e.processor)?e.processor:null,N=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,g=!!e.escapeParameter,T=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,A=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,L=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,O=isObject(e.fallbackContext)?e.fallbackContext:void 0,S=e,h=isObject(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,b=isObject(S.__numberFormatters)?S.__numberFormatters:new Map,k=isObject(S.__meta)?S.__meta:{};_cid++;const P={version:r,cid:_cid,locale:n,fallbackLocale:s,messages:a,modifiers:l,pluralRules:u,missing:E,missingWarn:f,fallbackWarn:m,fallbackFormat:C,unresolving:_,postTranslation:p,processor:d,warnHtmlMessage:N,escapeParameter:g,messageCompiler:T,messageResolver:A,localeFallbacker:L,fallbackContext:O,onWarn:t,__meta:k};return P.datetimeFormats=i,P.numberFormats=c,P.__datetimeFormatters=h,P.__numberFormatters=b,P}function isTranslateFallbackWarn(e,t){return e instanceof RegExp?e.test(t):e}function isTranslateMissingWarn(e,t){return e instanceof RegExp?e.test(t):e}function handleMissing(e,t,r,n,o){const{missing:s,onWarn:a}=e;if(null!==s){const n=s(e,r,t,o);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,r){e.__localeChainCache=new Map,e.localeFallbacker(e,r,t)}function isAlmostSameLocale(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function isImplicitFallback(e,t){const r=t.indexOf(e);if(-1===r)return!1;for(let n=r+1;n<t.length;n++)if(isAlmostSameLocale(e,t[n]))return!0;return!1}function format(e){return t=>formatParts(t,e)}function formatParts(e,t){const r=t.b||t.body;if(1===(r.t||r.type)){const t=r,n=t.c||t.cases;return e.plural(n.reduce(((t,r)=>[...t,formatMessageParts(e,r)]),[]))}return formatMessageParts(e,r)}function formatMessageParts(e,t){const r=t.s||t.static;if(r)return"text"===e.type?r:e.normalize([r]);{const r=(t.i||t.items).reduce(((t,r)=>[...t,formatMessagePart(e,r)]),[]);return e.normalize(r)}}function formatMessagePart(e,t){const r=t.t||t.type;switch(r){case 3:{const e=t;return e.v||e.value}case 9:{const e=t;return e.v||e.value}case 4:{const r=t;return e.interpolate(e.named(r.k||r.key))}case 5:{const r=t;return e.interpolate(e.list(null!=r.i?r.i:r.index))}case 6:{const r=t,n=r.m||r.modifier;return e.linked(formatMessagePart(e,r.k||r.key),n?formatMessagePart(e,n):void 0,e.type)}case 7:{const e=t;return e.v||e.value}case 8:{const e=t;return e.v||e.value}default:throw new Error(`unhandled node type on format message part: ${r}`)}}const defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function clearCompileCache(){compileCache=Object.create(null)}const isMessageAST=e=>isObject(e)&&(0===e.t||0===e.type)&&("b"in e||"body"in e);function baseCompile(e,t={}){let r=!1;const n=t.onError||defaultOnError;return t.onError=e=>{r=!0,n(e)},{...baseCompile$1(e,t),detectError:r}}const compileToFunction=(e,t)=>{if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);{!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{code:o,detectError:s}=baseCompile(e,t),a=new Function(`return ${o}`)();return s?a:compileCache[r]=a}};function compile(e,t){if(isString(e)){!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{ast:o,detectError:s}=baseCompile(e,{...t,location:!1,jit:!0}),a=format(o);return s?a:compileCache[r]=a}{const t=e.cacheKey;if(t){const r=compileCache[t];return r||(compileCache[t]=format(e))}return format(e)}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:r,postTranslation:n,unresolving:o,messageCompiler:s,fallbackLocale:a,messages:i}=e,[c,l]=parseTranslateArgs(...t),u=isBoolean(l.missingWarn)?l.missingWarn:e.missingWarn,E=isBoolean(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=isBoolean(l.escapeParameter)?l.escapeParameter:e.escapeParameter,m=!!l.resolvedMessage,C=isString(l.default)||isBoolean(l.default)?isBoolean(l.default)?s?c:()=>c:l.default:r?s?c:()=>c:"",_=r||""!==C,p=getLocale(e,l);f&&escapeParams(l);let[d,N,g]=m?[c,p,i[p]||{}]:resolveMessageFormat(e,c,p,a,E,u),T=d,A=c;if(m||isString(T)||isMessageAST(T)||isMessageFunction(T)||_&&(T=C,A=T),!(m||(isString(T)||isMessageAST(T)||isMessageFunction(T))&&isString(N)))return o?-1:c;let L=!1;const O=isMessageFunction(T)?T:compileMessageFormat(e,c,N,T,A,(()=>{L=!0}));if(L)return T;const S=evaluateMessage(e,O,createMessageContext(getMessageContextOptions(e,N,g,l)));return n?n(S,c):S}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,r,n,o,s){const{messages:a,onWarn:i,messageResolver:c,localeFallbacker:l}=e,u=l(e,n,r);let E,f={},m=null;for(let C=0;C<u.length&&(E=u[C],f=a[E]||{},null===(m=c(f,t))&&(m=f[t]),!(isString(m)||isMessageAST(m)||isMessageFunction(m)));C++)if(!isImplicitFallback(E,u)){const r=handleMissing(e,t,E,s,"translate");r!==t&&(m=r)}return[m,E,f]}function compileMessageFormat(e,t,r,n,o,s){const{messageCompiler:a,warnHtmlMessage:i}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>n;return e.locale=r,e.key=t,e}const c=a(n,getCompileContext(e,r,o,n,i,s));return c.locale=r,c.key=t,c.source=n,c}function evaluateMessage(e,t,r){return t(r)}function parseTranslateArgs(...e){const[t,r,n]=e,o={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(r)?o.plural=r:isString(r)?o.default=r:isPlainObject(r)&&!isEmptyObject(r)?o.named=r:isArray(r)&&(o.list=r),isNumber(n)?o.plural=n:isString(n)?o.default=n:isPlainObject(n)&&assign(o,n),[s,o]}function getCompileContext(e,t,r,n,o,s){return{locale:t,key:r,warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>generateFormatCacheKey(t,r,e)}}function getMessageContextOptions(e,t,r,n){const{modifiers:o,pluralRules:s,messageResolver:a,fallbackLocale:i,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,E={locale:t,modifiers:o,pluralRules:s,messages:n=>{let o=a(r,n);if(null==o&&u){const[,,e]=resolveMessageFormat(u,n,t,i,c,l);o=a(e,n)}if(isString(o)||isMessageAST(o)){let r=!1;const s=compileMessageFormat(e,n,t,o,n,(()=>{r=!0}));return r?NOOP_MESSAGE_FUNCTION:s}return isMessageFunction(o)?o:NOOP_MESSAGE_FUNCTION}};return e.processor&&(E.processor=e.processor),n.list&&(E.list=n.list),n.named&&(E.named=n.named),isNumber(n.plural)&&(E.pluralIndex=n.plural),E}function datetime(e,...t){const{datetimeFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:i}=e,[c,l,u,E]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,C=getLocale(e,u),_=a(e,o,C);if(!isString(c)||""===c)return new Intl.DateTimeFormat(C,E).format(l);let p,d={},N=null;for(let A=0;A<_.length&&(p=_[A],d=r[p]||{},N=d[c],!isPlainObject(N));A++)handleMissing(e,c,p,f,"datetime format");if(!isPlainObject(N)||!isString(p))return n?-1:c;let g=`${p}__${c}`;isEmptyObject(E)||(g=`${g}__${JSON.stringify(E)}`);let T=i.get(g);return T||(T=new Intl.DateTimeFormat(p,assign({},N,E)),i.set(g,T)),m?T.formatToParts(l):T.format(l)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,r,n,o]=e,s={};let a,i={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const r=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(r);try{a.toISOString()}catch(c){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);a=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);a=t}return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?i[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(i=n),isPlainObject(o)&&(i=o),[s.key||"",a,s,i]}function clearDateTimeFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:i}=e,[c,l,u,E]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,C=getLocale(e,u),_=a(e,o,C);if(!isString(c)||""===c)return new Intl.NumberFormat(C,E).format(l);let p,d={},N=null;for(let A=0;A<_.length&&(p=_[A],d=r[p]||{},N=d[c],!isPlainObject(N));A++)handleMissing(e,c,p,f,"number format");if(!isPlainObject(N)||!isString(p))return n?-1:c;let g=`${p}__${c}`;isEmptyObject(E)||(g=`${g}__${JSON.stringify(E)}`);let T=i.get(g);return T||(T=new Intl.NumberFormat(p,assign({},N,E)),i.set(g,T)),m?T.formatToParts(l):T.format(l)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,r,n,o]=e,s={};let a={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const i=t;return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?a[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(a=n),isPlainObject(o)&&(a=o),[s.key||"",i,s,a]}function clearNumberFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}registerMessageCompiler(compile),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{CompileErrorCodes,CoreErrorCodes,CoreWarnCodes,DATETIME_FORMAT_OPTIONS_KEYS,DEFAULT_LOCALE,DEFAULT_MESSAGE_DATA_TYPE,MISSING_RESOLVE_VALUE,NOT_REOSLVED,NUMBER_FORMAT_OPTIONS_KEYS,VERSION,clearCompileCache,clearDateTimeFormat,clearNumberFormat,compile,compileToFunction,createCompileError,createCoreContext,createCoreError,createMessageContext,datetime,fallbackWithLocaleChain,fallbackWithSimple,getAdditionalMeta,getDevToolsHook,getFallbackContext,getLocale,getWarnMessage,handleMissing,initI18nDevTools,isAlmostSameLocale,isImplicitFallback,isMessageAST,isMessageFunction,isTranslateFallbackWarn,isTranslateMissingWarn,number,parse,parseDateTimeArgs,parseNumberArgs,parseTranslateArgs,registerLocaleFallbacker,registerMessageCompiler,registerMessageResolver,resolveLocale,resolveValue,resolveWithKeyValue,setAdditionalMeta,setDevToolsHook,setFallbackContext,translate,translateDevTools,updateFallbackLocale}; | ||
const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format$1(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign,_create=Object.create,create=(e=null)=>_create(e);function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}function incrementer(e){let t=e;return()=>++t}function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function createPosition(e,t,r){return{line:e,column:t,offset:r}}function createLocation(e,t,r){const n={start:e,end:t};return null!=r&&(n.source=r),n}const CompileWarnCodes={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};function createCompileWarn(e,t,...r){const n={message:String(e),code:e};return t&&(n.location=t),n}const CompileErrorCodes={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,__EXTEND_POINT__:17};function createCompileError(e,t,r={}){const{domain:n,messages:o,args:s}=r,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=n,a}function defaultOnError(e){throw e}CompileErrorCodes.EXPECTED_TOKEN,CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,CompileErrorCodes.UNBALANCED_CLOSING_BRACE,CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,CompileErrorCodes.EMPTY_PLACEHOLDER,CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,CompileErrorCodes.INVALID_LINKED_FORMAT,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE,CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE;const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let r=0,n=1,o=1,s=0;const a=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,i=e=>t[e]===CHAR_PS,c=e=>t[e]===CHAR_LS,l=e=>a(e)||(e=>t[e]===CHAR_LF)(e)||i(e)||c(e),u=e=>a(e)||i(e)||c(e)?CHAR_LF:t[e];function E(){return s=0,l(r)&&(n++,o=0),a(r)&&r++,r++,o++,t[r]}return{index:()=>r,line:()=>n,column:()=>o,peekOffset:()=>s,charAt:u,currentChar:()=>u(r),currentPeek:()=>u(r+s),next:E,peek:function(){return a(r+s)&&s++,s++,t[r+s]},reset:function(){r=0,n=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=r+s;for(;e!==r;)E();s=0}}}const EOF=void 0,DOT=".",LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const r=!1!==t.location,n=createScanner(e),o=()=>n.index(),s=()=>createPosition(n.line(),n.column(),n.index()),a=s(),i=o(),c={currentType:14,offset:i,startLoc:a,endLoc:a,lastType:14,lastOffset:i,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>c,{onError:u}=t;function E(e,t,n){e.endLoc=s(),e.currentType=t;const o={type:t};return r&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(o.value=n),o}const f=e=>E(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,s(),"")}function _(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=_(e);return e.skipToPeek(),t}function d(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function p(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function T(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function N(e,t=!0){const r=(t=!1,n="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==n&&t:"@"!==s&&s?"%"===s?(e.peek(),r(t,"%",!0)):"|"===s?!("%"!==n&&!o)||!(n===CHAR_SP||n===CHAR_LF):s===CHAR_SP?(e.peek(),r(!0,CHAR_SP,o)):s!==CHAR_LF||(e.peek(),r(!0,CHAR_LF,o)):"%"===n||t},n=r();return t&&e.resetPeek(),n}function g(e,t){const r=e.currentChar();return r===EOF?EOF:t(r)?(e.next(),r):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 L(e){return g(e,A)}function O(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 S(e){return g(e,O)}function h(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function P(e){return g(e,h)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function k(e){return g(e,b)}function I(e){let t="",r="";for(;t=P(e);)r+=t;return r}function M(e){let t="";for(;;){const r=e.currentChar();if("{"===r||"}"===r||"@"===r||"|"===r||!r)break;if("%"===r){if(!N(e))break;t+=r,e.next()}else if(r===CHAR_SP||r===CHAR_LF)if(N(e))t+=r,e.next();else{if(T(e))break;t+=r,e.next()}else t+=r,e.next()}return t}function y(e){return e!==LITERAL_DELIMITER&&e!==CHAR_LF}function R(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return D(e,t,4);case"U":return D(e,t,6);default:return CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,s(),""}}function D(e,t,r){m(e,t);let n="";for(let o=0;o<r;o++){const t=k(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),e.currentChar();break}n+=t}return`\\${t}${n}`}function F(e){return"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF}function v(e){C(e);const t=m(e,"|");return C(e),t}function U(e,t){let r=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,s()),e.next(),r=E(t,2,"{"),C(e),t.braceNest++,r;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,s()),e.next(),r=E(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),r;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=x(e,t)||f(t),t.braceNest=0,r;default:{let n=!0,o=!0,a=!0;if(T(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s(),t.braceNest=0,w(e,t);if(n=function(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=d(e.currentPeek());return e.resetPeek(),n}(e,t))return r=E(t,5,function(e){C(e);let t="",r="";for(;t=S(e);)r+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r}(e)),C(e),r;if(o=p(e,t))return r=E(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),t}(e)),C(e),r;if(a=function(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return r=E(t,7,function(e){C(e),m(e,"'");let t="",r="";for(;t=g(e,y);)r+="\\"===t?R(e):t;const n=e.currentChar();return n===CHAR_LF||n===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),n===CHAR_LF&&(e.next(),m(e,"'")),r):(m(e,"'"),r)}(e)),C(e),r;if(!n&&!o&&!a)return r=E(t,13,function(e){C(e);let t="",r="";for(;t=g(e,F);)r+=t;return r}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,s(),r.value,C(e),r;break}}return r}function x(e,t){const{currentType:r}=t;let n=null;const o=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||o!==CHAR_LF&&o!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),o){case"@":return e.next(),n=E(t,8,"@"),t.inLinked=!0,n;case".":return C(e),e.next(),E(t,9,".");case":":return C(e),e.next(),E(t,10,":");default:return T(e)?(n=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:r}=t;if(8!==r)return!1;_(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:r}=t;if(8!==r&&12!==r)return!1;_(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(C(e),x(e,t)):function(e,t){const{currentType:r}=t;if(9!==r)return!1;_(e);const n=d(e.currentPeek());return e.resetPeek(),n}(e,t)?(C(e),E(t,12,function(e){let t="",r="";for(;t=L(e);)r+=t;return r}(e))):function(e,t){const{currentType:r}=t;if(10!==r)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):N(e,!1))},o=n();return e.resetPeek(),o}(e,t)?(C(e),"{"===o?U(e,t)||n:E(t,11,function(e){const t=r=>{const n=e.currentChar();return"{"!==n&&"%"!==n&&"@"!==n&&"|"!==n&&"("!==n&&")"!==n&&n?n===CHAR_SP?r:(r+=n,e.next(),t(r)):r};return t("")}(e))):(8===r&&(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let r={type:14};if(t.braceNest>0)return U(e,t)||f(t);if(t.inLinked)return x(e,t)||f(t);switch(e.currentChar()){case"{":return U(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,s(),e.next(),E(t,3,"}");case"@":return x(e,t)||f(t);default:{if(T(e))return r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;const{isModulo:n,hasSpace:o}=function(e){const t=_(e),r="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:r,hasSpace:t.length>0}}(e);if(n)return o?E(t,0,M(e)):E(t,4,function(e){C(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,s()),e.next(),"%"}(e));if(N(e))return E(t,0,M(e));break}}return r}return{nextToken:function(){const{currentType:e,offset:t,startLoc:r,endLoc:a}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=r,c.lastEndLoc=a,c.offset=o(),c.startLoc=s(),n.currentChar()===EOF?E(c,14):w(n,c)},currentOffset:o,currentPosition:s,context:l}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,r){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||r,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:r,onWarn:n}=e;function o(e,r,n){const o={type:e};return t&&(o.start=r,o.end=r,o.loc={start:n,end:n}),o}function s(e,r,n,o){o&&(e.type=o),t&&(e.end=r,e.loc&&(e.loc.end=n))}function a(e,t){const r=e.context(),n=o(3,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}function i(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(5,n,a);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function c(e,t,r){const n=e.context(),{lastOffset:a,lastStartLoc:i}=n,c=o(4,a,i);return c.key=t,!0===r&&(c.modulo=!0),e.nextToken(),s(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(9,n,a);return i.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e){const t=e.context(),r=o(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(8,n,a);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,i.value="",s(i,n,a),{nextConsumeToken:t,node:i}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,getTokenCaption(t)),i.value=t.value||"",s(i,e.currentOffset(),e.currentPosition()),{node:i})}(e);r.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=function(e,t){const r=e.context(),n=o(7,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=c(e,n.value||"");break;case 6:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=i(e,n.value||"");break;case 7:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=l(e,n.value||"");break;default:{CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const a=e.context(),i=o(7,a.offset,a.startLoc);return i.value="",s(i,a.offset,a.startLoc),r.key=i,s(r,a.offset,a.startLoc),{nextConsumeToken:n,node:r}}}return s(r,e.currentOffset(),e.currentPosition()),{node:r}}function E(e){const t=e.context(),r=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);r.items=[];let n=null,E=null;do{const o=n||e.nextToken();switch(n=null,o.type){case 0:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(a(e,o.value||""));break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(i(e,o.value||""));break;case 4:E=!0;break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(c(e,o.value||"",!!E)),E&&(CompileWarnCodes.USE_MODULO_SYNTAX,t.lastStartLoc,getTokenCaption(o),E=null);break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(l(e,o.value||""));break;case 8:{const t=u(e);r.items.push(t.node),n=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return s(r,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),r}function f(e){const t=e.context(),{offset:r,startLoc:n}=t,a=E(e);return 14===t.currentType?a:function(e,t,r,n){const a=e.context();let i=0===n.items.length;const c=o(1,t,r);c.cases=[],c.cases.push(n);do{const t=E(e);i||(i=0===t.items.length),c.cases.push(t)}while(14!==a.currentType);return i&&CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,s(c,e.currentOffset(),e.currentPosition()),c}(e,r,n,a)}return{parse:function(r){const n=createTokenizer(r,assign({},e)),a=n.context(),i=o(0,a.offset,a.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=f(n),e.onCacheKey&&(i.cacheKey=e.onCacheKey(r)),14!==a.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,r[a.offset]),s(i,n.currentOffset(),n.currentPosition()),i}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const r={ast:e,helpers:new Set};return{context:()=>r,helper:e=>(r.helpers.add(e),e)}}function traverseNodes(e,t){for(let r=0;r<e.length;r++)traverseNode(e[r],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(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 transform(e,t={}){const r=createTransformer(e);r.helper("normalize"),e.body&&traverseNode(e.body,r);const n=r.context();e.helpers=Array.from(n.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(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 r=0;r<e.items.length;r++){const n=e.items[r];if(3!==n.type&&9!==n.type)break;if(null==n.value)break;t.push(n.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const r=e.items[t];3!==r.type&&9!==r.type||delete r.value}}}}function minify(e){switch(e.t=e.type,e.type){case 0:{const t=e;minify(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,r=t.cases;for(let e=0;e<r.length;e++)minify(r[e]);t.c=r,delete t.cases;break}case 2:{const t=e,r=t.items;for(let e=0;e<r.length;e++)minify(r[e]);t.i=r,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;minify(t.key),t.k=t.key,delete t.key,t.modifier&&(minify(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 createCodeGenerator(e,t){const{sourceMap:r,filename:n,breakLineCode:o,needIndent:s}=t,a=!1!==t.location,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};a&&e.loc&&(i.source=e.loc.source);function c(e,t){i.code+=e}function l(e,t=!0){const r=t?o:"";c(s?r+" ".repeat(e):r)}return{context:()=>i,push:c,indent:function(e=!0){const t=++i.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--i.indentLevel;e&&l(t)},newline:function(){l(i.indentLevel)},helper:e=>`_${e}`,needIndent:()=>i.needIndent}}function generateLinkedNode(e,t){const{helper:r}=e;e.push(`${r("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:r,needIndent:n}=e;e.push(`${r("normalize")}([`),e.indent(n());const o=t.items.length;for(let s=0;s<o&&(generateNode(e,t.items[s]),s!==o-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function generatePluralNode(e,t){const{helper:r,needIndent:n}=e;if(t.cases.length>1){e.push(`${r("plural")}([`),e.indent(n());const o=t.cases.length;for(let r=0;r<o&&(generateNode(e,t.cases[r]),r!==o-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:r}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${r("interpolate")}(${r("list")}(${t.index}))`,t);break;case 4:e.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const r=isString(t.mode)?t.mode:"normal",n=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==r,i=e.helpers||[],c=createCodeGenerator(e,{mode:r,filename:n,sourceMap:o,breakLineCode:s,needIndent:a});c.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(a),i.length>0&&(c.push(`const { ${join(i.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),generateNode(c,e),c.deindent(a),c.push("}"),delete e.helpers;const{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const r=assign({},t),n=!!r.jit,o=!!r.minify,s=null==r.optimize||r.optimize,a=createParser(r).parse(e);return n?(s&&optimize(a),o&&minify(a),{ast:a,code:""}):(transform(a,r),generate(a,r))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let r,n,o,s,a,i,c,l=-1,u=0,E=0;const f=[];function m(){const t=e[l+1];if(5===u&&"'"===t||6===u&&'"'===t)return l++,o="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=o:n+=o},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),E++},f[3]=()=>{if(E>0)E--,u=4,f[0]();else{if(E=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;f[1]()}};null!==u;)if(l++,r=e[l],"\\"!==r||!m()){if(s=getPathCharType(r),c=pathStateMachine[u],a=c[s]||c.l||8,8===a)return;if(u=a[0],void 0!==a[1]&&(i=f[a[1]],i&&(o=r,!1===i())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue$1(e,t){if(!isObject(e))return null;let r=cache.get(t);if(r||(r=parse(t),r&&cache.set(t,r)),!r)return null;const n=r.length;let o=e,s=0;for(;s<n;){const e=o[r[s]];if(void 0===e)return null;if(isFunction(o))return null;o=e,s++}return o}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,r=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,o=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,s=e.list||[],a=e.named||create();isNumber(e.pluralIndex)&&normalizeNamed(r,a);function i(t){const r=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const c=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,l=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>s[e],named:e=>a[e],plural:e=>e[n(r,e.length,o)],linked:(t,...r)=>{const[n,o]=r;let s="text",a="";1===r.length?isObject(n)?(a=n.modifier||a,s=n.type||s):isString(n)&&(a=n||a):2===r.length&&(isString(n)&&(a=n||a),isString(o)&&(s=o||s));const c=i(t)(u),l="vnode"===s&&isArray(c)&&a?c[0]:c;return a?(E=a,e.modifiers?e.modifiers[E]:DEFAULT_MODIFIER)(l,s):l;var E},message:i,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:l,normalize:c,values:assign(create(),s,a)};return u}let devtools=null;function setDevToolsHook(e){devtools=e}function getDevToolsHook(){return devtools}function initI18nDevTools(e,t,r){devtools&&devtools.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:r})}const translateDevTools=createDevToolsHook("function:translate");function createDevToolsHook(e){return t=>devtools&&devtools.emit(e,t)}const code$1=CompileWarnCodes.__EXTEND_POINT__,inc$1=incrementer(code$1),CoreWarnCodes={NOT_FOUND_KEY:code$1,FALLBACK_TO_TRANSLATE:inc$1(),CANNOT_FORMAT_NUMBER:inc$1(),FALLBACK_TO_NUMBER_FORMAT:inc$1(),CANNOT_FORMAT_DATE:inc$1(),FALLBACK_TO_DATE_FORMAT:inc$1(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:inc$1(),__EXTEND_POINT__:inc$1()},warnMessages={[CoreWarnCodes.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[CoreWarnCodes.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[CoreWarnCodes.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."};function getWarnMessage(e,...t){return format$1(warnMessages[e],...t)}const code=CompileErrorCodes.__EXTEND_POINT__,inc=incrementer(code),CoreErrorCodes={INVALID_ARGUMENT:code,INVALID_DATE_ARGUMENT:inc(),INVALID_ISO_DATE_ARGUMENT:inc(),NOT_SUPPORT_NON_STRING_MESSAGE:inc(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:inc(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:inc(),NOT_SUPPORT_LOCALE_TYPE:inc(),__EXTEND_POINT__:inc()};function createCoreError(e){return createCompileError(e,null,void 0)}function getLocale(e,t){return null!=t.locale?resolveLocale(t.locale):resolveLocale(e.locale)}let _resolveLocale;function resolveLocale(e){if(isString(e))return e;if(isFunction(e)){if(e.resolvedOnce&&null!=_resolveLocale)return _resolveLocale;if("Function"===e.constructor.name){const t=e();if(isPromise(t))throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=t}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(e,t,r){return[...new Set([r,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[r]])]}function fallbackWithLocaleChain(e,t,r){const n=isString(r)?r:DEFAULT_LOCALE,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(n);if(!s){s=[];let e=[r];for(;isArray(e);)e=appendBlockToChain(s,e,t);const a=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(a)?[a]:a,isArray(e)&&appendBlockToChain(s,e,!1),o.__localeChainCache.set(n,s)}return s}function appendBlockToChain(e,t,r){let n=!0;for(let o=0;o<t.length&&isBoolean(n);o++){const s=t[o];isString(s)&&(n=appendLocaleToChain(e,t[o],r))}return n}function appendLocaleToChain(e,t,r){let n;const o=t.split("-");do{n=appendItemToChain(e,o.join("-"),r),o.splice(-1,1)}while(o.length&&!0===n);return n}function appendItemToChain(e,t,r){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(isArray(r)||isPlainObject(r))&&r[o]&&(n=r[o])}return n}CoreErrorCodes.INVALID_ARGUMENT,CoreErrorCodes.INVALID_DATE_ARGUMENT,CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT,CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE,CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE,CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE;const VERSION="9.14.2",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _additionalMeta=null;const setAdditionalMeta=e=>{_additionalMeta=e},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isFunction(e.onWarn)?e.onWarn:warn,r=isString(e.version)?e.version:VERSION,n=isString(e.locale)||isFunction(e.locale)?e.locale:DEFAULT_LOCALE,o=isFunction(n)?DEFAULT_LOCALE:n,s=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=isPlainObject(e.messages)?e.messages:createResources(o),i=isPlainObject(e.datetimeFormats)?e.datetimeFormats:createResources(o),c=isPlainObject(e.numberFormats)?e.numberFormats:createResources(o),l=assign(create(),e.modifiers,getDefaultLinkedModifiers()),u=e.pluralRules||create(),E=isFunction(e.missing)?e.missing:null,f=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,_=!!e.fallbackFormat,C=!!e.unresolving,d=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,T=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,N=!!e.escapeParameter,g=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,A=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,L=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,O=isObject(e.fallbackContext)?e.fallbackContext:void 0,S=e,h=isObject(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,P=isObject(S.__numberFormatters)?S.__numberFormatters:new Map,b=isObject(S.__meta)?S.__meta:{};_cid++;const k={version:r,cid:_cid,locale:n,fallbackLocale:s,messages:a,modifiers:l,pluralRules:u,missing:E,missingWarn:f,fallbackWarn:m,fallbackFormat:_,unresolving:C,postTranslation:d,processor:p,warnHtmlMessage:T,escapeParameter:N,messageCompiler:g,messageResolver:A,localeFallbacker:L,fallbackContext:O,onWarn:t,__meta:b};return k.datetimeFormats=i,k.numberFormats=c,k.__datetimeFormatters=h,k.__numberFormatters=P,k}const createResources=e=>({[e]:create()});function isTranslateFallbackWarn(e,t){return e instanceof RegExp?e.test(t):e}function isTranslateMissingWarn(e,t){return e instanceof RegExp?e.test(t):e}function handleMissing(e,t,r,n,o){const{missing:s,onWarn:a}=e;if(null!==s){const n=s(e,r,t,o);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,r){e.__localeChainCache=new Map,e.localeFallbacker(e,r,t)}function isAlmostSameLocale(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function isImplicitFallback(e,t){const r=t.indexOf(e);if(-1===r)return!1;for(let n=r+1;n<t.length;n++)if(isAlmostSameLocale(e,t[n]))return!0;return!1}function format(e){return t=>formatParts(t,e)}function formatParts(e,t){const r=resolveBody(t);if(null==r)throw createUnhandleNodeError(0);if(1===resolveType(r)){const t=resolveCases(r);return e.plural(t.reduce(((t,r)=>[...t,formatMessageParts(e,r)]),[]))}return formatMessageParts(e,r)}const PROPS_BODY=["b","body"];function resolveBody(e){return resolveProps(e,PROPS_BODY)}const PROPS_CASES=["c","cases"];function resolveCases(e){return resolveProps(e,PROPS_CASES,[])}function formatMessageParts(e,t){const r=resolveStatic(t);if(null!=r)return"text"===e.type?r:e.normalize([r]);{const r=resolveItems(t).reduce(((t,r)=>[...t,formatMessagePart(e,r)]),[]);return e.normalize(r)}}const PROPS_STATIC=["s","static"];function resolveStatic(e){return resolveProps(e,PROPS_STATIC)}const PROPS_ITEMS=["i","items"];function resolveItems(e){return resolveProps(e,PROPS_ITEMS,[])}function formatMessagePart(e,t){const r=resolveType(t);switch(r){case 3:case 9:case 7:case 8:return resolveValue(t,r);case 4:{const n=t;if(hasOwn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(hasOwn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw createUnhandleNodeError(r)}case 5:{const n=t;if(hasOwn(n,"i")&&isNumber(n.i))return e.interpolate(e.list(n.i));if(hasOwn(n,"index")&&isNumber(n.index))return e.interpolate(e.list(n.index));throw createUnhandleNodeError(r)}case 6:{const r=t,n=resolveLinkedModifier(r),o=resolveLinkedKey(r);return e.linked(formatMessagePart(e,o),n?formatMessagePart(e,n):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${r}`)}}const PROPS_TYPE=["t","type"];function resolveType(e){return resolveProps(e,PROPS_TYPE)}const PROPS_VALUE=["v","value"];function resolveValue(e,t){const r=resolveProps(e,PROPS_VALUE);if(r)return r;throw createUnhandleNodeError(t)}const PROPS_MODIFIER=["m","modifier"];function resolveLinkedModifier(e){return resolveProps(e,PROPS_MODIFIER)}const PROPS_KEY=["k","key"];function resolveLinkedKey(e){const t=resolveProps(e,PROPS_KEY);if(t)return t;throw createUnhandleNodeError(6)}function resolveProps(e,t,r){for(let n=0;n<t.length;n++){const r=t[n];if(hasOwn(e,r)&&null!=e[r])return e[r]}return r}function createUnhandleNodeError(e){return new Error(`unhandled node type: ${e}`)}const defaultOnCacheKey=e=>e;let compileCache=create();function clearCompileCache(){compileCache=create()}function isMessageAST(e){return isObject(e)&&0===resolveType(e)&&(hasOwn(e,"b")||hasOwn(e,"body"))}function baseCompile(e,t={}){let r=!1;const n=t.onError||defaultOnError;return t.onError=e=>{r=!0,n(e)},{...baseCompile$1(e,t),detectError:r}}const compileToFunction=(e,t)=>{if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);{!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{code:o,detectError:s}=baseCompile(e,t),a=new Function(`return ${o}`)();return s?a:compileCache[r]=a}};function compile(e,t){if(isString(e)){!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{ast:o,detectError:s}=baseCompile(e,{...t,location:!1,jit:!0}),a=format(o);return s?a:compileCache[r]=a}{const t=e.cacheKey;if(t){const r=compileCache[t];return r||(compileCache[t]=format(e))}return format(e)}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:r,postTranslation:n,unresolving:o,messageCompiler:s,fallbackLocale:a,messages:i}=e,[c,l]=parseTranslateArgs(...t),u=isBoolean(l.missingWarn)?l.missingWarn:e.missingWarn,E=isBoolean(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=isBoolean(l.escapeParameter)?l.escapeParameter:e.escapeParameter,m=!!l.resolvedMessage,_=isString(l.default)||isBoolean(l.default)?isBoolean(l.default)?s?c:()=>c:l.default:r?s?c:()=>c:"",C=r||""!==_,d=getLocale(e,l);f&&escapeParams(l);let[p,T,N]=m?[c,d,i[d]||create()]:resolveMessageFormat(e,c,d,a,E,u),g=p,A=c;if(m||isString(g)||isMessageAST(g)||isMessageFunction(g)||C&&(g=_,A=g),!(m||(isString(g)||isMessageAST(g)||isMessageFunction(g))&&isString(T)))return o?-1:c;let L=!1;const O=isMessageFunction(g)?g:compileMessageFormat(e,c,T,g,A,(()=>{L=!0}));if(L)return g;const S=evaluateMessage(e,O,createMessageContext(getMessageContextOptions(e,T,N,l)));return n?n(S,c):S}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,r,n,o,s){const{messages:a,onWarn:i,messageResolver:c,localeFallbacker:l}=e,u=l(e,n,r);let E,f=create(),m=null;for(let _=0;_<u.length&&(E=u[_],f=a[E]||create(),null===(m=c(f,t))&&(m=f[t]),!(isString(m)||isMessageAST(m)||isMessageFunction(m)));_++)if(!isImplicitFallback(E,u)){const r=handleMissing(e,t,E,s,"translate");r!==t&&(m=r)}return[m,E,f]}function compileMessageFormat(e,t,r,n,o,s){const{messageCompiler:a,warnHtmlMessage:i}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>n;return e.locale=r,e.key=t,e}const c=a(n,getCompileContext(e,r,o,n,i,s));return c.locale=r,c.key=t,c.source=n,c}function evaluateMessage(e,t,r){return t(r)}function parseTranslateArgs(...e){const[t,r,n]=e,o=create();if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(r)?o.plural=r:isString(r)?o.default=r:isPlainObject(r)&&!isEmptyObject(r)?o.named=r:isArray(r)&&(o.list=r),isNumber(n)?o.plural=n:isString(n)?o.default=n:isPlainObject(n)&&assign(o,n),[s,o]}function getCompileContext(e,t,r,n,o,s){return{locale:t,key:r,warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>generateFormatCacheKey(t,r,e)}}function getMessageContextOptions(e,t,r,n){const{modifiers:o,pluralRules:s,messageResolver:a,fallbackLocale:i,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,E={locale:t,modifiers:o,pluralRules:s,messages:n=>{let o=a(r,n);if(null==o&&u){const[,,e]=resolveMessageFormat(u,n,t,i,c,l);o=a(e,n)}if(isString(o)||isMessageAST(o)){let r=!1;const s=compileMessageFormat(e,n,t,o,n,(()=>{r=!0}));return r?NOOP_MESSAGE_FUNCTION:s}return isMessageFunction(o)?o:NOOP_MESSAGE_FUNCTION}};return e.processor&&(E.processor=e.processor),n.list&&(E.list=n.list),n.named&&(E.named=n.named),isNumber(n.plural)&&(E.pluralIndex=n.plural),E}function datetime(e,...t){const{datetimeFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:i}=e,[c,l,u,E]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,_=getLocale(e,u),C=a(e,o,_);if(!isString(c)||""===c)return new Intl.DateTimeFormat(_,E).format(l);let d,p={},T=null;for(let A=0;A<C.length&&(d=C[A],p=r[d]||{},T=p[c],!isPlainObject(T));A++)handleMissing(e,c,d,f,"datetime format");if(!isPlainObject(T)||!isString(d))return n?-1:c;let N=`${d}__${c}`;isEmptyObject(E)||(N=`${N}__${JSON.stringify(E)}`);let g=i.get(N);return g||(g=new Intl.DateTimeFormat(d,assign({},T,E)),i.set(N,g)),m?g.formatToParts(l):g.format(l)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,r,n,o]=e,s=create();let a,i=create();if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const r=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(r);try{a.toISOString()}catch(c){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);a=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);a=t}return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?i[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(i=n),isPlainObject(o)&&(i=o),[s.key||"",a,s,i]}function clearDateTimeFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:i}=e,[c,l,u,E]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,_=getLocale(e,u),C=a(e,o,_);if(!isString(c)||""===c)return new Intl.NumberFormat(_,E).format(l);let d,p={},T=null;for(let A=0;A<C.length&&(d=C[A],p=r[d]||{},T=p[c],!isPlainObject(T));A++)handleMissing(e,c,d,f,"number format");if(!isPlainObject(T)||!isString(d))return n?-1:c;let N=`${d}__${c}`;isEmptyObject(E)||(N=`${N}__${JSON.stringify(E)}`);let g=i.get(N);return g||(g=new Intl.NumberFormat(d,assign({},T,E)),i.set(N,g)),m?g.formatToParts(l):g.format(l)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,r,n,o]=e,s=create();let a=create();if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const i=t;return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?a[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(a=n),isPlainObject(o)&&(a=o),[s.key||"",i,s,a]}function clearNumberFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}registerMessageCompiler(compile),registerMessageResolver(resolveValue$1),registerLocaleFallbacker(fallbackWithLocaleChain);export{CompileErrorCodes,CoreErrorCodes,CoreWarnCodes,DATETIME_FORMAT_OPTIONS_KEYS,DEFAULT_LOCALE,DEFAULT_MESSAGE_DATA_TYPE,MISSING_RESOLVE_VALUE,NOT_REOSLVED,NUMBER_FORMAT_OPTIONS_KEYS,VERSION,clearCompileCache,clearDateTimeFormat,clearNumberFormat,compile,compileToFunction,createCompileError,createCoreContext,createCoreError,createMessageContext,datetime,fallbackWithLocaleChain,fallbackWithSimple,getAdditionalMeta,getDevToolsHook,getFallbackContext,getLocale,getWarnMessage,handleMissing,initI18nDevTools,isAlmostSameLocale,isImplicitFallback,isMessageAST,isMessageFunction,isTranslateFallbackWarn,isTranslateMissingWarn,number,parse,parseDateTimeArgs,parseNumberArgs,parseTranslateArgs,registerLocaleFallbacker,registerMessageCompiler,registerMessageResolver,resolveLocale,resolveValue$1 as resolveValue,resolveWithKeyValue,setAdditionalMeta,setDevToolsHook,setFallbackContext,translate,translateDevTools,updateFallbackLocale}; |
/*! | ||
* core v9.14.1 | ||
* core v9.14.2 | ||
* (c) 2024 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
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]"===p(e),s=e=>"[object RegExp]"===p(e),c=e=>T(e)&&0===Object.keys(e).length,l=Object.assign;function i(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const u=Array.isArray,f=e=>"function"==typeof e,E=e=>"string"==typeof e,_=e=>"boolean"==typeof e,m=e=>null!==e&&"object"==typeof e,d=e=>m(e)&&f(e.then)&&f(e.catch),N=Object.prototype.toString,p=e=>N.call(e),T=e=>{if(!m(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function L(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function A(e){let t=e;return()=>++t}function C(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function k(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const h={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};const O={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,__EXTEND_POINT__:17};function I(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 g(e){throw e}O.EXPECTED_TOKEN,O.INVALID_TOKEN_IN_PLACEHOLDER,O.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,O.UNKNOWN_ESCAPE_SEQUENCE,O.INVALID_UNICODE_ESCAPE_SEQUENCE,O.UNBALANCED_CLOSING_BRACE,O.UNTERMINATED_CLOSING_BRACE,O.EMPTY_PLACEHOLDER,O.NOT_ALLOW_NEST_PLACEHOLDER,O.INVALID_LINKED_FORMAT,O.MUST_HAVE_MESSAGES_IN_PLURAL,O.UNEXPECTED_EMPTY_LINKED_MODIFIER,O.UNEXPECTED_EMPTY_LINKED_KEY,O.UNEXPECTED_LEXICAL_ANALYSIS,O.UNHANDLED_CODEGEN_NODE_TYPE,O.UNHANDLED_MINIFIER_NODE_TYPE;const S=" ",y="\r",b="\n",P=String.fromCharCode(8232),D=String.fromCharCode(8233);function M(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>t[e]===y&&t[e+1]===b,c=e=>t[e]===D,l=e=>t[e]===P,i=e=>s(e)||(e=>t[e]===b)(e)||c(e)||l(e),u=e=>s(e)||c(e)||l(e)?b:t[e];function f(){return a=0,i(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 R=void 0,U="'";function v(e,t={}){const n=!1!==t.location,r=M(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(),l={currentType:14,offset:c,startLoc:s,endLoc:s,lastType:14,lastOffset:c,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>l,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=k(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const E=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(O.EXPECTED_TOKEN,a(),"")}function m(e){let t="";for(;e.currentPeek()===S||e.currentPeek()===b;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=m(e);return e.skipToPeek(),t}function N(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function p(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=function(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function L(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(r===S||r===b):a===S?(e.peek(),n(!0,S,o)):a!==b||(e.peek(),n(!0,b,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function A(e,t){const n=e.currentChar();return n===R?R: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 I(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 g(e){return A(e,I)}function y(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function P(e){return A(e,y)}function D(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function v(e){return A(e,D)}function F(e){let t="",n="";for(;t=P(e);)n+=t;return n}function x(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!L(e))break;t+=n,e.next()}else if(n===S||n===b)if(L(e))t+=n,e.next();else{if(T(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function w(e){return e!==U&&e!==b}function W(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 O.UNKNOWN_ESCAPE_SEQUENCE,a(),""}}function X(e,t,n){_(e,t);let r="";for(let o=0;o<n;o++){const t=v(e);if(!t){O.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function Y(e){return"{"!==e&&"}"!==e&&e!==S&&e!==b}function G(e){d(e);const t=_(e,"|");return d(e),t}function K(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(O.NOT_ALLOW_NEST_PLACEHOLDER,a()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(O.EMPTY_PLACEHOLDER,a()),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&&(O.UNTERMINATED_CLOSING_BRACE,a()),n=$(e,t)||E(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&(O.UNTERMINATED_CLOSING_BRACE,a()),n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return O.UNTERMINATED_CLOSING_BRACE,a(),t.braceNest=0,V(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=g(e);)n+=t;return e.currentChar()===R&&(O.UNTERMINATED_CLOSING_BRACE,a()),n}(e)),d(e),n;if(o=p(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${F(e)}`):t+=F(e),e.currentChar()===R&&(O.UNTERMINATED_CLOSING_BRACE,a()),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()===U;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),_(e,"'");let t="",n="";for(;t=A(e,w);)n+="\\"===t?W(e):t;const r=e.currentChar();return r===b||r===R?(O.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),r===b&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";for(;t=A(e,Y);)n+=t;return n}(e)),O.INVALID_TOKEN_IN_PLACEHOLDER,a(),n.value,d(e),n;break}}return n}function $(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==b&&o!==S||(O.INVALID_LINKED_FORMAT,a()),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),$(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;m(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=h(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?N(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===S||!t)&&(t===b?(e.peek(),r()):L(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?K(e,t)||r:f(t,11,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"%"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===S?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(8===n&&(O.INVALID_LINKED_FORMAT,a()),t.braceNest=0,t.inLinked=!1,V(e,t))}}function V(e,t){let n={type:14};if(t.braceNest>0)return K(e,t)||E(t);if(t.inLinked)return $(e,t)||E(t);switch(e.currentChar()){case"{":return K(e,t)||E(t);case"}":return O.UNBALANCED_CLOSING_BRACE,a(),e.next(),f(t,3,"}");case"@":return $(e,t)||E(t);default:{if(T(e))return n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=m(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?f(t,0,x(e)):f(t,4,function(e){d(e);const t=e.currentChar();return"%"!==t&&(O.EXPECTED_TOKEN,a()),e.next(),"%"}(e));if(L(e))return f(t,0,x(e));break}}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=a(),r.currentChar()===R?f(l,14):V(r,l)},currentOffset:o,currentPosition:a,context:i}}const F=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function x(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 w(e={}){const t=!1!==e.location,{onError:n,onWarn:r}=e;function o(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function a(e,n,r,o){o&&(e.type=o),t&&(e.end=n,e.loc&&(e.loc.end=r))}function s(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function c(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(5,r,s);return c.index=parseInt(t,10),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function i(e,t,n){const r=e.context(),{lastOffset:s,lastStartLoc:c}=r,l=o(4,s,c);return l.key=t,!0===n&&(l.modulo=!0),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(9,r,s);return c.value=t.replace(F,x),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(8,r,s);return 12!==t.type?(O.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,c.value="",a(c,r,s),{nextConsumeToken:t,node:c}):(null==t.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,W(t)),c.value=t.value||"",a(c,e.currentOffset(),e.currentPosition()),{node:c})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=i(e,r.value||"");break;case 6:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=c(e,r.value||"");break;case 7:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=u(e,r.value||"");break;default:{O.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),c=o(7,s.offset,s.startLoc);return c.value="",a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function E(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null,l=null;do{const o=r||e.nextToken();switch(r=null,o.type){case 0:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(s(e,o.value||""));break;case 6:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(c(e,o.value||""));break;case 4:l=!0;break;case 5:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(i(e,o.value||"",!!l)),l&&(h.USE_MODULO_SYNTAX,t.lastStartLoc,W(o),l=null);break;case 7:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(u(e,o.value||""));break;case 8:{const t=f(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function _(e){const t=e.context(),{offset:n,startLoc:r}=t,s=E(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let c=0===r.items.length;const l=o(1,t,n);l.cases=[],l.cases.push(r);do{const t=E(e);c||(c=0===t.items.length),l.cases.push(t)}while(14!==s.currentType);return c&&O.MUST_HAVE_MESSAGES_IN_PLURAL,a(l,e.currentOffset(),e.currentPosition()),l}(e,n,r,s)}return{parse:function(n){const r=v(n,l({},e)),s=r.context(),c=o(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=_(r),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(O.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),a(c,r.currentOffset(),r.currentPosition()),c}}}function W(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function X(e,t){for(let n=0;n<e.length;n++)Y(e[n],t)}function Y(e,t){switch(e.type){case 1:X(e.cases,t),t.helper("plural");break;case 2:X(e.items,t);break;case 6:Y(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 G(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&&Y(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function K(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=L(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 $(e){switch(e.t=e.type,e.type){case 0:{const t=e;$(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++)$(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++)$(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;$(t.key),t.k=t.key,delete t.key,t.modifier&&($(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 V(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?V(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&&(V(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&&(V(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")}(`),V(e,t.key),t.modifier?(e.push(", "),V(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 H=(e,t={})=>{const n=E(t.mode)?t.mode:"normal",r=E(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,a=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],l=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:a}=t,s=!1!==t.location,c={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};function l(e,t){c.code+=e}function i(e,t=!0){const n=t?o:"";l(a?n+" ".repeat(e):n)}return s&&e.loc&&(c.source=e.loc.source),{context:()=>c,push:l,indent:function(e=!0){const t=++c.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&i(t)},newline:function(){i(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:a,needIndent:s});l.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),c.length>0&&(l.push(`const { ${L(c.map((e=>`${e}: _${e}`)),", ")} } = ctx`),l.newline()),l.push("return "),V(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:i,map:u}=l.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function B(e,t={}){const n=l({},t),r=!!n.jit,o=!!n.minify,a=null==n.optimize||n.optimize,s=w(n).parse(e);return r?(a&&function(e){const t=e.body;2===t.type?K(t):t.cases.forEach((e=>K(e)))}(s),o&&$(s),{ast:s,code:""}):(G(s,n),H(s,n))}const j=[];j[0]={w:[0],i:[3,0],"[":[4],o:[7]},j[1]={w:[1],".":[2],"[":[4],o:[7]},j[2]={w:[2],i:[3,0],0:[3,0]},j[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},j[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},j[5]={"'":[4,0],o:8,l:[5,0]},j[6]={'"':[4,0],o:8,l:[6,0]};const z=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Q(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 J(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,z.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 Z(e){const t=[];let n,r,o,a,s,c,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=J(r),!1===r)return!1;E[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(a=Q(n),l=j[u],s=l[a]||l.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(c=E[s[1]],c&&(o=n,!1===c())))return;if(7===u)return t}}const q=new Map;function ee(e,t){return m(e)?e[t]:null}function te(e,t){if(!m(e))return null;let n=q.get(t);if(n||(n=Z(t),n&&q.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;if(f(o))return null;o=e,a++}return o}const ne=e=>e,re=e=>"",oe="text",ae=e=>0===e.length?"":L(e),se=e=>null==e?"":u(e)||T(e)&&e.toString===N?JSON.stringify(e,null,2):String(e);function ce(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function le(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=m(e.pluralRules)&&E(t)&&f(e.pluralRules[t])?e.pluralRules[t]:ce,a=m(e.pluralRules)&&E(t)&&f(e.pluralRules[t])?ce:void 0,s=e.list||[],c=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,c);function i(t){const n=f(e.messages)?e.messages(t):!!m(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):re)}const _=T(e.processor)&&f(e.processor.normalize)?e.processor.normalize:ae,d=T(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:se,N={list:e=>s[e],named:e=>c[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,o]=n;let a="text",s="";1===n.length?m(r)?(s=r.modifier||s,a=r.type||a):E(r)&&(s=r||s):2===n.length&&(E(r)&&(s=r||s),E(o)&&(a=o||a));const c=i(t)(N),l="vnode"===a&&u(c)&&s?c[0]:c;return s?(f=s,e.modifiers?e.modifiers[f]:ne)(l,a):l;var f},message:i,type:T(e.processor)&&E(e.processor.type)?e.processor.type:oe,interpolate:d,normalize:_,values:l({},s,c)};return N}let ie=null;const ue=fe("function:translate");function fe(e){return t=>ie&&ie.emit(e,t)}const Ee=h.__EXTEND_POINT__,_e=A(Ee),me={NOT_FOUND_KEY:Ee,FALLBACK_TO_TRANSLATE:_e(),CANNOT_FORMAT_NUMBER:_e(),FALLBACK_TO_NUMBER_FORMAT:_e(),CANNOT_FORMAT_DATE:_e(),FALLBACK_TO_DATE_FORMAT:_e(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:_e(),__EXTEND_POINT__:_e()},de={[me.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[me.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[me.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[me.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[me.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[me.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[me.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."};const Ne=O.__EXTEND_POINT__,pe=A(Ne),Te={INVALID_ARGUMENT:Ne,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:pe(),__EXTEND_POINT__:pe()};function Le(e,t){return null!=t.locale?Ce(t.locale):Ce(e.locale)}let Ae;function Ce(e){if(E(e))return e;if(f(e)){if(e.resolvedOnce&&null!=Ae)return Ae;if("Function"===e.constructor.name){const t=e();if(d(t))throw Error(Te.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ae=t}throw Error(Te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(Te.NOT_SUPPORT_LOCALE_TYPE)}function ke(e,t,n){return[...new Set([n,...u(t)?t:m(t)?Object.keys(t):E(t)?[t]:[n]])]}function he(e,t,n){const r=E(n)?n:ye,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;u(e);)e=Oe(a,e,t);const s=u(t)||!T(t)?t:t.default?t.default:null;e=E(s)?[s]:s,u(e)&&Oe(a,e,!1),o.__localeChainCache.set(r,a)}return a}function Oe(e,t,n){let r=!0;for(let o=0;o<t.length&&_(r);o++){const a=t[o];E(a)&&(r=Ie(e,t[o],n))}return r}function Ie(e,t,n){let r;const o=t.split("-");do{r=ge(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function ge(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),(u(n)||T(n))&&n[o]&&(r=n[o])}return r}Te.INVALID_ARGUMENT,Te.INVALID_DATE_ARGUMENT,Te.INVALID_ISO_DATE_ARGUMENT,Te.NOT_SUPPORT_NON_STRING_MESSAGE,Te.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Te.NOT_SUPPORT_LOCALE_TYPE;const Se="9.14.1",ye="en-US",be=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let Pe,De,Me;function Re(e){Pe=e}function Ue(e){De=e}function ve(e){Me=e}let Fe=null;let xe=null;let we=0;function We(e,t,n,r,o){const{missing:a,onWarn:s}=e;if(null!==a){const r=a(e,n,t,o);return E(r)?r:t}return t}function Xe(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Ye(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(Xe(e,t[r]))return!0;return!1}function Ge(e){return t=>function(e,t){const n=t.b||t.body;if(1===(n.t||n.type)){const t=n,r=t.c||t.cases;return e.plural(r.reduce(((t,n)=>[...t,Ke(e,n)]),[]))}return Ke(e,n)}(t,e)}function Ke(e,t){const n=t.s||t.static;if(n)return"text"===e.type?n:e.normalize([n]);{const n=(t.i||t.items).reduce(((t,n)=>[...t,$e(e,n)]),[]);return e.normalize(n)}}function $e(e,t){const n=t.t||t.type;switch(n){case 3:{const e=t;return e.v||e.value}case 9:{const e=t;return e.v||e.value}case 4:{const n=t;return e.interpolate(e.named(n.k||n.key))}case 5:{const n=t;return e.interpolate(e.list(null!=n.i?n.i:n.index))}case 6:{const n=t,r=n.m||n.modifier;return e.linked($e(e,n.k||n.key),r?$e(e,r):void 0,e.type)}case 7:{const e=t;return e.v||e.value}case 8:{const e=t;return e.v||e.value}default:throw new Error(`unhandled node type on format message part: ${n}`)}}const Ve=e=>e;let He=Object.create(null);const Be=e=>m(e)&&(0===e.t||0===e.type)&&("b"in e||"body"in e);function je(e,t={}){let n=!1;const r=t.onError||g;return t.onError=e=>{n=!0,r(e)},{...B(e,t),detectError:n}}function ze(e,t){if(E(e)){!_(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Ve)(e),r=He[n];if(r)return r;const{ast:o,detectError:a}=je(e,{...t,location:!1,jit:!0}),s=Ge(o);return a?s:He[n]=s}{const t=e.cacheKey;if(t){const n=He[t];return n||(He[t]=Ge(e))}return Ge(e)}}const Qe=()=>"",Je=e=>f(e);function Ze(e,t,n,r,o,a){const{messages:s,onWarn:c,messageResolver:l,localeFallbacker:i}=e,u=i(e,r,n);let f,_={},m=null;for(let d=0;d<u.length&&(f=u[d],_=s[f]||{},null===(m=l(_,t))&&(m=_[t]),!(E(m)||Be(m)||Je(m)));d++)if(!Ye(f,u)){const n=We(e,t,f,0,"translate");n!==t&&(m=n)}return[m,f,_]}function qe(e,t,r,o,a,s){const{messageCompiler:c,warnHtmlMessage:l}=e;if(Je(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 i=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,l,s));return i.locale=r,i.key=t,i.source=o,i}function et(...e){const[t,n,r]=e,a={};if(!(E(t)||o(t)||Je(t)||Be(t)))throw Error(Te.INVALID_ARGUMENT);const s=o(t)?String(t):(Je(t),t);return o(n)?a.plural=n:E(n)?a.default=n:T(n)&&!c(n)?a.named=n:u(n)&&(a.list=n),o(r)?a.plural=r:E(r)?a.default=r:T(r)&&l(a,r),[s,a]}const tt=["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,n,r,s]=e,c={};let l,i={};if(E(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Te.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(u){throw Error(Te.INVALID_ISO_DATE_ARGUMENT)}}else if(a(t)){if(isNaN(t.getTime()))throw Error(Te.INVALID_DATE_ARGUMENT);l=t}else{if(!o(t))throw Error(Te.INVALID_ARGUMENT);l=t}return E(n)?c.key=n:T(n)&&Object.keys(n).forEach((e=>{tt.includes(e)?i[e]=n[e]:c[e]=n[e]})),E(r)?c.locale=r:T(r)&&(i=r),T(s)&&(i=s),[c.key||"",l,c,i]}const rt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ot(...e){const[t,n,r,a]=e,s={};let c={};if(!o(t))throw Error(Te.INVALID_ARGUMENT);const l=t;return E(n)?s.key=n:T(n)&&Object.keys(n).forEach((e=>{rt.includes(e)?c[e]=n[e]:s[e]=n[e]})),E(r)?s.locale=r:T(r)&&(c=r),T(a)&&(c=a),[s.key||"",l,s,c]}return Re(ze),Ue(te),ve(he),e.CompileErrorCodes=O,e.CoreErrorCodes=Te,e.CoreWarnCodes=me,e.DATETIME_FORMAT_OPTIONS_KEYS=tt,e.DEFAULT_LOCALE=ye,e.DEFAULT_MESSAGE_DATA_TYPE=oe,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=rt,e.VERSION=Se,e.clearCompileCache=function(){He=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}},e.compile=ze,e.compileToFunction=(e,t)=>{if(!E(e))throw Error(Te.NOT_SUPPORT_NON_STRING_MESSAGE);{!_(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Ve)(e),r=He[n];if(r)return r;const{code:o,detectError:a}=je(e,t),s=new Function(`return ${o}`)();return a?s:He[n]=s}},e.createCompileError=I,e.createCoreContext=function(e={}){const t=f(e.onWarn)?e.onWarn:C,n=E(e.version)?e.version:Se,r=E(e.locale)||f(e.locale)?e.locale:ye,o=f(r)?ye:r,a=u(e.fallbackLocale)||T(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,c=T(e.messages)?e.messages:{[o]:{}},i=T(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},d=T(e.numberFormats)?e.numberFormats:{[o]:{}},N=l({},e.modifiers||{},{upper:(e,t)=>"text"===t&&E(e)?e.toUpperCase():"vnode"===t&&m(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&E(e)?e.toLowerCase():"vnode"===t&&m(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&E(e)?be(e):"vnode"===t&&m(e)&&"__v_isVNode"in e?be(e.children):e}),p=e.pluralRules||{},L=f(e.missing)?e.missing:null,A=!_(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,k=!_(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,O=!!e.unresolving,I=f(e.postTranslation)?e.postTranslation:null,g=T(e.processor)?e.processor:null,S=!_(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=f(e.messageCompiler)?e.messageCompiler:Pe,P=f(e.messageResolver)?e.messageResolver:De||ee,D=f(e.localeFallbacker)?e.localeFallbacker:Me||ke,M=m(e.fallbackContext)?e.fallbackContext:void 0,R=e,U=m(R.__datetimeFormatters)?R.__datetimeFormatters:new Map,v=m(R.__numberFormatters)?R.__numberFormatters:new Map,F=m(R.__meta)?R.__meta:{};we++;const x={version:n,cid:we,locale:r,fallbackLocale:a,messages:c,modifiers:N,pluralRules:p,missing:L,missingWarn:A,fallbackWarn:k,fallbackFormat:h,unresolving:O,postTranslation:I,processor:g,warnHtmlMessage:S,escapeParameter:y,messageCompiler:b,messageResolver:P,localeFallbacker:D,fallbackContext:M,onWarn:t,__meta:F};return x.datetimeFormats=i,x.numberFormats=d,x.__datetimeFormatters=U,x.__numberFormatters=v,x},e.createCoreError=function(e){return I(e,null,void 0)},e.createMessageContext=le,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:i}=e,[u,f,m,d]=nt(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn,_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const N=!!m.part,p=Le(e,m),L=s(e,o,p);if(!E(u)||""===u)return new Intl.DateTimeFormat(p,d).format(f);let A,C={},k=null;for(let c=0;c<L.length&&(A=L[c],C=n[A]||{},k=C[u],!T(k));c++)We(e,u,A,0,"datetime format");if(!T(k)||!E(A))return r?-1:u;let h=`${A}__${u}`;c(d)||(h=`${h}__${JSON.stringify(d)}`);let O=i.get(h);return O||(O=new Intl.DateTimeFormat(A,l({},k,d)),i.set(h,O)),N?O.formatToParts(f):O.format(f)},e.fallbackWithLocaleChain=he,e.fallbackWithSimple=ke,e.getAdditionalMeta=()=>Fe,e.getDevToolsHook=function(){return ie},e.getFallbackContext=()=>xe,e.getLocale=Le,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&m(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(de[e],...n)},e.handleMissing=We,e.initI18nDevTools=function(e,t,n){ie&&ie.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=Xe,e.isImplicitFallback=Ye,e.isMessageAST=Be,e.isMessageFunction=Je,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,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:i}=e,[u,f,m,d]=ot(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn,_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const N=!!m.part,p=Le(e,m),L=s(e,o,p);if(!E(u)||""===u)return new Intl.NumberFormat(p,d).format(f);let A,C={},k=null;for(let c=0;c<L.length&&(A=L[c],C=n[A]||{},k=C[u],!T(k));c++)We(e,u,A,0,"number format");if(!T(k)||!E(A))return r?-1:u;let h=`${A}__${u}`;c(d)||(h=`${h}__${JSON.stringify(d)}`);let O=i.get(h);return O||(O=new Intl.NumberFormat(A,l({},k,d)),i.set(h,O)),N?O.formatToParts(f):O.format(f)},e.parse=Z,e.parseDateTimeArgs=nt,e.parseNumberArgs=ot,e.parseTranslateArgs=et,e.registerLocaleFallbacker=ve,e.registerMessageCompiler=Re,e.registerMessageResolver=Ue,e.resolveLocale=Ce,e.resolveValue=te,e.resolveWithKeyValue=ee,e.setAdditionalMeta=e=>{Fe=e},e.setDevToolsHook=function(e){ie=e},e.setFallbackContext=e=>{xe=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:s,fallbackLocale:c,messages:l}=e,[f,d]=et(...t),N=_(d.missingWarn)?d.missingWarn:e.missingWarn,p=_(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,T=_(d.escapeParameter)?d.escapeParameter:e.escapeParameter,L=!!d.resolvedMessage,A=E(d.default)||_(d.default)?_(d.default)?s?f:()=>f:d.default:n?s?f:()=>f:"",C=n||""!==A,k=Le(e,d);T&&function(e){u(e.list)?e.list=e.list.map((e=>E(e)?i(e):e)):m(e.named)&&Object.keys(e.named).forEach((t=>{E(e.named[t])&&(e.named[t]=i(e.named[t]))}))}(d);let[h,O,I]=L?[f,k,l[k]||{}]:Ze(e,f,k,c,p,N),g=h,S=f;if(L||E(g)||Be(g)||Je(g)||C&&(g=A,S=g),!(L||(E(g)||Be(g)||Je(g))&&E(O)))return a?-1:f;let y=!1;const b=Je(g)?g:qe(e,f,O,g,S,(()=>{y=!0}));if(y)return g;const P=function(e,t,n,r){const{modifiers:a,pluralRules:s,messageResolver:c,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,_=r=>{let o=c(n,r);if(null==o&&f){const[,,e]=Ze(f,r,t,l,i,u);o=c(e,r)}if(E(o)||Be(o)){let n=!1;const a=qe(e,r,t,o,r,(()=>{n=!0}));return n?Qe:a}return Je(o)?o:Qe},m={locale:t,modifiers:a,pluralRules:s,messages:_};e.processor&&(m.processor=e.processor);r.list&&(m.list=r.list);r.named&&(m.named=r.named);o(r.plural)&&(m.pluralIndex=r.plural);return m}(e,O,I,d),D=function(e,t,n){const r=t(n);return r}(0,b,le(P));return r?r(D,f):D},e.translateDevTools=ue,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},e}({}); | ||
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=>k(e)&&0===Object.keys(e).length,l=Object.assign,i=Object.create,u=(e=null)=>i(e);function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const E=Object.prototype.hasOwnProperty;function _(e,t){return E.call(e,t)}const m=Array.isArray,d=e=>"function"==typeof e,p=e=>"string"==typeof e,N=e=>"boolean"==typeof e,T=e=>null!==e&&"object"==typeof e,L=e=>T(e)&&d(e.then)&&d(e.catch),A=Object.prototype.toString,C=e=>A.call(e),k=e=>{if(!T(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function h(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function O(e){let t=e;return()=>++t}function I(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function g(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const S={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};const y={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,__EXTEND_POINT__:17};function b(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 P(e){throw e}y.EXPECTED_TOKEN,y.INVALID_TOKEN_IN_PLACEHOLDER,y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,y.UNKNOWN_ESCAPE_SEQUENCE,y.INVALID_UNICODE_ESCAPE_SEQUENCE,y.UNBALANCED_CLOSING_BRACE,y.UNTERMINATED_CLOSING_BRACE,y.EMPTY_PLACEHOLDER,y.NOT_ALLOW_NEST_PLACEHOLDER,y.INVALID_LINKED_FORMAT,y.MUST_HAVE_MESSAGES_IN_PLURAL,y.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.UNEXPECTED_EMPTY_LINKED_KEY,y.UNEXPECTED_LEXICAL_ANALYSIS,y.UNHANDLED_CODEGEN_NODE_TYPE,y.UNHANDLED_MINIFIER_NODE_TYPE;const D=" ",M="\r",R="\n",U=String.fromCharCode(8232),v=String.fromCharCode(8233);function x(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>t[e]===M&&t[e+1]===R,a=e=>t[e]===v,l=e=>t[e]===U,i=e=>s(e)||(e=>t[e]===R)(e)||a(e)||l(e),u=e=>s(e)||a(e)||l(e)?R: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 F=void 0,w="'";function W(e,t={}){const n=!1!==t.location,r=x(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:14,offset:a,startLoc:s,endLoc:s,lastType:14,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=g(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const E=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(y.EXPECTED_TOKEN,c(),"")}function m(e){let t="";for(;e.currentPeek()===D||e.currentPeek()===R;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=m(e);return e.skipToPeek(),t}function p(e){if(e===F)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===F)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function L(e,t=!0){const n=(t=!1,r="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==r&&t:"@"!==c&&c?"%"===c?(e.peek(),n(t,"%",!0)):"|"===c?!("%"!==r&&!o)||!(r===D||r===R):c===D?(e.peek(),n(!0,D,o)):c!==R||(e.peek(),n(!0,R,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function A(e,t){const n=e.currentChar();return n===F?F: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 k(e){return A(e,C)}function h(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 O(e){return A(e,h)}function I(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function S(e){return A(e,I)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function P(e){return A(e,b)}function M(e){let t="",n="";for(;t=S(e);)n+=t;return n}function U(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!L(e))break;t+=n,e.next()}else if(n===D||n===R)if(L(e))t+=n,e.next();else{if(T(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function v(e){return e!==w&&e!==R}function W(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 y.UNKNOWN_ESCAPE_SEQUENCE,c(),""}}function X(e,t,n){_(e,t);let r="";for(let o=0;o<n;o++){const t=P(e);if(!t){y.INVALID_UNICODE_ESCAPE_SEQUENCE,c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function Y(e){return"{"!==e&&"}"!==e&&e!==D&&e!==R}function G(e){d(e);const t=_(e,"|");return d(e),t}function K(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(y.NOT_ALLOW_NEST_PLACEHOLDER,c()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(y.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&&(y.UNTERMINATED_CLOSING_BRACE,c()),n=$(e,t)||E(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&(y.UNTERMINATED_CLOSING_BRACE,c()),n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return y.UNTERMINATED_CLOSING_BRACE,c(),t.braceNest=0,V(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,5,function(e){d(e);let t="",n="";for(;t=O(e);)n+=t;return e.currentChar()===F&&(y.UNTERMINATED_CLOSING_BRACE,c()),n}(e)),d(e),n;if(o=N(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${M(e)}`):t+=M(e),e.currentChar()===F&&(y.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()===w;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),_(e,"'");let t="",n="";for(;t=A(e,v);)n+="\\"===t?W(e):t;const r=e.currentChar();return r===R||r===F?(y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),r===R&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";for(;t=A(e,Y);)n+=t;return n}(e)),y.INVALID_TOKEN_IN_PLACEHOLDER,c(),n.value,d(e),n;break}}return n}function $(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==R&&o!==D||(y.INVALID_LINKED_FORMAT,c()),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),$(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;m(e);const r=p(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=k(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===D||!t)&&(t===R?(e.peek(),r()):L(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?K(e,t)||r:f(t,11,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"%"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===D?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(8===n&&(y.INVALID_LINKED_FORMAT,c()),t.braceNest=0,t.inLinked=!1,V(e,t))}}function V(e,t){let n={type:14};if(t.braceNest>0)return K(e,t)||E(t);if(t.inLinked)return $(e,t)||E(t);switch(e.currentChar()){case"{":return K(e,t)||E(t);case"}":return y.UNBALANCED_CLOSING_BRACE,c(),e.next(),f(t,3,"}");case"@":return $(e,t)||E(t);default:{if(T(e))return n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=m(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?f(t,0,U(e)):f(t,4,function(e){d(e);const t=e.currentChar();return"%"!==t&&(y.EXPECTED_TOKEN,c()),e.next(),"%"}(e));if(L(e))return f(t,0,U(e));break}}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()===F?f(l,14):V(r,l)},currentOffset:o,currentPosition:c,context:i}}const X=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Y(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 G(e={}){const t=!1!==e.location,{onError:n,onWarn:r}=e;function o(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function c(e,n,r,o){o&&(e.type=o),t&&(e.end=n,e.loc&&(e.loc.end=r))}function s(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,c(r,e.currentOffset(),e.currentPosition()),r}function a(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(5,r,s);return a.index=parseInt(t,10),e.nextToken(),c(a,e.currentOffset(),e.currentPosition()),a}function i(e,t,n){const r=e.context(),{lastOffset:s,lastStartLoc:a}=r,l=o(4,s,a);return l.key=t,!0===n&&(l.modulo=!0),e.nextToken(),c(l,e.currentOffset(),e.currentPosition()),l}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(9,r,s);return a.value=t.replace(X,Y),e.nextToken(),c(a,e.currentOffset(),e.currentPosition()),a}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(8,r,s);return 12!==t.type?(y.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,a.value="",c(a,r,s),{nextConsumeToken:t,node:a}):(null==t.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,K(t)),a.value=t.value||"",c(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,c(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=i(e,r.value||"");break;case 6:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=a(e,r.value||"");break;case 7:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=u(e,r.value||"");break;default:{y.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),a=o(7,s.offset,s.startLoc);return a.value="",c(a,s.offset,s.startLoc),n.key=a,c(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}}return c(n,e.currentOffset(),e.currentPosition()),{node:n}}function E(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null,l=null;do{const o=r||e.nextToken();switch(r=null,o.type){case 0:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(s(e,o.value||""));break;case 6:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(a(e,o.value||""));break;case 4:l=!0;break;case 5:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(i(e,o.value||"",!!l)),l&&(S.USE_MODULO_SYNTAX,t.lastStartLoc,K(o),l=null);break;case 7:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(u(e,o.value||""));break;case 8:{const t=f(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return c(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function _(e){const t=e.context(),{offset:n,startLoc:r}=t,s=E(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let a=0===r.items.length;const l=o(1,t,n);l.cases=[],l.cases.push(r);do{const t=E(e);a||(a=0===t.items.length),l.cases.push(t)}while(14!==s.currentType);return a&&y.MUST_HAVE_MESSAGES_IN_PLURAL,c(l,e.currentOffset(),e.currentPosition()),l}(e,n,r,s)}return{parse:function(n){const r=W(n,l({},e)),s=r.context(),a=o(0,s.offset,s.startLoc);return t&&a.loc&&(a.loc.source=n),a.body=_(r),e.onCacheKey&&(a.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(y.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),c(a,r.currentOffset(),r.currentPosition()),a}}}function K(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function $(e,t){for(let n=0;n<e.length;n++)V(e[n],t)}function V(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:V(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 H(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&&V(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function B(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=h(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 j(e){switch(e.t=e.type,e.type){case 0:{const t=e;j(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++)j(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++)j(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;j(t.key),t.k=t.key,delete t.key,t.modifier&&(j(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 z(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?z(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&&(z(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&&(z(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")}(`),z(e,t.key),t.modifier?(e.push(", "),z(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 Q=(e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,c=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],l=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:c}=t,s=!1!==t.location,a={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:c,indentLevel:0};function l(e,t){a.code+=e}function i(e,t=!0){const n=t?o:"";l(c?n+" ".repeat(e):n)}return s&&e.loc&&(a.source=e.loc.source),{context:()=>a,push:l,indent:function(e=!0){const t=++a.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&i(t)},newline:function(){i(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:c,needIndent:s});l.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${h(a.map((e=>`${e}: _${e}`)),", ")} } = ctx`),l.newline()),l.push("return "),z(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:i,map:u}=l.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function J(e,t={}){const n=l({},t),r=!!n.jit,o=!!n.minify,c=null==n.optimize||n.optimize,s=G(n).parse(e);return r?(c&&function(e){const t=e.body;2===t.type?B(t):t.cases.forEach((e=>B(e)))}(s),o&&j(s),{ast:s,code:""}):(H(s,n),Q(s,n))}const Z=[];Z[0]={w:[0],i:[3,0],"[":[4],o:[7]},Z[1]={w:[1],".":[2],"[":[4],o:[7]},Z[2]={w:[2],i:[3,0],0:[3,0]},Z[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Z[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Z[5]={"'":[4,0],o:8,l:[5,0]},Z[6]={'"':[4,0],o:8,l:[6,0]};const q=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ee(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 te(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,q.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 ne(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=te(r),!1===r)return!1;E[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(c=ee(n),l=Z[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 re=new Map;function oe(e,t){return T(e)?e[t]:null}function ce(e,t){if(!T(e))return null;let n=re.get(t);if(n||(n=ne(t),n&&re.set(t,n)),!n)return null;const r=n.length;let o=e,c=0;for(;c<r;){const e=o[n[c]];if(void 0===e)return null;if(d(o))return null;o=e,c++}return o}const se=e=>e,ae=e=>"",le="text",ie=e=>0===e.length?"":h(e),ue=e=>null==e?"":m(e)||k(e)&&e.toString===A?JSON.stringify(e,null,2):String(e);function fe(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Ee(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=T(e.pluralRules)&&p(t)&&d(e.pluralRules[t])?e.pluralRules[t]:fe,c=T(e.pluralRules)&&p(t)&&d(e.pluralRules[t])?fe:void 0,s=e.list||[],a=e.named||u();o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function i(t){const n=d(e.messages)?e.messages(t):!!T(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):ae)}const f=k(e.processor)&&d(e.processor.normalize)?e.processor.normalize:ie,E=k(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:ue,_={list:e=>s[e],named:e=>a[e],plural:e=>e[r(n,e.length,c)],linked:(t,...n)=>{const[r,o]=n;let c="text",s="";1===n.length?T(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=i(t)(_),l="vnode"===c&&m(a)&&s?a[0]:a;return s?(u=s,e.modifiers?e.modifiers[u]:se)(l,c):l;var u},message:i,type:k(e.processor)&&p(e.processor.type)?e.processor.type:le,interpolate:E,normalize:f,values:l(u(),s,a)};return _}let _e=null;const me=de("function:translate");function de(e){return t=>_e&&_e.emit(e,t)}const pe=S.__EXTEND_POINT__,Ne=O(pe),Te={NOT_FOUND_KEY:pe,FALLBACK_TO_TRANSLATE:Ne(),CANNOT_FORMAT_NUMBER:Ne(),FALLBACK_TO_NUMBER_FORMAT:Ne(),CANNOT_FORMAT_DATE:Ne(),FALLBACK_TO_DATE_FORMAT:Ne(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:Ne(),__EXTEND_POINT__:Ne()},Le={[Te.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Te.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Te.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Te.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Te.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Te.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Te.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."};const Ae=y.__EXTEND_POINT__,Ce=O(Ae),ke={INVALID_ARGUMENT:Ae,INVALID_DATE_ARGUMENT:Ce(),INVALID_ISO_DATE_ARGUMENT:Ce(),NOT_SUPPORT_NON_STRING_MESSAGE:Ce(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:Ce(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:Ce(),NOT_SUPPORT_LOCALE_TYPE:Ce(),__EXTEND_POINT__:Ce()};function he(e,t){return null!=t.locale?Ie(t.locale):Ie(e.locale)}let Oe;function Ie(e){if(p(e))return e;if(d(e)){if(e.resolvedOnce&&null!=Oe)return Oe;if("Function"===e.constructor.name){const t=e();if(L(t))throw Error(ke.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Oe=t}throw Error(ke.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(ke.NOT_SUPPORT_LOCALE_TYPE)}function ge(e,t,n){return[...new Set([n,...m(t)?t:T(t)?Object.keys(t):p(t)?[t]:[n]])]}function Se(e,t,n){const r=p(n)?n:Me,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let c=o.__localeChainCache.get(r);if(!c){c=[];let e=[n];for(;m(e);)e=ye(c,e,t);const s=m(t)||!k(t)?t:t.default?t.default:null;e=p(s)?[s]:s,m(e)&&ye(c,e,!1),o.__localeChainCache.set(r,c)}return c}function ye(e,t,n){let r=!0;for(let o=0;o<t.length&&N(r);o++){const c=t[o];p(c)&&(r=be(e,t[o],n))}return r}function be(e,t,n){let r;const o=t.split("-");do{r=Pe(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Pe(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)||k(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 De="9.14.2",Me="en-US",Re=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let Ue,ve,xe;function Fe(e){Ue=e}function we(e){ve=e}function We(e){xe=e}let Xe=null;let Ye=null;let Ge=0;const Ke=e=>({[e]:u()});function $e(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 Ve(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function He(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(Ve(e,t[r]))return!0;return!1}function Be(e){return t=>function(e,t){const n=(r=t,st(r,je));var r;if(null==n)throw at(0);if(1===tt(n)){const t=function(e){return st(e,ze,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,Qe(e,n)]),[]))}return Qe(e,n)}(t,e)}const je=["b","body"];const ze=["c","cases"];function Qe(e,t){const n=function(e){return st(e,Je)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return st(e,Ze,[])}(t).reduce(((t,n)=>[...t,qe(e,n)]),[]);return e.normalize(n)}}const Je=["s","static"];const Ze=["i","items"];function qe(e,t){const n=tt(t);switch(n){case 3:case 9:case 7:case 8:return rt(t,n);case 4:{const r=t;if(_(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(_(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw at(n)}case 5:{const r=t;if(_(r,"i")&&o(r.i))return e.interpolate(e.list(r.i));if(_(r,"index")&&o(r.index))return e.interpolate(e.list(r.index));throw at(n)}case 6:{const n=t,r=function(e){return st(e,ot)}(n),o=function(e){const t=st(e,ct);if(t)return t;throw at(6)}(n);return e.linked(qe(e,o),r?qe(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}const et=["t","type"];function tt(e){return st(e,et)}const nt=["v","value"];function rt(e,t){const n=st(e,nt);if(n)return n;throw at(t)}const ot=["m","modifier"];const ct=["k","key"];function st(e,t,n){for(let r=0;r<t.length;r++){const n=t[r];if(_(e,n)&&null!=e[n])return e[n]}return n}function at(e){return new Error(`unhandled node type: ${e}`)}const lt=e=>e;let it=u();function ut(e){return T(e)&&0===tt(e)&&(_(e,"b")||_(e,"body"))}function ft(e,t={}){let n=!1;const r=t.onError||P;return t.onError=e=>{n=!0,r(e)},{...J(e,t),detectError:n}}function Et(e,t){if(p(e)){!N(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||lt)(e),r=it[n];if(r)return r;const{ast:o,detectError:c}=ft(e,{...t,location:!1,jit:!0}),s=Be(o);return c?s:it[n]=s}{const t=e.cacheKey;if(t){const n=it[t];return n||(it[t]=Be(e))}return Be(e)}}const _t=()=>"",mt=e=>d(e);function dt(e,t,n,r,o,c){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:i}=e,f=i(e,r,n);let E,_=u(),m=null;for(let d=0;d<f.length&&(E=f[d],_=s[E]||u(),null===(m=l(_,t))&&(m=_[t]),!(p(m)||ut(m)||mt(m)));d++)if(!He(E,f)){const n=$e(e,t,E,0,"translate");n!==t&&(m=n)}return[m,E,_]}function pt(e,t,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:l}=e;if(mt(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 Nt(...e){const[t,n,r]=e,c=u();if(!(p(t)||o(t)||mt(t)||ut(t)))throw Error(ke.INVALID_ARGUMENT);const s=o(t)?String(t):(mt(t),t);return o(n)?c.plural=n:p(n)?c.default=n:k(n)&&!a(n)?c.named=n:m(n)&&(c.list=n),o(r)?c.plural=r:p(r)?c.default=r:k(r)&&l(c,r),[s,c]}const Tt=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Lt(...e){const[t,n,r,s]=e,a=u();let l,i=u();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();l=new Date(n);try{l.toISOString()}catch(f){throw Error(ke.INVALID_ISO_DATE_ARGUMENT)}}else if(c(t)){if(isNaN(t.getTime()))throw Error(ke.INVALID_DATE_ARGUMENT);l=t}else{if(!o(t))throw Error(ke.INVALID_ARGUMENT);l=t}return p(n)?a.key=n:k(n)&&Object.keys(n).forEach((e=>{Tt.includes(e)?i[e]=n[e]:a[e]=n[e]})),p(r)?a.locale=r:k(r)&&(i=r),k(s)&&(i=s),[a.key||"",l,a,i]}const At=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ct(...e){const[t,n,r,c]=e,s=u();let a=u();if(!o(t))throw Error(ke.INVALID_ARGUMENT);const l=t;return p(n)?s.key=n:k(n)&&Object.keys(n).forEach((e=>{At.includes(e)?a[e]=n[e]:s[e]=n[e]})),p(r)?s.locale=r:k(r)&&(a=r),k(c)&&(a=c),[s.key||"",l,s,a]}return Fe(Et),we(ce),We(Se),e.CompileErrorCodes=y,e.CoreErrorCodes=ke,e.CoreWarnCodes=Te,e.DATETIME_FORMAT_OPTIONS_KEYS=Tt,e.DEFAULT_LOCALE=Me,e.DEFAULT_MESSAGE_DATA_TYPE=le,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=At,e.VERSION=De,e.clearCompileCache=function(){it=u()},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}},e.compile=Et,e.compileToFunction=(e,t)=>{if(!p(e))throw Error(ke.NOT_SUPPORT_NON_STRING_MESSAGE);{!N(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||lt)(e),r=it[n];if(r)return r;const{code:o,detectError:c}=ft(e,t),s=new Function(`return ${o}`)();return c?s:it[n]=s}},e.createCompileError=b,e.createCoreContext=function(e={}){const t=d(e.onWarn)?e.onWarn:I,n=p(e.version)?e.version:De,r=p(e.locale)||d(e.locale)?e.locale:Me,o=d(r)?Me:r,c=m(e.fallbackLocale)||k(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=k(e.messages)?e.messages:Ke(o),i=k(e.datetimeFormats)?e.datetimeFormats:Ke(o),f=k(e.numberFormats)?e.numberFormats:Ke(o),E=l(u(),e.modifiers,{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&T(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&T(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?Re(e):"vnode"===t&&T(e)&&"__v_isVNode"in e?Re(e.children):e}),_=e.pluralRules||u(),L=d(e.missing)?e.missing:null,A=!N(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,C=!N(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,O=!!e.unresolving,g=d(e.postTranslation)?e.postTranslation:null,S=k(e.processor)?e.processor:null,y=!N(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,P=d(e.messageCompiler)?e.messageCompiler:Ue,D=d(e.messageResolver)?e.messageResolver:ve||oe,M=d(e.localeFallbacker)?e.localeFallbacker:xe||ge,R=T(e.fallbackContext)?e.fallbackContext:void 0,U=e,v=T(U.__datetimeFormatters)?U.__datetimeFormatters:new Map,x=T(U.__numberFormatters)?U.__numberFormatters:new Map,F=T(U.__meta)?U.__meta:{};Ge++;const w={version:n,cid:Ge,locale:r,fallbackLocale:c,messages:a,modifiers:E,pluralRules:_,missing:L,missingWarn:A,fallbackWarn:C,fallbackFormat:h,unresolving:O,postTranslation:g,processor:S,warnHtmlMessage:y,escapeParameter:b,messageCompiler:P,messageResolver:D,localeFallbacker:M,fallbackContext:R,onWarn:t,__meta:F};return w.datetimeFormats=i,w.numberFormats=f,w.__datetimeFormatters=v,w.__numberFormatters=x,w},e.createCoreError=function(e){return b(e,null,void 0)},e.createMessageContext=Ee,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:c,localeFallbacker:s}=e,{__datetimeFormatters:i}=e,[u,f,E,_]=Lt(...t);N(E.missingWarn)?E.missingWarn:e.missingWarn,N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn;const m=!!E.part,d=he(e,E),T=s(e,o,d);if(!p(u)||""===u)return new Intl.DateTimeFormat(d,_).format(f);let L,A={},C=null;for(let a=0;a<T.length&&(L=T[a],A=n[L]||{},C=A[u],!k(C));a++)$e(e,u,L,0,"datetime format");if(!k(C)||!p(L))return r?-1:u;let h=`${L}__${u}`;a(_)||(h=`${h}__${JSON.stringify(_)}`);let O=i.get(h);return O||(O=new Intl.DateTimeFormat(L,l({},C,_)),i.set(h,O)),m?O.formatToParts(f):O.format(f)},e.fallbackWithLocaleChain=Se,e.fallbackWithSimple=ge,e.getAdditionalMeta=()=>Xe,e.getDevToolsHook=function(){return _e},e.getFallbackContext=()=>Ye,e.getLocale=he,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&T(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(Le[e],...n)},e.handleMissing=$e,e.initI18nDevTools=function(e,t,n){_e&&_e.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=Ve,e.isImplicitFallback=He,e.isMessageAST=ut,e.isMessageFunction=mt,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,fallbackLocale:o,onWarn:c,localeFallbacker:s}=e,{__numberFormatters:i}=e,[u,f,E,_]=Ct(...t);N(E.missingWarn)?E.missingWarn:e.missingWarn,N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn;const m=!!E.part,d=he(e,E),T=s(e,o,d);if(!p(u)||""===u)return new Intl.NumberFormat(d,_).format(f);let L,A={},C=null;for(let a=0;a<T.length&&(L=T[a],A=n[L]||{},C=A[u],!k(C));a++)$e(e,u,L,0,"number format");if(!k(C)||!p(L))return r?-1:u;let h=`${L}__${u}`;a(_)||(h=`${h}__${JSON.stringify(_)}`);let O=i.get(h);return O||(O=new Intl.NumberFormat(L,l({},C,_)),i.set(h,O)),m?O.formatToParts(f):O.format(f)},e.parse=ne,e.parseDateTimeArgs=Lt,e.parseNumberArgs=Ct,e.parseTranslateArgs=Nt,e.registerLocaleFallbacker=We,e.registerMessageCompiler=Fe,e.registerMessageResolver=we,e.resolveLocale=Ie,e.resolveValue=ce,e.resolveWithKeyValue=oe,e.setAdditionalMeta=e=>{Xe=e},e.setDevToolsHook=function(e){_e=e},e.setFallbackContext=e=>{Ye=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:c,messageCompiler:s,fallbackLocale:a,messages:l}=e,[i,E]=Nt(...t),_=N(E.missingWarn)?E.missingWarn:e.missingWarn,d=N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn,L=N(E.escapeParameter)?E.escapeParameter:e.escapeParameter,A=!!E.resolvedMessage,C=p(E.default)||N(E.default)?N(E.default)?s?i:()=>i:E.default:n?s?i:()=>i:"",k=n||""!==C,h=he(e,E);L&&function(e){m(e.list)?e.list=e.list.map((e=>p(e)?f(e):e)):T(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=f(e.named[t]))}))}(E);let[O,I,g]=A?[i,h,l[h]||u()]:dt(e,i,h,a,d,_),S=O,y=i;if(A||p(S)||ut(S)||mt(S)||k&&(S=C,y=S),!(A||(p(S)||ut(S)||mt(S))&&p(I)))return c?-1:i;let b=!1;const P=mt(S)?S:pt(e,i,I,S,y,(()=>{b=!0}));if(b)return S;const D=function(e,t,n,r){const{modifiers:c,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,E=r=>{let o=a(n,r);if(null==o&&f){const[,,e]=dt(f,r,t,l,i,u);o=a(e,r)}if(p(o)||ut(o)){let n=!1;const c=pt(e,r,t,o,r,(()=>{n=!0}));return n?_t:c}return mt(o)?o:_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,I,g,E),M=function(e,t,n){const r=t(n);return r}(0,P,Ee(D));return r?r(M,i):M},e.translateDevTools=me,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},e}({}); |
/*! | ||
* core v9.14.1 | ||
* core v9.14.2 | ||
* (c) 2024 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format$1(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}function incrementer(e){let t=e;return()=>++t}function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function createPosition(e,t,r){return{line:e,column:t,offset:r}}function createLocation(e,t,r){const n={start:e,end:t};return null!=r&&(n.source=r),n}const CompileWarnCodes={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};function createCompileWarn(e,t,...r){const n={message:String(e),code:e};return t&&(n.location=t),n}const CompileErrorCodes={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,__EXTEND_POINT__:17};function createCompileError(e,t,r={}){const{domain:n,messages:o,args:s}=r,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=n,a}function defaultOnError(e){throw e}CompileErrorCodes.EXPECTED_TOKEN,CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,CompileErrorCodes.UNBALANCED_CLOSING_BRACE,CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,CompileErrorCodes.EMPTY_PLACEHOLDER,CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,CompileErrorCodes.INVALID_LINKED_FORMAT,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE,CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE;const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let r=0,n=1,o=1,s=0;const a=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,i=e=>t[e]===CHAR_PS,c=e=>t[e]===CHAR_LS,l=e=>a(e)||(e=>t[e]===CHAR_LF)(e)||i(e)||c(e),u=e=>a(e)||i(e)||c(e)?CHAR_LF:t[e];function E(){return s=0,l(r)&&(n++,o=0),a(r)&&r++,r++,o++,t[r]}return{index:()=>r,line:()=>n,column:()=>o,peekOffset:()=>s,charAt:u,currentChar:()=>u(r),currentPeek:()=>u(r+s),next:E,peek:function(){return a(r+s)&&s++,s++,t[r+s]},reset:function(){r=0,n=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=r+s;for(;e!==r;)E();s=0}}}const EOF=void 0,DOT=".",LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const r=!1!==t.location,n=createScanner(e),o=()=>n.index(),s=()=>createPosition(n.line(),n.column(),n.index()),a=s(),i=o(),c={currentType:14,offset:i,startLoc:a,endLoc:a,lastType:14,lastOffset:i,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>c,{onError:u}=t;function E(e,t,n){e.endLoc=s(),e.currentType=t;const o={type:t};return r&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(o.value=n),o}const f=e=>E(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,s(),"")}function _(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=_(e);return e.skipToPeek(),t}function p(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function d(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function N(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function T(e,t=!0){const r=(t=!1,n="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==n&&t:"@"!==s&&s?"%"===s?(e.peek(),r(t,"%",!0)):"|"===s?!("%"!==n&&!o)||!(n===CHAR_SP||n===CHAR_LF):s===CHAR_SP?(e.peek(),r(!0,CHAR_SP,o)):s!==CHAR_LF||(e.peek(),r(!0,CHAR_LF,o)):"%"===n||t},n=r();return t&&e.resetPeek(),n}function g(e,t){const r=e.currentChar();return r===EOF?EOF:t(r)?(e.next(),r):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 L(e){return g(e,A)}function O(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 S(e){return g(e,O)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function h(e){return g(e,b)}function k(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function P(e){return g(e,k)}function I(e){let t="",r="";for(;t=h(e);)r+=t;return r}function M(e){let t="";for(;;){const r=e.currentChar();if("{"===r||"}"===r||"@"===r||"|"===r||!r)break;if("%"===r){if(!T(e))break;t+=r,e.next()}else if(r===CHAR_SP||r===CHAR_LF)if(T(e))t+=r,e.next();else{if(N(e))break;t+=r,e.next()}else t+=r,e.next()}return t}function y(e){return e!==LITERAL_DELIMITER&&e!==CHAR_LF}function D(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 CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,s(),""}}function R(e,t,r){m(e,t);let n="";for(let o=0;o<r;o++){const t=P(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),e.currentChar();break}n+=t}return`\\${t}${n}`}function F(e){return"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF}function v(e){C(e);const t=m(e,"|");return C(e),t}function U(e,t){let r=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,s()),e.next(),r=E(t,2,"{"),C(e),t.braceNest++,r;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,s()),e.next(),r=E(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),r;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=x(e,t)||f(t),t.braceNest=0,r;default:{let n=!0,o=!0,a=!0;if(N(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s(),t.braceNest=0,w(e,t);if(n=function(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t))return r=E(t,5,function(e){C(e);let t="",r="";for(;t=S(e);)r+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r}(e)),C(e),r;if(o=d(e,t))return r=E(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),t}(e)),C(e),r;if(a=function(e,t){const{currentType:r}=t;if(2!==r)return!1;_(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return r=E(t,7,function(e){C(e),m(e,"'");let t="",r="";for(;t=g(e,y);)r+="\\"===t?D(e):t;const n=e.currentChar();return n===CHAR_LF||n===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),n===CHAR_LF&&(e.next(),m(e,"'")),r):(m(e,"'"),r)}(e)),C(e),r;if(!n&&!o&&!a)return r=E(t,13,function(e){C(e);let t="",r="";for(;t=g(e,F);)r+=t;return r}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,s(),r.value,C(e),r;break}}return r}function x(e,t){const{currentType:r}=t;let n=null;const o=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||o!==CHAR_LF&&o!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),o){case"@":return e.next(),n=E(t,8,"@"),t.inLinked=!0,n;case".":return C(e),e.next(),E(t,9,".");case":":return C(e),e.next(),E(t,10,":");default:return N(e)?(n=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:r}=t;if(8!==r)return!1;_(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:r}=t;if(8!==r&&12!==r)return!1;_(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(C(e),x(e,t)):function(e,t){const{currentType:r}=t;if(9!==r)return!1;_(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t)?(C(e),E(t,12,function(e){let t="",r="";for(;t=L(e);)r+=t;return r}(e))):function(e,t){const{currentType:r}=t;if(10!==r)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):T(e,!1))},o=n();return e.resetPeek(),o}(e,t)?(C(e),"{"===o?U(e,t)||n:E(t,11,function(e){const t=r=>{const n=e.currentChar();return"{"!==n&&"%"!==n&&"@"!==n&&"|"!==n&&"("!==n&&")"!==n&&n?n===CHAR_SP?r:(r+=n,e.next(),t(r)):r};return t("")}(e))):(8===r&&(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let r={type:14};if(t.braceNest>0)return U(e,t)||f(t);if(t.inLinked)return x(e,t)||f(t);switch(e.currentChar()){case"{":return U(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,s(),e.next(),E(t,3,"}");case"@":return x(e,t)||f(t);default:{if(N(e))return r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;const{isModulo:n,hasSpace:o}=function(e){const t=_(e),r="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:r,hasSpace:t.length>0}}(e);if(n)return o?E(t,0,M(e)):E(t,4,function(e){C(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,s()),e.next(),"%"}(e));if(T(e))return E(t,0,M(e));break}}return r}return{nextToken:function(){const{currentType:e,offset:t,startLoc:r,endLoc:a}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=r,c.lastEndLoc=a,c.offset=o(),c.startLoc=s(),n.currentChar()===EOF?E(c,14):w(n,c)},currentOffset:o,currentPosition:s,context:l}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,r){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||r,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:r,onWarn:n}=e;function o(e,r,n){const o={type:e};return t&&(o.start=r,o.end=r,o.loc={start:n,end:n}),o}function s(e,r,n,o){o&&(e.type=o),t&&(e.end=r,e.loc&&(e.loc.end=n))}function a(e,t){const r=e.context(),n=o(3,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}function i(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(5,n,a);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function c(e,t,r){const n=e.context(),{lastOffset:a,lastStartLoc:i}=n,c=o(4,a,i);return c.key=t,!0===r&&(c.modulo=!0),e.nextToken(),s(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(9,n,a);return i.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e){const t=e.context(),r=o(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(8,n,a);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,i.value="",s(i,n,a),{nextConsumeToken:t,node:i}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,getTokenCaption(t)),i.value=t.value||"",s(i,e.currentOffset(),e.currentPosition()),{node:i})}(e);r.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=function(e,t){const r=e.context(),n=o(7,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=c(e,n.value||"");break;case 6:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=i(e,n.value||"");break;case 7:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=l(e,n.value||"");break;default:{CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const a=e.context(),i=o(7,a.offset,a.startLoc);return i.value="",s(i,a.offset,a.startLoc),r.key=i,s(r,a.offset,a.startLoc),{nextConsumeToken:n,node:r}}}return s(r,e.currentOffset(),e.currentPosition()),{node:r}}function E(e){const t=e.context(),r=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);r.items=[];let n=null,E=null;do{const o=n||e.nextToken();switch(n=null,o.type){case 0:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(a(e,o.value||""));break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(i(e,o.value||""));break;case 4:E=!0;break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(c(e,o.value||"",!!E)),E&&(CompileWarnCodes.USE_MODULO_SYNTAX,t.lastStartLoc,getTokenCaption(o),E=null);break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(l(e,o.value||""));break;case 8:{const t=u(e);r.items.push(t.node),n=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return s(r,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),r}function f(e){const t=e.context(),{offset:r,startLoc:n}=t,a=E(e);return 14===t.currentType?a:function(e,t,r,n){const a=e.context();let i=0===n.items.length;const c=o(1,t,r);c.cases=[],c.cases.push(n);do{const t=E(e);i||(i=0===t.items.length),c.cases.push(t)}while(14!==a.currentType);return i&&CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,s(c,e.currentOffset(),e.currentPosition()),c}(e,r,n,a)}return{parse:function(r){const n=createTokenizer(r,assign({},e)),a=n.context(),i=o(0,a.offset,a.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=f(n),e.onCacheKey&&(i.cacheKey=e.onCacheKey(r)),14!==a.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,r[a.offset]),s(i,n.currentOffset(),n.currentPosition()),i}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const r={ast:e,helpers:new Set};return{context:()=>r,helper:e=>(r.helpers.add(e),e)}}function traverseNodes(e,t){for(let r=0;r<e.length;r++)traverseNode(e[r],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(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 transform(e,t={}){const r=createTransformer(e);r.helper("normalize"),e.body&&traverseNode(e.body,r);const n=r.context();e.helpers=Array.from(n.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(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 r=0;r<e.items.length;r++){const n=e.items[r];if(3!==n.type&&9!==n.type)break;if(null==n.value)break;t.push(n.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const r=e.items[t];3!==r.type&&9!==r.type||delete r.value}}}}function minify(e){switch(e.t=e.type,e.type){case 0:{const t=e;minify(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,r=t.cases;for(let e=0;e<r.length;e++)minify(r[e]);t.c=r,delete t.cases;break}case 2:{const t=e,r=t.items;for(let e=0;e<r.length;e++)minify(r[e]);t.i=r,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;minify(t.key),t.k=t.key,delete t.key,t.modifier&&(minify(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 createCodeGenerator(e,t){const{sourceMap:r,filename:n,breakLineCode:o,needIndent:s}=t,a=!1!==t.location,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};a&&e.loc&&(i.source=e.loc.source);function c(e,t){i.code+=e}function l(e,t=!0){const r=t?o:"";c(s?r+" ".repeat(e):r)}return{context:()=>i,push:c,indent:function(e=!0){const t=++i.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--i.indentLevel;e&&l(t)},newline:function(){l(i.indentLevel)},helper:e=>`_${e}`,needIndent:()=>i.needIndent}}function generateLinkedNode(e,t){const{helper:r}=e;e.push(`${r("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:r,needIndent:n}=e;e.push(`${r("normalize")}([`),e.indent(n());const o=t.items.length;for(let s=0;s<o&&(generateNode(e,t.items[s]),s!==o-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function generatePluralNode(e,t){const{helper:r,needIndent:n}=e;if(t.cases.length>1){e.push(`${r("plural")}([`),e.indent(n());const o=t.cases.length;for(let r=0;r<o&&(generateNode(e,t.cases[r]),r!==o-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:r}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${r("interpolate")}(${r("list")}(${t.index}))`,t);break;case 4:e.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const r=isString(t.mode)?t.mode:"normal",n=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==r,i=e.helpers||[],c=createCodeGenerator(e,{mode:r,filename:n,sourceMap:o,breakLineCode:s,needIndent:a});c.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(a),i.length>0&&(c.push(`const { ${join(i.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),generateNode(c,e),c.deindent(a),c.push("}"),delete e.helpers;const{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const r=assign({},t),n=!!r.jit,o=!!r.minify,s=null==r.optimize||r.optimize,a=createParser(r).parse(e);return n?(s&&optimize(a),o&&minify(a),{ast:a,code:""}):(transform(a,r),generate(a,r))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let r,n,o,s,a,i,c,l=-1,u=0,E=0;const f=[];function m(){const t=e[l+1];if(5===u&&"'"===t||6===u&&'"'===t)return l++,o="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=o:n+=o},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),E++},f[3]=()=>{if(E>0)E--,u=4,f[0]();else{if(E=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;f[1]()}};null!==u;)if(l++,r=e[l],"\\"!==r||!m()){if(s=getPathCharType(r),c=pathStateMachine[u],a=c[s]||c.l||8,8===a)return;if(u=a[0],void 0!==a[1]&&(i=f[a[1]],i&&(o=r,!1===i())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let r=cache.get(t);if(r||(r=parse(t),r&&cache.set(t,r)),!r)return null;const n=r.length;let o=e,s=0;for(;s<n;){const e=o[r[s]];if(void 0===e)return null;if(isFunction(o))return null;o=e,s++}return o}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,r=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,o=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,s=e.list||[],a=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(r,a);function i(t){const r=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const c=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,l=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>s[e],named:e=>a[e],plural:e=>e[n(r,e.length,o)],linked:(t,...r)=>{const[n,o]=r;let s="text",a="";1===r.length?isObject(n)?(a=n.modifier||a,s=n.type||s):isString(n)&&(a=n||a):2===r.length&&(isString(n)&&(a=n||a),isString(o)&&(s=o||s));const c=i(t)(u),l="vnode"===s&&isArray(c)&&a?c[0]:c;return a?(E=a,e.modifiers?e.modifiers[E]:DEFAULT_MODIFIER)(l,s):l;var E},message:i,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:l,normalize:c,values:assign({},s,a)};return u}let devtools=null;function setDevToolsHook(e){devtools=e}function getDevToolsHook(){return devtools}function initI18nDevTools(e,t,r){devtools&&devtools.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:r})}const translateDevTools=createDevToolsHook("function:translate");function createDevToolsHook(e){return t=>devtools&&devtools.emit(e,t)}const code$1=CompileWarnCodes.__EXTEND_POINT__,inc$1=incrementer(code$1),CoreWarnCodes={NOT_FOUND_KEY:code$1,FALLBACK_TO_TRANSLATE:inc$1(),CANNOT_FORMAT_NUMBER:inc$1(),FALLBACK_TO_NUMBER_FORMAT:inc$1(),CANNOT_FORMAT_DATE:inc$1(),FALLBACK_TO_DATE_FORMAT:inc$1(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:inc$1(),__EXTEND_POINT__:inc$1()},warnMessages={[CoreWarnCodes.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[CoreWarnCodes.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[CoreWarnCodes.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."};function getWarnMessage(e,...t){return format$1(warnMessages[e],...t)}const code=CompileErrorCodes.__EXTEND_POINT__,inc=incrementer(code),CoreErrorCodes={INVALID_ARGUMENT:code,INVALID_DATE_ARGUMENT:inc(),INVALID_ISO_DATE_ARGUMENT:inc(),NOT_SUPPORT_NON_STRING_MESSAGE:inc(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:inc(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:inc(),NOT_SUPPORT_LOCALE_TYPE:inc(),__EXTEND_POINT__:inc()};function createCoreError(e){return createCompileError(e,null,void 0)}function getLocale(e,t){return null!=t.locale?resolveLocale(t.locale):resolveLocale(e.locale)}let _resolveLocale;function resolveLocale(e){if(isString(e))return e;if(isFunction(e)){if(e.resolvedOnce&&null!=_resolveLocale)return _resolveLocale;if("Function"===e.constructor.name){const t=e();if(isPromise(t))throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=t}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(e,t,r){return[...new Set([r,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[r]])]}function fallbackWithLocaleChain(e,t,r){const n=isString(r)?r:DEFAULT_LOCALE,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(n);if(!s){s=[];let e=[r];for(;isArray(e);)e=appendBlockToChain(s,e,t);const a=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(a)?[a]:a,isArray(e)&&appendBlockToChain(s,e,!1),o.__localeChainCache.set(n,s)}return s}function appendBlockToChain(e,t,r){let n=!0;for(let o=0;o<t.length&&isBoolean(n);o++){const s=t[o];isString(s)&&(n=appendLocaleToChain(e,t[o],r))}return n}function appendLocaleToChain(e,t,r){let n;const o=t.split("-");do{n=appendItemToChain(e,o.join("-"),r),o.splice(-1,1)}while(o.length&&!0===n);return n}function appendItemToChain(e,t,r){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(isArray(r)||isPlainObject(r))&&r[o]&&(n=r[o])}return n}CoreErrorCodes.INVALID_ARGUMENT,CoreErrorCodes.INVALID_DATE_ARGUMENT,CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT,CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE,CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE,CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE;const VERSION="9.14.1",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _additionalMeta=null;const setAdditionalMeta=e=>{_additionalMeta=e},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isFunction(e.onWarn)?e.onWarn:warn,r=isString(e.version)?e.version:VERSION,n=isString(e.locale)||isFunction(e.locale)?e.locale:DEFAULT_LOCALE,o=isFunction(n)?DEFAULT_LOCALE:n,s=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=isPlainObject(e.messages)?e.messages:{[o]:{}},i=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},c=isPlainObject(e.numberFormats)?e.numberFormats:{[o]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),u=e.pluralRules||{},E=isFunction(e.missing)?e.missing:null,f=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,_=!!e.fallbackFormat,C=!!e.unresolving,p=isFunction(e.postTranslation)?e.postTranslation:null,d=isPlainObject(e.processor)?e.processor:null,N=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,T=!!e.escapeParameter,g=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,A=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,L=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,O=isObject(e.fallbackContext)?e.fallbackContext:void 0,S=e,b=isObject(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,h=isObject(S.__numberFormatters)?S.__numberFormatters:new Map,k=isObject(S.__meta)?S.__meta:{};_cid++;const P={version:r,cid:_cid,locale:n,fallbackLocale:s,messages:a,modifiers:l,pluralRules:u,missing:E,missingWarn:f,fallbackWarn:m,fallbackFormat:_,unresolving:C,postTranslation:p,processor:d,warnHtmlMessage:N,escapeParameter:T,messageCompiler:g,messageResolver:A,localeFallbacker:L,fallbackContext:O,onWarn:t,__meta:k};return P.datetimeFormats=i,P.numberFormats=c,P.__datetimeFormatters=b,P.__numberFormatters=h,P}function isTranslateFallbackWarn(e,t){return e instanceof RegExp?e.test(t):e}function isTranslateMissingWarn(e,t){return e instanceof RegExp?e.test(t):e}function handleMissing(e,t,r,n,o){const{missing:s,onWarn:a}=e;if(null!==s){const n=s(e,r,t,o);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,r){e.__localeChainCache=new Map,e.localeFallbacker(e,r,t)}function isAlmostSameLocale(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function isImplicitFallback(e,t){const r=t.indexOf(e);if(-1===r)return!1;for(let n=r+1;n<t.length;n++)if(isAlmostSameLocale(e,t[n]))return!0;return!1}function format(e){return t=>formatParts(t,e)}function formatParts(e,t){const r=t.b||t.body;if(1===(r.t||r.type)){const t=r,n=t.c||t.cases;return e.plural(n.reduce(((t,r)=>[...t,formatMessageParts(e,r)]),[]))}return formatMessageParts(e,r)}function formatMessageParts(e,t){const r=t.s||t.static;if(r)return"text"===e.type?r:e.normalize([r]);{const r=(t.i||t.items).reduce(((t,r)=>[...t,formatMessagePart(e,r)]),[]);return e.normalize(r)}}function formatMessagePart(e,t){const r=t.t||t.type;switch(r){case 3:{const e=t;return e.v||e.value}case 9:{const e=t;return e.v||e.value}case 4:{const r=t;return e.interpolate(e.named(r.k||r.key))}case 5:{const r=t;return e.interpolate(e.list(null!=r.i?r.i:r.index))}case 6:{const r=t,n=r.m||r.modifier;return e.linked(formatMessagePart(e,r.k||r.key),n?formatMessagePart(e,n):void 0,e.type)}case 7:{const e=t;return e.v||e.value}case 8:{const e=t;return e.v||e.value}default:throw new Error(`unhandled node type on format message part: ${r}`)}}const defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function clearCompileCache(){compileCache=Object.create(null)}const isMessageAST=e=>isObject(e)&&(0===e.t||0===e.type)&&("b"in e||"body"in e);function baseCompile(e,t={}){let r=!1;const n=t.onError||defaultOnError;return t.onError=e=>{r=!0,n(e)},{...baseCompile$1(e,t),detectError:r}}const compileToFunction=(e,t)=>{if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);return()=>e};function compile(e,t){if(isString(e)){!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{ast:o,detectError:s}=baseCompile(e,{...t,location:!1,jit:!0}),a=format(o);return s?a:compileCache[r]=a}{const t=e.cacheKey;if(t){const r=compileCache[t];return r||(compileCache[t]=format(e))}return format(e)}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:r,postTranslation:n,unresolving:o,messageCompiler:s,fallbackLocale:a,messages:i}=e,[c,l]=parseTranslateArgs(...t),u=isBoolean(l.missingWarn)?l.missingWarn:e.missingWarn,E=isBoolean(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=isBoolean(l.escapeParameter)?l.escapeParameter:e.escapeParameter,m=!!l.resolvedMessage,_=isString(l.default)||isBoolean(l.default)?isBoolean(l.default)?s?c:()=>c:l.default:r?s?c:()=>c:"",C=r||""!==_,p=getLocale(e,l);f&&escapeParams(l);let[d,N,T]=m?[c,p,i[p]||{}]:resolveMessageFormat(e,c,p,a,E,u),g=d,A=c;if(m||isString(g)||isMessageAST(g)||isMessageFunction(g)||C&&(g=_,A=g),!(m||(isString(g)||isMessageAST(g)||isMessageFunction(g))&&isString(N)))return o?-1:c;let L=!1;const O=isMessageFunction(g)?g:compileMessageFormat(e,c,N,g,A,(()=>{L=!0}));if(L)return g;const S=evaluateMessage(e,O,createMessageContext(getMessageContextOptions(e,N,T,l)));return n?n(S,c):S}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,r,n,o,s){const{messages:a,onWarn:i,messageResolver:c,localeFallbacker:l}=e,u=l(e,n,r);let E,f={},m=null;for(let _=0;_<u.length&&(E=u[_],f=a[E]||{},null===(m=c(f,t))&&(m=f[t]),!(isString(m)||isMessageAST(m)||isMessageFunction(m)));_++)if(!isImplicitFallback(E,u)){const r=handleMissing(e,t,E,s,"translate");r!==t&&(m=r)}return[m,E,f]}function compileMessageFormat(e,t,r,n,o,s){const{messageCompiler:a,warnHtmlMessage:i}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>n;return e.locale=r,e.key=t,e}const c=a(n,getCompileContext(e,r,o,n,i,s));return c.locale=r,c.key=t,c.source=n,c}function evaluateMessage(e,t,r){return t(r)}function parseTranslateArgs(...e){const[t,r,n]=e,o={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(r)?o.plural=r:isString(r)?o.default=r:isPlainObject(r)&&!isEmptyObject(r)?o.named=r:isArray(r)&&(o.list=r),isNumber(n)?o.plural=n:isString(n)?o.default=n:isPlainObject(n)&&assign(o,n),[s,o]}function getCompileContext(e,t,r,n,o,s){return{locale:t,key:r,warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>generateFormatCacheKey(t,r,e)}}function getMessageContextOptions(e,t,r,n){const{modifiers:o,pluralRules:s,messageResolver:a,fallbackLocale:i,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,E={locale:t,modifiers:o,pluralRules:s,messages:n=>{let o=a(r,n);if(null==o&&u){const[,,e]=resolveMessageFormat(u,n,t,i,c,l);o=a(e,n)}if(isString(o)||isMessageAST(o)){let r=!1;const s=compileMessageFormat(e,n,t,o,n,(()=>{r=!0}));return r?NOOP_MESSAGE_FUNCTION:s}return isMessageFunction(o)?o:NOOP_MESSAGE_FUNCTION}};return e.processor&&(E.processor=e.processor),n.list&&(E.list=n.list),n.named&&(E.named=n.named),isNumber(n.plural)&&(E.pluralIndex=n.plural),E}function datetime(e,...t){const{datetimeFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:i}=e,[c,l,u,E]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,_=getLocale(e,u),C=a(e,o,_);if(!isString(c)||""===c)return new Intl.DateTimeFormat(_,E).format(l);let p,d={},N=null;for(let A=0;A<C.length&&(p=C[A],d=r[p]||{},N=d[c],!isPlainObject(N));A++)handleMissing(e,c,p,f,"datetime format");if(!isPlainObject(N)||!isString(p))return n?-1:c;let T=`${p}__${c}`;isEmptyObject(E)||(T=`${T}__${JSON.stringify(E)}`);let g=i.get(T);return g||(g=new Intl.DateTimeFormat(p,assign({},N,E)),i.set(T,g)),m?g.formatToParts(l):g.format(l)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,r,n,o]=e,s={};let a,i={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const r=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(r);try{a.toISOString()}catch(c){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);a=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);a=t}return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?i[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(i=n),isPlainObject(o)&&(i=o),[s.key||"",a,s,i]}function clearDateTimeFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:i}=e,[c,l,u,E]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,_=getLocale(e,u),C=a(e,o,_);if(!isString(c)||""===c)return new Intl.NumberFormat(_,E).format(l);let p,d={},N=null;for(let A=0;A<C.length&&(p=C[A],d=r[p]||{},N=d[c],!isPlainObject(N));A++)handleMissing(e,c,p,f,"number format");if(!isPlainObject(N)||!isString(p))return n?-1:c;let T=`${p}__${c}`;isEmptyObject(E)||(T=`${T}__${JSON.stringify(E)}`);let g=i.get(T);return g||(g=new Intl.NumberFormat(p,assign({},N,E)),i.set(T,g)),m?g.formatToParts(l):g.format(l)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,r,n,o]=e,s={};let a={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const i=t;return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?a[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(a=n),isPlainObject(o)&&(a=o),[s.key||"",i,s,a]}function clearNumberFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{CompileErrorCodes,CoreErrorCodes,CoreWarnCodes,DATETIME_FORMAT_OPTIONS_KEYS,DEFAULT_LOCALE,DEFAULT_MESSAGE_DATA_TYPE,MISSING_RESOLVE_VALUE,NOT_REOSLVED,NUMBER_FORMAT_OPTIONS_KEYS,VERSION,clearCompileCache,clearDateTimeFormat,clearNumberFormat,compile,compileToFunction,createCompileError,createCoreContext,createCoreError,createMessageContext,datetime,fallbackWithLocaleChain,fallbackWithSimple,getAdditionalMeta,getDevToolsHook,getFallbackContext,getLocale,getWarnMessage,handleMissing,initI18nDevTools,isAlmostSameLocale,isImplicitFallback,isMessageAST,isMessageFunction,isTranslateFallbackWarn,isTranslateMissingWarn,number,parse,parseDateTimeArgs,parseNumberArgs,parseTranslateArgs,registerLocaleFallbacker,registerMessageCompiler,registerMessageResolver,resolveLocale,resolveValue,resolveWithKeyValue,setAdditionalMeta,setDevToolsHook,setFallbackContext,translate,translateDevTools,updateFallbackLocale}; | ||
const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format$1(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign,_create=Object.create,create=(e=null)=>_create(e);function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}function incrementer(e){let t=e;return()=>++t}function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function createPosition(e,t,r){return{line:e,column:t,offset:r}}function createLocation(e,t,r){const n={start:e,end:t};return null!=r&&(n.source=r),n}const CompileWarnCodes={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};function createCompileWarn(e,t,...r){const n={message:String(e),code:e};return t&&(n.location=t),n}const CompileErrorCodes={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,__EXTEND_POINT__:17};function createCompileError(e,t,r={}){const{domain:n,messages:o,args:s}=r,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=n,a}function defaultOnError(e){throw e}CompileErrorCodes.EXPECTED_TOKEN,CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,CompileErrorCodes.UNBALANCED_CLOSING_BRACE,CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,CompileErrorCodes.EMPTY_PLACEHOLDER,CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,CompileErrorCodes.INVALID_LINKED_FORMAT,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE,CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE;const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let r=0,n=1,o=1,s=0;const a=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,i=e=>t[e]===CHAR_PS,c=e=>t[e]===CHAR_LS,l=e=>a(e)||(e=>t[e]===CHAR_LF)(e)||i(e)||c(e),u=e=>a(e)||i(e)||c(e)?CHAR_LF:t[e];function E(){return s=0,l(r)&&(n++,o=0),a(r)&&r++,r++,o++,t[r]}return{index:()=>r,line:()=>n,column:()=>o,peekOffset:()=>s,charAt:u,currentChar:()=>u(r),currentPeek:()=>u(r+s),next:E,peek:function(){return a(r+s)&&s++,s++,t[r+s]},reset:function(){r=0,n=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=r+s;for(;e!==r;)E();s=0}}}const EOF=void 0,DOT=".",LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const r=!1!==t.location,n=createScanner(e),o=()=>n.index(),s=()=>createPosition(n.line(),n.column(),n.index()),a=s(),i=o(),c={currentType:14,offset:i,startLoc:a,endLoc:a,lastType:14,lastOffset:i,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>c,{onError:u}=t;function E(e,t,n){e.endLoc=s(),e.currentType=t;const o={type:t};return r&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(o.value=n),o}const f=e=>E(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,s(),"")}function m(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=m(e);return e.skipToPeek(),t}function d(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function p(e,t){const{currentType:r}=t;if(2!==r)return!1;m(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function T(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function N(e,t=!0){const r=(t=!1,n="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==n&&t:"@"!==s&&s?"%"===s?(e.peek(),r(t,"%",!0)):"|"===s?!("%"!==n&&!o)||!(n===CHAR_SP||n===CHAR_LF):s===CHAR_SP?(e.peek(),r(!0,CHAR_SP,o)):s!==CHAR_LF||(e.peek(),r(!0,CHAR_LF,o)):"%"===n||t},n=r();return t&&e.resetPeek(),n}function g(e,t){const r=e.currentChar();return r===EOF?EOF:t(r)?(e.next(),r):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 L(e){return g(e,A)}function O(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 S(e){return g(e,O)}function h(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function P(e){return g(e,h)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function k(e){return g(e,b)}function I(e){let t="",r="";for(;t=P(e);)r+=t;return r}function M(e){let t="";for(;;){const r=e.currentChar();if("{"===r||"}"===r||"@"===r||"|"===r||!r)break;if("%"===r){if(!N(e))break;t+=r,e.next()}else if(r===CHAR_SP||r===CHAR_LF)if(N(e))t+=r,e.next();else{if(T(e))break;t+=r,e.next()}else t+=r,e.next()}return t}function R(e){return e!==LITERAL_DELIMITER&&e!==CHAR_LF}function y(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return D(e,t,4);case"U":return D(e,t,6);default:return CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,s(),""}}function D(e,t,r){_(e,t);let n="";for(let o=0;o<r;o++){const t=k(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),e.currentChar();break}n+=t}return`\\${t}${n}`}function F(e){return"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF}function v(e){C(e);const t=_(e,"|");return C(e),t}function U(e,t){let r=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,s()),e.next(),r=E(t,2,"{"),C(e),t.braceNest++,r;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,s()),e.next(),r=E(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),r;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=x(e,t)||f(t),t.braceNest=0,r;default:{let n=!0,o=!0,a=!0;if(T(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s(),t.braceNest=0,w(e,t);if(n=function(e,t){const{currentType:r}=t;if(2!==r)return!1;m(e);const n=d(e.currentPeek());return e.resetPeek(),n}(e,t))return r=E(t,5,function(e){C(e);let t="",r="";for(;t=S(e);)r+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),r}(e)),C(e),r;if(o=p(e,t))return r=E(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,s()),t}(e)),C(e),r;if(a=function(e,t){const{currentType:r}=t;if(2!==r)return!1;m(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return r=E(t,7,function(e){C(e),_(e,"'");let t="",r="";for(;t=g(e,R);)r+="\\"===t?y(e):t;const n=e.currentChar();return n===CHAR_LF||n===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),n===CHAR_LF&&(e.next(),_(e,"'")),r):(_(e,"'"),r)}(e)),C(e),r;if(!n&&!o&&!a)return r=E(t,13,function(e){C(e);let t="",r="";for(;t=g(e,F);)r+=t;return r}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,s(),r.value,C(e),r;break}}return r}function x(e,t){const{currentType:r}=t;let n=null;const o=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||o!==CHAR_LF&&o!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),o){case"@":return e.next(),n=E(t,8,"@"),t.inLinked=!0,n;case".":return C(e),e.next(),E(t,9,".");case":":return C(e),e.next(),E(t,10,":");default:return T(e)?(n=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:r}=t;if(8!==r)return!1;m(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:r}=t;if(8!==r&&12!==r)return!1;m(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(C(e),x(e,t)):function(e,t){const{currentType:r}=t;if(9!==r)return!1;m(e);const n=d(e.currentPeek());return e.resetPeek(),n}(e,t)?(C(e),E(t,12,function(e){let t="",r="";for(;t=L(e);)r+=t;return r}(e))):function(e,t){const{currentType:r}=t;if(10!==r)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):N(e,!1))},o=n();return e.resetPeek(),o}(e,t)?(C(e),"{"===o?U(e,t)||n:E(t,11,function(e){const t=r=>{const n=e.currentChar();return"{"!==n&&"%"!==n&&"@"!==n&&"|"!==n&&"("!==n&&")"!==n&&n?n===CHAR_SP?r:(r+=n,e.next(),t(r)):r};return t("")}(e))):(8===r&&(CompileErrorCodes.INVALID_LINKED_FORMAT,s()),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let r={type:14};if(t.braceNest>0)return U(e,t)||f(t);if(t.inLinked)return x(e,t)||f(t);switch(e.currentChar()){case"{":return U(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,s(),e.next(),E(t,3,"}");case"@":return x(e,t)||f(t);default:{if(T(e))return r=E(t,1,v(e)),t.braceNest=0,t.inLinked=!1,r;const{isModulo:n,hasSpace:o}=function(e){const t=m(e),r="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:r,hasSpace:t.length>0}}(e);if(n)return o?E(t,0,M(e)):E(t,4,function(e){C(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,s()),e.next(),"%"}(e));if(N(e))return E(t,0,M(e));break}}return r}return{nextToken:function(){const{currentType:e,offset:t,startLoc:r,endLoc:a}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=r,c.lastEndLoc=a,c.offset=o(),c.startLoc=s(),n.currentChar()===EOF?E(c,14):w(n,c)},currentOffset:o,currentPosition:s,context:l}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,r){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||r,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:r,onWarn:n}=e;function o(e,r,n){const o={type:e};return t&&(o.start=r,o.end=r,o.loc={start:n,end:n}),o}function s(e,r,n,o){o&&(e.type=o),t&&(e.end=r,e.loc&&(e.loc.end=n))}function a(e,t){const r=e.context(),n=o(3,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}function i(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(5,n,a);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function c(e,t,r){const n=e.context(),{lastOffset:a,lastStartLoc:i}=n,c=o(4,a,i);return c.key=t,!0===r&&(c.modulo=!0),e.nextToken(),s(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(9,n,a);return i.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e){const t=e.context(),r=o(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),r=e.context(),{lastOffset:n,lastStartLoc:a}=r,i=o(8,n,a);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,i.value="",s(i,n,a),{nextConsumeToken:t,node:i}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,getTokenCaption(t)),i.value=t.value||"",s(i,e.currentOffset(),e.currentPosition()),{node:i})}(e);r.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=function(e,t){const r=e.context(),n=o(7,r.offset,r.startLoc);return n.value=t,s(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=c(e,n.value||"");break;case 6:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=i(e,n.value||"");break;case 7:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.key=l(e,n.value||"");break;default:{CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const a=e.context(),i=o(7,a.offset,a.startLoc);return i.value="",s(i,a.offset,a.startLoc),r.key=i,s(r,a.offset,a.startLoc),{nextConsumeToken:n,node:r}}}return s(r,e.currentOffset(),e.currentPosition()),{node:r}}function E(e){const t=e.context(),r=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);r.items=[];let n=null,E=null;do{const o=n||e.nextToken();switch(n=null,o.type){case 0:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(a(e,o.value||""));break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(i(e,o.value||""));break;case 4:E=!0;break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(c(e,o.value||"",!!E)),E&&(CompileWarnCodes.USE_MODULO_SYNTAX,t.lastStartLoc,getTokenCaption(o),E=null);break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),r.items.push(l(e,o.value||""));break;case 8:{const t=u(e);r.items.push(t.node),n=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return s(r,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),r}function f(e){const t=e.context(),{offset:r,startLoc:n}=t,a=E(e);return 14===t.currentType?a:function(e,t,r,n){const a=e.context();let i=0===n.items.length;const c=o(1,t,r);c.cases=[],c.cases.push(n);do{const t=E(e);i||(i=0===t.items.length),c.cases.push(t)}while(14!==a.currentType);return i&&CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,s(c,e.currentOffset(),e.currentPosition()),c}(e,r,n,a)}return{parse:function(r){const n=createTokenizer(r,assign({},e)),a=n.context(),i=o(0,a.offset,a.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=f(n),e.onCacheKey&&(i.cacheKey=e.onCacheKey(r)),14!==a.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,r[a.offset]),s(i,n.currentOffset(),n.currentPosition()),i}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const r={ast:e,helpers:new Set};return{context:()=>r,helper:e=>(r.helpers.add(e),e)}}function traverseNodes(e,t){for(let r=0;r<e.length;r++)traverseNode(e[r],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(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 transform(e,t={}){const r=createTransformer(e);r.helper("normalize"),e.body&&traverseNode(e.body,r);const n=r.context();e.helpers=Array.from(n.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(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 r=0;r<e.items.length;r++){const n=e.items[r];if(3!==n.type&&9!==n.type)break;if(null==n.value)break;t.push(n.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const r=e.items[t];3!==r.type&&9!==r.type||delete r.value}}}}function minify(e){switch(e.t=e.type,e.type){case 0:{const t=e;minify(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,r=t.cases;for(let e=0;e<r.length;e++)minify(r[e]);t.c=r,delete t.cases;break}case 2:{const t=e,r=t.items;for(let e=0;e<r.length;e++)minify(r[e]);t.i=r,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;minify(t.key),t.k=t.key,delete t.key,t.modifier&&(minify(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 createCodeGenerator(e,t){const{sourceMap:r,filename:n,breakLineCode:o,needIndent:s}=t,a=!1!==t.location,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};a&&e.loc&&(i.source=e.loc.source);function c(e,t){i.code+=e}function l(e,t=!0){const r=t?o:"";c(s?r+" ".repeat(e):r)}return{context:()=>i,push:c,indent:function(e=!0){const t=++i.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--i.indentLevel;e&&l(t)},newline:function(){l(i.indentLevel)},helper:e=>`_${e}`,needIndent:()=>i.needIndent}}function generateLinkedNode(e,t){const{helper:r}=e;e.push(`${r("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:r,needIndent:n}=e;e.push(`${r("normalize")}([`),e.indent(n());const o=t.items.length;for(let s=0;s<o&&(generateNode(e,t.items[s]),s!==o-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function generatePluralNode(e,t){const{helper:r,needIndent:n}=e;if(t.cases.length>1){e.push(`${r("plural")}([`),e.indent(n());const o=t.cases.length;for(let r=0;r<o&&(generateNode(e,t.cases[r]),r!==o-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:r}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${r("interpolate")}(${r("list")}(${t.index}))`,t);break;case 4:e.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const r=isString(t.mode)?t.mode:"normal",n=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==r,i=e.helpers||[],c=createCodeGenerator(e,{mode:r,filename:n,sourceMap:o,breakLineCode:s,needIndent:a});c.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(a),i.length>0&&(c.push(`const { ${join(i.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),generateNode(c,e),c.deindent(a),c.push("}"),delete e.helpers;const{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const r=assign({},t),n=!!r.jit,o=!!r.minify,s=null==r.optimize||r.optimize,a=createParser(r).parse(e);return n?(s&&optimize(a),o&&minify(a),{ast:a,code:""}):(transform(a,r),generate(a,r))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let r,n,o,s,a,i,c,l=-1,u=0,E=0;const f=[];function _(){const t=e[l+1];if(5===u&&"'"===t||6===u&&'"'===t)return l++,o="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=o:n+=o},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),E++},f[3]=()=>{if(E>0)E--,u=4,f[0]();else{if(E=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;f[1]()}};null!==u;)if(l++,r=e[l],"\\"!==r||!_()){if(s=getPathCharType(r),c=pathStateMachine[u],a=c[s]||c.l||8,8===a)return;if(u=a[0],void 0!==a[1]&&(i=f[a[1]],i&&(o=r,!1===i())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue$1(e,t){if(!isObject(e))return null;let r=cache.get(t);if(r||(r=parse(t),r&&cache.set(t,r)),!r)return null;const n=r.length;let o=e,s=0;for(;s<n;){const e=o[r[s]];if(void 0===e)return null;if(isFunction(o))return null;o=e,s++}return o}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,r=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,o=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,s=e.list||[],a=e.named||create();isNumber(e.pluralIndex)&&normalizeNamed(r,a);function i(t){const r=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const c=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,l=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>s[e],named:e=>a[e],plural:e=>e[n(r,e.length,o)],linked:(t,...r)=>{const[n,o]=r;let s="text",a="";1===r.length?isObject(n)?(a=n.modifier||a,s=n.type||s):isString(n)&&(a=n||a):2===r.length&&(isString(n)&&(a=n||a),isString(o)&&(s=o||s));const c=i(t)(u),l="vnode"===s&&isArray(c)&&a?c[0]:c;return a?(E=a,e.modifiers?e.modifiers[E]:DEFAULT_MODIFIER)(l,s):l;var E},message:i,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:l,normalize:c,values:assign(create(),s,a)};return u}let devtools=null;function setDevToolsHook(e){devtools=e}function getDevToolsHook(){return devtools}function initI18nDevTools(e,t,r){devtools&&devtools.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:r})}const translateDevTools=createDevToolsHook("function:translate");function createDevToolsHook(e){return t=>devtools&&devtools.emit(e,t)}const code$1=CompileWarnCodes.__EXTEND_POINT__,inc$1=incrementer(code$1),CoreWarnCodes={NOT_FOUND_KEY:code$1,FALLBACK_TO_TRANSLATE:inc$1(),CANNOT_FORMAT_NUMBER:inc$1(),FALLBACK_TO_NUMBER_FORMAT:inc$1(),CANNOT_FORMAT_DATE:inc$1(),FALLBACK_TO_DATE_FORMAT:inc$1(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:inc$1(),__EXTEND_POINT__:inc$1()},warnMessages={[CoreWarnCodes.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[CoreWarnCodes.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[CoreWarnCodes.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[CoreWarnCodes.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."};function getWarnMessage(e,...t){return format$1(warnMessages[e],...t)}const code=CompileErrorCodes.__EXTEND_POINT__,inc=incrementer(code),CoreErrorCodes={INVALID_ARGUMENT:code,INVALID_DATE_ARGUMENT:inc(),INVALID_ISO_DATE_ARGUMENT:inc(),NOT_SUPPORT_NON_STRING_MESSAGE:inc(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:inc(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:inc(),NOT_SUPPORT_LOCALE_TYPE:inc(),__EXTEND_POINT__:inc()};function createCoreError(e){return createCompileError(e,null,void 0)}function getLocale(e,t){return null!=t.locale?resolveLocale(t.locale):resolveLocale(e.locale)}let _resolveLocale;function resolveLocale(e){if(isString(e))return e;if(isFunction(e)){if(e.resolvedOnce&&null!=_resolveLocale)return _resolveLocale;if("Function"===e.constructor.name){const t=e();if(isPromise(t))throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=t}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(e,t,r){return[...new Set([r,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[r]])]}function fallbackWithLocaleChain(e,t,r){const n=isString(r)?r:DEFAULT_LOCALE,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(n);if(!s){s=[];let e=[r];for(;isArray(e);)e=appendBlockToChain(s,e,t);const a=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(a)?[a]:a,isArray(e)&&appendBlockToChain(s,e,!1),o.__localeChainCache.set(n,s)}return s}function appendBlockToChain(e,t,r){let n=!0;for(let o=0;o<t.length&&isBoolean(n);o++){const s=t[o];isString(s)&&(n=appendLocaleToChain(e,t[o],r))}return n}function appendLocaleToChain(e,t,r){let n;const o=t.split("-");do{n=appendItemToChain(e,o.join("-"),r),o.splice(-1,1)}while(o.length&&!0===n);return n}function appendItemToChain(e,t,r){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(isArray(r)||isPlainObject(r))&&r[o]&&(n=r[o])}return n}CoreErrorCodes.INVALID_ARGUMENT,CoreErrorCodes.INVALID_DATE_ARGUMENT,CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT,CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE,CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE,CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE;const VERSION="9.14.2",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _additionalMeta=null;const setAdditionalMeta=e=>{_additionalMeta=e},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isFunction(e.onWarn)?e.onWarn:warn,r=isString(e.version)?e.version:VERSION,n=isString(e.locale)||isFunction(e.locale)?e.locale:DEFAULT_LOCALE,o=isFunction(n)?DEFAULT_LOCALE:n,s=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=isPlainObject(e.messages)?e.messages:createResources(o),i=isPlainObject(e.datetimeFormats)?e.datetimeFormats:createResources(o),c=isPlainObject(e.numberFormats)?e.numberFormats:createResources(o),l=assign(create(),e.modifiers,getDefaultLinkedModifiers()),u=e.pluralRules||create(),E=isFunction(e.missing)?e.missing:null,f=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,_=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,m=!!e.fallbackFormat,C=!!e.unresolving,d=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,T=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,N=!!e.escapeParameter,g=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,A=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,L=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,O=isObject(e.fallbackContext)?e.fallbackContext:void 0,S=e,h=isObject(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,P=isObject(S.__numberFormatters)?S.__numberFormatters:new Map,b=isObject(S.__meta)?S.__meta:{};_cid++;const k={version:r,cid:_cid,locale:n,fallbackLocale:s,messages:a,modifiers:l,pluralRules:u,missing:E,missingWarn:f,fallbackWarn:_,fallbackFormat:m,unresolving:C,postTranslation:d,processor:p,warnHtmlMessage:T,escapeParameter:N,messageCompiler:g,messageResolver:A,localeFallbacker:L,fallbackContext:O,onWarn:t,__meta:b};return k.datetimeFormats=i,k.numberFormats=c,k.__datetimeFormatters=h,k.__numberFormatters=P,k}const createResources=e=>({[e]:create()});function isTranslateFallbackWarn(e,t){return e instanceof RegExp?e.test(t):e}function isTranslateMissingWarn(e,t){return e instanceof RegExp?e.test(t):e}function handleMissing(e,t,r,n,o){const{missing:s,onWarn:a}=e;if(null!==s){const n=s(e,r,t,o);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,r){e.__localeChainCache=new Map,e.localeFallbacker(e,r,t)}function isAlmostSameLocale(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function isImplicitFallback(e,t){const r=t.indexOf(e);if(-1===r)return!1;for(let n=r+1;n<t.length;n++)if(isAlmostSameLocale(e,t[n]))return!0;return!1}function format(e){return t=>formatParts(t,e)}function formatParts(e,t){const r=resolveBody(t);if(null==r)throw createUnhandleNodeError(0);if(1===resolveType(r)){const t=resolveCases(r);return e.plural(t.reduce(((t,r)=>[...t,formatMessageParts(e,r)]),[]))}return formatMessageParts(e,r)}const PROPS_BODY=["b","body"];function resolveBody(e){return resolveProps(e,PROPS_BODY)}const PROPS_CASES=["c","cases"];function resolveCases(e){return resolveProps(e,PROPS_CASES,[])}function formatMessageParts(e,t){const r=resolveStatic(t);if(null!=r)return"text"===e.type?r:e.normalize([r]);{const r=resolveItems(t).reduce(((t,r)=>[...t,formatMessagePart(e,r)]),[]);return e.normalize(r)}}const PROPS_STATIC=["s","static"];function resolveStatic(e){return resolveProps(e,PROPS_STATIC)}const PROPS_ITEMS=["i","items"];function resolveItems(e){return resolveProps(e,PROPS_ITEMS,[])}function formatMessagePart(e,t){const r=resolveType(t);switch(r){case 3:case 9:case 7:case 8:return resolveValue(t,r);case 4:{const n=t;if(hasOwn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(hasOwn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw createUnhandleNodeError(r)}case 5:{const n=t;if(hasOwn(n,"i")&&isNumber(n.i))return e.interpolate(e.list(n.i));if(hasOwn(n,"index")&&isNumber(n.index))return e.interpolate(e.list(n.index));throw createUnhandleNodeError(r)}case 6:{const r=t,n=resolveLinkedModifier(r),o=resolveLinkedKey(r);return e.linked(formatMessagePart(e,o),n?formatMessagePart(e,n):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${r}`)}}const PROPS_TYPE=["t","type"];function resolveType(e){return resolveProps(e,PROPS_TYPE)}const PROPS_VALUE=["v","value"];function resolveValue(e,t){const r=resolveProps(e,PROPS_VALUE);if(r)return r;throw createUnhandleNodeError(t)}const PROPS_MODIFIER=["m","modifier"];function resolveLinkedModifier(e){return resolveProps(e,PROPS_MODIFIER)}const PROPS_KEY=["k","key"];function resolveLinkedKey(e){const t=resolveProps(e,PROPS_KEY);if(t)return t;throw createUnhandleNodeError(6)}function resolveProps(e,t,r){for(let n=0;n<t.length;n++){const r=t[n];if(hasOwn(e,r)&&null!=e[r])return e[r]}return r}function createUnhandleNodeError(e){return new Error(`unhandled node type: ${e}`)}const defaultOnCacheKey=e=>e;let compileCache=create();function clearCompileCache(){compileCache=create()}function isMessageAST(e){return isObject(e)&&0===resolveType(e)&&(hasOwn(e,"b")||hasOwn(e,"body"))}function baseCompile(e,t={}){let r=!1;const n=t.onError||defaultOnError;return t.onError=e=>{r=!0,n(e)},{...baseCompile$1(e,t),detectError:r}}const compileToFunction=(e,t)=>{if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);return()=>e};function compile(e,t){if(isString(e)){!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const r=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[r];if(n)return n;const{ast:o,detectError:s}=baseCompile(e,{...t,location:!1,jit:!0}),a=format(o);return s?a:compileCache[r]=a}{const t=e.cacheKey;if(t){const r=compileCache[t];return r||(compileCache[t]=format(e))}return format(e)}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:r,postTranslation:n,unresolving:o,messageCompiler:s,fallbackLocale:a,messages:i}=e,[c,l]=parseTranslateArgs(...t),u=isBoolean(l.missingWarn)?l.missingWarn:e.missingWarn,E=isBoolean(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=isBoolean(l.escapeParameter)?l.escapeParameter:e.escapeParameter,_=!!l.resolvedMessage,m=isString(l.default)||isBoolean(l.default)?isBoolean(l.default)?s?c:()=>c:l.default:r?s?c:()=>c:"",C=r||""!==m,d=getLocale(e,l);f&&escapeParams(l);let[p,T,N]=_?[c,d,i[d]||create()]:resolveMessageFormat(e,c,d,a,E,u),g=p,A=c;if(_||isString(g)||isMessageAST(g)||isMessageFunction(g)||C&&(g=m,A=g),!(_||(isString(g)||isMessageAST(g)||isMessageFunction(g))&&isString(T)))return o?-1:c;let L=!1;const O=isMessageFunction(g)?g:compileMessageFormat(e,c,T,g,A,(()=>{L=!0}));if(L)return g;const S=evaluateMessage(e,O,createMessageContext(getMessageContextOptions(e,T,N,l)));return n?n(S,c):S}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,r,n,o,s){const{messages:a,onWarn:i,messageResolver:c,localeFallbacker:l}=e,u=l(e,n,r);let E,f=create(),_=null;for(let m=0;m<u.length&&(E=u[m],f=a[E]||create(),null===(_=c(f,t))&&(_=f[t]),!(isString(_)||isMessageAST(_)||isMessageFunction(_)));m++)if(!isImplicitFallback(E,u)){const r=handleMissing(e,t,E,s,"translate");r!==t&&(_=r)}return[_,E,f]}function compileMessageFormat(e,t,r,n,o,s){const{messageCompiler:a,warnHtmlMessage:i}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>n;return e.locale=r,e.key=t,e}const c=a(n,getCompileContext(e,r,o,n,i,s));return c.locale=r,c.key=t,c.source=n,c}function evaluateMessage(e,t,r){return t(r)}function parseTranslateArgs(...e){const[t,r,n]=e,o=create();if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(r)?o.plural=r:isString(r)?o.default=r:isPlainObject(r)&&!isEmptyObject(r)?o.named=r:isArray(r)&&(o.list=r),isNumber(n)?o.plural=n:isString(n)?o.default=n:isPlainObject(n)&&assign(o,n),[s,o]}function getCompileContext(e,t,r,n,o,s){return{locale:t,key:r,warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>generateFormatCacheKey(t,r,e)}}function getMessageContextOptions(e,t,r,n){const{modifiers:o,pluralRules:s,messageResolver:a,fallbackLocale:i,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,E={locale:t,modifiers:o,pluralRules:s,messages:n=>{let o=a(r,n);if(null==o&&u){const[,,e]=resolveMessageFormat(u,n,t,i,c,l);o=a(e,n)}if(isString(o)||isMessageAST(o)){let r=!1;const s=compileMessageFormat(e,n,t,o,n,(()=>{r=!0}));return r?NOOP_MESSAGE_FUNCTION:s}return isMessageFunction(o)?o:NOOP_MESSAGE_FUNCTION}};return e.processor&&(E.processor=e.processor),n.list&&(E.list=n.list),n.named&&(E.named=n.named),isNumber(n.plural)&&(E.pluralIndex=n.plural),E}function datetime(e,...t){const{datetimeFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:i}=e,[c,l,u,E]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const _=!!u.part,m=getLocale(e,u),C=a(e,o,m);if(!isString(c)||""===c)return new Intl.DateTimeFormat(m,E).format(l);let d,p={},T=null;for(let A=0;A<C.length&&(d=C[A],p=r[d]||{},T=p[c],!isPlainObject(T));A++)handleMissing(e,c,d,f,"datetime format");if(!isPlainObject(T)||!isString(d))return n?-1:c;let N=`${d}__${c}`;isEmptyObject(E)||(N=`${N}__${JSON.stringify(E)}`);let g=i.get(N);return g||(g=new Intl.DateTimeFormat(d,assign({},T,E)),i.set(N,g)),_?g.formatToParts(l):g.format(l)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,r,n,o]=e,s=create();let a,i=create();if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const r=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(r);try{a.toISOString()}catch(c){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);a=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);a=t}return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?i[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(i=n),isPlainObject(o)&&(i=o),[s.key||"",a,s,i]}function clearDateTimeFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:r,unresolving:n,fallbackLocale:o,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:i}=e,[c,l,u,E]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const _=!!u.part,m=getLocale(e,u),C=a(e,o,m);if(!isString(c)||""===c)return new Intl.NumberFormat(m,E).format(l);let d,p={},T=null;for(let A=0;A<C.length&&(d=C[A],p=r[d]||{},T=p[c],!isPlainObject(T));A++)handleMissing(e,c,d,f,"number format");if(!isPlainObject(T)||!isString(d))return n?-1:c;let N=`${d}__${c}`;isEmptyObject(E)||(N=`${N}__${JSON.stringify(E)}`);let g=i.get(N);return g||(g=new Intl.NumberFormat(d,assign({},T,E)),i.set(N,g)),_?g.formatToParts(l):g.format(l)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,r,n,o]=e,s=create();let a=create();if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const i=t;return isString(r)?s.key=r:isPlainObject(r)&&Object.keys(r).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?a[e]=r[e]:s[e]=r[e]})),isString(n)?s.locale=n:isPlainObject(n)&&(a=n),isPlainObject(o)&&(a=o),[s.key||"",i,s,a]}function clearNumberFormat(e,t,r){const n=e;for(const o in r){const e=`${t}__${o}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}registerMessageResolver(resolveValue$1),registerLocaleFallbacker(fallbackWithLocaleChain);export{CompileErrorCodes,CoreErrorCodes,CoreWarnCodes,DATETIME_FORMAT_OPTIONS_KEYS,DEFAULT_LOCALE,DEFAULT_MESSAGE_DATA_TYPE,MISSING_RESOLVE_VALUE,NOT_REOSLVED,NUMBER_FORMAT_OPTIONS_KEYS,VERSION,clearCompileCache,clearDateTimeFormat,clearNumberFormat,compile,compileToFunction,createCompileError,createCoreContext,createCoreError,createMessageContext,datetime,fallbackWithLocaleChain,fallbackWithSimple,getAdditionalMeta,getDevToolsHook,getFallbackContext,getLocale,getWarnMessage,handleMissing,initI18nDevTools,isAlmostSameLocale,isImplicitFallback,isMessageAST,isMessageFunction,isTranslateFallbackWarn,isTranslateMissingWarn,number,parse,parseDateTimeArgs,parseNumberArgs,parseTranslateArgs,registerLocaleFallbacker,registerMessageCompiler,registerMessageResolver,resolveLocale,resolveValue$1 as resolveValue,resolveWithKeyValue,setAdditionalMeta,setDevToolsHook,setFallbackContext,translate,translateDevTools,updateFallbackLocale}; |
/*! | ||
* core v9.14.1 | ||
* core v9.14.2 | ||
* (c) 2024 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
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]"===p(e),s=e=>"[object RegExp]"===p(e),c=e=>T(e)&&0===Object.keys(e).length,l=Object.assign;function i(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const u=Array.isArray,f=e=>"function"==typeof e,E=e=>"string"==typeof e,_=e=>"boolean"==typeof e,m=e=>null!==e&&"object"==typeof e,N=e=>m(e)&&f(e.then)&&f(e.catch),d=Object.prototype.toString,p=e=>d.call(e),T=e=>{if(!m(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function L(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function A(e){let t=e;return()=>++t}function C(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function k(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const h={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};const O={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,__EXTEND_POINT__:17};function I(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 S(e){throw e}O.EXPECTED_TOKEN,O.INVALID_TOKEN_IN_PLACEHOLDER,O.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,O.UNKNOWN_ESCAPE_SEQUENCE,O.INVALID_UNICODE_ESCAPE_SEQUENCE,O.UNBALANCED_CLOSING_BRACE,O.UNTERMINATED_CLOSING_BRACE,O.EMPTY_PLACEHOLDER,O.NOT_ALLOW_NEST_PLACEHOLDER,O.INVALID_LINKED_FORMAT,O.MUST_HAVE_MESSAGES_IN_PLURAL,O.UNEXPECTED_EMPTY_LINKED_MODIFIER,O.UNEXPECTED_EMPTY_LINKED_KEY,O.UNEXPECTED_LEXICAL_ANALYSIS,O.UNHANDLED_CODEGEN_NODE_TYPE,O.UNHANDLED_MINIFIER_NODE_TYPE;const g=" ",y="\r",b="\n",P=String.fromCharCode(8232),D=String.fromCharCode(8233);function R(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>t[e]===y&&t[e+1]===b,c=e=>t[e]===D,l=e=>t[e]===P,i=e=>s(e)||(e=>t[e]===b)(e)||c(e)||l(e),u=e=>s(e)||c(e)||l(e)?b:t[e];function f(){return a=0,i(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 M=void 0,U="'";function v(e,t={}){const n=!1!==t.location,r=R(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(),l={currentType:14,offset:c,startLoc:s,endLoc:s,lastType:14,lastOffset:c,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>l,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=k(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const E=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(O.EXPECTED_TOKEN,a(),"")}function m(e){let t="";for(;e.currentPeek()===g||e.currentPeek()===b;)t+=e.currentPeek(),e.peek();return t}function N(e){const t=m(e);return e.skipToPeek(),t}function d(e){if(e===M)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function p(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=function(e){if(e===M)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function L(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(r===g||r===b):a===g?(e.peek(),n(!0,g,o)):a!==b||(e.peek(),n(!0,b,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function A(e,t){const n=e.currentChar();return n===M?M: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 I(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 S(e){return A(e,I)}function y(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function P(e){return A(e,y)}function D(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function v(e){return A(e,D)}function F(e){let t="",n="";for(;t=P(e);)n+=t;return n}function x(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!L(e))break;t+=n,e.next()}else if(n===g||n===b)if(L(e))t+=n,e.next();else{if(T(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function w(e){return e!==U&&e!==b}function W(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 O.UNKNOWN_ESCAPE_SEQUENCE,a(),""}}function X(e,t,n){_(e,t);let r="";for(let o=0;o<n;o++){const t=v(e);if(!t){O.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function Y(e){return"{"!==e&&"}"!==e&&e!==g&&e!==b}function G(e){N(e);const t=_(e,"|");return N(e),t}function K(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(O.NOT_ALLOW_NEST_PLACEHOLDER,a()),e.next(),n=f(t,2,"{"),N(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(O.EMPTY_PLACEHOLDER,a()),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&N(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(O.UNTERMINATED_CLOSING_BRACE,a()),n=V(e,t)||E(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&(O.UNTERMINATED_CLOSING_BRACE,a()),n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return O.UNTERMINATED_CLOSING_BRACE,a(),t.braceNest=0,$(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){N(e);let t="",n="";for(;t=S(e);)n+=t;return e.currentChar()===M&&(O.UNTERMINATED_CLOSING_BRACE,a()),n}(e)),N(e),n;if(o=p(e,t))return n=f(t,6,function(e){N(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${F(e)}`):t+=F(e),e.currentChar()===M&&(O.UNTERMINATED_CLOSING_BRACE,a()),t}(e)),N(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=e.currentPeek()===U;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){N(e),_(e,"'");let t="",n="";for(;t=A(e,w);)n+="\\"===t?W(e):t;const r=e.currentChar();return r===b||r===M?(O.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),r===b&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),N(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){N(e);let t="",n="";for(;t=A(e,Y);)n+=t;return n}(e)),O.INVALID_TOKEN_IN_PLACEHOLDER,a(),n.value,N(e),n;break}}return n}function V(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==b&&o!==g||(O.INVALID_LINKED_FORMAT,a()),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return N(e),e.next(),f(t,9,".");case":":return N(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(N(e),V(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;m(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t)?(N(e),f(t,12,function(e){let t="",n="";for(;t=h(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===g||!t)&&(t===b?(e.peek(),r()):L(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(N(e),"{"===o?K(e,t)||r:f(t,11,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"%"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===g?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(8===n&&(O.INVALID_LINKED_FORMAT,a()),t.braceNest=0,t.inLinked=!1,$(e,t))}}function $(e,t){let n={type:14};if(t.braceNest>0)return K(e,t)||E(t);if(t.inLinked)return V(e,t)||E(t);switch(e.currentChar()){case"{":return K(e,t)||E(t);case"}":return O.UNBALANCED_CLOSING_BRACE,a(),e.next(),f(t,3,"}");case"@":return V(e,t)||E(t);default:{if(T(e))return n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=m(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?f(t,0,x(e)):f(t,4,function(e){N(e);const t=e.currentChar();return"%"!==t&&(O.EXPECTED_TOKEN,a()),e.next(),"%"}(e));if(L(e))return f(t,0,x(e));break}}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=a(),r.currentChar()===M?f(l,14):$(r,l)},currentOffset:o,currentPosition:a,context:i}}const F=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function x(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 w(e={}){const t=!1!==e.location,{onError:n,onWarn:r}=e;function o(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function a(e,n,r,o){o&&(e.type=o),t&&(e.end=n,e.loc&&(e.loc.end=r))}function s(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function c(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(5,r,s);return c.index=parseInt(t,10),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function i(e,t,n){const r=e.context(),{lastOffset:s,lastStartLoc:c}=r,l=o(4,s,c);return l.key=t,!0===n&&(l.modulo=!0),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(9,r,s);return c.value=t.replace(F,x),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(8,r,s);return 12!==t.type?(O.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,c.value="",a(c,r,s),{nextConsumeToken:t,node:c}):(null==t.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,W(t)),c.value=t.value||"",a(c,e.currentOffset(),e.currentPosition()),{node:c})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=i(e,r.value||"");break;case 6:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=c(e,r.value||"");break;case 7:null==r.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(r)),n.key=u(e,r.value||"");break;default:{O.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),c=o(7,s.offset,s.startLoc);return c.value="",a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function E(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null,l=null;do{const o=r||e.nextToken();switch(r=null,o.type){case 0:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(s(e,o.value||""));break;case 6:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(c(e,o.value||""));break;case 4:l=!0;break;case 5:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(i(e,o.value||"",!!l)),l&&(h.USE_MODULO_SYNTAX,t.lastStartLoc,W(o),l=null);break;case 7:null==o.value&&(O.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,W(o)),n.items.push(u(e,o.value||""));break;case 8:{const t=f(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function _(e){const t=e.context(),{offset:n,startLoc:r}=t,s=E(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let c=0===r.items.length;const l=o(1,t,n);l.cases=[],l.cases.push(r);do{const t=E(e);c||(c=0===t.items.length),l.cases.push(t)}while(14!==s.currentType);return c&&O.MUST_HAVE_MESSAGES_IN_PLURAL,a(l,e.currentOffset(),e.currentPosition()),l}(e,n,r,s)}return{parse:function(n){const r=v(n,l({},e)),s=r.context(),c=o(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=_(r),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(O.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),a(c,r.currentOffset(),r.currentPosition()),c}}}function W(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function X(e,t){for(let n=0;n<e.length;n++)Y(e[n],t)}function Y(e,t){switch(e.type){case 1:X(e.cases,t),t.helper("plural");break;case 2:X(e.items,t);break;case 6:Y(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 G(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&&Y(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function K(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=L(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 V(e){switch(e.t=e.type,e.type){case 0:{const t=e;V(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++)V(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++)V(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;V(t.key),t.k=t.key,delete t.key,t.modifier&&(V(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 $(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?$(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&&($(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&&($(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")}(`),$(e,t.key),t.modifier?(e.push(", "),$(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 H=(e,t={})=>{const n=E(t.mode)?t.mode:"normal",r=E(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,a=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],l=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:a}=t,s=!1!==t.location,c={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};function l(e,t){c.code+=e}function i(e,t=!0){const n=t?o:"";l(a?n+" ".repeat(e):n)}return s&&e.loc&&(c.source=e.loc.source),{context:()=>c,push:l,indent:function(e=!0){const t=++c.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&i(t)},newline:function(){i(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:a,needIndent:s});l.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),c.length>0&&(l.push(`const { ${L(c.map((e=>`${e}: _${e}`)),", ")} } = ctx`),l.newline()),l.push("return "),$(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:i,map:u}=l.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function B(e,t={}){const n=l({},t),r=!!n.jit,o=!!n.minify,a=null==n.optimize||n.optimize,s=w(n).parse(e);return r?(a&&function(e){const t=e.body;2===t.type?K(t):t.cases.forEach((e=>K(e)))}(s),o&&V(s),{ast:s,code:""}):(G(s,n),H(s,n))}const j=[];j[0]={w:[0],i:[3,0],"[":[4],o:[7]},j[1]={w:[1],".":[2],"[":[4],o:[7]},j[2]={w:[2],i:[3,0],0:[3,0]},j[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},j[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},j[5]={"'":[4,0],o:8,l:[5,0]},j[6]={'"':[4,0],o:8,l:[6,0]};const z=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Q(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 J(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,z.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 Z(e){const t=[];let n,r,o,a,s,c,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=J(r),!1===r)return!1;E[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(a=Q(n),l=j[u],s=l[a]||l.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(c=E[s[1]],c&&(o=n,!1===c())))return;if(7===u)return t}}const q=new Map;function ee(e,t){return m(e)?e[t]:null}function te(e,t){if(!m(e))return null;let n=q.get(t);if(n||(n=Z(t),n&&q.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;if(f(o))return null;o=e,a++}return o}const ne=e=>e,re=e=>"",oe="text",ae=e=>0===e.length?"":L(e),se=e=>null==e?"":u(e)||T(e)&&e.toString===d?JSON.stringify(e,null,2):String(e);function ce(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function le(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=m(e.pluralRules)&&E(t)&&f(e.pluralRules[t])?e.pluralRules[t]:ce,a=m(e.pluralRules)&&E(t)&&f(e.pluralRules[t])?ce:void 0,s=e.list||[],c=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,c);function i(t){const n=f(e.messages)?e.messages(t):!!m(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):re)}const _=T(e.processor)&&f(e.processor.normalize)?e.processor.normalize:ae,N=T(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:se,d={list:e=>s[e],named:e=>c[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,o]=n;let a="text",s="";1===n.length?m(r)?(s=r.modifier||s,a=r.type||a):E(r)&&(s=r||s):2===n.length&&(E(r)&&(s=r||s),E(o)&&(a=o||a));const c=i(t)(d),l="vnode"===a&&u(c)&&s?c[0]:c;return s?(f=s,e.modifiers?e.modifiers[f]:ne)(l,a):l;var f},message:i,type:T(e.processor)&&E(e.processor.type)?e.processor.type:oe,interpolate:N,normalize:_,values:l({},s,c)};return d}let ie=null;const ue=fe("function:translate");function fe(e){return t=>ie&&ie.emit(e,t)}const Ee=h.__EXTEND_POINT__,_e=A(Ee),me={NOT_FOUND_KEY:Ee,FALLBACK_TO_TRANSLATE:_e(),CANNOT_FORMAT_NUMBER:_e(),FALLBACK_TO_NUMBER_FORMAT:_e(),CANNOT_FORMAT_DATE:_e(),FALLBACK_TO_DATE_FORMAT:_e(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:_e(),__EXTEND_POINT__:_e()},Ne={[me.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[me.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[me.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[me.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[me.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[me.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[me.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."};const de=O.__EXTEND_POINT__,pe=A(de),Te={INVALID_ARGUMENT:de,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:pe(),__EXTEND_POINT__:pe()};function Le(e,t){return null!=t.locale?Ce(t.locale):Ce(e.locale)}let Ae;function Ce(e){if(E(e))return e;if(f(e)){if(e.resolvedOnce&&null!=Ae)return Ae;if("Function"===e.constructor.name){const t=e();if(N(t))throw Error(Te.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ae=t}throw Error(Te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(Te.NOT_SUPPORT_LOCALE_TYPE)}function ke(e,t,n){return[...new Set([n,...u(t)?t:m(t)?Object.keys(t):E(t)?[t]:[n]])]}function he(e,t,n){const r=E(n)?n:ye,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;u(e);)e=Oe(a,e,t);const s=u(t)||!T(t)?t:t.default?t.default:null;e=E(s)?[s]:s,u(e)&&Oe(a,e,!1),o.__localeChainCache.set(r,a)}return a}function Oe(e,t,n){let r=!0;for(let o=0;o<t.length&&_(r);o++){const a=t[o];E(a)&&(r=Ie(e,t[o],n))}return r}function Ie(e,t,n){let r;const o=t.split("-");do{r=Se(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Se(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),(u(n)||T(n))&&n[o]&&(r=n[o])}return r}Te.INVALID_ARGUMENT,Te.INVALID_DATE_ARGUMENT,Te.INVALID_ISO_DATE_ARGUMENT,Te.NOT_SUPPORT_NON_STRING_MESSAGE,Te.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Te.NOT_SUPPORT_LOCALE_TYPE;const ge="9.14.1",ye="en-US",be=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let Pe,De,Re;function Me(e){De=e}function Ue(e){Re=e}let ve=null;let Fe=null;let xe=0;function we(e,t,n,r,o){const{missing:a,onWarn:s}=e;if(null!==a){const r=a(e,n,t,o);return E(r)?r:t}return t}function We(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Xe(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(We(e,t[r]))return!0;return!1}function Ye(e){return t=>function(e,t){const n=t.b||t.body;if(1===(n.t||n.type)){const t=n,r=t.c||t.cases;return e.plural(r.reduce(((t,n)=>[...t,Ge(e,n)]),[]))}return Ge(e,n)}(t,e)}function Ge(e,t){const n=t.s||t.static;if(n)return"text"===e.type?n:e.normalize([n]);{const n=(t.i||t.items).reduce(((t,n)=>[...t,Ke(e,n)]),[]);return e.normalize(n)}}function Ke(e,t){const n=t.t||t.type;switch(n){case 3:{const e=t;return e.v||e.value}case 9:{const e=t;return e.v||e.value}case 4:{const n=t;return e.interpolate(e.named(n.k||n.key))}case 5:{const n=t;return e.interpolate(e.list(null!=n.i?n.i:n.index))}case 6:{const n=t,r=n.m||n.modifier;return e.linked(Ke(e,n.k||n.key),r?Ke(e,r):void 0,e.type)}case 7:{const e=t;return e.v||e.value}case 8:{const e=t;return e.v||e.value}default:throw new Error(`unhandled node type on format message part: ${n}`)}}const Ve=e=>e;let $e=Object.create(null);const He=e=>m(e)&&(0===e.t||0===e.type)&&("b"in e||"body"in e);const Be=()=>"",je=e=>f(e);function ze(e,t,n,r,o,a){const{messages:s,onWarn:c,messageResolver:l,localeFallbacker:i}=e,u=i(e,r,n);let f,_={},m=null;for(let N=0;N<u.length&&(f=u[N],_=s[f]||{},null===(m=l(_,t))&&(m=_[t]),!(E(m)||He(m)||je(m)));N++)if(!Xe(f,u)){const n=we(e,t,f,0,"translate");n!==t&&(m=n)}return[m,f,_]}function Qe(e,t,r,o,a,s){const{messageCompiler:c,warnHtmlMessage:l}=e;if(je(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 i=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,l,s));return i.locale=r,i.key=t,i.source=o,i}function Je(...e){const[t,n,r]=e,a={};if(!(E(t)||o(t)||je(t)||He(t)))throw Error(Te.INVALID_ARGUMENT);const s=o(t)?String(t):(je(t),t);return o(n)?a.plural=n:E(n)?a.default=n:T(n)&&!c(n)?a.named=n:u(n)&&(a.list=n),o(r)?a.plural=r:E(r)?a.default=r:T(r)&&l(a,r),[s,a]}const Ze=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function qe(...e){const[t,n,r,s]=e,c={};let l,i={};if(E(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Te.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(u){throw Error(Te.INVALID_ISO_DATE_ARGUMENT)}}else if(a(t)){if(isNaN(t.getTime()))throw Error(Te.INVALID_DATE_ARGUMENT);l=t}else{if(!o(t))throw Error(Te.INVALID_ARGUMENT);l=t}return E(n)?c.key=n:T(n)&&Object.keys(n).forEach((e=>{Ze.includes(e)?i[e]=n[e]:c[e]=n[e]})),E(r)?c.locale=r:T(r)&&(i=r),T(s)&&(i=s),[c.key||"",l,c,i]}const et=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function tt(...e){const[t,n,r,a]=e,s={};let c={};if(!o(t))throw Error(Te.INVALID_ARGUMENT);const l=t;return E(n)?s.key=n:T(n)&&Object.keys(n).forEach((e=>{et.includes(e)?c[e]=n[e]:s[e]=n[e]})),E(r)?s.locale=r:T(r)&&(c=r),T(a)&&(c=a),[s.key||"",l,s,c]}return Me(te),Ue(he),e.CompileErrorCodes=O,e.CoreErrorCodes=Te,e.CoreWarnCodes=me,e.DATETIME_FORMAT_OPTIONS_KEYS=Ze,e.DEFAULT_LOCALE=ye,e.DEFAULT_MESSAGE_DATA_TYPE=oe,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=et,e.VERSION=ge,e.clearCompileCache=function(){$e=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}},e.compile=function(e,t){if(E(e)){!_(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Ve)(e),r=$e[n];if(r)return r;const{ast:o,detectError:a}=function(e,t={}){let n=!1;const r=t.onError||S;return t.onError=e=>{n=!0,r(e)},{...B(e,t),detectError:n}}(e,{...t,location:!1,jit:!0}),s=Ye(o);return a?s:$e[n]=s}{const t=e.cacheKey;if(t){const n=$e[t];return n||($e[t]=Ye(e))}return Ye(e)}},e.compileToFunction=(e,t)=>{if(!E(e))throw Error(Te.NOT_SUPPORT_NON_STRING_MESSAGE);return()=>e},e.createCompileError=I,e.createCoreContext=function(e={}){const t=f(e.onWarn)?e.onWarn:C,n=E(e.version)?e.version:ge,r=E(e.locale)||f(e.locale)?e.locale:ye,o=f(r)?ye:r,a=u(e.fallbackLocale)||T(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,c=T(e.messages)?e.messages:{[o]:{}},i=T(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},N=T(e.numberFormats)?e.numberFormats:{[o]:{}},d=l({},e.modifiers||{},{upper:(e,t)=>"text"===t&&E(e)?e.toUpperCase():"vnode"===t&&m(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&E(e)?e.toLowerCase():"vnode"===t&&m(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&E(e)?be(e):"vnode"===t&&m(e)&&"__v_isVNode"in e?be(e.children):e}),p=e.pluralRules||{},L=f(e.missing)?e.missing:null,A=!_(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,k=!_(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,O=!!e.unresolving,I=f(e.postTranslation)?e.postTranslation:null,S=T(e.processor)?e.processor:null,g=!_(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=f(e.messageCompiler)?e.messageCompiler:Pe,P=f(e.messageResolver)?e.messageResolver:De||ee,D=f(e.localeFallbacker)?e.localeFallbacker:Re||ke,R=m(e.fallbackContext)?e.fallbackContext:void 0,M=e,U=m(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,v=m(M.__numberFormatters)?M.__numberFormatters:new Map,F=m(M.__meta)?M.__meta:{};xe++;const x={version:n,cid:xe,locale:r,fallbackLocale:a,messages:c,modifiers:d,pluralRules:p,missing:L,missingWarn:A,fallbackWarn:k,fallbackFormat:h,unresolving:O,postTranslation:I,processor:S,warnHtmlMessage:g,escapeParameter:y,messageCompiler:b,messageResolver:P,localeFallbacker:D,fallbackContext:R,onWarn:t,__meta:F};return x.datetimeFormats=i,x.numberFormats=N,x.__datetimeFormatters=U,x.__numberFormatters=v,x},e.createCoreError=function(e){return I(e,null,void 0)},e.createMessageContext=le,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:i}=e,[u,f,m,N]=qe(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn,_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,p=Le(e,m),L=s(e,o,p);if(!E(u)||""===u)return new Intl.DateTimeFormat(p,N).format(f);let A,C={},k=null;for(let c=0;c<L.length&&(A=L[c],C=n[A]||{},k=C[u],!T(k));c++)we(e,u,A,0,"datetime format");if(!T(k)||!E(A))return r?-1:u;let h=`${A}__${u}`;c(N)||(h=`${h}__${JSON.stringify(N)}`);let O=i.get(h);return O||(O=new Intl.DateTimeFormat(A,l({},k,N)),i.set(h,O)),d?O.formatToParts(f):O.format(f)},e.fallbackWithLocaleChain=he,e.fallbackWithSimple=ke,e.getAdditionalMeta=()=>ve,e.getDevToolsHook=function(){return ie},e.getFallbackContext=()=>Fe,e.getLocale=Le,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&m(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(Ne[e],...n)},e.handleMissing=we,e.initI18nDevTools=function(e,t,n){ie&&ie.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=We,e.isImplicitFallback=Xe,e.isMessageAST=He,e.isMessageFunction=je,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,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:i}=e,[u,f,m,N]=tt(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn,_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,p=Le(e,m),L=s(e,o,p);if(!E(u)||""===u)return new Intl.NumberFormat(p,N).format(f);let A,C={},k=null;for(let c=0;c<L.length&&(A=L[c],C=n[A]||{},k=C[u],!T(k));c++)we(e,u,A,0,"number format");if(!T(k)||!E(A))return r?-1:u;let h=`${A}__${u}`;c(N)||(h=`${h}__${JSON.stringify(N)}`);let O=i.get(h);return O||(O=new Intl.NumberFormat(A,l({},k,N)),i.set(h,O)),d?O.formatToParts(f):O.format(f)},e.parse=Z,e.parseDateTimeArgs=qe,e.parseNumberArgs=tt,e.parseTranslateArgs=Je,e.registerLocaleFallbacker=Ue,e.registerMessageCompiler=function(e){Pe=e},e.registerMessageResolver=Me,e.resolveLocale=Ce,e.resolveValue=te,e.resolveWithKeyValue=ee,e.setAdditionalMeta=e=>{ve=e},e.setDevToolsHook=function(e){ie=e},e.setFallbackContext=e=>{Fe=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:s,fallbackLocale:c,messages:l}=e,[f,N]=Je(...t),d=_(N.missingWarn)?N.missingWarn:e.missingWarn,p=_(N.fallbackWarn)?N.fallbackWarn:e.fallbackWarn,T=_(N.escapeParameter)?N.escapeParameter:e.escapeParameter,L=!!N.resolvedMessage,A=E(N.default)||_(N.default)?_(N.default)?s?f:()=>f:N.default:n?s?f:()=>f:"",C=n||""!==A,k=Le(e,N);T&&function(e){u(e.list)?e.list=e.list.map((e=>E(e)?i(e):e)):m(e.named)&&Object.keys(e.named).forEach((t=>{E(e.named[t])&&(e.named[t]=i(e.named[t]))}))}(N);let[h,O,I]=L?[f,k,l[k]||{}]:ze(e,f,k,c,p,d),S=h,g=f;if(L||E(S)||He(S)||je(S)||C&&(S=A,g=S),!(L||(E(S)||He(S)||je(S))&&E(O)))return a?-1:f;let y=!1;const b=je(S)?S:Qe(e,f,O,S,g,(()=>{y=!0}));if(y)return S;const P=function(e,t,n,r){const{modifiers:a,pluralRules:s,messageResolver:c,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,_=r=>{let o=c(n,r);if(null==o&&f){const[,,e]=ze(f,r,t,l,i,u);o=c(e,r)}if(E(o)||He(o)){let n=!1;const a=Qe(e,r,t,o,r,(()=>{n=!0}));return n?Be:a}return je(o)?o:Be},m={locale:t,modifiers:a,pluralRules:s,messages:_};e.processor&&(m.processor=e.processor);r.list&&(m.list=r.list);r.named&&(m.named=r.named);o(r.plural)&&(m.pluralIndex=r.plural);return m}(e,O,I,N),D=function(e,t,n){const r=t(n);return r}(0,b,le(P));return r?r(D,f):D},e.translateDevTools=ue,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},e}({}); | ||
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]"===k(e),s=e=>"[object RegExp]"===k(e),a=e=>C(e)&&0===Object.keys(e).length,l=Object.assign,i=Object.create,u=(e=null)=>i(e);function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const E=Object.prototype.hasOwnProperty;function _(e,t){return E.call(e,t)}const m=Array.isArray,d=e=>"function"==typeof e,p=e=>"string"==typeof e,N=e=>"boolean"==typeof e,T=e=>null!==e&&"object"==typeof e,L=e=>T(e)&&d(e.then)&&d(e.catch),A=Object.prototype.toString,k=e=>A.call(e),C=e=>{if(!T(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function h(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function O(e){let t=e;return()=>++t}function I(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function S(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const g={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2};const y={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,__EXTEND_POINT__:17};function b(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 P(e){throw e}y.EXPECTED_TOKEN,y.INVALID_TOKEN_IN_PLACEHOLDER,y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,y.UNKNOWN_ESCAPE_SEQUENCE,y.INVALID_UNICODE_ESCAPE_SEQUENCE,y.UNBALANCED_CLOSING_BRACE,y.UNTERMINATED_CLOSING_BRACE,y.EMPTY_PLACEHOLDER,y.NOT_ALLOW_NEST_PLACEHOLDER,y.INVALID_LINKED_FORMAT,y.MUST_HAVE_MESSAGES_IN_PLURAL,y.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.UNEXPECTED_EMPTY_LINKED_KEY,y.UNEXPECTED_LEXICAL_ANALYSIS,y.UNHANDLED_CODEGEN_NODE_TYPE,y.UNHANDLED_MINIFIER_NODE_TYPE;const D=" ",R="\r",M="\n",U=String.fromCharCode(8232),v=String.fromCharCode(8233);function x(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>t[e]===R&&t[e+1]===M,a=e=>t[e]===v,l=e=>t[e]===U,i=e=>s(e)||(e=>t[e]===M)(e)||a(e)||l(e),u=e=>s(e)||a(e)||l(e)?M: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 F=void 0,w="'";function W(e,t={}){const n=!1!==t.location,r=x(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:14,offset:a,startLoc:s,endLoc:s,lastType:14,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=S(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const E=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(y.EXPECTED_TOKEN,c(),"")}function m(e){let t="";for(;e.currentPeek()===D||e.currentPeek()===M;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=m(e);return e.skipToPeek(),t}function p(e){if(e===F)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===F)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function L(e,t=!0){const n=(t=!1,r="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==r&&t:"@"!==c&&c?"%"===c?(e.peek(),n(t,"%",!0)):"|"===c?!("%"!==r&&!o)||!(r===D||r===M):c===D?(e.peek(),n(!0,D,o)):c!==M||(e.peek(),n(!0,M,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function A(e,t){const n=e.currentChar();return n===F?F:t(n)?(e.next(),n):null}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}function C(e){return A(e,k)}function h(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 O(e){return A(e,h)}function I(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function g(e){return A(e,I)}function b(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function P(e){return A(e,b)}function R(e){let t="",n="";for(;t=g(e);)n+=t;return n}function U(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!L(e))break;t+=n,e.next()}else if(n===D||n===M)if(L(e))t+=n,e.next();else{if(T(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function v(e){return e!==w&&e!==M}function W(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 y.UNKNOWN_ESCAPE_SEQUENCE,c(),""}}function X(e,t,n){_(e,t);let r="";for(let o=0;o<n;o++){const t=P(e);if(!t){y.INVALID_UNICODE_ESCAPE_SEQUENCE,c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function Y(e){return"{"!==e&&"}"!==e&&e!==D&&e!==M}function G(e){d(e);const t=_(e,"|");return d(e),t}function K(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(y.NOT_ALLOW_NEST_PLACEHOLDER,c()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(y.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&&(y.UNTERMINATED_CLOSING_BRACE,c()),n=$(e,t)||E(t),t.braceNest=0,n;default:{let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&(y.UNTERMINATED_CLOSING_BRACE,c()),n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return y.UNTERMINATED_CLOSING_BRACE,c(),t.braceNest=0,V(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,5,function(e){d(e);let t="",n="";for(;t=O(e);)n+=t;return e.currentChar()===F&&(y.UNTERMINATED_CLOSING_BRACE,c()),n}(e)),d(e),n;if(o=N(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${R(e)}`):t+=R(e),e.currentChar()===F&&(y.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()===w;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),_(e,"'");let t="",n="";for(;t=A(e,v);)n+="\\"===t?W(e):t;const r=e.currentChar();return r===M||r===F?(y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),r===M&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";for(;t=A(e,Y);)n+=t;return n}(e)),y.INVALID_TOKEN_IN_PLACEHOLDER,c(),n.value,d(e),n;break}}return n}function $(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==M&&o!==D||(y.INVALID_LINKED_FORMAT,c()),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),$(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;m(e);const r=p(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=C(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===D||!t)&&(t===M?(e.peek(),r()):L(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?K(e,t)||r:f(t,11,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"%"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===D?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(8===n&&(y.INVALID_LINKED_FORMAT,c()),t.braceNest=0,t.inLinked=!1,V(e,t))}}function V(e,t){let n={type:14};if(t.braceNest>0)return K(e,t)||E(t);if(t.inLinked)return $(e,t)||E(t);switch(e.currentChar()){case"{":return K(e,t)||E(t);case"}":return y.UNBALANCED_CLOSING_BRACE,c(),e.next(),f(t,3,"}");case"@":return $(e,t)||E(t);default:{if(T(e))return n=f(t,1,G(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=m(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?f(t,0,U(e)):f(t,4,function(e){d(e);const t=e.currentChar();return"%"!==t&&(y.EXPECTED_TOKEN,c()),e.next(),"%"}(e));if(L(e))return f(t,0,U(e));break}}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()===F?f(l,14):V(r,l)},currentOffset:o,currentPosition:c,context:i}}const X=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Y(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 G(e={}){const t=!1!==e.location,{onError:n,onWarn:r}=e;function o(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function c(e,n,r,o){o&&(e.type=o),t&&(e.end=n,e.loc&&(e.loc.end=r))}function s(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,c(r,e.currentOffset(),e.currentPosition()),r}function a(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(5,r,s);return a.index=parseInt(t,10),e.nextToken(),c(a,e.currentOffset(),e.currentPosition()),a}function i(e,t,n){const r=e.context(),{lastOffset:s,lastStartLoc:a}=r,l=o(4,s,a);return l.key=t,!0===n&&(l.modulo=!0),e.nextToken(),c(l,e.currentOffset(),e.currentPosition()),l}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(9,r,s);return a.value=t.replace(X,Y),e.nextToken(),c(a,e.currentOffset(),e.currentPosition()),a}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,a=o(8,r,s);return 12!==t.type?(y.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,a.value="",c(a,r,s),{nextConsumeToken:t,node:a}):(null==t.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,K(t)),a.value=t.value||"",c(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,c(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=i(e,r.value||"");break;case 6:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=a(e,r.value||"");break;case 7:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(r)),n.key=u(e,r.value||"");break;default:{y.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const s=e.context(),a=o(7,s.offset,s.startLoc);return a.value="",c(a,s.offset,s.startLoc),n.key=a,c(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}}return c(n,e.currentOffset(),e.currentPosition()),{node:n}}function E(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null,l=null;do{const o=r||e.nextToken();switch(r=null,o.type){case 0:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(s(e,o.value||""));break;case 6:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(a(e,o.value||""));break;case 4:l=!0;break;case 5:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(i(e,o.value||"",!!l)),l&&(g.USE_MODULO_SYNTAX,t.lastStartLoc,K(o),l=null);break;case 7:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,K(o)),n.items.push(u(e,o.value||""));break;case 8:{const t=f(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return c(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function _(e){const t=e.context(),{offset:n,startLoc:r}=t,s=E(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let a=0===r.items.length;const l=o(1,t,n);l.cases=[],l.cases.push(r);do{const t=E(e);a||(a=0===t.items.length),l.cases.push(t)}while(14!==s.currentType);return a&&y.MUST_HAVE_MESSAGES_IN_PLURAL,c(l,e.currentOffset(),e.currentPosition()),l}(e,n,r,s)}return{parse:function(n){const r=W(n,l({},e)),s=r.context(),a=o(0,s.offset,s.startLoc);return t&&a.loc&&(a.loc.source=n),a.body=_(r),e.onCacheKey&&(a.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(y.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),c(a,r.currentOffset(),r.currentPosition()),a}}}function K(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function $(e,t){for(let n=0;n<e.length;n++)V(e[n],t)}function V(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:V(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 H(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&&V(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function B(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=h(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 j(e){switch(e.t=e.type,e.type){case 0:{const t=e;j(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++)j(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++)j(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;j(t.key),t.k=t.key,delete t.key,t.modifier&&(j(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 z(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?z(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&&(z(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&&(z(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")}(`),z(e,t.key),t.modifier?(e.push(", "),z(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 Q=(e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,c=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],l=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:c}=t,s=!1!==t.location,a={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:c,indentLevel:0};function l(e,t){a.code+=e}function i(e,t=!0){const n=t?o:"";l(c?n+" ".repeat(e):n)}return s&&e.loc&&(a.source=e.loc.source),{context:()=>a,push:l,indent:function(e=!0){const t=++a.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&i(t)},newline:function(){i(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:c,needIndent:s});l.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${h(a.map((e=>`${e}: _${e}`)),", ")} } = ctx`),l.newline()),l.push("return "),z(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:i,map:u}=l.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function J(e,t={}){const n=l({},t),r=!!n.jit,o=!!n.minify,c=null==n.optimize||n.optimize,s=G(n).parse(e);return r?(c&&function(e){const t=e.body;2===t.type?B(t):t.cases.forEach((e=>B(e)))}(s),o&&j(s),{ast:s,code:""}):(H(s,n),Q(s,n))}const Z=[];Z[0]={w:[0],i:[3,0],"[":[4],o:[7]},Z[1]={w:[1],".":[2],"[":[4],o:[7]},Z[2]={w:[2],i:[3,0],0:[3,0]},Z[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Z[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Z[5]={"'":[4,0],o:8,l:[5,0]},Z[6]={'"':[4,0],o:8,l:[6,0]};const q=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ee(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 te(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,q.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 ne(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=te(r),!1===r)return!1;E[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(c=ee(n),l=Z[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 re=new Map;function oe(e,t){return T(e)?e[t]:null}function ce(e,t){if(!T(e))return null;let n=re.get(t);if(n||(n=ne(t),n&&re.set(t,n)),!n)return null;const r=n.length;let o=e,c=0;for(;c<r;){const e=o[n[c]];if(void 0===e)return null;if(d(o))return null;o=e,c++}return o}const se=e=>e,ae=e=>"",le="text",ie=e=>0===e.length?"":h(e),ue=e=>null==e?"":m(e)||C(e)&&e.toString===A?JSON.stringify(e,null,2):String(e);function fe(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Ee(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=T(e.pluralRules)&&p(t)&&d(e.pluralRules[t])?e.pluralRules[t]:fe,c=T(e.pluralRules)&&p(t)&&d(e.pluralRules[t])?fe:void 0,s=e.list||[],a=e.named||u();o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function i(t){const n=d(e.messages)?e.messages(t):!!T(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):ae)}const f=C(e.processor)&&d(e.processor.normalize)?e.processor.normalize:ie,E=C(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:ue,_={list:e=>s[e],named:e=>a[e],plural:e=>e[r(n,e.length,c)],linked:(t,...n)=>{const[r,o]=n;let c="text",s="";1===n.length?T(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=i(t)(_),l="vnode"===c&&m(a)&&s?a[0]:a;return s?(u=s,e.modifiers?e.modifiers[u]:se)(l,c):l;var u},message:i,type:C(e.processor)&&p(e.processor.type)?e.processor.type:le,interpolate:E,normalize:f,values:l(u(),s,a)};return _}let _e=null;const me=de("function:translate");function de(e){return t=>_e&&_e.emit(e,t)}const pe=g.__EXTEND_POINT__,Ne=O(pe),Te={NOT_FOUND_KEY:pe,FALLBACK_TO_TRANSLATE:Ne(),CANNOT_FORMAT_NUMBER:Ne(),FALLBACK_TO_NUMBER_FORMAT:Ne(),CANNOT_FORMAT_DATE:Ne(),FALLBACK_TO_DATE_FORMAT:Ne(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:Ne(),__EXTEND_POINT__:Ne()},Le={[Te.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Te.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Te.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Te.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Te.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Te.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Te.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."};const Ae=y.__EXTEND_POINT__,ke=O(Ae),Ce={INVALID_ARGUMENT:Ae,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:ke(),__EXTEND_POINT__:ke()};function he(e,t){return null!=t.locale?Ie(t.locale):Ie(e.locale)}let Oe;function Ie(e){if(p(e))return e;if(d(e)){if(e.resolvedOnce&&null!=Oe)return Oe;if("Function"===e.constructor.name){const t=e();if(L(t))throw Error(Ce.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Oe=t}throw Error(Ce.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Error(Ce.NOT_SUPPORT_LOCALE_TYPE)}function Se(e,t,n){return[...new Set([n,...m(t)?t:T(t)?Object.keys(t):p(t)?[t]:[n]])]}function ge(e,t,n){const r=p(n)?n:Re,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let c=o.__localeChainCache.get(r);if(!c){c=[];let e=[n];for(;m(e);)e=ye(c,e,t);const s=m(t)||!C(t)?t:t.default?t.default:null;e=p(s)?[s]:s,m(e)&&ye(c,e,!1),o.__localeChainCache.set(r,c)}return c}function ye(e,t,n){let r=!0;for(let o=0;o<t.length&&N(r);o++){const c=t[o];p(c)&&(r=be(e,t[o],n))}return r}function be(e,t,n){let r;const o=t.split("-");do{r=Pe(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Pe(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)||C(n))&&n[o]&&(r=n[o])}return r}Ce.INVALID_ARGUMENT,Ce.INVALID_DATE_ARGUMENT,Ce.INVALID_ISO_DATE_ARGUMENT,Ce.NOT_SUPPORT_NON_STRING_MESSAGE,Ce.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Ce.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Ce.NOT_SUPPORT_LOCALE_TYPE;const De="9.14.2",Re="en-US",Me=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let Ue,ve,xe;function Fe(e){ve=e}function we(e){xe=e}let We=null;let Xe=null;let Ye=0;const Ge=e=>({[e]:u()});function Ke(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 $e(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Ve(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if($e(e,t[r]))return!0;return!1}function He(e){return t=>function(e,t){const n=(r=t,ct(r,Be));var r;if(null==n)throw st(0);if(1===et(n)){const t=function(e){return ct(e,je,[])}(n);return e.plural(t.reduce(((t,n)=>[...t,ze(e,n)]),[]))}return ze(e,n)}(t,e)}const Be=["b","body"];const je=["c","cases"];function ze(e,t){const n=function(e){return ct(e,Qe)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return ct(e,Je,[])}(t).reduce(((t,n)=>[...t,Ze(e,n)]),[]);return e.normalize(n)}}const Qe=["s","static"];const Je=["i","items"];function Ze(e,t){const n=et(t);switch(n){case 3:case 9:case 7:case 8:return nt(t,n);case 4:{const r=t;if(_(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(_(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw st(n)}case 5:{const r=t;if(_(r,"i")&&o(r.i))return e.interpolate(e.list(r.i));if(_(r,"index")&&o(r.index))return e.interpolate(e.list(r.index));throw st(n)}case 6:{const n=t,r=function(e){return ct(e,rt)}(n),o=function(e){const t=ct(e,ot);if(t)return t;throw st(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 qe=["t","type"];function et(e){return ct(e,qe)}const tt=["v","value"];function nt(e,t){const n=ct(e,tt);if(n)return n;throw st(t)}const rt=["m","modifier"];const ot=["k","key"];function ct(e,t,n){for(let r=0;r<t.length;r++){const n=t[r];if(_(e,n)&&null!=e[n])return e[n]}return n}function st(e){return new Error(`unhandled node type: ${e}`)}const at=e=>e;let lt=u();function it(e){return T(e)&&0===et(e)&&(_(e,"b")||_(e,"body"))}const ut=()=>"",ft=e=>d(e);function Et(e,t,n,r,o,c){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:i}=e,f=i(e,r,n);let E,_=u(),m=null;for(let d=0;d<f.length&&(E=f[d],_=s[E]||u(),null===(m=l(_,t))&&(m=_[t]),!(p(m)||it(m)||ft(m)));d++)if(!Ve(E,f)){const n=Ke(e,t,E,0,"translate");n!==t&&(m=n)}return[m,E,_]}function _t(e,t,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:l}=e;if(ft(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 mt(...e){const[t,n,r]=e,c=u();if(!(p(t)||o(t)||ft(t)||it(t)))throw Error(Ce.INVALID_ARGUMENT);const s=o(t)?String(t):(ft(t),t);return o(n)?c.plural=n:p(n)?c.default=n:C(n)&&!a(n)?c.named=n:m(n)&&(c.list=n),o(r)?c.plural=r:p(r)?c.default=r:C(r)&&l(c,r),[s,c]}const dt=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function pt(...e){const[t,n,r,s]=e,a=u();let l,i=u();if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Ce.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(f){throw Error(Ce.INVALID_ISO_DATE_ARGUMENT)}}else if(c(t)){if(isNaN(t.getTime()))throw Error(Ce.INVALID_DATE_ARGUMENT);l=t}else{if(!o(t))throw Error(Ce.INVALID_ARGUMENT);l=t}return p(n)?a.key=n:C(n)&&Object.keys(n).forEach((e=>{dt.includes(e)?i[e]=n[e]:a[e]=n[e]})),p(r)?a.locale=r:C(r)&&(i=r),C(s)&&(i=s),[a.key||"",l,a,i]}const Nt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Tt(...e){const[t,n,r,c]=e,s=u();let a=u();if(!o(t))throw Error(Ce.INVALID_ARGUMENT);const l=t;return p(n)?s.key=n:C(n)&&Object.keys(n).forEach((e=>{Nt.includes(e)?a[e]=n[e]:s[e]=n[e]})),p(r)?s.locale=r:C(r)&&(a=r),C(c)&&(a=c),[s.key||"",l,s,a]}return Fe(ce),we(ge),e.CompileErrorCodes=y,e.CoreErrorCodes=Ce,e.CoreWarnCodes=Te,e.DATETIME_FORMAT_OPTIONS_KEYS=dt,e.DEFAULT_LOCALE=Re,e.DEFAULT_MESSAGE_DATA_TYPE=le,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.NUMBER_FORMAT_OPTIONS_KEYS=Nt,e.VERSION=De,e.clearCompileCache=function(){lt=u()},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}},e.compile=function(e,t){if(p(e)){!N(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||at)(e),r=lt[n];if(r)return r;const{ast:o,detectError:c}=function(e,t={}){let n=!1;const r=t.onError||P;return t.onError=e=>{n=!0,r(e)},{...J(e,t),detectError:n}}(e,{...t,location:!1,jit:!0}),s=He(o);return c?s:lt[n]=s}{const t=e.cacheKey;if(t){const n=lt[t];return n||(lt[t]=He(e))}return He(e)}},e.compileToFunction=(e,t)=>{if(!p(e))throw Error(Ce.NOT_SUPPORT_NON_STRING_MESSAGE);return()=>e},e.createCompileError=b,e.createCoreContext=function(e={}){const t=d(e.onWarn)?e.onWarn:I,n=p(e.version)?e.version:De,r=p(e.locale)||d(e.locale)?e.locale:Re,o=d(r)?Re:r,c=m(e.fallbackLocale)||C(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,a=C(e.messages)?e.messages:Ge(o),i=C(e.datetimeFormats)?e.datetimeFormats:Ge(o),f=C(e.numberFormats)?e.numberFormats:Ge(o),E=l(u(),e.modifiers,{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&T(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&T(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?Me(e):"vnode"===t&&T(e)&&"__v_isVNode"in e?Me(e.children):e}),_=e.pluralRules||u(),L=d(e.missing)?e.missing:null,A=!N(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,k=!N(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,O=!!e.unresolving,S=d(e.postTranslation)?e.postTranslation:null,g=C(e.processor)?e.processor:null,y=!N(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,P=d(e.messageCompiler)?e.messageCompiler:Ue,D=d(e.messageResolver)?e.messageResolver:ve||oe,R=d(e.localeFallbacker)?e.localeFallbacker:xe||Se,M=T(e.fallbackContext)?e.fallbackContext:void 0,U=e,v=T(U.__datetimeFormatters)?U.__datetimeFormatters:new Map,x=T(U.__numberFormatters)?U.__numberFormatters:new Map,F=T(U.__meta)?U.__meta:{};Ye++;const w={version:n,cid:Ye,locale:r,fallbackLocale:c,messages:a,modifiers:E,pluralRules:_,missing:L,missingWarn:A,fallbackWarn:k,fallbackFormat:h,unresolving:O,postTranslation:S,processor:g,warnHtmlMessage:y,escapeParameter:b,messageCompiler:P,messageResolver:D,localeFallbacker:R,fallbackContext:M,onWarn:t,__meta:F};return w.datetimeFormats=i,w.numberFormats=f,w.__datetimeFormatters=v,w.__numberFormatters=x,w},e.createCoreError=function(e){return b(e,null,void 0)},e.createMessageContext=Ee,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:c,localeFallbacker:s}=e,{__datetimeFormatters:i}=e,[u,f,E,_]=pt(...t);N(E.missingWarn)?E.missingWarn:e.missingWarn,N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn;const m=!!E.part,d=he(e,E),T=s(e,o,d);if(!p(u)||""===u)return new Intl.DateTimeFormat(d,_).format(f);let L,A={},k=null;for(let a=0;a<T.length&&(L=T[a],A=n[L]||{},k=A[u],!C(k));a++)Ke(e,u,L,0,"datetime format");if(!C(k)||!p(L))return r?-1:u;let h=`${L}__${u}`;a(_)||(h=`${h}__${JSON.stringify(_)}`);let O=i.get(h);return O||(O=new Intl.DateTimeFormat(L,l({},k,_)),i.set(h,O)),m?O.formatToParts(f):O.format(f)},e.fallbackWithLocaleChain=ge,e.fallbackWithSimple=Se,e.getAdditionalMeta=()=>We,e.getDevToolsHook=function(){return _e},e.getFallbackContext=()=>Xe,e.getLocale=he,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&T(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(Le[e],...n)},e.handleMissing=Ke,e.initI18nDevTools=function(e,t,n){_e&&_e.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isAlmostSameLocale=$e,e.isImplicitFallback=Ve,e.isMessageAST=it,e.isMessageFunction=ft,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,fallbackLocale:o,onWarn:c,localeFallbacker:s}=e,{__numberFormatters:i}=e,[u,f,E,_]=Tt(...t);N(E.missingWarn)?E.missingWarn:e.missingWarn,N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn;const m=!!E.part,d=he(e,E),T=s(e,o,d);if(!p(u)||""===u)return new Intl.NumberFormat(d,_).format(f);let L,A={},k=null;for(let a=0;a<T.length&&(L=T[a],A=n[L]||{},k=A[u],!C(k));a++)Ke(e,u,L,0,"number format");if(!C(k)||!p(L))return r?-1:u;let h=`${L}__${u}`;a(_)||(h=`${h}__${JSON.stringify(_)}`);let O=i.get(h);return O||(O=new Intl.NumberFormat(L,l({},k,_)),i.set(h,O)),m?O.formatToParts(f):O.format(f)},e.parse=ne,e.parseDateTimeArgs=pt,e.parseNumberArgs=Tt,e.parseTranslateArgs=mt,e.registerLocaleFallbacker=we,e.registerMessageCompiler=function(e){Ue=e},e.registerMessageResolver=Fe,e.resolveLocale=Ie,e.resolveValue=ce,e.resolveWithKeyValue=oe,e.setAdditionalMeta=e=>{We=e},e.setDevToolsHook=function(e){_e=e},e.setFallbackContext=e=>{Xe=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:c,messageCompiler:s,fallbackLocale:a,messages:l}=e,[i,E]=mt(...t),_=N(E.missingWarn)?E.missingWarn:e.missingWarn,d=N(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn,L=N(E.escapeParameter)?E.escapeParameter:e.escapeParameter,A=!!E.resolvedMessage,k=p(E.default)||N(E.default)?N(E.default)?s?i:()=>i:E.default:n?s?i:()=>i:"",C=n||""!==k,h=he(e,E);L&&function(e){m(e.list)?e.list=e.list.map((e=>p(e)?f(e):e)):T(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=f(e.named[t]))}))}(E);let[O,I,S]=A?[i,h,l[h]||u()]:Et(e,i,h,a,d,_),g=O,y=i;if(A||p(g)||it(g)||ft(g)||C&&(g=k,y=g),!(A||(p(g)||it(g)||ft(g))&&p(I)))return c?-1:i;let b=!1;const P=ft(g)?g:_t(e,i,I,g,y,(()=>{b=!0}));if(b)return g;const D=function(e,t,n,r){const{modifiers:c,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,E=r=>{let o=a(n,r);if(null==o&&f){const[,,e]=Et(f,r,t,l,i,u);o=a(e,r)}if(p(o)||it(o)){let n=!1;const c=_t(e,r,t,o,r,(()=>{n=!0}));return n?ut:c}return ft(o)?o:ut},_={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,I,S,E),R=function(e,t,n){const r=t(n);return r}(0,P,Ee(D));return r?r(R,i):R},e.translateDevTools=me,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},e}({}); |
{ | ||
"name": "@intlify/core", | ||
"version": "9.14.1", | ||
"version": "9.14.2", | ||
"description": "@intlify/core", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@intlify/shared": "9.14.1", | ||
"@intlify/core-base": "9.14.1" | ||
"@intlify/core-base": "9.14.2", | ||
"@intlify/shared": "9.14.2" | ||
}, | ||
@@ -40,0 +40,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
697034
15181
+ Added@intlify/core-base@9.14.2(transitive)
+ Added@intlify/message-compiler@9.14.2(transitive)
+ Added@intlify/shared@9.14.2(transitive)
- Removed@intlify/core-base@9.14.1(transitive)
- Removed@intlify/message-compiler@9.14.1(transitive)
- Removed@intlify/shared@9.14.1(transitive)
Updated@intlify/core-base@9.14.2
Updated@intlify/shared@9.14.2