Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@intlify/core

Package Overview
Dependencies
Maintainers
2
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intlify/core - npm Package Compare versions

Comparing version 9.2.0-alpha.4 to 9.2.0-alpha.5

2

dist/core.cjs.js
/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===h(e),o=e=>k(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function a(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Object.prototype.hasOwnProperty;function l(e,t){return u.call(e,t)}const i=Array.isArray,f=e=>"function"==typeof e,p=e=>"string"==typeof e,m=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,h=e=>_.call(e),k=e=>"[object Object]"===h(e),T=[];T[0]={w:[0],i:[3,0],"[":[4],o:[7]},T[1]={w:[1],".":[2],"[":[4],o:[7]},T[2]={w:[2],i:[3,0],0:[3,0]},T[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},T[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},T[5]={"'":[4,0],o:8,l:[5,0]},T[6]={'"':[4,0],o:8,l:[6,0]};const E=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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 g(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(E.test(t)?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)}function L(e){const t=[];let n,r,o,c,s,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=g(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(c=N(n),u=T[i],s=u[c]||u.l||8,8===s)return;if(i=s[0],void 0!==s[1]&&(a=p[s[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const b=new Map;function y(e,t){if(!d(e))return null;let n=b.get(t);if(n||(n=L(t),n&&b.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;o=e,c++}return o}function A(e){if(!d(e))return e;for(const t in e)if(l(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],d(o[n[r]])&&A(o[n[r]])}else d(e[t])&&A(e[t]);return e}const O=e=>e,C=e=>"",I="text",x=e=>0===e.length?"":e.join(""),P=e=>null==e?"":i(e)||k(e)&&e.toString===_?JSON.stringify(e,null,2):String(e);function v(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function w(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?e.pluralRules[t]:v,c=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?v:void 0,s=e.list||[],a=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,a);function u(t){const n=f(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):C)}const l=k(e.processor)&&f(e.processor.normalize)?e.processor.normalize:x,i=k(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:P,m={list:e=>s[e],named:e=>a[e],plural:e=>e[o(r,e.length,c)],linked:(t,n)=>{const r=u(t)(m);return p(n)?(o=n,e.modifiers?e.modifiers[o]:O)(r):r;var o},message:u,type:k(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:i,normalize:l};return m}const F={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,__EXTEND_POINT__:15};function D(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function R(e){throw e}function S(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const M=String.fromCharCode(8232),$=String.fromCharCode(8233);function U(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],a=e=>t[e]===$,u=e=>t[e]===M,l=e=>s(e)||(e=>"\n"===t[e])(e)||a(e)||u(e),i=e=>s(e)||a(e)||u(e)?"\n":t[e];function f(){return c=0,l(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(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 W=void 0;function K(e,t={}){const n=!1!==t.location,r=U(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(),u={currentType:14,offset:a,startLoc:s,endLoc:s,lastType:14,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=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 p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(c(),"")}function d(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function h(e){if(e===W)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function k(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===W)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(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||"\n"===r):" "===c?(e.peek(),n(!0," ",o)):"\n"!==c||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function N(e,t){const n=e.currentChar();return n===W?W:t(n)?(e.next(),n):null}function g(e){return N(e,(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 N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function y(e){let t="",n="";for(;t=L(e);)n+=t;return n}function A(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return O(e,t,4);case"U":return O(e,t,6);default:return c(),""}}function O(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function C(e){_(e);const t=m(e,"|");return _(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&c(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&c(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&c(),n=x(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&c(),n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(),t.braceNest=0,P(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=g(e);)n+=t;return e.currentChar()===W&&c(),n}(e)),_(e),n;if(o=k(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${y(e)}`):t+=y(e),e.currentChar()===W&&c(),t}(e)),_(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=N(e,r);)n+="\\"===t?A(e):t;const o=e.currentChar();return"\n"===o||o===W?(c(),"\n"===o&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=N(e,r);)n+=t;return n}(e)),c(),_(e),n}return n}function x(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||c(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),x(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=g(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?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?I(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&c(),t.braceNest=0,t.inLinked=!1,P(e,t))}}function P(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||p(t);if(t.inLinked)return x(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return I(e,t)||p(t);case"}":return c(),e.next(),f(t,3,"}");case"@":return x(e,t)||p(t);default:if(T(e))return n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=s,u.offset=o(),u.startLoc=c(),r.currentChar()===W?f(u,14):P(r,u)},currentOffset:o,currentPosition:c,context:l}}const j=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B(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}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(5,c,s);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(4,c,s);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(9,c,s);return a.value=t.replace(j,B),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(8,c,s);return 12!==t.type?(a.value="",o(a,c,s),{nextConsumeToken:t,node:a}):(null==t.value&&V(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&V(c),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&V(c),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&V(c),n.key=u(e,c.value||"");break;case 6:null==c.value&&V(c),n.key=a(e,c.value||"");break;case 7:null==c.value&&V(c),n.key=l(e,c.value||"");break;default:const t=e.context(),s=r(7,t.offset,t.startLoc);return s.value="",o(s,t.offset,t.startLoc),n.key=s,o(n,t.offset,t.startLoc),{nextConsumeToken:c,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let s=null;do{const t=s||e.nextToken();switch(s=null,t.type){case 0:null==t.value&&V(t),n.items.push(c(e,t.value||""));break;case 6:null==t.value&&V(t),n.items.push(a(e,t.value||""));break;case 5:null==t.value&&V(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&V(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),s=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:c}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,c){const s=e.context();let a=0===c.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==s.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,c,s)}return{parse:function(n){const c=K(n,s({},e)),a=c.context(),u=r(0,a.offset,a.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(c),o(u,c.currentOffset(),c.currentPosition()),u}}}function V(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++)H(e[n],t)}function H(e,t){switch(e.type){case 1:X(e.cases,t),t.helper("plural");break;case 2:X(e.items,t);break;case 6:H(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function J(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&&H(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}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 n=0;n<o&&(z(e,t.items[n]),n!==o-1);n++)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(")")}(e,t);break;case 8:case 7: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);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function Y(e,t={}){const n=s({},t),r=G(n).parse(e);return J(r,n),((e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,c={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){c.code+=e}function a(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>c,push:s,indent:function(e=!0){const t=++c.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&a(t)},newline:function(){a(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),c.length>0&&(s.push(`const { ${c.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),z(s,e),s.deindent(o),s.push("}");const{code:a,map:u}=s.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const Q="i18n:init";let q=null;function Z(e){q=e}function ee(){return q}function te(e,t,n){q&&q.emit(Q,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ne=re("function:translate");function re(e){return t=>q&&q.emit(e,t)}const oe={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},ce={[oe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[oe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[oe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[oe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function se(t,...n){return function(t,...n){return 1===n.length&&d(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(ce[t],...n)}const ae="9.2.0-alpha.4",ue=-1,le="";let ie;function fe(e){ie=e}let pe=null;const me=e=>{pe=e},de=()=>pe;let _e=0;function he(e={}){const t=p(e.version)?e.version:"9.2.0-alpha.4",n=p(e.locale)?e.locale:"en-US",o=i(e.fallbackLocale)||k(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=k(e.messages)?e.messages:{[n]:{}},u=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=k(e.numberFormats)?e.numberFormats:{[n]:{}},_=s({},e.modifiers||{},{upper:e=>p(e)?e.toUpperCase():e,lower:e=>p(e)?e.toLowerCase():e,capitalize:e=>p(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},T=f(e.missing)?e.missing:null,E=!m(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,N=!m(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,L=!!e.unresolving,b=f(e.postTranslation)?e.postTranslation:null,A=k(e.processor)?e.processor:null,O=!m(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,I=f(e.messageCompiler)?e.messageCompiler:ie,x=f(e.messageResolver)?e.messageResolver:y,P=f(e.onWarn)?e.onWarn:c,v=e,w=d(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,F=d(v.__numberFormatters)?v.__numberFormatters:new Map,D=d(v.__meta)?v.__meta:{};_e++;return{version:t,cid:_e,locale:n,fallbackLocale:o,messages:a,datetimeFormats:u,numberFormats:l,modifiers:_,pluralRules:h,missing:T,missingWarn:E,fallbackWarn:N,fallbackFormat:g,unresolving:L,postTranslation:b,processor:A,warnHtmlMessage:O,escapeParameter:C,messageCompiler:I,messageResolver:x,onWarn:P,__datetimeFormatters:w,__numberFormatters:F,__meta:D}}function ke(e,t){return e instanceof RegExp?e.test(t):e}function Te(e,t){return e instanceof RegExp?e.test(t):e}function Ee(e,t,n,r,o){const{missing:c}=e;if(null!==c){const r=c(e,n,t,o);return p(r)?r:t}return t}function Ne(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;i(e);)e=ge(o,e,t);const c=i(t)||!k(t)?t:t.default?t.default:null;e=p(c)?[c]:c,i(e)&&ge(o,e,!1),r.__localeChainCache.set(n,o)}return o}function ge(e,t,n){let r=!0;for(let o=0;o<t.length&&m(r);o++){p(t[o])&&(r=Le(e,t[o],n))}return r}function Le(e,t,n){let r;const o=t.split("-");do{r=be(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function be(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),(i(n)||k(n))&&n[o]&&(r=n[o])}return r}function ye(e,t,n){e.__localeChainCache=new Map,Ne(e,n,t)}const Ae=e=>e;let Oe=Object.create(null);function Ce(){Oe=Object.create(null)}function Ie(e,t={}){{const n=(t.onCacheKey||Ae)(e),r=Oe[n];if(r)return r;let o=!1;const c=t.onError||R;t.onError=e=>{o=!0,c(e)};const{code:s}=Y(e,t),a=new Function(`return ${s}`)();return o?a:Oe[n]=a}}const xe={INVALID_ARGUMENT:F.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:F.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:F.__EXTEND_POINT__+2,__EXTEND_POINT__:F.__EXTEND_POINT__+3};function Pe(e){return D(e,null,void 0)}const ve=()=>"",we=e=>f(e);function Fe(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:c,fallbackLocale:s,messages:u}=e,[l,_]=Re(...t),h=(m(_.missingWarn),m(_.fallbackWarn),m(_.escapeParameter)?_.escapeParameter:e.escapeParameter),k=!!_.resolvedMessage,T=p(_.default)||m(_.default)?m(_.default)?l:_.default:r?l:"",E=r||""!==T,N=p(_.locale)?_.locale:e.locale;h&&function(e){i(e.list)?e.list=e.list.map((e=>p(e)?a(e):e)):d(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=a(e.named[t]))}))}(_);let[g,L,b]=k?[l,N,u[N]||{}]:function(e,t,n,r,o,c){const{messages:s,messageResolver:a}=e,u=Ne(e,r,n);let l,i={},m=null;const d="translate";for(let n=0;n<u.length&&(l=u[n],i=s[l]||{},null===(m=a(i,t))&&(m=i[t]),!p(m)&&!f(m));n++){const n=Ee(e,t,l,0,d);n!==t&&(m=n)}return[m,l,i]}(e,l,N,s),y=l;if(k||p(g)||we(g)||E&&(g=T,y=g),!(k||(p(g)||we(g))&&p(L)))return c?-1:l;let A=!1;const O=we(g)?g:De(e,l,L,g,y,(()=>{A=!0}));if(A)return g;const C=function(e,t,n){return t(n)}(0,O,w(function(e,t,r,o){const{modifiers:c,pluralRules:s,messageResolver:a}=e,u={locale:t,modifiers:c,pluralRules:s,messages:n=>{const o=a(r,n);if(p(o)){let r=!1;const c=De(e,n,t,o,n,(()=>{r=!0}));return r?ve:c}return we(o)?o:ve}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);n(o.plural)&&(u.pluralIndex=o.plural);return u}(e,L,b,_)));return o?o(C):C}function De(e,n,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:u}=e;if(we(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const l=a(o,function(e,n,r,o,c,s){return{warnHtmlMessage:c,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,c,0,u,s));return l.locale=r,l.key=n,l.source=o,l}function Re(...e){const[t,r,c]=e,a={};if(!p(t)&&!n(t)&&!we(t))throw Error(xe.INVALID_ARGUMENT);const u=n(t)?String(t):(we(t),t);return n(r)?a.plural=r:p(r)?a.default=r:k(r)&&!o(r)?a.named=r:i(r)&&(a.list=r),n(c)?a.plural=c:p(c)?a.default=c:k(c)&&s(a,c),[u,a]}function Se(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:c}=e,{__datetimeFormatters:a}=e,[u,l,i,f]=Me(...t);m(i.missingWarn);m(i.fallbackWarn);const d=!!i.part,_=p(i.locale)?i.locale:e.locale,h=Ne(e,c,_);if(!p(u)||""===u)return new Intl.DateTimeFormat(_).format(l);let T,E={},N=null;for(let t=0;t<h.length&&(T=h[t],E=n[T]||{},N=E[u],!k(N));t++)Ee(e,u,T,0,"datetime format");if(!k(N)||!p(T))return r?-1:u;let g=`${T}__${u}`;o(f)||(g=`${g}__${JSON.stringify(f)}`);let L=a.get(g);return L||(L=new Intl.DateTimeFormat(T,s({},N,f)),a.set(g,L)),d?L.formatToParts(l):L.format(l)}function Me(...e){const[t,r,o,c]=e;let s,a={},u={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(xe.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(xe.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(xe.INVALID_DATE_ARGUMENT);s=t}else{if(!n(t))throw Error(xe.INVALID_ARGUMENT);s=t}return p(r)?a.key=r:k(r)&&(a=r),p(o)?a.locale=o:k(o)&&(u=o),k(c)&&(u=c),[a.key||"",s,a,u]}function $e(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ue(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:c}=e,{__numberFormatters:a}=e,[u,l,i,f]=We(...t);m(i.missingWarn);m(i.fallbackWarn);const d=!!i.part,_=p(i.locale)?i.locale:e.locale,h=Ne(e,c,_);if(!p(u)||""===u)return new Intl.NumberFormat(_).format(l);let T,E={},N=null;for(let t=0;t<h.length&&(T=h[t],E=n[T]||{},N=E[u],!k(N));t++)Ee(e,u,T,0,"number format");if(!k(N)||!p(T))return r?-1:u;let g=`${T}__${u}`;o(f)||(g=`${g}__${JSON.stringify(f)}`);let L=a.get(g);return L||(L=new Intl.NumberFormat(T,s({},N,f)),a.set(g,L)),d?L.formatToParts(l):L.format(l)}function We(...e){const[t,r,o,c]=e;let s={},a={};if(!n(t))throw Error(xe.INVALID_ARGUMENT);const u=t;return p(r)?s.key=r:k(r)&&(s=r),p(o)?s.locale=o:k(o)&&(a=o),k(c)&&(a=c),[s.key||"",u,s,a]}function Ke(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}fe(Ie);export{F as CompileErrorCodes,xe as CoreErrorCodes,oe as CoreWarnCodes,I as DEFAULT_MESSAGE_DATA_TYPE,le as MISSING_RESOLVE_VALUE,ue as NOT_REOSLVED,ae as VERSION,Ce as clearCompileCache,$e as clearDateTimeFormat,Ke as clearNumberFormat,Ie as compileToFunction,D as createCompileError,he as createCoreContext,Pe as createCoreError,w as createMessageContext,Se as datetime,de as getAdditionalMeta,ee as getDevToolsHook,Ne as getLocaleChain,se as getWarnMessage,A as handleFlatJson,Ee as handleMissing,te as initI18nDevTools,we as isMessageFunction,ke as isTranslateFallbackWarn,Te as isTranslateMissingWarn,Ue as number,L as parse,Me as parseDateTimeArgs,We as parseNumberArgs,Re as parseTranslateArgs,fe as registerMessageCompiler,y as resolveValue,me as setAdditionalMeta,Z as setDevToolsHook,Fe as translate,ne as translateDevTools,ye as updateFallbackLocale};
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===h(e),o=e=>k(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function a(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Object.prototype.hasOwnProperty;function l(e,t){return u.call(e,t)}const i=Array.isArray,f=e=>"function"==typeof e,p=e=>"string"==typeof e,m=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,h=e=>_.call(e),k=e=>"[object Object]"===h(e),T=[];T[0]={w:[0],i:[3,0],"[":[4],o:[7]},T[1]={w:[1],".":[2],"[":[4],o:[7]},T[2]={w:[2],i:[3,0],0:[3,0]},T[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},T[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},T[5]={"'":[4,0],o:8,l:[5,0]},T[6]={'"':[4,0],o:8,l:[6,0]};const E=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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 g(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(E.test(t)?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)}function L(e){const t=[];let n,r,o,c,s,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=g(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(c=N(n),u=T[i],s=u[c]||u.l||8,8===s)return;if(i=s[0],void 0!==s[1]&&(a=p[s[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const b=new Map;function y(e,t){if(!d(e))return null;let n=b.get(t);if(n||(n=L(t),n&&b.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;o=e,c++}return o}function A(e){if(!d(e))return e;for(const t in e)if(l(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],d(o[n[r]])&&A(o[n[r]])}else d(e[t])&&A(e[t]);return e}const O=e=>e,C=e=>"",I="text",x=e=>0===e.length?"":e.join(""),P=e=>null==e?"":i(e)||k(e)&&e.toString===_?JSON.stringify(e,null,2):String(e);function v(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function w(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?e.pluralRules[t]:v,c=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?v:void 0,s=e.list||[],a=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,a);function u(t){const n=f(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):C)}const l=k(e.processor)&&f(e.processor.normalize)?e.processor.normalize:x,i=k(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:P,m={list:e=>s[e],named:e=>a[e],plural:e=>e[o(r,e.length,c)],linked:(t,n)=>{const r=u(t)(m);return p(n)?(o=n,e.modifiers?e.modifiers[o]:O)(r):r;var o},message:u,type:k(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:i,normalize:l};return m}const F={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,__EXTEND_POINT__:15};function D(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function R(e){throw e}function S(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const M=String.fromCharCode(8232),$=String.fromCharCode(8233);function U(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],a=e=>t[e]===$,u=e=>t[e]===M,l=e=>s(e)||(e=>"\n"===t[e])(e)||a(e)||u(e),i=e=>s(e)||a(e)||u(e)?"\n":t[e];function f(){return c=0,l(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(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 W=void 0;function K(e,t={}){const n=!1!==t.location,r=U(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(),u={currentType:14,offset:a,startLoc:s,endLoc:s,lastType:14,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=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 p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(c(),"")}function d(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function h(e){if(e===W)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function k(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===W)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(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||"\n"===r):" "===c?(e.peek(),n(!0," ",o)):"\n"!==c||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function N(e,t){const n=e.currentChar();return n===W?W:t(n)?(e.next(),n):null}function g(e){return N(e,(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 N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function y(e){let t="",n="";for(;t=L(e);)n+=t;return n}function A(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return O(e,t,4);case"U":return O(e,t,6);default:return c(),""}}function O(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function C(e){_(e);const t=m(e,"|");return _(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&c(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&c(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&c(),n=x(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&c(),n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(),t.braceNest=0,P(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=g(e);)n+=t;return e.currentChar()===W&&c(),n}(e)),_(e),n;if(o=k(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${y(e)}`):t+=y(e),e.currentChar()===W&&c(),t}(e)),_(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=N(e,r);)n+="\\"===t?A(e):t;const o=e.currentChar();return"\n"===o||o===W?(c(),"\n"===o&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=N(e,r);)n+=t;return n}(e)),c(),_(e),n}return n}function x(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||c(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),x(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=g(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?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?I(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&c(),t.braceNest=0,t.inLinked=!1,P(e,t))}}function P(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||p(t);if(t.inLinked)return x(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return I(e,t)||p(t);case"}":return c(),e.next(),f(t,3,"}");case"@":return x(e,t)||p(t);default:if(T(e))return n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=s,u.offset=o(),u.startLoc=c(),r.currentChar()===W?f(u,14):P(r,u)},currentOffset:o,currentPosition:c,context:l}}const j=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B(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}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(5,c,s);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(4,c,s);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(9,c,s);return a.value=t.replace(j,B),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(8,c,s);return 12!==t.type?(a.value="",o(a,c,s),{nextConsumeToken:t,node:a}):(null==t.value&&V(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&V(c),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&V(c),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&V(c),n.key=u(e,c.value||"");break;case 6:null==c.value&&V(c),n.key=a(e,c.value||"");break;case 7:null==c.value&&V(c),n.key=l(e,c.value||"");break;default:const t=e.context(),s=r(7,t.offset,t.startLoc);return s.value="",o(s,t.offset,t.startLoc),n.key=s,o(n,t.offset,t.startLoc),{nextConsumeToken:c,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let s=null;do{const t=s||e.nextToken();switch(s=null,t.type){case 0:null==t.value&&V(t),n.items.push(c(e,t.value||""));break;case 6:null==t.value&&V(t),n.items.push(a(e,t.value||""));break;case 5:null==t.value&&V(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&V(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),s=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:c}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,c){const s=e.context();let a=0===c.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==s.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,c,s)}return{parse:function(n){const c=K(n,s({},e)),a=c.context(),u=r(0,a.offset,a.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(c),o(u,c.currentOffset(),c.currentPosition()),u}}}function V(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++)H(e[n],t)}function H(e,t){switch(e.type){case 1:X(e.cases,t),t.helper("plural");break;case 2:X(e.items,t);break;case 6:H(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function J(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&&H(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}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 n=0;n<o&&(z(e,t.items[n]),n!==o-1);n++)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(")")}(e,t);break;case 8:case 7: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);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function Y(e,t={}){const n=s({},t),r=G(n).parse(e);return J(r,n),((e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,c={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){c.code+=e}function a(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>c,push:s,indent:function(e=!0){const t=++c.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&a(t)},newline:function(){a(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),c.length>0&&(s.push(`const { ${c.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),z(s,e),s.deindent(o),s.push("}");const{code:a,map:u}=s.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const Q="i18n:init";let q=null;function Z(e){q=e}function ee(){return q}function te(e,t,n){q&&q.emit(Q,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ne=re("function:translate");function re(e){return t=>q&&q.emit(e,t)}const oe={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},ce={[oe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[oe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[oe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[oe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function se(t,...n){return function(t,...n){return 1===n.length&&d(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(ce[t],...n)}const ae="9.2.0-alpha.5",ue=-1,le="";let ie;function fe(e){ie=e}let pe=null;const me=e=>{pe=e},de=()=>pe;let _e=0;function he(e={}){const t=p(e.version)?e.version:"9.2.0-alpha.5",n=p(e.locale)?e.locale:"en-US",o=i(e.fallbackLocale)||k(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=k(e.messages)?e.messages:{[n]:{}},u=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=k(e.numberFormats)?e.numberFormats:{[n]:{}},_=s({},e.modifiers||{},{upper:e=>p(e)?e.toUpperCase():e,lower:e=>p(e)?e.toLowerCase():e,capitalize:e=>p(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},T=f(e.missing)?e.missing:null,E=!m(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,N=!m(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,L=!!e.unresolving,b=f(e.postTranslation)?e.postTranslation:null,A=k(e.processor)?e.processor:null,O=!m(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,I=f(e.messageCompiler)?e.messageCompiler:ie,x=f(e.messageResolver)?e.messageResolver:y,P=f(e.onWarn)?e.onWarn:c,v=e,w=d(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,F=d(v.__numberFormatters)?v.__numberFormatters:new Map,D=d(v.__meta)?v.__meta:{};_e++;return{version:t,cid:_e,locale:n,fallbackLocale:o,messages:a,datetimeFormats:u,numberFormats:l,modifiers:_,pluralRules:h,missing:T,missingWarn:E,fallbackWarn:N,fallbackFormat:g,unresolving:L,postTranslation:b,processor:A,warnHtmlMessage:O,escapeParameter:C,messageCompiler:I,messageResolver:x,onWarn:P,__datetimeFormatters:w,__numberFormatters:F,__meta:D}}function ke(e,t){return e instanceof RegExp?e.test(t):e}function Te(e,t){return e instanceof RegExp?e.test(t):e}function Ee(e,t,n,r,o){const{missing:c}=e;if(null!==c){const r=c(e,n,t,o);return p(r)?r:t}return t}function Ne(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;i(e);)e=ge(o,e,t);const c=i(t)||!k(t)?t:t.default?t.default:null;e=p(c)?[c]:c,i(e)&&ge(o,e,!1),r.__localeChainCache.set(n,o)}return o}function ge(e,t,n){let r=!0;for(let o=0;o<t.length&&m(r);o++){p(t[o])&&(r=Le(e,t[o],n))}return r}function Le(e,t,n){let r;const o=t.split("-");do{r=be(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function be(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),(i(n)||k(n))&&n[o]&&(r=n[o])}return r}function ye(e,t,n){e.__localeChainCache=new Map,Ne(e,n,t)}const Ae=e=>e;let Oe=Object.create(null);function Ce(){Oe=Object.create(null)}function Ie(e,t={}){{const n=(t.onCacheKey||Ae)(e),r=Oe[n];if(r)return r;let o=!1;const c=t.onError||R;t.onError=e=>{o=!0,c(e)};const{code:s}=Y(e,t),a=new Function(`return ${s}`)();return o?a:Oe[n]=a}}const xe={INVALID_ARGUMENT:F.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:F.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:F.__EXTEND_POINT__+2,__EXTEND_POINT__:F.__EXTEND_POINT__+3};function Pe(e){return D(e,null,void 0)}const ve=()=>"",we=e=>f(e);function Fe(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:c,fallbackLocale:s,messages:u}=e,[l,_]=Re(...t),h=(m(_.missingWarn),m(_.fallbackWarn),m(_.escapeParameter)?_.escapeParameter:e.escapeParameter),k=!!_.resolvedMessage,T=p(_.default)||m(_.default)?m(_.default)?l:_.default:r?l:"",E=r||""!==T,N=p(_.locale)?_.locale:e.locale;h&&function(e){i(e.list)?e.list=e.list.map((e=>p(e)?a(e):e)):d(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=a(e.named[t]))}))}(_);let[g,L,b]=k?[l,N,u[N]||{}]:function(e,t,n,r,o,c){const{messages:s,messageResolver:a}=e,u=Ne(e,r,n);let l,i={},m=null;const d="translate";for(let n=0;n<u.length&&(l=u[n],i=s[l]||{},null===(m=a(i,t))&&(m=i[t]),!p(m)&&!f(m));n++){const n=Ee(e,t,l,0,d);n!==t&&(m=n)}return[m,l,i]}(e,l,N,s),y=l;if(k||p(g)||we(g)||E&&(g=T,y=g),!(k||(p(g)||we(g))&&p(L)))return c?-1:l;let A=!1;const O=we(g)?g:De(e,l,L,g,y,(()=>{A=!0}));if(A)return g;const C=function(e,t,n){return t(n)}(0,O,w(function(e,t,r,o){const{modifiers:c,pluralRules:s,messageResolver:a}=e,u={locale:t,modifiers:c,pluralRules:s,messages:n=>{const o=a(r,n);if(p(o)){let r=!1;const c=De(e,n,t,o,n,(()=>{r=!0}));return r?ve:c}return we(o)?o:ve}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);n(o.plural)&&(u.pluralIndex=o.plural);return u}(e,L,b,_)));return o?o(C):C}function De(e,n,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:u}=e;if(we(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const l=a(o,function(e,n,r,o,c,s){return{warnHtmlMessage:c,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,c,0,u,s));return l.locale=r,l.key=n,l.source=o,l}function Re(...e){const[t,r,c]=e,a={};if(!p(t)&&!n(t)&&!we(t))throw Error(xe.INVALID_ARGUMENT);const u=n(t)?String(t):(we(t),t);return n(r)?a.plural=r:p(r)?a.default=r:k(r)&&!o(r)?a.named=r:i(r)&&(a.list=r),n(c)?a.plural=c:p(c)?a.default=c:k(c)&&s(a,c),[u,a]}function Se(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:c}=e,{__datetimeFormatters:a}=e,[u,l,i,f]=Me(...t);m(i.missingWarn);m(i.fallbackWarn);const d=!!i.part,_=p(i.locale)?i.locale:e.locale,h=Ne(e,c,_);if(!p(u)||""===u)return new Intl.DateTimeFormat(_).format(l);let T,E={},N=null;for(let t=0;t<h.length&&(T=h[t],E=n[T]||{},N=E[u],!k(N));t++)Ee(e,u,T,0,"datetime format");if(!k(N)||!p(T))return r?-1:u;let g=`${T}__${u}`;o(f)||(g=`${g}__${JSON.stringify(f)}`);let L=a.get(g);return L||(L=new Intl.DateTimeFormat(T,s({},N,f)),a.set(g,L)),d?L.formatToParts(l):L.format(l)}function Me(...e){const[t,r,o,c]=e;let s,a={},u={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(xe.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(xe.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(xe.INVALID_DATE_ARGUMENT);s=t}else{if(!n(t))throw Error(xe.INVALID_ARGUMENT);s=t}return p(r)?a.key=r:k(r)&&(a=r),p(o)?a.locale=o:k(o)&&(u=o),k(c)&&(u=c),[a.key||"",s,a,u]}function $e(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ue(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:c}=e,{__numberFormatters:a}=e,[u,l,i,f]=We(...t);m(i.missingWarn);m(i.fallbackWarn);const d=!!i.part,_=p(i.locale)?i.locale:e.locale,h=Ne(e,c,_);if(!p(u)||""===u)return new Intl.NumberFormat(_).format(l);let T,E={},N=null;for(let t=0;t<h.length&&(T=h[t],E=n[T]||{},N=E[u],!k(N));t++)Ee(e,u,T,0,"number format");if(!k(N)||!p(T))return r?-1:u;let g=`${T}__${u}`;o(f)||(g=`${g}__${JSON.stringify(f)}`);let L=a.get(g);return L||(L=new Intl.NumberFormat(T,s({},N,f)),a.set(g,L)),d?L.formatToParts(l):L.format(l)}function We(...e){const[t,r,o,c]=e;let s={},a={};if(!n(t))throw Error(xe.INVALID_ARGUMENT);const u=t;return p(r)?s.key=r:k(r)&&(s=r),p(o)?s.locale=o:k(o)&&(a=o),k(c)&&(a=c),[s.key||"",u,s,a]}function Ke(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}fe(Ie);export{F as CompileErrorCodes,xe as CoreErrorCodes,oe as CoreWarnCodes,I as DEFAULT_MESSAGE_DATA_TYPE,le as MISSING_RESOLVE_VALUE,ue as NOT_REOSLVED,ae as VERSION,Ce as clearCompileCache,$e as clearDateTimeFormat,Ke as clearNumberFormat,Ie as compileToFunction,D as createCompileError,he as createCoreContext,Pe as createCoreError,w as createMessageContext,Se as datetime,de as getAdditionalMeta,ee as getDevToolsHook,Ne as getLocaleChain,se as getWarnMessage,A as handleFlatJson,Ee as handleMissing,te as initI18nDevTools,we as isMessageFunction,ke as isTranslateFallbackWarn,Te as isTranslateMissingWarn,Ue as number,L as parse,Me as parseDateTimeArgs,We as parseNumberArgs,Re as parseTranslateArgs,fe as registerMessageCompiler,y as resolveValue,me as setAdditionalMeta,Z as setDevToolsHook,Fe as translate,ne as translateDevTools,ye as updateFallbackLocale};
/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===k(e),s=e=>T(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const a=Object.assign;function u(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const l=Object.prototype.hasOwnProperty;function i(e,t){return l.call(e,t)}const f=Array.isArray,p=e=>"function"==typeof e,m=e=>"string"==typeof e,d=e=>"boolean"==typeof e,_=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,k=e=>h.call(e),T=e=>"[object Object]"===k(e),E=[];E[0]={w:[0],i:[3,0],"[":[4],o:[7]},E[1]={w:[1],".":[2],"[":[4],o:[7]},E[2]={w:[2],i:[3,0],0:[3,0]},E[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},E[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},E[5]={"'":[4,0],o:8,l:[5,0]},E[6]={'"':[4,0],o:8,l:[6,0]};const g=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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 L(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(g.test(t)?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)}function b(e){const t=[];let n,r,o,s,c,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=L(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(s=N(n),u=E[i],c=u[s]||u.l||8,8===c)return;if(i=c[0],void 0!==c[1]&&(a=p[c[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const A=new Map;function C(e,t){if(!_(e))return null;let n=A.get(t);if(n||(n=b(t),n&&A.set(t,n)),!n)return null;const r=n.length;let o=e,s=0;for(;s<r;){const e=o[n[s]];if(void 0===e)return null;o=e,s++}return o}const y=e=>e,O=e=>"",I="text",P=e=>0===e.length?"":e.join(""),x=e=>null==e?"":f(e)||T(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function v(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function F(e={}){const t=e.locale,n=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),o=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?e.pluralRules[t]:v,s=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?v:void 0,c=e.list||[],a=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function u(t){const n=p(e.messages)?e.messages(t):!!_(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):O)}const l=T(e.processor)&&p(e.processor.normalize)?e.processor.normalize:P,i=T(e.processor)&&p(e.processor.interpolate)?e.processor.interpolate:x,f={list:e=>c[e],named:e=>a[e],plural:e=>e[o(n,e.length,s)],linked:(t,n)=>{const r=u(t)(f);return m(n)?(o=n,e.modifiers?e.modifiers[o]:y)(r):r;var o},message:u,type:T(e.processor)&&m(e.processor.type)?e.processor.type:I,interpolate:i,normalize:l};return f}const D={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,__EXTEND_POINT__:15};function w(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function M(e){throw e}function R(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const S=" ",$="\n",U=String.fromCharCode(8232),W=String.fromCharCode(8233);function V(e){const t=e;let n=0,r=1,o=1,s=0;const c=e=>"\r"===t[e]&&t[e+1]===$,a=e=>t[e]===W,u=e=>t[e]===U,l=e=>c(e)||(e=>t[e]===$)(e)||a(e)||u(e),i=e=>c(e)||a(e)||u(e)?$:t[e];function f(){return s=0,l(n)&&(r++,o=0),c(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>s,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+s),next:f,peek:function(){return c(n+s)&&s++,s++,t[n+s]},reset:function(){n=0,r=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=n+s;for(;e!==n;)f();s=0}}}const K=void 0;function j(e,t={}){const n=!1!==t.location,r=V(e),o=()=>r.index(),s=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},c=s(),a=o(),u={currentType:14,offset:a,startLoc:c,endLoc:c,lastType:14,lastOffset:a,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=t;function f(e,t,r){e.endLoc=s(),e.currentType=t;const o={type:t};return n&&(o.loc=R(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(s(),"")}function d(e){let t="";for(;e.currentPeek()===S||e.currentPeek()===$;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function h(e){if(e===K)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function k(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===K)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(e,t=!0){const n=(t=!1,r="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==r&&t:"@"!==s&&s?"%"===s?(e.peek(),n(t,"%",!0)):"|"===s?!("%"!==r&&!o)||!(r===S||r===$):s===S?(e.peek(),n(!0,S,o)):s!==$||(e.peek(),n(!0,$,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function g(e,t){const n=e.currentChar();return n===K?K:t(n)?(e.next(),n):null}function N(e){return g(e,(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,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return g(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function A(e){let t="",n="";for(;t=L(e);)n+=t;return n}function C(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return y(e,t,4);case"U":return y(e,t,6);default:return s(),""}}function y(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){s(),e.currentChar();break}r+=t}return`\\${t}${r}`}function O(e){_(e);const t=m(e,"|");return _(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&s(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&s(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&s(),n=P(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,c=!0;if(T(e))return t.braceNest>0&&s(),n=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return s(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=N(e);)n+=t;return e.currentChar()===K&&s(),n}(e)),_(e),n;if(o=k(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${A(e)}`):t+=A(e),e.currentChar()===K&&s(),t}(e)),_(e),n;if(c=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==$;for(;t=g(e,r);)n+="\\"===t?C(e):t;const o=e.currentChar();return o===$||o===K?(s(),o===$&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!c)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==S&&e!==$;for(;t=g(e,r);)n+=t;return n}(e)),s(),_(e),n}return n}function P(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==$&&o!==S||s(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),P(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=N(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?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===S||!t)&&(t===$?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?I(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===S?r:o===$?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&s(),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||p(t);if(t.inLinked)return P(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return I(e,t)||p(t);case"}":return s(),e.next(),f(t,3,"}");case"@":return P(e,t)||p(t);default:if(T(e))return n=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===S||r===$?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:c}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=c,u.offset=o(),u.startLoc=s(),r.currentChar()===K?f(u,14):x(r,u)},currentOffset:o,currentPosition:s,context:l}}const G=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B(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 H(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),s=r(3,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(5,s,c);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(4,s,c);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(9,s,c);return a.value=t.replace(G,B),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let s=e.nextToken();if(9===s.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(8,s,c);return 12!==t.type?(a.value="",o(a,s,c),{nextConsumeToken:t,node:a}):(null==t.value&&X(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,s=t.nextConsumeToken||e.nextToken()}switch(10!==s.type&&X(s),s=e.nextToken(),2===s.type&&(s=e.nextToken()),s.type){case 11:null==s.value&&X(s),n.key=function(e,t){const n=e.context(),s=r(7,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}(e,s.value||"");break;case 5:null==s.value&&X(s),n.key=u(e,s.value||"");break;case 6:null==s.value&&X(s),n.key=c(e,s.value||"");break;case 7:null==s.value&&X(s),n.key=l(e,s.value||"");break;default:const t=e.context(),a=r(7,t.offset,t.startLoc);return a.value="",o(a,t.offset,t.startLoc),n.key=a,o(n,t.offset,t.startLoc),{nextConsumeToken:s,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let a=null;do{const t=a||e.nextToken();switch(a=null,t.type){case 0:null==t.value&&X(t),n.items.push(s(e,t.value||""));break;case 6:null==t.value&&X(t),n.items.push(c(e,t.value||""));break;case 5:null==t.value&&X(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&X(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),a=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:s}=t,c=f(e);return 14===t.currentType?c:function(e,t,n,s){const c=e.context();let a=0===s.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(s);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==c.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,s,c)}return{parse:function(n){const s=j(n,a({},e)),c=s.context(),u=r(0,c.offset,c.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(s),o(u,s.currentOffset(),s.currentPosition()),u}}}function X(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 J(e,t){for(let n=0;n<e.length;n++)Y(e[n],t)}function Y(e,t){switch(e.type){case 1:J(e.cases,t),t.helper("plural");break;case 2:J(e.items,t);break;case 6:Y(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function z(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 Q(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?Q(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&&(Q(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 n=0;n<o&&(Q(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Q(e,t.key),t.modifier&&(e.push(", "),Q(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7: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);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function q(e,t={}){const n=a({},t),r=H(n).parse(e);return z(r,n),((e,t={})=>{const n=m(t.mode)?t.mode:"normal",r=m(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,s={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function a(e,t=!0){const n=t?r:"";c(o?n+" ".repeat(e):n)}return{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),Q(c,e),c.deindent(o),c.push("}");const{code:a,map:u}=c.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const Z="i18n:init";let ee=null;const te=ne("function:translate");function ne(e){return t=>ee&&ee.emit(e,t)}const re={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},oe={[re.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[re.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[re.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[re.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[re.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[re.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};const se="9.2.0-alpha.4";let ce;function ae(e){ce=e}let ue=null;let le=0;function ie(e,t,n,r,o){const{missing:s}=e;if(null!==s){const r=s(e,n,t,o);return m(r)?r:t}return t}function fe(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;f(e);)e=pe(o,e,t);const s=f(t)||!T(t)?t:t.default?t.default:null;e=m(s)?[s]:s,f(e)&&pe(o,e,!1),r.__localeChainCache.set(n,o)}return o}function pe(e,t,n){let r=!0;for(let o=0;o<t.length&&d(r);o++){m(t[o])&&(r=me(e,t[o],n))}return r}function me(e,t,n){let r;const o=t.split("-");do{r=de(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function de(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),(f(n)||T(n))&&n[o]&&(r=n[o])}return r}const _e=e=>e;let he=Object.create(null);function ke(e,t={}){{const n=(t.onCacheKey||_e)(e),r=he[n];if(r)return r;let o=!1;const s=t.onError||M;t.onError=e=>{o=!0,s(e)};const{code:c}=q(e,t),a=new Function(`return ${c}`)();return o?a:he[n]=a}}const Te={INVALID_ARGUMENT:D.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:D.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:D.__EXTEND_POINT__+2,__EXTEND_POINT__:D.__EXTEND_POINT__+3};const Ee=()=>"",ge=e=>p(e);function Ne(e,t,r,o,s,c){const{messageCompiler:a,warnHtmlMessage:u}=e;if(ge(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}const l=a(o,function(e,t,r,o,s,c){return{warnHtmlMessage:s,onError:e=>{throw c&&c(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,s,0,u,c));return l.locale=r,l.key=t,l.source=o,l}function Le(...e){const[t,n,o]=e,c={};if(!m(t)&&!r(t)&&!ge(t))throw Error(Te.INVALID_ARGUMENT);const u=r(t)?String(t):(ge(t),t);return r(n)?c.plural=n:m(n)?c.default=n:T(n)&&!s(n)?c.named=n:f(n)&&(c.list=n),r(o)?c.plural=o:m(o)?c.default=o:T(o)&&a(c,o),[u,c]}function be(...e){const[t,n,o,s]=e;let c,a={},u={};if(m(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();c=new Date(n);try{c.toISOString()}catch(e){throw Error(Te.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===k(t)){if(isNaN(t.getTime()))throw Error(Te.INVALID_DATE_ARGUMENT);c=t}else{if(!r(t))throw Error(Te.INVALID_ARGUMENT);c=t}return m(n)?a.key=n:T(n)&&(a=n),m(o)?a.locale=o:T(o)&&(u=o),T(s)&&(u=s),[a.key||"",c,a,u]}function Ae(...e){const[t,n,o,s]=e;let c={},a={};if(!r(t))throw Error(Te.INVALID_ARGUMENT);const u=t;return m(n)?c.key=n:T(n)&&(c=n),m(o)?c.locale=o:T(o)&&(a=o),T(s)&&(a=s),[c.key||"",u,c,a]}return ae(ke),e.CompileErrorCodes=D,e.CoreErrorCodes=Te,e.CoreWarnCodes=re,e.DEFAULT_MESSAGE_DATA_TYPE=I,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=se,e.clearCompileCache=function(){he=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=ke,e.createCompileError=w,e.createCoreContext=function(e={}){const t=m(e.version)?e.version:se,n=m(e.locale)?e.locale:"en-US",r=f(e.fallbackLocale)||T(e.fallbackLocale)||m(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=T(e.messages)?e.messages:{[n]:{}},u=T(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=T(e.numberFormats)?e.numberFormats:{[n]:{}},i=a({},e.modifiers||{},{upper:e=>m(e)?e.toUpperCase():e,lower:e=>m(e)?e.toLowerCase():e,capitalize:e=>m(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},k=p(e.missing)?e.missing:null,E=!d(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,g=!d(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,N=!!e.fallbackFormat,L=!!e.unresolving,b=p(e.postTranslation)?e.postTranslation:null,A=T(e.processor)?e.processor:null,y=!d(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter,I=p(e.messageCompiler)?e.messageCompiler:ce,P=p(e.messageResolver)?e.messageResolver:C,x=p(e.onWarn)?e.onWarn:c,v=e,F=_(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,D=_(v.__numberFormatters)?v.__numberFormatters:new Map,w=_(v.__meta)?v.__meta:{};return le++,{version:t,cid:le,locale:n,fallbackLocale:r,messages:s,datetimeFormats:u,numberFormats:l,modifiers:i,pluralRules:h,missing:k,missingWarn:E,fallbackWarn:g,fallbackFormat:N,unresolving:L,postTranslation:b,processor:A,warnHtmlMessage:y,escapeParameter:O,messageCompiler:I,messageResolver:P,onWarn:x,__datetimeFormatters:F,__numberFormatters:D,__meta:w}},e.createCoreError=function(e){return w(e,null,void 0)},e.createMessageContext=F,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o}=e,{__datetimeFormatters:c}=e,[u,l,i,f]=be(...t);d(i.missingWarn),d(i.fallbackWarn);const p=!!i.part,_=m(i.locale)?i.locale:e.locale,h=fe(e,o,_);if(!m(u)||""===u)return new Intl.DateTimeFormat(_).format(l);let k,E={},g=null;for(let t=0;t<h.length&&(k=h[t],E=n[k]||{},g=E[u],!T(g));t++)ie(e,u,k,0,"datetime format");if(!T(g)||!m(k))return r?-1:u;let N=`${k}__${u}`;s(f)||(N=`${N}__${JSON.stringify(f)}`);let L=c.get(N);return L||(L=new Intl.DateTimeFormat(k,a({},g,f)),c.set(N,L)),p?L.formatToParts(l):L.format(l)},e.getAdditionalMeta=()=>ue,e.getDevToolsHook=function(){return ee},e.getLocaleChain=fe,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&_(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(oe[e],...n)},e.handleFlatJson=function e(t){if(!_(t))return t;for(const n in t)if(i(t,n))if(n.includes(".")){const r=n.split("."),o=r.length-1;let s=t;for(let e=0;e<o;e++)r[e]in s||(s[r[e]]={}),s=s[r[e]];s[r[o]]=t[n],delete t[n],_(s[r[o]])&&e(s[r[o]])}else _(t[n])&&e(t[n]);return t},e.handleMissing=ie,e.initI18nDevTools=function(e,t,n){ee&&ee.emit(Z,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=ge,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}=e,{__numberFormatters:c}=e,[u,l,i,f]=Ae(...t);d(i.missingWarn),d(i.fallbackWarn);const p=!!i.part,_=m(i.locale)?i.locale:e.locale,h=fe(e,o,_);if(!m(u)||""===u)return new Intl.NumberFormat(_).format(l);let k,E={},g=null;for(let t=0;t<h.length&&(k=h[t],E=n[k]||{},g=E[u],!T(g));t++)ie(e,u,k,0,"number format");if(!T(g)||!m(k))return r?-1:u;let N=`${k}__${u}`;s(f)||(N=`${N}__${JSON.stringify(f)}`);let L=c.get(N);return L||(L=new Intl.NumberFormat(k,a({},g,f)),c.set(N,L)),p?L.formatToParts(l):L.format(l)},e.parse=b,e.parseDateTimeArgs=be,e.parseNumberArgs=Ae,e.parseTranslateArgs=Le,e.registerMessageCompiler=ae,e.resolveValue=C,e.setAdditionalMeta=e=>{ue=e},e.setDevToolsHook=function(e){ee=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,fallbackLocale:c,messages:a}=e,[l,i]=Le(...t),h=(d(i.missingWarn),d(i.fallbackWarn),d(i.escapeParameter)?i.escapeParameter:e.escapeParameter),k=!!i.resolvedMessage,T=m(i.default)||d(i.default)?d(i.default)?l:i.default:n?l:"",E=n||""!==T,g=m(i.locale)?i.locale:e.locale;h&&function(e){f(e.list)?e.list=e.list.map((e=>m(e)?u(e):e)):_(e.named)&&Object.keys(e.named).forEach((t=>{m(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(i);let[N,L,b]=k?[l,g,a[g]||{}]:function(e,t,n,r,o,s){const{messages:c,messageResolver:a}=e,u=fe(e,r,n);let l,i={},f=null;const d="translate";for(let n=0;n<u.length&&(l=u[n],i=c[l]||{},null===(f=a(i,t))&&(f=i[t]),!m(f)&&!p(f));n++){const n=ie(e,t,l,0,d);n!==t&&(f=n)}return[f,l,i]}(e,l,g,c),A=l;if(k||m(N)||ge(N)||E&&(N=T,A=N),!(k||(m(N)||ge(N))&&m(L)))return s?-1:l;let C=!1;const y=ge(N)?N:Ne(e,l,L,N,A,(()=>{C=!0}));if(C)return N;const O=function(e,t,n){return t(n)}(0,y,F(function(e,t,n,o){const{modifiers:s,pluralRules:c,messageResolver:a}=e,u={locale:t,modifiers:s,pluralRules:c,messages:r=>{const o=a(n,r);if(m(o)){let n=!1;const s=Ne(e,r,t,o,r,(()=>{n=!0}));return n?Ee:s}return ge(o)?o:Ee}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);r(o.plural)&&(u.pluralIndex=o.plural);return u}(e,L,b,i)));return o?o(O):O},e.translateDevTools=te,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,fe(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===k(e),s=e=>T(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const a=Object.assign;function u(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const l=Object.prototype.hasOwnProperty;function i(e,t){return l.call(e,t)}const f=Array.isArray,p=e=>"function"==typeof e,m=e=>"string"==typeof e,d=e=>"boolean"==typeof e,_=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,k=e=>h.call(e),T=e=>"[object Object]"===k(e),E=[];E[0]={w:[0],i:[3,0],"[":[4],o:[7]},E[1]={w:[1],".":[2],"[":[4],o:[7]},E[2]={w:[2],i:[3,0],0:[3,0]},E[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},E[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},E[5]={"'":[4,0],o:8,l:[5,0]},E[6]={'"':[4,0],o:8,l:[6,0]};const g=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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 L(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(g.test(t)?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)}function b(e){const t=[];let n,r,o,s,c,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=L(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(s=N(n),u=E[i],c=u[s]||u.l||8,8===c)return;if(i=c[0],void 0!==c[1]&&(a=p[c[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const A=new Map;function C(e,t){if(!_(e))return null;let n=A.get(t);if(n||(n=b(t),n&&A.set(t,n)),!n)return null;const r=n.length;let o=e,s=0;for(;s<r;){const e=o[n[s]];if(void 0===e)return null;o=e,s++}return o}const y=e=>e,O=e=>"",I="text",P=e=>0===e.length?"":e.join(""),x=e=>null==e?"":f(e)||T(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function v(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function F(e={}){const t=e.locale,n=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),o=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?e.pluralRules[t]:v,s=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?v:void 0,c=e.list||[],a=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function u(t){const n=p(e.messages)?e.messages(t):!!_(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):O)}const l=T(e.processor)&&p(e.processor.normalize)?e.processor.normalize:P,i=T(e.processor)&&p(e.processor.interpolate)?e.processor.interpolate:x,f={list:e=>c[e],named:e=>a[e],plural:e=>e[o(n,e.length,s)],linked:(t,n)=>{const r=u(t)(f);return m(n)?(o=n,e.modifiers?e.modifiers[o]:y)(r):r;var o},message:u,type:T(e.processor)&&m(e.processor.type)?e.processor.type:I,interpolate:i,normalize:l};return f}const D={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,__EXTEND_POINT__:15};function w(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function M(e){throw e}function R(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const S=" ",$="\n",U=String.fromCharCode(8232),W=String.fromCharCode(8233);function V(e){const t=e;let n=0,r=1,o=1,s=0;const c=e=>"\r"===t[e]&&t[e+1]===$,a=e=>t[e]===W,u=e=>t[e]===U,l=e=>c(e)||(e=>t[e]===$)(e)||a(e)||u(e),i=e=>c(e)||a(e)||u(e)?$:t[e];function f(){return s=0,l(n)&&(r++,o=0),c(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>s,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+s),next:f,peek:function(){return c(n+s)&&s++,s++,t[n+s]},reset:function(){n=0,r=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=n+s;for(;e!==n;)f();s=0}}}const K=void 0;function j(e,t={}){const n=!1!==t.location,r=V(e),o=()=>r.index(),s=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},c=s(),a=o(),u={currentType:14,offset:a,startLoc:c,endLoc:c,lastType:14,lastOffset:a,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=t;function f(e,t,r){e.endLoc=s(),e.currentType=t;const o={type:t};return n&&(o.loc=R(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(s(),"")}function d(e){let t="";for(;e.currentPeek()===S||e.currentPeek()===$;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function h(e){if(e===K)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function k(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===K)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(e,t=!0){const n=(t=!1,r="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==r&&t:"@"!==s&&s?"%"===s?(e.peek(),n(t,"%",!0)):"|"===s?!("%"!==r&&!o)||!(r===S||r===$):s===S?(e.peek(),n(!0,S,o)):s!==$||(e.peek(),n(!0,$,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function g(e,t){const n=e.currentChar();return n===K?K:t(n)?(e.next(),n):null}function N(e){return g(e,(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,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return g(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function A(e){let t="",n="";for(;t=L(e);)n+=t;return n}function C(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return y(e,t,4);case"U":return y(e,t,6);default:return s(),""}}function y(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){s(),e.currentChar();break}r+=t}return`\\${t}${r}`}function O(e){_(e);const t=m(e,"|");return _(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&s(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&s(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&s(),n=P(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,c=!0;if(T(e))return t.braceNest>0&&s(),n=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return s(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=N(e);)n+=t;return e.currentChar()===K&&s(),n}(e)),_(e),n;if(o=k(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${A(e)}`):t+=A(e),e.currentChar()===K&&s(),t}(e)),_(e),n;if(c=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==$;for(;t=g(e,r);)n+="\\"===t?C(e):t;const o=e.currentChar();return o===$||o===K?(s(),o===$&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!c)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==S&&e!==$;for(;t=g(e,r);)n+=t;return n}(e)),s(),_(e),n}return n}function P(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==$&&o!==S||s(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),P(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=N(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?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===S||!t)&&(t===$?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?I(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===S?r:o===$?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&s(),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||p(t);if(t.inLinked)return P(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return I(e,t)||p(t);case"}":return s(),e.next(),f(t,3,"}");case"@":return P(e,t)||p(t);default:if(T(e))return n=f(t,1,O(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===S||r===$?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:c}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=c,u.offset=o(),u.startLoc=s(),r.currentChar()===K?f(u,14):x(r,u)},currentOffset:o,currentPosition:s,context:l}}const G=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B(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 H(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),s=r(3,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(5,s,c);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(4,s,c);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(9,s,c);return a.value=t.replace(G,B),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let s=e.nextToken();if(9===s.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(8,s,c);return 12!==t.type?(a.value="",o(a,s,c),{nextConsumeToken:t,node:a}):(null==t.value&&X(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,s=t.nextConsumeToken||e.nextToken()}switch(10!==s.type&&X(s),s=e.nextToken(),2===s.type&&(s=e.nextToken()),s.type){case 11:null==s.value&&X(s),n.key=function(e,t){const n=e.context(),s=r(7,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}(e,s.value||"");break;case 5:null==s.value&&X(s),n.key=u(e,s.value||"");break;case 6:null==s.value&&X(s),n.key=c(e,s.value||"");break;case 7:null==s.value&&X(s),n.key=l(e,s.value||"");break;default:const t=e.context(),a=r(7,t.offset,t.startLoc);return a.value="",o(a,t.offset,t.startLoc),n.key=a,o(n,t.offset,t.startLoc),{nextConsumeToken:s,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let a=null;do{const t=a||e.nextToken();switch(a=null,t.type){case 0:null==t.value&&X(t),n.items.push(s(e,t.value||""));break;case 6:null==t.value&&X(t),n.items.push(c(e,t.value||""));break;case 5:null==t.value&&X(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&X(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),a=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:s}=t,c=f(e);return 14===t.currentType?c:function(e,t,n,s){const c=e.context();let a=0===s.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(s);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==c.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,s,c)}return{parse:function(n){const s=j(n,a({},e)),c=s.context(),u=r(0,c.offset,c.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(s),o(u,s.currentOffset(),s.currentPosition()),u}}}function X(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 J(e,t){for(let n=0;n<e.length;n++)Y(e[n],t)}function Y(e,t){switch(e.type){case 1:J(e.cases,t),t.helper("plural");break;case 2:J(e.items,t);break;case 6:Y(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function z(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 Q(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?Q(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&&(Q(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 n=0;n<o&&(Q(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Q(e,t.key),t.modifier&&(e.push(", "),Q(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7: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);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function q(e,t={}){const n=a({},t),r=H(n).parse(e);return z(r,n),((e,t={})=>{const n=m(t.mode)?t.mode:"normal",r=m(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,s={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function a(e,t=!0){const n=t?r:"";c(o?n+" ".repeat(e):n)}return{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),Q(c,e),c.deindent(o),c.push("}");const{code:a,map:u}=c.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const Z="i18n:init";let ee=null;const te=ne("function:translate");function ne(e){return t=>ee&&ee.emit(e,t)}const re={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},oe={[re.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[re.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[re.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[re.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[re.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[re.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};const se="9.2.0-alpha.5";let ce;function ae(e){ce=e}let ue=null;let le=0;function ie(e,t,n,r,o){const{missing:s}=e;if(null!==s){const r=s(e,n,t,o);return m(r)?r:t}return t}function fe(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;f(e);)e=pe(o,e,t);const s=f(t)||!T(t)?t:t.default?t.default:null;e=m(s)?[s]:s,f(e)&&pe(o,e,!1),r.__localeChainCache.set(n,o)}return o}function pe(e,t,n){let r=!0;for(let o=0;o<t.length&&d(r);o++){m(t[o])&&(r=me(e,t[o],n))}return r}function me(e,t,n){let r;const o=t.split("-");do{r=de(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function de(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),(f(n)||T(n))&&n[o]&&(r=n[o])}return r}const _e=e=>e;let he=Object.create(null);function ke(e,t={}){{const n=(t.onCacheKey||_e)(e),r=he[n];if(r)return r;let o=!1;const s=t.onError||M;t.onError=e=>{o=!0,s(e)};const{code:c}=q(e,t),a=new Function(`return ${c}`)();return o?a:he[n]=a}}const Te={INVALID_ARGUMENT:D.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:D.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:D.__EXTEND_POINT__+2,__EXTEND_POINT__:D.__EXTEND_POINT__+3};const Ee=()=>"",ge=e=>p(e);function Ne(e,t,r,o,s,c){const{messageCompiler:a,warnHtmlMessage:u}=e;if(ge(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}const l=a(o,function(e,t,r,o,s,c){return{warnHtmlMessage:s,onError:e=>{throw c&&c(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,s,0,u,c));return l.locale=r,l.key=t,l.source=o,l}function Le(...e){const[t,n,o]=e,c={};if(!m(t)&&!r(t)&&!ge(t))throw Error(Te.INVALID_ARGUMENT);const u=r(t)?String(t):(ge(t),t);return r(n)?c.plural=n:m(n)?c.default=n:T(n)&&!s(n)?c.named=n:f(n)&&(c.list=n),r(o)?c.plural=o:m(o)?c.default=o:T(o)&&a(c,o),[u,c]}function be(...e){const[t,n,o,s]=e;let c,a={},u={};if(m(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();c=new Date(n);try{c.toISOString()}catch(e){throw Error(Te.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===k(t)){if(isNaN(t.getTime()))throw Error(Te.INVALID_DATE_ARGUMENT);c=t}else{if(!r(t))throw Error(Te.INVALID_ARGUMENT);c=t}return m(n)?a.key=n:T(n)&&(a=n),m(o)?a.locale=o:T(o)&&(u=o),T(s)&&(u=s),[a.key||"",c,a,u]}function Ae(...e){const[t,n,o,s]=e;let c={},a={};if(!r(t))throw Error(Te.INVALID_ARGUMENT);const u=t;return m(n)?c.key=n:T(n)&&(c=n),m(o)?c.locale=o:T(o)&&(a=o),T(s)&&(a=s),[c.key||"",u,c,a]}return ae(ke),e.CompileErrorCodes=D,e.CoreErrorCodes=Te,e.CoreWarnCodes=re,e.DEFAULT_MESSAGE_DATA_TYPE=I,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=se,e.clearCompileCache=function(){he=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=ke,e.createCompileError=w,e.createCoreContext=function(e={}){const t=m(e.version)?e.version:se,n=m(e.locale)?e.locale:"en-US",r=f(e.fallbackLocale)||T(e.fallbackLocale)||m(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=T(e.messages)?e.messages:{[n]:{}},u=T(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=T(e.numberFormats)?e.numberFormats:{[n]:{}},i=a({},e.modifiers||{},{upper:e=>m(e)?e.toUpperCase():e,lower:e=>m(e)?e.toLowerCase():e,capitalize:e=>m(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},k=p(e.missing)?e.missing:null,E=!d(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,g=!d(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,N=!!e.fallbackFormat,L=!!e.unresolving,b=p(e.postTranslation)?e.postTranslation:null,A=T(e.processor)?e.processor:null,y=!d(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter,I=p(e.messageCompiler)?e.messageCompiler:ce,P=p(e.messageResolver)?e.messageResolver:C,x=p(e.onWarn)?e.onWarn:c,v=e,F=_(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,D=_(v.__numberFormatters)?v.__numberFormatters:new Map,w=_(v.__meta)?v.__meta:{};return le++,{version:t,cid:le,locale:n,fallbackLocale:r,messages:s,datetimeFormats:u,numberFormats:l,modifiers:i,pluralRules:h,missing:k,missingWarn:E,fallbackWarn:g,fallbackFormat:N,unresolving:L,postTranslation:b,processor:A,warnHtmlMessage:y,escapeParameter:O,messageCompiler:I,messageResolver:P,onWarn:x,__datetimeFormatters:F,__numberFormatters:D,__meta:w}},e.createCoreError=function(e){return w(e,null,void 0)},e.createMessageContext=F,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o}=e,{__datetimeFormatters:c}=e,[u,l,i,f]=be(...t);d(i.missingWarn),d(i.fallbackWarn);const p=!!i.part,_=m(i.locale)?i.locale:e.locale,h=fe(e,o,_);if(!m(u)||""===u)return new Intl.DateTimeFormat(_).format(l);let k,E={},g=null;for(let t=0;t<h.length&&(k=h[t],E=n[k]||{},g=E[u],!T(g));t++)ie(e,u,k,0,"datetime format");if(!T(g)||!m(k))return r?-1:u;let N=`${k}__${u}`;s(f)||(N=`${N}__${JSON.stringify(f)}`);let L=c.get(N);return L||(L=new Intl.DateTimeFormat(k,a({},g,f)),c.set(N,L)),p?L.formatToParts(l):L.format(l)},e.getAdditionalMeta=()=>ue,e.getDevToolsHook=function(){return ee},e.getLocaleChain=fe,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&_(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(oe[e],...n)},e.handleFlatJson=function e(t){if(!_(t))return t;for(const n in t)if(i(t,n))if(n.includes(".")){const r=n.split("."),o=r.length-1;let s=t;for(let e=0;e<o;e++)r[e]in s||(s[r[e]]={}),s=s[r[e]];s[r[o]]=t[n],delete t[n],_(s[r[o]])&&e(s[r[o]])}else _(t[n])&&e(t[n]);return t},e.handleMissing=ie,e.initI18nDevTools=function(e,t,n){ee&&ee.emit(Z,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=ge,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}=e,{__numberFormatters:c}=e,[u,l,i,f]=Ae(...t);d(i.missingWarn),d(i.fallbackWarn);const p=!!i.part,_=m(i.locale)?i.locale:e.locale,h=fe(e,o,_);if(!m(u)||""===u)return new Intl.NumberFormat(_).format(l);let k,E={},g=null;for(let t=0;t<h.length&&(k=h[t],E=n[k]||{},g=E[u],!T(g));t++)ie(e,u,k,0,"number format");if(!T(g)||!m(k))return r?-1:u;let N=`${k}__${u}`;s(f)||(N=`${N}__${JSON.stringify(f)}`);let L=c.get(N);return L||(L=new Intl.NumberFormat(k,a({},g,f)),c.set(N,L)),p?L.formatToParts(l):L.format(l)},e.parse=b,e.parseDateTimeArgs=be,e.parseNumberArgs=Ae,e.parseTranslateArgs=Le,e.registerMessageCompiler=ae,e.resolveValue=C,e.setAdditionalMeta=e=>{ue=e},e.setDevToolsHook=function(e){ee=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,fallbackLocale:c,messages:a}=e,[l,i]=Le(...t),h=(d(i.missingWarn),d(i.fallbackWarn),d(i.escapeParameter)?i.escapeParameter:e.escapeParameter),k=!!i.resolvedMessage,T=m(i.default)||d(i.default)?d(i.default)?l:i.default:n?l:"",E=n||""!==T,g=m(i.locale)?i.locale:e.locale;h&&function(e){f(e.list)?e.list=e.list.map((e=>m(e)?u(e):e)):_(e.named)&&Object.keys(e.named).forEach((t=>{m(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(i);let[N,L,b]=k?[l,g,a[g]||{}]:function(e,t,n,r,o,s){const{messages:c,messageResolver:a}=e,u=fe(e,r,n);let l,i={},f=null;const d="translate";for(let n=0;n<u.length&&(l=u[n],i=c[l]||{},null===(f=a(i,t))&&(f=i[t]),!m(f)&&!p(f));n++){const n=ie(e,t,l,0,d);n!==t&&(f=n)}return[f,l,i]}(e,l,g,c),A=l;if(k||m(N)||ge(N)||E&&(N=T,A=N),!(k||(m(N)||ge(N))&&m(L)))return s?-1:l;let C=!1;const y=ge(N)?N:Ne(e,l,L,N,A,(()=>{C=!0}));if(C)return N;const O=function(e,t,n){return t(n)}(0,y,F(function(e,t,n,o){const{modifiers:s,pluralRules:c,messageResolver:a}=e,u={locale:t,modifiers:s,pluralRules:c,messages:r=>{const o=a(n,r);if(m(o)){let n=!1;const s=Ne(e,r,t,o,r,(()=>{n=!0}));return n?Ee:s}return ge(o)?o:Ee}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);r(o.plural)&&(u.pluralIndex=o.plural);return u}(e,L,b,i)));return o?o(O):O},e.translateDevTools=te,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,fe(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -620,3 +620,3 @@ * Released under the MIT License.

*/
const VERSION = '9.2.0-alpha.4';
const VERSION = '9.2.0-alpha.5';
const NOT_REOSLVED = -1;

@@ -623,0 +623,0 @@ const MISSING_RESOLVE_VALUE = '';

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===N(e),o=e=>g(e)&&0===Object.keys(e).length;function a(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function s(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const c=Object.prototype.hasOwnProperty;function i(e,t){return c.call(e,t)}const u=Array.isArray,m=e=>"function"==typeof e,_=e=>"string"==typeof e,f=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,E=Object.prototype.toString,N=e=>E.call(e),g=e=>"[object Object]"===N(e),T=[];T[0]={w:[0],i:[3,0],"[":[4],o:[7]},T[1]={w:[1],".":[2],"[":[4],o:[7]},T[2]={w:[2],i:[3,0],0:[3,0]},T[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},T[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},T[5]={"'":[4,0],o:8,l:[5,0]},T[6]={'"':[4,0],o:8,l:[6,0]};const A=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function d(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 I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(A.test(t)?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)}function O(e){const t=[];let n,r,o,a,l,s,c,i=-1,u=0,m=0;const _=[];function f(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,_[0](),!0}for(_[0]=()=>{void 0===r?r=o:r+=o},_[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},_[2]=()=>{_[0](),m++},_[3]=()=>{if(m>0)m--,u=4,_[0]();else{if(m=0,void 0===r)return!1;if(r=I(r),!1===r)return!1;_[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!f()){if(a=d(n),c=T[u],l=c[a]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=_[l[1]],s&&(o=n,!1===s())))return;if(7===u)return t}}const L=new Map;function h(e,t){if(!p(e))return null;let n=L.get(t);if(n||(n=O(t),n&&L.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;o=e,a++}return o}function b(e){if(!p(e))return e;for(const t in e)if(i(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],p(o[n[r]])&&b(o[n[r]])}else p(e[t])&&b(e[t]);return e}const C=e=>e,D=e=>"",F="text",R=e=>0===e.length?"":e.join(""),M=e=>null==e?"":u(e)||g(e)&&e.toString===E?JSON.stringify(e,null,2):String(e);function k(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function w(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=p(e.pluralRules)&&_(t)&&m(e.pluralRules[t])?e.pluralRules[t]:k,a=p(e.pluralRules)&&_(t)&&m(e.pluralRules[t])?k:void 0,l=e.list||[],s=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,s);function c(t){const n=m(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):D)}const i=g(e.processor)&&m(e.processor.normalize)?e.processor.normalize:R,u=g(e.processor)&&m(e.processor.interpolate)?e.processor.interpolate:M,f={list:e=>l[e],named:e=>s[e],plural:e=>e[o(r,e.length,a)],linked:(t,n)=>{const r=c(t)(f);return _(n)?(o=n,e.modifiers?e.modifiers[o]:C)(r):r;var o},message:c,type:g(e.processor)&&_(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}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,__EXTEND_POINT__:15};function S(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}const P="i18n:init";let U=null;function v(e){U=e}function W(){return U}function $(e,t,n){U&&U.emit(P,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const K=B("function:translate");function B(e){return t=>U&&U.emit(e,t)}const G={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},V={[G.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[G.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[G.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[G.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function j(t,...n){return function(t,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[t],...n)}const X="9.2.0-alpha.4",x=-1,H="";let Y;function z(e){Y=e}let J=null;const Q=e=>{J=e},q=()=>J;let Z=0;function ee(e={}){const t=_(e.version)?e.version:"9.2.0-alpha.4",n=_(e.locale)?e.locale:"en-US",o=u(e.fallbackLocale)||g(e.fallbackLocale)||_(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=g(e.messages)?e.messages:{[n]:{}},c=g(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=g(e.numberFormats)?e.numberFormats:{[n]:{}},E=l({},e.modifiers||{},{upper:e=>_(e)?e.toUpperCase():e,lower:e=>_(e)?e.toLowerCase():e,capitalize:e=>_(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),N=e.pluralRules||{},T=m(e.missing)?e.missing:null,A=!f(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,d=!f(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,I=!!e.fallbackFormat,O=!!e.unresolving,L=m(e.postTranslation)?e.postTranslation:null,b=g(e.processor)?e.processor:null,C=!f(e.warnHtmlMessage)||e.warnHtmlMessage,D=!!e.escapeParameter,F=m(e.messageCompiler)?e.messageCompiler:Y,R=m(e.messageResolver)?e.messageResolver:h,M=m(e.onWarn)?e.onWarn:a,k=e,w=p(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,y=p(k.__numberFormatters)?k.__numberFormatters:new Map,S=p(k.__meta)?k.__meta:{};Z++;return{version:t,cid:Z,locale:n,fallbackLocale:o,messages:s,datetimeFormats:c,numberFormats:i,modifiers:E,pluralRules:N,missing:T,missingWarn:A,fallbackWarn:d,fallbackFormat:I,unresolving:O,postTranslation:L,processor:b,warnHtmlMessage:C,escapeParameter:D,messageCompiler:F,messageResolver:R,onWarn:M,__datetimeFormatters:w,__numberFormatters:y,__meta:S}}function te(e,t){return e instanceof RegExp?e.test(t):e}function ne(e,t){return e instanceof RegExp?e.test(t):e}function re(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return _(r)?r:t}return t}function oe(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;u(e);)e=ae(o,e,t);const a=u(t)||!g(t)?t:t.default?t.default:null;e=_(a)?[a]:a,u(e)&&ae(o,e,!1),r.__localeChainCache.set(n,o)}return o}function ae(e,t,n){let r=!0;for(let o=0;o<t.length&&f(r);o++){_(t[o])&&(r=le(e,t[o],n))}return r}function le(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)||g(n))&&n[o]&&(r=n[o])}return r}function ce(e,t,n){e.__localeChainCache=new Map,oe(e,n,t)}function ie(){}function ue(e,t={}){return()=>e}const me={INVALID_ARGUMENT:y.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:y.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:y.__EXTEND_POINT__+2,__EXTEND_POINT__:y.__EXTEND_POINT__+3};function _e(e){return S(e,null,void 0)}const fe=()=>"",pe=e=>m(e);function Ee(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:a,fallbackLocale:l,messages:c}=e,[i,E]=ge(...t),N=(f(E.missingWarn),f(E.fallbackWarn),f(E.escapeParameter)?E.escapeParameter:e.escapeParameter),g=!!E.resolvedMessage,T=_(E.default)||f(E.default)?f(E.default)?i:E.default:r?i:"",A=r||""!==T,d=_(E.locale)?E.locale:e.locale;N&&function(e){u(e.list)?e.list=e.list.map((e=>_(e)?s(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{_(e.named[t])&&(e.named[t]=s(e.named[t]))}))}(E);let[I,O,L]=g?[i,d,c[d]||{}]:function(e,t,n,r,o,a){const{messages:l,messageResolver:s}=e,c=oe(e,r,n);let i,u={},f=null;const p="translate";for(let n=0;n<c.length&&(i=c[n],u=l[i]||{},null===(f=s(u,t))&&(f=u[t]),!_(f)&&!m(f));n++){const n=re(e,t,i,0,p);n!==t&&(f=n)}return[f,i,u]}(e,i,d,l),h=i;if(g||_(I)||pe(I)||A&&(I=T,h=I),!(g||(_(I)||pe(I))&&_(O)))return a?-1:i;let b=!1;const C=pe(I)?I:Ne(e,i,O,I,h,(()=>{b=!0}));if(b)return I;const D=function(e,t,n){return t(n)}(0,C,w(function(e,t,r,o){const{modifiers:a,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:a,pluralRules:l,messages:n=>{const o=s(r,n);if(_(o)){let r=!1;const a=Ne(e,n,t,o,n,(()=>{r=!0}));return r?fe:a}return pe(o)?o:fe}};e.processor&&(c.processor=e.processor);o.list&&(c.list=o.list);o.named&&(c.named=o.named);n(o.plural)&&(c.pluralIndex=o.plural);return c}(e,O,L,E)));return o?o(D):D}function Ne(e,n,r,o,a,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(pe(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const i=s(o,function(e,n,r,o,a,l){return{warnHtmlMessage:a,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,a,0,c,l));return i.locale=r,i.key=n,i.source=o,i}function ge(...e){const[t,r,a]=e,s={};if(!_(t)&&!n(t)&&!pe(t))throw Error(me.INVALID_ARGUMENT);const c=n(t)?String(t):(pe(t),t);return n(r)?s.plural=r:_(r)?s.default=r:g(r)&&!o(r)?s.named=r:u(r)&&(s.list=r),n(a)?s.plural=a:_(a)?s.default=a:g(a)&&l(s,a),[c,s]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a}=e,{__datetimeFormatters:s}=e,[c,i,u,m]=Ae(...t);f(u.missingWarn);f(u.fallbackWarn);const p=!!u.part,E=_(u.locale)?u.locale:e.locale,N=oe(e,a,E);if(!_(c)||""===c)return new Intl.DateTimeFormat(E).format(i);let T,A={},d=null;for(let t=0;t<N.length&&(T=N[t],A=n[T]||{},d=A[c],!g(d));t++)re(e,c,T,0,"datetime format");if(!g(d)||!_(T))return r?-1:c;let I=`${T}__${c}`;o(m)||(I=`${I}__${JSON.stringify(m)}`);let O=s.get(I);return O||(O=new Intl.DateTimeFormat(T,l({},d,m)),s.set(I,O)),p?O.formatToParts(i):O.format(i)}function Ae(...e){const[t,r,o,a]=e;let l,s={},c={};if(_(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(me.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(e){throw Error(me.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===N(t)){if(isNaN(t.getTime()))throw Error(me.INVALID_DATE_ARGUMENT);l=t}else{if(!n(t))throw Error(me.INVALID_ARGUMENT);l=t}return _(r)?s.key=r:g(r)&&(s=r),_(o)?s.locale=o:g(o)&&(c=o),g(a)&&(c=a),[s.key||"",l,s,c]}function de(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ie(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a}=e,{__numberFormatters:s}=e,[c,i,u,m]=Oe(...t);f(u.missingWarn);f(u.fallbackWarn);const p=!!u.part,E=_(u.locale)?u.locale:e.locale,N=oe(e,a,E);if(!_(c)||""===c)return new Intl.NumberFormat(E).format(i);let T,A={},d=null;for(let t=0;t<N.length&&(T=N[t],A=n[T]||{},d=A[c],!g(d));t++)re(e,c,T,0,"number format");if(!g(d)||!_(T))return r?-1:c;let I=`${T}__${c}`;o(m)||(I=`${I}__${JSON.stringify(m)}`);let O=s.get(I);return O||(O=new Intl.NumberFormat(T,l({},d,m)),s.set(I,O)),p?O.formatToParts(i):O.format(i)}function Oe(...e){const[t,r,o,a]=e;let l={},s={};if(!n(t))throw Error(me.INVALID_ARGUMENT);const c=t;return _(r)?l.key=r:g(r)&&(l=r),_(o)?l.locale=o:g(o)&&(s=o),g(a)&&(s=a),[l.key||"",c,l,s]}function Le(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}export{y as CompileErrorCodes,me as CoreErrorCodes,G as CoreWarnCodes,F as DEFAULT_MESSAGE_DATA_TYPE,H as MISSING_RESOLVE_VALUE,x as NOT_REOSLVED,X as VERSION,ie as clearCompileCache,de as clearDateTimeFormat,Le as clearNumberFormat,ue as compileToFunction,S as createCompileError,ee as createCoreContext,_e as createCoreError,w as createMessageContext,Te as datetime,q as getAdditionalMeta,W as getDevToolsHook,oe as getLocaleChain,j as getWarnMessage,b as handleFlatJson,re as handleMissing,$ as initI18nDevTools,pe as isMessageFunction,te as isTranslateFallbackWarn,ne as isTranslateMissingWarn,Ie as number,O as parse,Ae as parseDateTimeArgs,Oe as parseNumberArgs,ge as parseTranslateArgs,z as registerMessageCompiler,h as resolveValue,Q as setAdditionalMeta,v as setDevToolsHook,Ee as translate,K as translateDevTools,ce as updateFallbackLocale};
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===N(e),o=e=>g(e)&&0===Object.keys(e).length;function a(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function s(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const c=Object.prototype.hasOwnProperty;function i(e,t){return c.call(e,t)}const u=Array.isArray,m=e=>"function"==typeof e,_=e=>"string"==typeof e,f=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,E=Object.prototype.toString,N=e=>E.call(e),g=e=>"[object Object]"===N(e),T=[];T[0]={w:[0],i:[3,0],"[":[4],o:[7]},T[1]={w:[1],".":[2],"[":[4],o:[7]},T[2]={w:[2],i:[3,0],0:[3,0]},T[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},T[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},T[5]={"'":[4,0],o:8,l:[5,0]},T[6]={'"':[4,0],o:8,l:[6,0]};const A=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function d(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 I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(A.test(t)?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)}function O(e){const t=[];let n,r,o,a,l,s,c,i=-1,u=0,m=0;const _=[];function f(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,_[0](),!0}for(_[0]=()=>{void 0===r?r=o:r+=o},_[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},_[2]=()=>{_[0](),m++},_[3]=()=>{if(m>0)m--,u=4,_[0]();else{if(m=0,void 0===r)return!1;if(r=I(r),!1===r)return!1;_[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!f()){if(a=d(n),c=T[u],l=c[a]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=_[l[1]],s&&(o=n,!1===s())))return;if(7===u)return t}}const L=new Map;function h(e,t){if(!p(e))return null;let n=L.get(t);if(n||(n=O(t),n&&L.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;o=e,a++}return o}function b(e){if(!p(e))return e;for(const t in e)if(i(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],p(o[n[r]])&&b(o[n[r]])}else p(e[t])&&b(e[t]);return e}const C=e=>e,D=e=>"",F="text",R=e=>0===e.length?"":e.join(""),M=e=>null==e?"":u(e)||g(e)&&e.toString===E?JSON.stringify(e,null,2):String(e);function k(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function w(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=p(e.pluralRules)&&_(t)&&m(e.pluralRules[t])?e.pluralRules[t]:k,a=p(e.pluralRules)&&_(t)&&m(e.pluralRules[t])?k:void 0,l=e.list||[],s=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,s);function c(t){const n=m(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):D)}const i=g(e.processor)&&m(e.processor.normalize)?e.processor.normalize:R,u=g(e.processor)&&m(e.processor.interpolate)?e.processor.interpolate:M,f={list:e=>l[e],named:e=>s[e],plural:e=>e[o(r,e.length,a)],linked:(t,n)=>{const r=c(t)(f);return _(n)?(o=n,e.modifiers?e.modifiers[o]:C)(r):r;var o},message:c,type:g(e.processor)&&_(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}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,__EXTEND_POINT__:15};function S(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}const P="i18n:init";let U=null;function v(e){U=e}function W(){return U}function $(e,t,n){U&&U.emit(P,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const K=B("function:translate");function B(e){return t=>U&&U.emit(e,t)}const G={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},V={[G.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[G.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[G.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[G.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function j(t,...n){return function(t,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[t],...n)}const X="9.2.0-alpha.5",x=-1,H="";let Y;function z(e){Y=e}let J=null;const Q=e=>{J=e},q=()=>J;let Z=0;function ee(e={}){const t=_(e.version)?e.version:"9.2.0-alpha.5",n=_(e.locale)?e.locale:"en-US",o=u(e.fallbackLocale)||g(e.fallbackLocale)||_(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=g(e.messages)?e.messages:{[n]:{}},c=g(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=g(e.numberFormats)?e.numberFormats:{[n]:{}},E=l({},e.modifiers||{},{upper:e=>_(e)?e.toUpperCase():e,lower:e=>_(e)?e.toLowerCase():e,capitalize:e=>_(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),N=e.pluralRules||{},T=m(e.missing)?e.missing:null,A=!f(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,d=!f(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,I=!!e.fallbackFormat,O=!!e.unresolving,L=m(e.postTranslation)?e.postTranslation:null,b=g(e.processor)?e.processor:null,C=!f(e.warnHtmlMessage)||e.warnHtmlMessage,D=!!e.escapeParameter,F=m(e.messageCompiler)?e.messageCompiler:Y,R=m(e.messageResolver)?e.messageResolver:h,M=m(e.onWarn)?e.onWarn:a,k=e,w=p(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,y=p(k.__numberFormatters)?k.__numberFormatters:new Map,S=p(k.__meta)?k.__meta:{};Z++;return{version:t,cid:Z,locale:n,fallbackLocale:o,messages:s,datetimeFormats:c,numberFormats:i,modifiers:E,pluralRules:N,missing:T,missingWarn:A,fallbackWarn:d,fallbackFormat:I,unresolving:O,postTranslation:L,processor:b,warnHtmlMessage:C,escapeParameter:D,messageCompiler:F,messageResolver:R,onWarn:M,__datetimeFormatters:w,__numberFormatters:y,__meta:S}}function te(e,t){return e instanceof RegExp?e.test(t):e}function ne(e,t){return e instanceof RegExp?e.test(t):e}function re(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return _(r)?r:t}return t}function oe(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let e=[n];for(;u(e);)e=ae(o,e,t);const a=u(t)||!g(t)?t:t.default?t.default:null;e=_(a)?[a]:a,u(e)&&ae(o,e,!1),r.__localeChainCache.set(n,o)}return o}function ae(e,t,n){let r=!0;for(let o=0;o<t.length&&f(r);o++){_(t[o])&&(r=le(e,t[o],n))}return r}function le(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)||g(n))&&n[o]&&(r=n[o])}return r}function ce(e,t,n){e.__localeChainCache=new Map,oe(e,n,t)}function ie(){}function ue(e,t={}){return()=>e}const me={INVALID_ARGUMENT:y.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:y.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:y.__EXTEND_POINT__+2,__EXTEND_POINT__:y.__EXTEND_POINT__+3};function _e(e){return S(e,null,void 0)}const fe=()=>"",pe=e=>m(e);function Ee(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:a,fallbackLocale:l,messages:c}=e,[i,E]=ge(...t),N=(f(E.missingWarn),f(E.fallbackWarn),f(E.escapeParameter)?E.escapeParameter:e.escapeParameter),g=!!E.resolvedMessage,T=_(E.default)||f(E.default)?f(E.default)?i:E.default:r?i:"",A=r||""!==T,d=_(E.locale)?E.locale:e.locale;N&&function(e){u(e.list)?e.list=e.list.map((e=>_(e)?s(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{_(e.named[t])&&(e.named[t]=s(e.named[t]))}))}(E);let[I,O,L]=g?[i,d,c[d]||{}]:function(e,t,n,r,o,a){const{messages:l,messageResolver:s}=e,c=oe(e,r,n);let i,u={},f=null;const p="translate";for(let n=0;n<c.length&&(i=c[n],u=l[i]||{},null===(f=s(u,t))&&(f=u[t]),!_(f)&&!m(f));n++){const n=re(e,t,i,0,p);n!==t&&(f=n)}return[f,i,u]}(e,i,d,l),h=i;if(g||_(I)||pe(I)||A&&(I=T,h=I),!(g||(_(I)||pe(I))&&_(O)))return a?-1:i;let b=!1;const C=pe(I)?I:Ne(e,i,O,I,h,(()=>{b=!0}));if(b)return I;const D=function(e,t,n){return t(n)}(0,C,w(function(e,t,r,o){const{modifiers:a,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:a,pluralRules:l,messages:n=>{const o=s(r,n);if(_(o)){let r=!1;const a=Ne(e,n,t,o,n,(()=>{r=!0}));return r?fe:a}return pe(o)?o:fe}};e.processor&&(c.processor=e.processor);o.list&&(c.list=o.list);o.named&&(c.named=o.named);n(o.plural)&&(c.pluralIndex=o.plural);return c}(e,O,L,E)));return o?o(D):D}function Ne(e,n,r,o,a,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(pe(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const i=s(o,function(e,n,r,o,a,l){return{warnHtmlMessage:a,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,a,0,c,l));return i.locale=r,i.key=n,i.source=o,i}function ge(...e){const[t,r,a]=e,s={};if(!_(t)&&!n(t)&&!pe(t))throw Error(me.INVALID_ARGUMENT);const c=n(t)?String(t):(pe(t),t);return n(r)?s.plural=r:_(r)?s.default=r:g(r)&&!o(r)?s.named=r:u(r)&&(s.list=r),n(a)?s.plural=a:_(a)?s.default=a:g(a)&&l(s,a),[c,s]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a}=e,{__datetimeFormatters:s}=e,[c,i,u,m]=Ae(...t);f(u.missingWarn);f(u.fallbackWarn);const p=!!u.part,E=_(u.locale)?u.locale:e.locale,N=oe(e,a,E);if(!_(c)||""===c)return new Intl.DateTimeFormat(E).format(i);let T,A={},d=null;for(let t=0;t<N.length&&(T=N[t],A=n[T]||{},d=A[c],!g(d));t++)re(e,c,T,0,"datetime format");if(!g(d)||!_(T))return r?-1:c;let I=`${T}__${c}`;o(m)||(I=`${I}__${JSON.stringify(m)}`);let O=s.get(I);return O||(O=new Intl.DateTimeFormat(T,l({},d,m)),s.set(I,O)),p?O.formatToParts(i):O.format(i)}function Ae(...e){const[t,r,o,a]=e;let l,s={},c={};if(_(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(me.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(e){throw Error(me.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===N(t)){if(isNaN(t.getTime()))throw Error(me.INVALID_DATE_ARGUMENT);l=t}else{if(!n(t))throw Error(me.INVALID_ARGUMENT);l=t}return _(r)?s.key=r:g(r)&&(s=r),_(o)?s.locale=o:g(o)&&(c=o),g(a)&&(c=a),[s.key||"",l,s,c]}function de(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ie(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a}=e,{__numberFormatters:s}=e,[c,i,u,m]=Oe(...t);f(u.missingWarn);f(u.fallbackWarn);const p=!!u.part,E=_(u.locale)?u.locale:e.locale,N=oe(e,a,E);if(!_(c)||""===c)return new Intl.NumberFormat(E).format(i);let T,A={},d=null;for(let t=0;t<N.length&&(T=N[t],A=n[T]||{},d=A[c],!g(d));t++)re(e,c,T,0,"number format");if(!g(d)||!_(T))return r?-1:c;let I=`${T}__${c}`;o(m)||(I=`${I}__${JSON.stringify(m)}`);let O=s.get(I);return O||(O=new Intl.NumberFormat(T,l({},d,m)),s.set(I,O)),p?O.formatToParts(i):O.format(i)}function Oe(...e){const[t,r,o,a]=e;let l={},s={};if(!n(t))throw Error(me.INVALID_ARGUMENT);const c=t;return _(r)?l.key=r:g(r)&&(l=r),_(o)?l.locale=o:g(o)&&(s=o),g(a)&&(s=a),[l.key||"",c,l,s]}function Le(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}export{y as CompileErrorCodes,me as CoreErrorCodes,G as CoreWarnCodes,F as DEFAULT_MESSAGE_DATA_TYPE,H as MISSING_RESOLVE_VALUE,x as NOT_REOSLVED,X as VERSION,ie as clearCompileCache,de as clearDateTimeFormat,Le as clearNumberFormat,ue as compileToFunction,S as createCompileError,ee as createCoreContext,_e as createCoreError,w as createMessageContext,Te as datetime,q as getAdditionalMeta,W as getDevToolsHook,oe as getLocaleChain,j as getWarnMessage,b as handleFlatJson,re as handleMissing,$ as initI18nDevTools,pe as isMessageFunction,te as isTranslateFallbackWarn,ne as isTranslateMissingWarn,Ie as number,O as parse,Ae as parseDateTimeArgs,Oe as parseNumberArgs,ge as parseTranslateArgs,z as registerMessageCompiler,h as resolveValue,Q as setAdditionalMeta,v as setDevToolsHook,Ee as translate,K as translateDevTools,ce as updateFallbackLocale};
/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi

@@ -623,3 +623,3 @@ * Released under the MIT License.

*/
const VERSION = '9.2.0-alpha.4';
const VERSION = '9.2.0-alpha.5';
const NOT_REOSLVED = -1;

@@ -626,0 +626,0 @@ const MISSING_RESOLVE_VALUE = '';

/*!
* @intlify/core v9.2.0-alpha.4
* @intlify/core v9.2.0-alpha.5
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),a=e=>"[object RegExp]"===T(e),o=e=>N(e)&&0===Object.keys(e).length;function s(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function c(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const i=Object.prototype.hasOwnProperty;function u(e,t){return i.call(e,t)}const m=Array.isArray,_=e=>"function"==typeof e,f=e=>"string"==typeof e,E=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,g=Object.prototype.toString,T=e=>g.call(e),N=e=>"[object Object]"===T(e),d=[];d[0]={w:[0],i:[3,0],"[":[4],o:[7]},d[1]={w:[1],".":[2],"[":[4],o:[7]},d[2]={w:[2],i:[3,0],0:[3,0]},d[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},d[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},d[5]={"'":[4,0],o:8,l:[5,0]},d[6]={'"':[4,0],o:8,l:[6,0]};const A=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function C(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 I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(A.test(t)?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)}function O(e){const t=[];let n,r,a,o,s,l,c,i=-1,u=0,m=0;const _=[];function f(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,a="\\"+t,_[0](),!0}for(_[0]=()=>{void 0===r?r=a:r+=a},_[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},_[2]=()=>{_[0](),m++},_[3]=()=>{if(m>0)m--,u=4,_[0]();else{if(m=0,void 0===r)return!1;if(r=I(r),!1===r)return!1;_[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!f()){if(o=C(n),c=d[u],s=c[o]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=_[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const L=new Map;function D(e,t){if(!p(e))return null;let n=L.get(t);if(n||(n=O(t),n&&L.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const h=e=>e,F=e=>"",b="text",M=e=>0===e.length?"":e.join(""),R=e=>null==e?"":m(e)||N(e)&&e.toString===g?JSON.stringify(e,null,2):String(e);function k(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function y(e={}){const t=e.locale,n=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),a=p(e.pluralRules)&&f(t)&&_(e.pluralRules[t])?e.pluralRules[t]:k,o=p(e.pluralRules)&&f(t)&&_(e.pluralRules[t])?k:void 0,s=e.list||[],l=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,l);function c(t){const n=_(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):F)}const i=N(e.processor)&&_(e.processor.normalize)?e.processor.normalize:M,u=N(e.processor)&&_(e.processor.interpolate)?e.processor.interpolate:R,m={list:e=>s[e],named:e=>l[e],plural:e=>e[a(n,e.length,o)],linked:(t,n)=>{const r=c(t)(m);return f(n)?(a=n,e.modifiers?e.modifiers[a]:h)(r):r;var a},message:c,type:N(e.processor)&&f(e.processor.type)?e.processor.type:b,interpolate:u,normalize:i};return m}const w={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,__EXTEND_POINT__:15};function S(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const v="i18n:init";let P=null;const U=W("function:translate");function W(e){return t=>P&&P.emit(e,t)}const $={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},V={[$.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[$.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[$.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[$.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};const K="9.2.0-alpha.4";let G;let j=null;let B=0;function H(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return f(r)?r:t}return t}function X(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let a=r.__localeChainCache.get(n);if(!a){a=[];let e=[n];for(;m(e);)e=x(a,e,t);const o=m(t)||!N(t)?t:t.default?t.default:null;e=f(o)?[o]:o,m(e)&&x(a,e,!1),r.__localeChainCache.set(n,a)}return a}function x(e,t,n){let r=!0;for(let a=0;a<t.length&&E(r);a++){f(t[a])&&(r=Y(e,t[a],n))}return r}function Y(e,t,n){let r;const a=t.split("-");do{r=z(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function z(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(m(n)||N(n))&&n[a]&&(r=n[a])}return r}const J={INVALID_ARGUMENT:w.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:w.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:w.__EXTEND_POINT__+2,__EXTEND_POINT__:w.__EXTEND_POINT__+3};const Q=()=>"",q=e=>_(e);function Z(e,t,r,a,o,s){const{messageCompiler:l,warnHtmlMessage:c}=e;if(q(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||t,e}const i=l(a,function(e,t,r,a,o,s){return{warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,o,0,c,s));return i.locale=r,i.key=t,i.source=a,i}function ee(...e){const[t,n,a]=e,s={};if(!f(t)&&!r(t)&&!q(t))throw Error(J.INVALID_ARGUMENT);const c=r(t)?String(t):(q(t),t);return r(n)?s.plural=n:f(n)?s.default=n:N(n)&&!o(n)?s.named=n:m(n)&&(s.list=n),r(a)?s.plural=a:f(a)?s.default=a:N(a)&&l(s,a),[c,s]}function te(...e){const[t,n,a,o]=e;let s,l={},c={};if(f(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(J.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(J.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===T(t)){if(isNaN(t.getTime()))throw Error(J.INVALID_DATE_ARGUMENT);s=t}else{if(!r(t))throw Error(J.INVALID_ARGUMENT);s=t}return f(n)?l.key=n:N(n)&&(l=n),f(a)?l.locale=a:N(a)&&(c=a),N(o)&&(c=o),[l.key||"",s,l,c]}function ne(...e){const[t,n,a,o]=e;let s={},l={};if(!r(t))throw Error(J.INVALID_ARGUMENT);const c=t;return f(n)?s.key=n:N(n)&&(s=n),f(a)?s.locale=a:N(a)&&(l=a),N(o)&&(l=o),[s.key||"",c,s,l]}return e.CompileErrorCodes=w,e.CoreErrorCodes=J,e.CoreWarnCodes=$,e.DEFAULT_MESSAGE_DATA_TYPE=b,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=K,e.clearCompileCache=function(){},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=function(e,t={}){return()=>e},e.createCompileError=S,e.createCoreContext=function(e={}){const t=f(e.version)?e.version:K,n=f(e.locale)?e.locale:"en-US",r=m(e.fallbackLocale)||N(e.fallbackLocale)||f(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=N(e.messages)?e.messages:{[n]:{}},c=N(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=N(e.numberFormats)?e.numberFormats:{[n]:{}},u=l({},e.modifiers||{},{upper:e=>f(e)?e.toUpperCase():e,lower:e=>f(e)?e.toLowerCase():e,capitalize:e=>f(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),g=e.pluralRules||{},T=_(e.missing)?e.missing:null,d=!E(e.missingWarn)&&!a(e.missingWarn)||e.missingWarn,A=!E(e.fallbackWarn)&&!a(e.fallbackWarn)||e.fallbackWarn,C=!!e.fallbackFormat,I=!!e.unresolving,O=_(e.postTranslation)?e.postTranslation:null,L=N(e.processor)?e.processor:null,h=!E(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,b=_(e.messageCompiler)?e.messageCompiler:G,M=_(e.messageResolver)?e.messageResolver:D,R=_(e.onWarn)?e.onWarn:s,k=e,y=p(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,w=p(k.__numberFormatters)?k.__numberFormatters:new Map,S=p(k.__meta)?k.__meta:{};return B++,{version:t,cid:B,locale:n,fallbackLocale:r,messages:o,datetimeFormats:c,numberFormats:i,modifiers:u,pluralRules:g,missing:T,missingWarn:d,fallbackWarn:A,fallbackFormat:C,unresolving:I,postTranslation:O,processor:L,warnHtmlMessage:h,escapeParameter:F,messageCompiler:b,messageResolver:M,onWarn:R,__datetimeFormatters:y,__numberFormatters:w,__meta:S}},e.createCoreError=function(e){return S(e,null,void 0)},e.createMessageContext=y,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a}=e,{__datetimeFormatters:s}=e,[c,i,u,m]=te(...t);E(u.missingWarn),E(u.fallbackWarn);const _=!!u.part,p=f(u.locale)?u.locale:e.locale,g=X(e,a,p);if(!f(c)||""===c)return new Intl.DateTimeFormat(p).format(i);let T,d={},A=null;for(let t=0;t<g.length&&(T=g[t],d=n[T]||{},A=d[c],!N(A));t++)H(e,c,T,0,"datetime format");if(!N(A)||!f(T))return r?-1:c;let C=`${T}__${c}`;o(m)||(C=`${C}__${JSON.stringify(m)}`);let I=s.get(C);return I||(I=new Intl.DateTimeFormat(T,l({},A,m)),s.set(C,I)),_?I.formatToParts(i):I.format(i)},e.getAdditionalMeta=()=>j,e.getDevToolsHook=function(){return P},e.getLocaleChain=X,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[e],...n)},e.handleFlatJson=function e(t){if(!p(t))return t;for(const n in t)if(u(t,n))if(n.includes(".")){const r=n.split("."),a=r.length-1;let o=t;for(let e=0;e<a;e++)r[e]in o||(o[r[e]]={}),o=o[r[e]];o[r[a]]=t[n],delete t[n],p(o[r[a]])&&e(o[r[a]])}else p(t[n])&&e(t[n]);return t},e.handleMissing=H,e.initI18nDevTools=function(e,t,n){P&&P.emit(v,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=q,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:a}=e,{__numberFormatters:s}=e,[c,i,u,m]=ne(...t);E(u.missingWarn),E(u.fallbackWarn);const _=!!u.part,p=f(u.locale)?u.locale:e.locale,g=X(e,a,p);if(!f(c)||""===c)return new Intl.NumberFormat(p).format(i);let T,d={},A=null;for(let t=0;t<g.length&&(T=g[t],d=n[T]||{},A=d[c],!N(A));t++)H(e,c,T,0,"number format");if(!N(A)||!f(T))return r?-1:c;let C=`${T}__${c}`;o(m)||(C=`${C}__${JSON.stringify(m)}`);let I=s.get(C);return I||(I=new Intl.NumberFormat(T,l({},A,m)),s.set(C,I)),_?I.formatToParts(i):I.format(i)},e.parse=O,e.parseDateTimeArgs=te,e.parseNumberArgs=ne,e.parseTranslateArgs=ee,e.registerMessageCompiler=function(e){G=e},e.resolveValue=D,e.setAdditionalMeta=e=>{j=e},e.setDevToolsHook=function(e){P=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:o,fallbackLocale:s,messages:l}=e,[i,u]=ee(...t),g=(E(u.missingWarn),E(u.fallbackWarn),E(u.escapeParameter)?u.escapeParameter:e.escapeParameter),T=!!u.resolvedMessage,N=f(u.default)||E(u.default)?E(u.default)?i:u.default:n?i:"",d=n||""!==N,A=f(u.locale)?u.locale:e.locale;g&&function(e){m(e.list)?e.list=e.list.map((e=>f(e)?c(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{f(e.named[t])&&(e.named[t]=c(e.named[t]))}))}(u);let[C,I,O]=T?[i,A,l[A]||{}]:function(e,t,n,r,a,o){const{messages:s,messageResolver:l}=e,c=X(e,r,n);let i,u={},m=null;const E="translate";for(let n=0;n<c.length&&(i=c[n],u=s[i]||{},null===(m=l(u,t))&&(m=u[t]),!f(m)&&!_(m));n++){const n=H(e,t,i,0,E);n!==t&&(m=n)}return[m,i,u]}(e,i,A,s),L=i;if(T||f(C)||q(C)||d&&(C=N,L=C),!(T||(f(C)||q(C))&&f(I)))return o?-1:i;let D=!1;const h=q(C)?C:Z(e,i,I,C,L,(()=>{D=!0}));if(D)return C;const F=function(e,t,n){return t(n)}(0,h,y(function(e,t,n,a){const{modifiers:o,pluralRules:s,messageResolver:l}=e,c={locale:t,modifiers:o,pluralRules:s,messages:r=>{const a=l(n,r);if(f(a)){let n=!1;const o=Z(e,r,t,a,r,(()=>{n=!0}));return n?Q:o}return q(a)?a:Q}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);r(a.plural)&&(c.pluralIndex=a.plural);return c}(e,I,O,u)));return a?a(F):F},e.translateDevTools=U,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,X(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),a=e=>"[object RegExp]"===T(e),o=e=>N(e)&&0===Object.keys(e).length;function s(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function c(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const i=Object.prototype.hasOwnProperty;function u(e,t){return i.call(e,t)}const m=Array.isArray,_=e=>"function"==typeof e,f=e=>"string"==typeof e,E=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,g=Object.prototype.toString,T=e=>g.call(e),N=e=>"[object Object]"===T(e),d=[];d[0]={w:[0],i:[3,0],"[":[4],o:[7]},d[1]={w:[1],".":[2],"[":[4],o:[7]},d[2]={w:[2],i:[3,0],0:[3,0]},d[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},d[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},d[5]={"'":[4,0],o:8,l:[5,0]},d[6]={'"':[4,0],o:8,l:[6,0]};const A=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function C(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 I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(A.test(t)?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)}function O(e){const t=[];let n,r,a,o,s,l,c,i=-1,u=0,m=0;const _=[];function f(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,a="\\"+t,_[0](),!0}for(_[0]=()=>{void 0===r?r=a:r+=a},_[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},_[2]=()=>{_[0](),m++},_[3]=()=>{if(m>0)m--,u=4,_[0]();else{if(m=0,void 0===r)return!1;if(r=I(r),!1===r)return!1;_[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!f()){if(o=C(n),c=d[u],s=c[o]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=_[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const L=new Map;function D(e,t){if(!p(e))return null;let n=L.get(t);if(n||(n=O(t),n&&L.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const h=e=>e,F=e=>"",b="text",M=e=>0===e.length?"":e.join(""),R=e=>null==e?"":m(e)||N(e)&&e.toString===g?JSON.stringify(e,null,2):String(e);function k(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function y(e={}){const t=e.locale,n=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),a=p(e.pluralRules)&&f(t)&&_(e.pluralRules[t])?e.pluralRules[t]:k,o=p(e.pluralRules)&&f(t)&&_(e.pluralRules[t])?k:void 0,s=e.list||[],l=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,l);function c(t){const n=_(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):F)}const i=N(e.processor)&&_(e.processor.normalize)?e.processor.normalize:M,u=N(e.processor)&&_(e.processor.interpolate)?e.processor.interpolate:R,m={list:e=>s[e],named:e=>l[e],plural:e=>e[a(n,e.length,o)],linked:(t,n)=>{const r=c(t)(m);return f(n)?(a=n,e.modifiers?e.modifiers[a]:h)(r):r;var a},message:c,type:N(e.processor)&&f(e.processor.type)?e.processor.type:b,interpolate:u,normalize:i};return m}const w={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,__EXTEND_POINT__:15};function S(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const v="i18n:init";let P=null;const U=W("function:translate");function W(e){return t=>P&&P.emit(e,t)}const $={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},V={[$.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[$.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[$.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[$.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};const K="9.2.0-alpha.5";let G;let j=null;let B=0;function H(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return f(r)?r:t}return t}function X(e,t,n){const r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let a=r.__localeChainCache.get(n);if(!a){a=[];let e=[n];for(;m(e);)e=x(a,e,t);const o=m(t)||!N(t)?t:t.default?t.default:null;e=f(o)?[o]:o,m(e)&&x(a,e,!1),r.__localeChainCache.set(n,a)}return a}function x(e,t,n){let r=!0;for(let a=0;a<t.length&&E(r);a++){f(t[a])&&(r=Y(e,t[a],n))}return r}function Y(e,t,n){let r;const a=t.split("-");do{r=z(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function z(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(m(n)||N(n))&&n[a]&&(r=n[a])}return r}const J={INVALID_ARGUMENT:w.__EXTEND_POINT__,INVALID_DATE_ARGUMENT:w.__EXTEND_POINT__+1,INVALID_ISO_DATE_ARGUMENT:w.__EXTEND_POINT__+2,__EXTEND_POINT__:w.__EXTEND_POINT__+3};const Q=()=>"",q=e=>_(e);function Z(e,t,r,a,o,s){const{messageCompiler:l,warnHtmlMessage:c}=e;if(q(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||t,e}const i=l(a,function(e,t,r,a,o,s){return{warnHtmlMessage:o,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,o,0,c,s));return i.locale=r,i.key=t,i.source=a,i}function ee(...e){const[t,n,a]=e,s={};if(!f(t)&&!r(t)&&!q(t))throw Error(J.INVALID_ARGUMENT);const c=r(t)?String(t):(q(t),t);return r(n)?s.plural=n:f(n)?s.default=n:N(n)&&!o(n)?s.named=n:m(n)&&(s.list=n),r(a)?s.plural=a:f(a)?s.default=a:N(a)&&l(s,a),[c,s]}function te(...e){const[t,n,a,o]=e;let s,l={},c={};if(f(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(J.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(J.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===T(t)){if(isNaN(t.getTime()))throw Error(J.INVALID_DATE_ARGUMENT);s=t}else{if(!r(t))throw Error(J.INVALID_ARGUMENT);s=t}return f(n)?l.key=n:N(n)&&(l=n),f(a)?l.locale=a:N(a)&&(c=a),N(o)&&(c=o),[l.key||"",s,l,c]}function ne(...e){const[t,n,a,o]=e;let s={},l={};if(!r(t))throw Error(J.INVALID_ARGUMENT);const c=t;return f(n)?s.key=n:N(n)&&(s=n),f(a)?s.locale=a:N(a)&&(l=a),N(o)&&(l=o),[s.key||"",c,s,l]}return e.CompileErrorCodes=w,e.CoreErrorCodes=J,e.CoreWarnCodes=$,e.DEFAULT_MESSAGE_DATA_TYPE=b,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=K,e.clearCompileCache=function(){},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=function(e,t={}){return()=>e},e.createCompileError=S,e.createCoreContext=function(e={}){const t=f(e.version)?e.version:K,n=f(e.locale)?e.locale:"en-US",r=m(e.fallbackLocale)||N(e.fallbackLocale)||f(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=N(e.messages)?e.messages:{[n]:{}},c=N(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=N(e.numberFormats)?e.numberFormats:{[n]:{}},u=l({},e.modifiers||{},{upper:e=>f(e)?e.toUpperCase():e,lower:e=>f(e)?e.toLowerCase():e,capitalize:e=>f(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),g=e.pluralRules||{},T=_(e.missing)?e.missing:null,d=!E(e.missingWarn)&&!a(e.missingWarn)||e.missingWarn,A=!E(e.fallbackWarn)&&!a(e.fallbackWarn)||e.fallbackWarn,C=!!e.fallbackFormat,I=!!e.unresolving,O=_(e.postTranslation)?e.postTranslation:null,L=N(e.processor)?e.processor:null,h=!E(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,b=_(e.messageCompiler)?e.messageCompiler:G,M=_(e.messageResolver)?e.messageResolver:D,R=_(e.onWarn)?e.onWarn:s,k=e,y=p(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,w=p(k.__numberFormatters)?k.__numberFormatters:new Map,S=p(k.__meta)?k.__meta:{};return B++,{version:t,cid:B,locale:n,fallbackLocale:r,messages:o,datetimeFormats:c,numberFormats:i,modifiers:u,pluralRules:g,missing:T,missingWarn:d,fallbackWarn:A,fallbackFormat:C,unresolving:I,postTranslation:O,processor:L,warnHtmlMessage:h,escapeParameter:F,messageCompiler:b,messageResolver:M,onWarn:R,__datetimeFormatters:y,__numberFormatters:w,__meta:S}},e.createCoreError=function(e){return S(e,null,void 0)},e.createMessageContext=y,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a}=e,{__datetimeFormatters:s}=e,[c,i,u,m]=te(...t);E(u.missingWarn),E(u.fallbackWarn);const _=!!u.part,p=f(u.locale)?u.locale:e.locale,g=X(e,a,p);if(!f(c)||""===c)return new Intl.DateTimeFormat(p).format(i);let T,d={},A=null;for(let t=0;t<g.length&&(T=g[t],d=n[T]||{},A=d[c],!N(A));t++)H(e,c,T,0,"datetime format");if(!N(A)||!f(T))return r?-1:c;let C=`${T}__${c}`;o(m)||(C=`${C}__${JSON.stringify(m)}`);let I=s.get(C);return I||(I=new Intl.DateTimeFormat(T,l({},A,m)),s.set(C,I)),_?I.formatToParts(i):I.format(i)},e.getAdditionalMeta=()=>j,e.getDevToolsHook=function(){return P},e.getLocaleChain=X,e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[e],...n)},e.handleFlatJson=function e(t){if(!p(t))return t;for(const n in t)if(u(t,n))if(n.includes(".")){const r=n.split("."),a=r.length-1;let o=t;for(let e=0;e<a;e++)r[e]in o||(o[r[e]]={}),o=o[r[e]];o[r[a]]=t[n],delete t[n],p(o[r[a]])&&e(o[r[a]])}else p(t[n])&&e(t[n]);return t},e.handleMissing=H,e.initI18nDevTools=function(e,t,n){P&&P.emit(v,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=q,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:a}=e,{__numberFormatters:s}=e,[c,i,u,m]=ne(...t);E(u.missingWarn),E(u.fallbackWarn);const _=!!u.part,p=f(u.locale)?u.locale:e.locale,g=X(e,a,p);if(!f(c)||""===c)return new Intl.NumberFormat(p).format(i);let T,d={},A=null;for(let t=0;t<g.length&&(T=g[t],d=n[T]||{},A=d[c],!N(A));t++)H(e,c,T,0,"number format");if(!N(A)||!f(T))return r?-1:c;let C=`${T}__${c}`;o(m)||(C=`${C}__${JSON.stringify(m)}`);let I=s.get(C);return I||(I=new Intl.NumberFormat(T,l({},A,m)),s.set(C,I)),_?I.formatToParts(i):I.format(i)},e.parse=O,e.parseDateTimeArgs=te,e.parseNumberArgs=ne,e.parseTranslateArgs=ee,e.registerMessageCompiler=function(e){G=e},e.resolveValue=D,e.setAdditionalMeta=e=>{j=e},e.setDevToolsHook=function(e){P=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:o,fallbackLocale:s,messages:l}=e,[i,u]=ee(...t),g=(E(u.missingWarn),E(u.fallbackWarn),E(u.escapeParameter)?u.escapeParameter:e.escapeParameter),T=!!u.resolvedMessage,N=f(u.default)||E(u.default)?E(u.default)?i:u.default:n?i:"",d=n||""!==N,A=f(u.locale)?u.locale:e.locale;g&&function(e){m(e.list)?e.list=e.list.map((e=>f(e)?c(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{f(e.named[t])&&(e.named[t]=c(e.named[t]))}))}(u);let[C,I,O]=T?[i,A,l[A]||{}]:function(e,t,n,r,a,o){const{messages:s,messageResolver:l}=e,c=X(e,r,n);let i,u={},m=null;const E="translate";for(let n=0;n<c.length&&(i=c[n],u=s[i]||{},null===(m=l(u,t))&&(m=u[t]),!f(m)&&!_(m));n++){const n=H(e,t,i,0,E);n!==t&&(m=n)}return[m,i,u]}(e,i,A,s),L=i;if(T||f(C)||q(C)||d&&(C=N,L=C),!(T||(f(C)||q(C))&&f(I)))return o?-1:i;let D=!1;const h=q(C)?C:Z(e,i,I,C,L,(()=>{D=!0}));if(D)return C;const F=function(e,t,n){return t(n)}(0,h,y(function(e,t,n,a){const{modifiers:o,pluralRules:s,messageResolver:l}=e,c={locale:t,modifiers:o,pluralRules:s,messages:r=>{const a=l(n,r);if(f(a)){let n=!1;const o=Z(e,r,t,a,r,(()=>{n=!0}));return n?Q:o}return q(a)?a:Q}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);r(a.plural)&&(c.pluralIndex=a.plural);return c}(e,I,O,u)));return a?a(F):F},e.translateDevTools=U,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,X(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
{
"name": "@intlify/core",
"version": "9.2.0-alpha.4",
"version": "9.2.0-alpha.5",
"description": "@intlify/core",

@@ -36,6 +36,6 @@ "keywords": [

"dependencies": {
"@intlify/core-base": "9.2.0-alpha.4"
"@intlify/core-base": "9.2.0-alpha.5"
},
"engines": {
"node": ">= 10"
"node": ">= 12"
},

@@ -42,0 +42,0 @@ "buildOptions": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc