New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

i18next-icu

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-icu - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

### 0.3.0
- allow to pass in localeData in init options
### 0.2.0

@@ -2,0 +5,0 @@ - remove dependencies on lodash.get/.set

@@ -49,2 +49,4 @@ 'use strict';

}
if (this.options.localeData) this.addLocaleData(this.options.localeData);
}

@@ -51,0 +53,0 @@ }, {

@@ -34,2 +34,4 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

}
if (this.options.localeData) this.addLocaleData(this.options.localeData);
}

@@ -36,0 +38,0 @@ }, {

@@ -2027,2 +2027,4 @@ (function (global, factory) {

}
if (this.options.localeData) this.addLocaleData(this.options.localeData);
}

@@ -2029,0 +2031,0 @@ }, {

2

dist/umd/i18nextICU.min.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextICU=e()}(this,function(){"use strict";function t(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function e(e,r,n){var o=t(e,r,Object);o.obj[o.k]=n}function r(e,r){var n=t(e,r),o=n.obj,i=n.k;if(o)return o[i]}function n(t){return m.call(d.call(arguments,1),function(e){if(e)for(var r in e)void 0===t[r]&&(t[r]=e[r])}),t}function o(t){var e,r,n,o,i=Array.prototype.slice.call(arguments,1);for(e=0,r=i.length;e<r;e+=1)if(n=i[e])for(o in n)v.call(n,o)&&(t[o]=n[o]);return t}function i(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function a(t){this.id=t}function u(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function l(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function s(t,e){this.id=t,this.options=e}function c(t,e,r){var n="string"==typeof t?c.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(c.formats,r),g(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),i=this._compilePattern(n,e,r,o),a=this;this.format=function(e){try{return a._format(i,e)}catch(e){throw e.variableId?new Error("The intl string context variable '"+e.variableId+"' was not provided to the string '"+t+"'"):e}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(){return{memoize:!0}}var h=[],m=h.forEach,d=h.slice,v=Object.prototype.hasOwnProperty,y=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),g=y?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!v.call(t,e)||"value"in r)&&(t[e]=r.value)},b=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)v.call(e,o)&&g(n,o,e[o]);return n};i.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},i.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,i=[];for(e=0,r=o.length;e<r;e+=1)switch(n=o[e],n.type){case"messageTextElement":i.push(this.compileMessageText(n));break;case"argumentElement":i.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return i},i.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new l(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},i.prototype.compileArgument=function(t){var e=t.format;if(!e)return new a(t.id);var r,n=this.formats,o=this.locales,i=this.pluralFn;switch(e.type){case"numberFormat":return r=n.number[e.style],{id:t.id,format:new Intl.NumberFormat(o,r).format};case"dateFormat":return r=n.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"timeFormat":return r=n.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"pluralFormat":return r=this.compileOptions(t),new u(t.id,e.ordinal,e.offset,r,i);case"selectFormat":return r=this.compileOptions(t),new s(t.id,r);default:throw new Error("Message element does not have a valid format type")}},i.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],n[a.selector]=this.compileMessage(a.value);return this.currentPlural=this.pluralStack.pop(),n},a.prototype.format=function(t){return t||"number"==typeof t?"string"==typeof t?t:String(t):""},u.prototype.getOption=function(t){var e=this.options;return e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)]||e.other},l.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},s.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var F=function(){function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function e(e){function r(){return o(qt,$t)}function n(t){var r,n,o=Ht[t];if(o)return o;for(r=t-1;!Ht[r];)r--;for(o=Ht[r],o={line:o.line,column:o.column,seenCR:o.seenCR};r<t;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return Ht[t]=o,o}function o(t,e){var r=n(t),o=n(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}}}function i(t){$t<Jt||($t>Jt&&(Jt=$t,Qt=[]),Qt.push(t))}function a(){return u()}function u(){var t,e,r;for(t=$t,e=[],r=l();r!==R;)e.push(r),r=l();return e!==R&&(qt=t,e=S(e)),t=e}function l(){var t;return t=c(),t===R&&(t=p()),t}function s(){var t,r,n,o,i,a;if(t=$t,r=[],n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R),n!==R)for(;n!==R;)r.push(n),n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R);else r=R;return r!==R&&(qt=t,r=T(r)),t=r,t===R&&(t=$t,r=_(),t=r!==R?e.substring(t,$t):r),t}function c(){var t,e;return t=$t,e=s(),e!==R&&(qt=t,e=M(e)),t=e}function f(){var t,r,n;if((t=E())===R){if(t=$t,r=[],D.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N)),n!==R)for(;n!==R;)r.push(n),D.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N));else r=R;t=r!==R?e.substring(t,$t):r}return t}function p(){var t,r,n,o,a,u,l,s,c;return t=$t,123===e.charCodeAt($t)?(r=z,$t++):(r=R,0===Vt&&i(U)),r!==R?(n=A(),n!==R?(o=f(),o!==R?(a=A(),a!==R?(u=$t,44===e.charCodeAt($t)?(l=G,$t++):(l=R,0===Vt&&i(Z)),l!==R?(s=A(),s!==R?(c=h(),c!==R?(l=[l,s,c],u=l):($t=u,u=R)):($t=u,u=R)):($t=u,u=R),u===R&&(u=null),u!==R?(l=A(),l!==R?(125===e.charCodeAt($t)?(s=B,$t++):(s=R,0===Vt&&i(K)),s!==R?(qt=t,r=W(o,u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function h(){var t;return t=m(),t===R&&(t=d())===R&&(t=v())===R&&(t=y()),t}function m(){var t,r,n,o,a,u,l;return t=$t,e.substr($t,6)===$?(r=$,$t+=6):(r=R,0===Vt&&i(q)),r===R&&(e.substr($t,4)===H?(r=H,$t+=4):(r=R,0===Vt&&i(J)),r===R&&(e.substr($t,4)===Q?(r=Q,$t+=4):(r=R,0===Vt&&i(V)))),r!==R?(n=A(),n!==R?(o=$t,44===e.charCodeAt($t)?(a=G,$t++):(a=R,0===Vt&&i(Z)),a!==R?(u=A(),u!==R?(l=L(),l!==R?(a=[a,u,l],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),o===R&&(o=null),o!==R?(qt=t,r=X(r,o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function d(){var t,r,n,o,a,u;return t=$t,e.substr($t,6)===Y?(r=Y,$t+=6):(r=R,0===Vt&&i(tt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=et(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function v(){var t,r,n,o,a,u;return t=$t,e.substr($t,13)===rt?(r=rt,$t+=13):(r=R,0===Vt&&i(nt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=ot(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function y(){var t,r,n,o,a;if(t=$t,e.substr($t,6)===it?(r=it,$t+=6):(r=R,0===Vt&&i(at)),r!==R)if(A()!==R)if(44===e.charCodeAt($t)?(n=G,$t++):(n=R,0===Vt&&i(Z)),n!==R)if(A()!==R){if(o=[],(a=b())!==R)for(;a!==R;)o.push(a),a=b();else o=R;o!==R?(qt=t,r=ut(o),t=r):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;return t}function g(){var t,r,n,o;return t=$t,r=$t,61===e.charCodeAt($t)?(n=lt,$t++):(n=R,0===Vt&&i(st)),n!==R?(o=E(),o!==R?(n=[n,o],r=n):($t=r,r=R)):($t=r,r=R),t=r!==R?e.substring(t,$t):r,t===R&&(t=L()),t}function b(){var t,r,n,o,a,l,s,c,f;return t=$t,r=A(),r!==R?(n=g(),n!==R?(o=A(),o!==R?(123===e.charCodeAt($t)?(a=z,$t++):(a=R,0===Vt&&i(U)),a!==R?(l=A(),l!==R?(s=u(),s!==R?(c=A(),c!==R?(125===e.charCodeAt($t)?(f=B,$t++):(f=R,0===Vt&&i(K)),f!==R?(qt=t,r=ct(n,s),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function F(){var t,r,n,o;return t=$t,e.substr($t,7)===ft?(r=ft,$t+=7):(r=R,0===Vt&&i(pt)),r!==R?(n=A(),n!==R?(o=E(),o!==R?(qt=t,r=ht(o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function w(){var t,e,r,n;if(t=$t,e=F(),e===R&&(e=null),e!==R)if(A()!==R){if(r=[],(n=b())!==R)for(;n!==R;)r.push(n),n=b();else r=R;r!==R?(qt=t,e=mt(e,r),t=e):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;return t}function _(){var t,r;if(Vt++,t=[],vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt)),r!==R)for(;r!==R;)t.push(r),vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt));else t=R;return Vt--,t===R&&(r=R,0===Vt&&i(dt)),t}function A(){var t,r,n;for(Vt++,t=$t,r=[],n=_();n!==R;)r.push(n),n=_();return t=r!==R?e.substring(t,$t):r,Vt--,t===R&&(r=R,0===Vt&&i(gt)),t}function x(){var t;return bt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ft)),t}function C(){var t;return wt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(_t)),t}function E(){var t,r,n,o,a,u;if(t=$t,48===e.charCodeAt($t)?(r=At,$t++):(r=R,0===Vt&&i(xt)),r===R){if(r=$t,n=$t,Ct.test(e.charAt($t))?(o=e.charAt($t),$t++):(o=R,0===Vt&&i(Et)),o!==R){for(a=[],u=x();u!==R;)a.push(u),u=x();a!==R?(o=[o,a],n=o):($t=n,n=R)}else $t=n,n=R;r=n!==R?e.substring(r,$t):n}return r!==R&&(qt=t,r=Pt(r)),t=r}function P(){var t,r,n,o,a,u,l,s;return Lt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ot)),t===R&&(t=$t,e.substr($t,2)===kt?(r=kt,$t+=2):(r=R,0===Vt&&i(Rt)),r!==R&&(qt=t,r=jt()),(t=r)===R&&(t=$t,e.substr($t,2)===It?(r=It,$t+=2):(r=R,0===Vt&&i(St)),r!==R&&(qt=t,r=Tt()),(t=r)===R&&(t=$t,e.substr($t,2)===Mt?(r=Mt,$t+=2):(r=R,0===Vt&&i(Dt)),r!==R&&(qt=t,r=Nt()),(t=r)===R&&(t=$t,e.substr($t,2)===zt?(r=zt,$t+=2):(r=R,0===Vt&&i(Ut)),r!==R&&(qt=t,r=Gt()),(t=r)===R&&(t=$t,e.substr($t,2)===Zt?(r=Zt,$t+=2):(r=R,0===Vt&&i(Bt)),r!==R?(n=$t,o=$t,a=C(),a!==R?(u=C(),u!==R?(l=C(),l!==R?(s=C(),s!==R?(a=[a,u,l,s],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),n=o!==R?e.substring(n,$t):o,n!==R?(qt=t,r=Kt(n),t=r):($t=t,t=R)):($t=t,t=R)))))),t}function L(){var t,e,r;if(t=$t,e=[],(r=P())!==R)for(;r!==R;)e.push(r),r=P();else e=R;return e!==R&&(qt=t,e=Wt(e)),t=e}var O,k=arguments.length>1?arguments[1]:{},R={},j={start:a},I=a,S=function(t){return{type:"messageFormatPattern",elements:t,location:r()}},T=function(t){var e,r,n,o,i,a="";for(e=0,n=t.length;e<n;e+=1)for(o=t[e],r=0,i=o.length;r<i;r+=1)a+=o[r];return a},M=function(t){return{type:"messageTextElement",value:t,location:r()}},D=/^[^ \t\n\r,.+={}#]/,N={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},z="{",U={type:"literal",value:"{",description:'"{"'},G=",",Z={type:"literal",value:",",description:'","'},B="}",K={type:"literal",value:"}",description:'"}"'},W=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2],location:r()}},$="number",q={type:"literal",value:"number",description:'"number"'},H="date",J={type:"literal",value:"date",description:'"date"'},Q="time",V={type:"literal",value:"time",description:'"time"'},X=function(t,e){return{type:t+"Format",style:e&&e[2],location:r()}},Y="plural",tt={type:"literal",value:"plural",description:'"plural"'},et=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options,location:r()}},rt="selectordinal",nt={type:"literal",value:"selectordinal",description:'"selectordinal"'},ot=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options,location:r()}},it="select",at={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t,location:r()}},lt="=",st={type:"literal",value:"=",description:'"="'},ct=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e,location:r()}},ft="offset:",pt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},mt=function(t,e){return{type:"pluralFormat",offset:t,options:e,location:r()}},dt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,yt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},gt={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,Ft={type:"class",value:"[0-9]",description:"[0-9]"},wt=/^[0-9a-f]/i,_t={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},At="0",xt={type:"literal",value:"0",description:'"0"'},Ct=/^[1-9]/,Et={type:"class",value:"[1-9]",description:"[1-9]"},Pt=function(t){return parseInt(t,10)},Lt=/^[^{}\\\0-\x1F \t\n\r]/,Ot={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},kt="\\\\",Rt={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},jt=function(){return"\\"},It="\\#",St={type:"literal",value:"\\#",description:'"\\\\#"'},Tt=function(){return"\\#"},Mt="\\{",Dt={type:"literal",value:"\\{",description:'"\\\\{"'},Nt=function(){return"{"},zt="\\}",Ut={type:"literal",value:"\\}",description:'"\\\\}"'},Gt=function(){return"}"},Zt="\\u",Bt={type:"literal",value:"\\u",description:'"\\\\u"'},Kt=function(t){return String.fromCharCode(parseInt(t,16))},Wt=function(t){return t.join("")},$t=0,qt=0,Ht=[{line:1,column:1,seenCR:!1}],Jt=0,Qt=[],Vt=0;if("startRule"in k){if(!(k.startRule in j))throw new Error("Can't start parsing from rule \""+k.startRule+'".');I=j[k.startRule]}if((O=I())!==R&&$t===e.length)return O;throw O!==R&&$t<e.length&&i({type:"end",description:"end of input"}),function(e,r,n,o){return null!==r&&function(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}(r),new t(null!==e?e:function(t,e){var r,n,o,i=new Array(t.length);for(o=0;o<t.length;o++)i[o]=t[o].description;return r=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],n=e?'"'+function(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.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(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+e(t)})}(e)+'"':"end of input","Expected "+r+" but "+n+" found."}(r,n),r,n,o)}(null,Qt,Jt<e.length?e.charAt(Jt):null,Jt<e.length?o(Jt,Jt+1):o(Jt,Jt))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),{SyntaxError:t,parse:e}}();g(c,"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"}}}}),g(c,"__localeData__",{value:b(null)}),g(c,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");c.__localeData__[t.locale.toLowerCase()]=t}}),g(c,"__parse",{value:F.parse}),g(c,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),c.prototype.resolvedOptions=function(){return{locale:this._locale}},c.prototype._compilePattern=function(t,e,r,n){return new i(e,r,n).compile(t)},c.prototype._findPluralRuleFunction=function(t){for(var e=c.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},c.prototype._format=function(t,e){var r,n,o,i,a,u,l="";for(r=0,n=t.length;r<n;r+=1)if("string"!=typeof(o=t[r])){if(i=o.id,!e||!v.call(e,i))throw u=new Error("A value must be provided for: "+i),u.variableId=i,u;a=e[i],o.options?l+=this._format(o.getOption(a),e):l+=o.format(a)}else l+=o;return l},c.prototype._mergeFormats=function(t,e){var r,n,i={};for(r in t)v.call(t,r)&&(i[r]=n=b(t[r]),e&&v.call(e,r)&&o(n,e[r]));return i},c.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(c.defaultLocale);var e,r,n,o,i=c.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=i[n.join("-")])return o.locale;n.pop()}var a=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+a)};var w={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,i=o&&r[0].slice(-1),a=o&&r[0].slice(-2);return e?1==i&&11!=a?"one":2==i&&12!=a?"two":3==i&&13!=a?"few":"other":1==t&&n?"one":"other"}};c.__addLocaleData(w),c.defaultLocale="en";var _=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),A=function(){function t(e){f(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}return _(t,[{key:"init",value:function(t,e){var r=t&&t.options&&t.options.i18nFormat||{};this.options=n(r,e,this.options||{},p()),t&&(t.IntlMessageFormat=c,t.ICU=this)}},{key:"addLocaleData",value:function(t){("[object Array]"===Object.prototype.toString.apply(t)?t:[t]).forEach(function(t){t&&t.locale&&c.__addLocaleData(t)})}},{key:"parse",value:function(t,n,o,i,a){var u=void 0;return this.options.memoize&&(u=r(this.mem,o+"."+i+"."+a)),u||(u=new c(t,o),this.options.memoize&&e(this.mem,o+"."+i+"."+a,u)),u.format(n)}},{key:"addLookupKeys",value:function(t,e,r,n,o){return t}}]),t}();return A.type="i18nFormat",A});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextICU=e()}(this,function(){"use strict";function t(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function e(e,r,n){var o=t(e,r,Object);o.obj[o.k]=n}function r(e,r){var n=t(e,r),o=n.obj,i=n.k;if(o)return o[i]}function n(t){return m.call(d.call(arguments,1),function(e){if(e)for(var r in e)void 0===t[r]&&(t[r]=e[r])}),t}function o(t){var e,r,n,o,i=Array.prototype.slice.call(arguments,1);for(e=0,r=i.length;e<r;e+=1)if(n=i[e])for(o in n)v.call(n,o)&&(t[o]=n[o]);return t}function i(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function a(t){this.id=t}function u(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function l(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function s(t,e){this.id=t,this.options=e}function c(t,e,r){var n="string"==typeof t?c.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(c.formats,r),g(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),i=this._compilePattern(n,e,r,o),a=this;this.format=function(e){try{return a._format(i,e)}catch(e){throw e.variableId?new Error("The intl string context variable '"+e.variableId+"' was not provided to the string '"+t+"'"):e}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(){return{memoize:!0}}var h=[],m=h.forEach,d=h.slice,v=Object.prototype.hasOwnProperty,y=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),g=y?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!v.call(t,e)||"value"in r)&&(t[e]=r.value)},b=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)v.call(e,o)&&g(n,o,e[o]);return n};i.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},i.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,i=[];for(e=0,r=o.length;e<r;e+=1)switch(n=o[e],n.type){case"messageTextElement":i.push(this.compileMessageText(n));break;case"argumentElement":i.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return i},i.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new l(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},i.prototype.compileArgument=function(t){var e=t.format;if(!e)return new a(t.id);var r,n=this.formats,o=this.locales,i=this.pluralFn;switch(e.type){case"numberFormat":return r=n.number[e.style],{id:t.id,format:new Intl.NumberFormat(o,r).format};case"dateFormat":return r=n.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"timeFormat":return r=n.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"pluralFormat":return r=this.compileOptions(t),new u(t.id,e.ordinal,e.offset,r,i);case"selectFormat":return r=this.compileOptions(t),new s(t.id,r);default:throw new Error("Message element does not have a valid format type")}},i.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],n[a.selector]=this.compileMessage(a.value);return this.currentPlural=this.pluralStack.pop(),n},a.prototype.format=function(t){return t||"number"==typeof t?"string"==typeof t?t:String(t):""},u.prototype.getOption=function(t){var e=this.options;return e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)]||e.other},l.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},s.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var F=function(){function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function e(e){function r(){return o(qt,$t)}function n(t){var r,n,o=Ht[t];if(o)return o;for(r=t-1;!Ht[r];)r--;for(o=Ht[r],o={line:o.line,column:o.column,seenCR:o.seenCR};r<t;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return Ht[t]=o,o}function o(t,e){var r=n(t),o=n(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}}}function i(t){$t<Jt||($t>Jt&&(Jt=$t,Qt=[]),Qt.push(t))}function a(){return u()}function u(){var t,e,r;for(t=$t,e=[],r=l();r!==R;)e.push(r),r=l();return e!==R&&(qt=t,e=S(e)),t=e}function l(){var t;return t=c(),t===R&&(t=p()),t}function s(){var t,r,n,o,i,a;if(t=$t,r=[],n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R),n!==R)for(;n!==R;)r.push(n),n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R);else r=R;return r!==R&&(qt=t,r=D(r)),t=r,t===R&&(t=$t,r=_(),t=r!==R?e.substring(t,$t):r),t}function c(){var t,e;return t=$t,e=s(),e!==R&&(qt=t,e=T(e)),t=e}function f(){var t,r,n;if((t=E())===R){if(t=$t,r=[],M.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N)),n!==R)for(;n!==R;)r.push(n),M.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N));else r=R;t=r!==R?e.substring(t,$t):r}return t}function p(){var t,r,n,o,a,u,l,s,c;return t=$t,123===e.charCodeAt($t)?(r=z,$t++):(r=R,0===Vt&&i(U)),r!==R?(n=A(),n!==R?(o=f(),o!==R?(a=A(),a!==R?(u=$t,44===e.charCodeAt($t)?(l=G,$t++):(l=R,0===Vt&&i(Z)),l!==R?(s=A(),s!==R?(c=h(),c!==R?(l=[l,s,c],u=l):($t=u,u=R)):($t=u,u=R)):($t=u,u=R),u===R&&(u=null),u!==R?(l=A(),l!==R?(125===e.charCodeAt($t)?(s=B,$t++):(s=R,0===Vt&&i(K)),s!==R?(qt=t,r=W(o,u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function h(){var t;return t=m(),t===R&&(t=d())===R&&(t=v())===R&&(t=y()),t}function m(){var t,r,n,o,a,u,l;return t=$t,e.substr($t,6)===$?(r=$,$t+=6):(r=R,0===Vt&&i(q)),r===R&&(e.substr($t,4)===H?(r=H,$t+=4):(r=R,0===Vt&&i(J)),r===R&&(e.substr($t,4)===Q?(r=Q,$t+=4):(r=R,0===Vt&&i(V)))),r!==R?(n=A(),n!==R?(o=$t,44===e.charCodeAt($t)?(a=G,$t++):(a=R,0===Vt&&i(Z)),a!==R?(u=A(),u!==R?(l=L(),l!==R?(a=[a,u,l],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),o===R&&(o=null),o!==R?(qt=t,r=X(r,o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function d(){var t,r,n,o,a,u;return t=$t,e.substr($t,6)===Y?(r=Y,$t+=6):(r=R,0===Vt&&i(tt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=et(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function v(){var t,r,n,o,a,u;return t=$t,e.substr($t,13)===rt?(r=rt,$t+=13):(r=R,0===Vt&&i(nt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=ot(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function y(){var t,r,n,o,a;if(t=$t,e.substr($t,6)===it?(r=it,$t+=6):(r=R,0===Vt&&i(at)),r!==R)if(A()!==R)if(44===e.charCodeAt($t)?(n=G,$t++):(n=R,0===Vt&&i(Z)),n!==R)if(A()!==R){if(o=[],(a=b())!==R)for(;a!==R;)o.push(a),a=b();else o=R;o!==R?(qt=t,r=ut(o),t=r):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;return t}function g(){var t,r,n,o;return t=$t,r=$t,61===e.charCodeAt($t)?(n=lt,$t++):(n=R,0===Vt&&i(st)),n!==R?(o=E(),o!==R?(n=[n,o],r=n):($t=r,r=R)):($t=r,r=R),t=r!==R?e.substring(t,$t):r,t===R&&(t=L()),t}function b(){var t,r,n,o,a,l,s,c,f;return t=$t,r=A(),r!==R?(n=g(),n!==R?(o=A(),o!==R?(123===e.charCodeAt($t)?(a=z,$t++):(a=R,0===Vt&&i(U)),a!==R?(l=A(),l!==R?(s=u(),s!==R?(c=A(),c!==R?(125===e.charCodeAt($t)?(f=B,$t++):(f=R,0===Vt&&i(K)),f!==R?(qt=t,r=ct(n,s),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function F(){var t,r,n,o;return t=$t,e.substr($t,7)===ft?(r=ft,$t+=7):(r=R,0===Vt&&i(pt)),r!==R?(n=A(),n!==R?(o=E(),o!==R?(qt=t,r=ht(o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function w(){var t,e,r,n;if(t=$t,e=F(),e===R&&(e=null),e!==R)if(A()!==R){if(r=[],(n=b())!==R)for(;n!==R;)r.push(n),n=b();else r=R;r!==R?(qt=t,e=mt(e,r),t=e):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;return t}function _(){var t,r;if(Vt++,t=[],vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt)),r!==R)for(;r!==R;)t.push(r),vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt));else t=R;return Vt--,t===R&&(r=R,0===Vt&&i(dt)),t}function A(){var t,r,n;for(Vt++,t=$t,r=[],n=_();n!==R;)r.push(n),n=_();return t=r!==R?e.substring(t,$t):r,Vt--,t===R&&(r=R,0===Vt&&i(gt)),t}function x(){var t;return bt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ft)),t}function C(){var t;return wt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(_t)),t}function E(){var t,r,n,o,a,u;if(t=$t,48===e.charCodeAt($t)?(r=At,$t++):(r=R,0===Vt&&i(xt)),r===R){if(r=$t,n=$t,Ct.test(e.charAt($t))?(o=e.charAt($t),$t++):(o=R,0===Vt&&i(Et)),o!==R){for(a=[],u=x();u!==R;)a.push(u),u=x();a!==R?(o=[o,a],n=o):($t=n,n=R)}else $t=n,n=R;r=n!==R?e.substring(r,$t):n}return r!==R&&(qt=t,r=Pt(r)),t=r}function P(){var t,r,n,o,a,u,l,s;return Lt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ot)),t===R&&(t=$t,e.substr($t,2)===kt?(r=kt,$t+=2):(r=R,0===Vt&&i(Rt)),r!==R&&(qt=t,r=jt()),(t=r)===R&&(t=$t,e.substr($t,2)===It?(r=It,$t+=2):(r=R,0===Vt&&i(St)),r!==R&&(qt=t,r=Dt()),(t=r)===R&&(t=$t,e.substr($t,2)===Tt?(r=Tt,$t+=2):(r=R,0===Vt&&i(Mt)),r!==R&&(qt=t,r=Nt()),(t=r)===R&&(t=$t,e.substr($t,2)===zt?(r=zt,$t+=2):(r=R,0===Vt&&i(Ut)),r!==R&&(qt=t,r=Gt()),(t=r)===R&&(t=$t,e.substr($t,2)===Zt?(r=Zt,$t+=2):(r=R,0===Vt&&i(Bt)),r!==R?(n=$t,o=$t,a=C(),a!==R?(u=C(),u!==R?(l=C(),l!==R?(s=C(),s!==R?(a=[a,u,l,s],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),n=o!==R?e.substring(n,$t):o,n!==R?(qt=t,r=Kt(n),t=r):($t=t,t=R)):($t=t,t=R)))))),t}function L(){var t,e,r;if(t=$t,e=[],(r=P())!==R)for(;r!==R;)e.push(r),r=P();else e=R;return e!==R&&(qt=t,e=Wt(e)),t=e}var O,k=arguments.length>1?arguments[1]:{},R={},j={start:a},I=a,S=function(t){return{type:"messageFormatPattern",elements:t,location:r()}},D=function(t){var e,r,n,o,i,a="";for(e=0,n=t.length;e<n;e+=1)for(o=t[e],r=0,i=o.length;r<i;r+=1)a+=o[r];return a},T=function(t){return{type:"messageTextElement",value:t,location:r()}},M=/^[^ \t\n\r,.+={}#]/,N={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},z="{",U={type:"literal",value:"{",description:'"{"'},G=",",Z={type:"literal",value:",",description:'","'},B="}",K={type:"literal",value:"}",description:'"}"'},W=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2],location:r()}},$="number",q={type:"literal",value:"number",description:'"number"'},H="date",J={type:"literal",value:"date",description:'"date"'},Q="time",V={type:"literal",value:"time",description:'"time"'},X=function(t,e){return{type:t+"Format",style:e&&e[2],location:r()}},Y="plural",tt={type:"literal",value:"plural",description:'"plural"'},et=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options,location:r()}},rt="selectordinal",nt={type:"literal",value:"selectordinal",description:'"selectordinal"'},ot=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options,location:r()}},it="select",at={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t,location:r()}},lt="=",st={type:"literal",value:"=",description:'"="'},ct=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e,location:r()}},ft="offset:",pt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},mt=function(t,e){return{type:"pluralFormat",offset:t,options:e,location:r()}},dt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,yt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},gt={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,Ft={type:"class",value:"[0-9]",description:"[0-9]"},wt=/^[0-9a-f]/i,_t={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},At="0",xt={type:"literal",value:"0",description:'"0"'},Ct=/^[1-9]/,Et={type:"class",value:"[1-9]",description:"[1-9]"},Pt=function(t){return parseInt(t,10)},Lt=/^[^{}\\\0-\x1F \t\n\r]/,Ot={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},kt="\\\\",Rt={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},jt=function(){return"\\"},It="\\#",St={type:"literal",value:"\\#",description:'"\\\\#"'},Dt=function(){return"\\#"},Tt="\\{",Mt={type:"literal",value:"\\{",description:'"\\\\{"'},Nt=function(){return"{"},zt="\\}",Ut={type:"literal",value:"\\}",description:'"\\\\}"'},Gt=function(){return"}"},Zt="\\u",Bt={type:"literal",value:"\\u",description:'"\\\\u"'},Kt=function(t){return String.fromCharCode(parseInt(t,16))},Wt=function(t){return t.join("")},$t=0,qt=0,Ht=[{line:1,column:1,seenCR:!1}],Jt=0,Qt=[],Vt=0;if("startRule"in k){if(!(k.startRule in j))throw new Error("Can't start parsing from rule \""+k.startRule+'".');I=j[k.startRule]}if((O=I())!==R&&$t===e.length)return O;throw O!==R&&$t<e.length&&i({type:"end",description:"end of input"}),function(e,r,n,o){return null!==r&&function(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}(r),new t(null!==e?e:function(t,e){var r,n,o,i=new Array(t.length);for(o=0;o<t.length;o++)i[o]=t[o].description;return r=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],n=e?'"'+function(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.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(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+e(t)})}(e)+'"':"end of input","Expected "+r+" but "+n+" found."}(r,n),r,n,o)}(null,Qt,Jt<e.length?e.charAt(Jt):null,Jt<e.length?o(Jt,Jt+1):o(Jt,Jt))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),{SyntaxError:t,parse:e}}();g(c,"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"}}}}),g(c,"__localeData__",{value:b(null)}),g(c,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");c.__localeData__[t.locale.toLowerCase()]=t}}),g(c,"__parse",{value:F.parse}),g(c,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),c.prototype.resolvedOptions=function(){return{locale:this._locale}},c.prototype._compilePattern=function(t,e,r,n){return new i(e,r,n).compile(t)},c.prototype._findPluralRuleFunction=function(t){for(var e=c.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},c.prototype._format=function(t,e){var r,n,o,i,a,u,l="";for(r=0,n=t.length;r<n;r+=1)if("string"!=typeof(o=t[r])){if(i=o.id,!e||!v.call(e,i))throw u=new Error("A value must be provided for: "+i),u.variableId=i,u;a=e[i],o.options?l+=this._format(o.getOption(a),e):l+=o.format(a)}else l+=o;return l},c.prototype._mergeFormats=function(t,e){var r,n,i={};for(r in t)v.call(t,r)&&(i[r]=n=b(t[r]),e&&v.call(e,r)&&o(n,e[r]));return i},c.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(c.defaultLocale);var e,r,n,o,i=c.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=i[n.join("-")])return o.locale;n.pop()}var a=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+a)};var w={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,i=o&&r[0].slice(-1),a=o&&r[0].slice(-2);return e?1==i&&11!=a?"one":2==i&&12!=a?"two":3==i&&13!=a?"few":"other":1==t&&n?"one":"other"}};c.__addLocaleData(w),c.defaultLocale="en";var _=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),A=function(){function t(e){f(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}return _(t,[{key:"init",value:function(t,e){var r=t&&t.options&&t.options.i18nFormat||{};this.options=n(r,e,this.options||{},p()),t&&(t.IntlMessageFormat=c,t.ICU=this),this.options.localeData&&this.addLocaleData(this.options.localeData)}},{key:"addLocaleData",value:function(t){("[object Array]"===Object.prototype.toString.apply(t)?t:[t]).forEach(function(t){t&&t.locale&&c.__addLocaleData(t)})}},{key:"parse",value:function(t,n,o,i,a){var u=void 0;return this.options.memoize&&(u=r(this.mem,o+"."+i+"."+a)),u||(u=new c(t,o),this.options.memoize&&e(this.mem,o+"."+i+"."+a,u)),u.format(n)}},{key:"addLookupKeys",value:function(t,e,r,n,o){return t}}]),t}();return A.type="i18nFormat",A});

@@ -2027,2 +2027,4 @@ (function (global, factory) {

}
if (this.options.localeData) this.addLocaleData(this.options.localeData);
}

@@ -2029,0 +2031,0 @@ }, {

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextICU=e()}(this,function(){"use strict";function t(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function e(e,r,n){var o=t(e,r,Object);o.obj[o.k]=n}function r(e,r){var n=t(e,r),o=n.obj,i=n.k;if(o)return o[i]}function n(t){return m.call(d.call(arguments,1),function(e){if(e)for(var r in e)void 0===t[r]&&(t[r]=e[r])}),t}function o(t){var e,r,n,o,i=Array.prototype.slice.call(arguments,1);for(e=0,r=i.length;e<r;e+=1)if(n=i[e])for(o in n)v.call(n,o)&&(t[o]=n[o]);return t}function i(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function a(t){this.id=t}function u(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function l(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function s(t,e){this.id=t,this.options=e}function c(t,e,r){var n="string"==typeof t?c.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(c.formats,r),g(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),i=this._compilePattern(n,e,r,o),a=this;this.format=function(e){try{return a._format(i,e)}catch(e){throw e.variableId?new Error("The intl string context variable '"+e.variableId+"' was not provided to the string '"+t+"'"):e}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(){return{memoize:!0}}var h=[],m=h.forEach,d=h.slice,v=Object.prototype.hasOwnProperty,y=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),g=y?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!v.call(t,e)||"value"in r)&&(t[e]=r.value)},b=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)v.call(e,o)&&g(n,o,e[o]);return n};i.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},i.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,i=[];for(e=0,r=o.length;e<r;e+=1)switch(n=o[e],n.type){case"messageTextElement":i.push(this.compileMessageText(n));break;case"argumentElement":i.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return i},i.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new l(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},i.prototype.compileArgument=function(t){var e=t.format;if(!e)return new a(t.id);var r,n=this.formats,o=this.locales,i=this.pluralFn;switch(e.type){case"numberFormat":return r=n.number[e.style],{id:t.id,format:new Intl.NumberFormat(o,r).format};case"dateFormat":return r=n.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"timeFormat":return r=n.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"pluralFormat":return r=this.compileOptions(t),new u(t.id,e.ordinal,e.offset,r,i);case"selectFormat":return r=this.compileOptions(t),new s(t.id,r);default:throw new Error("Message element does not have a valid format type")}},i.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],n[a.selector]=this.compileMessage(a.value);return this.currentPlural=this.pluralStack.pop(),n},a.prototype.format=function(t){return t||"number"==typeof t?"string"==typeof t?t:String(t):""},u.prototype.getOption=function(t){var e=this.options;return e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)]||e.other},l.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},s.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var F=function(){function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function e(e){function r(){return o(qt,$t)}function n(t){var r,n,o=Ht[t];if(o)return o;for(r=t-1;!Ht[r];)r--;for(o=Ht[r],o={line:o.line,column:o.column,seenCR:o.seenCR};r<t;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return Ht[t]=o,o}function o(t,e){var r=n(t),o=n(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}}}function i(t){$t<Jt||($t>Jt&&(Jt=$t,Qt=[]),Qt.push(t))}function a(){return u()}function u(){var t,e,r;for(t=$t,e=[],r=l();r!==R;)e.push(r),r=l();return e!==R&&(qt=t,e=S(e)),t=e}function l(){var t;return t=c(),t===R&&(t=p()),t}function s(){var t,r,n,o,i,a;if(t=$t,r=[],n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R),n!==R)for(;n!==R;)r.push(n),n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R);else r=R;return r!==R&&(qt=t,r=T(r)),t=r,t===R&&(t=$t,r=_(),t=r!==R?e.substring(t,$t):r),t}function c(){var t,e;return t=$t,e=s(),e!==R&&(qt=t,e=M(e)),t=e}function f(){var t,r,n;if((t=E())===R){if(t=$t,r=[],D.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N)),n!==R)for(;n!==R;)r.push(n),D.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N));else r=R;t=r!==R?e.substring(t,$t):r}return t}function p(){var t,r,n,o,a,u,l,s,c;return t=$t,123===e.charCodeAt($t)?(r=z,$t++):(r=R,0===Vt&&i(U)),r!==R?(n=A(),n!==R?(o=f(),o!==R?(a=A(),a!==R?(u=$t,44===e.charCodeAt($t)?(l=G,$t++):(l=R,0===Vt&&i(Z)),l!==R?(s=A(),s!==R?(c=h(),c!==R?(l=[l,s,c],u=l):($t=u,u=R)):($t=u,u=R)):($t=u,u=R),u===R&&(u=null),u!==R?(l=A(),l!==R?(125===e.charCodeAt($t)?(s=B,$t++):(s=R,0===Vt&&i(K)),s!==R?(qt=t,r=W(o,u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function h(){var t;return t=m(),t===R&&(t=d())===R&&(t=v())===R&&(t=y()),t}function m(){var t,r,n,o,a,u,l;return t=$t,e.substr($t,6)===$?(r=$,$t+=6):(r=R,0===Vt&&i(q)),r===R&&(e.substr($t,4)===H?(r=H,$t+=4):(r=R,0===Vt&&i(J)),r===R&&(e.substr($t,4)===Q?(r=Q,$t+=4):(r=R,0===Vt&&i(V)))),r!==R?(n=A(),n!==R?(o=$t,44===e.charCodeAt($t)?(a=G,$t++):(a=R,0===Vt&&i(Z)),a!==R?(u=A(),u!==R?(l=L(),l!==R?(a=[a,u,l],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),o===R&&(o=null),o!==R?(qt=t,r=X(r,o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function d(){var t,r,n,o,a,u;return t=$t,e.substr($t,6)===Y?(r=Y,$t+=6):(r=R,0===Vt&&i(tt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=et(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function v(){var t,r,n,o,a,u;return t=$t,e.substr($t,13)===rt?(r=rt,$t+=13):(r=R,0===Vt&&i(nt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=ot(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function y(){var t,r,n,o,a;if(t=$t,e.substr($t,6)===it?(r=it,$t+=6):(r=R,0===Vt&&i(at)),r!==R)if(A()!==R)if(44===e.charCodeAt($t)?(n=G,$t++):(n=R,0===Vt&&i(Z)),n!==R)if(A()!==R){if(o=[],(a=b())!==R)for(;a!==R;)o.push(a),a=b();else o=R;o!==R?(qt=t,r=ut(o),t=r):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;return t}function g(){var t,r,n,o;return t=$t,r=$t,61===e.charCodeAt($t)?(n=lt,$t++):(n=R,0===Vt&&i(st)),n!==R?(o=E(),o!==R?(n=[n,o],r=n):($t=r,r=R)):($t=r,r=R),t=r!==R?e.substring(t,$t):r,t===R&&(t=L()),t}function b(){var t,r,n,o,a,l,s,c,f;return t=$t,r=A(),r!==R?(n=g(),n!==R?(o=A(),o!==R?(123===e.charCodeAt($t)?(a=z,$t++):(a=R,0===Vt&&i(U)),a!==R?(l=A(),l!==R?(s=u(),s!==R?(c=A(),c!==R?(125===e.charCodeAt($t)?(f=B,$t++):(f=R,0===Vt&&i(K)),f!==R?(qt=t,r=ct(n,s),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function F(){var t,r,n,o;return t=$t,e.substr($t,7)===ft?(r=ft,$t+=7):(r=R,0===Vt&&i(pt)),r!==R?(n=A(),n!==R?(o=E(),o!==R?(qt=t,r=ht(o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function w(){var t,e,r,n;if(t=$t,e=F(),e===R&&(e=null),e!==R)if(A()!==R){if(r=[],(n=b())!==R)for(;n!==R;)r.push(n),n=b();else r=R;r!==R?(qt=t,e=mt(e,r),t=e):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;return t}function _(){var t,r;if(Vt++,t=[],vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt)),r!==R)for(;r!==R;)t.push(r),vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt));else t=R;return Vt--,t===R&&(r=R,0===Vt&&i(dt)),t}function A(){var t,r,n;for(Vt++,t=$t,r=[],n=_();n!==R;)r.push(n),n=_();return t=r!==R?e.substring(t,$t):r,Vt--,t===R&&(r=R,0===Vt&&i(gt)),t}function x(){var t;return bt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ft)),t}function C(){var t;return wt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(_t)),t}function E(){var t,r,n,o,a,u;if(t=$t,48===e.charCodeAt($t)?(r=At,$t++):(r=R,0===Vt&&i(xt)),r===R){if(r=$t,n=$t,Ct.test(e.charAt($t))?(o=e.charAt($t),$t++):(o=R,0===Vt&&i(Et)),o!==R){for(a=[],u=x();u!==R;)a.push(u),u=x();a!==R?(o=[o,a],n=o):($t=n,n=R)}else $t=n,n=R;r=n!==R?e.substring(r,$t):n}return r!==R&&(qt=t,r=Pt(r)),t=r}function P(){var t,r,n,o,a,u,l,s;return Lt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ot)),t===R&&(t=$t,e.substr($t,2)===kt?(r=kt,$t+=2):(r=R,0===Vt&&i(Rt)),r!==R&&(qt=t,r=jt()),(t=r)===R&&(t=$t,e.substr($t,2)===It?(r=It,$t+=2):(r=R,0===Vt&&i(St)),r!==R&&(qt=t,r=Tt()),(t=r)===R&&(t=$t,e.substr($t,2)===Mt?(r=Mt,$t+=2):(r=R,0===Vt&&i(Dt)),r!==R&&(qt=t,r=Nt()),(t=r)===R&&(t=$t,e.substr($t,2)===zt?(r=zt,$t+=2):(r=R,0===Vt&&i(Ut)),r!==R&&(qt=t,r=Gt()),(t=r)===R&&(t=$t,e.substr($t,2)===Zt?(r=Zt,$t+=2):(r=R,0===Vt&&i(Bt)),r!==R?(n=$t,o=$t,a=C(),a!==R?(u=C(),u!==R?(l=C(),l!==R?(s=C(),s!==R?(a=[a,u,l,s],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),n=o!==R?e.substring(n,$t):o,n!==R?(qt=t,r=Kt(n),t=r):($t=t,t=R)):($t=t,t=R)))))),t}function L(){var t,e,r;if(t=$t,e=[],(r=P())!==R)for(;r!==R;)e.push(r),r=P();else e=R;return e!==R&&(qt=t,e=Wt(e)),t=e}var O,k=arguments.length>1?arguments[1]:{},R={},j={start:a},I=a,S=function(t){return{type:"messageFormatPattern",elements:t,location:r()}},T=function(t){var e,r,n,o,i,a="";for(e=0,n=t.length;e<n;e+=1)for(o=t[e],r=0,i=o.length;r<i;r+=1)a+=o[r];return a},M=function(t){return{type:"messageTextElement",value:t,location:r()}},D=/^[^ \t\n\r,.+={}#]/,N={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},z="{",U={type:"literal",value:"{",description:'"{"'},G=",",Z={type:"literal",value:",",description:'","'},B="}",K={type:"literal",value:"}",description:'"}"'},W=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2],location:r()}},$="number",q={type:"literal",value:"number",description:'"number"'},H="date",J={type:"literal",value:"date",description:'"date"'},Q="time",V={type:"literal",value:"time",description:'"time"'},X=function(t,e){return{type:t+"Format",style:e&&e[2],location:r()}},Y="plural",tt={type:"literal",value:"plural",description:'"plural"'},et=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options,location:r()}},rt="selectordinal",nt={type:"literal",value:"selectordinal",description:'"selectordinal"'},ot=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options,location:r()}},it="select",at={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t,location:r()}},lt="=",st={type:"literal",value:"=",description:'"="'},ct=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e,location:r()}},ft="offset:",pt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},mt=function(t,e){return{type:"pluralFormat",offset:t,options:e,location:r()}},dt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,yt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},gt={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,Ft={type:"class",value:"[0-9]",description:"[0-9]"},wt=/^[0-9a-f]/i,_t={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},At="0",xt={type:"literal",value:"0",description:'"0"'},Ct=/^[1-9]/,Et={type:"class",value:"[1-9]",description:"[1-9]"},Pt=function(t){return parseInt(t,10)},Lt=/^[^{}\\\0-\x1F \t\n\r]/,Ot={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},kt="\\\\",Rt={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},jt=function(){return"\\"},It="\\#",St={type:"literal",value:"\\#",description:'"\\\\#"'},Tt=function(){return"\\#"},Mt="\\{",Dt={type:"literal",value:"\\{",description:'"\\\\{"'},Nt=function(){return"{"},zt="\\}",Ut={type:"literal",value:"\\}",description:'"\\\\}"'},Gt=function(){return"}"},Zt="\\u",Bt={type:"literal",value:"\\u",description:'"\\\\u"'},Kt=function(t){return String.fromCharCode(parseInt(t,16))},Wt=function(t){return t.join("")},$t=0,qt=0,Ht=[{line:1,column:1,seenCR:!1}],Jt=0,Qt=[],Vt=0;if("startRule"in k){if(!(k.startRule in j))throw new Error("Can't start parsing from rule \""+k.startRule+'".');I=j[k.startRule]}if((O=I())!==R&&$t===e.length)return O;throw O!==R&&$t<e.length&&i({type:"end",description:"end of input"}),function(e,r,n,o){return null!==r&&function(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}(r),new t(null!==e?e:function(t,e){var r,n,o,i=new Array(t.length);for(o=0;o<t.length;o++)i[o]=t[o].description;return r=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],n=e?'"'+function(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.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(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+e(t)})}(e)+'"':"end of input","Expected "+r+" but "+n+" found."}(r,n),r,n,o)}(null,Qt,Jt<e.length?e.charAt(Jt):null,Jt<e.length?o(Jt,Jt+1):o(Jt,Jt))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),{SyntaxError:t,parse:e}}();g(c,"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"}}}}),g(c,"__localeData__",{value:b(null)}),g(c,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");c.__localeData__[t.locale.toLowerCase()]=t}}),g(c,"__parse",{value:F.parse}),g(c,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),c.prototype.resolvedOptions=function(){return{locale:this._locale}},c.prototype._compilePattern=function(t,e,r,n){return new i(e,r,n).compile(t)},c.prototype._findPluralRuleFunction=function(t){for(var e=c.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},c.prototype._format=function(t,e){var r,n,o,i,a,u,l="";for(r=0,n=t.length;r<n;r+=1)if("string"!=typeof(o=t[r])){if(i=o.id,!e||!v.call(e,i))throw u=new Error("A value must be provided for: "+i),u.variableId=i,u;a=e[i],o.options?l+=this._format(o.getOption(a),e):l+=o.format(a)}else l+=o;return l},c.prototype._mergeFormats=function(t,e){var r,n,i={};for(r in t)v.call(t,r)&&(i[r]=n=b(t[r]),e&&v.call(e,r)&&o(n,e[r]));return i},c.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(c.defaultLocale);var e,r,n,o,i=c.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=i[n.join("-")])return o.locale;n.pop()}var a=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+a)};var w={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,i=o&&r[0].slice(-1),a=o&&r[0].slice(-2);return e?1==i&&11!=a?"one":2==i&&12!=a?"two":3==i&&13!=a?"few":"other":1==t&&n?"one":"other"}};c.__addLocaleData(w),c.defaultLocale="en";var _=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),A=function(){function t(e){f(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}return _(t,[{key:"init",value:function(t,e){var r=t&&t.options&&t.options.i18nFormat||{};this.options=n(r,e,this.options||{},p()),t&&(t.IntlMessageFormat=c,t.ICU=this)}},{key:"addLocaleData",value:function(t){("[object Array]"===Object.prototype.toString.apply(t)?t:[t]).forEach(function(t){t&&t.locale&&c.__addLocaleData(t)})}},{key:"parse",value:function(t,n,o,i,a){var u=void 0;return this.options.memoize&&(u=r(this.mem,o+"."+i+"."+a)),u||(u=new c(t,o),this.options.memoize&&e(this.mem,o+"."+i+"."+a,u)),u.format(n)}},{key:"addLookupKeys",value:function(t,e,r,n,o){return t}}]),t}();return A.type="i18nFormat",A});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextICU=e()}(this,function(){"use strict";function t(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function e(e,r,n){var o=t(e,r,Object);o.obj[o.k]=n}function r(e,r){var n=t(e,r),o=n.obj,i=n.k;if(o)return o[i]}function n(t){return m.call(d.call(arguments,1),function(e){if(e)for(var r in e)void 0===t[r]&&(t[r]=e[r])}),t}function o(t){var e,r,n,o,i=Array.prototype.slice.call(arguments,1);for(e=0,r=i.length;e<r;e+=1)if(n=i[e])for(o in n)v.call(n,o)&&(t[o]=n[o]);return t}function i(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function a(t){this.id=t}function u(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function l(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function s(t,e){this.id=t,this.options=e}function c(t,e,r){var n="string"==typeof t?c.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(c.formats,r),g(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),i=this._compilePattern(n,e,r,o),a=this;this.format=function(e){try{return a._format(i,e)}catch(e){throw e.variableId?new Error("The intl string context variable '"+e.variableId+"' was not provided to the string '"+t+"'"):e}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(){return{memoize:!0}}var h=[],m=h.forEach,d=h.slice,v=Object.prototype.hasOwnProperty,y=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),g=y?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!v.call(t,e)||"value"in r)&&(t[e]=r.value)},b=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)v.call(e,o)&&g(n,o,e[o]);return n};i.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},i.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,i=[];for(e=0,r=o.length;e<r;e+=1)switch(n=o[e],n.type){case"messageTextElement":i.push(this.compileMessageText(n));break;case"argumentElement":i.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return i},i.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new l(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},i.prototype.compileArgument=function(t){var e=t.format;if(!e)return new a(t.id);var r,n=this.formats,o=this.locales,i=this.pluralFn;switch(e.type){case"numberFormat":return r=n.number[e.style],{id:t.id,format:new Intl.NumberFormat(o,r).format};case"dateFormat":return r=n.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"timeFormat":return r=n.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(o,r).format};case"pluralFormat":return r=this.compileOptions(t),new u(t.id,e.ordinal,e.offset,r,i);case"selectFormat":return r=this.compileOptions(t),new s(t.id,r);default:throw new Error("Message element does not have a valid format type")}},i.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],n[a.selector]=this.compileMessage(a.value);return this.currentPlural=this.pluralStack.pop(),n},a.prototype.format=function(t){return t||"number"==typeof t?"string"==typeof t?t:String(t):""},u.prototype.getOption=function(t){var e=this.options;return e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)]||e.other},l.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},s.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var F=function(){function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function e(e){function r(){return o(qt,$t)}function n(t){var r,n,o=Ht[t];if(o)return o;for(r=t-1;!Ht[r];)r--;for(o=Ht[r],o={line:o.line,column:o.column,seenCR:o.seenCR};r<t;)n=e.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return Ht[t]=o,o}function o(t,e){var r=n(t),o=n(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}}}function i(t){$t<Jt||($t>Jt&&(Jt=$t,Qt=[]),Qt.push(t))}function a(){return u()}function u(){var t,e,r;for(t=$t,e=[],r=l();r!==R;)e.push(r),r=l();return e!==R&&(qt=t,e=S(e)),t=e}function l(){var t;return t=c(),t===R&&(t=p()),t}function s(){var t,r,n,o,i,a;if(t=$t,r=[],n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R),n!==R)for(;n!==R;)r.push(n),n=$t,o=A(),o!==R?(i=L(),i!==R?(a=A(),a!==R?(o=[o,i,a],n=o):($t=n,n=R)):($t=n,n=R)):($t=n,n=R);else r=R;return r!==R&&(qt=t,r=D(r)),t=r,t===R&&(t=$t,r=_(),t=r!==R?e.substring(t,$t):r),t}function c(){var t,e;return t=$t,e=s(),e!==R&&(qt=t,e=T(e)),t=e}function f(){var t,r,n;if((t=E())===R){if(t=$t,r=[],M.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N)),n!==R)for(;n!==R;)r.push(n),M.test(e.charAt($t))?(n=e.charAt($t),$t++):(n=R,0===Vt&&i(N));else r=R;t=r!==R?e.substring(t,$t):r}return t}function p(){var t,r,n,o,a,u,l,s,c;return t=$t,123===e.charCodeAt($t)?(r=z,$t++):(r=R,0===Vt&&i(U)),r!==R?(n=A(),n!==R?(o=f(),o!==R?(a=A(),a!==R?(u=$t,44===e.charCodeAt($t)?(l=G,$t++):(l=R,0===Vt&&i(Z)),l!==R?(s=A(),s!==R?(c=h(),c!==R?(l=[l,s,c],u=l):($t=u,u=R)):($t=u,u=R)):($t=u,u=R),u===R&&(u=null),u!==R?(l=A(),l!==R?(125===e.charCodeAt($t)?(s=B,$t++):(s=R,0===Vt&&i(K)),s!==R?(qt=t,r=W(o,u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function h(){var t;return t=m(),t===R&&(t=d())===R&&(t=v())===R&&(t=y()),t}function m(){var t,r,n,o,a,u,l;return t=$t,e.substr($t,6)===$?(r=$,$t+=6):(r=R,0===Vt&&i(q)),r===R&&(e.substr($t,4)===H?(r=H,$t+=4):(r=R,0===Vt&&i(J)),r===R&&(e.substr($t,4)===Q?(r=Q,$t+=4):(r=R,0===Vt&&i(V)))),r!==R?(n=A(),n!==R?(o=$t,44===e.charCodeAt($t)?(a=G,$t++):(a=R,0===Vt&&i(Z)),a!==R?(u=A(),u!==R?(l=L(),l!==R?(a=[a,u,l],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),o===R&&(o=null),o!==R?(qt=t,r=X(r,o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function d(){var t,r,n,o,a,u;return t=$t,e.substr($t,6)===Y?(r=Y,$t+=6):(r=R,0===Vt&&i(tt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=et(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function v(){var t,r,n,o,a,u;return t=$t,e.substr($t,13)===rt?(r=rt,$t+=13):(r=R,0===Vt&&i(nt)),r!==R?(n=A(),n!==R?(44===e.charCodeAt($t)?(o=G,$t++):(o=R,0===Vt&&i(Z)),o!==R?(a=A(),a!==R?(u=w(),u!==R?(qt=t,r=ot(u),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function y(){var t,r,n,o,a;if(t=$t,e.substr($t,6)===it?(r=it,$t+=6):(r=R,0===Vt&&i(at)),r!==R)if(A()!==R)if(44===e.charCodeAt($t)?(n=G,$t++):(n=R,0===Vt&&i(Z)),n!==R)if(A()!==R){if(o=[],(a=b())!==R)for(;a!==R;)o.push(a),a=b();else o=R;o!==R?(qt=t,r=ut(o),t=r):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;else $t=t,t=R;return t}function g(){var t,r,n,o;return t=$t,r=$t,61===e.charCodeAt($t)?(n=lt,$t++):(n=R,0===Vt&&i(st)),n!==R?(o=E(),o!==R?(n=[n,o],r=n):($t=r,r=R)):($t=r,r=R),t=r!==R?e.substring(t,$t):r,t===R&&(t=L()),t}function b(){var t,r,n,o,a,l,s,c,f;return t=$t,r=A(),r!==R?(n=g(),n!==R?(o=A(),o!==R?(123===e.charCodeAt($t)?(a=z,$t++):(a=R,0===Vt&&i(U)),a!==R?(l=A(),l!==R?(s=u(),s!==R?(c=A(),c!==R?(125===e.charCodeAt($t)?(f=B,$t++):(f=R,0===Vt&&i(K)),f!==R?(qt=t,r=ct(n,s),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function F(){var t,r,n,o;return t=$t,e.substr($t,7)===ft?(r=ft,$t+=7):(r=R,0===Vt&&i(pt)),r!==R?(n=A(),n!==R?(o=E(),o!==R?(qt=t,r=ht(o),t=r):($t=t,t=R)):($t=t,t=R)):($t=t,t=R),t}function w(){var t,e,r,n;if(t=$t,e=F(),e===R&&(e=null),e!==R)if(A()!==R){if(r=[],(n=b())!==R)for(;n!==R;)r.push(n),n=b();else r=R;r!==R?(qt=t,e=mt(e,r),t=e):($t=t,t=R)}else $t=t,t=R;else $t=t,t=R;return t}function _(){var t,r;if(Vt++,t=[],vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt)),r!==R)for(;r!==R;)t.push(r),vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=R,0===Vt&&i(yt));else t=R;return Vt--,t===R&&(r=R,0===Vt&&i(dt)),t}function A(){var t,r,n;for(Vt++,t=$t,r=[],n=_();n!==R;)r.push(n),n=_();return t=r!==R?e.substring(t,$t):r,Vt--,t===R&&(r=R,0===Vt&&i(gt)),t}function x(){var t;return bt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ft)),t}function C(){var t;return wt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(_t)),t}function E(){var t,r,n,o,a,u;if(t=$t,48===e.charCodeAt($t)?(r=At,$t++):(r=R,0===Vt&&i(xt)),r===R){if(r=$t,n=$t,Ct.test(e.charAt($t))?(o=e.charAt($t),$t++):(o=R,0===Vt&&i(Et)),o!==R){for(a=[],u=x();u!==R;)a.push(u),u=x();a!==R?(o=[o,a],n=o):($t=n,n=R)}else $t=n,n=R;r=n!==R?e.substring(r,$t):n}return r!==R&&(qt=t,r=Pt(r)),t=r}function P(){var t,r,n,o,a,u,l,s;return Lt.test(e.charAt($t))?(t=e.charAt($t),$t++):(t=R,0===Vt&&i(Ot)),t===R&&(t=$t,e.substr($t,2)===kt?(r=kt,$t+=2):(r=R,0===Vt&&i(Rt)),r!==R&&(qt=t,r=jt()),(t=r)===R&&(t=$t,e.substr($t,2)===It?(r=It,$t+=2):(r=R,0===Vt&&i(St)),r!==R&&(qt=t,r=Dt()),(t=r)===R&&(t=$t,e.substr($t,2)===Tt?(r=Tt,$t+=2):(r=R,0===Vt&&i(Mt)),r!==R&&(qt=t,r=Nt()),(t=r)===R&&(t=$t,e.substr($t,2)===zt?(r=zt,$t+=2):(r=R,0===Vt&&i(Ut)),r!==R&&(qt=t,r=Gt()),(t=r)===R&&(t=$t,e.substr($t,2)===Zt?(r=Zt,$t+=2):(r=R,0===Vt&&i(Bt)),r!==R?(n=$t,o=$t,a=C(),a!==R?(u=C(),u!==R?(l=C(),l!==R?(s=C(),s!==R?(a=[a,u,l,s],o=a):($t=o,o=R)):($t=o,o=R)):($t=o,o=R)):($t=o,o=R),n=o!==R?e.substring(n,$t):o,n!==R?(qt=t,r=Kt(n),t=r):($t=t,t=R)):($t=t,t=R)))))),t}function L(){var t,e,r;if(t=$t,e=[],(r=P())!==R)for(;r!==R;)e.push(r),r=P();else e=R;return e!==R&&(qt=t,e=Wt(e)),t=e}var O,k=arguments.length>1?arguments[1]:{},R={},j={start:a},I=a,S=function(t){return{type:"messageFormatPattern",elements:t,location:r()}},D=function(t){var e,r,n,o,i,a="";for(e=0,n=t.length;e<n;e+=1)for(o=t[e],r=0,i=o.length;r<i;r+=1)a+=o[r];return a},T=function(t){return{type:"messageTextElement",value:t,location:r()}},M=/^[^ \t\n\r,.+={}#]/,N={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},z="{",U={type:"literal",value:"{",description:'"{"'},G=",",Z={type:"literal",value:",",description:'","'},B="}",K={type:"literal",value:"}",description:'"}"'},W=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2],location:r()}},$="number",q={type:"literal",value:"number",description:'"number"'},H="date",J={type:"literal",value:"date",description:'"date"'},Q="time",V={type:"literal",value:"time",description:'"time"'},X=function(t,e){return{type:t+"Format",style:e&&e[2],location:r()}},Y="plural",tt={type:"literal",value:"plural",description:'"plural"'},et=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options,location:r()}},rt="selectordinal",nt={type:"literal",value:"selectordinal",description:'"selectordinal"'},ot=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options,location:r()}},it="select",at={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t,location:r()}},lt="=",st={type:"literal",value:"=",description:'"="'},ct=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e,location:r()}},ft="offset:",pt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},mt=function(t,e){return{type:"pluralFormat",offset:t,options:e,location:r()}},dt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,yt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},gt={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,Ft={type:"class",value:"[0-9]",description:"[0-9]"},wt=/^[0-9a-f]/i,_t={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},At="0",xt={type:"literal",value:"0",description:'"0"'},Ct=/^[1-9]/,Et={type:"class",value:"[1-9]",description:"[1-9]"},Pt=function(t){return parseInt(t,10)},Lt=/^[^{}\\\0-\x1F \t\n\r]/,Ot={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},kt="\\\\",Rt={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},jt=function(){return"\\"},It="\\#",St={type:"literal",value:"\\#",description:'"\\\\#"'},Dt=function(){return"\\#"},Tt="\\{",Mt={type:"literal",value:"\\{",description:'"\\\\{"'},Nt=function(){return"{"},zt="\\}",Ut={type:"literal",value:"\\}",description:'"\\\\}"'},Gt=function(){return"}"},Zt="\\u",Bt={type:"literal",value:"\\u",description:'"\\\\u"'},Kt=function(t){return String.fromCharCode(parseInt(t,16))},Wt=function(t){return t.join("")},$t=0,qt=0,Ht=[{line:1,column:1,seenCR:!1}],Jt=0,Qt=[],Vt=0;if("startRule"in k){if(!(k.startRule in j))throw new Error("Can't start parsing from rule \""+k.startRule+'".');I=j[k.startRule]}if((O=I())!==R&&$t===e.length)return O;throw O!==R&&$t<e.length&&i({type:"end",description:"end of input"}),function(e,r,n,o){return null!==r&&function(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}(r),new t(null!==e?e:function(t,e){var r,n,o,i=new Array(t.length);for(o=0;o<t.length;o++)i[o]=t[o].description;return r=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],n=e?'"'+function(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.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(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+e(t)})}(e)+'"':"end of input","Expected "+r+" but "+n+" found."}(r,n),r,n,o)}(null,Qt,Jt<e.length?e.charAt(Jt):null,Jt<e.length?o(Jt,Jt+1):o(Jt,Jt))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),{SyntaxError:t,parse:e}}();g(c,"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"}}}}),g(c,"__localeData__",{value:b(null)}),g(c,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");c.__localeData__[t.locale.toLowerCase()]=t}}),g(c,"__parse",{value:F.parse}),g(c,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),c.prototype.resolvedOptions=function(){return{locale:this._locale}},c.prototype._compilePattern=function(t,e,r,n){return new i(e,r,n).compile(t)},c.prototype._findPluralRuleFunction=function(t){for(var e=c.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},c.prototype._format=function(t,e){var r,n,o,i,a,u,l="";for(r=0,n=t.length;r<n;r+=1)if("string"!=typeof(o=t[r])){if(i=o.id,!e||!v.call(e,i))throw u=new Error("A value must be provided for: "+i),u.variableId=i,u;a=e[i],o.options?l+=this._format(o.getOption(a),e):l+=o.format(a)}else l+=o;return l},c.prototype._mergeFormats=function(t,e){var r,n,i={};for(r in t)v.call(t,r)&&(i[r]=n=b(t[r]),e&&v.call(e,r)&&o(n,e[r]));return i},c.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(c.defaultLocale);var e,r,n,o,i=c.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=i[n.join("-")])return o.locale;n.pop()}var a=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+a)};var w={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,i=o&&r[0].slice(-1),a=o&&r[0].slice(-2);return e?1==i&&11!=a?"one":2==i&&12!=a?"two":3==i&&13!=a?"few":"other":1==t&&n?"one":"other"}};c.__addLocaleData(w),c.defaultLocale="en";var _=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),A=function(){function t(e){f(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}return _(t,[{key:"init",value:function(t,e){var r=t&&t.options&&t.options.i18nFormat||{};this.options=n(r,e,this.options||{},p()),t&&(t.IntlMessageFormat=c,t.ICU=this),this.options.localeData&&this.addLocaleData(this.options.localeData)}},{key:"addLocaleData",value:function(t){("[object Array]"===Object.prototype.toString.apply(t)?t:[t]).forEach(function(t){t&&t.locale&&c.__addLocaleData(t)})}},{key:"parse",value:function(t,n,o,i,a){var u=void 0;return this.options.memoize&&(u=r(this.mem,o+"."+i+"."+a)),u||(u=new c(t,o),this.options.memoize&&e(this.mem,o+"."+i+"."+a,u)),u.format(n)}},{key:"addLookupKeys",value:function(t,e,r,n,o){return t}}]),t}();return A.type="i18nFormat",A});
{
"name": "i18next-icu",
"version": "0.2.0",
"version": "0.3.0",
"description": "i18nFormat plugin to use ICU format with i18next",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -46,6 +46,9 @@ # Introduction

.init({
i18nFormat: options
i18nFormat: {
localeData: fr // you also can pass in array of localeData
}
});
i18next.ICU.addLocaleData(fr);
// or after init
// i18next.ICU.addLocaleData(fr);

@@ -59,3 +62,6 @@ ```

// per default icu functions are parsed once and cached for subsequent calls
memoize: true
memoize: true,
// array or single object of loaded 'i18next-icu/locale-data
localeData: null
}

@@ -62,0 +68,0 @@ ```

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