Socket
Socket
Sign inDemoInstall

intl-messageformat

Package Overview
Dependencies
Maintainers
8
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-messageformat - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

100

dist/intl-messageformat.js

@@ -413,17 +413,20 @@ (function() {

peg$c52 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" },
peg$c53 = "\\#",
peg$c54 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
peg$c55 = function() { return '\\#'; },
peg$c56 = "\\{",
peg$c57 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
peg$c58 = function() { return '\u007B'; },
peg$c59 = "\\}",
peg$c60 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
peg$c61 = function() { return '\u007D'; },
peg$c62 = "\\u",
peg$c63 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
peg$c64 = function(digits) {
peg$c53 = "\\\\",
peg$c54 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" },
peg$c55 = function() { return '\\'; },
peg$c56 = "\\#",
peg$c57 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
peg$c58 = function() { return '\\#'; },
peg$c59 = "\\{",
peg$c60 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
peg$c61 = function() { return '\u007B'; },
peg$c62 = "\\}",
peg$c63 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
peg$c64 = function() { return '\u007D'; },
peg$c65 = "\\u",
peg$c66 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
peg$c67 = function(digits) {
return String.fromCharCode(parseInt(digits, 16));
},
peg$c65 = function(chars) { return chars.join(''); },
peg$c68 = function(chars) { return chars.join(''); },

@@ -1502,14 +1505,32 @@ peg$currPos = 0,

if (s1 !== peg$FAILED) {
s2 = peg$currPos;
s3 = peg$currPos;
s4 = peg$parsehexDigit();
if (s4 !== peg$FAILED) {
s5 = peg$parsehexDigit();
if (s5 !== peg$FAILED) {
s6 = peg$parsehexDigit();
if (s6 !== peg$FAILED) {
s7 = peg$parsehexDigit();
if (s7 !== peg$FAILED) {
s4 = [s4, s5, s6, s7];
s3 = s4;
peg$reportedPos = s0;
s1 = peg$c64();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c65) {
s1 = peg$c65;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c66); }
}
if (s1 !== peg$FAILED) {
s2 = peg$currPos;
s3 = peg$currPos;
s4 = peg$parsehexDigit();
if (s4 !== peg$FAILED) {
s5 = peg$parsehexDigit();
if (s5 !== peg$FAILED) {
s6 = peg$parsehexDigit();
if (s6 !== peg$FAILED) {
s7 = peg$parsehexDigit();
if (s7 !== peg$FAILED) {
s4 = [s4, s5, s6, s7];
s3 = s4;
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {

@@ -1527,21 +1548,18 @@ peg$currPos = s3;

}
if (s3 !== peg$FAILED) {
s3 = input.substring(s2, peg$currPos);
}
s2 = s3;
if (s2 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c67(s2);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
if (s3 !== peg$FAILED) {
s3 = input.substring(s2, peg$currPos);
}
s2 = s3;
if (s2 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c64(s2);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}

@@ -1572,3 +1590,3 @@ }

peg$reportedPos = s0;
s1 = peg$c65(s1);
s1 = peg$c68(s1);
}

@@ -1575,0 +1593,0 @@ s0 = s1;

@@ -1,2 +0,2 @@

(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d,e){this.id=a,this.useOrdinal=b,this.offset=c,this.options=d,this.pluralFn=e}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.formats,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=this._findPluralRuleFunction(this._locale),f=this._compilePattern(d,b,c,e),h=this;this.format=function(a){return h._format(f,a)}}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b=a.format;if(!b)return new c(a.id);var e,g=this.formats,h=this.locales,i=this.pluralFn;switch(b.type){case"numberFormat":return e=g.number[b.style],{id:a.id,format:new Intl.NumberFormat(h,e).format};case"dateFormat":return e=g.date[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"timeFormat":return e=g.time[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"pluralFormat":return e=this.compileOptions(a),new d(a.id,b.ordinal,b.offset,e,i);case"selectFormat":return e=this.compileOptions(a),new f(a.id,e);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset,this.useOrdinal)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var m=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Ub!==b&&(Ub>b&&(Ub=0,Vb={line:1,column:1,seenCR:!1}),c(Vb,Ub,b),Ub=b),Vb}function d(a){Wb>Sb||(Sb>Wb&&(Wb=Sb,Xb=[]),Xb.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.description<b.description?-1:a.description>b.description?1:0});b<a.length;)a[b-1]===a[b]?a.splice(b,1):b++}function h(a,b){function c(a){function b(a){return a.charCodeAt(0).toString(16).toUpperCase()}return a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(a){return"\\x0"+b(a)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(a){return"\\x"+b(a)}).replace(/[\u0180-\u0FFF]/g,function(a){return"\\u0"+b(a)}).replace(/[\u1080-\uFFFF]/g,function(a){return"\\u"+b(a)})}var d,e,f,g=new Array(a.length);for(f=0;f<a.length;f++)g[f]=a[f].description;return d=a.length>1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f<a.length?a.charAt(f):null;return null!==e&&g(e),new b(null!==d?d:h(e,j),e,j,f,i.line,i.column)}function f(){var a;return a=g()}function g(){var a,b,c;for(a=Sb,b=[],c=h();c!==E;)b.push(c),c=h();return b!==E&&(Tb=a,b=H(b)),a=b}function h(){var a;return a=j(),a===E&&(a=l()),a}function i(){var b,c,d,e,f,g;if(b=Sb,c=[],d=Sb,e=w(),e!==E?(f=B(),f!==E?(g=w(),g!==E?(e=[e,f,g],d=e):(Sb=d,d=I)):(Sb=d,d=I)):(Sb=d,d=I),d!==E)for(;d!==E;)c.push(d),d=Sb,e=w(),e!==E?(f=B(),f!==E?(g=w(),g!==E?(e=[e,f,g],d=e):(Sb=d,d=I)):(Sb=d,d=I)):(Sb=d,d=I);else c=I;return c!==E&&(Tb=b,c=J(c)),b=c,b===E&&(b=Sb,c=v(),c!==E&&(c=a.substring(b,Sb)),b=c),b}function j(){var a,b;return a=Sb,b=i(),b!==E&&(Tb=a,b=K(b)),a=b}function k(){var b,c,e;if(b=z(),b===E){if(b=Sb,c=[],L.test(a.charAt(Sb))?(e=a.charAt(Sb),Sb++):(e=E,0===Yb&&d(M)),e!==E)for(;e!==E;)c.push(e),L.test(a.charAt(Sb))?(e=a.charAt(Sb),Sb++):(e=E,0===Yb&&d(M));else c=I;c!==E&&(c=a.substring(b,Sb)),b=c}return b}function l(){var b,c,e,f,g,h,i,j,l;return b=Sb,123===a.charCodeAt(Sb)?(c=N,Sb++):(c=E,0===Yb&&d(O)),c!==E?(e=w(),e!==E?(f=k(),f!==E?(g=w(),g!==E?(h=Sb,44===a.charCodeAt(Sb)?(i=Q,Sb++):(i=E,0===Yb&&d(R)),i!==E?(j=w(),j!==E?(l=m(),l!==E?(i=[i,j,l],h=i):(Sb=h,h=I)):(Sb=h,h=I)):(Sb=h,h=I),h===E&&(h=P),h!==E?(i=w(),i!==E?(125===a.charCodeAt(Sb)?(j=S,Sb++):(j=E,0===Yb&&d(T)),j!==E?(Tb=b,c=U(f,h),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function m(){var a;return a=n(),a===E&&(a=o(),a===E&&(a=p(),a===E&&(a=q()))),a}function n(){var b,c,e,f,g,h,i;return b=Sb,a.substr(Sb,6)===V?(c=V,Sb+=6):(c=E,0===Yb&&d(W)),c===E&&(a.substr(Sb,4)===X?(c=X,Sb+=4):(c=E,0===Yb&&d(Y)),c===E&&(a.substr(Sb,4)===Z?(c=Z,Sb+=4):(c=E,0===Yb&&d($)))),c!==E?(e=w(),e!==E?(f=Sb,44===a.charCodeAt(Sb)?(g=Q,Sb++):(g=E,0===Yb&&d(R)),g!==E?(h=w(),h!==E?(i=B(),i!==E?(g=[g,h,i],f=g):(Sb=f,f=I)):(Sb=f,f=I)):(Sb=f,f=I),f===E&&(f=P),f!==E?(Tb=b,c=_(c,f),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function o(){var b,c,e,f,g,h;return b=Sb,a.substr(Sb,6)===ab?(c=ab,Sb+=6):(c=E,0===Yb&&d(bb)),c!==E?(e=w(),e!==E?(44===a.charCodeAt(Sb)?(f=Q,Sb++):(f=E,0===Yb&&d(R)),f!==E?(g=w(),g!==E?(h=u(),h!==E?(Tb=b,c=cb(h),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function p(){var b,c,e,f,g,h;return b=Sb,a.substr(Sb,13)===db?(c=db,Sb+=13):(c=E,0===Yb&&d(eb)),c!==E?(e=w(),e!==E?(44===a.charCodeAt(Sb)?(f=Q,Sb++):(f=E,0===Yb&&d(R)),f!==E?(g=w(),g!==E?(h=u(),h!==E?(Tb=b,c=fb(h),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function q(){var b,c,e,f,g,h,i;if(b=Sb,a.substr(Sb,6)===gb?(c=gb,Sb+=6):(c=E,0===Yb&&d(hb)),c!==E)if(e=w(),e!==E)if(44===a.charCodeAt(Sb)?(f=Q,Sb++):(f=E,0===Yb&&d(R)),f!==E)if(g=w(),g!==E){if(h=[],i=s(),i!==E)for(;i!==E;)h.push(i),i=s();else h=I;h!==E?(Tb=b,c=ib(h),b=c):(Sb=b,b=I)}else Sb=b,b=I;else Sb=b,b=I;else Sb=b,b=I;else Sb=b,b=I;return b}function r(){var b,c,e,f;return b=Sb,c=Sb,61===a.charCodeAt(Sb)?(e=jb,Sb++):(e=E,0===Yb&&d(kb)),e!==E?(f=z(),f!==E?(e=[e,f],c=e):(Sb=c,c=I)):(Sb=c,c=I),c!==E&&(c=a.substring(b,Sb)),b=c,b===E&&(b=B()),b}function s(){var b,c,e,f,h,i,j,k,l;return b=Sb,c=w(),c!==E?(e=r(),e!==E?(f=w(),f!==E?(123===a.charCodeAt(Sb)?(h=N,Sb++):(h=E,0===Yb&&d(O)),h!==E?(i=w(),i!==E?(j=g(),j!==E?(k=w(),k!==E?(125===a.charCodeAt(Sb)?(l=S,Sb++):(l=E,0===Yb&&d(T)),l!==E?(Tb=b,c=lb(e,j),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function t(){var b,c,e,f;return b=Sb,a.substr(Sb,7)===mb?(c=mb,Sb+=7):(c=E,0===Yb&&d(nb)),c!==E?(e=w(),e!==E?(f=z(),f!==E?(Tb=b,c=ob(f),b=c):(Sb=b,b=I)):(Sb=b,b=I)):(Sb=b,b=I),b}function u(){var a,b,c,d,e;if(a=Sb,b=t(),b===E&&(b=P),b!==E)if(c=w(),c!==E){if(d=[],e=s(),e!==E)for(;e!==E;)d.push(e),e=s();else d=I;d!==E?(Tb=a,b=pb(b,d),a=b):(Sb=a,a=I)}else Sb=a,a=I;else Sb=a,a=I;return a}function v(){var b,c;if(Yb++,b=[],rb.test(a.charAt(Sb))?(c=a.charAt(Sb),Sb++):(c=E,0===Yb&&d(sb)),c!==E)for(;c!==E;)b.push(c),rb.test(a.charAt(Sb))?(c=a.charAt(Sb),Sb++):(c=E,0===Yb&&d(sb));else b=I;return Yb--,b===E&&(c=E,0===Yb&&d(qb)),b}function w(){var b,c,e;for(Yb++,b=Sb,c=[],e=v();e!==E;)c.push(e),e=v();return c!==E&&(c=a.substring(b,Sb)),b=c,Yb--,b===E&&(c=E,0===Yb&&d(tb)),b}function x(){var b;return ub.test(a.charAt(Sb))?(b=a.charAt(Sb),Sb++):(b=E,0===Yb&&d(vb)),b}function y(){var b;return wb.test(a.charAt(Sb))?(b=a.charAt(Sb),Sb++):(b=E,0===Yb&&d(xb)),b}function z(){var b,c,e,f,g,h;if(b=Sb,48===a.charCodeAt(Sb)?(c=yb,Sb++):(c=E,0===Yb&&d(zb)),c===E){if(c=Sb,e=Sb,Ab.test(a.charAt(Sb))?(f=a.charAt(Sb),Sb++):(f=E,0===Yb&&d(Bb)),f!==E){for(g=[],h=x();h!==E;)g.push(h),h=x();g!==E?(f=[f,g],e=f):(Sb=e,e=I)}else Sb=e,e=I;e!==E&&(e=a.substring(c,Sb)),c=e}return c!==E&&(Tb=b,c=Cb(c)),b=c}function A(){var b,c,e,f,g,h,i,j;return Db.test(a.charAt(Sb))?(b=a.charAt(Sb),Sb++):(b=E,0===Yb&&d(Eb)),b===E&&(b=Sb,a.substr(Sb,2)===Fb?(c=Fb,Sb+=2):(c=E,0===Yb&&d(Gb)),c!==E&&(Tb=b,c=Hb()),b=c,b===E&&(b=Sb,a.substr(Sb,2)===Ib?(c=Ib,Sb+=2):(c=E,0===Yb&&d(Jb)),c!==E&&(Tb=b,c=Kb()),b=c,b===E&&(b=Sb,a.substr(Sb,2)===Lb?(c=Lb,Sb+=2):(c=E,0===Yb&&d(Mb)),c!==E&&(Tb=b,c=Nb()),b=c,b===E&&(b=Sb,a.substr(Sb,2)===Ob?(c=Ob,Sb+=2):(c=E,0===Yb&&d(Pb)),c!==E?(e=Sb,f=Sb,g=y(),g!==E?(h=y(),h!==E?(i=y(),i!==E?(j=y(),j!==E?(g=[g,h,i,j],f=g):(Sb=f,f=I)):(Sb=f,f=I)):(Sb=f,f=I)):(Sb=f,f=I),f!==E&&(f=a.substring(e,Sb)),e=f,e!==E?(Tb=b,c=Qb(e),b=c):(Sb=b,b=I)):(Sb=b,b=I))))),b}function B(){var a,b,c;if(a=Sb,b=[],c=A(),c!==E)for(;c!==E;)b.push(c),c=A();else b=I;return b!==E&&(Tb=a,b=Rb(b)),a=b}var C,D=arguments.length>1?arguments[1]:{},E={},F={start:f},G=f,H=function(a){return{type:"messageFormatPattern",elements:a}},I=E,J=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},K=function(a){return{type:"messageTextElement",value:a}},L=/^[^ \t\n\r,.+={}#]/,M={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},N="{",O={type:"literal",value:"{",description:'"{"'},P=null,Q=",",R={type:"literal",value:",",description:'","'},S="}",T={type:"literal",value:"}",description:'"}"'},U=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},V="number",W={type:"literal",value:"number",description:'"number"'},X="date",Y={type:"literal",value:"date",description:'"date"'},Z="time",$={type:"literal",value:"time",description:'"time"'},_=function(a,b){return{type:a+"Format",style:b&&b[2]}},ab="plural",bb={type:"literal",value:"plural",description:'"plural"'},cb=function(a){return{type:a.type,ordinal:!1,offset:a.offset||0,options:a.options}},db="selectordinal",eb={type:"literal",value:"selectordinal",description:'"selectordinal"'},fb=function(a){return{type:a.type,ordinal:!0,offset:a.offset||0,options:a.options}},gb="select",hb={type:"literal",value:"select",description:'"select"'},ib=function(a){return{type:"selectFormat",options:a}},jb="=",kb={type:"literal",value:"=",description:'"="'},lb=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},mb="offset:",nb={type:"literal",value:"offset:",description:'"offset:"'},ob=function(a){return a},pb=function(a,b){return{type:"pluralFormat",offset:a,options:b}},qb={type:"other",description:"whitespace"},rb=/^[ \t\n\r]/,sb={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},tb={type:"other",description:"optionalWhitespace"},ub=/^[0-9]/,vb={type:"class",value:"[0-9]",description:"[0-9]"},wb=/^[0-9a-f]/i,xb={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},yb="0",zb={type:"literal",value:"0",description:'"0"'},Ab=/^[1-9]/,Bb={type:"class",value:"[1-9]",description:"[1-9]"},Cb=function(a){return parseInt(a,10)},Db=/^[^{}\\\0-\x1F \t\n\r]/,Eb={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},Fb="\\#",Gb={type:"literal",value:"\\#",description:'"\\\\#"'},Hb=function(){return"\\#"},Ib="\\{",Jb={type:"literal",value:"\\{",description:'"\\\\{"'},Kb=function(){return"{"},Lb="\\}",Mb={type:"literal",value:"\\}",description:'"\\\\}"'},Nb=function(){return"}"},Ob="\\u",Pb={type:"literal",value:"\\u",description:'"\\\\u"'},Qb=function(a){return String.fromCharCode(parseInt(a,16))},Rb=function(a){return a.join("")},Sb=0,Tb=0,Ub=0,Vb={line:1,column:1,seenCR:!1},Wb=0,Xb=[],Yb=0;if("startRule"in D){if(!(D.startRule in F))throw new Error("Can't start parsing from rule \""+D.startRule+'".');G=F[D.startRule]}if(C=G(),C!==E&&Sb===a.length)return C;throw C!==E&&Sb<a.length&&d({type:"end",description:"end of input"}),e(null,Xb,Wb)}return a(b,Error),{SyntaxError:b,parse:c}}(),n=g;j(g,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),j(g,"__localeData__",{value:k(null)}),j(g,"__addLocaleData",{value:function(a){if(!a||!a.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");g.__localeData__[a.locale.toLowerCase()]=a}}),j(g,"__parse",{value:m.parse}),j(g,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),g.prototype.resolvedOptions=function(){return{locale:this._locale}},g.prototype._compilePattern=function(a,b,c,d){var e=new l(b,c,d);return e.compile(a)},g.prototype._findPluralRuleFunction=function(a){for(var b=g.__localeData__,c=b[a.toLowerCase()];c;){if(c.pluralRuleFunction)return c.pluralRuleFunction;c=c.parentLocale&&b[c.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+a)},g.prototype._format=function(a,b){var c,d,e,f,g,i="";for(c=0,d=a.length;d>c;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){"string"==typeof a&&(a=[a]),a=(a||[]).concat(g.defaultLocale);var b,c,d,e,f=g.__localeData__;for(b=0,c=a.length;c>b;b+=1)for(d=a[b].toLowerCase().split("-");d.length;){if(e=f[d.join("-")])return e.locale;d.pop()}var h=a.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+a.join(", ")+", or the default locale: "+h)};var o={locale:"en",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1==f&&11!=g?"one":2==f&&12!=g?"two":3==f&&13!=g?"few":"other":1==a&&d?"one":"other"}};n.__addLocaleData(o),n.defaultLocale="en";var p=n;this.IntlMessageFormat=p}).call(this);
(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d,e){this.id=a,this.useOrdinal=b,this.offset=c,this.options=d,this.pluralFn=e}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.formats,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=this._findPluralRuleFunction(this._locale),f=this._compilePattern(d,b,c,e),h=this;this.format=function(a){return h._format(f,a)}}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b=a.format;if(!b)return new c(a.id);var e,g=this.formats,h=this.locales,i=this.pluralFn;switch(b.type){case"numberFormat":return e=g.number[b.style],{id:a.id,format:new Intl.NumberFormat(h,e).format};case"dateFormat":return e=g.date[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"timeFormat":return e=g.time[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"pluralFormat":return e=this.compileOptions(a),new d(a.id,b.ordinal,b.offset,e,i);case"selectFormat":return e=this.compileOptions(a),new f(a.id,e);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset,this.useOrdinal)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var m=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Xa!==b&&(Xa>b&&(Xa=0,Ya={line:1,column:1,seenCR:!1}),c(Ya,Xa,b),Xa=b),Ya}function d(a){Za>Va||(Va>Za&&(Za=Va,$a=[]),$a.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.description<b.description?-1:a.description>b.description?1:0});b<a.length;)a[b-1]===a[b]?a.splice(b,1):b++}function h(a,b){function c(a){function b(a){return a.charCodeAt(0).toString(16).toUpperCase()}return a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(a){return"\\x0"+b(a)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(a){return"\\x"+b(a)}).replace(/[\u0180-\u0FFF]/g,function(a){return"\\u0"+b(a)}).replace(/[\u1080-\uFFFF]/g,function(a){return"\\u"+b(a)})}var d,e,f,g=new Array(a.length);for(f=0;f<a.length;f++)g[f]=a[f].description;return d=a.length>1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f<a.length?a.charAt(f):null;return null!==e&&g(e),new b(null!==d?d:h(e,j),e,j,f,i.line,i.column)}function f(){var a;return a=g()}function g(){var a,b,c;for(a=Va,b=[],c=h();c!==E;)b.push(c),c=h();return b!==E&&(Wa=a,b=H(b)),a=b}function h(){var a;return a=j(),a===E&&(a=l()),a}function i(){var b,c,d,e,f,g;if(b=Va,c=[],d=Va,e=w(),e!==E?(f=B(),f!==E?(g=w(),g!==E?(e=[e,f,g],d=e):(Va=d,d=I)):(Va=d,d=I)):(Va=d,d=I),d!==E)for(;d!==E;)c.push(d),d=Va,e=w(),e!==E?(f=B(),f!==E?(g=w(),g!==E?(e=[e,f,g],d=e):(Va=d,d=I)):(Va=d,d=I)):(Va=d,d=I);else c=I;return c!==E&&(Wa=b,c=J(c)),b=c,b===E&&(b=Va,c=v(),c!==E&&(c=a.substring(b,Va)),b=c),b}function j(){var a,b;return a=Va,b=i(),b!==E&&(Wa=a,b=K(b)),a=b}function k(){var b,c,e;if(b=z(),b===E){if(b=Va,c=[],L.test(a.charAt(Va))?(e=a.charAt(Va),Va++):(e=E,0===_a&&d(M)),e!==E)for(;e!==E;)c.push(e),L.test(a.charAt(Va))?(e=a.charAt(Va),Va++):(e=E,0===_a&&d(M));else c=I;c!==E&&(c=a.substring(b,Va)),b=c}return b}function l(){var b,c,e,f,g,h,i,j,l;return b=Va,123===a.charCodeAt(Va)?(c=N,Va++):(c=E,0===_a&&d(O)),c!==E?(e=w(),e!==E?(f=k(),f!==E?(g=w(),g!==E?(h=Va,44===a.charCodeAt(Va)?(i=Q,Va++):(i=E,0===_a&&d(R)),i!==E?(j=w(),j!==E?(l=m(),l!==E?(i=[i,j,l],h=i):(Va=h,h=I)):(Va=h,h=I)):(Va=h,h=I),h===E&&(h=P),h!==E?(i=w(),i!==E?(125===a.charCodeAt(Va)?(j=S,Va++):(j=E,0===_a&&d(T)),j!==E?(Wa=b,c=U(f,h),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function m(){var a;return a=n(),a===E&&(a=o(),a===E&&(a=p(),a===E&&(a=q()))),a}function n(){var b,c,e,f,g,h,i;return b=Va,a.substr(Va,6)===V?(c=V,Va+=6):(c=E,0===_a&&d(W)),c===E&&(a.substr(Va,4)===X?(c=X,Va+=4):(c=E,0===_a&&d(Y)),c===E&&(a.substr(Va,4)===Z?(c=Z,Va+=4):(c=E,0===_a&&d($)))),c!==E?(e=w(),e!==E?(f=Va,44===a.charCodeAt(Va)?(g=Q,Va++):(g=E,0===_a&&d(R)),g!==E?(h=w(),h!==E?(i=B(),i!==E?(g=[g,h,i],f=g):(Va=f,f=I)):(Va=f,f=I)):(Va=f,f=I),f===E&&(f=P),f!==E?(Wa=b,c=_(c,f),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function o(){var b,c,e,f,g,h;return b=Va,a.substr(Va,6)===aa?(c=aa,Va+=6):(c=E,0===_a&&d(ba)),c!==E?(e=w(),e!==E?(44===a.charCodeAt(Va)?(f=Q,Va++):(f=E,0===_a&&d(R)),f!==E?(g=w(),g!==E?(h=u(),h!==E?(Wa=b,c=ca(h),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function p(){var b,c,e,f,g,h;return b=Va,a.substr(Va,13)===da?(c=da,Va+=13):(c=E,0===_a&&d(ea)),c!==E?(e=w(),e!==E?(44===a.charCodeAt(Va)?(f=Q,Va++):(f=E,0===_a&&d(R)),f!==E?(g=w(),g!==E?(h=u(),h!==E?(Wa=b,c=fa(h),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function q(){var b,c,e,f,g,h,i;if(b=Va,a.substr(Va,6)===ga?(c=ga,Va+=6):(c=E,0===_a&&d(ha)),c!==E)if(e=w(),e!==E)if(44===a.charCodeAt(Va)?(f=Q,Va++):(f=E,0===_a&&d(R)),f!==E)if(g=w(),g!==E){if(h=[],i=s(),i!==E)for(;i!==E;)h.push(i),i=s();else h=I;h!==E?(Wa=b,c=ia(h),b=c):(Va=b,b=I)}else Va=b,b=I;else Va=b,b=I;else Va=b,b=I;else Va=b,b=I;return b}function r(){var b,c,e,f;return b=Va,c=Va,61===a.charCodeAt(Va)?(e=ja,Va++):(e=E,0===_a&&d(ka)),e!==E?(f=z(),f!==E?(e=[e,f],c=e):(Va=c,c=I)):(Va=c,c=I),c!==E&&(c=a.substring(b,Va)),b=c,b===E&&(b=B()),b}function s(){var b,c,e,f,h,i,j,k,l;return b=Va,c=w(),c!==E?(e=r(),e!==E?(f=w(),f!==E?(123===a.charCodeAt(Va)?(h=N,Va++):(h=E,0===_a&&d(O)),h!==E?(i=w(),i!==E?(j=g(),j!==E?(k=w(),k!==E?(125===a.charCodeAt(Va)?(l=S,Va++):(l=E,0===_a&&d(T)),l!==E?(Wa=b,c=la(e,j),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function t(){var b,c,e,f;return b=Va,a.substr(Va,7)===ma?(c=ma,Va+=7):(c=E,0===_a&&d(na)),c!==E?(e=w(),e!==E?(f=z(),f!==E?(Wa=b,c=oa(f),b=c):(Va=b,b=I)):(Va=b,b=I)):(Va=b,b=I),b}function u(){var a,b,c,d,e;if(a=Va,b=t(),b===E&&(b=P),b!==E)if(c=w(),c!==E){if(d=[],e=s(),e!==E)for(;e!==E;)d.push(e),e=s();else d=I;d!==E?(Wa=a,b=pa(b,d),a=b):(Va=a,a=I)}else Va=a,a=I;else Va=a,a=I;return a}function v(){var b,c;if(_a++,b=[],ra.test(a.charAt(Va))?(c=a.charAt(Va),Va++):(c=E,0===_a&&d(sa)),c!==E)for(;c!==E;)b.push(c),ra.test(a.charAt(Va))?(c=a.charAt(Va),Va++):(c=E,0===_a&&d(sa));else b=I;return _a--,b===E&&(c=E,0===_a&&d(qa)),b}function w(){var b,c,e;for(_a++,b=Va,c=[],e=v();e!==E;)c.push(e),e=v();return c!==E&&(c=a.substring(b,Va)),b=c,_a--,b===E&&(c=E,0===_a&&d(ta)),b}function x(){var b;return ua.test(a.charAt(Va))?(b=a.charAt(Va),Va++):(b=E,0===_a&&d(va)),b}function y(){var b;return wa.test(a.charAt(Va))?(b=a.charAt(Va),Va++):(b=E,0===_a&&d(xa)),b}function z(){var b,c,e,f,g,h;if(b=Va,48===a.charCodeAt(Va)?(c=ya,Va++):(c=E,0===_a&&d(za)),c===E){if(c=Va,e=Va,Aa.test(a.charAt(Va))?(f=a.charAt(Va),Va++):(f=E,0===_a&&d(Ba)),f!==E){for(g=[],h=x();h!==E;)g.push(h),h=x();g!==E?(f=[f,g],e=f):(Va=e,e=I)}else Va=e,e=I;e!==E&&(e=a.substring(c,Va)),c=e}return c!==E&&(Wa=b,c=Ca(c)),b=c}function A(){var b,c,e,f,g,h,i,j;return Da.test(a.charAt(Va))?(b=a.charAt(Va),Va++):(b=E,0===_a&&d(Ea)),b===E&&(b=Va,a.substr(Va,2)===Fa?(c=Fa,Va+=2):(c=E,0===_a&&d(Ga)),c!==E&&(Wa=b,c=Ha()),b=c,b===E&&(b=Va,a.substr(Va,2)===Ia?(c=Ia,Va+=2):(c=E,0===_a&&d(Ja)),c!==E&&(Wa=b,c=Ka()),b=c,b===E&&(b=Va,a.substr(Va,2)===La?(c=La,Va+=2):(c=E,0===_a&&d(Ma)),c!==E&&(Wa=b,c=Na()),b=c,b===E&&(b=Va,a.substr(Va,2)===Oa?(c=Oa,Va+=2):(c=E,0===_a&&d(Pa)),c!==E&&(Wa=b,c=Qa()),b=c,b===E&&(b=Va,a.substr(Va,2)===Ra?(c=Ra,Va+=2):(c=E,0===_a&&d(Sa)),c!==E?(e=Va,f=Va,g=y(),g!==E?(h=y(),h!==E?(i=y(),i!==E?(j=y(),j!==E?(g=[g,h,i,j],f=g):(Va=f,f=I)):(Va=f,f=I)):(Va=f,f=I)):(Va=f,f=I),f!==E&&(f=a.substring(e,Va)),e=f,e!==E?(Wa=b,c=Ta(e),b=c):(Va=b,b=I)):(Va=b,b=I)))))),b}function B(){var a,b,c;if(a=Va,b=[],c=A(),c!==E)for(;c!==E;)b.push(c),c=A();else b=I;return b!==E&&(Wa=a,b=Ua(b)),a=b}var C,D=arguments.length>1?arguments[1]:{},E={},F={start:f},G=f,H=function(a){return{type:"messageFormatPattern",elements:a}},I=E,J=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},K=function(a){return{type:"messageTextElement",value:a}},L=/^[^ \t\n\r,.+={}#]/,M={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},N="{",O={type:"literal",value:"{",description:'"{"'},P=null,Q=",",R={type:"literal",value:",",description:'","'},S="}",T={type:"literal",value:"}",description:'"}"'},U=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},V="number",W={type:"literal",value:"number",description:'"number"'},X="date",Y={type:"literal",value:"date",description:'"date"'},Z="time",$={type:"literal",value:"time",description:'"time"'},_=function(a,b){return{type:a+"Format",style:b&&b[2]}},aa="plural",ba={type:"literal",value:"plural",description:'"plural"'},ca=function(a){return{type:a.type,ordinal:!1,offset:a.offset||0,options:a.options}},da="selectordinal",ea={type:"literal",value:"selectordinal",description:'"selectordinal"'},fa=function(a){return{type:a.type,ordinal:!0,offset:a.offset||0,options:a.options}},ga="select",ha={type:"literal",value:"select",description:'"select"'},ia=function(a){return{type:"selectFormat",options:a}},ja="=",ka={type:"literal",value:"=",description:'"="'},la=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},ma="offset:",na={type:"literal",value:"offset:",description:'"offset:"'},oa=function(a){return a},pa=function(a,b){return{type:"pluralFormat",offset:a,options:b}},qa={type:"other",description:"whitespace"},ra=/^[ \t\n\r]/,sa={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},ta={type:"other",description:"optionalWhitespace"},ua=/^[0-9]/,va={type:"class",value:"[0-9]",description:"[0-9]"},wa=/^[0-9a-f]/i,xa={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},ya="0",za={type:"literal",value:"0",description:'"0"'},Aa=/^[1-9]/,Ba={type:"class",value:"[1-9]",description:"[1-9]"},Ca=function(a){return parseInt(a,10)},Da=/^[^{}\\\0-\x1F \t\n\r]/,Ea={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},Fa="\\\\",Ga={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},Ha=function(){return"\\"},Ia="\\#",Ja={type:"literal",value:"\\#",description:'"\\\\#"'},Ka=function(){return"\\#"},La="\\{",Ma={type:"literal",value:"\\{",description:'"\\\\{"'},Na=function(){return"{"},Oa="\\}",Pa={type:"literal",value:"\\}",description:'"\\\\}"'},Qa=function(){return"}"},Ra="\\u",Sa={type:"literal",value:"\\u",description:'"\\\\u"'},Ta=function(a){return String.fromCharCode(parseInt(a,16))},Ua=function(a){return a.join("")},Va=0,Wa=0,Xa=0,Ya={line:1,column:1,seenCR:!1},Za=0,$a=[],_a=0;if("startRule"in D){if(!(D.startRule in F))throw new Error("Can't start parsing from rule \""+D.startRule+'".');G=F[D.startRule]}if(C=G(),C!==E&&Va===a.length)return C;throw C!==E&&Va<a.length&&d({type:"end",description:"end of input"}),e(null,$a,Za)}return a(b,Error),{SyntaxError:b,parse:c}}(),n=g;j(g,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),j(g,"__localeData__",{value:k(null)}),j(g,"__addLocaleData",{value:function(a){if(!a||!a.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");g.__localeData__[a.locale.toLowerCase()]=a}}),j(g,"__parse",{value:m.parse}),j(g,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),g.prototype.resolvedOptions=function(){return{locale:this._locale}},g.prototype._compilePattern=function(a,b,c,d){var e=new l(b,c,d);return e.compile(a)},g.prototype._findPluralRuleFunction=function(a){for(var b=g.__localeData__,c=b[a.toLowerCase()];c;){if(c.pluralRuleFunction)return c.pluralRuleFunction;c=c.parentLocale&&b[c.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+a)},g.prototype._format=function(a,b){var c,d,e,f,g,i="";for(c=0,d=a.length;d>c;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){"string"==typeof a&&(a=[a]),a=(a||[]).concat(g.defaultLocale);var b,c,d,e,f=g.__localeData__;for(b=0,c=a.length;c>b;b+=1)for(d=a[b].toLowerCase().split("-");d.length;){if(e=f[d.join("-")])return e.locale;d.pop()}var h=a.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+a.join(", ")+", or the default locale: "+h)};var o={locale:"en",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1==f&&11!=g?"one":2==f&&12!=g?"two":3==f&&13!=g?"few":"other":1==a&&d?"one":"other"}};n.__addLocaleData(o),n.defaultLocale="en";var p=n;this.IntlMessageFormat=p}).call(this);
//# sourceMappingURL=intl-messageformat.min.js.map
{
"name": "intl-messageformat",
"version": "1.1.0",
"version": "1.2.0",
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",

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

"dependencies": {
"intl-messageformat-parser": "1.1.0"
"intl-messageformat-parser": "1.2.0"
},

@@ -70,3 +70,3 @@ "devDependencies": {

},
"license": "BSD"
"license": "BSD-3-Clause"
}

@@ -267,3 +267,3 @@ Intl MessageFormat

[travis]: https://travis-ci.org/yahoo/intl-messageformat
[travis-badge]: https://img.shields.io/travis/yahoo/intl-messageformat.svg?style=flat-square
[travis-badge]: https://img.shields.io/travis/yahoo/intl-messageformat/master.svg?style=flat-square
[sauce]: https://saucelabs.com/u/intl-messageformat

@@ -270,0 +270,0 @@ [sauce-badge]: https://saucelabs.com/browser-matrix/intl-messageformat.svg

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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