@intlify/message-compiler 9.2.0-beta.3 → 9.2.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * message-compiler v9.2.0-beta.3
3
- * (c) 2021 kazuya kawaguchi
2
+ * message-compiler v9.2.0-beta.32
3
+ * (c) 2022 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
- var IntlifyMessageCompiler=function(e){"use strict";const n=Object.assign,t=e=>"string"==typeof e,r={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},o={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function i(e,n,t={}){const{domain:r}=t,o=new SyntaxError(String(e));return o.code=e,n&&(o.location=n),o.domain=r,o}const s={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function u(e,n,t){return{line:e,column:n,offset:t}}function a(e,n,t){const r={start:e,end:n};return null!=t&&(r.source=t),r}const c=" ",l="\n",p=String.fromCharCode(8232),f=String.fromCharCode(8233);function h(e){const n=e;let t=0,r=1,o=1,i=0;const s=e=>"\r"===n[e]&&n[e+1]===l,u=e=>n[e]===f,a=e=>n[e]===p,c=e=>s(e)||(e=>n[e]===l)(e)||u(e)||a(e),h=e=>s(e)||u(e)||a(e)?l:n[e];function g(){return i=0,c(t)&&(r++,o=0),s(t)&&t++,t++,o++,n[t]}return{index:()=>t,line:()=>r,column:()=>o,peekOffset:()=>i,charAt:h,currentChar:()=>h(t),currentPeek:()=>h(t+i),next:g,peek:function(){return s(t+i)&&i++,i++,n[t+i]},reset:function(){t=0,r=1,o=1,i=0},resetPeek:function(e=0){i=e},skipToPeek:function(){const e=t+i;for(;e!==t;)g();i=0}}}const g=void 0;function d(e,n={}){const t=!1!==n.location,o=h(e),s=()=>o.index(),p=()=>u(o.line(),o.column(),o.index()),f=p(),d=s(),m={currentType:14,offset:d,startLoc:f,endLoc:f,lastType:14,lastOffset:d,lastStartLoc:f,lastEndLoc:f,braceNest:0,inLinked:!1,text:""},_=()=>m,{onError:E}=n;function L(e,n,t,...r){const o=_();if(n.column+=t,n.offset+=t,E){const t=i(e,a(o.startLoc,n),{domain:"tokenizer",args:r});E(t)}}function C(e,n,r){e.endLoc=p(),e.currentType=n;const o={type:n};return t&&(o.loc=a(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const A=e=>C(e,14);function y(e,n){return e.currentChar()===n?(e.next(),n):(L(r.EXPECTED_TOKEN,p(),0,n),"")}function S(e){let n="";for(;e.currentPeek()===c||e.currentPeek()===l;)n+=e.currentPeek(),e.peek();return n}function v(e){const n=S(e);return e.skipToPeek(),n}function N(e){if(e===g)return!1;const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||95===n}function O(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r=function(e){if(e===g)return!1;const n=e.charCodeAt(0);return n>=48&&n<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){S(e);const n="|"===e.currentPeek();return e.resetPeek(),n}function I(e,n=!0){const t=(n=!1,r="",o=!1)=>{const i=e.currentPeek();return"{"===i?"%"!==r&&n:"@"!==i&&i?"%"===i?(e.peek(),t(n,"%",!0)):"|"===i?!("%"!==r&&!o)||!(r===c||r===l):i===c?(e.peek(),t(!0,c,o)):i!==l||(e.peek(),t(!0,l,o)):"%"===r||n},r=t();return n&&e.resetPeek(),r}function P(e,n){const t=e.currentChar();return t===g?g:n(t)?(e.next(),t):null}function M(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||95===n||36===n}))}function k(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57}))}function R(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102}))}function b(e){let n="",t="";for(;n=k(e);)t+=n;return t}function w(e){const n=e.currentChar();switch(n){case"\\":case"'":return e.next(),`\\${n}`;case"u":return D(e,n,4);case"U":return D(e,n,6);default:return L(r.UNKNOWN_ESCAPE_SEQUENCE,p(),0,n),""}}function D(e,n,t){y(e,n);let o="";for(let i=0;i<t;i++){const t=R(e);if(!t){L(r.INVALID_UNICODE_ESCAPE_SEQUENCE,p(),0,`\\${n}${o}${e.currentChar()}`);break}o+=t}return`\\${n}${o}`}function U(e){v(e);const n=y(e,"|");return v(e),n}function x(e,n){let t=null;switch(e.currentChar()){case"{":return n.braceNest>=1&&L(r.NOT_ALLOW_NEST_PLACEHOLDER,p(),0),e.next(),t=C(n,2,"{"),v(e),n.braceNest++,t;case"}":return n.braceNest>0&&2===n.currentType&&L(r.EMPTY_PLACEHOLDER,p(),0),e.next(),t=C(n,3,"}"),n.braceNest--,n.braceNest>0&&v(e),n.inLinked&&0===n.braceNest&&(n.inLinked=!1),t;case"@":return n.braceNest>0&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t=G(e,n)||A(n),n.braceNest=0,t;default:let o=!0,i=!0,s=!0;if(T(e))return n.braceNest>0&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(n.braceNest>0&&(5===n.currentType||6===n.currentType||7===n.currentType))return L(r.UNTERMINATED_CLOSING_BRACE,p(),0),n.braceNest=0,B(e,n);if(o=function(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,n))return t=C(n,5,function(e){v(e);let n="",t="";for(;n=M(e);)t+=n;return e.currentChar()===g&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t}(e)),v(e),t;if(i=O(e,n))return t=C(n,6,function(e){v(e);let n="";return"-"===e.currentChar()?(e.next(),n+=`-${b(e)}`):n+=b(e),e.currentChar()===g&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),n}(e)),v(e),t;if(s=function(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,n))return t=C(n,7,function(e){v(e),y(e,"'");let n="",t="";const o=e=>"'"!==e&&e!==l;for(;n=P(e,o);)t+="\\"===n?w(e):n;const i=e.currentChar();return i===l||i===g?(L(r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,p(),0),i===l&&(e.next(),y(e,"'")),t):(y(e,"'"),t)}(e)),v(e),t;if(!o&&!i&&!s)return t=C(n,13,function(e){v(e);let n="",t="";const r=e=>"{"!==e&&"}"!==e&&e!==c&&e!==l;for(;n=P(e,r);)t+=n;return t}(e)),L(r.INVALID_TOKEN_IN_PLACEHOLDER,p(),0,t.value),v(e),t}return t}function G(e,n){const{currentType:t}=n;let o=null;const i=e.currentChar();switch(8!==t&&9!==t&&12!==t&&10!==t||i!==l&&i!==c||L(r.INVALID_LINKED_FORMAT,p(),0),i){case"@":return e.next(),o=C(n,8,"@"),n.inLinked=!0,o;case".":return v(e),e.next(),C(n,9,".");case":":return v(e),e.next(),C(n,10,":");default:return T(e)?(o=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,o):function(e,n){const{currentType:t}=n;if(8!==t)return!1;S(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,n)||function(e,n){const{currentType:t}=n;if(8!==t&&12!==t)return!1;S(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,n)?(v(e),G(e,n)):function(e,n){const{currentType:t}=n;if(9!==t)return!1;S(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,n)?(v(e),C(n,12,function(e){let n="",t="";for(;n=M(e);)t+=n;return t}(e))):function(e,n){const{currentType:t}=n;if(10!==t)return!1;const r=()=>{const n=e.currentPeek();return"{"===n?N(e.peek()):!("@"===n||"%"===n||"|"===n||":"===n||"."===n||n===c||!n)&&(n===l?(e.peek(),r()):N(n))},o=r();return e.resetPeek(),o}(e,n)?(v(e),"{"===i?x(e,n)||o:C(n,11,function(e){const n=(t=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===c?r:o===l?(r+=o,e.next(),n(t,r)):(r+=o,e.next(),n(!0,r)):r};return n(!1,"")}(e))):(8===t&&L(r.INVALID_LINKED_FORMAT,p(),0),n.braceNest=0,n.inLinked=!1,B(e,n))}}function B(e,n){let t={type:14};if(n.braceNest>0)return x(e,n)||A(n);if(n.inLinked)return G(e,n)||A(n);const o=e.currentChar();switch(o){case"{":return x(e,n)||A(n);case"}":return L(r.UNBALANCED_CLOSING_BRACE,p(),0),e.next(),C(n,3,"}");case"@":return G(e,n)||A(n);default:if(T(e))return t=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(I(e))return C(n,0,function(e){const n=t=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?I(e)?(t+=r,e.next(),n(t)):t:"|"===r?t:r===c||r===l?I(e)?(t+=r,e.next(),n(t)):T(e)?t:(t+=r,e.next(),n(t)):(t+=r,e.next(),n(t)):t};return n("")}(e));if("%"===o)return e.next(),C(n,4,"%")}return t}return{nextToken:function(){const{currentType:e,offset:n,startLoc:t,endLoc:r}=m;return m.lastType=e,m.lastOffset=n,m.lastStartLoc=t,m.lastEndLoc=r,m.offset=s(),m.startLoc=p(),o.currentChar()===g?C(m,14):B(o,m)},currentOffset:s,currentPosition:p,context:_}}const m="parser",_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function E(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(n||t,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function L(e={}){const t=!1!==e.location,{onError:o}=e;function s(e,n,t,r,...s){const u=e.currentPosition();if(u.offset+=r,u.column+=r,o){const e=i(n,a(t,u),{domain:m,args:s});o(e)}}function u(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function c(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function l(e,n){const t=e.context(),r=u(3,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}function p(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(5,r,o);return i.index=parseInt(n,10),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function f(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(4,r,o);return i.key=n,e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function h(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(9,r,o);return i.value=n.replace(_,E),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function g(e){const n=e.context(),t=u(6,n.offset,n.startLoc);let o=e.nextToken();if(9===o.type){const n=function(e){const n=e.nextToken(),t=e.context(),{lastOffset:o,lastStartLoc:i}=t,a=u(8,o,i);return 12!==n.type?(s(e,r.UNEXPECTED_EMPTY_LINKED_MODIFIER,t.lastStartLoc,0),a.value="",c(a,o,i),{nextConsumeToken:n,node:a}):(null==n.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,C(n)),a.value=n.value||"",c(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);t.modifier=n.node,o=n.nextConsumeToken||e.nextToken()}switch(10!==o.type&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=function(e,n){const t=e.context(),r=u(7,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}(e,o.value||"");break;case 5:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=f(e,o.value||"");break;case 6:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=p(e,o.value||"");break;case 7:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=h(e,o.value||"");break;default:s(e,r.UNEXPECTED_EMPTY_LINKED_KEY,n.lastStartLoc,0);const i=e.context(),a=u(7,i.offset,i.startLoc);return a.value="",c(a,i.offset,i.startLoc),t.key=a,c(t,i.offset,i.startLoc),{nextConsumeToken:o,node:t}}return c(t,e.currentOffset(),e.currentPosition()),{node:t}}function L(e){const n=e.context(),t=u(2,1===n.currentType?e.currentOffset():n.offset,1===n.currentType?n.endLoc:n.startLoc);t.items=[];let o=null;do{const i=o||e.nextToken();switch(o=null,i.type){case 0:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(l(e,i.value||""));break;case 6:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(p(e,i.value||""));break;case 5:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(f(e,i.value||""));break;case 7:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(h(e,i.value||""));break;case 8:const u=g(e);t.items.push(u.node),o=u.nextConsumeToken||null}}while(14!==n.currentType&&1!==n.currentType);return c(t,1===n.currentType?n.lastOffset:e.currentOffset(),1===n.currentType?n.lastEndLoc:e.currentPosition()),t}function A(e){const n=e.context(),{offset:t,startLoc:o}=n,i=L(e);return 14===n.currentType?i:function(e,n,t,o){const i=e.context();let a=0===o.items.length;const l=u(1,n,t);l.cases=[],l.cases.push(o);do{const n=L(e);a||(a=0===n.items.length),l.cases.push(n)}while(14!==i.currentType);return a&&s(e,r.MUST_HAVE_MESSAGES_IN_PLURAL,t,0),c(l,e.currentOffset(),e.currentPosition()),l}(e,t,o,i)}return{parse:function(o){const i=d(o,n({},e)),a=i.context(),l=u(0,a.offset,a.startLoc);return t&&l.loc&&(l.loc.source=o),l.body=A(i),14!==a.currentType&&s(i,r.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,o[a.offset]||""),c(l,i.currentOffset(),i.currentPosition()),l}}}function C(e){if(14===e.type)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function A(e,n){for(let t=0;t<e.length;t++)y(e[t],n)}function y(e,n){switch(e.type){case 1:A(e.cases,n),n.helper("plural");break;case 2:A(e.items,n);break;case 6:y(e.key,n),n.helper("linked");break;case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named")}}function S(e,n={}){const t=function(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);t.helper("normalize"),e.body&&y(e.body,t);const r=t.context();e.helpers=Array.from(r.helpers)}var v={},N={},O={},T={},I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");T.encode=function(e){if(0<=e&&e<I.length)return I[e];throw new TypeError("Must be between 0 and 63: "+e)},T.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};var P=T;O.encode=function(e){var n,t="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{n=31&r,(r>>>=5)>0&&(n|=32),t+=P.encode(n)}while(r>0);return t},O.decode=function(e,n,t){var r,o,i,s,u=e.length,a=0,c=0;do{if(n>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=P.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));r=!!(32&o),a+=(o&=31)<<c,c+=5}while(r);t.value=(s=(i=a)>>1,1==(1&i)?-s:s),t.rest=n};var M={};!function(e){e.getArg=function(e,n,t){if(n in e)return e[n];if(3===arguments.length)return t;throw new Error('"'+n+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function r(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(n){var t=n,i=r(n);if(i){if(!i.path)return n;t=i.path}for(var s,u=e.isAbsolute(t),a=t.split(/\/+/),c=0,l=a.length-1;l>=0;l--)"."===(s=a[l])?a.splice(l,1):".."===s?c++:c>0&&(""===s?(a.splice(l+1,c),c=0):(a.splice(l,2),c--));return""===(t=a.join("/"))&&(t=u?"/":"."),i?(i.path=t,o(i)):t}function s(e,n){""===e&&(e="."),""===n&&(n=".");var s=r(n),u=r(e);if(u&&(e=u.path||"/"),s&&!s.scheme)return u&&(s.scheme=u.scheme),o(s);if(s||n.match(t))return n;if(u&&!u.host&&!u.path)return u.host=n,o(u);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return u?(u.path=a,o(u)):a}e.urlParse=r,e.urlGenerate=o,e.normalize=i,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},e.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var t=0;0!==n.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return n;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return n;++t}return Array(t+1).join("../")+n.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function a(e){return e}function c(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var t=n-10;t>=0;t--)if(36!==e.charCodeAt(t))return!1;return!0}function l(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}e.toSetString=u?a:function(e){return c(e)?"$"+e:e},e.fromSetString=u?a:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,n,t){var r=l(e.source,n.source);return 0!==r||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)||t||0!==(r=e.generatedColumn-n.generatedColumn)||0!==(r=e.generatedLine-n.generatedLine)?r:l(e.name,n.name)},e.compareByGeneratedPositionsDeflated=function(e,n,t){var r=e.generatedLine-n.generatedLine;return 0!==r||0!==(r=e.generatedColumn-n.generatedColumn)||t||0!==(r=l(e.source,n.source))||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)?r:l(e.name,n.name)},e.compareByGeneratedPositionsInflated=function(e,n){var t=e.generatedLine-n.generatedLine;return 0!==t||0!==(t=e.generatedColumn-n.generatedColumn)||0!==(t=l(e.source,n.source))||0!==(t=e.originalLine-n.originalLine)||0!==(t=e.originalColumn-n.originalColumn)?t:l(e.name,n.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,n,t){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),t){var u=r(t);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var a=u.path.lastIndexOf("/");a>=0&&(u.path=u.path.substring(0,a+1))}n=s(o(u),n)}return i(n)}}(M);var k={},R=M,b=Object.prototype.hasOwnProperty,w="undefined"!=typeof Map;function D(){this._array=[],this._set=w?new Map:Object.create(null)}D.fromArray=function(e,n){for(var t=new D,r=0,o=e.length;r<o;r++)t.add(e[r],n);return t},D.prototype.size=function(){return w?this._set.size:Object.getOwnPropertyNames(this._set).length},D.prototype.add=function(e,n){var t=w?e:R.toSetString(e),r=w?this.has(e):b.call(this._set,t),o=this._array.length;r&&!n||this._array.push(e),r||(w?this._set.set(e,o):this._set[t]=o)},D.prototype.has=function(e){if(w)return this._set.has(e);var n=R.toSetString(e);return b.call(this._set,n)},D.prototype.indexOf=function(e){if(w){var n=this._set.get(e);if(n>=0)return n}else{var t=R.toSetString(e);if(b.call(this._set,t))return this._set[t]}throw new Error('"'+e+'" is not in the set.')},D.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},D.prototype.toArray=function(){return this._array.slice()},k.ArraySet=D;var U={},x=M;function G(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}G.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},G.prototype.add=function(e){var n,t,r,o;(o=(t=e).generatedLine)>(r=(n=this._last).generatedLine)||o==r&&t.generatedColumn>=n.generatedColumn||x.compareByGeneratedPositionsInflated(n,t)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},G.prototype.toArray=function(){return this._sorted||(this._array.sort(x.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},U.MappingList=G;var B=O,X=M,$=k.ArraySet,j=U.MappingList;function F(e){e||(e={}),this._file=X.getArg(e,"file",null),this._sourceRoot=X.getArg(e,"sourceRoot",null),this._skipValidation=X.getArg(e,"skipValidation",!1),this._sources=new $,this._names=new $,this._mappings=new j,this._sourcesContents=null}F.prototype._version=3,F.fromSourceMap=function(e){var n=e.sourceRoot,t=new F({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=n&&(r.source=X.relative(n,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!==n&&(o=X.relative(n,r)),t._sources.has(o)||t._sources.add(o);var i=e.sourceContentFor(r);null!=i&&t.setSourceContent(r,i)})),t},F.prototype.addMapping=function(e){var n=X.getArg(e,"generated"),t=X.getArg(e,"original",null),r=X.getArg(e,"source",null),o=X.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,t,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:o})},F.prototype.setSourceContent=function(e,n){var t=e;null!=this._sourceRoot&&(t=X.relative(this._sourceRoot,t)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[X.toSetString(t)]=n):this._sourcesContents&&(delete this._sourcesContents[X.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},F.prototype.applySourceMap=function(e,n,t){var r=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=X.relative(o,r));var i=new $,s=new $;this._mappings.unsortedForEach((function(n){if(n.source===r&&null!=n.originalLine){var u=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=u.source&&(n.source=u.source,null!=t&&(n.source=X.join(t,n.source)),null!=o&&(n.source=X.relative(o,n.source)),n.originalLine=u.line,n.originalColumn=u.column,null!=u.name&&(n.name=u.name))}var a=n.source;null==a||i.has(a)||i.add(a);var c=n.name;null==c||s.has(c)||s.add(c)}),this),this._sources=i,this._names=s,e.sources.forEach((function(n){var r=e.sourceContentFor(n);null!=r&&(null!=t&&(n=X.join(t,n)),null!=o&&(n=X.relative(o,n)),this.setSourceContent(n,r))}),this)},F.prototype._validateMapping=function(e,n,t,r){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||t||r)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,original:n,name:r}))},F.prototype._serializeMappings=function(){for(var e,n,t,r,o=0,i=1,s=0,u=0,a=0,c=0,l="",p=this._mappings.toArray(),f=0,h=p.length;f<h;f++){if(e="",(n=p[f]).generatedLine!==i)for(o=0;n.generatedLine!==i;)e+=";",i++;else if(f>0){if(!X.compareByGeneratedPositionsInflated(n,p[f-1]))continue;e+=","}e+=B.encode(n.generatedColumn-o),o=n.generatedColumn,null!=n.source&&(r=this._sources.indexOf(n.source),e+=B.encode(r-c),c=r,e+=B.encode(n.originalLine-1-u),u=n.originalLine-1,e+=B.encode(n.originalColumn-s),s=n.originalColumn,null!=n.name&&(t=this._names.indexOf(n.name),e+=B.encode(t-a),a=t)),l+=e}return l},F.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=X.relative(n,e));var t=X.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null}),this)},F.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},F.prototype.toString=function(){return JSON.stringify(this.toJSON())},N.SourceMapGenerator=F;var Y={},K={};!function(e){function n(t,r,o,i,s,u){var a=Math.floor((r-t)/2)+t,c=s(o,i[a],!0);return 0===c?a:c>0?r-a>1?n(a,r,o,i,s,u):u==e.LEAST_UPPER_BOUND?r<i.length?r:-1:a:a-t>1?n(t,a,o,i,s,u):u==e.LEAST_UPPER_BOUND?a:t<0?-1:t}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,r,o,i){if(0===r.length)return-1;var s=n(-1,r.length,t,r,o,i||e.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(r[s],r[s-1],!0);)--s;return s}}(K);var V={};function H(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function W(e,n,t,r){if(t<r){var o=t-1;H(e,(a=t,c=r,Math.round(a+Math.random()*(c-a))),r);for(var i=e[r],s=t;s<r;s++)n(e[s],i)<=0&&H(e,o+=1,s);H(e,o+1,s);var u=o+1;W(e,n,t,u-1),W(e,n,u+1,r)}var a,c}V.quickSort=function(e,n){W(e,n,0,e.length-1)};var z=M,Q=K,q=k.ArraySet,J=O,Z=V.quickSort;function ee(e,n){var t=e;return"string"==typeof e&&(t=z.parseSourceMapInput(e)),null!=t.sections?new re(t,n):new ne(t,n)}function ne(e,n){var t=e;"string"==typeof e&&(t=z.parseSourceMapInput(e));var r=z.getArg(t,"version"),o=z.getArg(t,"sources"),i=z.getArg(t,"names",[]),s=z.getArg(t,"sourceRoot",null),u=z.getArg(t,"sourcesContent",null),a=z.getArg(t,"mappings"),c=z.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=z.normalize(s)),o=o.map(String).map(z.normalize).map((function(e){return s&&z.isAbsolute(s)&&z.isAbsolute(e)?z.relative(s,e):e})),this._names=q.fromArray(i.map(String),!0),this._sources=q.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(e){return z.computeSourceURL(s,e,n)})),this.sourceRoot=s,this.sourcesContent=u,this._mappings=a,this._sourceMapURL=n,this.file=c}function te(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function re(e,n){var t=e;"string"==typeof e&&(t=z.parseSourceMapInput(e));var r=z.getArg(t,"version"),o=z.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new q,this._names=new q;var i={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=z.getArg(e,"offset"),r=z.getArg(t,"line"),o=z.getArg(t,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=t,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new ee(z.getArg(e,"map"),n)}}))}ee.fromSourceMap=function(e,n){return ne.fromSourceMap(e,n)},ee.prototype._version=3,ee.prototype.__generatedMappings=null,Object.defineProperty(ee.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),ee.prototype.__originalMappings=null,Object.defineProperty(ee.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),ee.prototype._charIsMappingSeparator=function(e,n){var t=e.charAt(n);return";"===t||","===t},ee.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},ee.GENERATED_ORDER=1,ee.ORIGINAL_ORDER=2,ee.GREATEST_LOWER_BOUND=1,ee.LEAST_UPPER_BOUND=2,ee.prototype.eachMapping=function(e,n,t){var r,o=n||null;switch(t||ee.GENERATED_ORDER){case ee.GENERATED_ORDER:r=this._generatedMappings;break;case ee.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var i=this.sourceRoot;r.map((function(e){var n=null===e.source?null:this._sources.at(e.source);return{source:n=z.computeSourceURL(i,n,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,o)},ee.prototype.allGeneratedPositionsFor=function(e){var n=z.getArg(e,"line"),t={source:z.getArg(e,"source"),originalLine:n,originalColumn:z.getArg(e,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,Q.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)r.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var u=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==u;)r.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r},Y.SourceMapConsumer=ee,(ne.prototype=Object.create(ee.prototype)).consumer=ee,ne.prototype._findSourceIndex=function(e){var n,t=e;if(null!=this.sourceRoot&&(t=z.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1},ne.fromSourceMap=function(e,n){var t=Object.create(ne.prototype),r=t._names=q.fromArray(e._names.toArray(),!0),o=t._sources=q.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t._sourceMapURL=n,t._absoluteSources=t._sources.toArray().map((function(e){return z.computeSourceURL(t.sourceRoot,e,n)}));for(var i=e._mappings.toArray().slice(),s=t.__generatedMappings=[],u=t.__originalMappings=[],a=0,c=i.length;a<c;a++){var l=i[a],p=new te;p.generatedLine=l.generatedLine,p.generatedColumn=l.generatedColumn,l.source&&(p.source=o.indexOf(l.source),p.originalLine=l.originalLine,p.originalColumn=l.originalColumn,l.name&&(p.name=r.indexOf(l.name)),u.push(p)),s.push(p)}return Z(t.__originalMappings,z.compareByOriginalPositions),t},ne.prototype._version=3,Object.defineProperty(ne.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),ne.prototype._parseMappings=function(e,n){for(var t,r,o,i,s=1,u=0,a=0,c=0,l=0,p=0,f=e.length,h=0,g={},d={},m=[],_=[];h<f;)if(";"===e.charAt(h))s++,h++,u=0;else if(","===e.charAt(h))h++;else{for((t=new te).generatedLine=s,i=h;i<f&&!this._charIsMappingSeparator(e,i);i++);if(o=g[r=e.slice(h,i)])h+=r.length;else{for(o=[];h<i;)J.decode(e,h,d),h=d.rest,o.push(d.value);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");g[r]=o}t.generatedColumn=u+o[0],u=t.generatedColumn,o.length>1&&(t.source=l+o[1],l+=o[1],t.originalLine=a+o[2],a=t.originalLine,t.originalLine+=1,t.originalColumn=c+o[3],c=t.originalColumn,o.length>4&&(t.name=p+o[4],p+=o[4])),_.push(t),"number"==typeof t.originalLine&&m.push(t)}Z(_,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,Z(m,z.compareByOriginalPositions),this.__originalMappings=m},ne.prototype._findMapping=function(e,n,t,r,o,i){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return Q.search(e,n,o,i)},ne.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var t=this._generatedMappings[e+1];if(n.generatedLine===t.generatedLine){n.lastGeneratedColumn=t.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},ne.prototype.originalPositionFor=function(e){var n={generatedLine:z.getArg(e,"line"),generatedColumn:z.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===n.generatedLine){var o=z.getArg(r,"source",null);null!==o&&(o=this._sources.at(o),o=z.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var i=z.getArg(r,"name",null);return null!==i&&(i=this._names.at(i)),{source:o,line:z.getArg(r,"originalLine",null),column:z.getArg(r,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},ne.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},ne.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var t=this._findSourceIndex(e);if(t>=0)return this.sourcesContent[t];var r,o=e;if(null!=this.sourceRoot&&(o=z.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(r=z.urlParse(this.sourceRoot))){var i=o.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!r.path||"/"==r.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},ne.prototype.generatedPositionFor=function(e){var n=z.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var t={source:n,originalLine:z.getArg(e,"line"),originalColumn:z.getArg(e,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===t.source)return{line:z.getArg(o,"generatedLine",null),column:z.getArg(o,"generatedColumn",null),lastColumn:z.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Y.BasicSourceMapConsumer=ne,(re.prototype=Object.create(ee.prototype)).constructor=ee,re.prototype._version=3,Object.defineProperty(re.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var t=0;t<this._sections[n].consumer.sources.length;t++)e.push(this._sections[n].consumer.sources[t]);return e}}),re.prototype.originalPositionFor=function(e){var n={generatedLine:z.getArg(e,"line"),generatedColumn:z.getArg(e,"column")},t=Q.search(n,this._sections,(function(e,n){var t=e.generatedLine-n.generatedOffset.generatedLine;return t||e.generatedColumn-n.generatedOffset.generatedColumn})),r=this._sections[t];return r?r.consumer.originalPositionFor({line:n.generatedLine-(r.generatedOffset.generatedLine-1),column:n.generatedColumn-(r.generatedOffset.generatedLine===n.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},re.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},re.prototype.sourceContentFor=function(e,n){for(var t=0;t<this._sections.length;t++){var r=this._sections[t].consumer.sourceContentFor(e,!0);if(r)return r}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},re.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var t=this._sections[n];if(-1!==t.consumer._findSourceIndex(z.getArg(e,"source"))){var r=t.consumer.generatedPositionFor(e);if(r)return{line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},re.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],o=r.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=r.consumer._sources.at(s.source);u=z.computeSourceURL(r.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var a=null;s.name&&(a=r.consumer._names.at(s.name),this._names.add(a),a=this._names.indexOf(a));var c={source:u,generatedLine:s.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(r.generatedOffset.generatedLine===s.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:a};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}Z(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),Z(this.__originalMappings,z.compareByOriginalPositions)},Y.IndexedSourceMapConsumer=re;var oe={},ie=N.SourceMapGenerator,se=M,ue=/(\r?\n)/,ae="$$$isSourceNode$$$";function ce(e,n,t,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==t?null:t,this.name=null==o?null:o,this[ae]=!0,null!=r&&this.add(r)}ce.fromStringWithSourceMap=function(e,n,t){var r=new ce,o=e.split(ue),i=0,s=function(){return e()+(e()||"");function e(){return i<o.length?o[i++]:void 0}},u=1,a=0,c=null;return n.eachMapping((function(e){if(null!==c){if(!(u<e.generatedLine)){var n=(t=o[i]||"").substr(0,e.generatedColumn-a);return o[i]=t.substr(e.generatedColumn-a),a=e.generatedColumn,l(c,n),void(c=e)}l(c,s()),u++,a=0}for(;u<e.generatedLine;)r.add(s()),u++;var t;a<e.generatedColumn&&(r.add((t=o[i]||"").substr(0,e.generatedColumn)),o[i]=t.substr(e.generatedColumn),a=e.generatedColumn);c=e}),this),i<o.length&&(c&&l(c,s()),r.add(o.splice(i).join(""))),n.sources.forEach((function(e){var o=n.sourceContentFor(e);null!=o&&(null!=t&&(e=se.join(t,e)),r.setSourceContent(e,o))})),r;function l(e,n){if(null===e||void 0===e.source)r.add(n);else{var o=t?se.join(t,e.source):e.source;r.add(new ce(e.originalLine,e.originalColumn,o,n,e.name))}}},ce.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[ae]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},ce.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[ae]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},ce.prototype.walk=function(e){for(var n,t=0,r=this.children.length;t<r;t++)(n=this.children[t])[ae]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},ce.prototype.join=function(e){var n,t,r=this.children.length;if(r>0){for(n=[],t=0;t<r-1;t++)n.push(this.children[t]),n.push(e);n.push(this.children[t]),this.children=n}return this},ce.prototype.replaceRight=function(e,n){var t=this.children[this.children.length-1];return t[ae]?t.replaceRight(e,n):"string"==typeof t?this.children[this.children.length-1]=t.replace(e,n):this.children.push("".replace(e,n)),this},ce.prototype.setSourceContent=function(e,n){this.sourceContents[se.toSetString(e)]=n},ce.prototype.walkSourceContents=function(e){for(var n=0,t=this.children.length;n<t;n++)this.children[n][ae]&&this.children[n].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(n=0,t=r.length;n<t;n++)e(se.fromSetString(r[n]),this.sourceContents[r[n]])},ce.prototype.toString=function(){var e="";return this.walk((function(n){e+=n})),e},ce.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},t=new ie(e),r=!1,o=null,i=null,s=null,u=null;return this.walk((function(e,a){n.code+=e,null!==a.source&&null!==a.line&&null!==a.column?(o===a.source&&i===a.line&&s===a.column&&u===a.name||t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name}),o=a.source,i=a.line,s=a.column,u=a.name,r=!0):r&&(t.addMapping({generated:{line:n.line,column:n.column}}),o=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(n.line++,n.column=0,c+1===l?(o=null,r=!1):r&&t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name})):n.column++})),this.walkSourceContents((function(e,n){t.setSourceContent(e,n)})),{code:n.code,map:t}},oe.SourceNode=ce;var le=v.SourceMapGenerator=N.SourceMapGenerator;function pe(e,n){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:i}=n,u={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:i,indentLevel:0};function a(e,n){var t,r;u.code+=e,u.map&&(n&&n.loc&&n.loc!==s&&(t=n.loc.start,r=function(e){switch(e.type){case 3:return e.value;case 5:return e.index.toString();case 4:return e.key;case 9:case 8:case 7:return e.value;default:return}}(n),u.map.addMapping({name:r,source:u.filename,original:{line:t.line,column:t.column-1},generated:{line:u.line,column:u.column-1}})),function(e,n,t=n.length){let r=0,o=-1;for(let e=0;e<t;e++)10===n.charCodeAt(e)&&(r++,o=e);e.offset+=t,e.line+=r,e.column=-1===o?e.column+t:t-o}(u,e))}function c(e,n=!0){const t=n?o:"";a(i?t+" ".repeat(e):t)}return t&&(u.map=new le,u.map.setSourceContent(r,u.source)),{context:()=>u,push:a,indent:function(e=!0){const n=++u.indentLevel;e&&c(n)},deindent:function(e=!0){const n=--u.indentLevel;e&&c(n)},newline:function(){c(u.indentLevel)},helper:e=>`_${e}`,needIndent:()=>u.needIndent}}function fe(e,n){const{helper:t}=e;switch(n.type){case 0:!function(e,n){n.body?fe(e,n.body):e.push("null")}(e,n);break;case 1:!function(e,n){const{helper:t,needIndent:r}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(r());const o=n.cases.length;for(let t=0;t<o&&(fe(e,n.cases[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}}(e,n);break;case 2:!function(e,n){const{helper:t,needIndent:r}=e;e.push(`${t("normalize")}([`),e.indent(r());const o=n.items.length;for(let t=0;t<o&&(fe(e,n.items[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}(e,n);break;case 6:!function(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),fe(e,n.key),n.modifier&&(e.push(", "),fe(e,n.modifier)),e.push(")")}(e,n);break;case 8:case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:case 3:e.push(JSON.stringify(n.value),n)}}v.SourceMapConsumer=Y.SourceMapConsumer,v.SourceNode=oe.SourceNode;return e.CompileErrorCodes=r,e.ERROR_DOMAIN=m,e.LocationStub=s,e.baseCompile=function(e,r={}){const o=n({},r),i=L(o).parse(e);return S(i,o),((e,n={})=>{const r=t(n.mode)?n.mode:"normal",o=t(n.filename)?n.filename:"message.intl",i=n.needIndent?n.needIndent:"arrow"!==r,s=e.helpers||[],u=pe(e,{mode:r,filename:o,sourceMap:!!n.sourceMap,breakLineCode:null!=n.breakLineCode?n.breakLineCode:"arrow"===r?";":"\n",needIndent:i});u.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),u.indent(i),s.length>0&&(u.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),u.newline()),u.push("return "),fe(u,e),u.deindent(i),u.push("}");const{code:a,map:c}=u.context();return{ast:e,code:a,map:c?c.toJSON():void 0}})(i,o)},e.createCompileError=i,e.createLocation=a,e.createParser=L,e.createPosition=u,e.defaultOnError=function(e){throw e},e.errorMessages=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
6
+ var IntlifyMessageCompiler=function(e){"use strict";const t=Object.assign,n=e=>"string"==typeof e,r={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},c={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function o(e,t,n={}){const{domain:r,messages:c,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function s(e,t,n){return{line:e,column:t,offset:n}}function u(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const a=" ",i="\n",l=String.fromCharCode(8232),f=String.fromCharCode(8233);function d(e){const t=e;let n=0,r=1,c=1,o=0;const s=e=>"\r"===t[e]&&t[e+1]===i,u=e=>t[e]===f,a=e=>t[e]===l,d=e=>s(e)||(e=>t[e]===i)(e)||u(e)||a(e),p=e=>s(e)||u(e)||a(e)?i:t[e];function E(){return o=0,d(n)&&(r++,c=0),s(n)&&n++,n++,c++,t[n]}return{index:()=>n,line:()=>r,column:()=>c,peekOffset:()=>o,charAt:p,currentChar:()=>p(n),currentPeek:()=>p(n+o),next:E,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,c=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)E();o=0}}}const p=void 0;function E(e,t={}){const n=!1!==t.location,r=d(e),c=()=>r.index(),o=()=>s(r.line(),r.column(),r.index()),l=o(),f=c(),E={currentType:14,offset:f,startLoc:l,endLoc:l,lastType:14,lastOffset:f,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},L=()=>E,{onError:k}=t;function h(e,t,r){e.endLoc=o(),e.currentType=t;const c={type:t};return n&&(c.loc=u(e.startLoc,e.endLoc)),null!=r&&(c.value=r),c}const N=e=>h(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function T(e){let t="";for(;e.currentPeek()===a||e.currentPeek()===i;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=T(e);return e.skipToPeek(),t}function P(e){if(e===p)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function x(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r=function(e){if(e===p)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function y(e){T(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function m(e,t=!0){const n=(t=!1,r="",c=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!c)||!(r===a||r===i):o===a?(e.peek(),n(!0,a,c)):o!==i||(e.peek(),n(!0,i,c)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function I(e,t){const n=e.currentChar();return n===p?p:t(n)?(e.next(),n):null}function O(e){return I(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 S(e){return I(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return I(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=S(e);)n+=t;return n}function v(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return D(e,t,4);case"U":return D(e,t,6);default:return o(),""}}function D(e,t,n){_(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function U(e){C(e);const t=_(e,"|");return C(e),t}function g(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=h(t,2,"{"),C(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=h(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=M(e,t)||N(t),t.braceNest=0,n;default:let r=!0,c=!0,s=!0;if(y(e))return t.braceNest>0&&o(),n=h(t,1,U(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return o(),t.braceNest=0,R(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t))return n=h(t,5,function(e){C(e);let t="",n="";for(;t=O(e);)n+=t;return e.currentChar()===p&&o(),n}(e)),C(e),n;if(c=x(e,t))return n=h(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${A(e)}`):t+=A(e),e.currentChar()===p&&o(),t}(e)),C(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=h(t,7,function(e){C(e),_(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==i;for(;t=I(e,r);)n+="\\"===t?v(e):t;const c=e.currentChar();return c===i||c===p?(o(),c===i&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),C(e),n;if(!r&&!c&&!s)return n=h(t,13,function(e){C(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==a&&e!==i;for(;t=I(e,r);)n+=t;return n}(e)),o(),n.value,C(e),n}return n}function M(e,t){const{currentType:n}=t;let r=null;const c=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||c!==i&&c!==a||o(),c){case"@":return e.next(),r=h(t,8,"@"),t.inLinked=!0,r;case".":return C(e),e.next(),h(t,9,".");case":":return C(e),e.next(),h(t,10,":");default:return y(e)?(r=h(t,1,U(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;T(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;T(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(C(e),M(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t)?(C(e),h(t,12,function(e){let t="",n="";for(;t=O(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?P(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===a||!t)&&(t===i?(e.peek(),r()):P(t))},c=r();return e.resetPeek(),c}(e,t)?(C(e),"{"===c?g(e,t)||r:h(t,11,function(e){const t=(n=!1,r)=>{const c=e.currentChar();return"{"!==c&&"%"!==c&&"@"!==c&&"|"!==c&&c?c===a?r:c===i?(r+=c,e.next(),t(n,r)):(r+=c,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,R(e,t))}}function R(e,t){let n={type:14};if(t.braceNest>0)return g(e,t)||N(t);if(t.inLinked)return M(e,t)||N(t);const r=e.currentChar();switch(r){case"{":return g(e,t)||N(t);case"}":return o(),e.next(),h(t,3,"}");case"@":return M(e,t)||N(t);default:if(y(e))return n=h(t,1,U(e)),t.braceNest=0,t.inLinked=!1,n;if(m(e))return h(t,0,function(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!m(e))break;t+=n,e.next()}else if(n===a||n===i)if(m(e))t+=n,e.next();else{if(y(e))break;t+=n,e.next()}else t+=n,e.next()}return t}(e));if("%"===r)return e.next(),h(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=E;return E.lastType=e,E.lastOffset=t,E.lastStartLoc=n,E.lastEndLoc=s,E.offset=c(),E.startLoc=o(),r.currentChar()===p?h(E,14):R(r,E)},currentOffset:c,currentPosition:o,context:L}}const L="parser",k=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function h(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 N(e={}){const n=!1!==e.location,{onError:r}=e;function c(e,t,r){const c={type:e,start:t,end:t};return n&&(c.loc={start:r,end:r}),c}function o(e,t,r,c){e.end=t,c&&(e.type=c),n&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),r=c(3,n.offset,n.startLoc);return r.value=t,o(r,e.currentOffset(),e.currentPosition()),r}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(5,r,s);return u.index=parseInt(t,10),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function a(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(4,r,s);return u.key=t,e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function i(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(9,r,s);return u.value=t.replace(k,h),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function l(e){const t=e.context(),n=c(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(8,r,s);return 12!==t.type?(n.lastStartLoc,u.value="",o(u,r,s),{nextConsumeToken:t,node:u}):(null==t.value&&(n.lastStartLoc,_(t)),u.value=t.value||"",o(u,e.currentOffset(),e.currentPosition()),{node:u})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(t.lastStartLoc,_(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(t.lastStartLoc,_(r)),n.key=function(e,t){const n=e.context(),r=c(7,n.offset,n.startLoc);return r.value=t,o(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(t.lastStartLoc,_(r)),n.key=a(e,r.value||"");break;case 6:null==r.value&&(t.lastStartLoc,_(r)),n.key=u(e,r.value||"");break;case 7:null==r.value&&(t.lastStartLoc,_(r)),n.key=i(e,r.value||"");break;default:t.lastStartLoc;const s=e.context(),l=c(7,s.offset,s.startLoc);return l.value="",o(l,s.offset,s.startLoc),n.key=l,o(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=c(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null;do{const c=r||e.nextToken();switch(r=null,c.type){case 0:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(s(e,c.value||""));break;case 6:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(u(e,c.value||""));break;case 5:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(a(e,c.value||""));break;case 7:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(i(e,c.value||""));break;case 8:const o=l(e);n.items.push(o.node),r=o.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 d(e){const t=e.context(),{offset:n,startLoc:r}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let u=0===r.items.length;const a=c(1,t,n);a.cases=[],a.cases.push(r);do{const t=f(e);u||(u=0===t.items.length),a.cases.push(t)}while(14!==s.currentType);return o(a,e.currentOffset(),e.currentPosition()),a}(e,n,r,s)}return{parse:function(r){const s=E(r,t({},e)),u=s.context(),a=c(0,u.offset,u.startLoc);return n&&a.loc&&(a.loc.source=r),a.body=d(s),14!==u.currentType&&(u.lastStartLoc,r[u.offset]),o(a,s.currentOffset(),s.currentPosition()),a}}}function _(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 T(e,t){for(let n=0;n<e.length;n++)C(e[n],t)}function C(e,t){switch(e.type){case 1:T(e.cases,t),t.helper("plural");break;case 2:T(e.items,t);break;case 6:C(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 P(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&&C(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function x(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?x(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 c=t.cases.length;for(let n=0;n<c&&(x(e,t.cases[n]),n!==c-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 c=t.items.length;for(let n=0;n<c&&(x(e,t.items[n]),n!==c-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")}(`),x(e,t.key),t.modifier&&(e.push(", "),x(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}return e.CompileErrorCodes=r,e.ERROR_DOMAIN=L,e.LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},e.baseCompile=function(e,r={}){const c=t({},r),o=N(c).parse(e);return P(o,c),((e,t={})=>{const r=n(t.mode)?t.mode:"normal",c=n(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",u=t.needIndent?t.needIndent:"arrow"!==r,a=e.helpers||[],i=function(e,t){const{sourceMap:n,filename:r,breakLineCode:c,needIndent:o}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:c,needIndent:o,indentLevel:0};function u(e,t){s.code+=e}function a(e,t=!0){const n=t?c:"";u(o?n+" ".repeat(e):n)}return{context:()=>s,push:u,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:r,filename:c,sourceMap:o,breakLineCode:s,needIndent:u});i.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(u),a.length>0&&(i.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),i.newline()),i.push("return "),x(i,e),i.deindent(u),i.push("}");const{code:l,map:f}=i.context();return{ast:e,code:l,map:f?f.toJSON():void 0}})(o,c)},e.createCompileError=o,e.createLocation=u,e.createParser=N,e.createPosition=s,e.defaultOnError=function(e){throw e},e.errorMessages=c,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
package/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export * from './index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/message-compiler",
3
- "version": "9.2.0-beta.3",
3
+ "version": "9.2.0-beta.32",
4
4
  "description": "@intlify/message-compiler",
5
5
  "keywords": [
6
6
  "compiler",
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "files": [
27
27
  "index.js",
28
+ "index.mjs",
28
29
  "dist"
29
30
  ],
30
31
  "main": "index.js",
@@ -33,7 +34,7 @@
33
34
  "jsdelivr": "dist/message-compiler.global.js",
34
35
  "types": "dist/message-compiler.d.ts",
35
36
  "dependencies": {
36
- "@intlify/shared": "9.2.0-beta.3",
37
+ "@intlify/shared": "9.2.0-beta.32",
37
38
  "source-map": "0.6.1"
38
39
  },
39
40
  "engines": {
@@ -49,6 +50,18 @@
49
50
  ],
50
51
  "enableFullBundleForEsmBrowser": true
51
52
  },
53
+ "exports": {
54
+ ".": {
55
+ "import": {
56
+ "node": "./index.mjs",
57
+ "default": "./dist/message-compiler.esm-bundler.js"
58
+ },
59
+ "require": "./index.js"
60
+ },
61
+ "./dist/*": "./dist/*",
62
+ "./index.mjs": "./index.mjs",
63
+ "./package.json": "./package.json"
64
+ },
52
65
  "publishConfig": {
53
66
  "access": "public"
54
67
  },